mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
git-svn-id: https://svn.eduke32.com/eduke32@881 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
c3cc992d65
commit
86e70d3012
10 changed files with 117 additions and 32 deletions
|
@ -132,9 +132,9 @@ int setpalette(int start, int num, char *dapal);
|
||||||
int setgamma(void);
|
int setgamma(void);
|
||||||
double vid_gamma, vid_contrast, vid_brightness;
|
double vid_gamma, vid_contrast, vid_brightness;
|
||||||
|
|
||||||
#define DEFAULT_GAMMA 1.2
|
#define DEFAULT_GAMMA 1.0
|
||||||
#define DEFAULT_CONTRAST 1.2
|
#define DEFAULT_CONTRAST 1.2
|
||||||
#define DEFAULT_BRIGHTNESS 0.0
|
#define DEFAULT_BRIGHTNESS 0.1
|
||||||
|
|
||||||
int switchrendermethod(int,int); // 0 = software, 1 = opengl | bool = reinit
|
int switchrendermethod(int,int); // 0 = software, 1 = opengl | bool = reinit
|
||||||
|
|
||||||
|
|
|
@ -174,6 +174,9 @@ int r_animsmoothing = 1;
|
||||||
int r_parallaxskyclamping = 1;
|
int r_parallaxskyclamping = 1;
|
||||||
int r_parallaxskypanning = 0;
|
int r_parallaxskypanning = 0;
|
||||||
|
|
||||||
|
// line of sight checks before mddraw()
|
||||||
|
int r_cullobstructedmodels = 0;
|
||||||
|
|
||||||
static float fogresult, fogcol[4];
|
static float fogresult, fogcol[4];
|
||||||
|
|
||||||
// making this a macro should speed things up at the expense of code size
|
// making this a macro should speed things up at the expense of code size
|
||||||
|
@ -4423,6 +4426,7 @@ void polymost_drawsprite(int snum)
|
||||||
int posx,posy;
|
int posx,posy;
|
||||||
int oldsizx, oldsizy;
|
int oldsizx, oldsizy;
|
||||||
int tsizx, tsizy;
|
int tsizx, tsizy;
|
||||||
|
short datempsectnum;
|
||||||
|
|
||||||
tspr = tspriteptr[snum];
|
tspr = tspriteptr[snum];
|
||||||
if (tspr->owner < 0 || tspr->picnum < 0) return;
|
if (tspr->owner < 0 || tspr->picnum < 0) return;
|
||||||
|
@ -4467,7 +4471,46 @@ void polymost_drawsprite(int snum)
|
||||||
{
|
{
|
||||||
if (usemodels && tile2model[Ptile2tile(tspr->picnum,tspr->pal)].modelid >= 0 && tile2model[Ptile2tile(tspr->picnum,tspr->pal)].framenum >= 0)
|
if (usemodels && tile2model[Ptile2tile(tspr->picnum,tspr->pal)].modelid >= 0 && tile2model[Ptile2tile(tspr->picnum,tspr->pal)].framenum >= 0)
|
||||||
{
|
{
|
||||||
if (mddraw(tspr)) return;
|
if (r_cullobstructedmodels)
|
||||||
|
{
|
||||||
|
i = 0;
|
||||||
|
do // this is so gay
|
||||||
|
{
|
||||||
|
if (cansee(globalposx, globalposy, globalposz, globalcursectnum, tspr->x, tspr->y, tspr->z, tspr->sectnum))
|
||||||
|
{ i++; break; }
|
||||||
|
if (cansee(globalposx, globalposy, globalposz+6144, globalcursectnum, tspr->x, tspr->y, tspr->z, tspr->sectnum))
|
||||||
|
{ i++; break; }
|
||||||
|
if (cansee(globalposx, globalposy, globalposz-6144, globalcursectnum, tspr->x, tspr->y, tspr->z, tspr->sectnum))
|
||||||
|
{ i++; break; }
|
||||||
|
if (cansee(globalposx, globalposy, sector[globalcursectnum].ceilingz, globalcursectnum, tspr->x, tspr->y, tspr->z, tspr->sectnum))
|
||||||
|
{ i++; break; }
|
||||||
|
if (cansee(globalposx, globalposy, sector[globalcursectnum].floorz, globalcursectnum, tspr->x, tspr->y, tspr->z, tspr->sectnum))
|
||||||
|
{ i++; break; }
|
||||||
|
updatesector(tspr->x+384,tspr->y,&datempsectnum);
|
||||||
|
if (cansee(globalposx, globalposy, globalposz, globalcursectnum, tspr->x+384, tspr->y, sector[datempsectnum].ceilingz, datempsectnum))
|
||||||
|
{ i++; break; }
|
||||||
|
if (cansee(globalposx, globalposy, globalposz, globalcursectnum, tspr->x+384, tspr->y, sector[datempsectnum].floorz, datempsectnum))
|
||||||
|
{ i++; break; }
|
||||||
|
updatesector(tspr->x-384,tspr->y,&datempsectnum);
|
||||||
|
if (cansee(globalposx, globalposy, globalposz, globalcursectnum, tspr->x-384, tspr->y, sector[datempsectnum].ceilingz, datempsectnum))
|
||||||
|
{ i++; break; }
|
||||||
|
if (cansee(globalposx, globalposy, globalposz, globalcursectnum, tspr->x-384, tspr->y, sector[datempsectnum].floorz, datempsectnum))
|
||||||
|
{ i++; break; }
|
||||||
|
updatesector(tspr->x,tspr->y+384,&datempsectnum);
|
||||||
|
if (cansee(globalposx, globalposy, globalposz, globalcursectnum, tspr->x, tspr->y+384, sector[datempsectnum].ceilingz, datempsectnum))
|
||||||
|
{ i++; break; }
|
||||||
|
if (cansee(globalposx, globalposy, globalposz, globalcursectnum, tspr->x, tspr->y+384, sector[datempsectnum].floorz, datempsectnum))
|
||||||
|
{ i++; break; }
|
||||||
|
updatesector(tspr->x,tspr->y-384,&datempsectnum);
|
||||||
|
if (cansee(globalposx, globalposy, globalposz, globalcursectnum, tspr->x, tspr->y-384, sector[datempsectnum].ceilingz, datempsectnum))
|
||||||
|
{ i++; break; }
|
||||||
|
if (cansee(globalposx, globalposy, globalposz, globalcursectnum, tspr->x, tspr->y-384, sector[datempsectnum].floorz, datempsectnum))
|
||||||
|
{ i++; break; }
|
||||||
|
break;
|
||||||
|
} while (1);
|
||||||
|
} else i = 1;
|
||||||
|
|
||||||
|
if (i && mddraw(tspr)) return;
|
||||||
break; // else, render as flat sprite
|
break; // else, render as flat sprite
|
||||||
}
|
}
|
||||||
if (usevoxels && (tspr->cstat&48)!=48 && tiletovox[tspr->picnum] >= 0 && voxmodels[ tiletovox[tspr->picnum] ])
|
if (usevoxels && (tspr->cstat&48)!=48 && tiletovox[tspr->picnum] >= 0 && voxmodels[ tiletovox[tspr->picnum] ])
|
||||||
|
@ -5863,6 +5906,12 @@ static int osdcmd_polymostvars(const osdfuncparm_t *parm)
|
||||||
}
|
}
|
||||||
return OSDCMD_OK;
|
return OSDCMD_OK;
|
||||||
}
|
}
|
||||||
|
else if (!Bstrcasecmp(parm->name, "r_cullobstructedmodels"))
|
||||||
|
{
|
||||||
|
if (showval) { OSD_Printf("r_cullobstructedmodels is %d\n", r_cullobstructedmodels); }
|
||||||
|
else r_cullobstructedmodels = (val != 0);
|
||||||
|
return OSDCMD_OK;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
return OSDCMD_SHOWHELP;
|
return OSDCMD_SHOWHELP;
|
||||||
}
|
}
|
||||||
|
@ -5923,6 +5972,7 @@ void polymost_initosdfuncs(void)
|
||||||
OSD_RegisterFunction("r_animsmoothing","r_animsmoothing: enable/disable model animation smoothing",osdcmd_polymostvars);
|
OSD_RegisterFunction("r_animsmoothing","r_animsmoothing: enable/disable model animation smoothing",osdcmd_polymostvars);
|
||||||
OSD_RegisterFunction("r_parallaxskyclamping","r_parallaxskyclamping: enable/disable parallaxed floor/ceiling sky texture clamping",osdcmd_polymostvars);
|
OSD_RegisterFunction("r_parallaxskyclamping","r_parallaxskyclamping: enable/disable parallaxed floor/ceiling sky texture clamping",osdcmd_polymostvars);
|
||||||
OSD_RegisterFunction("r_parallaxskypanning","r_parallaxskypanning: enable/disable parallaxed floor/ceiling panning when drawing a parallaxed sky",osdcmd_polymostvars);
|
OSD_RegisterFunction("r_parallaxskypanning","r_parallaxskypanning: enable/disable parallaxed floor/ceiling panning when drawing a parallaxed sky",osdcmd_polymostvars);
|
||||||
|
OSD_RegisterFunction("r_cullobstructedmodels","r_cullobstructedmodels: enable/disable hack to cull \"unseen\" models",osdcmd_polymostvars);
|
||||||
#endif
|
#endif
|
||||||
OSD_RegisterFunction("r_models","r_models: enable/disable model rendering in >8-bit mode",osdcmd_polymostvars);
|
OSD_RegisterFunction("r_models","r_models: enable/disable model rendering in >8-bit mode",osdcmd_polymostvars);
|
||||||
OSD_RegisterFunction("r_hightile","r_hightile: enable/disable hightile texture rendering in >8-bit mode",osdcmd_polymostvars);
|
OSD_RegisterFunction("r_hightile","r_hightile: enable/disable hightile texture rendering in >8-bit mode",osdcmd_polymostvars);
|
||||||
|
|
|
@ -225,7 +225,8 @@ void CONFIG_SetDefaults(void)
|
||||||
ud.brightness = 8;
|
ud.brightness = 8;
|
||||||
ud.camerasprite = -1;
|
ud.camerasprite = -1;
|
||||||
ud.color = 0;
|
ud.color = 0;
|
||||||
ud.crosshair = 2;
|
ud.crosshair = 1;
|
||||||
|
ud.crosshairscale = 50;
|
||||||
ud.deathmsgs = 1;
|
ud.deathmsgs = 1;
|
||||||
ud.democams = 1;
|
ud.democams = 1;
|
||||||
ud.detail = 1;
|
ud.detail = 1;
|
||||||
|
@ -705,6 +706,7 @@ int32 CONFIG_ReadSetup(void)
|
||||||
SCRIPT_GetNumber(ud.config.scripthandle, "Setup", "ForceSetup",&ud.config.ForceSetup);
|
SCRIPT_GetNumber(ud.config.scripthandle, "Setup", "ForceSetup",&ud.config.ForceSetup);
|
||||||
SCRIPT_GetNumber(ud.config.scripthandle, "Misc", "RunMode",&ud.config.RunMode);
|
SCRIPT_GetNumber(ud.config.scripthandle, "Misc", "RunMode",&ud.config.RunMode);
|
||||||
SCRIPT_GetNumber(ud.config.scripthandle, "Misc", "Crosshairs",&ud.crosshair);
|
SCRIPT_GetNumber(ud.config.scripthandle, "Misc", "Crosshairs",&ud.crosshair);
|
||||||
|
SCRIPT_GetNumber(ud.config.scripthandle, "Misc", "CrosshairScale",&ud.crosshairscale);
|
||||||
SCRIPT_GetNumber(ud.config.scripthandle, "Misc", "StatusBarScale",&ud.statusbarscale);
|
SCRIPT_GetNumber(ud.config.scripthandle, "Misc", "StatusBarScale",&ud.statusbarscale);
|
||||||
SCRIPT_GetNumber(ud.config.scripthandle, "Misc", "ShowLevelStats",&ud.levelstats);
|
SCRIPT_GetNumber(ud.config.scripthandle, "Misc", "ShowLevelStats",&ud.levelstats);
|
||||||
SCRIPT_GetNumber(ud.config.scripthandle, "Misc", "ShowOpponentWeapons",&ud.config.ShowOpponentWeapons);
|
SCRIPT_GetNumber(ud.config.scripthandle, "Misc", "ShowOpponentWeapons",&ud.config.ShowOpponentWeapons);
|
||||||
|
@ -857,6 +859,7 @@ void CONFIG_WriteSetup(void)
|
||||||
SCRIPT_PutNumber(ud.config.scripthandle, "Misc", "AutoVote",ud.autovote,false,false);
|
SCRIPT_PutNumber(ud.config.scripthandle, "Misc", "AutoVote",ud.autovote,false,false);
|
||||||
SCRIPT_PutNumber(ud.config.scripthandle, "Misc", "Color",ud.color,false,false);
|
SCRIPT_PutNumber(ud.config.scripthandle, "Misc", "Color",ud.color,false,false);
|
||||||
SCRIPT_PutNumber(ud.config.scripthandle, "Misc", "Crosshairs",ud.crosshair,false,false);
|
SCRIPT_PutNumber(ud.config.scripthandle, "Misc", "Crosshairs",ud.crosshair,false,false);
|
||||||
|
SCRIPT_PutNumber(ud.config.scripthandle, "Misc", "CrosshairScale",ud.crosshairscale,false,false);
|
||||||
SCRIPT_PutNumber(ud.config.scripthandle, "Misc", "DeathMessages",ud.deathmsgs,false,false);
|
SCRIPT_PutNumber(ud.config.scripthandle, "Misc", "DeathMessages",ud.deathmsgs,false,false);
|
||||||
SCRIPT_PutNumber(ud.config.scripthandle, "Misc", "DemoCams",ud.democams,false,false);
|
SCRIPT_PutNumber(ud.config.scripthandle, "Misc", "DemoCams",ud.democams,false,false);
|
||||||
ud.executions++;
|
ud.executions++;
|
||||||
|
|
|
@ -407,7 +407,7 @@ typedef struct {
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int const_visibility,uw_framerate;
|
int const_visibility,uw_framerate;
|
||||||
int camera_time,folfvel,folavel,folx,foly,fola;
|
int camera_time,folfvel,folavel,folx,foly,fola;
|
||||||
int reccnt;
|
int reccnt,crosshairscale;
|
||||||
|
|
||||||
int runkey_mode,statusbarscale,mouseaiming,weaponswitch,drawweapon; // JBF 20031125
|
int runkey_mode,statusbarscale,mouseaiming,weaponswitch,drawweapon; // JBF 20031125
|
||||||
int democams,color,msgdisptime,statusbarmode;
|
int democams,color,msgdisptime,statusbarmode;
|
||||||
|
|
|
@ -3471,7 +3471,7 @@ void displayrest(int smoothratio)
|
||||||
SetGameVarID(g_iReturnVarID,0,g_player[screenpeek].ps->i,screenpeek);
|
SetGameVarID(g_iReturnVarID,0,g_player[screenpeek].ps->i,screenpeek);
|
||||||
OnEvent(EVENT_DISPLAYCROSSHAIR, g_player[screenpeek].ps->i, screenpeek, -1);
|
OnEvent(EVENT_DISPLAYCROSSHAIR, g_player[screenpeek].ps->i, screenpeek, -1);
|
||||||
if (GetGameVarID(g_iReturnVarID,g_player[screenpeek].ps->i,screenpeek) == 0)
|
if (GetGameVarID(g_iReturnVarID,g_player[screenpeek].ps->i,screenpeek) == 0)
|
||||||
rotatesprite((160L-(g_player[myconnectindex].ps->look_ang>>1))<<16,100L<<16,ud.crosshair>1?65536L>>(ud.crosshair-1):65536L,0,CROSSHAIR,0,0,2+1,windowx1,windowy1,windowx2,windowy2);
|
rotatesprite((160L-(g_player[myconnectindex].ps->look_ang>>1))<<16,100L<<16,scale(65536,ud.crosshairscale,100),0,CROSSHAIR,0,0,2+1,windowx1,windowy1,windowx2,windowy2);
|
||||||
}
|
}
|
||||||
#if 0
|
#if 0
|
||||||
if (gametype_flags[ud.coop] & GAMETYPE_FLAG_TDM)
|
if (gametype_flags[ud.coop] & GAMETYPE_FLAG_TDM)
|
||||||
|
@ -7823,12 +7823,12 @@ static void nonsharedkeys(void)
|
||||||
if (BUTTON(gamefunc_Toggle_Crosshair))
|
if (BUTTON(gamefunc_Toggle_Crosshair))
|
||||||
{
|
{
|
||||||
CONTROL_ClearButton(gamefunc_Toggle_Crosshair);
|
CONTROL_ClearButton(gamefunc_Toggle_Crosshair);
|
||||||
ud.crosshair = (ud.crosshair==3)?0:ud.crosshair+1;
|
ud.crosshair = !ud.crosshair;
|
||||||
if (ud.crosshair)
|
if (ud.crosshair)
|
||||||
{
|
{
|
||||||
int size[] = { 100, 50, 25 };
|
// Bsprintf(fta_quotes[122],"%s [%d%%]",fta_quotes[20],size[ud.crosshair-1]);
|
||||||
Bsprintf(fta_quotes[122],"%s [%d%%]",fta_quotes[20],size[ud.crosshair-1]);
|
// FTA(122,g_player[screenpeek].ps);
|
||||||
FTA(122,g_player[screenpeek].ps);
|
FTA(20,g_player[screenpeek].ps);
|
||||||
}
|
}
|
||||||
else FTA(21,g_player[screenpeek].ps);
|
else FTA(21,g_player[screenpeek].ps);
|
||||||
}
|
}
|
||||||
|
|
|
@ -874,6 +874,7 @@ const memberlabel_t userdefslabels[]=
|
||||||
{ "angleinterpolation", USERDEFS_ANGLEINTERPOLATION, 0, 0 },
|
{ "angleinterpolation", USERDEFS_ANGLEINTERPOLATION, 0, 0 },
|
||||||
{ "deathmsgs", USERDEFS_DEATHMSGS, 0, 0 },
|
{ "deathmsgs", USERDEFS_DEATHMSGS, 0, 0 },
|
||||||
{ "levelstats", USERDEFS_LEVELSTATS, 0, 0 },
|
{ "levelstats", USERDEFS_LEVELSTATS, 0, 0 },
|
||||||
|
{ "crosshairscale", USERDEFS_CROSSHAIRSCALE, 0, 0 },
|
||||||
{ "", -1, 0, 0 } // END OF LIST
|
{ "", -1, 0, 0 } // END OF LIST
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -341,7 +341,8 @@ enum userdefslabels
|
||||||
USERDEFS_WEAPONSWAY,
|
USERDEFS_WEAPONSWAY,
|
||||||
USERDEFS_ANGLEINTERPOLATION,
|
USERDEFS_ANGLEINTERPOLATION,
|
||||||
USERDEFS_DEATHMSGS,
|
USERDEFS_DEATHMSGS,
|
||||||
USERDEFS_LEVELSTATS
|
USERDEFS_LEVELSTATS,
|
||||||
|
USERDEFS_CROSSHAIRSCALE
|
||||||
};
|
};
|
||||||
|
|
||||||
enum sectorlabels
|
enum sectorlabels
|
||||||
|
|
|
@ -865,6 +865,15 @@ static void DoUserDef(int iSet, int lLabelID, int lVar2)
|
||||||
SetGameVarID(lVar2, ud.levelstats, g_i, g_p);
|
SetGameVarID(lVar2, ud.levelstats, g_i, g_p);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
case USERDEFS_CROSSHAIRSCALE:
|
||||||
|
if (iSet)
|
||||||
|
{
|
||||||
|
ud.crosshairscale = lValue;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
SetGameVarID(lVar2, ud.crosshairscale, g_i, g_p);
|
||||||
|
return;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2638,10 +2638,11 @@ cheat_for_port_credits:
|
||||||
char *opts[] =
|
char *opts[] =
|
||||||
{
|
{
|
||||||
"Show crosshair",
|
"Show crosshair",
|
||||||
"Show level stats",
|
"Crosshair size",
|
||||||
"-",
|
"-",
|
||||||
"Screen size",
|
"Screen size",
|
||||||
"Status bar size",
|
"Status bar size",
|
||||||
|
"Show level stats",
|
||||||
"-",
|
"-",
|
||||||
"Allow walk with autorun",
|
"Allow walk with autorun",
|
||||||
"-",
|
"-",
|
||||||
|
@ -2654,8 +2655,6 @@ cheat_for_port_credits:
|
||||||
"-",
|
"-",
|
||||||
"-",
|
"-",
|
||||||
"-",
|
"-",
|
||||||
"-",
|
|
||||||
"-",
|
|
||||||
"More...",
|
"More...",
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
@ -2672,7 +2671,7 @@ cheat_for_port_credits:
|
||||||
io++;
|
io++;
|
||||||
}
|
}
|
||||||
|
|
||||||
onbar = (probey == 2 || probey == 3);
|
onbar = (probey == 1 || probey == 2 || probey == 3);
|
||||||
x = probesm(c,yy+5,0,io);
|
x = probesm(c,yy+5,0,io);
|
||||||
|
|
||||||
if (x == -1)
|
if (x == -1)
|
||||||
|
@ -2693,17 +2692,18 @@ cheat_for_port_credits:
|
||||||
switch (io)
|
switch (io)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
if (x==io) ud.crosshair = (ud.crosshair==3)?0:ud.crosshair+1;
|
if (x==io) ud.crosshair = !ud.crosshair;
|
||||||
modval(0,3,(int *)&ud.crosshair,1,probey==io);
|
modval(0,1,(int *)&ud.crosshair,1,probey==io);
|
||||||
{
|
{
|
||||||
char *s[] = { "OFF", "ON [100%]", "ON [50%]", "ON [25%]" };
|
gametextpal(d,yy,ud.crosshair?"Yes":"No", MENUHIGHLIGHT(io), 0);
|
||||||
gametextpal(d,yy,s[ud.crosshair], MENUHIGHLIGHT(io), 0);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 1:
|
case 1:
|
||||||
if (x==io) ud.levelstats = 1-ud.levelstats;
|
{
|
||||||
modval(0,1,(int *)&ud.levelstats,1,probey==io);
|
int sbs = ud.crosshairscale;
|
||||||
gametextpal(d,yy, ud.levelstats ? "Yes" : "No", MENUHIGHLIGHT(io), 0);
|
_bar(1,d+8,yy+7, &sbs,15,x==io,MENUHIGHLIGHT(io),0,25,100);
|
||||||
|
ud.crosshairscale = min(100,max(10,sbs));
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
{
|
{
|
||||||
|
@ -2739,33 +2739,38 @@ cheat_for_port_credits:
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
|
if (x==io) ud.levelstats = 1-ud.levelstats;
|
||||||
|
modval(0,1,(int *)&ud.levelstats,1,probey==io);
|
||||||
|
gametextpal(d,yy, ud.levelstats ? "Yes" : "No", MENUHIGHLIGHT(io), 0);
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
if (x==io) ud.runkey_mode = 1-ud.runkey_mode;
|
if (x==io) ud.runkey_mode = 1-ud.runkey_mode;
|
||||||
modval(0,1,(int *)&ud.runkey_mode,1,probey==io);
|
modval(0,1,(int *)&ud.runkey_mode,1,probey==io);
|
||||||
gametextpal(d,yy, ud.runkey_mode ? "No" : "Yes", MENUHIGHLIGHT(io), 0);
|
gametextpal(d,yy, ud.runkey_mode ? "No" : "Yes", MENUHIGHLIGHT(io), 0);
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 6:
|
||||||
if (x==io) ud.shadows = 1-ud.shadows;
|
if (x==io) ud.shadows = 1-ud.shadows;
|
||||||
modval(0,1,(int *)&ud.shadows,1,probey==io);
|
modval(0,1,(int *)&ud.shadows,1,probey==io);
|
||||||
gametextpal(d,yy, ud.shadows ? "On" : "Off", MENUHIGHLIGHT(io), 0);
|
gametextpal(d,yy, ud.shadows ? "On" : "Off", MENUHIGHLIGHT(io), 0);
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 7:
|
||||||
if (x==io) ud.screen_tilting = 1-ud.screen_tilting;
|
if (x==io) ud.screen_tilting = 1-ud.screen_tilting;
|
||||||
if (!ud.screen_tilting)setrollangle(0);
|
if (!ud.screen_tilting)setrollangle(0);
|
||||||
modval(0,1,(int *)&ud.screen_tilting,1,probey==io);
|
modval(0,1,(int *)&ud.screen_tilting,1,probey==io);
|
||||||
gametextpal(d,yy, ud.screen_tilting ? "On" : "Off", MENUHIGHLIGHT(io), 0);
|
gametextpal(d,yy, ud.screen_tilting ? "On" : "Off", MENUHIGHLIGHT(io), 0);
|
||||||
break; // original had a 'full' option
|
break; // original had a 'full' option
|
||||||
case 7:
|
case 8:
|
||||||
if (x==io) ud.showweapons = 1-ud.showweapons;
|
if (x==io) ud.showweapons = 1-ud.showweapons;
|
||||||
modval(0,1,(int *)&ud.showweapons,1,probey==io);
|
modval(0,1,(int *)&ud.showweapons,1,probey==io);
|
||||||
ud.config.ShowOpponentWeapons = ud.showweapons;
|
ud.config.ShowOpponentWeapons = ud.showweapons;
|
||||||
gametextpal(d,yy, ud.config.ShowOpponentWeapons ? "Yes" : "No", MENUHIGHLIGHT(io), 0);
|
gametextpal(d,yy, ud.config.ShowOpponentWeapons ? "Yes" : "No", MENUHIGHLIGHT(io), 0);
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 9:
|
||||||
if (x==io) ud.democams = 1-ud.democams;
|
if (x==io) ud.democams = 1-ud.democams;
|
||||||
modval(0,1,(int *)&ud.democams,1,probey==io);
|
modval(0,1,(int *)&ud.democams,1,probey==io);
|
||||||
gametextpal(d,yy, ud.democams ? "On" : "Off", MENUHIGHLIGHT(io), 0);
|
gametextpal(d,yy, ud.democams ? "On" : "Off", MENUHIGHLIGHT(io), 0);
|
||||||
break;
|
break;
|
||||||
case 9:
|
case 10:
|
||||||
if (x==io)
|
if (x==io)
|
||||||
{
|
{
|
||||||
enabled = !((g_player[myconnectindex].ps->gm&MODE_GAME) && ud.m_recstat != 1);
|
enabled = !((g_player[myconnectindex].ps->gm&MODE_GAME) && ud.m_recstat != 1);
|
||||||
|
@ -2776,7 +2781,7 @@ cheat_for_port_credits:
|
||||||
enabled = 0;
|
enabled = 0;
|
||||||
gametextpal(d,yy,ud.m_recstat?((ud.m_recstat && enabled && g_player[myconnectindex].ps->gm&MODE_GAME)?"Running":"On"):"Off",enabled?MENUHIGHLIGHT(io):DISABLEDMENUSHADE,enabled?0:1);
|
gametextpal(d,yy,ud.m_recstat?((ud.m_recstat && enabled && g_player[myconnectindex].ps->gm&MODE_GAME)?"Running":"On"):"Off",enabled?MENUHIGHLIGHT(io):DISABLEDMENUSHADE,enabled?0:1);
|
||||||
break;
|
break;
|
||||||
case 10:
|
case 11:
|
||||||
if (x==io) cmenu(201);
|
if (x==io) cmenu(201);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -2846,7 +2851,7 @@ cheat_for_port_credits:
|
||||||
if (x == -1)
|
if (x == -1)
|
||||||
{
|
{
|
||||||
cmenu(200);
|
cmenu(200);
|
||||||
probey = 10;
|
probey = 11;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3839,6 +3844,7 @@ cheat_for_port_credits:
|
||||||
case 5:
|
case 5:
|
||||||
case 6:
|
case 6:
|
||||||
gametext(160,144+9+9,"DIGITAL AXES ARE NOT FOR MOUSE LOOK",0,2+8+16);
|
gametext(160,144+9+9,"DIGITAL AXES ARE NOT FOR MOUSE LOOK",0,2+8+16);
|
||||||
|
gametext(160,144+9+9+9,"OR FOR AIMING UP AND DOWN",0,2+8+16);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4387,7 +4393,7 @@ cheat_for_port_credits:
|
||||||
menutext(c,50+16+16+16+16,MENUHIGHLIGHT(4),(ud.config.FXDevice<0)||ud.config.SoundToggle==0,"DUKE TALK");
|
menutext(c,50+16+16+16+16,MENUHIGHLIGHT(4),(ud.config.FXDevice<0)||ud.config.SoundToggle==0,"DUKE TALK");
|
||||||
menutext(c,50+16+16+16+16+16,MENUHIGHLIGHT(5),(ud.config.FXDevice<0)||ud.config.SoundToggle==0,"AMBIENCE");
|
menutext(c,50+16+16+16+16+16,MENUHIGHLIGHT(5),(ud.config.FXDevice<0)||ud.config.SoundToggle==0,"AMBIENCE");
|
||||||
|
|
||||||
menutext(c,50+16+16+16+16+16+16,MENUHIGHLIGHT(6),(ud.config.FXDevice<0)||ud.config.SoundToggle==0,"FLIP STEREO");
|
menutext(c,50+16+16+16+16+16+16,MENUHIGHLIGHT(6),(ud.config.FXDevice<0)||ud.config.SoundToggle==0,"REVERSE STEREO");
|
||||||
|
|
||||||
{
|
{
|
||||||
char *s[] = { "OFF", "LOCAL", "ALL" };
|
char *s[] = { "OFF", "LOCAL", "ALL" };
|
||||||
|
|
|
@ -631,7 +631,7 @@ static int osdcmd_cmenu(const osdfuncparm_t *parm)
|
||||||
|
|
||||||
cvarmappings cvar[] =
|
cvarmappings cvar[] =
|
||||||
{
|
{
|
||||||
{ "crosshair", "crosshair: enable/disable crosshair", (void*)&ud.crosshair, CVAR_INT, 0, 0, 3 },
|
{ "crosshair", "crosshair: enable/disable crosshair", (void*)&ud.crosshair, CVAR_BOOL, 0, 0, 1 },
|
||||||
|
|
||||||
{ "cl_autoaim", "cl_autoaim: enable/disable weapon autoaim", (void*)&ud.config.AutoAim, CVAR_INT|CVAR_MULTI, 0, 0, 2 },
|
{ "cl_autoaim", "cl_autoaim: enable/disable weapon autoaim", (void*)&ud.config.AutoAim, CVAR_INT|CVAR_MULTI, 0, 0, 2 },
|
||||||
{ "cl_automsg", "cl_automsg: enable/disable automatically sending messages to all players", (void*)&ud.automsg, CVAR_BOOL, 0, 0, 1 },
|
{ "cl_automsg", "cl_automsg: enable/disable automatically sending messages to all players", (void*)&ud.automsg, CVAR_BOOL, 0, 0, 1 },
|
||||||
|
@ -1273,6 +1273,20 @@ static int osdcmd_vid_contrast(const osdfuncparm_t *parm)
|
||||||
return OSDCMD_OK;
|
return OSDCMD_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int osdcmd_setcrosshairscale(const osdfuncparm_t *parm)
|
||||||
|
{
|
||||||
|
if (parm->numparms == 0)
|
||||||
|
{
|
||||||
|
OSD_Printf("\"cl_crosshairscale\" is \"%d\"\n", ud.crosshairscale);
|
||||||
|
return OSDCMD_SHOWHELP;
|
||||||
|
}
|
||||||
|
else if (parm->numparms != 1) return OSDCMD_SHOWHELP;
|
||||||
|
|
||||||
|
ud.crosshairscale = min(100,max(10,Batol(parm->parms[0])));
|
||||||
|
OSD_Printf("cl_statusbarscale %d\n", ud.crosshairscale);
|
||||||
|
return OSDCMD_OK;
|
||||||
|
}
|
||||||
|
|
||||||
int registerosdcommands(void)
|
int registerosdcommands(void)
|
||||||
{
|
{
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
@ -1297,6 +1311,7 @@ int registerosdcommands(void)
|
||||||
OSD_RegisterFunction("bind","bind <key> <string>: associates a keypress with a string of console input. Type \"bind showkeys\" for a list of keys and \"listsymbols\" for a list of valid console commands.", osdcmd_bind);
|
OSD_RegisterFunction("bind","bind <key> <string>: associates a keypress with a string of console input. Type \"bind showkeys\" for a list of keys and \"listsymbols\" for a list of valid console commands.", osdcmd_bind);
|
||||||
|
|
||||||
OSD_RegisterFunction("cl_statusbarscale","cl_statusbarscale: changes the status bar scale", osdcmd_setstatusbarscale);
|
OSD_RegisterFunction("cl_statusbarscale","cl_statusbarscale: changes the status bar scale", osdcmd_setstatusbarscale);
|
||||||
|
OSD_RegisterFunction("cl_crosshairscale","cl_crosshairscale: changes the crosshair scale", osdcmd_setcrosshairscale);
|
||||||
OSD_RegisterFunction("cmenu","cmenu <#>: jumps to menu", osdcmd_cmenu);
|
OSD_RegisterFunction("cmenu","cmenu <#>: jumps to menu", osdcmd_cmenu);
|
||||||
|
|
||||||
OSD_RegisterFunction("echo","echo [text]: echoes text to the console", osdcmd_echo);
|
OSD_RegisterFunction("echo","echo [text]: echoes text to the console", osdcmd_echo);
|
||||||
|
|
Loading…
Reference in a new issue