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:
terminx 2006-05-20 14:31:24 +00:00
parent c6e003ee9b
commit c173d310ff
6 changed files with 25 additions and 34 deletions

View file

@ -591,16 +591,16 @@ void resizeglcheck ()
glox1 = windowx1; gloy1 = windowy1; glox1 = windowx1; gloy1 = windowy1;
glox2 = windowx2; gloy2 = windowy2; glox2 = windowx2; gloy2 = windowy2;
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
fovcorrect = (ratioratio > 1) ? (((windowx2-windowx1+1) * ratioratio) - (windowx2-windowx1+1)) * ((float)glratiocorrection / 63) : 0; 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); bglViewport(windowx1 - (fovcorrect / 2), yres-(windowy2+1),windowx2-windowx1+1 + fovcorrect, windowy2-windowy1+1);
bglMatrixMode(GL_PROJECTION); bglMatrixMode(GL_PROJECTION);
memset(m,0,sizeof(m)); 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[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; m[3][2] =-1.0;
bglLoadMatrixf(&m[0][0]); bglLoadMatrixf(&m[0][0]);
//bglLoadIdentity(); //bglLoadIdentity();
@ -3354,9 +3354,9 @@ void polymost_drawrooms ()
long vx, vy, vz, hitx, hity, hitz; long vx, vy, vz, hitx, hity, hitz;
float ratioratio = 1.0; 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 //Tilt rotation
ox = ox2*gctang + oy2*gstang; ox = ox2*gctang + oy2*gstang;

View file

@ -51,7 +51,7 @@ extern int shareware;
#define BYTEVERSION_13 27 #define BYTEVERSION_13 27
#define BYTEVERSION_14 116 #define BYTEVERSION_14 116
#define BYTEVERSION_15 117 #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 #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 toggle_key_flag,knuckle_incs; // ,select_dir;
char walking_snd_toggle, palookup, hard_landing; char walking_snd_toggle, palookup, hard_landing;
char /*fire_flag,*/pals[3]; 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 max_secret_rooms,secret_rooms,max_actors_killed,actors_killed;
long runspeed; long runspeed, movement_lock;
short sbs, sound_pitch; short sbs, sound_pitch;
}; };

View file

@ -685,7 +685,7 @@ LABELS playerlabels[]= {
{ "sbs", PLAYER_SBS, 0, 0 }, { "sbs", PLAYER_SBS, 0, 0 },
{ "reloading", PLAYER_RELOADING, 0, 0 }, { "reloading", PLAYER_RELOADING, 0, 0 },
{ "auto_aim", PLAYER_AUTO_AIM, 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 }, { "sound_pitch", PLAYER_SOUND_PITCH, 0, 0 },
{ "weaponswitch", PLAYER_WEAPONSWITCH, 0, 0 }, { "weaponswitch", PLAYER_WEAPONSWITCH, 0, 0 },
{ "", -1, 0, 0 } // END OF LIST { "", -1, 0, 0 } // END OF LIST
@ -1362,9 +1362,8 @@ void ResetActorGameVars(short sActor)
{ {
int i; int i;
for(i=0;i<iDefaultGameVarCount;i++) for(i=0;i<MAXGAMEVARS;i++)
if( i < MAXGAMEVARS) if( aGameVars[i].dwFlags & GAMEVAR_FLAG_PERACTOR && !(aGameVars[i].dwFlags & GAMEVAR_FLAG_NODEFAULT))
if( aGameVars[i].dwFlags & GAMEVAR_FLAG_PERACTOR)
aGameVars[i].plValues[sActor]=aDefaultGameVars[i].lValue; aGameVars[i].plValues[sActor]=aDefaultGameVars[i].lValue;
} }

View file

@ -1875,11 +1875,10 @@ void DoPlayer(char bSet, long lVar1, long lLabelID, long lVar2, short sActor, sh
break; break;
case PLAYER_MOVEMENT_LOCK: case PLAYER_MOVEMENT_LOCK:
lTemp=lParm2;
if(bSet) if(bSet)
ps[iPlayer].movement_lock[lTemp]=lValue; ps[iPlayer].movement_lock=lValue;
else else
SetGameVarID((int)lVar2, ps[iPlayer].movement_lock[lTemp], sActor, sPlayer); SetGameVarID((int)lVar2, ps[iPlayer].movement_lock, sActor, sPlayer);
break; break;
case PLAYER_SOUND_PITCH: case PLAYER_SOUND_PITCH:
@ -5088,10 +5087,7 @@ SKIPJIBS:
ps[g_p].reloading = 0; ps[g_p].reloading = 0;
ps[g_p].movement_lock[1] = 0; ps[g_p].movement_lock = 0;
ps[g_p].movement_lock[2] = 0;
ps[g_p].movement_lock[3] = 0;
ps[g_p].movement_lock[4] = 0;
OnEvent(EVENT_RESETPLAYER, ps[g_p].i, g_p, -1); OnEvent(EVENT_RESETPLAYER, ps[g_p].i, g_p, -1);
cameradist = 0; cameradist = 0;
@ -5730,7 +5726,6 @@ good:
case PLAYER_AMMO_AMOUNT: case PLAYER_AMMO_AMOUNT:
case PLAYER_GOTWEAPON: case PLAYER_GOTWEAPON:
case PLAYER_PALS: case PLAYER_PALS:
case PLAYER_MOVEMENT_LOCK:
case PLAYER_LOOGIEX: case PLAYER_LOOGIEX:
case PLAYER_LOOGIEY: case PLAYER_LOOGIEY:
lParm2=GetGameVarID(*insptr++, g_i, g_p); lParm2=GetGameVarID(*insptr++, g_i, g_p);

View file

@ -2898,9 +2898,9 @@ void getinput(short snum)
if (BUTTON(gamefunc_Strafe)) 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; 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; svel -= keymove;
} }
else else
@ -2925,13 +2925,13 @@ void getinput(short snum)
turnheldtime=0; 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; 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; 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; 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; vel += -keymove;
if(vel < -MAXVEL) vel = -MAXVEL; 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])); 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); Bsprintf(tempbuf,fta_quotes[16300+i+(mulscale(krand(), 3, 16)*10)],name1,name2);
if(ScreenWidth >= 640) if(ScreenWidth >= 800)
adduserquote(tempbuf); adduserquote(tempbuf);
else OSD_Printf("%s\n",strip_color_codes(tempbuf)); else OSD_Printf("%s\n",strip_color_codes(tempbuf));
} }
@ -3551,7 +3551,7 @@ void processinput(short snum)
else i = 0; else i = 0;
Bsprintf(tempbuf,fta_quotes[16350+i],strip_color_codes(&ud.user_name[snum][0])); Bsprintf(tempbuf,fta_quotes[16350+i],strip_color_codes(&ud.user_name[snum][0]));
if(ScreenWidth >= 640) if(ScreenWidth >= 800)
adduserquote(tempbuf); adduserquote(tempbuf);
else OSD_Printf("%s\n",strip_color_codes(tempbuf)); else OSD_Printf("%s\n",strip_color_codes(tempbuf));
} }

View file

@ -528,10 +528,7 @@ void resetplayerstats(short snum)
p->jetpack_on = 0; p->jetpack_on = 0;
p->reloading = 0; p->reloading = 0;
p->movement_lock[1] = 0; p->movement_lock = 0;
p->movement_lock[2] = 0;
p->movement_lock[3] = 0;
p->movement_lock[4] = 0;
setpal(p); setpal(p);
OnEvent(EVENT_RESETPLAYER, p->i, snum, -1); OnEvent(EVENT_RESETPLAYER, p->i, snum, -1);