Added toggle for demo cameras

git-svn-id: https://svn.eduke32.com/eduke32@38 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2006-04-17 01:01:32 +00:00
parent d70f164b8b
commit 658a33daf3
7 changed files with 24 additions and 8 deletions

View file

@ -7092,7 +7092,7 @@ void moveeffectors(void) //STATNUM 3
case 27:
if(ud.recstat == 0) break;
if(ud.recstat == 0 || !ud.democams) break;
hittype[i].tempang = s->ang;

View file

@ -230,6 +230,8 @@ void CONFIG_SetDefaults( void )
ud.levelstats = 0;
ud.drawweapon = 1;
ud.brightskins = 0;
ud.democams = 1;
ShowOpponentWeapons = 0;
Bstrcpy(ud.rtsname, "DUKE.RTS");
Bstrcpy(myname, "Duke");
@ -585,6 +587,7 @@ void CONFIG_ReadSetup( void )
SCRIPT_GetNumber( scripthandle, "Misc", "ShowOpponentWeapons",&ShowOpponentWeapons);
SCRIPT_GetNumber( scripthandle, "Misc", "ShowViewWeapon",&ud.drawweapon);
SCRIPT_GetNumber( scripthandle, "Misc", "BrightSkins",&ud.brightskins);
SCRIPT_GetNumber( scripthandle, "Misc", "DemoCams",&ud.democams);
SCRIPT_GetNumber( scripthandle, "Misc", "ShowFPS",&ud.tickrate);
dummy = useprecache; SCRIPT_GetNumber( scripthandle, "Misc", "UsePrecache",&dummy); useprecache = dummy != 0;
if(ud.wchoice[0][0] == 0 && ud.wchoice[0][1] == 0)
@ -714,6 +717,7 @@ void CONFIG_WriteSetup( void )
SCRIPT_PutNumber( scripthandle, "Misc", "UsePrecache",useprecache,false,false);
SCRIPT_PutNumber( scripthandle, "Misc", "ShowViewWeapon",ud.drawweapon,false,false);
SCRIPT_PutNumber( scripthandle, "Misc", "BrightSkins",ud.brightskins,false,false);
SCRIPT_PutNumber( scripthandle, "Misc", "DemoCams",ud.democams,false,false);
SCRIPT_PutNumber( scripthandle, "Misc", "ShowFPS",ud.tickrate,false,false);
SCRIPT_PutNumber( scripthandle, "Controls", "MouseAimingFlipped",ud.mouseflip,false,false);
SCRIPT_PutNumber( scripthandle, "Controls","MouseAiming",ud.mouseaiming,false,false);

View file

@ -336,7 +336,7 @@ struct user_defs {
long reccnt;
int32 runkey_mode,statusbarscale,mouseaiming,weaponswitch,drawweapon; // JBF 20031125
int32 brightskins;
int32 brightskins,democams;
int32 entered_name,screen_tilting,shadows,fta_on,executions,auto_run;
int32 coords,tickrate,levelstats,m_coop,coop,screen_size,lockout,crosshair;

View file

@ -798,6 +798,7 @@ LABELS userdefslabels[]= {
{ "mouseaiming", USERDEFS_MOUSEAIMING, 0, 0 },
{ "weaponswitch", USERDEFS_WEAPONSWITCH, 0, 0 },
{ "brightskins", USERDEFS_BRIGHTSKINS, 0, 0 },
{ "democams", USERDEFS_DEMOCAMS, 0, 0 },
{ "", -1, 0, 0 } // END OF LIST
};

View file

@ -283,7 +283,8 @@ enum userdefslabels {
USERDEFS_DRAWWEAPON,
USERDEFS_MOUSEAIMING,
USERDEFS_WEAPONSWITCH,
USERDEFS_BRIGHTSKINS
USERDEFS_BRIGHTSKINS,
USERDEFS_DEMOCAMS
};
enum sectorlabels {

View file

@ -595,6 +595,13 @@ void DoUserDef(char bSet, long lVar1, long lLabelID, long lVar2, short sActor, s
SetGameVarID((int)lVar2, ud.brightskins, sActor, sPlayer);
break;
case USERDEFS_DEMOCAMS:
if(bSet)
ud.democams = lValue;
else
SetGameVarID((int)lVar2, ud.democams, sActor, sPlayer);
break;
default:
break;
}

View file

@ -944,7 +944,7 @@ void menus(void)
menutext(160,24,0,0,"ADULT MODE");
x = probe(60,50+16,16,2);
if(x == -1) { cmenu(201); probey = 3; break; }
if(x == -1) { cmenu(201); probey = 4; break; }
menutext(c,50+16,SHX(-2),PHX(-2),"ADULT MODE");
menutext(c,50+16+16,SHX(-3),PHX(-3),"ENTER PASSWORD");
@ -2148,6 +2148,7 @@ cheat_for_port_credits:
"FPS counter",
"-",
"Bright players",
"Demo cameras",
"-",
"Parental lock",
"-",
@ -2167,7 +2168,6 @@ cheat_for_port_credits:
"-",
"-",
"-",
"-",
"Previous page",
NULL
};
@ -2204,8 +2204,11 @@ cheat_for_port_credits:
case 2: if (x==io) ud.brightskins = 1-ud.brightskins;
modval(0,1,(int *)&ud.brightskins,1,probey==1);
gametextpal(d,yy, ud.brightskins ? "On" : "Off", 0, 0); break;
case 3: if (x==io) cmenu(10000); break;
case 4: if (x==io) cmenu(200); break;
case 3: if (x==io) ud.democams = 1-ud.democams;
modval(0,1,(int *)&ud.democams,1,probey==1);
gametextpal(d,yy, ud.democams ? "On" : "Off", 0, 0); break;
case 4: if (x==io) cmenu(10000); break;
case 5: if (x==io) cmenu(200); break;
default: break;
}
gametextpal(c,yy, opts[ii], enabled?5:15, 2);
@ -2537,7 +2540,7 @@ cheat_for_port_credits:
case 204:
rotatesprite(320<<15,19<<16,65536L,0,MENUBAR,16,0,10,0,0,xdim-1,ydim-1);
menutext(320>>1,24,0,0,"KEYS SETUP");
menutext(320>>1,24,0,0,"KEYBOARD SETUP");
c = (320>>1)-120;