mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-12 03:00:38 +00:00
Fixes the skybox problem, the problem with the default keyboard configuration, and adds cl_viewbob and cl_weaponsway
git-svn-id: https://svn.eduke32.com/eduke32@506 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
eb35e8b927
commit
0dfc03afa0
7 changed files with 48 additions and 64 deletions
|
@ -1650,7 +1650,7 @@ void drawpoly (double *dpx, double *dpy, long n, long method)
|
||||||
bglBindTexture(GL_TEXTURE_2D, pth ? pth->glpic : 0);
|
bglBindTexture(GL_TEXTURE_2D, pth ? pth->glpic : 0);
|
||||||
|
|
||||||
// texture scale by parkar request
|
// texture scale by parkar request
|
||||||
if (pth && pth->hicr && ((pth->hicr->xscale != 1.0f) || (pth->hicr->yscale != 1.0f)))
|
if (pth && pth->hicr && ((pth->hicr->xscale != 1.0f) || (pth->hicr->yscale != 1.0f)) && !drawingskybox)
|
||||||
{
|
{
|
||||||
bglMatrixMode(GL_TEXTURE);
|
bglMatrixMode(GL_TEXTURE);
|
||||||
bglLoadIdentity();
|
bglLoadIdentity();
|
||||||
|
|
|
@ -62,9 +62,6 @@ char *Help2d[]= {
|
||||||
" 'L = Adjust sprite/wall coords",
|
" 'L = Adjust sprite/wall coords",
|
||||||
" 'S = Sprite size",
|
" 'S = Sprite size",
|
||||||
" '3 = Caption mode",
|
" '3 = Caption mode",
|
||||||
#ifdef VULGARITY
|
|
||||||
" '4 = MIN FRAMERATE",
|
|
||||||
#endif
|
|
||||||
" '7 = Swap tags",
|
" '7 = Swap tags",
|
||||||
" 'F = Special functions",
|
" 'F = Special functions",
|
||||||
" X = Horiz. flip selected sects",
|
" X = Horiz. flip selected sects",
|
||||||
|
@ -110,19 +107,6 @@ char *SPRDSPMODE[MAXNOSPRITES]= {
|
||||||
"Sprite display: NO EFFECTORS OR ACTORS"
|
"Sprite display: NO EFFECTORS OR ACTORS"
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef VULGARITY
|
|
||||||
char *Slow[8]= {
|
|
||||||
"SALES = 0,000,000 ***********************",
|
|
||||||
"100% OF NOTHING IS !! ********************",
|
|
||||||
"RENDER IN PROGRESS ***********************",
|
|
||||||
"YOUR MOTHER IS A WHORE *******************",
|
|
||||||
"YOU SUCK DONKEY **************************",
|
|
||||||
"FUCKIN PISS ANT **************************",
|
|
||||||
"PISS ANT *********************************",
|
|
||||||
"SLOW *************************************"
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define MAXHELP3D (signed int)(sizeof(Help3d)/sizeof(Help3d[0]))
|
#define MAXHELP3D (signed int)(sizeof(Help3d)/sizeof(Help3d[0]))
|
||||||
char *Help3d[]= {
|
char *Help3d[]= {
|
||||||
"Mapster32 3D mode help",
|
"Mapster32 3D mode help",
|
||||||
|
@ -2978,23 +2962,18 @@ static void Keys3d(void)
|
||||||
rate=(120<<4)/(i-clockval[clockcnt])-1;
|
rate=(120<<4)/(i-clockval[clockcnt])-1;
|
||||||
if (framerateon)
|
if (framerateon)
|
||||||
{
|
{
|
||||||
|
int p = 8;
|
||||||
|
|
||||||
Bsprintf(tempbuf,"%ld",rate);
|
Bsprintf(tempbuf,"%ld",rate);
|
||||||
#ifdef VULGARITY
|
if (rate > 9) p += 8;
|
||||||
if (rate<MinRate)
|
if (rate > 99) p += 8;
|
||||||
{
|
if (rate > 999) p += 8;
|
||||||
Bsprintf(tempbuf,"%ld WARNING : %s",rate,Slow[rate/MinD]);
|
if (xdimgame <= 640) p >>= 1;
|
||||||
begindrawing();
|
|
||||||
printext256(0*8,0*8,whitecol,-1,tempbuf,1);
|
begindrawing();
|
||||||
enddrawing();
|
printext256(xdimgame-p-1,2,0,-1,tempbuf,!(xdimgame > 640));
|
||||||
}
|
printext256(xdimgame-p-2,1,rate < 40?248:whitecol,-1,tempbuf,!(xdimgame > 640));
|
||||||
else
|
enddrawing();
|
||||||
#endif
|
|
||||||
{
|
|
||||||
Bsprintf(tempbuf,"%ld",rate);
|
|
||||||
begindrawing();
|
|
||||||
printext256(0,0,whitecol,-1,tempbuf,!(xdimgame > 640));
|
|
||||||
enddrawing();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
clockval[clockcnt] = i;
|
clockval[clockcnt] = i;
|
||||||
|
@ -3977,25 +3956,6 @@ static void Keys2d(void)
|
||||||
}
|
}
|
||||||
// Ver();
|
// Ver();
|
||||||
|
|
||||||
#ifdef VULGARITY
|
|
||||||
if (keystatus[KEYSC_QUOTE]==1 && keystatus[0x05]==1) // ' 4
|
|
||||||
{
|
|
||||||
keystatus[0x05]=0;
|
|
||||||
MinRate=getnumber16("Enter Min Frame Rate : ", MinRate, 128L,0);
|
|
||||||
printmessage16("");
|
|
||||||
/*
|
|
||||||
if(MinRate==40)
|
|
||||||
{MinRate=24; MinD=3;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{MinRate=40; MinD=5;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
MinRate &= ~7;
|
|
||||||
MinD = MinRate/8;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
if(keystatus[KEYSC_QUOTE]==1 && keystatus[0x06]==1) // ' 5
|
if(keystatus[KEYSC_QUOTE]==1 && keystatus[0x06]==1) // ' 5
|
||||||
{
|
{
|
||||||
|
@ -4476,7 +4436,7 @@ int loadgroupfiles(char *fn)
|
||||||
initprintf("Warning: Failed including %s on line %s:%d\n",
|
initprintf("Warning: Failed including %s on line %s:%d\n",
|
||||||
fn, script->filename,scriptfile_getlinum(script,cmdtokptr));
|
fn, script->filename,scriptfile_getlinum(script,cmdtokptr));
|
||||||
} else {
|
} else {
|
||||||
loadgroupfiles((const char *)included);
|
loadgroupfiles((char *)included);
|
||||||
scriptfile_close(included);
|
scriptfile_close(included);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -288,6 +288,8 @@ void CONFIG_SetDefaults(void)
|
||||||
ud.statusbarmode = 0;
|
ud.statusbarmode = 0;
|
||||||
ud.statusbarscale = 100;
|
ud.statusbarscale = 100;
|
||||||
ud.team = 0;
|
ud.team = 0;
|
||||||
|
ud.viewbob = 1;
|
||||||
|
ud.weaponsway = 1;
|
||||||
ud.weaponswitch = 3; // new+empty
|
ud.weaponswitch = 3; // new+empty
|
||||||
UseJoystick = 0;
|
UseJoystick = 0;
|
||||||
UseMouse = 1;
|
UseMouse = 1;
|
||||||
|
@ -309,6 +311,8 @@ void CONFIG_SetDefaults(void)
|
||||||
|
|
||||||
// JBF 20031211
|
// JBF 20031211
|
||||||
|
|
||||||
|
CONFIG_SetDefaultKeys(0);
|
||||||
|
|
||||||
memset(MouseFunctions, -1, sizeof(MouseFunctions));
|
memset(MouseFunctions, -1, sizeof(MouseFunctions));
|
||||||
for (i=0; i<MAXMOUSEBUTTONS; i++)
|
for (i=0; i<MAXMOUSEBUTTONS; i++)
|
||||||
{
|
{
|
||||||
|
@ -712,6 +716,8 @@ int32 CONFIG_ReadSetup(void)
|
||||||
SCRIPT_GetNumber(scripthandle, "Misc", "AutoVote",&ud.autovote);
|
SCRIPT_GetNumber(scripthandle, "Misc", "AutoVote",&ud.autovote);
|
||||||
SCRIPT_GetNumber(scripthandle, "Misc", "AutoMsg",&ud.automsg);
|
SCRIPT_GetNumber(scripthandle, "Misc", "AutoMsg",&ud.automsg);
|
||||||
SCRIPT_GetNumber(scripthandle, "Misc", "IDPlayers",&ud.automsg);
|
SCRIPT_GetNumber(scripthandle, "Misc", "IDPlayers",&ud.automsg);
|
||||||
|
SCRIPT_GetNumber(scripthandle, "Misc", "ViewBobbing",&ud.viewbob);
|
||||||
|
SCRIPT_GetNumber(scripthandle, "Misc", "WeaponSway",&ud.weaponsway);
|
||||||
|
|
||||||
dummy = useprecache;
|
dummy = useprecache;
|
||||||
SCRIPT_GetNumber(scripthandle, "Misc", "UsePrecache",&dummy);
|
SCRIPT_GetNumber(scripthandle, "Misc", "UsePrecache",&dummy);
|
||||||
|
@ -818,6 +824,8 @@ void CONFIG_WriteSetup(void)
|
||||||
SCRIPT_PutNumber(scripthandle, "Misc", "StatusBarScale",ud.statusbarscale,false,false);
|
SCRIPT_PutNumber(scripthandle, "Misc", "StatusBarScale",ud.statusbarscale,false,false);
|
||||||
SCRIPT_PutNumber(scripthandle, "Misc", "Team",ud.team,false,false);
|
SCRIPT_PutNumber(scripthandle, "Misc", "Team",ud.team,false,false);
|
||||||
SCRIPT_PutNumber(scripthandle, "Misc", "UsePrecache",useprecache,false,false);
|
SCRIPT_PutNumber(scripthandle, "Misc", "UsePrecache",useprecache,false,false);
|
||||||
|
SCRIPT_PutNumber(scripthandle, "Misc", "ViewBobbing",ud.viewbob,false,false);
|
||||||
|
SCRIPT_PutNumber(scripthandle, "Misc", "WeaponSway",ud.weaponsway,false,false);
|
||||||
|
|
||||||
SCRIPT_PutNumber(scripthandle, "Screen Setup", "Detail",ud.detail,false,false);
|
SCRIPT_PutNumber(scripthandle, "Screen Setup", "Detail",ud.detail,false,false);
|
||||||
#if defined(POLYMOST) && defined(USE_OPENGL)
|
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||||
|
|
|
@ -362,7 +362,7 @@ struct user_defs {
|
||||||
int32 runkey_mode,statusbarscale,mouseaiming,weaponswitch,drawweapon; // JBF 20031125
|
int32 runkey_mode,statusbarscale,mouseaiming,weaponswitch,drawweapon; // JBF 20031125
|
||||||
int32 democams,color,pcolor[MAXPLAYERS],msgdisptime,statusbarmode;
|
int32 democams,color,pcolor[MAXPLAYERS],msgdisptime,statusbarmode;
|
||||||
int32 m_noexits,noexits,autovote,automsg,idplayers;
|
int32 m_noexits,noexits,autovote,automsg,idplayers;
|
||||||
int32 team, pteam[MAXPLAYERS];
|
int32 team, pteam[MAXPLAYERS], viewbob, weaponsway;
|
||||||
|
|
||||||
int32 entered_name,screen_tilting,shadows,fta_on,executions,auto_run;
|
int32 entered_name,screen_tilting,shadows,fta_on,executions,auto_run;
|
||||||
int32 coords,tickrate,levelstats,m_coop,coop,screen_size,lockout,crosshair;
|
int32 coords,tickrate,levelstats,m_coop,coop,screen_size,lockout,crosshair;
|
||||||
|
|
|
@ -2325,7 +2325,7 @@ static void tics(void)
|
||||||
j=(timer*AVERAGEFRAMES)/(i-frameval[framecnt]);
|
j=(timer*AVERAGEFRAMES)/(i-frameval[framecnt]);
|
||||||
if (ud.tickrate && !(ps[myconnectindex].gm&MODE_MENU))
|
if (ud.tickrate && !(ps[myconnectindex].gm&MODE_MENU))
|
||||||
{
|
{
|
||||||
int ii, k = 0;
|
int ii, k = 0, p = 8;
|
||||||
|
|
||||||
if (ud.screen_size != 0 && GTFLAGS(GAMETYPE_FLAG_FRAGBAR) && ud.multimode > 1)
|
if (ud.screen_size != 0 && GTFLAGS(GAMETYPE_FLAG_FRAGBAR) && ud.multimode > 1)
|
||||||
{
|
{
|
||||||
|
@ -2336,10 +2336,15 @@ static void tics(void)
|
||||||
Bsprintf(b,"%ld",max(j,0));
|
Bsprintf(b,"%ld",max(j,0));
|
||||||
// minitext(scale(windowx1,320,xdim)+1,scale(windowy1,200,ydim)+1,b,(timer*AVERAGEFRAMES)/(i-frameval[framecnt]) < 40?2:0,26);
|
// minitext(scale(windowx1,320,xdim)+1,scale(windowy1,200,ydim)+1,b,(timer*AVERAGEFRAMES)/(i-frameval[framecnt]) < 40?2:0,26);
|
||||||
|
|
||||||
|
|
||||||
ii = scale(k,ydim,200)+windowy1;
|
ii = scale(k,ydim,200)+windowy1;
|
||||||
printext256(windowx1+2,ii+2,0,-1,b,!(xdim > 640));
|
|
||||||
printext256(windowx1+1,ii+1,(timer*AVERAGEFRAMES)/(i-frameval[framecnt]) < 40?248:31,-1,b,!(xdim > 640));
|
if (j > 9) p += 8;
|
||||||
|
if (j > 99) p += 8;
|
||||||
|
if (j > 999) p += 8;
|
||||||
|
if (xdim <= 640) p >>= 1;
|
||||||
|
|
||||||
|
printext256(windowx2-p+1,ii+2,0,-1,b,!(xdim > 640));
|
||||||
|
printext256(windowx2-p,ii+1,(timer*AVERAGEFRAMES)/(i-frameval[framecnt]) < 40?248:31,-1,b,!(xdim > 640));
|
||||||
|
|
||||||
if (numplayers > 1)
|
if (numplayers > 1)
|
||||||
if ((totalclock - lastpackettime) > 1)
|
if ((totalclock - lastpackettime) > 1)
|
||||||
|
@ -4001,7 +4006,10 @@ void displayrooms(int snum,long smoothratio)
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (p->over_shoulder_on == 0)
|
else if (p->over_shoulder_on == 0)
|
||||||
ud.cameraz += p->opyoff+mulscale16((long)(p->pyoff-p->opyoff),smoothratio);
|
{
|
||||||
|
if (ud.viewbob)
|
||||||
|
ud.cameraz += p->opyoff+mulscale16((long)(p->pyoff-p->opyoff),smoothratio);
|
||||||
|
}
|
||||||
else view(p,&ud.camerax,&ud.cameray,&ud.cameraz,&ud.camerasect,ud.cameraang,ud.camerahoriz);
|
else view(p,&ud.camerax,&ud.cameray,&ud.cameraz,&ud.camerasect,ud.cameraang,ud.camerahoriz);
|
||||||
|
|
||||||
cz = hittype[p->i].ceilingz;
|
cz = hittype[p->i].ceilingz;
|
||||||
|
|
|
@ -640,6 +640,9 @@ cvar[] =
|
||||||
{ "cl_showfps", "cl_showfps: show the frame rate counter", (void*)&ud.tickrate, CVAR_BOOL, 0, 0, 1 },
|
{ "cl_showfps", "cl_showfps: show the frame rate counter", (void*)&ud.tickrate, CVAR_BOOL, 0, 0, 1 },
|
||||||
{ "cl_smoothinput", "cl_smoothinput: enable/disable input smoothing\n", (void*)&SmoothInput, CVAR_BOOL, 0, 0, 1 },
|
{ "cl_smoothinput", "cl_smoothinput: enable/disable input smoothing\n", (void*)&SmoothInput, CVAR_BOOL, 0, 0, 1 },
|
||||||
|
|
||||||
|
{ "cl_viewbob", "cl_viewbob: enable/disable player head bobbing\n", (void*)&ud.viewbob, CVAR_BOOL, 0, 0, 1 },
|
||||||
|
|
||||||
|
{ "cl_weaponsway", "cl_weaponsway: enable/disable player weapon swaying\n", (void*)&ud.weaponsway, CVAR_BOOL, 0, 0, 1 },
|
||||||
{ "cl_weaponswitch", "cl_weaponswitch: enable/disable auto weapon switching", (void*)&ud.weaponswitch, CVAR_INT|256, 0, 0, 3 },
|
{ "cl_weaponswitch", "cl_weaponswitch: enable/disable auto weapon switching", (void*)&ud.weaponswitch, CVAR_INT|256, 0, 0, 3 },
|
||||||
#if defined(POLYMOST) && defined(USE_OPENGL)
|
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||||
{ "r_anamorphic", "r_anamorphic: enable/disable widescreen mode", (void*)&glwidescreen, CVAR_BOOL, 0, 0, 1 },
|
{ "r_anamorphic", "r_anamorphic: enable/disable widescreen mode", (void*)&glwidescreen, CVAR_BOOL, 0, 0, 1 },
|
||||||
|
|
|
@ -2137,12 +2137,17 @@ void displayweapon(int snum)
|
||||||
gun_pos = 80-(p->weapon_pos*p->weapon_pos);
|
gun_pos = 80-(p->weapon_pos*p->weapon_pos);
|
||||||
|
|
||||||
weapon_xoffset = (160)-90;
|
weapon_xoffset = (160)-90;
|
||||||
weapon_xoffset -= (sintable[((p->weapon_sway>>1)+512)&2047]/(1024+512));
|
|
||||||
weapon_xoffset -= 58 + p->weapon_ang;
|
|
||||||
if (sprite[p->i].xrepeat < 32)
|
|
||||||
gun_pos -= klabs(sintable[(p->weapon_sway<<2)&2047]>>9);
|
|
||||||
else gun_pos -= klabs(sintable[(p->weapon_sway>>1)&2047]>>10);
|
|
||||||
|
|
||||||
|
if (ud.weaponsway)
|
||||||
|
{
|
||||||
|
weapon_xoffset -= (sintable[((p->weapon_sway>>1)+512)&2047]/(1024+512));
|
||||||
|
|
||||||
|
if (sprite[p->i].xrepeat < 32)
|
||||||
|
gun_pos -= klabs(sintable[(p->weapon_sway<<2)&2047]>>9);
|
||||||
|
else gun_pos -= klabs(sintable[(p->weapon_sway>>1)&2047]>>10);
|
||||||
|
} else gun_pos -= 16;
|
||||||
|
|
||||||
|
weapon_xoffset -= 58 + p->weapon_ang;
|
||||||
gun_pos -= (p->hard_landing<<3);
|
gun_pos -= (p->hard_landing<<3);
|
||||||
|
|
||||||
if (p->last_weapon >= 0)
|
if (p->last_weapon >= 0)
|
||||||
|
|
Loading…
Reference in a new issue