mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-11 18:50:46 +00:00
Change ratio correction to always assume a ratio of 1.2. I like this better than how it worked before. Plagman, what say you?
git-svn-id: https://svn.eduke32.com/eduke32@172 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
c6e003ee9b
commit
c173d310ff
6 changed files with 25 additions and 34 deletions
|
@ -591,16 +591,16 @@ void resizeglcheck ()
|
|||
glox1 = windowx1; gloy1 = windowy1;
|
||||
glox2 = windowx2; gloy2 = windowy2;
|
||||
|
||||
ratioratio = 1.6 / (((float)(windowx2-windowx1+1)) / (windowy2-windowy1)); // computes the ratio between 16/10 and current resolution ratio
|
||||
fovcorrect = (ratioratio > 1) ? (((windowx2-windowx1+1) * ratioratio) - (windowx2-windowx1+1)) * ((float)glratiocorrection / 63) : 0;
|
||||
ratioratio = 1.2; //1.6 / (((float)(windowx2-windowx1+1)) / (windowy2-windowy1)); // computes the ratio between 16/10 and current resolution ratio
|
||||
fovcorrect = (((windowx2-windowx1+1) * ratioratio) - (windowx2-windowx1+1)) * ((float)glratiocorrection / 63);
|
||||
|
||||
bglViewport(windowx1 - (fovcorrect / 2), yres-(windowy2+1),windowx2-windowx1+1 + fovcorrect, windowy2-windowy1+1);
|
||||
|
||||
bglMatrixMode(GL_PROJECTION);
|
||||
memset(m,0,sizeof(m));
|
||||
m[0][0] = (float)ydimen / ((ratioratio > 1)?1.2:1); m[0][2] = 1.0;
|
||||
m[0][0] = (float)ydimen / 1.2; m[0][2] = 1.0;
|
||||
m[1][1] = (float)xdimen; m[1][2] = 1.0;
|
||||
m[2][2] = 1.0; m[2][3] = (float)ydimen / ((ratioratio > 1)?1.2:1);
|
||||
m[2][2] = 1.0; m[2][3] = (float)ydimen / 1.2;
|
||||
m[3][2] =-1.0;
|
||||
bglLoadMatrixf(&m[0][0]);
|
||||
//bglLoadIdentity();
|
||||
|
@ -3354,9 +3354,9 @@ void polymost_drawrooms ()
|
|||
long vx, vy, vz, hitx, hity, hitz;
|
||||
float ratioratio = 1.0;
|
||||
|
||||
ratioratio = 1.6 / (((float)(windowx2-windowx1+1)) / (windowy2-windowy1)); // computes the ratio between 16/10 and current resolution ratio
|
||||
ratioratio = 1.2; //1.6 / (((float)(windowx2-windowx1+1)) / (windowy2-windowy1)); // computes the ratio between 16/10 and current resolution ratio
|
||||
|
||||
ox2 = (searchx-ghalfx)/ratioratio; oy2 = (searchy-ghoriz)/((ratioratio > 1)?1.2:1); oz2 = ghalfx;
|
||||
ox2 = (searchx-ghalfx)/ratioratio; oy2 = (searchy-ghoriz)/ /*((ratioratio > 1)?*/1.2/*:1)*/; oz2 = ghalfx;
|
||||
|
||||
//Tilt rotation
|
||||
ox = ox2*gctang + oy2*gstang;
|
||||
|
|
|
@ -51,7 +51,7 @@ extern int shareware;
|
|||
#define BYTEVERSION_13 27
|
||||
#define BYTEVERSION_14 116
|
||||
#define BYTEVERSION_15 117
|
||||
#define BYTEVERSION_JF 162 // increase by 3, because atomic GRP adds 1, and Shareware adds 2
|
||||
#define BYTEVERSION_JF 165 // increase by 3, because atomic GRP adds 1, and Shareware adds 2
|
||||
|
||||
#define BYTEVERSION (BYTEVERSION_JF+(PLUTOPAK?1:(VOLUMEONE<<1))) // JBF 20040116: different data files give different versions
|
||||
|
||||
|
@ -411,10 +411,10 @@ struct player_struct {
|
|||
char toggle_key_flag,knuckle_incs; // ,select_dir;
|
||||
char walking_snd_toggle, palookup, hard_landing;
|
||||
char /*fire_flag,*/pals[3];
|
||||
char return_to_center, reloading, movement_lock[4];
|
||||
char return_to_center, reloading;
|
||||
|
||||
long max_secret_rooms,secret_rooms,max_actors_killed,actors_killed;
|
||||
long runspeed;
|
||||
long runspeed, movement_lock;
|
||||
short sbs, sound_pitch;
|
||||
};
|
||||
|
||||
|
|
|
@ -685,7 +685,7 @@ LABELS playerlabels[]= {
|
|||
{ "sbs", PLAYER_SBS, 0, 0 },
|
||||
{ "reloading", PLAYER_RELOADING, 0, 0 },
|
||||
{ "auto_aim", PLAYER_AUTO_AIM, 0, 0 },
|
||||
{ "movement_lock", PLAYER_MOVEMENT_LOCK, LABEL_HASPARM2, 4 },
|
||||
{ "movement_lock", PLAYER_MOVEMENT_LOCK, 0, 0 },
|
||||
{ "sound_pitch", PLAYER_SOUND_PITCH, 0, 0 },
|
||||
{ "weaponswitch", PLAYER_WEAPONSWITCH, 0, 0 },
|
||||
{ "", -1, 0, 0 } // END OF LIST
|
||||
|
@ -1362,10 +1362,9 @@ void ResetActorGameVars(short sActor)
|
|||
{
|
||||
int i;
|
||||
|
||||
for(i=0;i<iDefaultGameVarCount;i++)
|
||||
if( i < MAXGAMEVARS)
|
||||
if( aGameVars[i].dwFlags & GAMEVAR_FLAG_PERACTOR)
|
||||
aGameVars[i].plValues[sActor]=aDefaultGameVars[i].lValue;
|
||||
for(i=0;i<MAXGAMEVARS;i++)
|
||||
if( aGameVars[i].dwFlags & GAMEVAR_FLAG_PERACTOR && !(aGameVars[i].dwFlags & GAMEVAR_FLAG_NODEFAULT))
|
||||
aGameVars[i].plValues[sActor]=aDefaultGameVars[i].lValue;
|
||||
}
|
||||
|
||||
int GetGameID(char *szGameLabel)
|
||||
|
|
|
@ -1875,11 +1875,10 @@ void DoPlayer(char bSet, long lVar1, long lLabelID, long lVar2, short sActor, sh
|
|||
break;
|
||||
|
||||
case PLAYER_MOVEMENT_LOCK:
|
||||
lTemp=lParm2;
|
||||
if(bSet)
|
||||
ps[iPlayer].movement_lock[lTemp]=lValue;
|
||||
ps[iPlayer].movement_lock=lValue;
|
||||
else
|
||||
SetGameVarID((int)lVar2, ps[iPlayer].movement_lock[lTemp], sActor, sPlayer);
|
||||
SetGameVarID((int)lVar2, ps[iPlayer].movement_lock, sActor, sPlayer);
|
||||
break;
|
||||
|
||||
case PLAYER_SOUND_PITCH:
|
||||
|
@ -5088,10 +5087,7 @@ SKIPJIBS:
|
|||
|
||||
ps[g_p].reloading = 0;
|
||||
|
||||
ps[g_p].movement_lock[1] = 0;
|
||||
ps[g_p].movement_lock[2] = 0;
|
||||
ps[g_p].movement_lock[3] = 0;
|
||||
ps[g_p].movement_lock[4] = 0;
|
||||
ps[g_p].movement_lock = 0;
|
||||
|
||||
OnEvent(EVENT_RESETPLAYER, ps[g_p].i, g_p, -1);
|
||||
cameradist = 0;
|
||||
|
@ -5730,7 +5726,6 @@ good:
|
|||
case PLAYER_AMMO_AMOUNT:
|
||||
case PLAYER_GOTWEAPON:
|
||||
case PLAYER_PALS:
|
||||
case PLAYER_MOVEMENT_LOCK:
|
||||
case PLAYER_LOOGIEX:
|
||||
case PLAYER_LOOGIEY:
|
||||
lParm2=GetGameVarID(*insptr++, g_i, g_p);
|
||||
|
|
|
@ -2898,9 +2898,9 @@ void getinput(short snum)
|
|||
|
||||
if (BUTTON(gamefunc_Strafe))
|
||||
{
|
||||
if ( BUTTON(gamefunc_Turn_Left) && (ps[snum].movement_lock[3] == 0))
|
||||
if ( BUTTON(gamefunc_Turn_Left) && !(ps[snum].movement_lock&4))
|
||||
svel -= -keymove;
|
||||
if ( BUTTON(gamefunc_Turn_Right) && (ps[snum].movement_lock[4] == 0))
|
||||
if ( BUTTON(gamefunc_Turn_Right) && !(ps[snum].movement_lock&8))
|
||||
svel -= keymove;
|
||||
}
|
||||
else
|
||||
|
@ -2925,13 +2925,13 @@ void getinput(short snum)
|
|||
turnheldtime=0;
|
||||
}
|
||||
|
||||
if ( BUTTON(gamefunc_Strafe_Left) && (ps[snum].movement_lock[3] == 0))
|
||||
if ( BUTTON(gamefunc_Strafe_Left) && !(ps[snum].movement_lock&4))
|
||||
svel += keymove;
|
||||
if ( BUTTON(gamefunc_Strafe_Right) && (ps[snum].movement_lock[4] == 0))
|
||||
if ( BUTTON(gamefunc_Strafe_Right) && !(ps[snum].movement_lock&8))
|
||||
svel += -keymove;
|
||||
if ( BUTTON(gamefunc_Move_Forward) && (ps[snum].movement_lock[1] == 0))
|
||||
if ( BUTTON(gamefunc_Move_Forward) && !(ps[snum].movement_lock&1))
|
||||
vel += keymove;
|
||||
if ( BUTTON(gamefunc_Move_Backward) && (ps[snum].movement_lock[2] == 0))
|
||||
if ( BUTTON(gamefunc_Move_Backward) && !(ps[snum].movement_lock&2))
|
||||
vel += -keymove;
|
||||
|
||||
if(vel < -MAXVEL) vel = -MAXVEL;
|
||||
|
@ -3535,7 +3535,7 @@ void processinput(short snum)
|
|||
Bstrcpy(name2,strip_color_codes(&ud.user_name[p->frag_ps][0]));
|
||||
|
||||
Bsprintf(tempbuf,fta_quotes[16300+i+(mulscale(krand(), 3, 16)*10)],name1,name2);
|
||||
if(ScreenWidth >= 640)
|
||||
if(ScreenWidth >= 800)
|
||||
adduserquote(tempbuf);
|
||||
else OSD_Printf("%s\n",strip_color_codes(tempbuf));
|
||||
}
|
||||
|
@ -3551,7 +3551,7 @@ void processinput(short snum)
|
|||
else i = 0;
|
||||
|
||||
Bsprintf(tempbuf,fta_quotes[16350+i],strip_color_codes(&ud.user_name[snum][0]));
|
||||
if(ScreenWidth >= 640)
|
||||
if(ScreenWidth >= 800)
|
||||
adduserquote(tempbuf);
|
||||
else OSD_Printf("%s\n",strip_color_codes(tempbuf));
|
||||
}
|
||||
|
|
|
@ -528,10 +528,7 @@ void resetplayerstats(short snum)
|
|||
p->jetpack_on = 0;
|
||||
p->reloading = 0;
|
||||
|
||||
p->movement_lock[1] = 0;
|
||||
p->movement_lock[2] = 0;
|
||||
p->movement_lock[3] = 0;
|
||||
p->movement_lock[4] = 0;
|
||||
p->movement_lock = 0;
|
||||
|
||||
setpal(p);
|
||||
OnEvent(EVENT_RESETPLAYER, p->i, snum, -1);
|
||||
|
|
Loading…
Reference in a new issue