mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 02:30:46 +00:00
More formatting changes
git-svn-id: https://svn.eduke32.com/eduke32@333 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
8127c07f45
commit
38e3d16aeb
19 changed files with 2670 additions and 2670 deletions
File diff suppressed because it is too large
Load diff
|
@ -207,7 +207,7 @@ void playanm(char *fn,char t)
|
|||
if (t != 7 && t != 9 && t != 10 && t != 11)
|
||||
KB_FlushKeyboardQueue();
|
||||
|
||||
if ( KB_KeyWaiting() )
|
||||
if (KB_KeyWaiting())
|
||||
{
|
||||
FX_StopAllSounds();
|
||||
goto ENDOFANIMLOOP;
|
||||
|
@ -227,7 +227,7 @@ void playanm(char *fn,char t)
|
|||
kread(handle,animbuf,length);
|
||||
kclose(handle);
|
||||
|
||||
ANIM_LoadAnim (animbuf);
|
||||
ANIM_LoadAnim(animbuf);
|
||||
numframes = ANIM_NumFrames();
|
||||
|
||||
palptr = ANIM_GetPalette();
|
||||
|
@ -257,7 +257,7 @@ void playanm(char *fn,char t)
|
|||
while (totalclock < ototalclock)
|
||||
{
|
||||
extern char restorepalette;
|
||||
if ( KB_KeyWaiting() )
|
||||
if (KB_KeyWaiting())
|
||||
goto ENDOFANIMLOOP;
|
||||
handleevents(); getpackets();
|
||||
if (restorepalette == 1)
|
||||
|
@ -291,6 +291,6 @@ void playanm(char *fn,char t)
|
|||
|
||||
ENDOFANIMLOOP:
|
||||
|
||||
ANIM_FreeAnim ();
|
||||
ANIM_FreeAnim();
|
||||
walock[TILE_ANIM] = 1;
|
||||
}
|
||||
|
|
|
@ -471,7 +471,7 @@ const char *ExtGetSpriteCaption(short spritenum)
|
|||
}
|
||||
}
|
||||
|
||||
if ( onnames==6 && sprite[spritenum].picnum != sprite[cursprite].picnum)
|
||||
if (onnames==6 && sprite[spritenum].picnum != sprite[cursprite].picnum)
|
||||
{
|
||||
tempbuf[0] = 0;
|
||||
return(tempbuf);
|
||||
|
@ -1156,7 +1156,7 @@ static void ExtSE40Draw(int spnum,long x,long y,long z,short a,short h)
|
|||
|
||||
for (j=0;j<MAXSPRITES;j++)
|
||||
{
|
||||
if ( sprite[j].picnum==1 && sprite[j].lotag==fofmode && sprite[j].hitag==sprite[floor1].hitag )
|
||||
if (sprite[j].picnum==1 && sprite[j].lotag==fofmode && sprite[j].hitag==sprite[floor1].hitag)
|
||||
{
|
||||
floor1=j;
|
||||
fofmode=sprite[j].lotag;
|
||||
|
@ -1170,7 +1170,7 @@ static void ExtSE40Draw(int spnum,long x,long y,long z,short a,short h)
|
|||
|
||||
for (j=0;j<MAXSPRITES;j++)
|
||||
{
|
||||
if ( sprite[j].picnum==1 && sprite[j].lotag==k && sprite[j].hitag==sprite[floor1].hitag )
|
||||
if (sprite[j].picnum==1 && sprite[j].lotag==k && sprite[j].hitag==sprite[floor1].hitag)
|
||||
{
|
||||
floor2=j; ok++; break;
|
||||
}
|
||||
|
@ -1199,7 +1199,7 @@ static void ExtSE40Draw(int spnum,long x,long y,long z,short a,short h)
|
|||
|
||||
for (j=0;j<MAXSPRITES;j++) // raise ceiling or floor
|
||||
{
|
||||
if (sprite[j].picnum==1 && sprite[j].lotag==k+2 && sprite[j].hitag==sprite[floor1].hitag )
|
||||
if (sprite[j].picnum==1 && sprite[j].lotag==k+2 && sprite[j].hitag==sprite[floor1].hitag)
|
||||
{
|
||||
if (k==40)
|
||||
{
|
||||
|
@ -1579,9 +1579,9 @@ void Keys3d(void)
|
|||
}
|
||||
}
|
||||
|
||||
if (tabgraphic == 1 )
|
||||
if (tabgraphic == 1)
|
||||
rotatesprite((44+(tilesizx[temppicnum]>>2))<<16,(114)<<16,32768,0,temppicnum,tempshade,temppal,2,0L,0L,xdim-1L,ydim-1L);
|
||||
else if (tabgraphic == 2 )
|
||||
else if (tabgraphic == 2)
|
||||
rotatesprite((44+(tilesizx[temppicnum]>>2))<<16,(114)<<16,16384,0,temppicnum,tempshade,temppal,2,0L,0L,xdim-1L,ydim-1L);
|
||||
|
||||
begindrawing();
|
||||
|
@ -3681,8 +3681,8 @@ void Keys2d(void)
|
|||
(search_hitag!=0 && search_hitag==wall[i].hitag))
|
||||
)
|
||||
{
|
||||
posx=(wall[i].x)-(( (wall[i].x)-(wall[wall[i].point2].x) )/2);
|
||||
posy=(wall[i].y)-(( (wall[i].y)-(wall[wall[i].point2].y) )/2);
|
||||
posx=(wall[i].x)-(((wall[i].x)-(wall[wall[i].point2].x))/2);
|
||||
posy=(wall[i].y)-(((wall[i].y)-(wall[wall[i].point2].y))/2);
|
||||
printmessage16("< Wall search: found");
|
||||
// curwallnum--;
|
||||
keystatus[0x1a]=0;
|
||||
|
@ -3702,7 +3702,7 @@ void Keys2d(void)
|
|||
|
||||
if (
|
||||
(sprite[i].picnum==sprite[cursearchsprite].picnum &&
|
||||
sprite[i].statnum==0 )
|
||||
sprite[i].statnum==0)
|
||||
&&((search_lotag==0)||
|
||||
(search_lotag!=0 && search_lotag==sprite[i].lotag))
|
||||
&&((search_hitag==0)||
|
||||
|
@ -3746,8 +3746,8 @@ void Keys2d(void)
|
|||
(search_hitag!=0 && search_hitag==wall[i].hitag))
|
||||
)
|
||||
{
|
||||
posx=(wall[i].x)-(( (wall[i].x)-(wall[wall[i].point2].x) )/2);
|
||||
posy=(wall[i].y)-(( (wall[i].y)-(wall[wall[i].point2].y) )/2);
|
||||
posx=(wall[i].x)-(((wall[i].x)-(wall[wall[i].point2].x))/2);
|
||||
posy=(wall[i].y)-(((wall[i].y)-(wall[wall[i].point2].y))/2);
|
||||
printmessage16("> Wall search: found");
|
||||
// curwallnum++;
|
||||
keystatus[0x1b]=0;
|
||||
|
@ -3766,7 +3766,7 @@ void Keys2d(void)
|
|||
{
|
||||
if (
|
||||
(sprite[i].picnum==sprite[cursearchsprite].picnum &&
|
||||
sprite[i].statnum==0 )
|
||||
sprite[i].statnum==0)
|
||||
&&((search_lotag==0)||
|
||||
(search_lotag!=0 && search_lotag==sprite[i].lotag))
|
||||
&&((search_hitag==0)||
|
||||
|
@ -4181,7 +4181,7 @@ int loadgroupfiles(char *fn)
|
|||
{
|
||||
int j = initgroupfile(fn);
|
||||
|
||||
if ( j == -1 )
|
||||
if (j == -1)
|
||||
initprintf("Could not find GRP file %s.\n",fn);
|
||||
else
|
||||
initprintf("Using GRP file %s.\n",fn);
|
||||
|
@ -4275,7 +4275,7 @@ int ExtInit(void)
|
|||
"textures and skins, but textures will load dramatically "
|
||||
"faster after the first time they are loaded.");
|
||||
if (i) i = 'y';
|
||||
if (i == 'y' || i == 'Y' )
|
||||
if (i == 'y' || i == 'Y')
|
||||
glusetexcompr = glusetexcache = glusetexcachecompression = 1;
|
||||
else glusetexcache = glusetexcachecompression = 0;
|
||||
}
|
||||
|
|
|
@ -109,7 +109,7 @@ static int32 setupread=0;
|
|||
===================
|
||||
*/
|
||||
|
||||
int32 CONFIG_FunctionNameToNum( char * func )
|
||||
int32 CONFIG_FunctionNameToNum(char * func)
|
||||
{
|
||||
int32 i;
|
||||
|
||||
|
@ -138,7 +138,7 @@ int32 CONFIG_FunctionNameToNum( char * func )
|
|||
===================
|
||||
*/
|
||||
|
||||
char * CONFIG_FunctionNumToName( int32 func )
|
||||
char * CONFIG_FunctionNumToName(int32 func)
|
||||
{
|
||||
if ((unsigned)func >= (unsigned)NUMGAMEFUNCTIONS)
|
||||
{
|
||||
|
@ -159,7 +159,7 @@ char * CONFIG_FunctionNumToName( int32 func )
|
|||
*/
|
||||
|
||||
|
||||
int32 CONFIG_AnalogNameToNum( char * func )
|
||||
int32 CONFIG_AnalogNameToNum(char * func)
|
||||
{
|
||||
|
||||
if (!Bstrcasecmp(func,"analog_turning"))
|
||||
|
@ -183,7 +183,7 @@ int32 CONFIG_AnalogNameToNum( char * func )
|
|||
}
|
||||
|
||||
|
||||
char * CONFIG_AnalogNumToName( int32 func )
|
||||
char * CONFIG_AnalogNumToName(int32 func)
|
||||
{
|
||||
switch (func) {
|
||||
case analog_turning:
|
||||
|
@ -208,7 +208,7 @@ char * CONFIG_AnalogNumToName( int32 func )
|
|||
===================
|
||||
*/
|
||||
|
||||
void CONFIG_SetDefaults( void )
|
||||
void CONFIG_SetDefaults(void)
|
||||
{
|
||||
// JBF 20031211
|
||||
int32 i,f;
|
||||
|
@ -278,45 +278,45 @@ void CONFIG_SetDefaults( void )
|
|||
// JBF 20031211
|
||||
memset(KeyboardKeys, 0xff, sizeof(KeyboardKeys));
|
||||
for (i=0; i < (int32)(sizeof(keydefaults)/sizeof(keydefaults[0])); i+=3) {
|
||||
f = CONFIG_FunctionNameToNum( keydefaults[i+0] );
|
||||
f = CONFIG_FunctionNameToNum(keydefaults[i+0]);
|
||||
if (f == -1) continue;
|
||||
KeyboardKeys[f][0] = KB_StringToScanCode( keydefaults[i+1] );
|
||||
KeyboardKeys[f][1] = KB_StringToScanCode( keydefaults[i+2] );
|
||||
KeyboardKeys[f][0] = KB_StringToScanCode(keydefaults[i+1]);
|
||||
KeyboardKeys[f][1] = KB_StringToScanCode(keydefaults[i+2]);
|
||||
|
||||
if (f == gamefunc_Show_Console) OSD_CaptureKey(KeyboardKeys[f][0]);
|
||||
else CONTROL_MapKey( f, KeyboardKeys[f][0], KeyboardKeys[f][1] );
|
||||
else CONTROL_MapKey(f, KeyboardKeys[f][0], KeyboardKeys[f][1]);
|
||||
}
|
||||
|
||||
memset(MouseFunctions, -1, sizeof(MouseFunctions));
|
||||
for (i=0; i<MAXMOUSEBUTTONS; i++) {
|
||||
MouseFunctions[i][0] = CONFIG_FunctionNameToNum( mousedefaults[i] );
|
||||
CONTROL_MapButton( MouseFunctions[i][0], i, 0, controldevice_mouse );
|
||||
MouseFunctions[i][0] = CONFIG_FunctionNameToNum(mousedefaults[i]);
|
||||
CONTROL_MapButton(MouseFunctions[i][0], i, 0, controldevice_mouse);
|
||||
if (i>=4) continue;
|
||||
MouseFunctions[i][1] = CONFIG_FunctionNameToNum( mouseclickeddefaults[i] );
|
||||
CONTROL_MapButton( MouseFunctions[i][1], i, 1, controldevice_mouse );
|
||||
MouseFunctions[i][1] = CONFIG_FunctionNameToNum(mouseclickeddefaults[i]);
|
||||
CONTROL_MapButton(MouseFunctions[i][1], i, 1, controldevice_mouse);
|
||||
}
|
||||
|
||||
memset(MouseDigitalFunctions, -1, sizeof(MouseDigitalFunctions));
|
||||
for (i=0; i<MAXMOUSEAXES; i++) {
|
||||
MouseAnalogueScale[i] = 65536;
|
||||
CONTROL_SetAnalogAxisScale( i, MouseAnalogueScale[i], controldevice_mouse );
|
||||
CONTROL_SetAnalogAxisScale(i, MouseAnalogueScale[i], controldevice_mouse);
|
||||
|
||||
MouseDigitalFunctions[i][0] = CONFIG_FunctionNameToNum( mousedigitaldefaults[i*2] );
|
||||
MouseDigitalFunctions[i][1] = CONFIG_FunctionNameToNum( mousedigitaldefaults[i*2+1] );
|
||||
CONTROL_MapDigitalAxis( i, MouseDigitalFunctions[i][0], 0, controldevice_mouse );
|
||||
CONTROL_MapDigitalAxis( i, MouseDigitalFunctions[i][1], 1, controldevice_mouse );
|
||||
MouseDigitalFunctions[i][0] = CONFIG_FunctionNameToNum(mousedigitaldefaults[i*2]);
|
||||
MouseDigitalFunctions[i][1] = CONFIG_FunctionNameToNum(mousedigitaldefaults[i*2+1]);
|
||||
CONTROL_MapDigitalAxis(i, MouseDigitalFunctions[i][0], 0, controldevice_mouse);
|
||||
CONTROL_MapDigitalAxis(i, MouseDigitalFunctions[i][1], 1, controldevice_mouse);
|
||||
|
||||
MouseAnalogueAxes[i] = CONFIG_AnalogNameToNum( mouseanalogdefaults[i] );
|
||||
CONTROL_MapAnalogAxis( i, MouseAnalogueAxes[i], controldevice_mouse);
|
||||
MouseAnalogueAxes[i] = CONFIG_AnalogNameToNum(mouseanalogdefaults[i]);
|
||||
CONTROL_MapAnalogAxis(i, MouseAnalogueAxes[i], controldevice_mouse);
|
||||
}
|
||||
CONTROL_SetMouseSensitivity(DEFAULTMOUSESENSITIVITY);
|
||||
|
||||
memset(JoystickFunctions, -1, sizeof(JoystickFunctions));
|
||||
for (i=0; i<MAXJOYBUTTONS; i++) {
|
||||
JoystickFunctions[i][0] = CONFIG_FunctionNameToNum( joystickdefaults[i] );
|
||||
JoystickFunctions[i][1] = CONFIG_FunctionNameToNum( joystickclickeddefaults[i] );
|
||||
CONTROL_MapButton( JoystickFunctions[i][0], i, 0, controldevice_joystick );
|
||||
CONTROL_MapButton( JoystickFunctions[i][1], i, 1, controldevice_joystick );
|
||||
JoystickFunctions[i][0] = CONFIG_FunctionNameToNum(joystickdefaults[i]);
|
||||
JoystickFunctions[i][1] = CONFIG_FunctionNameToNum(joystickclickeddefaults[i]);
|
||||
CONTROL_MapButton(JoystickFunctions[i][0], i, 0, controldevice_joystick);
|
||||
CONTROL_MapButton(JoystickFunctions[i][1], i, 1, controldevice_joystick);
|
||||
}
|
||||
|
||||
memset(JoystickDigitalFunctions, -1, sizeof(JoystickDigitalFunctions));
|
||||
|
@ -324,14 +324,14 @@ void CONFIG_SetDefaults( void )
|
|||
JoystickAnalogueScale[i] = 65536;
|
||||
JoystickAnalogueDead[i] = 1000;
|
||||
JoystickAnalogueSaturate[i] = 9500;
|
||||
CONTROL_SetAnalogAxisScale( i, JoystickAnalogueScale[i], controldevice_joystick );
|
||||
CONTROL_SetAnalogAxisScale(i, JoystickAnalogueScale[i], controldevice_joystick);
|
||||
|
||||
JoystickDigitalFunctions[i][0] = CONFIG_FunctionNameToNum( joystickdigitaldefaults[i*2] );
|
||||
JoystickDigitalFunctions[i][1] = CONFIG_FunctionNameToNum( joystickdigitaldefaults[i*2+1] );
|
||||
CONTROL_MapDigitalAxis( i, JoystickDigitalFunctions[i][0], 0, controldevice_joystick );
|
||||
CONTROL_MapDigitalAxis( i, JoystickDigitalFunctions[i][1], 1, controldevice_joystick );
|
||||
JoystickDigitalFunctions[i][0] = CONFIG_FunctionNameToNum(joystickdigitaldefaults[i*2]);
|
||||
JoystickDigitalFunctions[i][1] = CONFIG_FunctionNameToNum(joystickdigitaldefaults[i*2+1]);
|
||||
CONTROL_MapDigitalAxis(i, JoystickDigitalFunctions[i][0], 0, controldevice_joystick);
|
||||
CONTROL_MapDigitalAxis(i, JoystickDigitalFunctions[i][1], 1, controldevice_joystick);
|
||||
|
||||
JoystickAnalogueAxes[i] = CONFIG_AnalogNameToNum( joystickanalogdefaults[i] );
|
||||
JoystickAnalogueAxes[i] = CONFIG_AnalogNameToNum(joystickanalogdefaults[i]);
|
||||
CONTROL_MapAnalogAxis(i, JoystickAnalogueAxes[i], controldevice_joystick);
|
||||
}
|
||||
}
|
||||
|
@ -343,7 +343,7 @@ void CONFIG_SetDefaults( void )
|
|||
===================
|
||||
*/
|
||||
|
||||
void CONFIG_ReadKeys( void )
|
||||
void CONFIG_ReadKeys(void)
|
||||
{
|
||||
int32 i;
|
||||
int32 numkeyentries;
|
||||
|
@ -354,11 +354,11 @@ void CONFIG_ReadKeys( void )
|
|||
|
||||
if (scripthandle < 0) return;
|
||||
|
||||
numkeyentries = SCRIPT_NumberEntries( scripthandle,"KeyDefinitions" );
|
||||
numkeyentries = SCRIPT_NumberEntries(scripthandle,"KeyDefinitions");
|
||||
|
||||
for (i=0;i<numkeyentries;i++)
|
||||
{
|
||||
function = CONFIG_FunctionNameToNum(SCRIPT_Entry(scripthandle,"KeyDefinitions", i ));
|
||||
function = CONFIG_FunctionNameToNum(SCRIPT_Entry(scripthandle,"KeyDefinitions", i));
|
||||
if (function != -1)
|
||||
{
|
||||
memset(keyname1,0,sizeof(keyname1));
|
||||
|
@ -367,7 +367,7 @@ void CONFIG_ReadKeys( void )
|
|||
(
|
||||
scripthandle,
|
||||
"KeyDefinitions",
|
||||
SCRIPT_Entry( scripthandle, "KeyDefinitions", i ),
|
||||
SCRIPT_Entry(scripthandle, "KeyDefinitions", i),
|
||||
keyname1,
|
||||
keyname2
|
||||
);
|
||||
|
@ -375,11 +375,11 @@ void CONFIG_ReadKeys( void )
|
|||
key2 = 0xff;
|
||||
if (keyname1[0])
|
||||
{
|
||||
key1 = (byte) KB_StringToScanCode( keyname1 );
|
||||
key1 = (byte) KB_StringToScanCode(keyname1);
|
||||
}
|
||||
if (keyname2[0])
|
||||
{
|
||||
key2 = (byte) KB_StringToScanCode( keyname2 );
|
||||
key2 = (byte) KB_StringToScanCode(keyname2);
|
||||
}
|
||||
KeyboardKeys[function][0] = key1;
|
||||
KeyboardKeys[function][1] = key2;
|
||||
|
@ -391,7 +391,7 @@ void CONFIG_ReadKeys( void )
|
|||
if (i == gamefunc_Show_Console)
|
||||
OSD_CaptureKey(KeyboardKeys[i][0]);
|
||||
else
|
||||
CONTROL_MapKey( i, KeyboardKeys[i][0], KeyboardKeys[i][1] );
|
||||
CONTROL_MapKey(i, KeyboardKeys[i][0], KeyboardKeys[i][1]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -404,7 +404,7 @@ void CONFIG_ReadKeys( void )
|
|||
===================
|
||||
*/
|
||||
|
||||
void CONFIG_SetupMouse( void )
|
||||
void CONFIG_SetupMouse(void)
|
||||
{
|
||||
int32 i;
|
||||
char str[80];
|
||||
|
@ -416,12 +416,12 @@ void CONFIG_SetupMouse( void )
|
|||
for (i=0;i<MAXMOUSEBUTTONS;i++)
|
||||
{
|
||||
Bsprintf(str,"MouseButton%ld",i); temp[0] = 0;
|
||||
if (!SCRIPT_GetString( scripthandle,"Controls", str,temp))
|
||||
if (!SCRIPT_GetString(scripthandle,"Controls", str,temp))
|
||||
if (CONFIG_FunctionNameToNum(temp) != -1 || temp[0] == 0)
|
||||
MouseFunctions[i][0] = CONFIG_FunctionNameToNum(temp);
|
||||
|
||||
Bsprintf(str,"MouseButtonClicked%ld",i); temp[0] = 0;
|
||||
if (!SCRIPT_GetString( scripthandle,"Controls", str,temp))
|
||||
if (!SCRIPT_GetString(scripthandle,"Controls", str,temp))
|
||||
if (CONFIG_FunctionNameToNum(temp) != -1 || temp[0] == 0)
|
||||
MouseFunctions[i][1] = CONFIG_FunctionNameToNum(temp);
|
||||
}
|
||||
|
@ -451,20 +451,20 @@ void CONFIG_SetupMouse( void )
|
|||
}
|
||||
|
||||
function = DEFAULTMOUSESENSITIVITY;
|
||||
SCRIPT_GetNumber( scripthandle, "Controls","Mouse_Sensitivity",&function);
|
||||
SCRIPT_GetNumber(scripthandle, "Controls","Mouse_Sensitivity",&function);
|
||||
CONTROL_SetMouseSensitivity(function);
|
||||
|
||||
for (i=0; i<MAXMOUSEBUTTONS; i++)
|
||||
{
|
||||
CONTROL_MapButton( MouseFunctions[i][0], i, 0, controldevice_mouse );
|
||||
CONTROL_MapButton( MouseFunctions[i][1], i, 1, controldevice_mouse );
|
||||
CONTROL_MapButton(MouseFunctions[i][0], i, 0, controldevice_mouse);
|
||||
CONTROL_MapButton(MouseFunctions[i][1], i, 1, controldevice_mouse);
|
||||
}
|
||||
for (i=0; i<MAXMOUSEAXES; i++)
|
||||
{
|
||||
CONTROL_MapAnalogAxis( i, MouseAnalogueAxes[i], controldevice_mouse);
|
||||
CONTROL_MapDigitalAxis( i, MouseDigitalFunctions[i][0], 0,controldevice_mouse );
|
||||
CONTROL_MapDigitalAxis( i, MouseDigitalFunctions[i][1], 1,controldevice_mouse );
|
||||
CONTROL_SetAnalogAxisScale( i, MouseAnalogueScale[i], controldevice_mouse );
|
||||
CONTROL_MapAnalogAxis(i, MouseAnalogueAxes[i], controldevice_mouse);
|
||||
CONTROL_MapDigitalAxis(i, MouseDigitalFunctions[i][0], 0,controldevice_mouse);
|
||||
CONTROL_MapDigitalAxis(i, MouseDigitalFunctions[i][1], 1,controldevice_mouse);
|
||||
CONTROL_SetAnalogAxisScale(i, MouseAnalogueScale[i], controldevice_mouse);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -476,7 +476,7 @@ void CONFIG_SetupMouse( void )
|
|||
===================
|
||||
*/
|
||||
|
||||
void CONFIG_SetupJoystick( void )
|
||||
void CONFIG_SetupJoystick(void)
|
||||
{
|
||||
int32 i;
|
||||
char str[80];
|
||||
|
@ -488,12 +488,12 @@ void CONFIG_SetupJoystick( void )
|
|||
for (i=0;i<MAXJOYBUTTONS;i++)
|
||||
{
|
||||
Bsprintf(str,"JoystickButton%ld",i); temp[0] = 0;
|
||||
if (!SCRIPT_GetString( scripthandle,"Controls", str,temp))
|
||||
if (!SCRIPT_GetString(scripthandle,"Controls", str,temp))
|
||||
if (CONFIG_FunctionNameToNum(temp) != -1 || temp[0] == 0)
|
||||
JoystickFunctions[i][0] = CONFIG_FunctionNameToNum(temp);
|
||||
|
||||
Bsprintf(str,"JoystickButtonClicked%ld",i); temp[0] = 0;
|
||||
if (!SCRIPT_GetString( scripthandle,"Controls", str,temp))
|
||||
if (!SCRIPT_GetString(scripthandle,"Controls", str,temp))
|
||||
if (CONFIG_FunctionNameToNum(temp) != -1 || temp[0] == 0)
|
||||
JoystickFunctions[i][1] = CONFIG_FunctionNameToNum(temp);
|
||||
}
|
||||
|
@ -534,15 +534,15 @@ void CONFIG_SetupJoystick( void )
|
|||
|
||||
for (i=0;i<MAXJOYBUTTONS;i++)
|
||||
{
|
||||
CONTROL_MapButton( JoystickFunctions[i][0], i, 0, controldevice_joystick );
|
||||
CONTROL_MapButton( JoystickFunctions[i][1], i, 1, controldevice_joystick );
|
||||
CONTROL_MapButton(JoystickFunctions[i][0], i, 0, controldevice_joystick);
|
||||
CONTROL_MapButton(JoystickFunctions[i][1], i, 1, controldevice_joystick);
|
||||
}
|
||||
for (i=0;i<MAXJOYAXES;i++)
|
||||
{
|
||||
CONTROL_MapAnalogAxis(i, JoystickAnalogueAxes[i], controldevice_joystick);
|
||||
CONTROL_MapDigitalAxis( i, JoystickDigitalFunctions[i][0], 0, controldevice_joystick );
|
||||
CONTROL_MapDigitalAxis( i, JoystickDigitalFunctions[i][1], 1, controldevice_joystick );
|
||||
CONTROL_SetAnalogAxisScale( i, JoystickAnalogueScale[i], controldevice_joystick );
|
||||
CONTROL_MapDigitalAxis(i, JoystickDigitalFunctions[i][0], 0, controldevice_joystick);
|
||||
CONTROL_MapDigitalAxis(i, JoystickDigitalFunctions[i][1], 1, controldevice_joystick);
|
||||
CONTROL_SetAnalogAxisScale(i, JoystickAnalogueScale[i], controldevice_joystick);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -558,7 +558,7 @@ void readsavenames(void)
|
|||
for (i=0;i<10;i++)
|
||||
{
|
||||
fn[4] = i+'0';
|
||||
if ((fil = Bfopen(fn,"rb")) == NULL ) continue;
|
||||
if ((fil = Bfopen(fn,"rb")) == NULL) continue;
|
||||
if (dfread(&j,sizeof(long),1,fil) != 1) { Bfclose(fil); continue; }
|
||||
if (dfread(g_szBuf,j,1,fil) != 1) { Bfclose(fil); continue; }
|
||||
if (dfread(&dummy,4,1,fil) != 1) { Bfclose(fil); continue; }
|
||||
|
@ -579,7 +579,7 @@ void readsavenames(void)
|
|||
|
||||
extern void check_player_color(int *color,int prev_color);
|
||||
|
||||
int32 CONFIG_ReadSetup( void )
|
||||
int32 CONFIG_ReadSetup(void)
|
||||
{
|
||||
int32 dummy, i;
|
||||
char commmacro[] = "CommbatMacro# ";
|
||||
|
@ -591,7 +591,7 @@ int32 CONFIG_ReadSetup( void )
|
|||
setupread = 1;
|
||||
|
||||
if (SafeFileExists(setupfilename) && scripthandle < 0) // JBF 20031211
|
||||
scripthandle = SCRIPT_Load( setupfilename );
|
||||
scripthandle = SCRIPT_Load(setupfilename);
|
||||
|
||||
if (scripthandle < 0) return -1;
|
||||
|
||||
|
@ -600,10 +600,10 @@ int32 CONFIG_ReadSetup( void )
|
|||
for (dummy = 0;dummy < 10;dummy++)
|
||||
{
|
||||
commmacro[13] = dummy+'0';
|
||||
SCRIPT_GetString( scripthandle, "Comm Setup",commmacro,&ud.ridecule[dummy][0]);
|
||||
SCRIPT_GetString(scripthandle, "Comm Setup",commmacro,&ud.ridecule[dummy][0]);
|
||||
}
|
||||
|
||||
SCRIPT_GetString( scripthandle, "Comm Setup","PlayerName",&tempbuf[0]);
|
||||
SCRIPT_GetString(scripthandle, "Comm Setup","PlayerName",&tempbuf[0]);
|
||||
|
||||
while (Bstrlen(strip_color_codes(tempbuf)) > 10)
|
||||
tempbuf[Bstrlen(tempbuf)-1] = '\0';
|
||||
|
@ -611,69 +611,69 @@ int32 CONFIG_ReadSetup( void )
|
|||
Bstrncpy(myname,tempbuf,sizeof(myname)-1);
|
||||
myname[sizeof(myname)] = '\0';
|
||||
|
||||
SCRIPT_GetString( scripthandle, "Comm Setup","RTSName",&ud.rtsname[0]);
|
||||
SCRIPT_GetString(scripthandle, "Comm Setup","RTSName",&ud.rtsname[0]);
|
||||
|
||||
SCRIPT_GetNumber( scripthandle, "Screen Setup", "Shadows",&ud.shadows);
|
||||
SCRIPT_GetNumber(scripthandle, "Screen Setup", "Shadows",&ud.shadows);
|
||||
|
||||
if (!NAM) {
|
||||
SCRIPT_GetString( scripthandle, "Screen Setup","Password",&ud.pwlockout[0]);
|
||||
SCRIPT_GetNumber( scripthandle, "Screen Setup", "Out",&ud.lockout);
|
||||
SCRIPT_GetString(scripthandle, "Screen Setup","Password",&ud.pwlockout[0]);
|
||||
SCRIPT_GetNumber(scripthandle, "Screen Setup", "Out",&ud.lockout);
|
||||
}
|
||||
|
||||
SCRIPT_GetNumber( scripthandle, "Screen Setup", "Detail",&ud.detail);
|
||||
SCRIPT_GetNumber( scripthandle, "Screen Setup", "Tilt",&ud.screen_tilting);
|
||||
SCRIPT_GetNumber( scripthandle, "Screen Setup", "Messages",&ud.fta_on);
|
||||
SCRIPT_GetNumber( scripthandle, "Screen Setup", "ScreenWidth",&ScreenWidth);
|
||||
SCRIPT_GetNumber( scripthandle, "Screen Setup", "ScreenHeight",&ScreenHeight);
|
||||
SCRIPT_GetNumber( scripthandle, "Screen Setup", "ScreenMode",&ScreenMode);
|
||||
SCRIPT_GetNumber( scripthandle, "Screen Setup", "ScreenGamma",&ud.brightness);
|
||||
SCRIPT_GetNumber( scripthandle, "Screen Setup", "ScreenSize",&ud.screen_size);
|
||||
SCRIPT_GetNumber(scripthandle, "Screen Setup", "Detail",&ud.detail);
|
||||
SCRIPT_GetNumber(scripthandle, "Screen Setup", "Tilt",&ud.screen_tilting);
|
||||
SCRIPT_GetNumber(scripthandle, "Screen Setup", "Messages",&ud.fta_on);
|
||||
SCRIPT_GetNumber(scripthandle, "Screen Setup", "ScreenWidth",&ScreenWidth);
|
||||
SCRIPT_GetNumber(scripthandle, "Screen Setup", "ScreenHeight",&ScreenHeight);
|
||||
SCRIPT_GetNumber(scripthandle, "Screen Setup", "ScreenMode",&ScreenMode);
|
||||
SCRIPT_GetNumber(scripthandle, "Screen Setup", "ScreenGamma",&ud.brightness);
|
||||
SCRIPT_GetNumber(scripthandle, "Screen Setup", "ScreenSize",&ud.screen_size);
|
||||
|
||||
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||
SCRIPT_GetNumber( scripthandle, "Screen Setup", "ScreenBPP", &ScreenBPP);
|
||||
SCRIPT_GetNumber(scripthandle, "Screen Setup", "ScreenBPP", &ScreenBPP);
|
||||
if (ScreenBPP < 8) ScreenBPP = 32;
|
||||
#endif
|
||||
|
||||
#ifdef RENDERTYPEWIN
|
||||
SCRIPT_GetNumber( scripthandle, "Screen Setup", "MaxRefreshFreq", (int32*)&maxrefreshfreq);
|
||||
SCRIPT_GetNumber(scripthandle, "Screen Setup", "MaxRefreshFreq", (int32*)&maxrefreshfreq);
|
||||
#endif
|
||||
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||
SCRIPT_GetNumber( scripthandle, "Screen Setup", "GLTextureMode", &gltexfiltermode);
|
||||
SCRIPT_GetNumber( scripthandle, "Screen Setup", "GLAnisotropy", &glanisotropy);
|
||||
SCRIPT_GetNumber( scripthandle, "Screen Setup", "GLProjectionFix", &glprojectionhacks);
|
||||
SCRIPT_GetNumber( scripthandle, "Screen Setup", "GLUseTextureCompr", &glusetexcompr);
|
||||
SCRIPT_GetNumber( scripthandle, "Screen Setup", "GLWidescreen", &glwidescreen);
|
||||
SCRIPT_GetNumber(scripthandle, "Screen Setup", "GLTextureMode", &gltexfiltermode);
|
||||
SCRIPT_GetNumber(scripthandle, "Screen Setup", "GLAnisotropy", &glanisotropy);
|
||||
SCRIPT_GetNumber(scripthandle, "Screen Setup", "GLProjectionFix", &glprojectionhacks);
|
||||
SCRIPT_GetNumber(scripthandle, "Screen Setup", "GLUseTextureCompr", &glusetexcompr);
|
||||
SCRIPT_GetNumber(scripthandle, "Screen Setup", "GLWidescreen", &glwidescreen);
|
||||
|
||||
SCRIPT_GetNumber( scripthandle, "Screen Setup", "GLUseCompressedTextureCache", &glusetexcache);
|
||||
SCRIPT_GetNumber( scripthandle, "Screen Setup", "GLUseTextureCacheCompression", &glusetexcachecompression);
|
||||
SCRIPT_GetNumber(scripthandle, "Screen Setup", "GLUseCompressedTextureCache", &glusetexcache);
|
||||
SCRIPT_GetNumber(scripthandle, "Screen Setup", "GLUseTextureCacheCompression", &glusetexcachecompression);
|
||||
|
||||
dummy = usemodels; SCRIPT_GetNumber( scripthandle, "Screen Setup", "UseModels",&dummy); usemodels = dummy != 0;
|
||||
dummy = usehightile; SCRIPT_GetNumber( scripthandle, "Screen Setup", "UseHightile",&dummy); usehightile = dummy != 0;
|
||||
dummy = usemodels; SCRIPT_GetNumber(scripthandle, "Screen Setup", "UseModels",&dummy); usemodels = dummy != 0;
|
||||
dummy = usehightile; SCRIPT_GetNumber(scripthandle, "Screen Setup", "UseHightile",&dummy); usehightile = dummy != 0;
|
||||
#endif
|
||||
SCRIPT_GetNumber( scripthandle, "Misc", "Executions",&ud.executions);
|
||||
SCRIPT_GetNumber( scripthandle, "Setup", "ForceSetup",&ForceSetup);
|
||||
SCRIPT_GetNumber( scripthandle, "Misc", "RunMode",&RunMode);
|
||||
SCRIPT_GetNumber( scripthandle, "Misc", "Crosshairs",&ud.crosshair);
|
||||
SCRIPT_GetNumber( scripthandle, "Misc", "StatusBarScale",&ud.statusbarscale);
|
||||
SCRIPT_GetNumber( scripthandle, "Misc", "ShowLevelStats",&ud.levelstats);
|
||||
SCRIPT_GetNumber( scripthandle, "Misc", "ShowOpponentWeapons",&ShowOpponentWeapons);
|
||||
SCRIPT_GetNumber(scripthandle, "Misc", "Executions",&ud.executions);
|
||||
SCRIPT_GetNumber(scripthandle, "Setup", "ForceSetup",&ForceSetup);
|
||||
SCRIPT_GetNumber(scripthandle, "Misc", "RunMode",&RunMode);
|
||||
SCRIPT_GetNumber(scripthandle, "Misc", "Crosshairs",&ud.crosshair);
|
||||
SCRIPT_GetNumber(scripthandle, "Misc", "StatusBarScale",&ud.statusbarscale);
|
||||
SCRIPT_GetNumber(scripthandle, "Misc", "ShowLevelStats",&ud.levelstats);
|
||||
SCRIPT_GetNumber(scripthandle, "Misc", "ShowOpponentWeapons",&ShowOpponentWeapons);
|
||||
ud.showweapons = ShowOpponentWeapons;
|
||||
SCRIPT_GetNumber( scripthandle, "Misc", "ShowViewWeapon",&ud.drawweapon);
|
||||
SCRIPT_GetNumber( scripthandle, "Misc", "DemoCams",&ud.democams);
|
||||
SCRIPT_GetNumber( scripthandle, "Misc", "ShowFPS",&ud.tickrate);
|
||||
SCRIPT_GetNumber( scripthandle, "Misc", "Color",&ud.color);
|
||||
SCRIPT_GetNumber(scripthandle, "Misc", "ShowViewWeapon",&ud.drawweapon);
|
||||
SCRIPT_GetNumber(scripthandle, "Misc", "DemoCams",&ud.democams);
|
||||
SCRIPT_GetNumber(scripthandle, "Misc", "ShowFPS",&ud.tickrate);
|
||||
SCRIPT_GetNumber(scripthandle, "Misc", "Color",&ud.color);
|
||||
check_player_color((int *)&ud.color,-1);
|
||||
ps[0].palookup = ud.pcolor[0] = ud.color;
|
||||
SCRIPT_GetNumber( scripthandle, "Misc", "Team",&ud.team);
|
||||
SCRIPT_GetNumber(scripthandle, "Misc", "Team",&ud.team);
|
||||
if (ud.team > 1) ud.team = 0;
|
||||
ud.pteam[0] = ud.team;
|
||||
SCRIPT_GetNumber( scripthandle, "Misc", "MPMessageDisplayTime",&ud.msgdisptime);
|
||||
SCRIPT_GetNumber( scripthandle, "Misc", "StatusBarMode",&ud.statusbarmode);
|
||||
SCRIPT_GetNumber( scripthandle, "Misc", "AutoVote",&ud.autovote);
|
||||
SCRIPT_GetNumber( scripthandle, "Misc", "AutoMsg",&ud.automsg);
|
||||
SCRIPT_GetNumber( scripthandle, "Misc", "IDPlayers",&ud.automsg);
|
||||
SCRIPT_GetNumber(scripthandle, "Misc", "MPMessageDisplayTime",&ud.msgdisptime);
|
||||
SCRIPT_GetNumber(scripthandle, "Misc", "StatusBarMode",&ud.statusbarmode);
|
||||
SCRIPT_GetNumber(scripthandle, "Misc", "AutoVote",&ud.autovote);
|
||||
SCRIPT_GetNumber(scripthandle, "Misc", "AutoMsg",&ud.automsg);
|
||||
SCRIPT_GetNumber(scripthandle, "Misc", "IDPlayers",&ud.automsg);
|
||||
|
||||
dummy = useprecache; SCRIPT_GetNumber( scripthandle, "Misc", "UsePrecache",&dummy); useprecache = dummy != 0;
|
||||
dummy = useprecache; SCRIPT_GetNumber(scripthandle, "Misc", "UsePrecache",&dummy); useprecache = dummy != 0;
|
||||
|
||||
// weapon choices are defaulted in checkcommandline, which may override them
|
||||
if (!CommandWeaponChoice)
|
||||
|
@ -681,37 +681,37 @@ int32 CONFIG_ReadSetup( void )
|
|||
{
|
||||
Bsprintf(buf,"WeaponChoice%ld",i);
|
||||
dummy = -1;
|
||||
SCRIPT_GetNumber( scripthandle, "Misc", buf, &dummy);
|
||||
SCRIPT_GetNumber(scripthandle, "Misc", buf, &dummy);
|
||||
if (dummy >= 0) ud.wchoice[0][i] = dummy;
|
||||
}
|
||||
|
||||
SCRIPT_GetNumber( scripthandle, "Sound Setup", "FXDevice",&FXDevice);
|
||||
SCRIPT_GetNumber( scripthandle, "Sound Setup", "MusicDevice",&MusicDevice);
|
||||
SCRIPT_GetNumber( scripthandle, "Sound Setup", "FXVolume",&FXVolume);
|
||||
SCRIPT_GetNumber( scripthandle, "Sound Setup", "MusicVolume",&MusicVolume);
|
||||
SCRIPT_GetNumber( scripthandle, "Sound Setup", "SoundToggle",&SoundToggle);
|
||||
SCRIPT_GetNumber( scripthandle, "Sound Setup", "MusicToggle",&MusicToggle);
|
||||
SCRIPT_GetNumber( scripthandle, "Sound Setup", "VoiceToggle",&VoiceToggle);
|
||||
SCRIPT_GetNumber( scripthandle, "Sound Setup", "AmbienceToggle",&AmbienceToggle);
|
||||
SCRIPT_GetNumber( scripthandle, "Sound Setup", "NumVoices",&NumVoices);
|
||||
SCRIPT_GetNumber( scripthandle, "Sound Setup", "NumChannels",&NumChannels);
|
||||
SCRIPT_GetNumber( scripthandle, "Sound Setup", "NumBits",&NumBits);
|
||||
SCRIPT_GetNumber( scripthandle, "Sound Setup", "MixRate",&MixRate);
|
||||
SCRIPT_GetNumber( scripthandle, "Sound Setup", "ReverseStereo",&ReverseStereo);
|
||||
SCRIPT_GetNumber(scripthandle, "Sound Setup", "FXDevice",&FXDevice);
|
||||
SCRIPT_GetNumber(scripthandle, "Sound Setup", "MusicDevice",&MusicDevice);
|
||||
SCRIPT_GetNumber(scripthandle, "Sound Setup", "FXVolume",&FXVolume);
|
||||
SCRIPT_GetNumber(scripthandle, "Sound Setup", "MusicVolume",&MusicVolume);
|
||||
SCRIPT_GetNumber(scripthandle, "Sound Setup", "SoundToggle",&SoundToggle);
|
||||
SCRIPT_GetNumber(scripthandle, "Sound Setup", "MusicToggle",&MusicToggle);
|
||||
SCRIPT_GetNumber(scripthandle, "Sound Setup", "VoiceToggle",&VoiceToggle);
|
||||
SCRIPT_GetNumber(scripthandle, "Sound Setup", "AmbienceToggle",&AmbienceToggle);
|
||||
SCRIPT_GetNumber(scripthandle, "Sound Setup", "NumVoices",&NumVoices);
|
||||
SCRIPT_GetNumber(scripthandle, "Sound Setup", "NumChannels",&NumChannels);
|
||||
SCRIPT_GetNumber(scripthandle, "Sound Setup", "NumBits",&NumBits);
|
||||
SCRIPT_GetNumber(scripthandle, "Sound Setup", "MixRate",&MixRate);
|
||||
SCRIPT_GetNumber(scripthandle, "Sound Setup", "ReverseStereo",&ReverseStereo);
|
||||
|
||||
SCRIPT_GetNumber( scripthandle, "Controls","MouseAimingFlipped",&ud.mouseflip); // mouse aiming inverted
|
||||
SCRIPT_GetNumber( scripthandle, "Controls","MouseAiming",&ud.mouseaiming); // 1=momentary/0=toggle
|
||||
SCRIPT_GetNumber(scripthandle, "Controls","MouseAimingFlipped",&ud.mouseflip); // mouse aiming inverted
|
||||
SCRIPT_GetNumber(scripthandle, "Controls","MouseAiming",&ud.mouseaiming); // 1=momentary/0=toggle
|
||||
ps[0].aim_mode = ud.mouseaiming;
|
||||
SCRIPT_GetNumber( scripthandle, "Controls","MouseBias",&MouseBias);
|
||||
SCRIPT_GetNumber( scripthandle, "Controls","MouseFilter",&MouseFilter);
|
||||
SCRIPT_GetNumber( scripthandle, "Controls","SmoothInput",&SmoothInput);
|
||||
SCRIPT_GetNumber( scripthandle, "Controls","UseJoystick",&UseJoystick);
|
||||
SCRIPT_GetNumber( scripthandle, "Controls","UseMouse",&UseMouse);
|
||||
SCRIPT_GetNumber( scripthandle, "Controls","AimingFlag",(int32 *)&myaimmode); // (if toggle mode) gives state
|
||||
SCRIPT_GetNumber( scripthandle, "Controls","RunKeyBehaviour",&ud.runkey_mode); // JBF 20031125
|
||||
SCRIPT_GetNumber( scripthandle, "Controls","AutoAim",&AutoAim); // JBF 20031125
|
||||
SCRIPT_GetNumber(scripthandle, "Controls","MouseBias",&MouseBias);
|
||||
SCRIPT_GetNumber(scripthandle, "Controls","MouseFilter",&MouseFilter);
|
||||
SCRIPT_GetNumber(scripthandle, "Controls","SmoothInput",&SmoothInput);
|
||||
SCRIPT_GetNumber(scripthandle, "Controls","UseJoystick",&UseJoystick);
|
||||
SCRIPT_GetNumber(scripthandle, "Controls","UseMouse",&UseMouse);
|
||||
SCRIPT_GetNumber(scripthandle, "Controls","AimingFlag",(int32 *)&myaimmode); // (if toggle mode) gives state
|
||||
SCRIPT_GetNumber(scripthandle, "Controls","RunKeyBehaviour",&ud.runkey_mode); // JBF 20031125
|
||||
SCRIPT_GetNumber(scripthandle, "Controls","AutoAim",&AutoAim); // JBF 20031125
|
||||
ps[0].auto_aim = AutoAim;
|
||||
SCRIPT_GetNumber( scripthandle, "Controls","WeaponSwitchMode",&ud.weaponswitch);
|
||||
SCRIPT_GetNumber(scripthandle, "Controls","WeaponSwitchMode",&ud.weaponswitch);
|
||||
ps[0].weaponswitch = ud.weaponswitch;
|
||||
}
|
||||
|
||||
|
@ -731,7 +731,7 @@ int32 CONFIG_ReadSetup( void )
|
|||
===================
|
||||
*/
|
||||
|
||||
void CONFIG_WriteSetup( void )
|
||||
void CONFIG_WriteSetup(void)
|
||||
{
|
||||
int32 dummy;
|
||||
|
||||
|
@ -740,102 +740,102 @@ void CONFIG_WriteSetup( void )
|
|||
if (scripthandle < 0)
|
||||
scripthandle = SCRIPT_Init(setupfilename);
|
||||
|
||||
SCRIPT_PutNumber( scripthandle, "Controls","AimingFlag",(long) myaimmode,false,false);
|
||||
SCRIPT_PutNumber( scripthandle, "Controls","AutoAim",AutoAim,false,false);
|
||||
SCRIPT_PutNumber( scripthandle, "Controls","MouseAimingFlipped",ud.mouseflip,false,false);
|
||||
SCRIPT_PutNumber( scripthandle, "Controls","MouseAiming",ud.mouseaiming,false,false);
|
||||
SCRIPT_PutNumber( scripthandle, "Controls","MouseBias",MouseBias,false,false);
|
||||
SCRIPT_PutNumber( scripthandle, "Controls","MouseFilter",MouseFilter,false,false);
|
||||
SCRIPT_PutNumber( scripthandle, "Controls","SmoothInput",SmoothInput,false,false);
|
||||
SCRIPT_PutNumber( scripthandle, "Controls","RunKeyBehaviour",ud.runkey_mode,false,false);
|
||||
SCRIPT_PutNumber( scripthandle, "Controls","UseJoystick",UseJoystick,false,false);
|
||||
SCRIPT_PutNumber( scripthandle, "Controls","UseMouse",UseMouse,false,false);
|
||||
SCRIPT_PutNumber( scripthandle, "Controls","WeaponSwitchMode",ud.weaponswitch,false,false);
|
||||
SCRIPT_PutNumber(scripthandle, "Controls","AimingFlag",(long) myaimmode,false,false);
|
||||
SCRIPT_PutNumber(scripthandle, "Controls","AutoAim",AutoAim,false,false);
|
||||
SCRIPT_PutNumber(scripthandle, "Controls","MouseAimingFlipped",ud.mouseflip,false,false);
|
||||
SCRIPT_PutNumber(scripthandle, "Controls","MouseAiming",ud.mouseaiming,false,false);
|
||||
SCRIPT_PutNumber(scripthandle, "Controls","MouseBias",MouseBias,false,false);
|
||||
SCRIPT_PutNumber(scripthandle, "Controls","MouseFilter",MouseFilter,false,false);
|
||||
SCRIPT_PutNumber(scripthandle, "Controls","SmoothInput",SmoothInput,false,false);
|
||||
SCRIPT_PutNumber(scripthandle, "Controls","RunKeyBehaviour",ud.runkey_mode,false,false);
|
||||
SCRIPT_PutNumber(scripthandle, "Controls","UseJoystick",UseJoystick,false,false);
|
||||
SCRIPT_PutNumber(scripthandle, "Controls","UseMouse",UseMouse,false,false);
|
||||
SCRIPT_PutNumber(scripthandle, "Controls","WeaponSwitchMode",ud.weaponswitch,false,false);
|
||||
|
||||
SCRIPT_PutNumber( scripthandle, "Misc", "AutoMsg",ud.automsg,false,false);
|
||||
SCRIPT_PutNumber( scripthandle, "Misc", "AutoVote",ud.autovote,false,false);
|
||||
SCRIPT_PutNumber( scripthandle, "Misc", "Color",ud.color,false,false);
|
||||
SCRIPT_PutNumber( scripthandle, "Misc", "Crosshairs",ud.crosshair,false,false);
|
||||
SCRIPT_PutNumber( scripthandle, "Misc", "DemoCams",ud.democams,false,false);
|
||||
SCRIPT_PutNumber(scripthandle, "Misc", "AutoMsg",ud.automsg,false,false);
|
||||
SCRIPT_PutNumber(scripthandle, "Misc", "AutoVote",ud.autovote,false,false);
|
||||
SCRIPT_PutNumber(scripthandle, "Misc", "Color",ud.color,false,false);
|
||||
SCRIPT_PutNumber(scripthandle, "Misc", "Crosshairs",ud.crosshair,false,false);
|
||||
SCRIPT_PutNumber(scripthandle, "Misc", "DemoCams",ud.democams,false,false);
|
||||
ud.executions++;
|
||||
SCRIPT_PutNumber( scripthandle, "Misc", "Executions",ud.executions,false,false);
|
||||
SCRIPT_PutNumber( scripthandle, "Setup", "ForceSetup",ForceSetup,false,false);
|
||||
SCRIPT_PutNumber( scripthandle, "Misc", "IDPlayers",ud.idplayers,false,false);
|
||||
SCRIPT_PutNumber( scripthandle, "Misc", "MPMessageDisplayTime",ud.msgdisptime,false,false);
|
||||
SCRIPT_PutNumber( scripthandle, "Misc", "RunMode",RunMode,false,false);
|
||||
SCRIPT_PutNumber( scripthandle, "Misc", "ShowFPS",ud.tickrate,false,false);
|
||||
SCRIPT_PutNumber( scripthandle, "Misc", "ShowLevelStats",ud.levelstats,false,false);
|
||||
SCRIPT_PutNumber( scripthandle, "Misc", "ShowOpponentWeapons",ShowOpponentWeapons,false,false);
|
||||
SCRIPT_PutNumber( scripthandle, "Misc", "ShowViewWeapon",ud.drawweapon,false,false);
|
||||
SCRIPT_PutNumber( scripthandle, "Misc", "StatusBarMode",ud.statusbarmode,false,false);
|
||||
SCRIPT_PutNumber( scripthandle, "Misc", "StatusBarScale",ud.statusbarscale,false,false);
|
||||
SCRIPT_PutNumber( scripthandle, "Misc", "Team",ud.team,false,false);
|
||||
SCRIPT_PutNumber( scripthandle, "Misc", "UsePrecache",useprecache,false,false);
|
||||
SCRIPT_PutNumber(scripthandle, "Misc", "Executions",ud.executions,false,false);
|
||||
SCRIPT_PutNumber(scripthandle, "Setup", "ForceSetup",ForceSetup,false,false);
|
||||
SCRIPT_PutNumber(scripthandle, "Misc", "IDPlayers",ud.idplayers,false,false);
|
||||
SCRIPT_PutNumber(scripthandle, "Misc", "MPMessageDisplayTime",ud.msgdisptime,false,false);
|
||||
SCRIPT_PutNumber(scripthandle, "Misc", "RunMode",RunMode,false,false);
|
||||
SCRIPT_PutNumber(scripthandle, "Misc", "ShowFPS",ud.tickrate,false,false);
|
||||
SCRIPT_PutNumber(scripthandle, "Misc", "ShowLevelStats",ud.levelstats,false,false);
|
||||
SCRIPT_PutNumber(scripthandle, "Misc", "ShowOpponentWeapons",ShowOpponentWeapons,false,false);
|
||||
SCRIPT_PutNumber(scripthandle, "Misc", "ShowViewWeapon",ud.drawweapon,false,false);
|
||||
SCRIPT_PutNumber(scripthandle, "Misc", "StatusBarMode",ud.statusbarmode,false,false);
|
||||
SCRIPT_PutNumber(scripthandle, "Misc", "StatusBarScale",ud.statusbarscale,false,false);
|
||||
SCRIPT_PutNumber(scripthandle, "Misc", "Team",ud.team,false,false);
|
||||
SCRIPT_PutNumber(scripthandle, "Misc", "UsePrecache",useprecache,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)
|
||||
SCRIPT_PutNumber( scripthandle, "Screen Setup", "GLAnisotropy",glanisotropy,false,false);
|
||||
SCRIPT_PutNumber( scripthandle, "Screen Setup", "GLProjectionFix",glprojectionhacks,false,false);
|
||||
SCRIPT_PutNumber( scripthandle, "Screen Setup", "GLTextureMode",gltexfiltermode,false,false);
|
||||
SCRIPT_PutNumber( scripthandle, "Screen Setup", "GLUseCompressedTextureCache", glusetexcache,false,false);
|
||||
SCRIPT_PutNumber( scripthandle, "Screen Setup", "GLUseTextureCacheCompression", glusetexcachecompression,false,false);
|
||||
SCRIPT_PutNumber( scripthandle, "Screen Setup", "GLUseTextureCompr",glusetexcompr,false,false);
|
||||
SCRIPT_PutNumber( scripthandle, "Screen Setup", "GLWidescreen",glwidescreen,false,false);
|
||||
SCRIPT_PutNumber(scripthandle, "Screen Setup", "GLAnisotropy",glanisotropy,false,false);
|
||||
SCRIPT_PutNumber(scripthandle, "Screen Setup", "GLProjectionFix",glprojectionhacks,false,false);
|
||||
SCRIPT_PutNumber(scripthandle, "Screen Setup", "GLTextureMode",gltexfiltermode,false,false);
|
||||
SCRIPT_PutNumber(scripthandle, "Screen Setup", "GLUseCompressedTextureCache", glusetexcache,false,false);
|
||||
SCRIPT_PutNumber(scripthandle, "Screen Setup", "GLUseTextureCacheCompression", glusetexcachecompression,false,false);
|
||||
SCRIPT_PutNumber(scripthandle, "Screen Setup", "GLUseTextureCompr",glusetexcompr,false,false);
|
||||
SCRIPT_PutNumber(scripthandle, "Screen Setup", "GLWidescreen",glwidescreen,false,false);
|
||||
#endif
|
||||
#ifdef RENDERTYPEWIN
|
||||
SCRIPT_PutNumber( scripthandle, "Screen Setup", "MaxRefreshFreq",maxrefreshfreq,false,false);
|
||||
SCRIPT_PutNumber(scripthandle, "Screen Setup", "MaxRefreshFreq",maxrefreshfreq,false,false);
|
||||
#endif
|
||||
SCRIPT_PutNumber( scripthandle, "Screen Setup", "Messages",ud.fta_on,false,false);
|
||||
SCRIPT_PutNumber(scripthandle, "Screen Setup", "Messages",ud.fta_on,false,false);
|
||||
|
||||
if (!NAM) {
|
||||
SCRIPT_PutNumber( scripthandle, "Screen Setup", "Out",ud.lockout,false,false);
|
||||
SCRIPT_PutString( scripthandle, "Screen Setup", "Password",ud.pwlockout);
|
||||
SCRIPT_PutNumber(scripthandle, "Screen Setup", "Out",ud.lockout,false,false);
|
||||
SCRIPT_PutString(scripthandle, "Screen Setup", "Password",ud.pwlockout);
|
||||
}
|
||||
|
||||
SCRIPT_PutNumber( scripthandle, "Screen Setup", "ScreenBPP",ScreenBPP,false,false); // JBF 20040523
|
||||
SCRIPT_PutNumber( scripthandle, "Screen Setup", "ScreenGamma",ud.brightness,false,false);
|
||||
SCRIPT_PutNumber( scripthandle, "Screen Setup", "ScreenHeight",ScreenHeight,false,false); // JBF 20031206
|
||||
SCRIPT_PutNumber( scripthandle, "Screen Setup", "ScreenMode",ScreenMode,false,false); // JBF 20031206
|
||||
SCRIPT_PutNumber( scripthandle, "Screen Setup", "ScreenSize",ud.screen_size,false,false);
|
||||
SCRIPT_PutNumber( scripthandle, "Screen Setup", "ScreenWidth",ScreenWidth,false,false); // JBF 20031206
|
||||
SCRIPT_PutNumber( scripthandle, "Screen Setup", "Shadows",ud.shadows,false,false);
|
||||
SCRIPT_PutNumber( scripthandle, "Screen Setup", "Tilt",ud.screen_tilting,false,false);
|
||||
SCRIPT_PutNumber(scripthandle, "Screen Setup", "ScreenBPP",ScreenBPP,false,false); // JBF 20040523
|
||||
SCRIPT_PutNumber(scripthandle, "Screen Setup", "ScreenGamma",ud.brightness,false,false);
|
||||
SCRIPT_PutNumber(scripthandle, "Screen Setup", "ScreenHeight",ScreenHeight,false,false); // JBF 20031206
|
||||
SCRIPT_PutNumber(scripthandle, "Screen Setup", "ScreenMode",ScreenMode,false,false); // JBF 20031206
|
||||
SCRIPT_PutNumber(scripthandle, "Screen Setup", "ScreenSize",ud.screen_size,false,false);
|
||||
SCRIPT_PutNumber(scripthandle, "Screen Setup", "ScreenWidth",ScreenWidth,false,false); // JBF 20031206
|
||||
SCRIPT_PutNumber(scripthandle, "Screen Setup", "Shadows",ud.shadows,false,false);
|
||||
SCRIPT_PutNumber(scripthandle, "Screen Setup", "Tilt",ud.screen_tilting,false,false);
|
||||
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||
SCRIPT_PutNumber( scripthandle, "Screen Setup", "UseHightile",usehightile,false,false);
|
||||
SCRIPT_PutNumber( scripthandle, "Screen Setup", "UseModels",usemodels,false,false);
|
||||
SCRIPT_PutNumber(scripthandle, "Screen Setup", "UseHightile",usehightile,false,false);
|
||||
SCRIPT_PutNumber(scripthandle, "Screen Setup", "UseModels",usemodels,false,false);
|
||||
#endif
|
||||
SCRIPT_PutNumber( scripthandle, "Sound Setup", "AmbienceToggle",AmbienceToggle,false,false);
|
||||
SCRIPT_PutNumber( scripthandle, "Sound Setup", "FXVolume",FXVolume,false,false);
|
||||
SCRIPT_PutNumber( scripthandle, "Sound Setup", "MusicToggle",MusicToggle,false,false);
|
||||
SCRIPT_PutNumber( scripthandle, "Sound Setup", "MusicVolume",MusicVolume,false,false);
|
||||
SCRIPT_PutNumber( scripthandle, "Sound Setup", "ReverseStereo",ReverseStereo,false,false);
|
||||
SCRIPT_PutNumber( scripthandle, "Sound Setup", "SoundToggle",SoundToggle,false,false);
|
||||
SCRIPT_PutNumber( scripthandle, "Sound Setup", "VoiceToggle",VoiceToggle,false,false);
|
||||
SCRIPT_PutNumber(scripthandle, "Sound Setup", "AmbienceToggle",AmbienceToggle,false,false);
|
||||
SCRIPT_PutNumber(scripthandle, "Sound Setup", "FXVolume",FXVolume,false,false);
|
||||
SCRIPT_PutNumber(scripthandle, "Sound Setup", "MusicToggle",MusicToggle,false,false);
|
||||
SCRIPT_PutNumber(scripthandle, "Sound Setup", "MusicVolume",MusicVolume,false,false);
|
||||
SCRIPT_PutNumber(scripthandle, "Sound Setup", "ReverseStereo",ReverseStereo,false,false);
|
||||
SCRIPT_PutNumber(scripthandle, "Sound Setup", "SoundToggle",SoundToggle,false,false);
|
||||
SCRIPT_PutNumber(scripthandle, "Sound Setup", "VoiceToggle",VoiceToggle,false,false);
|
||||
|
||||
// JBF 20031211
|
||||
for (dummy=0;dummy<NUMGAMEFUNCTIONS;dummy++) {
|
||||
SCRIPT_PutDoubleString( scripthandle, "KeyDefinitions", CONFIG_FunctionNumToName(dummy),
|
||||
KB_ScanCodeToString(KeyboardKeys[dummy][0]), KB_ScanCodeToString(KeyboardKeys[dummy][1]));
|
||||
SCRIPT_PutDoubleString(scripthandle, "KeyDefinitions", CONFIG_FunctionNumToName(dummy),
|
||||
KB_ScanCodeToString(KeyboardKeys[dummy][0]), KB_ScanCodeToString(KeyboardKeys[dummy][1]));
|
||||
}
|
||||
|
||||
for (dummy=0;dummy<10;dummy++)
|
||||
{
|
||||
Bsprintf(buf,"WeaponChoice%ld",dummy);
|
||||
SCRIPT_PutNumber( scripthandle, "Misc",buf,ud.wchoice[myconnectindex][dummy],false,false);
|
||||
SCRIPT_PutNumber(scripthandle, "Misc",buf,ud.wchoice[myconnectindex][dummy],false,false);
|
||||
}
|
||||
|
||||
for (dummy=0;dummy<MAXMOUSEBUTTONS;dummy++) {
|
||||
Bsprintf(buf,"MouseButton%ld",dummy);
|
||||
SCRIPT_PutString( scripthandle,"Controls", buf, CONFIG_FunctionNumToName( MouseFunctions[dummy][0] ));
|
||||
SCRIPT_PutString(scripthandle,"Controls", buf, CONFIG_FunctionNumToName(MouseFunctions[dummy][0]));
|
||||
|
||||
if (dummy >= (MAXMOUSEBUTTONS-2)) continue;
|
||||
|
||||
Bsprintf(buf,"MouseButtonClicked%ld",dummy);
|
||||
SCRIPT_PutString( scripthandle,"Controls", buf, CONFIG_FunctionNumToName( MouseFunctions[dummy][1] ));
|
||||
SCRIPT_PutString(scripthandle,"Controls", buf, CONFIG_FunctionNumToName(MouseFunctions[dummy][1]));
|
||||
}
|
||||
for (dummy=0;dummy<MAXMOUSEAXES;dummy++) {
|
||||
Bsprintf(buf,"MouseAnalogAxes%ld",dummy);
|
||||
SCRIPT_PutString(scripthandle, "Controls", buf, CONFIG_AnalogNumToName( MouseAnalogueAxes[dummy] ));
|
||||
SCRIPT_PutString(scripthandle, "Controls", buf, CONFIG_AnalogNumToName(MouseAnalogueAxes[dummy]));
|
||||
|
||||
Bsprintf(buf,"MouseDigitalAxes%ld_0",dummy);
|
||||
SCRIPT_PutString(scripthandle, "Controls", buf, CONFIG_FunctionNumToName(MouseDigitalFunctions[dummy][0]));
|
||||
|
@ -847,18 +847,18 @@ void CONFIG_WriteSetup( void )
|
|||
SCRIPT_PutNumber(scripthandle, "Controls", buf, MouseAnalogueScale[dummy], false, false);
|
||||
}
|
||||
dummy = CONTROL_GetMouseSensitivity();
|
||||
SCRIPT_PutNumber( scripthandle, "Controls","Mouse_Sensitivity",dummy,false,false);
|
||||
SCRIPT_PutNumber(scripthandle, "Controls","Mouse_Sensitivity",dummy,false,false);
|
||||
|
||||
for (dummy=0;dummy<MAXJOYBUTTONS;dummy++) {
|
||||
Bsprintf(buf,"JoystickButton%ld",dummy);
|
||||
SCRIPT_PutString( scripthandle,"Controls", buf, CONFIG_FunctionNumToName( JoystickFunctions[dummy][0] ));
|
||||
SCRIPT_PutString(scripthandle,"Controls", buf, CONFIG_FunctionNumToName(JoystickFunctions[dummy][0]));
|
||||
|
||||
Bsprintf(buf,"JoystickButtonClicked%ld",dummy);
|
||||
SCRIPT_PutString( scripthandle,"Controls", buf, CONFIG_FunctionNumToName( JoystickFunctions[dummy][1] ));
|
||||
SCRIPT_PutString(scripthandle,"Controls", buf, CONFIG_FunctionNumToName(JoystickFunctions[dummy][1]));
|
||||
}
|
||||
for (dummy=0;dummy<MAXJOYAXES;dummy++) {
|
||||
Bsprintf(buf,"JoystickAnalogAxes%ld",dummy);
|
||||
SCRIPT_PutString(scripthandle, "Controls", buf, CONFIG_AnalogNumToName( JoystickAnalogueAxes[dummy] ));
|
||||
SCRIPT_PutString(scripthandle, "Controls", buf, CONFIG_AnalogNumToName(JoystickAnalogueAxes[dummy]));
|
||||
|
||||
Bsprintf(buf,"JoystickDigitalAxes%ld_0",dummy);
|
||||
SCRIPT_PutString(scripthandle, "Controls", buf, CONFIG_FunctionNumToName(JoystickDigitalFunctions[dummy][0]));
|
||||
|
@ -876,8 +876,8 @@ void CONFIG_WriteSetup( void )
|
|||
SCRIPT_PutNumber(scripthandle, "Controls", buf, JoystickAnalogueSaturate[dummy], false, false);
|
||||
}
|
||||
|
||||
SCRIPT_PutString( scripthandle, "Comm Setup","PlayerName",&myname[0]);
|
||||
SCRIPT_PutString( scripthandle, "Comm Setup","RTSName",&ud.rtsname[0]);
|
||||
SCRIPT_PutString(scripthandle, "Comm Setup","PlayerName",&myname[0]);
|
||||
SCRIPT_PutString(scripthandle, "Comm Setup","RTSName",&ud.rtsname[0]);
|
||||
|
||||
{
|
||||
char commmacro[] = "CommbatMacro# ";
|
||||
|
@ -885,12 +885,12 @@ void CONFIG_WriteSetup( void )
|
|||
for (dummy = 0;dummy < 10;dummy++)
|
||||
{
|
||||
commmacro[13] = dummy+'0';
|
||||
SCRIPT_PutString( scripthandle, "Comm Setup",commmacro,&ud.ridecule[dummy][0]);
|
||||
SCRIPT_PutString(scripthandle, "Comm Setup",commmacro,&ud.ridecule[dummy][0]);
|
||||
}
|
||||
}
|
||||
|
||||
SCRIPT_Save (scripthandle, setupfilename);
|
||||
SCRIPT_Free (scripthandle);
|
||||
SCRIPT_Save(scripthandle, setupfilename);
|
||||
SCRIPT_Free(scripthandle);
|
||||
}
|
||||
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -51,10 +51,10 @@ void cmenu(short cm)
|
|||
{
|
||||
current_menu = cm;
|
||||
|
||||
if ( (cm >= 1000 && cm <= 1009) )
|
||||
if ((cm >= 1000 && cm <= 1009))
|
||||
return;
|
||||
|
||||
if ( cm == 0 )
|
||||
if (cm == 0)
|
||||
probey = last_zero;
|
||||
else if (cm == 50)
|
||||
probey = last_fifty;
|
||||
|
@ -114,36 +114,36 @@ static int probe_(int type,int x,int y,int i,int n)
|
|||
s = 1+(CONTROL_GetMouseSensitivity()>>4);
|
||||
|
||||
{
|
||||
CONTROL_GetInput( &minfo );
|
||||
CONTROL_GetInput(&minfo);
|
||||
mi += minfo.dz;
|
||||
}
|
||||
|
||||
if ( x == (320>>1) )
|
||||
if (x == (320>>1))
|
||||
centre = 320>>2;
|
||||
else centre = 0;
|
||||
|
||||
if (!buttonstat)
|
||||
{
|
||||
if ( KB_KeyPressed( sc_UpArrow ) || KB_KeyPressed( sc_PgUp ) || KB_KeyPressed( sc_kpad_8 ) ||
|
||||
mi < -8192 )
|
||||
if (KB_KeyPressed(sc_UpArrow) || KB_KeyPressed(sc_PgUp) || KB_KeyPressed(sc_kpad_8) ||
|
||||
mi < -8192)
|
||||
{
|
||||
mi = 0;
|
||||
KB_ClearKeyDown( sc_UpArrow );
|
||||
KB_ClearKeyDown( sc_kpad_8 );
|
||||
KB_ClearKeyDown( sc_PgUp );
|
||||
KB_ClearKeyDown(sc_UpArrow);
|
||||
KB_ClearKeyDown(sc_kpad_8);
|
||||
KB_ClearKeyDown(sc_PgUp);
|
||||
sound(KICK_HIT);
|
||||
|
||||
probey--;
|
||||
if (probey < 0) probey = n-1;
|
||||
minfo.dz = 0;
|
||||
}
|
||||
if ( KB_KeyPressed( sc_DownArrow ) || KB_KeyPressed( sc_PgDn ) || KB_KeyPressed( sc_kpad_2 )
|
||||
|| mi > 8192 )
|
||||
if (KB_KeyPressed(sc_DownArrow) || KB_KeyPressed(sc_PgDn) || KB_KeyPressed(sc_kpad_2)
|
||||
|| mi > 8192)
|
||||
{
|
||||
mi = 0;
|
||||
KB_ClearKeyDown( sc_DownArrow );
|
||||
KB_ClearKeyDown( sc_kpad_2 );
|
||||
KB_ClearKeyDown( sc_PgDn );
|
||||
KB_ClearKeyDown(sc_DownArrow);
|
||||
KB_ClearKeyDown(sc_kpad_2);
|
||||
KB_ClearKeyDown(sc_PgDn);
|
||||
sound(KICK_HIT);
|
||||
probey++;
|
||||
minfo.dz = 0;
|
||||
|
@ -164,28 +164,28 @@ static int probe_(int type,int x,int y,int i,int n)
|
|||
else
|
||||
rotatesprite((x<<16)-((tilesizx[BIGFNTCURSOR]-4)<<(16-type)),(y+(probey*i)-(4>>type))<<16,65536L>>type,0,SPINNINGNUKEICON+(((totalclock>>3))%7),sh,0,10,0,0,xdim-1,ydim-1);
|
||||
|
||||
if ( KB_KeyPressed(sc_Space) || KB_KeyPressed( sc_kpad_Enter ) || KB_KeyPressed( sc_Enter ) || (LMB && !onbar) )
|
||||
if (KB_KeyPressed(sc_Space) || KB_KeyPressed(sc_kpad_Enter) || KB_KeyPressed(sc_Enter) || (LMB && !onbar))
|
||||
{
|
||||
if (current_menu != 110)
|
||||
sound(PISTOL_BODYHIT);
|
||||
KB_ClearKeyDown( sc_Enter );
|
||||
KB_ClearKeyDown( sc_Space );
|
||||
KB_ClearKeyDown( sc_kpad_Enter );
|
||||
KB_ClearKeyDown(sc_Enter);
|
||||
KB_ClearKeyDown(sc_Space);
|
||||
KB_ClearKeyDown(sc_kpad_Enter);
|
||||
return(probey);
|
||||
}
|
||||
else if ( KB_KeyPressed( sc_Escape ) || (RMB) )
|
||||
else if (KB_KeyPressed(sc_Escape) || (RMB))
|
||||
{
|
||||
onbar = 0;
|
||||
KB_ClearKeyDown( sc_Escape );
|
||||
KB_ClearKeyDown(sc_Escape);
|
||||
sound(EXITMENUSOUND);
|
||||
return(-1);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (onbar == 0) return(-probey-2);
|
||||
if ( KB_KeyPressed( sc_LeftArrow ) || KB_KeyPressed( sc_kpad_4 ) || ((buttonstat&1) && minfo.dyaw < -128 ) )
|
||||
if (KB_KeyPressed(sc_LeftArrow) || KB_KeyPressed(sc_kpad_4) || ((buttonstat&1) && minfo.dyaw < -128))
|
||||
return(probey);
|
||||
else if ( KB_KeyPressed( sc_RightArrow ) || KB_KeyPressed( sc_kpad_6 ) || ((buttonstat&1) && minfo.dyaw > 128 ) )
|
||||
else if (KB_KeyPressed(sc_RightArrow) || KB_KeyPressed(sc_kpad_6) || ((buttonstat&1) && minfo.dyaw > 128))
|
||||
return(probey);
|
||||
else return(-probey-2);
|
||||
}
|
||||
|
@ -201,9 +201,9 @@ int menutext_(int x,int y,short s,short p,char *t)
|
|||
|
||||
i = centre = 0;
|
||||
|
||||
if ( x == (320>>1) )
|
||||
if (x == (320>>1))
|
||||
{
|
||||
while ( *(t+i) )
|
||||
while (*(t+i))
|
||||
{
|
||||
if (*(t+i) == ' ')
|
||||
{
|
||||
|
@ -326,20 +326,20 @@ static void bar_(int type, int x,int y,short *p,short dainc,char damodify,short
|
|||
{
|
||||
if (rev == 0)
|
||||
{
|
||||
if ( *p > 0 && (KB_KeyPressed( sc_LeftArrow ) || KB_KeyPressed( sc_kpad_4 ) || ((buttonstat&1) && minfo.dyaw < -256 ) ) ) // && onbar) )
|
||||
if (*p > 0 && (KB_KeyPressed(sc_LeftArrow) || KB_KeyPressed(sc_kpad_4) || ((buttonstat&1) && minfo.dyaw < -256))) // && onbar) )
|
||||
{
|
||||
KB_ClearKeyDown( sc_LeftArrow );
|
||||
KB_ClearKeyDown( sc_kpad_4 );
|
||||
KB_ClearKeyDown(sc_LeftArrow);
|
||||
KB_ClearKeyDown(sc_kpad_4);
|
||||
|
||||
*p -= dainc;
|
||||
if (*p < 0)
|
||||
*p = 0;
|
||||
sound(KICK_HIT);
|
||||
}
|
||||
if ( *p < 63 && (KB_KeyPressed( sc_RightArrow ) || KB_KeyPressed( sc_kpad_6 ) || ((buttonstat&1) && minfo.dyaw > 256 ) ) )//&& onbar) )
|
||||
if (*p < 63 && (KB_KeyPressed(sc_RightArrow) || KB_KeyPressed(sc_kpad_6) || ((buttonstat&1) && minfo.dyaw > 256))) //&& onbar) )
|
||||
{
|
||||
KB_ClearKeyDown( sc_RightArrow );
|
||||
KB_ClearKeyDown( sc_kpad_6 );
|
||||
KB_ClearKeyDown(sc_RightArrow);
|
||||
KB_ClearKeyDown(sc_kpad_6);
|
||||
|
||||
*p += dainc;
|
||||
if (*p > 63)
|
||||
|
@ -349,20 +349,20 @@ static void bar_(int type, int x,int y,short *p,short dainc,char damodify,short
|
|||
}
|
||||
else
|
||||
{
|
||||
if ( *p > 0 && (KB_KeyPressed( sc_RightArrow ) || KB_KeyPressed( sc_kpad_6 ) || ((buttonstat&1) && minfo.dyaw > 256 ) ) )//&& onbar) )
|
||||
if (*p > 0 && (KB_KeyPressed(sc_RightArrow) || KB_KeyPressed(sc_kpad_6) || ((buttonstat&1) && minfo.dyaw > 256))) //&& onbar) )
|
||||
{
|
||||
KB_ClearKeyDown( sc_RightArrow );
|
||||
KB_ClearKeyDown( sc_kpad_6 );
|
||||
KB_ClearKeyDown(sc_RightArrow);
|
||||
KB_ClearKeyDown(sc_kpad_6);
|
||||
|
||||
*p -= dainc;
|
||||
if (*p < 0)
|
||||
*p = 0;
|
||||
sound(KICK_HIT);
|
||||
}
|
||||
if ( *p < 64 && (KB_KeyPressed( sc_LeftArrow ) || KB_KeyPressed( sc_kpad_4 ) || ((buttonstat&1) && minfo.dyaw < -256 ) ) ) // && onbar) )
|
||||
if (*p < 64 && (KB_KeyPressed(sc_LeftArrow) || KB_KeyPressed(sc_kpad_4) || ((buttonstat&1) && minfo.dyaw < -256))) // && onbar) )
|
||||
{
|
||||
KB_ClearKeyDown( sc_LeftArrow );
|
||||
KB_ClearKeyDown( sc_kpad_4 );
|
||||
KB_ClearKeyDown(sc_LeftArrow);
|
||||
KB_ClearKeyDown(sc_kpad_4);
|
||||
|
||||
*p += dainc;
|
||||
if (*p > 64)
|
||||
|
@ -374,11 +374,11 @@ static void bar_(int type, int x,int y,short *p,short dainc,char damodify,short
|
|||
|
||||
xloc = *p;
|
||||
|
||||
rotatesprite( (x<<16)+(22<<(16-type)),(y<<16)-(3<<(16-type)),65536L>>type,0,SLIDEBAR,s,pa,10,0,0,xdim-1,ydim-1);
|
||||
rotatesprite((x<<16)+(22<<(16-type)),(y<<16)-(3<<(16-type)),65536L>>type,0,SLIDEBAR,s,pa,10,0,0,xdim-1,ydim-1);
|
||||
if (rev == 0)
|
||||
rotatesprite( (x<<16)+((xloc+1)<<(16-type)),(y<<16)+(1<<(16-type)),65536L>>type,0,SLIDEBAR+1,s,pa,10,0,0,xdim-1,ydim-1);
|
||||
rotatesprite((x<<16)+((xloc+1)<<(16-type)),(y<<16)+(1<<(16-type)),65536L>>type,0,SLIDEBAR+1,s,pa,10,0,0,xdim-1,ydim-1);
|
||||
else
|
||||
rotatesprite( (x<<16)+((65-xloc)<<(16-type)),(y<<16)+(1<<(16-type)),65536L>>type,0,SLIDEBAR+1,s,pa,10,0,0,xdim-1,ydim-1);
|
||||
rotatesprite((x<<16)+((65-xloc)<<(16-type)),(y<<16)+(1<<(16-type)),65536L>>type,0,SLIDEBAR+1,s,pa,10,0,0,xdim-1,ydim-1);
|
||||
}
|
||||
|
||||
void bar(int x,int y,short *p,short dainc,char damodify,short s, short pa) { bar_(0,x,y,p,dainc,damodify,s,pa); }
|
||||
|
@ -395,20 +395,20 @@ static void modval(int min, int max,int *p,short dainc,char damodify)
|
|||
{
|
||||
if (rev == 0)
|
||||
{
|
||||
if ( KB_KeyPressed( sc_LeftArrow ) || KB_KeyPressed( sc_kpad_4 ) || ((buttonstat&1) && minfo.dyaw < -256 ) ) // && onbar) )
|
||||
if (KB_KeyPressed(sc_LeftArrow) || KB_KeyPressed(sc_kpad_4) || ((buttonstat&1) && minfo.dyaw < -256)) // && onbar) )
|
||||
{
|
||||
KB_ClearKeyDown( sc_LeftArrow );
|
||||
KB_ClearKeyDown( sc_kpad_4 );
|
||||
KB_ClearKeyDown(sc_LeftArrow);
|
||||
KB_ClearKeyDown(sc_kpad_4);
|
||||
|
||||
*p -= dainc;
|
||||
if (*p < min)
|
||||
*p = max;
|
||||
sound(PISTOL_BODYHIT);
|
||||
}
|
||||
if ( KB_KeyPressed( sc_RightArrow ) || KB_KeyPressed( sc_kpad_6 ) || ((buttonstat&1) && minfo.dyaw > 256 ) )//&& onbar) )
|
||||
if (KB_KeyPressed(sc_RightArrow) || KB_KeyPressed(sc_kpad_6) || ((buttonstat&1) && minfo.dyaw > 256)) //&& onbar) )
|
||||
{
|
||||
KB_ClearKeyDown( sc_RightArrow );
|
||||
KB_ClearKeyDown( sc_kpad_6 );
|
||||
KB_ClearKeyDown(sc_RightArrow);
|
||||
KB_ClearKeyDown(sc_kpad_6);
|
||||
|
||||
*p += dainc;
|
||||
if (*p > max)
|
||||
|
@ -418,20 +418,20 @@ static void modval(int min, int max,int *p,short dainc,char damodify)
|
|||
}
|
||||
else
|
||||
{
|
||||
if ( KB_KeyPressed( sc_RightArrow ) || KB_KeyPressed( sc_kpad_6 ) || ((buttonstat&1) && minfo.dyaw > 256 ))//&& onbar ))
|
||||
if (KB_KeyPressed(sc_RightArrow) || KB_KeyPressed(sc_kpad_6) || ((buttonstat&1) && minfo.dyaw > 256)) //&& onbar ))
|
||||
{
|
||||
KB_ClearKeyDown( sc_RightArrow );
|
||||
KB_ClearKeyDown( sc_kpad_6 );
|
||||
KB_ClearKeyDown(sc_RightArrow);
|
||||
KB_ClearKeyDown(sc_kpad_6);
|
||||
|
||||
*p -= dainc;
|
||||
if (*p < min)
|
||||
*p = max;
|
||||
sound(PISTOL_BODYHIT);
|
||||
}
|
||||
if ( KB_KeyPressed( sc_LeftArrow ) || KB_KeyPressed( sc_kpad_4 ) || ((buttonstat&1) && minfo.dyaw < -256 ))// && onbar) )
|
||||
if (KB_KeyPressed(sc_LeftArrow) || KB_KeyPressed(sc_kpad_4) || ((buttonstat&1) && minfo.dyaw < -256)) // && onbar) )
|
||||
{
|
||||
KB_ClearKeyDown( sc_LeftArrow );
|
||||
KB_ClearKeyDown( sc_kpad_4 );
|
||||
KB_ClearKeyDown(sc_LeftArrow);
|
||||
KB_ClearKeyDown(sc_kpad_4);
|
||||
|
||||
*p += dainc;
|
||||
if (*p > max)
|
||||
|
@ -522,7 +522,7 @@ void sendquit(void)
|
|||
{
|
||||
int i;
|
||||
|
||||
if ( gamequit == 0 && ( numplayers > 1 ) )
|
||||
if (gamequit == 0 && (numplayers > 1))
|
||||
{
|
||||
if (ps[myconnectindex].gm&MODE_GAME)
|
||||
{
|
||||
|
@ -542,10 +542,10 @@ void sendquit(void)
|
|||
gameexit(" ");
|
||||
}
|
||||
}
|
||||
else if ( numplayers < 2 )
|
||||
else if (numplayers < 2)
|
||||
gameexit(" ");
|
||||
|
||||
if ( ( totalclock > quittimer ) && ( gamequit == 1) )
|
||||
if ((totalclock > quittimer) && (gamequit == 1))
|
||||
gameexit("Timed out.");
|
||||
}
|
||||
|
||||
|
@ -562,14 +562,14 @@ void menus(void)
|
|||
if (buttonstat != 0 && !onbar)
|
||||
{
|
||||
x = MOUSE_GetButtons()<<3;
|
||||
if ( x ) buttonstat = x<<3;
|
||||
if (x) buttonstat = x<<3;
|
||||
else buttonstat = 0;
|
||||
}
|
||||
else
|
||||
buttonstat = MOUSE_GetButtons();
|
||||
}
|
||||
|
||||
if ( (ps[myconnectindex].gm&MODE_MENU) == 0 )
|
||||
if ((ps[myconnectindex].gm&MODE_MENU) == 0)
|
||||
{
|
||||
walock[TILE_LOADSHOT] = 1;
|
||||
return;
|
||||
|
@ -634,7 +634,7 @@ void menus(void)
|
|||
gametext(160,140+8,"VERSION OF DUKE NUKEM 3D.",0,2+8+16);
|
||||
gametext(160,149+16,"PRESS ANY KEY...",0,2+8+16);
|
||||
|
||||
if ( x >= -1 ) cmenu(100);
|
||||
if (x >= -1) cmenu(100);
|
||||
break;
|
||||
|
||||
case 20001:
|
||||
|
@ -999,7 +999,7 @@ void menus(void)
|
|||
|
||||
if (VOLUMEALL) {
|
||||
menutext(c,57+16+16+16+16+16+16-9,MENUHIGHLIGHT(6),boardfilename[0] == 0,"USER MAP");
|
||||
if ( boardfilename[0] != 0 )
|
||||
if (boardfilename[0] != 0)
|
||||
gametext(c+70+44,57+16+16+16+16+16,boardfilename,0,2+8+16);
|
||||
} else {
|
||||
menutext(c,57+16+16+16+16+16+16-9,MENUHIGHLIGHT(6),1,"USER MAP");
|
||||
|
@ -1088,7 +1088,7 @@ void menus(void)
|
|||
|
||||
gametext(160,99+9,"(Y/N)",0,2+8+16);
|
||||
|
||||
if ( KB_KeyPressed(sc_Escape) || KB_KeyPressed(sc_N) || RMB)
|
||||
if (KB_KeyPressed(sc_Escape) || KB_KeyPressed(sc_N) || RMB)
|
||||
{
|
||||
if (sprite[ps[myconnectindex].i].extra <= 0)
|
||||
{
|
||||
|
@ -1107,7 +1107,7 @@ void menus(void)
|
|||
}
|
||||
}
|
||||
|
||||
if ( KB_KeyPressed(sc_Space) || KB_KeyPressed(sc_Enter) || KB_KeyPressed(sc_kpad_Enter) || KB_KeyPressed(sc_Y) || LMB )
|
||||
if (KB_KeyPressed(sc_Space) || KB_KeyPressed(sc_Enter) || KB_KeyPressed(sc_kpad_Enter) || KB_KeyPressed(sc_Y) || LMB)
|
||||
{
|
||||
KB_FlushKeyboardQueue();
|
||||
KB_ClearKeysDown();
|
||||
|
@ -1150,20 +1150,20 @@ void menus(void)
|
|||
gametext(160,50+16+16+16+16-12,"ENTER PASSWORD",0,2+8+16);
|
||||
x = strget((320>>1),50+16+16+16+16,buf,19, 998);
|
||||
|
||||
if ( x )
|
||||
if (x)
|
||||
{
|
||||
if (ud.pwlockout[0] == 0 || ud.lockout == 0 )
|
||||
if (ud.pwlockout[0] == 0 || ud.lockout == 0)
|
||||
strcpy(&ud.pwlockout[0],buf);
|
||||
else if ( strcmp(buf,&ud.pwlockout[0]) == 0 )
|
||||
else if (strcmp(buf,&ud.pwlockout[0]) == 0)
|
||||
{
|
||||
ud.lockout = 0;
|
||||
buf[0] = 0;
|
||||
|
||||
for (x=0;x<numanimwalls;x++)
|
||||
if ( wall[animwall[x].wallnum].picnum != W_SCREENBREAK &&
|
||||
if (wall[animwall[x].wallnum].picnum != W_SCREENBREAK &&
|
||||
wall[animwall[x].wallnum].picnum != W_SCREENBREAK+1 &&
|
||||
wall[animwall[x].wallnum].picnum != W_SCREENBREAK+2 )
|
||||
if ( wall[animwall[x].wallnum].extra >= 0 )
|
||||
wall[animwall[x].wallnum].picnum != W_SCREENBREAK+2)
|
||||
if (wall[animwall[x].wallnum].extra >= 0)
|
||||
wall[animwall[x].wallnum].picnum = wall[animwall[x].wallnum].extra;
|
||||
|
||||
}
|
||||
|
@ -1177,16 +1177,16 @@ void menus(void)
|
|||
{
|
||||
if (x == 0)
|
||||
{
|
||||
if ( ud.lockout == 1 )
|
||||
if (ud.lockout == 1)
|
||||
{
|
||||
if (ud.pwlockout[0] == 0)
|
||||
{
|
||||
ud.lockout = 0;
|
||||
for (x=0;x<numanimwalls;x++)
|
||||
if ( wall[animwall[x].wallnum].picnum != W_SCREENBREAK &&
|
||||
if (wall[animwall[x].wallnum].picnum != W_SCREENBREAK &&
|
||||
wall[animwall[x].wallnum].picnum != W_SCREENBREAK+1 &&
|
||||
wall[animwall[x].wallnum].picnum != W_SCREENBREAK+2 )
|
||||
if ( wall[animwall[x].wallnum].extra >= 0 )
|
||||
wall[animwall[x].wallnum].picnum != W_SCREENBREAK+2)
|
||||
if (wall[animwall[x].wallnum].extra >= 0)
|
||||
wall[animwall[x].wallnum].picnum = wall[animwall[x].wallnum].extra;
|
||||
}
|
||||
else
|
||||
|
@ -1257,7 +1257,7 @@ void menus(void)
|
|||
gametext(160,99,tempbuf,0,2+8+16);
|
||||
gametext(160,99+9,"(Y/N)",0,2+8+16);
|
||||
|
||||
if ( KB_KeyPressed(sc_Space) || KB_KeyPressed(sc_Enter) || KB_KeyPressed(sc_kpad_Enter) || KB_KeyPressed(sc_Y) || LMB )
|
||||
if (KB_KeyPressed(sc_Space) || KB_KeyPressed(sc_Enter) || KB_KeyPressed(sc_kpad_Enter) || KB_KeyPressed(sc_Y) || LMB)
|
||||
{
|
||||
lastsavedpos = current_menu-1000;
|
||||
|
||||
|
@ -1271,7 +1271,7 @@ void menus(void)
|
|||
|
||||
if (ud.multimode > 1)
|
||||
{
|
||||
if ( ps[myconnectindex].gm&MODE_GAME )
|
||||
if (ps[myconnectindex].gm&MODE_GAME)
|
||||
{
|
||||
loadplayer(-1-lastsavedpos);
|
||||
ps[myconnectindex].gm = MODE_GAME;
|
||||
|
@ -1302,7 +1302,7 @@ void menus(void)
|
|||
|
||||
break;
|
||||
}
|
||||
if ( KB_KeyPressed(sc_N) || KB_KeyPressed(sc_Escape) || RMB)
|
||||
if (KB_KeyPressed(sc_N) || KB_KeyPressed(sc_Escape) || RMB)
|
||||
{
|
||||
KB_ClearKeyDown(sc_N);
|
||||
KB_ClearKeyDown(sc_Escape);
|
||||
|
@ -1325,12 +1325,12 @@ void menus(void)
|
|||
|
||||
case 1500:
|
||||
|
||||
if ( KB_KeyPressed(sc_Space) || KB_KeyPressed(sc_Enter) || KB_KeyPressed(sc_kpad_Enter) || KB_KeyPressed(sc_Y) || LMB )
|
||||
if (KB_KeyPressed(sc_Space) || KB_KeyPressed(sc_Enter) || KB_KeyPressed(sc_kpad_Enter) || KB_KeyPressed(sc_Y) || LMB)
|
||||
{
|
||||
KB_FlushKeyboardQueue();
|
||||
cmenu(100);
|
||||
}
|
||||
if ( KB_KeyPressed(sc_N) || KB_KeyPressed(sc_Escape) || RMB)
|
||||
if (KB_KeyPressed(sc_N) || KB_KeyPressed(sc_Escape) || RMB)
|
||||
{
|
||||
KB_ClearKeyDown(sc_N);
|
||||
KB_ClearKeyDown(sc_Escape);
|
||||
|
@ -1379,7 +1379,7 @@ void menus(void)
|
|||
gametext(160,90,"OVERWRITE previous SAVED game?",0,2+8+16);
|
||||
gametext(160,90+9,"(Y/N)",0,2+8+16);
|
||||
|
||||
if ( KB_KeyPressed(sc_Space) || KB_KeyPressed(sc_Enter) || KB_KeyPressed(sc_kpad_Enter) || KB_KeyPressed(sc_Y) || LMB )
|
||||
if (KB_KeyPressed(sc_Space) || KB_KeyPressed(sc_Enter) || KB_KeyPressed(sc_kpad_Enter) || KB_KeyPressed(sc_Y) || LMB)
|
||||
{
|
||||
inputloc = strlen(&ud.savegame[current_menu-2000][0]);
|
||||
|
||||
|
@ -1388,7 +1388,7 @@ void menus(void)
|
|||
KB_FlushKeyboardQueue();
|
||||
break;
|
||||
}
|
||||
if ( KB_KeyPressed(sc_N) || KB_KeyPressed(sc_Escape) || RMB)
|
||||
if (KB_KeyPressed(sc_N) || KB_KeyPressed(sc_Escape) || RMB)
|
||||
{
|
||||
KB_ClearKeyDown(sc_N);
|
||||
KB_ClearKeyDown(sc_Escape);
|
||||
|
@ -1422,11 +1422,11 @@ void menus(void)
|
|||
|
||||
if (KB_KeyPressed(sc_Escape)) { cmenu(0); break; }
|
||||
|
||||
if ( KB_KeyPressed( sc_LeftArrow ) ||
|
||||
KB_KeyPressed( sc_kpad_4 ) ||
|
||||
KB_KeyPressed( sc_UpArrow ) ||
|
||||
KB_KeyPressed( sc_PgUp ) ||
|
||||
KB_KeyPressed( sc_kpad_8 ) )
|
||||
if (KB_KeyPressed(sc_LeftArrow) ||
|
||||
KB_KeyPressed(sc_kpad_4) ||
|
||||
KB_KeyPressed(sc_UpArrow) ||
|
||||
KB_KeyPressed(sc_PgUp) ||
|
||||
KB_KeyPressed(sc_kpad_8))
|
||||
{
|
||||
KB_ClearKeyDown(sc_LeftArrow);
|
||||
KB_ClearKeyDown(sc_kpad_4);
|
||||
|
@ -1439,15 +1439,15 @@ void menus(void)
|
|||
if (current_menu < 990) current_menu = 990+l;
|
||||
}
|
||||
else if (
|
||||
KB_KeyPressed( sc_PgDn ) ||
|
||||
KB_KeyPressed( sc_Enter ) ||
|
||||
KB_KeyPressed( sc_Space ) ||
|
||||
KB_KeyPressed( sc_kpad_Enter ) ||
|
||||
KB_KeyPressed( sc_RightArrow ) ||
|
||||
KB_KeyPressed( sc_DownArrow ) ||
|
||||
KB_KeyPressed( sc_kpad_2 ) ||
|
||||
KB_KeyPressed( sc_kpad_9 ) ||
|
||||
KB_KeyPressed( sc_kpad_6 ) )
|
||||
KB_KeyPressed(sc_PgDn) ||
|
||||
KB_KeyPressed(sc_Enter) ||
|
||||
KB_KeyPressed(sc_Space) ||
|
||||
KB_KeyPressed(sc_kpad_Enter) ||
|
||||
KB_KeyPressed(sc_RightArrow) ||
|
||||
KB_KeyPressed(sc_DownArrow) ||
|
||||
KB_KeyPressed(sc_kpad_2) ||
|
||||
KB_KeyPressed(sc_kpad_9) ||
|
||||
KB_KeyPressed(sc_kpad_6))
|
||||
{
|
||||
KB_ClearKeyDown(sc_PgDn);
|
||||
KB_ClearKeyDown(sc_Enter);
|
||||
|
@ -1663,13 +1663,13 @@ cheat_for_port_credits:
|
|||
x = probe(c,67,16,6);
|
||||
if (x >= 0)
|
||||
{
|
||||
if ( ud.multimode > 1 && x == 0 && ud.recstat != 2)
|
||||
if (ud.multimode > 1 && x == 0 && ud.recstat != 2)
|
||||
{
|
||||
if ( movesperpacket == 4 && myconnectindex != connecthead )
|
||||
if (movesperpacket == 4 && myconnectindex != connecthead)
|
||||
break;
|
||||
|
||||
last_zero = 0;
|
||||
cmenu( 600 );
|
||||
cmenu(600);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1711,7 +1711,7 @@ cheat_for_port_credits:
|
|||
|
||||
if (movesperpacket == 4)
|
||||
{
|
||||
if ( myconnectindex == connecthead )
|
||||
if (myconnectindex == connecthead)
|
||||
menutext(c,67,MENUHIGHLIGHT(0),PHX(-2),"NEW GAME");
|
||||
else
|
||||
menutext(c,67,MENUHIGHLIGHT(0),1,"NEW GAME");
|
||||
|
@ -1806,7 +1806,7 @@ cheat_for_port_credits:
|
|||
break;
|
||||
}
|
||||
|
||||
if ( KB_KeyPressed(sc_Q) )
|
||||
if (KB_KeyPressed(sc_Q))
|
||||
cmenu(500);
|
||||
|
||||
if (movesperpacket == 4 && connecthead != myconnectindex)
|
||||
|
@ -1980,15 +1980,15 @@ cheat_for_port_credits:
|
|||
}
|
||||
}
|
||||
|
||||
if ( KB_KeyPressed( sc_LeftArrow ) || KB_KeyPressed( sc_kpad_4 ) || ((buttonstat&1) && minfo.dyaw < -256 ) ||
|
||||
KB_KeyPressed( sc_RightArrow ) || KB_KeyPressed( sc_kpad_6 ) || ((buttonstat&1) && minfo.dyaw > 256 ) ||
|
||||
KB_KeyPressed( sc_Tab ) )
|
||||
if (KB_KeyPressed(sc_LeftArrow) || KB_KeyPressed(sc_kpad_4) || ((buttonstat&1) && minfo.dyaw < -256) ||
|
||||
KB_KeyPressed(sc_RightArrow) || KB_KeyPressed(sc_kpad_6) || ((buttonstat&1) && minfo.dyaw > 256) ||
|
||||
KB_KeyPressed(sc_Tab))
|
||||
{
|
||||
KB_ClearKeyDown( sc_LeftArrow );
|
||||
KB_ClearKeyDown( sc_kpad_4 );
|
||||
KB_ClearKeyDown( sc_RightArrow );
|
||||
KB_ClearKeyDown( sc_kpad_6 );
|
||||
KB_ClearKeyDown( sc_Tab );
|
||||
KB_ClearKeyDown(sc_LeftArrow);
|
||||
KB_ClearKeyDown(sc_kpad_4);
|
||||
KB_ClearKeyDown(sc_RightArrow);
|
||||
KB_ClearKeyDown(sc_kpad_6);
|
||||
KB_ClearKeyDown(sc_Tab);
|
||||
currentlist = 1-currentlist;
|
||||
sound(KICK_HIT);
|
||||
}
|
||||
|
@ -2331,10 +2331,10 @@ cheat_for_port_credits:
|
|||
case 10:
|
||||
if (x==io) {
|
||||
enabled = !((ps[myconnectindex].gm&MODE_GAME) && ud.m_recstat != 1);
|
||||
if ( (ps[myconnectindex].gm&MODE_GAME) ) closedemowrite();
|
||||
if ((ps[myconnectindex].gm&MODE_GAME)) closedemowrite();
|
||||
else ud.m_recstat = !ud.m_recstat;
|
||||
}
|
||||
if ( (ps[myconnectindex].gm&MODE_GAME) && ud.m_recstat != 1 )
|
||||
if ((ps[myconnectindex].gm&MODE_GAME) && ud.m_recstat != 1)
|
||||
enabled = 0;
|
||||
gametextpal(d,yy,ud.m_recstat?((ud.m_recstat && enabled && ps[myconnectindex].gm&MODE_GAME)?"Recording":"On"):"Off",enabled?MENUHIGHLIGHT(io):15,enabled?0:1); break;
|
||||
case 11:
|
||||
|
@ -2817,21 +2817,21 @@ cheat_for_port_credits:
|
|||
else if (m + 13 >= NUMGAMEFUNCTIONS) m = NUMGAMEFUNCTIONS-13;
|
||||
|
||||
if (probey == gamefunc_Show_Console) currentlist = 0;
|
||||
else if (KB_KeyPressed( sc_LeftArrow ) || KB_KeyPressed( sc_kpad_4 ) ||
|
||||
KB_KeyPressed( sc_RightArrow ) || KB_KeyPressed( sc_kpad_6 ) ||
|
||||
KB_KeyPressed( sc_Tab )) {
|
||||
else if (KB_KeyPressed(sc_LeftArrow) || KB_KeyPressed(sc_kpad_4) ||
|
||||
KB_KeyPressed(sc_RightArrow) || KB_KeyPressed(sc_kpad_6) ||
|
||||
KB_KeyPressed(sc_Tab)) {
|
||||
currentlist ^= 1;
|
||||
KB_ClearKeyDown( sc_LeftArrow );
|
||||
KB_ClearKeyDown( sc_RightArrow );
|
||||
KB_ClearKeyDown( sc_kpad_4 );
|
||||
KB_ClearKeyDown( sc_kpad_6 );
|
||||
KB_ClearKeyDown( sc_Tab );
|
||||
KB_ClearKeyDown(sc_LeftArrow);
|
||||
KB_ClearKeyDown(sc_RightArrow);
|
||||
KB_ClearKeyDown(sc_kpad_4);
|
||||
KB_ClearKeyDown(sc_kpad_6);
|
||||
KB_ClearKeyDown(sc_Tab);
|
||||
sound(KICK_HIT);
|
||||
} else if (KB_KeyPressed( sc_Delete )) {
|
||||
} else if (KB_KeyPressed(sc_Delete)) {
|
||||
KeyboardKeys[probey][currentlist] = 0;
|
||||
CONTROL_MapKey( probey, KeyboardKeys[probey][0], KeyboardKeys[probey][1] );
|
||||
CONTROL_MapKey(probey, KeyboardKeys[probey][0], KeyboardKeys[probey][1]);
|
||||
sound(KICK_HIT);
|
||||
KB_ClearKeyDown( sc_Delete );
|
||||
KB_ClearKeyDown(sc_Delete);
|
||||
}
|
||||
|
||||
for (l=0; l < min(13,NUMGAMEFUNCTIONS); l++) {
|
||||
|
@ -2872,8 +2872,8 @@ cheat_for_port_credits:
|
|||
gametext(320>>1,90+9+9+9,"PRESS \"ESCAPE\" TO CANCEL",0,2+8+16);
|
||||
|
||||
sc = KB_GetLastScanCode();
|
||||
if ( sc != sc_None ) {
|
||||
if ( sc == sc_Escape ) {
|
||||
if (sc != sc_None) {
|
||||
if (sc == sc_Escape) {
|
||||
sound(EXITMENUSOUND);
|
||||
} else {
|
||||
sound(PISTOL_BODYHIT);
|
||||
|
@ -2882,7 +2882,7 @@ cheat_for_port_credits:
|
|||
if (function == gamefunc_Show_Console)
|
||||
OSD_CaptureKey(KB_GetLastScanCode());
|
||||
else
|
||||
CONTROL_MapKey( function, KeyboardKeys[function][0], KeyboardKeys[function][1] );
|
||||
CONTROL_MapKey(function, KeyboardKeys[function][0], KeyboardKeys[function][1]);
|
||||
}
|
||||
|
||||
cmenu(204);
|
||||
|
@ -2970,7 +2970,7 @@ cheat_for_port_credits:
|
|||
short sense;
|
||||
sense = CONTROL_GetMouseSensitivity()-1;
|
||||
barsm(248,128,&sense,2,x==(MAXMOUSEBUTTONS-2)*2+2,MENUHIGHLIGHT((MAXMOUSEBUTTONS-2)*2+2),PHX(-7));
|
||||
CONTROL_SetMouseSensitivity( sense+1 );
|
||||
CONTROL_SetMouseSensitivity(sense+1);
|
||||
}
|
||||
|
||||
if (!ud.mouseaiming) modval(0,1,(int *)&myaimmode,1,probey == (MAXMOUSEBUTTONS-2)*2+2+1);
|
||||
|
@ -3015,10 +3015,10 @@ cheat_for_port_credits:
|
|||
if (function == 0) {
|
||||
if (whichkey < (MAXMOUSEBUTTONS-2)*2) {
|
||||
MouseFunctions[whichkey>>1][whichkey&1] = x;
|
||||
CONTROL_MapButton( x, whichkey>>1, whichkey&1, controldevice_mouse);
|
||||
CONTROL_MapButton(x, whichkey>>1, whichkey&1, controldevice_mouse);
|
||||
} else {
|
||||
MouseFunctions[whichkey-(MAXMOUSEBUTTONS-2)][0] = x;
|
||||
CONTROL_MapButton( x, whichkey-(MAXMOUSEBUTTONS-2), 0, controldevice_mouse);
|
||||
CONTROL_MapButton(x, whichkey-(MAXMOUSEBUTTONS-2), 0, controldevice_mouse);
|
||||
}
|
||||
cmenu(205);
|
||||
probey = whichkey;
|
||||
|
@ -3030,10 +3030,10 @@ cheat_for_port_credits:
|
|||
} else if (function == 2) {
|
||||
if (whichkey < 2*joynumbuttons) {
|
||||
JoystickFunctions[whichkey>>1][whichkey&1] = x;
|
||||
CONTROL_MapButton( x, whichkey>>1, whichkey&1, controldevice_joystick);
|
||||
CONTROL_MapButton(x, whichkey>>1, whichkey&1, controldevice_joystick);
|
||||
} else {
|
||||
JoystickFunctions[joynumbuttons + (whichkey-2*joynumbuttons)][0] = x;
|
||||
CONTROL_MapButton( x, joynumbuttons + (whichkey-2*joynumbuttons), 0, controldevice_joystick);
|
||||
CONTROL_MapButton(x, joynumbuttons + (whichkey-2*joynumbuttons), 0, controldevice_joystick);
|
||||
}
|
||||
cmenu(207);
|
||||
probey = whichkey;
|
||||
|
@ -3077,8 +3077,8 @@ cheat_for_port_credits:
|
|||
|
||||
gametext(320>>1,31+9,tempbuf,0,2+8+16);
|
||||
|
||||
if (KB_KeyPressed( sc_End )) { KB_ClearKeyDown(sc_End); probey = NUMGAMEFUNCTIONS-1; sound(KICK_HIT); }
|
||||
else if (KB_KeyPressed( sc_Home )) { KB_ClearKeyDown(sc_Home); probey = 0; sound(KICK_HIT); }
|
||||
if (KB_KeyPressed(sc_End)) { KB_ClearKeyDown(sc_End); probey = NUMGAMEFUNCTIONS-1; sound(KICK_HIT); }
|
||||
else if (KB_KeyPressed(sc_Home)) { KB_ClearKeyDown(sc_Home); probey = 0; sound(KICK_HIT); }
|
||||
|
||||
m = probey - 6;
|
||||
if (m < 0) m = 0;
|
||||
|
@ -3149,7 +3149,7 @@ cheat_for_port_credits:
|
|||
bar(c+160+40,46,(short *)&l,1,x==0,MENUHIGHLIGHT(0),0);
|
||||
l = (l<<13)-262144;
|
||||
if (l != MouseAnalogueScale[0]) {
|
||||
CONTROL_SetAnalogAxisScale( 0, l, controldevice_mouse );
|
||||
CONTROL_SetAnalogAxisScale(0, l, controldevice_mouse);
|
||||
MouseAnalogueScale[0] = l;
|
||||
}
|
||||
Bsprintf(tempbuf,"%s%.2f",l>=0?" ":"",(float)l/65536.0);
|
||||
|
@ -3160,7 +3160,7 @@ cheat_for_port_credits:
|
|||
bar(c+160+40,46+16,(short *)&l,1,x==1,MENUHIGHLIGHT(1),0);
|
||||
l = (l<<13)-262144;
|
||||
if (l != MouseAnalogueScale[1]) {
|
||||
CONTROL_SetAnalogAxisScale( 1, l, controldevice_mouse );
|
||||
CONTROL_SetAnalogAxisScale(1, l, controldevice_mouse);
|
||||
MouseAnalogueScale[1] = l;
|
||||
}
|
||||
Bsprintf(tempbuf,"%s%.2f",l>=0?" ":"",(float)l/65536.0);
|
||||
|
@ -3349,7 +3349,7 @@ cheat_for_port_credits:
|
|||
if (thispage == ((joynumaxes+1)/2)-1) cmenu(208);
|
||||
else {
|
||||
if (current_menu == 209) cmenu(217);
|
||||
else cmenu( current_menu+1 );
|
||||
else cmenu(current_menu+1);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -3402,7 +3402,7 @@ cheat_for_port_credits:
|
|||
bar(140+56,38+8,(short *)&l,1,x==0,0,0);
|
||||
l = (l<<13)-262144;
|
||||
if (l != JoystickAnalogueScale[thispage*2]) {
|
||||
CONTROL_SetAnalogAxisScale( thispage*2, l, controldevice_joystick );
|
||||
CONTROL_SetAnalogAxisScale(thispage*2, l, controldevice_joystick);
|
||||
JoystickAnalogueScale[thispage*2] = l;
|
||||
}
|
||||
Bsprintf(tempbuf,"%s%.2f",l>=0?" ":"",(float)l/65536.0);
|
||||
|
@ -3426,10 +3426,10 @@ cheat_for_port_credits:
|
|||
minitext(140+12+72,38+15,tempbuf,0,10+16);
|
||||
|
||||
gametext(76,38+15+15,"ANALOG",0,2+8+16);
|
||||
if (CONFIG_AnalogNumToName( JoystickAnalogueAxes[thispage*2] )) {
|
||||
p = CONFIG_AnalogNumToName( JoystickAnalogueAxes[thispage*2] );
|
||||
if (CONFIG_AnalogNumToName(JoystickAnalogueAxes[thispage*2])) {
|
||||
p = CONFIG_AnalogNumToName(JoystickAnalogueAxes[thispage*2]);
|
||||
if (p) {
|
||||
gametext(140+12,38+15+15, strchr(p,'_')+1, 0, 2+8+16 );
|
||||
gametext(140+12,38+15+15, strchr(p,'_')+1, 0, 2+8+16);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3439,7 +3439,7 @@ cheat_for_port_credits:
|
|||
bar(140+56,38+8+64,(short *)&l,1,x==4,0,0);
|
||||
l = (l<<13)-262144;
|
||||
if (l != JoystickAnalogueScale[thispage*2+1]) {
|
||||
CONTROL_SetAnalogAxisScale( thispage*2+1, l, controldevice_joystick );
|
||||
CONTROL_SetAnalogAxisScale(thispage*2+1, l, controldevice_joystick);
|
||||
JoystickAnalogueScale[thispage*2+1] = l;
|
||||
}
|
||||
Bsprintf(tempbuf,"%s%.2f",l>=0?" ":"",(float)l/65536.0);
|
||||
|
@ -3463,10 +3463,10 @@ cheat_for_port_credits:
|
|||
minitext(140+12+72,38+15+64,tempbuf,0,10+16);
|
||||
|
||||
gametext(76,38+64+15+15,"ANALOG",0,2+8+16);
|
||||
if (CONFIG_AnalogNumToName( JoystickAnalogueAxes[thispage*2+1] )) {
|
||||
p = CONFIG_AnalogNumToName( JoystickAnalogueAxes[thispage*2+1] );
|
||||
if (CONFIG_AnalogNumToName(JoystickAnalogueAxes[thispage*2+1])) {
|
||||
p = CONFIG_AnalogNumToName(JoystickAnalogueAxes[thispage*2+1]);
|
||||
if (p) {
|
||||
gametext(140+12,38+64+15+15, strchr(p,'_')+1, 0, 2+8+16 );
|
||||
gametext(140+12,38+64+15+15, strchr(p,'_')+1, 0, 2+8+16);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3498,7 +3498,7 @@ cheat_for_port_credits:
|
|||
probey = 2;
|
||||
break;
|
||||
} else if (x==2*(last-first) && joynumaxes>4) {
|
||||
cmenu( (current_menu-213) == (joynumaxes/4) ? 213 : (current_menu+1) );
|
||||
cmenu((current_menu-213) == (joynumaxes/4) ? 213 : (current_menu+1));
|
||||
probey = 0;
|
||||
break;
|
||||
}
|
||||
|
@ -3539,7 +3539,7 @@ cheat_for_port_credits:
|
|||
c = (320>>1)-120;
|
||||
rotatesprite(320<<15,19<<16,65536L,0,MENUBAR,16,0,10,0,0,xdim-1,ydim-1);
|
||||
menutext(320>>1,24,0,0,"SOUND SETUP");
|
||||
onbar = ( probey == 2 || probey == 3 );
|
||||
onbar = (probey == 2 || probey == 3);
|
||||
|
||||
x = probe(c,50,16,7);
|
||||
switch (x)
|
||||
|
@ -3562,7 +3562,7 @@ cheat_for_port_credits:
|
|||
if (FXDevice >= 0)
|
||||
{
|
||||
SoundToggle = 1-SoundToggle;
|
||||
if ( SoundToggle == 0 )
|
||||
if (SoundToggle == 0)
|
||||
{
|
||||
FX_StopAllSounds();
|
||||
clearsoundlocks();
|
||||
|
@ -3574,7 +3574,7 @@ cheat_for_port_credits:
|
|||
if (MusicDevice >= 0 && (numplayers < 2 || MusicToggle))
|
||||
{
|
||||
MusicToggle = 1-MusicToggle;
|
||||
if ( MusicToggle == 0 ) MUSIC_Pause();
|
||||
if (MusicToggle == 0) MUSIC_Pause();
|
||||
else
|
||||
{
|
||||
if (ud.recstat != 2 && ps[myconnectindex].gm&MODE_GAME)
|
||||
|
@ -3621,7 +3621,7 @@ cheat_for_port_credits:
|
|||
if (l != FXVolume)
|
||||
FXVolume <<= 2;
|
||||
if (l != FXVolume)
|
||||
FX_SetVolume( (short) FXVolume );
|
||||
FX_SetVolume((short) FXVolume);
|
||||
}
|
||||
menutext(c,50+16,MENUHIGHLIGHT(1),(MusicDevice<0||(numplayers > 1 && !MusicToggle)),"MUSIC");
|
||||
menutext(c,50+16+16+16,MENUHIGHLIGHT(3),(MusicDevice<0)||MusicToggle==0,"MUSIC VOLUME");
|
||||
|
@ -3634,7 +3634,7 @@ cheat_for_port_credits:
|
|||
MusicToggle==0||(MusicDevice<0));
|
||||
MusicVolume <<= 2;
|
||||
if (l != MusicVolume)
|
||||
MUSIC_SetVolume( (short) MusicVolume );
|
||||
MUSIC_SetVolume((short) MusicVolume);
|
||||
|
||||
}
|
||||
menutext(c,50+16+16+16+16,MENUHIGHLIGHT(4),(FXDevice<0)||SoundToggle==0,"DUKE TALK");
|
||||
|
@ -3680,7 +3680,7 @@ cheat_for_port_credits:
|
|||
if (current_menu == 300) menutext(c,24,0,0,"LOAD GAME");
|
||||
else menutext(c,24,0,0,"SAVE GAME");
|
||||
|
||||
if (current_menu >= 360 && current_menu <= 369 )
|
||||
if (current_menu >= 360 && current_menu <= 369)
|
||||
{
|
||||
sprintf(tempbuf,"PLAYERS: %-2ld ",ud.multimode);
|
||||
gametext(160,156,tempbuf,0,2+8+16);
|
||||
|
@ -3689,7 +3689,7 @@ cheat_for_port_credits:
|
|||
if (ud.volume_number == 0 && ud.level_number == 7)
|
||||
gametext(160,180,boardfilename,0,2+8+16);
|
||||
|
||||
x = strget((320>>1),184,&ud.savegame[current_menu-360][0],19, 999 );
|
||||
x = strget((320>>1),184,&ud.savegame[current_menu-360][0],19, 999);
|
||||
|
||||
if (x == -1)
|
||||
{
|
||||
|
@ -3703,9 +3703,9 @@ cheat_for_port_credits:
|
|||
goto DISPLAYNAMES;
|
||||
}
|
||||
|
||||
if ( x == 1 )
|
||||
if (x == 1)
|
||||
{
|
||||
if ( ud.savegame[current_menu-360][0] == 0 )
|
||||
if (ud.savegame[current_menu-360][0] == 0)
|
||||
{
|
||||
KB_FlushKeyboardQueue();
|
||||
cmenu(351);
|
||||
|
@ -3740,9 +3740,9 @@ cheat_for_port_credits:
|
|||
|
||||
if (current_menu == 300)
|
||||
{
|
||||
if ( ud.savegame[probey][0] )
|
||||
if (ud.savegame[probey][0])
|
||||
{
|
||||
if ( lastprobey != probey )
|
||||
if (lastprobey != probey)
|
||||
{
|
||||
loadpheader(probey,&savehead);
|
||||
lastprobey = probey;
|
||||
|
@ -3760,7 +3760,7 @@ cheat_for_port_credits:
|
|||
}
|
||||
else
|
||||
{
|
||||
if ( ud.savegame[probey][0] )
|
||||
if (ud.savegame[probey][0])
|
||||
{
|
||||
if (lastprobey != probey)
|
||||
loadpheader(probey,&savehead);
|
||||
|
@ -3776,12 +3776,12 @@ cheat_for_port_credits:
|
|||
gametext(160,180,boardfilename,0,2+8+16);
|
||||
}
|
||||
|
||||
switch ( x )
|
||||
switch (x)
|
||||
{
|
||||
case -1:
|
||||
if (current_menu == 300)
|
||||
{
|
||||
if ( (ps[myconnectindex].gm&MODE_GAME) != MODE_GAME)
|
||||
if ((ps[myconnectindex].gm&MODE_GAME) != MODE_GAME)
|
||||
{
|
||||
cmenu(0);
|
||||
break;
|
||||
|
@ -3809,14 +3809,14 @@ cheat_for_port_credits:
|
|||
case 7:
|
||||
case 8:
|
||||
case 9:
|
||||
if ( current_menu == 300)
|
||||
if (current_menu == 300)
|
||||
{
|
||||
if ( ud.savegame[x][0] )
|
||||
if (ud.savegame[x][0])
|
||||
current_menu = (1000+x);
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( ud.savegame[x][0] != 0)
|
||||
if (ud.savegame[x][0] != 0)
|
||||
current_menu = 2000+x;
|
||||
else
|
||||
{
|
||||
|
@ -3841,11 +3841,11 @@ DISPLAYNAMES:
|
|||
|
||||
c = 320>>1;
|
||||
|
||||
if ( KB_KeyPressed( sc_LeftArrow ) ||
|
||||
KB_KeyPressed( sc_kpad_4 ) ||
|
||||
KB_KeyPressed( sc_UpArrow ) ||
|
||||
KB_KeyPressed( sc_PgUp ) ||
|
||||
KB_KeyPressed( sc_kpad_8 ) )
|
||||
if (KB_KeyPressed(sc_LeftArrow) ||
|
||||
KB_KeyPressed(sc_kpad_4) ||
|
||||
KB_KeyPressed(sc_UpArrow) ||
|
||||
KB_KeyPressed(sc_PgUp) ||
|
||||
KB_KeyPressed(sc_kpad_8))
|
||||
{
|
||||
KB_ClearKeyDown(sc_LeftArrow);
|
||||
KB_ClearKeyDown(sc_kpad_4);
|
||||
|
@ -3858,15 +3858,15 @@ DISPLAYNAMES:
|
|||
if (current_menu < 400) current_menu = 403;
|
||||
}
|
||||
else if (
|
||||
KB_KeyPressed( sc_PgDn ) ||
|
||||
KB_KeyPressed( sc_Enter ) ||
|
||||
KB_KeyPressed( sc_kpad_Enter ) ||
|
||||
KB_KeyPressed( sc_RightArrow ) ||
|
||||
KB_KeyPressed( sc_DownArrow ) ||
|
||||
KB_KeyPressed( sc_kpad_2 ) ||
|
||||
KB_KeyPressed( sc_kpad_9 ) ||
|
||||
KB_KeyPressed( sc_Space ) ||
|
||||
KB_KeyPressed( sc_kpad_6 ) )
|
||||
KB_KeyPressed(sc_PgDn) ||
|
||||
KB_KeyPressed(sc_Enter) ||
|
||||
KB_KeyPressed(sc_kpad_Enter) ||
|
||||
KB_KeyPressed(sc_RightArrow) ||
|
||||
KB_KeyPressed(sc_DownArrow) ||
|
||||
KB_KeyPressed(sc_kpad_2) ||
|
||||
KB_KeyPressed(sc_kpad_9) ||
|
||||
KB_KeyPressed(sc_Space) ||
|
||||
KB_KeyPressed(sc_kpad_6))
|
||||
{
|
||||
KB_ClearKeyDown(sc_PgDn);
|
||||
KB_ClearKeyDown(sc_Enter);
|
||||
|
@ -3882,7 +3882,7 @@ DISPLAYNAMES:
|
|||
if (current_menu > 403) current_menu = 400;
|
||||
}
|
||||
|
||||
if ( KB_KeyPressed(sc_Escape) )
|
||||
if (KB_KeyPressed(sc_Escape))
|
||||
{
|
||||
if (ps[myconnectindex].gm&MODE_GAME)
|
||||
cmenu(50);
|
||||
|
@ -3898,11 +3898,11 @@ VOLUME_ALL_40x:
|
|||
|
||||
c = 320>>1;
|
||||
|
||||
if ( KB_KeyPressed( sc_LeftArrow ) ||
|
||||
KB_KeyPressed( sc_kpad_4 ) ||
|
||||
KB_KeyPressed( sc_UpArrow ) ||
|
||||
KB_KeyPressed( sc_PgUp ) ||
|
||||
KB_KeyPressed( sc_kpad_8 ) )
|
||||
if (KB_KeyPressed(sc_LeftArrow) ||
|
||||
KB_KeyPressed(sc_kpad_4) ||
|
||||
KB_KeyPressed(sc_UpArrow) ||
|
||||
KB_KeyPressed(sc_PgUp) ||
|
||||
KB_KeyPressed(sc_kpad_8))
|
||||
{
|
||||
KB_ClearKeyDown(sc_LeftArrow);
|
||||
KB_ClearKeyDown(sc_kpad_4);
|
||||
|
@ -3915,15 +3915,15 @@ VOLUME_ALL_40x:
|
|||
if (current_menu < 400) current_menu = 401;
|
||||
}
|
||||
else if (
|
||||
KB_KeyPressed( sc_PgDn ) ||
|
||||
KB_KeyPressed( sc_Enter ) ||
|
||||
KB_KeyPressed( sc_kpad_Enter ) ||
|
||||
KB_KeyPressed( sc_RightArrow ) ||
|
||||
KB_KeyPressed( sc_DownArrow ) ||
|
||||
KB_KeyPressed( sc_kpad_2 ) ||
|
||||
KB_KeyPressed( sc_kpad_9 ) ||
|
||||
KB_KeyPressed( sc_Space ) ||
|
||||
KB_KeyPressed( sc_kpad_6 ) )
|
||||
KB_KeyPressed(sc_PgDn) ||
|
||||
KB_KeyPressed(sc_Enter) ||
|
||||
KB_KeyPressed(sc_kpad_Enter) ||
|
||||
KB_KeyPressed(sc_RightArrow) ||
|
||||
KB_KeyPressed(sc_DownArrow) ||
|
||||
KB_KeyPressed(sc_kpad_2) ||
|
||||
KB_KeyPressed(sc_kpad_9) ||
|
||||
KB_KeyPressed(sc_Space) ||
|
||||
KB_KeyPressed(sc_kpad_6))
|
||||
{
|
||||
KB_ClearKeyDown(sc_PgDn);
|
||||
KB_ClearKeyDown(sc_Enter);
|
||||
|
@ -3939,7 +3939,7 @@ VOLUME_ALL_40x:
|
|||
if (current_menu > 401) current_menu = 400;
|
||||
}
|
||||
|
||||
if ( KB_KeyPressed(sc_Escape) )
|
||||
if (KB_KeyPressed(sc_Escape))
|
||||
{
|
||||
if (ps[myconnectindex].gm&MODE_GAME)
|
||||
cmenu(50);
|
||||
|
@ -3967,7 +3967,7 @@ VOLUME_ALL_40x:
|
|||
gametext(c,90,"Are you sure you want to quit?",0,2+8+16);
|
||||
gametext(c,99,"(Y/N)",0,2+8+16);
|
||||
|
||||
if ( KB_KeyPressed(sc_Space) || KB_KeyPressed(sc_Enter) || KB_KeyPressed(sc_kpad_Enter) || KB_KeyPressed(sc_Y) || LMB )
|
||||
if (KB_KeyPressed(sc_Space) || KB_KeyPressed(sc_Enter) || KB_KeyPressed(sc_kpad_Enter) || KB_KeyPressed(sc_Y) || LMB)
|
||||
{
|
||||
KB_FlushKeyboardQueue();
|
||||
|
||||
|
@ -3979,7 +3979,7 @@ VOLUME_ALL_40x:
|
|||
{
|
||||
KB_ClearKeyDown(sc_N);
|
||||
quittimer = 0;
|
||||
if ( ps[myconnectindex].gm&MODE_DEMO && ud.recstat == 2 )
|
||||
if (ps[myconnectindex].gm&MODE_DEMO && ud.recstat == 2)
|
||||
ps[myconnectindex].gm = MODE_DEMO;
|
||||
else
|
||||
{
|
||||
|
@ -4005,7 +4005,7 @@ VOLUME_ALL_40x:
|
|||
gametext(c,90,"Quit to Title?",0,2+8+16);
|
||||
gametext(c,99,"(Y/N)",0,2+8+16);
|
||||
|
||||
if ( KB_KeyPressed(sc_Space) || KB_KeyPressed(sc_Enter) || KB_KeyPressed(sc_kpad_Enter) || KB_KeyPressed(sc_Y) || LMB )
|
||||
if (KB_KeyPressed(sc_Space) || KB_KeyPressed(sc_Enter) || KB_KeyPressed(sc_kpad_Enter) || KB_KeyPressed(sc_Y) || LMB)
|
||||
{
|
||||
KB_FlushKeyboardQueue();
|
||||
ps[myconnectindex].gm = MODE_DEMO;
|
||||
|
@ -4037,7 +4037,7 @@ VOLUME_ALL_40x:
|
|||
gametext(160,50,tempbuf,0,2+8+16);
|
||||
gametext(160,59,"to select level",0,2+8+16);
|
||||
|
||||
if ( KB_KeyPressed(sc_Escape) )
|
||||
if (KB_KeyPressed(sc_Escape))
|
||||
{
|
||||
KB_ClearKeyDown(sc_Escape);
|
||||
sound(EXITMENUSOUND);
|
||||
|
@ -4097,7 +4097,7 @@ VOLUME_ALL_40x:
|
|||
tempbuf[2] = ud.m_volume_number;
|
||||
tempbuf[3] = ud.m_player_skill+1;
|
||||
|
||||
if ( ud.m_player_skill == 3 ) ud.m_respawn_monsters = 1;
|
||||
if (ud.m_player_skill == 3) ud.m_respawn_monsters = 1;
|
||||
else ud.m_respawn_monsters = 0;
|
||||
|
||||
if ((gametype_flags[ud.m_coop] & GAMETYPE_FLAG_ITEMRESPAWN)) ud.m_respawn_items = 1;
|
||||
|
@ -4323,7 +4323,7 @@ VOLUME_ALL_40x:
|
|||
|
||||
if (VOLUMEALL) {
|
||||
menutext(c,57+16+16+16+16+16+16-9,MENUHIGHLIGHT(6),0,"USER MAP");
|
||||
if ( boardfilename[0] != 0 )
|
||||
if (boardfilename[0] != 0)
|
||||
gametext(c+70+44,57+16+16+16+16+16,boardfilename,MENUHIGHLIGHT(6),2+8+16);
|
||||
} else {
|
||||
menutext(c,57+16+16+16+16+16+16-9,MENUHIGHLIGHT(6),1,"USER MAP");
|
||||
|
@ -4334,7 +4334,7 @@ VOLUME_ALL_40x:
|
|||
break;
|
||||
}
|
||||
|
||||
if ( (ps[myconnectindex].gm&MODE_MENU) != MODE_MENU)
|
||||
if ((ps[myconnectindex].gm&MODE_MENU) != MODE_MENU)
|
||||
{
|
||||
vscrn();
|
||||
cameraclock = totalclock;
|
||||
|
|
|
@ -120,7 +120,7 @@ int osdcmd_map(const osdfuncparm_t *parm)
|
|||
if (parm->numparms != 1) return OSDCMD_SHOWHELP;
|
||||
|
||||
strcpy(filename,parm->parms[0]);
|
||||
if ( strchr(filename,'.') == 0)
|
||||
if (strchr(filename,'.') == 0)
|
||||
strcat(filename,".map");
|
||||
|
||||
if ((i = kopen4load(filename,0)) < 0) {
|
||||
|
@ -655,7 +655,7 @@ int osdcmd_mpmap(const osdfuncparm_t *parm)
|
|||
if (parm->numparms != 1) return OSDCMD_SHOWHELP;
|
||||
|
||||
strcpy(filename,parm->parms[0]);
|
||||
if ( strchr(filename,'.') == 0)
|
||||
if (strchr(filename,'.') == 0)
|
||||
strcat(filename,".map");
|
||||
|
||||
if ((i = kopen4load(filename,0)) < 0) {
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -200,7 +200,7 @@ void cachegoodsprites(void)
|
|||
tloadtile(j,1);
|
||||
}
|
||||
tloadtile(BOTTOMSTATUSBAR,1);
|
||||
if ( ud.multimode > 1)
|
||||
if (ud.multimode > 1)
|
||||
tloadtile(FRAGBAR,1);
|
||||
|
||||
tloadtile(VIEWSCREEN,1);
|
||||
|
@ -211,21 +211,21 @@ void cachegoodsprites(void)
|
|||
|
||||
for (i=FOOTPRINTS;i<FOOTPRINTS+3;i++) tloadtile(i,1);
|
||||
|
||||
for ( i = BURNING; i < BURNING+14; i++) tloadtile(i,1);
|
||||
for ( i = BURNING2; i < BURNING2+14; i++) tloadtile(i,1);
|
||||
for (i = BURNING; i < BURNING+14; i++) tloadtile(i,1);
|
||||
for (i = BURNING2; i < BURNING2+14; i++) tloadtile(i,1);
|
||||
|
||||
for ( i = CRACKKNUCKLES; i < CRACKKNUCKLES+4; i++) tloadtile(i,1);
|
||||
for (i = CRACKKNUCKLES; i < CRACKKNUCKLES+4; i++) tloadtile(i,1);
|
||||
|
||||
for ( i = FIRSTGUN; i < FIRSTGUN+3 ; i++ ) tloadtile(i,1);
|
||||
for ( i = FIRSTGUNRELOAD; i < FIRSTGUNRELOAD+8 ; i++ ) tloadtile(i,1);
|
||||
for (i = FIRSTGUN; i < FIRSTGUN+3 ; i++) tloadtile(i,1);
|
||||
for (i = FIRSTGUNRELOAD; i < FIRSTGUNRELOAD+8 ; i++) tloadtile(i,1);
|
||||
|
||||
for ( i = EXPLOSION2; i < EXPLOSION2+21 ; i++ ) tloadtile(i,1);
|
||||
for (i = EXPLOSION2; i < EXPLOSION2+21 ; i++) tloadtile(i,1);
|
||||
|
||||
tloadtile(BULLETHOLE,1);
|
||||
for ( i = SMALLSMOKE; i < (SMALLSMOKE+4); i++) tloadtile(i,1);
|
||||
for (i = SMALLSMOKE; i < (SMALLSMOKE+4); i++) tloadtile(i,1);
|
||||
|
||||
for ( i = JIBS1; i < (JIBS5+5); i++) tloadtile(i,1);
|
||||
for ( i = SCRAP1; i < (SCRAP1+19); i++) tloadtile(i,1);
|
||||
for (i = JIBS1; i < (JIBS5+5); i++) tloadtile(i,1);
|
||||
for (i = SCRAP1; i < (SCRAP1+19); i++) tloadtile(i,1);
|
||||
|
||||
for (i=RPG; i<RPG+7; i++) tloadtile(i,1);
|
||||
for (i=FREEZEBLAST; i<FREEZEBLAST+3; i++) tloadtile(i,1);
|
||||
|
@ -247,18 +247,18 @@ char getsound(unsigned short num)
|
|||
fp = kopen4load(sounds[num],loadfromgrouponly);
|
||||
if (fp == -1) return 0;
|
||||
|
||||
l = kfilelength( fp );
|
||||
l = kfilelength(fp);
|
||||
soundsiz[num] = l;
|
||||
|
||||
if ( (ud.level_number == 0 && ud.volume_number == 0 && (num == 189 || num == 232 || num == 99 || num == 233 || num == 17 ) ) ||
|
||||
( l < 12288 ) )
|
||||
if ((ud.level_number == 0 && ud.volume_number == 0 && (num == 189 || num == 232 || num == 99 || num == 233 || num == 17)) ||
|
||||
(l < 12288))
|
||||
{
|
||||
Sound[num].lock = 199;
|
||||
allocache((long *)&Sound[num].ptr,l,(char *)&Sound[num].lock);
|
||||
if (Sound[num].ptr != NULL)
|
||||
kread( fp, Sound[num].ptr , l);
|
||||
kread(fp, Sound[num].ptr , l);
|
||||
}
|
||||
kclose( fp );
|
||||
kclose(fp);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -273,7 +273,7 @@ void precachenecessarysounds(void)
|
|||
if (Sound[i].ptr == 0)
|
||||
{
|
||||
j++;
|
||||
if ( (j&7) == 0 )
|
||||
if ((j&7) == 0)
|
||||
{ handleevents(); getpackets(); }
|
||||
getsound(i);
|
||||
}
|
||||
|
@ -305,9 +305,9 @@ void cacheit(void)
|
|||
|
||||
for (i=0;i<numsectors;i++)
|
||||
{
|
||||
tloadtile( sector[i].floorpicnum, 0 );
|
||||
tloadtile( sector[i].ceilingpicnum, 0 );
|
||||
if ( sector[i].ceilingpicnum == LA) // JBF 20040509: if( waloff[sector[i].ceilingpicnum] == LA) WTF??!??!?!?
|
||||
tloadtile(sector[i].floorpicnum, 0);
|
||||
tloadtile(sector[i].ceilingpicnum, 0);
|
||||
if (sector[i].ceilingpicnum == LA) // JBF 20040509: if( waloff[sector[i].ceilingpicnum] == LA) WTF??!??!?!?
|
||||
{
|
||||
tloadtile(LA+1, 0);
|
||||
tloadtile(LA+2, 0);
|
||||
|
@ -392,7 +392,7 @@ void vscrn(void)
|
|||
x2 = xdim-x1;
|
||||
|
||||
y1 = ss; y2 = 200;
|
||||
if ( ud.screen_size > 0 && (gametype_flags[ud.coop]&GAMETYPE_FLAG_FRAGBAR) && ud.multimode > 1)
|
||||
if (ud.screen_size > 0 && (gametype_flags[ud.coop]&GAMETYPE_FLAG_FRAGBAR) && ud.multimode > 1)
|
||||
{
|
||||
j = 0;
|
||||
for (i=connecthead;i>=0;i=connectpoint2[i])
|
||||
|
@ -423,7 +423,7 @@ void pickrandomspot(short snum)
|
|||
|
||||
p = &ps[snum];
|
||||
|
||||
if ( ud.multimode > 1 && !(gametype_flags[ud.coop] & GAMETYPE_FLAG_FIXEDRESPAWN))
|
||||
if (ud.multimode > 1 && !(gametype_flags[ud.coop] & GAMETYPE_FLAG_FIXEDRESPAWN))
|
||||
{
|
||||
if (gametype_flags[ud.coop] & GAMETYPE_FLAG_TDMSPAWN)
|
||||
{
|
||||
|
@ -513,7 +513,7 @@ void resetplayerstats(short snum)
|
|||
p->sbs = 0;
|
||||
p->palette = (char *) &palette[0];
|
||||
|
||||
if (p->steroids_amount < 400 )
|
||||
if (p->steroids_amount < 400)
|
||||
{
|
||||
p->steroids_amount = 0;
|
||||
p->inven_icon = 0;
|
||||
|
@ -540,8 +540,8 @@ void resetplayerstats(short snum)
|
|||
|
||||
p->on_crane = -1;
|
||||
|
||||
if ( (aplWeaponWorksLike[p->curr_weapon][snum] == PISTOL_WEAPON) &&
|
||||
(aplWeaponReload[p->curr_weapon][snum] > aplWeaponTotalTime[p->curr_weapon][snum]) )
|
||||
if ((aplWeaponWorksLike[p->curr_weapon][snum] == PISTOL_WEAPON) &&
|
||||
(aplWeaponReload[p->curr_weapon][snum] > aplWeaponTotalTime[p->curr_weapon][snum]))
|
||||
p->kickback_pic = aplWeaponTotalTime[p->curr_weapon][snum]+1;
|
||||
else p->kickback_pic = 0;
|
||||
|
||||
|
@ -568,9 +568,9 @@ void resetweapons(short snum)
|
|||
|
||||
p = &ps[snum];
|
||||
|
||||
for ( weapon = PISTOL_WEAPON; weapon < MAX_WEAPONS; weapon++ )
|
||||
for (weapon = PISTOL_WEAPON; weapon < MAX_WEAPONS; weapon++)
|
||||
p->gotweapon[weapon] = 0;
|
||||
for ( weapon = PISTOL_WEAPON; weapon < MAX_WEAPONS; weapon++ )
|
||||
for (weapon = PISTOL_WEAPON; weapon < MAX_WEAPONS; weapon++)
|
||||
p->ammo_amount[weapon] = 0;
|
||||
|
||||
p->weapon_pos = 6;
|
||||
|
@ -655,7 +655,7 @@ void resetprestat(short snum,char g)
|
|||
numinterpolations = 0;
|
||||
startofdynamicinterpolations = 0;
|
||||
|
||||
if ( ( (g&MODE_EOL) != MODE_EOL && numplayers < 2) || (!(gametype_flags[ud.coop]&GAMETYPE_FLAG_PRESERVEINVENTORYDEATH) && numplayers > 1) )
|
||||
if (((g&MODE_EOL) != MODE_EOL && numplayers < 2) || (!(gametype_flags[ud.coop]&GAMETYPE_FLAG_PRESERVEINVENTORYDEATH) && numplayers > 1))
|
||||
{
|
||||
resetweapons(snum);
|
||||
resetinventory(snum);
|
||||
|
@ -723,7 +723,7 @@ void prelevel(char g)
|
|||
{
|
||||
case 20:
|
||||
case 22:
|
||||
if ( sector[i].floorz > sector[i].ceilingz)
|
||||
if (sector[i].floorz > sector[i].ceilingz)
|
||||
sector[i].lotag |= 32768;
|
||||
continue;
|
||||
}
|
||||
|
@ -765,7 +765,7 @@ void prelevel(char g)
|
|||
nexti = nextspritestat[i];
|
||||
ResetActorGameVars(i);
|
||||
LoadActor(i, -1, -1);
|
||||
if (sprite[i].lotag == -1 && (sprite[i].cstat&16) )
|
||||
if (sprite[i].lotag == -1 && (sprite[i].cstat&16))
|
||||
{
|
||||
ps[0].exitx = SX;
|
||||
ps[0].exity = SY;
|
||||
|
@ -820,7 +820,7 @@ void prelevel(char g)
|
|||
for (i=0;i < MAXSPRITES;i++)
|
||||
if (sprite[i].statnum < MAXSTATUS)
|
||||
{
|
||||
if ( PN == SECTOREFFECTOR && SLT == 14 )
|
||||
if (PN == SECTOREFFECTOR && SLT == 14)
|
||||
spawn(-1,i);
|
||||
}
|
||||
|
||||
|
@ -845,10 +845,10 @@ void prelevel(char g)
|
|||
case LOCKSWITCH1__STATIC:
|
||||
case POWERSWITCH2__STATIC:
|
||||
for (j=0;j<lotaglist;j++)
|
||||
if ( SLT == lotags[j] )
|
||||
if (SLT == lotags[j])
|
||||
break;
|
||||
|
||||
if ( j == lotaglist )
|
||||
if (j == lotaglist)
|
||||
{
|
||||
lotags[lotaglist] = SLT;
|
||||
lotaglist++;
|
||||
|
@ -870,7 +870,7 @@ void prelevel(char g)
|
|||
|
||||
mirrorcnt = 0;
|
||||
|
||||
for ( i = 0; i < numwalls; i++ )
|
||||
for (i = 0; i < numwalls; i++)
|
||||
{
|
||||
walltype *wal;
|
||||
wal = &wall[i];
|
||||
|
@ -881,7 +881,7 @@ void prelevel(char g)
|
|||
|
||||
if (mirrorcnt > 63)
|
||||
gameexit("\nToo many mirrors (64 max.)");
|
||||
if ( (j >= 0) && sector[j].ceilingpicnum != MIRROR )
|
||||
if ((j >= 0) && sector[j].ceilingpicnum != MIRROR)
|
||||
{
|
||||
sector[j].ceilingpicnum = MIRROR;
|
||||
sector[j].floorpicnum = MIRROR;
|
||||
|
@ -1034,10 +1034,10 @@ void newgame(char vn,char ln,char sk)
|
|||
waitforeverybody();
|
||||
ready2send = 0;
|
||||
|
||||
if ( ud.m_recstat != 2 && ud.last_level >= 0 && ud.multimode > 1 && (ud.coop&GAMETYPE_FLAG_SCORESHEET))
|
||||
if (ud.m_recstat != 2 && ud.last_level >= 0 && ud.multimode > 1 && (ud.coop&GAMETYPE_FLAG_SCORESHEET))
|
||||
dobonus(1);
|
||||
|
||||
if ( ln == 0 && vn == 3 && ud.multimode < 2 && ud.lockout == 0)
|
||||
if (ln == 0 && vn == 3 && ud.multimode < 2 && ud.lockout == 0)
|
||||
{
|
||||
playmusic(&env_music_fn[1][0]);
|
||||
|
||||
|
@ -1100,7 +1100,7 @@ void newgame(char vn,char ln,char sk)
|
|||
}
|
||||
display_mirror = 0;
|
||||
|
||||
if (ud.multimode > 1 )
|
||||
if (ud.multimode > 1)
|
||||
{
|
||||
if (numplayers < 2)
|
||||
{
|
||||
|
@ -1196,7 +1196,7 @@ void resetpspritevars(char g)
|
|||
nexti = nextspritestat[i];
|
||||
s = &sprite[i];
|
||||
|
||||
if ( numplayersprites == MAXPLAYERS)
|
||||
if (numplayersprites == MAXPLAYERS)
|
||||
gameexit("\nToo many player sprites (max 16.)");
|
||||
|
||||
if (numplayersprites == 0)
|
||||
|
@ -1222,7 +1222,7 @@ void resetpspritevars(char g)
|
|||
s->xoffset = 0;
|
||||
s->clipdist = 64;
|
||||
|
||||
if ( (g&MODE_EOL) != MODE_EOL || ps[j].last_extra == 0)
|
||||
if ((g&MODE_EOL) != MODE_EOL || ps[j].last_extra == 0)
|
||||
{
|
||||
ps[j].last_extra = max_player_health;
|
||||
s->extra = max_player_health;
|
||||
|
@ -1241,13 +1241,13 @@ void resetpspritevars(char g)
|
|||
for (k=0;k<MAXPLAYERS;k++) {
|
||||
if (which_palookup == ps[k].palookup) {
|
||||
which_palookup++;
|
||||
if ( which_palookup >= 17 )
|
||||
if (which_palookup >= 17)
|
||||
which_palookup = 9;
|
||||
k=0;
|
||||
}
|
||||
}
|
||||
ud.pcolor[j] = s->pal = ps[j].palookup = which_palookup++;
|
||||
if ( which_palookup >= 17 )
|
||||
if (which_palookup >= 17)
|
||||
which_palookup = 9;
|
||||
}
|
||||
else ud.pcolor[j] = ps[j].palookup = s->pal;
|
||||
|
@ -1410,7 +1410,7 @@ void dofrontscreens(char *statustext)
|
|||
nextpage();
|
||||
return;
|
||||
}
|
||||
if ( boardfilename[0] != 0 && ud.level_number == 7 && ud.volume_number == 0 )
|
||||
if (boardfilename[0] != 0 && ud.level_number == 7 && ud.volume_number == 0)
|
||||
{
|
||||
menutext(160,90,0,0,"ENTERING USER MAP");
|
||||
gametextpal(160,90+10,boardfilename,14,2);
|
||||
|
@ -1508,7 +1508,7 @@ int enterlevel(char g)
|
|||
long l;
|
||||
char levname[BMAX_PATH];
|
||||
|
||||
if ( (g&MODE_DEMO) != MODE_DEMO ) ud.recstat = ud.m_recstat;
|
||||
if ((g&MODE_DEMO) != MODE_DEMO) ud.recstat = ud.m_recstat;
|
||||
ud.respawn_monsters = ud.m_respawn_monsters;
|
||||
ud.respawn_items = ud.m_respawn_items;
|
||||
ud.respawn_inventory = ud.m_respawn_inventory;
|
||||
|
@ -1522,13 +1522,13 @@ int enterlevel(char g)
|
|||
Bmemset(votes,0,sizeof(votes));
|
||||
Bmemset(gotvote,0,sizeof(gotvote));
|
||||
|
||||
if ( (g&MODE_DEMO) == 0 && ud.recstat == 2)
|
||||
if ((g&MODE_DEMO) == 0 && ud.recstat == 2)
|
||||
ud.recstat = 0;
|
||||
|
||||
if (VOLUMEALL) Bsprintf(tempbuf,HEAD2);
|
||||
else Bsprintf(tempbuf,HEAD);
|
||||
|
||||
if ( boardfilename[0] != 0 && ud.m_level_number == 7 && ud.m_volume_number == 0 )
|
||||
if (boardfilename[0] != 0 && ud.m_level_number == 7 && ud.m_volume_number == 0)
|
||||
{
|
||||
Bstrcpy(levname, boardfilename);
|
||||
Bsprintf(apptitle," - %s",levname);
|
||||
|
@ -1550,9 +1550,9 @@ int enterlevel(char g)
|
|||
|
||||
if (!VOLUMEONE) {
|
||||
|
||||
if ( boardfilename[0] != 0 && ud.m_level_number == 7 && ud.m_volume_number == 0 )
|
||||
if (boardfilename[0] != 0 && ud.m_level_number == 7 && ud.m_volume_number == 0)
|
||||
{
|
||||
if ( loadboard( boardfilename,0,&ps[0].posx, &ps[0].posy, &ps[0].posz, &ps[0].ang,&ps[0].cursectnum ) == -1 )
|
||||
if (loadboard(boardfilename,0,&ps[0].posx, &ps[0].posy, &ps[0].posz, &ps[0].ang,&ps[0].cursectnum) == -1)
|
||||
{
|
||||
initprintf("Map %s not found!\n",boardfilename);
|
||||
//gameexit(tempbuf);
|
||||
|
@ -1566,14 +1566,14 @@ int enterlevel(char g)
|
|||
if (!loadmaphack(levname)) initprintf("Loaded map hack file %s\n",levname);
|
||||
}
|
||||
}
|
||||
else if ( loadboard( level_file_names[ (ud.volume_number*11)+ud.level_number],0,&ps[0].posx, &ps[0].posy, &ps[0].posz, &ps[0].ang,&ps[0].cursectnum ) == -1)
|
||||
else if (loadboard(level_file_names[(ud.volume_number*11)+ud.level_number],0,&ps[0].posx, &ps[0].posy, &ps[0].posz, &ps[0].ang,&ps[0].cursectnum) == -1)
|
||||
{
|
||||
initprintf("Map %s not found!\n",level_file_names[(ud.volume_number*11)+ud.level_number]);
|
||||
//gameexit(tempbuf);
|
||||
return 1;
|
||||
} else {
|
||||
char *p;
|
||||
strcpy(levname, level_file_names[ (ud.volume_number*11)+ud.level_number]);
|
||||
strcpy(levname, level_file_names[(ud.volume_number*11)+ud.level_number]);
|
||||
p = Bstrrchr(levname,'.');
|
||||
if (!p) strcat(levname,".mhk");
|
||||
else { p[1]='m'; p[2]='h'; p[3]='k'; p[4]=0; }
|
||||
|
@ -1582,12 +1582,12 @@ int enterlevel(char g)
|
|||
|
||||
} else {
|
||||
|
||||
l = strlen(level_file_names[ (ud.volume_number*11)+ud.level_number]);
|
||||
copybufbyte( level_file_names[ (ud.volume_number*11)+ud.level_number],&levname[0],l);
|
||||
l = strlen(level_file_names[(ud.volume_number*11)+ud.level_number]);
|
||||
copybufbyte(level_file_names[(ud.volume_number*11)+ud.level_number],&levname[0],l);
|
||||
levname[l] = 255;
|
||||
levname[l+1] = 0;
|
||||
|
||||
if ( loadboard( levname,1,&ps[0].posx, &ps[0].posy, &ps[0].posz, &ps[0].ang,&ps[0].cursectnum ) == -1)
|
||||
if (loadboard(levname,1,&ps[0].posx, &ps[0].posy, &ps[0].posz, &ps[0].ang,&ps[0].cursectnum) == -1)
|
||||
{
|
||||
initprintf("Map %s not found!\n",level_file_names[(ud.volume_number*11)+ud.level_number]);
|
||||
//gameexit(tempbuf);
|
||||
|
@ -1624,7 +1624,7 @@ int enterlevel(char g)
|
|||
playmusic(&music_fn[0][music_select][0]);
|
||||
}
|
||||
|
||||
if ( (g&MODE_GAME) || (g&MODE_EOL) )
|
||||
if ((g&MODE_GAME) || (g&MODE_EOL))
|
||||
ps[myconnectindex].gm = MODE_GAME;
|
||||
else if (g&MODE_RESTART)
|
||||
{
|
||||
|
@ -1633,7 +1633,7 @@ int enterlevel(char g)
|
|||
else ps[myconnectindex].gm = MODE_GAME;
|
||||
}
|
||||
|
||||
if ( (ud.recstat == 1) && (g&MODE_RESTART) != MODE_RESTART )
|
||||
if ((ud.recstat == 1) && (g&MODE_RESTART) != MODE_RESTART)
|
||||
opendemowrite();
|
||||
|
||||
if (VOLUMEONE) {
|
||||
|
|
|
@ -58,7 +58,7 @@ char lumplockbyte[11];
|
|||
====================
|
||||
*/
|
||||
|
||||
int32 RTS_AddFile (char *filename)
|
||||
int32 RTS_AddFile(char *filename)
|
||||
{
|
||||
wadinfo_t header;
|
||||
lumpinfo_t *lump_p;
|
||||
|
@ -81,7 +81,7 @@ int32 RTS_AddFile (char *filename)
|
|||
|
||||
// WAD file
|
||||
initprintf(" Adding %s.\n",filename);
|
||||
kread( handle, &header, sizeof( header ) );
|
||||
kread(handle, &header, sizeof(header));
|
||||
if (strncmp(header.identification,"IWAD",4)) {
|
||||
initprintf("RTS file %s doesn't have IWAD id\n",filename);
|
||||
kclose(handle);
|
||||
|
@ -90,13 +90,13 @@ int32 RTS_AddFile (char *filename)
|
|||
header.numlumps = IntelLong(header.numlumps);
|
||||
header.infotableofs = IntelLong(header.infotableofs);
|
||||
length = header.numlumps*sizeof(filelump_t);
|
||||
fileinfo = fileinfoo = (filelump_t*)malloc (length);
|
||||
fileinfo = fileinfoo = (filelump_t*)malloc(length);
|
||||
if (!fileinfo) {
|
||||
initprintf("RTS file could not allocate header info\n");
|
||||
kclose(handle);
|
||||
return -1;
|
||||
}
|
||||
klseek (handle, header.infotableofs, SEEK_SET);
|
||||
klseek(handle, header.infotableofs, SEEK_SET);
|
||||
kread(handle, fileinfo, length);
|
||||
|
||||
//
|
||||
|
@ -118,7 +118,7 @@ int32 RTS_AddFile (char *filename)
|
|||
lump_p->handle = handle;
|
||||
lump_p->position = IntelLong(fileinfo->filepos);
|
||||
lump_p->size = IntelLong(fileinfo->size);
|
||||
strncpy (lump_p->name, fileinfo->name, 8);
|
||||
strncpy(lump_p->name, fileinfo->name, 8);
|
||||
}
|
||||
|
||||
free(fileinfoo);
|
||||
|
@ -136,7 +136,7 @@ int32 RTS_AddFile (char *filename)
|
|||
====================
|
||||
*/
|
||||
|
||||
void RTS_Init (char *filename)
|
||||
void RTS_Init(char *filename)
|
||||
{
|
||||
int32 length;
|
||||
//
|
||||
|
@ -146,14 +146,14 @@ void RTS_Init (char *filename)
|
|||
lumpinfo = NULL; // will be realloced as lumps are added
|
||||
|
||||
initprintf("RTS Manager Started.\n");
|
||||
if (RTS_AddFile (filename)) return;
|
||||
if (RTS_AddFile(filename)) return;
|
||||
|
||||
if (!numlumps) return;
|
||||
|
||||
//
|
||||
// set up caching
|
||||
//
|
||||
length = (numlumps) * sizeof( *lumpcache );
|
||||
length = (numlumps) * sizeof(*lumpcache);
|
||||
lumpcache = SafeMalloc(length);
|
||||
memset(lumpcache,0,length);
|
||||
RTS_Started = true;
|
||||
|
@ -168,7 +168,7 @@ void RTS_Init (char *filename)
|
|||
====================
|
||||
*/
|
||||
|
||||
int32 RTS_NumSounds (void)
|
||||
int32 RTS_NumSounds(void)
|
||||
{
|
||||
return numlumps-1;
|
||||
}
|
||||
|
@ -183,11 +183,11 @@ int32 RTS_NumSounds (void)
|
|||
====================
|
||||
*/
|
||||
|
||||
int32 RTS_SoundLength (int32 lump)
|
||||
int32 RTS_SoundLength(int32 lump)
|
||||
{
|
||||
lump++;
|
||||
if (lump >= numlumps)
|
||||
Error ("RTS_SoundLength: %i >= numlumps",lump);
|
||||
Error("RTS_SoundLength: %i >= numlumps",lump);
|
||||
return lumpinfo[lump].size;
|
||||
}
|
||||
|
||||
|
@ -199,11 +199,11 @@ int32 RTS_SoundLength (int32 lump)
|
|||
====================
|
||||
*/
|
||||
|
||||
char * RTS_GetSoundName (int32 i)
|
||||
char * RTS_GetSoundName(int32 i)
|
||||
{
|
||||
i++;
|
||||
if (i>=numlumps)
|
||||
Error ("RTS_GetSoundName: %i >= numlumps",i);
|
||||
Error("RTS_GetSoundName: %i >= numlumps",i);
|
||||
return &(lumpinfo[i].name[0]);
|
||||
}
|
||||
|
||||
|
@ -216,16 +216,16 @@ char * RTS_GetSoundName (int32 i)
|
|||
=
|
||||
====================
|
||||
*/
|
||||
void RTS_ReadLump (int32 lump, void *dest)
|
||||
void RTS_ReadLump(int32 lump, void *dest)
|
||||
{
|
||||
lumpinfo_t *l;
|
||||
|
||||
if (lump >= numlumps)
|
||||
Error ("RTS_ReadLump: %i >= numlumps",lump);
|
||||
Error("RTS_ReadLump: %i >= numlumps",lump);
|
||||
if (lump < 0)
|
||||
Error ("RTS_ReadLump: %i < 0",lump);
|
||||
Error("RTS_ReadLump: %i < 0",lump);
|
||||
l = lumpinfo+lump;
|
||||
klseek (l->handle, l->position, SEEK_SET);
|
||||
klseek(l->handle, l->position, SEEK_SET);
|
||||
kread(l->handle,dest,l->size);
|
||||
}
|
||||
|
||||
|
@ -236,11 +236,11 @@ void RTS_ReadLump (int32 lump, void *dest)
|
|||
=
|
||||
====================
|
||||
*/
|
||||
void *RTS_GetSound (int32 lump)
|
||||
void *RTS_GetSound(int32 lump)
|
||||
{
|
||||
lump++;
|
||||
if ((uint32)lump >= (uint32)numlumps)
|
||||
Error ("RTS_GetSound: %i >= %i\n",lump,numlumps);
|
||||
Error("RTS_GetSound: %i >= %i\n",lump,numlumps);
|
||||
|
||||
if (lumpcache[lump] == NULL)
|
||||
{
|
||||
|
|
|
@ -88,7 +88,7 @@ int loadplayer(signed char spot)
|
|||
return -1;
|
||||
}
|
||||
|
||||
if ( multiflag == 2 && multiwho != myconnectindex )
|
||||
if (multiflag == 2 && multiwho != myconnectindex)
|
||||
{
|
||||
fnptr = mpfn;
|
||||
mpfn[4] = spot + 'A';
|
||||
|
@ -211,7 +211,7 @@ int loadplayer(signed char spot)
|
|||
if (kdfread(&scriptptrs[0],1,MAXSCRIPTSIZE,fil) != MAXSCRIPTSIZE) goto corrupt;
|
||||
if (kdfread(&script[0],4,MAXSCRIPTSIZE,fil) != MAXSCRIPTSIZE) goto corrupt;
|
||||
for (i=0;i<MAXSCRIPTSIZE;i++)
|
||||
if ( scriptptrs[i] )
|
||||
if (scriptptrs[i])
|
||||
{
|
||||
j = (long)script[i]+(long)&script[0];
|
||||
script[i] = j;
|
||||
|
@ -238,9 +238,9 @@ int loadplayer(signed char spot)
|
|||
for (i=0;i<MAXSPRITES;i++)
|
||||
{
|
||||
j = (long)(&script[0]);
|
||||
if ( scriptptrs[i]&1 ) T2 += j;
|
||||
if ( scriptptrs[i]&2 ) T5 += j;
|
||||
if ( scriptptrs[i]&4 ) T6 += j;
|
||||
if (scriptptrs[i]&1) T2 += j;
|
||||
if (scriptptrs[i]&2) T5 += j;
|
||||
if (scriptptrs[i]&4) T6 += j;
|
||||
}
|
||||
|
||||
if (kdfread(&lockclock,sizeof(lockclock),1,fil) != 1) goto corrupt;
|
||||
|
@ -364,7 +364,7 @@ int loadplayer(signed char spot)
|
|||
if (ud.lockout == 0)
|
||||
{
|
||||
for (x=0;x<numanimwalls;x++)
|
||||
if ( wall[animwall[x].wallnum].extra >= 0 )
|
||||
if (wall[animwall[x].wallnum].extra >= 0)
|
||||
wall[animwall[x].wallnum].picnum = wall[animwall[x].wallnum].extra;
|
||||
}
|
||||
else
|
||||
|
@ -468,7 +468,7 @@ int saveplayer(signed char spot)
|
|||
|
||||
waitforeverybody();
|
||||
|
||||
if ( multiflag == 2 && multiwho != myconnectindex )
|
||||
if (multiflag == 2 && multiwho != myconnectindex)
|
||||
{
|
||||
fnptr = mpfn;
|
||||
mpfn[4] = spot + 'A';
|
||||
|
@ -547,7 +547,7 @@ int saveplayer(signed char spot)
|
|||
|
||||
for (i=0;i<MAXSCRIPTSIZE;i++)
|
||||
{
|
||||
if ( (long)script[i] >= (long)(&script[0]) && (long)script[i] < (long)(&script[MAXSCRIPTSIZE]) )
|
||||
if ((long)script[i] >= (long)(&script[0]) && (long)script[i] < (long)(&script[MAXSCRIPTSIZE]))
|
||||
{
|
||||
scriptptrs[i] = 1;
|
||||
j = (long)script[i] - (long)&script[0];
|
||||
|
@ -560,7 +560,7 @@ int saveplayer(signed char spot)
|
|||
dfwrite(&script[0],4,MAXSCRIPTSIZE,fil);
|
||||
|
||||
for (i=0;i<MAXSCRIPTSIZE;i++)
|
||||
if ( scriptptrs[i] )
|
||||
if (scriptptrs[i])
|
||||
{
|
||||
j = script[i]+(long)&script[0];
|
||||
script[i] = j;
|
||||
|
@ -603,17 +603,17 @@ int saveplayer(signed char spot)
|
|||
|
||||
j = (long)&script[0];
|
||||
|
||||
if (T2 >= j && T2 < (long)(&script[MAXSCRIPTSIZE]) )
|
||||
if (T2 >= j && T2 < (long)(&script[MAXSCRIPTSIZE]))
|
||||
{
|
||||
scriptptrs[i] |= 1;
|
||||
T2 -= j;
|
||||
}
|
||||
if (T5 >= j && T5 < (long)(&script[MAXSCRIPTSIZE]) )
|
||||
if (T5 >= j && T5 < (long)(&script[MAXSCRIPTSIZE]))
|
||||
{
|
||||
scriptptrs[i] |= 2;
|
||||
T5 -= j;
|
||||
}
|
||||
if (T6 >= j && T6 < (long)(&script[MAXSCRIPTSIZE]) )
|
||||
if (T6 >= j && T6 < (long)(&script[MAXSCRIPTSIZE]))
|
||||
{
|
||||
scriptptrs[i] |= 4;
|
||||
T6 -= j;
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -42,24 +42,24 @@ long backflag,numenvsnds;
|
|||
===================
|
||||
*/
|
||||
|
||||
void SoundStartup( void )
|
||||
void SoundStartup(void)
|
||||
{
|
||||
int32 status;
|
||||
|
||||
// if they chose None lets return
|
||||
if (FXDevice < 0) return;
|
||||
|
||||
status = FX_Init( FXDevice, NumVoices, NumChannels, NumBits, MixRate );
|
||||
if ( status == FX_Ok ) {
|
||||
FX_SetVolume( FXVolume );
|
||||
status = FX_Init(FXDevice, NumVoices, NumChannels, NumBits, MixRate);
|
||||
if (status == FX_Ok) {
|
||||
FX_SetVolume(FXVolume);
|
||||
if (ReverseStereo == 1) {
|
||||
FX_SetReverseStereo(!FX_GetReverseStereo());
|
||||
}
|
||||
status = FX_SetCallBack( testcallback );
|
||||
status = FX_SetCallBack(testcallback);
|
||||
}
|
||||
|
||||
if ( status != FX_Ok ) {
|
||||
sprintf(tempbuf, "Sound startup error: %s", FX_ErrorString( FX_Error ));
|
||||
if (status != FX_Ok) {
|
||||
sprintf(tempbuf, "Sound startup error: %s", FX_ErrorString(FX_Error));
|
||||
gameexit(tempbuf);
|
||||
}
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ void SoundStartup( void )
|
|||
===================
|
||||
*/
|
||||
|
||||
void SoundShutdown( void )
|
||||
void SoundShutdown(void)
|
||||
{
|
||||
int32 status;
|
||||
|
||||
|
@ -81,8 +81,8 @@ void SoundShutdown( void )
|
|||
return;
|
||||
|
||||
status = FX_Shutdown();
|
||||
if ( status != FX_Ok ) {
|
||||
sprintf(tempbuf, "Sound shutdown error: %s", FX_ErrorString( FX_Error ));
|
||||
if (status != FX_Ok) {
|
||||
sprintf(tempbuf, "Sound shutdown error: %s", FX_ErrorString(FX_Error));
|
||||
gameexit(tempbuf);
|
||||
}
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ void SoundShutdown( void )
|
|||
===================
|
||||
*/
|
||||
|
||||
void MusicStartup( void )
|
||||
void MusicStartup(void)
|
||||
{
|
||||
int32 status;
|
||||
|
||||
|
@ -103,11 +103,11 @@ void MusicStartup( void )
|
|||
if (MusicDevice < 0)
|
||||
return;
|
||||
|
||||
status = MUSIC_Init( MusicDevice, 0 );
|
||||
status = MUSIC_Init(MusicDevice, 0);
|
||||
|
||||
if ( status == MUSIC_Ok )
|
||||
if (status == MUSIC_Ok)
|
||||
{
|
||||
MUSIC_SetVolume( MusicVolume );
|
||||
MUSIC_SetVolume(MusicVolume);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -133,7 +133,7 @@ void MusicStartup( void )
|
|||
===================
|
||||
*/
|
||||
|
||||
void MusicShutdown( void )
|
||||
void MusicShutdown(void)
|
||||
{
|
||||
int32 status;
|
||||
|
||||
|
@ -142,9 +142,9 @@ void MusicShutdown( void )
|
|||
return;
|
||||
|
||||
status = MUSIC_Shutdown();
|
||||
if ( status != MUSIC_Ok )
|
||||
if (status != MUSIC_Ok)
|
||||
{
|
||||
Error( MUSIC_ErrorString( MUSIC_ErrorCode ));
|
||||
Error(MUSIC_ErrorString(MUSIC_ErrorCode));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -153,21 +153,21 @@ void MusicUpdate(void)
|
|||
MUSIC_Update();
|
||||
}
|
||||
|
||||
int USRHOOKS_GetMem(char **ptr, unsigned long size )
|
||||
int USRHOOKS_GetMem(char **ptr, unsigned long size)
|
||||
{
|
||||
*ptr = malloc(size);
|
||||
|
||||
if (*ptr == NULL)
|
||||
return(USRHOOKS_Error);
|
||||
|
||||
return( USRHOOKS_Ok);
|
||||
return(USRHOOKS_Ok);
|
||||
|
||||
}
|
||||
|
||||
int USRHOOKS_FreeMem(char *ptr)
|
||||
{
|
||||
free(ptr);
|
||||
return( USRHOOKS_Ok);
|
||||
return(USRHOOKS_Ok);
|
||||
}
|
||||
|
||||
char menunum=0;
|
||||
|
@ -210,16 +210,16 @@ void playmusic(char *fn)
|
|||
|
||||
if (fp == -1) return;
|
||||
|
||||
l = kfilelength( fp );
|
||||
l = kfilelength(fp);
|
||||
if (l >= (signed long)sizeof(MusicPtr))
|
||||
{
|
||||
kclose(fp);
|
||||
return;
|
||||
}
|
||||
|
||||
kread( fp, MusicPtr, l);
|
||||
kclose( fp );
|
||||
MUSIC_PlaySong( MusicPtr, MUSIC_LoopSong );
|
||||
kread(fp, MusicPtr, l);
|
||||
kclose(fp);
|
||||
MUSIC_PlaySong(MusicPtr, MUSIC_LoopSong);
|
||||
}
|
||||
|
||||
char loadsound(unsigned short num)
|
||||
|
@ -238,14 +238,14 @@ char loadsound(unsigned short num)
|
|||
return 0;
|
||||
}
|
||||
|
||||
l = kfilelength( fp );
|
||||
l = kfilelength(fp);
|
||||
soundsiz[num] = l;
|
||||
|
||||
Sound[num].lock = 200;
|
||||
|
||||
allocache((long *)&Sound[num].ptr,l,(char *)&Sound[num].lock);
|
||||
kread( fp, Sound[num].ptr , l);
|
||||
kclose( fp );
|
||||
kread(fp, Sound[num].ptr , l);
|
||||
kclose(fp);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -257,22 +257,22 @@ int xyzsound(short num,short i,long x,long y,long z)
|
|||
|
||||
// if(num != 358) return 0;
|
||||
|
||||
if ( num >= NUM_SOUNDS ||
|
||||
if (num >= NUM_SOUNDS ||
|
||||
FXDevice < 0 ||
|
||||
( (soundm[num]&8) && ud.lockout ) ||
|
||||
((soundm[num]&8) && ud.lockout) ||
|
||||
SoundToggle == 0 ||
|
||||
Sound[num].num > 3 ||
|
||||
FX_VoiceAvailable(soundpr[num]) == 0 ||
|
||||
(ps[myconnectindex].timebeforeexit > 0 && ps[myconnectindex].timebeforeexit <= 26*3) ||
|
||||
ps[myconnectindex].gm&MODE_MENU) return -1;
|
||||
|
||||
if ( soundm[num]&128 )
|
||||
if (soundm[num]&128)
|
||||
{
|
||||
sound(num);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ( soundm[num]&4 )
|
||||
if (soundm[num]&4)
|
||||
{
|
||||
if (VoiceToggle==0)
|
||||
return -1;
|
||||
|
@ -280,7 +280,7 @@ int xyzsound(short num,short i,long x,long y,long z)
|
|||
return -1;
|
||||
for (j=0;j<NUM_SOUNDS;j++)
|
||||
for (k=0;k<Sound[j].num;k++)
|
||||
if ( (Sound[j].num > 0) && (soundm[j]&4) )
|
||||
if ((Sound[j].num > 0) && (soundm[j]&4))
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -292,7 +292,7 @@ int xyzsound(short num,short i,long x,long y,long z)
|
|||
|
||||
sndist = FindDistance3D((cx-x),(cy-y),(cz-z)>>4);
|
||||
|
||||
if ( i >= 0 && (soundm[num]&16) == 0 && PN == MUSICANDSFX && SLT < 999 && (sector[SECT].lotag&0xff) < 9 )
|
||||
if (i >= 0 && (soundm[num]&16) == 0 && PN == MUSICANDSFX && SLT < 999 && (sector[SECT].lotag&0xff) < 9)
|
||||
sndist = divscale14(sndist,(SHT+1));
|
||||
|
||||
pitchs = soundps[num];
|
||||
|
@ -301,15 +301,15 @@ int xyzsound(short num,short i,long x,long y,long z)
|
|||
|
||||
if (cx)
|
||||
{
|
||||
if ( pitchs < pitche )
|
||||
pitch = pitchs + ( rand()%cx );
|
||||
else pitch = pitche + ( rand()%cx );
|
||||
if (pitchs < pitche)
|
||||
pitch = pitchs + (rand()%cx);
|
||||
else pitch = pitche + (rand()%cx);
|
||||
}
|
||||
else pitch = pitchs;
|
||||
|
||||
sndist += soundvo[num];
|
||||
if (sndist < 0) sndist = 0;
|
||||
if ( sndist && PN != MUSICANDSFX && !cansee(cx,cy,cz-(24<<8),cs,SX,SY,SZ-(24<<8),SECT) )
|
||||
if (sndist && PN != MUSICANDSFX && !cansee(cx,cy,cz-(24<<8),cs,SX,SY,SZ-(24<<8),SECT))
|
||||
sndist += sndist>>5;
|
||||
|
||||
switch (num)
|
||||
|
@ -317,7 +317,7 @@ int xyzsound(short num,short i,long x,long y,long z)
|
|||
case PIPEBOMB_EXPLODE:
|
||||
case LASERTRIP_EXPLODE:
|
||||
case RPG_EXPLODE:
|
||||
if (sndist > (6144) )
|
||||
if (sndist > (6144))
|
||||
sndist = 6144;
|
||||
if (sector[ps[screenpeek].cursectnum].lotag == 2)
|
||||
pitch -= 1024;
|
||||
|
@ -325,21 +325,21 @@ int xyzsound(short num,short i,long x,long y,long z)
|
|||
default:
|
||||
if (sector[ps[screenpeek].cursectnum].lotag == 2 && (soundm[num]&4) == 0)
|
||||
pitch = -768;
|
||||
if ( sndist > 31444 && PN != MUSICANDSFX)
|
||||
if (sndist > 31444 && PN != MUSICANDSFX)
|
||||
return -1;
|
||||
break;
|
||||
}
|
||||
|
||||
if (ps[screenpeek].sound_pitch) pitch += ps[screenpeek].sound_pitch;
|
||||
|
||||
if ( Sound[num].num > 0 && PN != MUSICANDSFX )
|
||||
if (Sound[num].num > 0 && PN != MUSICANDSFX)
|
||||
{
|
||||
if ( SoundOwner[num][0].i == i ) stopsound(num);
|
||||
else if ( Sound[num].num > 1 ) stopsound(num);
|
||||
else if ( badguy(&sprite[i]) && sprite[i].extra <= 0 ) stopsound(num);
|
||||
if (SoundOwner[num][0].i == i) stopsound(num);
|
||||
else if (Sound[num].num > 1) stopsound(num);
|
||||
else if (badguy(&sprite[i]) && sprite[i].extra <= 0) stopsound(num);
|
||||
}
|
||||
|
||||
if ( PN == APLAYER && sprite[i].yvel == screenpeek )
|
||||
if (PN == APLAYER && sprite[i].yvel == screenpeek)
|
||||
{
|
||||
sndang = 0;
|
||||
sndist = 0;
|
||||
|
@ -350,7 +350,7 @@ int xyzsound(short num,short i,long x,long y,long z)
|
|||
sndang &= 2047;
|
||||
}
|
||||
|
||||
if (Sound[num].ptr == 0) { if ( loadsound(num) == 0 ) return 0; }
|
||||
if (Sound[num].ptr == 0) { if (loadsound(num) == 0) return 0; }
|
||||
else
|
||||
{
|
||||
if (Sound[num].lock < 200)
|
||||
|
@ -358,12 +358,12 @@ int xyzsound(short num,short i,long x,long y,long z)
|
|||
else Sound[num].lock++;
|
||||
}
|
||||
|
||||
if ( soundm[num]&16 ) sndist = 0;
|
||||
if (soundm[num]&16) sndist = 0;
|
||||
|
||||
if (sndist < ((255-LOUDESTVOLUME)<<6) )
|
||||
if (sndist < ((255-LOUDESTVOLUME)<<6))
|
||||
sndist = ((255-LOUDESTVOLUME)<<6);
|
||||
|
||||
if ( soundm[num]&1 )
|
||||
if (soundm[num]&1)
|
||||
{
|
||||
unsigned short start;
|
||||
|
||||
|
@ -372,21 +372,21 @@ int xyzsound(short num,short i,long x,long y,long z)
|
|||
start = *(unsigned short *)(Sound[num].ptr + 0x14);
|
||||
|
||||
if (*Sound[num].ptr == 'C')
|
||||
voice = FX_PlayLoopedVOC( Sound[num].ptr, start, start + soundsiz[num],
|
||||
pitch,sndist>>6,sndist>>6,0,soundpr[num],num);
|
||||
voice = FX_PlayLoopedVOC(Sound[num].ptr, start, start + soundsiz[num],
|
||||
pitch,sndist>>6,sndist>>6,0,soundpr[num],num);
|
||||
else
|
||||
voice = FX_PlayLoopedWAV( Sound[num].ptr, start, start + soundsiz[num],
|
||||
pitch,sndist>>6,sndist>>6,0,soundpr[num],num);
|
||||
voice = FX_PlayLoopedWAV(Sound[num].ptr, start, start + soundsiz[num],
|
||||
pitch,sndist>>6,sndist>>6,0,soundpr[num],num);
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( *Sound[num].ptr == 'C')
|
||||
voice = FX_PlayVOC3D( Sound[ num ].ptr,pitch,sndang>>6,sndist>>6, soundpr[num], num );
|
||||
if (*Sound[num].ptr == 'C')
|
||||
voice = FX_PlayVOC3D(Sound[ num ].ptr,pitch,sndang>>6,sndist>>6, soundpr[num], num);
|
||||
else
|
||||
voice = FX_PlayWAV3D( Sound[ num ].ptr,pitch,sndang>>6,sndist>>6, soundpr[num], num );
|
||||
voice = FX_PlayWAV3D(Sound[ num ].ptr,pitch,sndang>>6,sndist>>6, soundpr[num], num);
|
||||
}
|
||||
|
||||
if ( voice > FX_Ok )
|
||||
if (voice > FX_Ok)
|
||||
{
|
||||
SoundOwner[num][Sound[num].num].i = i;
|
||||
SoundOwner[num][Sound[num].num].voice = voice;
|
||||
|
@ -404,8 +404,8 @@ void sound(short num)
|
|||
|
||||
if (FXDevice < 0) return;
|
||||
if (SoundToggle==0) return;
|
||||
if (VoiceToggle==0 && (soundm[num]&4) ) return;
|
||||
if ( (soundm[num]&8) && ud.lockout ) return;
|
||||
if (VoiceToggle==0 && (soundm[num]&4)) return;
|
||||
if ((soundm[num]&8) && ud.lockout) return;
|
||||
if (FX_VoiceAvailable(soundpr[num]) == 0) return;
|
||||
|
||||
pitchs = soundps[num];
|
||||
|
@ -414,13 +414,13 @@ void sound(short num)
|
|||
|
||||
if (cx)
|
||||
{
|
||||
if ( pitchs < pitche )
|
||||
pitch = pitchs + ( rand()%cx );
|
||||
else pitch = pitche + ( rand()%cx );
|
||||
if (pitchs < pitche)
|
||||
pitch = pitchs + (rand()%cx);
|
||||
else pitch = pitche + (rand()%cx);
|
||||
}
|
||||
else pitch = pitchs;
|
||||
|
||||
if (Sound[num].ptr == 0) { if ( loadsound(num) == 0 ) return; }
|
||||
if (Sound[num].ptr == 0) { if (loadsound(num) == 0) return; }
|
||||
else
|
||||
{
|
||||
if (Sound[num].lock < 200)
|
||||
|
@ -428,27 +428,27 @@ if (Sound[num].ptr == 0) { if ( loadsound(num) == 0 ) return; }
|
|||
else Sound[num].lock++;
|
||||
}
|
||||
|
||||
if ( soundm[num]&1 )
|
||||
if (soundm[num]&1)
|
||||
{
|
||||
if (*Sound[num].ptr == 'C')
|
||||
{
|
||||
start = (long)*(unsigned short *)(Sound[num].ptr + 0x14);
|
||||
voice = FX_PlayLoopedVOC( Sound[num].ptr, start, start + soundsiz[num],
|
||||
pitch,LOUDESTVOLUME,LOUDESTVOLUME,LOUDESTVOLUME,soundpr[num],num);
|
||||
voice = FX_PlayLoopedVOC(Sound[num].ptr, start, start + soundsiz[num],
|
||||
pitch,LOUDESTVOLUME,LOUDESTVOLUME,LOUDESTVOLUME,soundpr[num],num);
|
||||
}
|
||||
else
|
||||
{
|
||||
start = (long)*(unsigned short *)(Sound[num].ptr + 0x14);
|
||||
voice = FX_PlayLoopedWAV( Sound[num].ptr, start, start + soundsiz[num],
|
||||
pitch,LOUDESTVOLUME,LOUDESTVOLUME,LOUDESTVOLUME,soundpr[num],num);
|
||||
voice = FX_PlayLoopedWAV(Sound[num].ptr, start, start + soundsiz[num],
|
||||
pitch,LOUDESTVOLUME,LOUDESTVOLUME,LOUDESTVOLUME,soundpr[num],num);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (*Sound[num].ptr == 'C')
|
||||
voice = FX_PlayVOC3D( Sound[ num ].ptr, pitch,0,255-LOUDESTVOLUME,soundpr[num], num );
|
||||
voice = FX_PlayVOC3D(Sound[ num ].ptr, pitch,0,255-LOUDESTVOLUME,soundpr[num], num);
|
||||
else
|
||||
voice = FX_PlayWAV3D( Sound[ num ].ptr, pitch,0,255-LOUDESTVOLUME,soundpr[num], num );
|
||||
voice = FX_PlayWAV3D(Sound[ num ].ptr, pitch,0,255-LOUDESTVOLUME,soundpr[num], num);
|
||||
}
|
||||
|
||||
if (voice > FX_Ok) return;
|
||||
|
@ -523,7 +523,7 @@ void pan3dsound(void)
|
|||
sy = sprite[i].y;
|
||||
sz = sprite[i].z;
|
||||
|
||||
if ( PN == APLAYER && sprite[i].yvel == screenpeek)
|
||||
if (PN == APLAYER && sprite[i].yvel == screenpeek)
|
||||
{
|
||||
sndang = 0;
|
||||
sndist = 0;
|
||||
|
@ -533,14 +533,14 @@ void pan3dsound(void)
|
|||
sndang = 2048 + ca - getangle(cx-sx,cy-sy);
|
||||
sndang &= 2047;
|
||||
sndist = FindDistance3D((cx-sx),(cy-sy),(cz-sz)>>4);
|
||||
if ( i >= 0 && (soundm[j]&16) == 0 && PN == MUSICANDSFX && SLT < 999 && (sector[SECT].lotag&0xff) < 9 )
|
||||
if (i >= 0 && (soundm[j]&16) == 0 && PN == MUSICANDSFX && SLT < 999 && (sector[SECT].lotag&0xff) < 9)
|
||||
sndist = divscale14(sndist,(SHT+1));
|
||||
}
|
||||
|
||||
sndist += soundvo[j];
|
||||
if (sndist < 0) sndist = 0;
|
||||
|
||||
if ( sndist && PN != MUSICANDSFX && !cansee(cx,cy,cz-(24<<8),cs,sx,sy,sz-(24<<8),SECT) )
|
||||
if (sndist && PN != MUSICANDSFX && !cansee(cx,cy,cz-(24<<8),cs,sx,sy,sz-(24<<8),SECT))
|
||||
sndist += sndist>>5;
|
||||
|
||||
if (PN == MUSICANDSFX && SLT < 999)
|
||||
|
@ -554,17 +554,17 @@ void pan3dsound(void)
|
|||
if (sndist > (6144)) sndist = (6144);
|
||||
break;
|
||||
default:
|
||||
if ( sndist > 31444 && PN != MUSICANDSFX)
|
||||
if (sndist > 31444 && PN != MUSICANDSFX)
|
||||
{
|
||||
stopsound(j);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (Sound[j].ptr == 0 && loadsound(j) == 0 ) continue;
|
||||
if ( soundm[j]&16 ) sndist = 0;
|
||||
if (Sound[j].ptr == 0 && loadsound(j) == 0) continue;
|
||||
if (soundm[j]&16) sndist = 0;
|
||||
|
||||
if (sndist < ((255-LOUDESTVOLUME)<<6) )
|
||||
if (sndist < ((255-LOUDESTVOLUME)<<6))
|
||||
sndist = ((255-LOUDESTVOLUME)<<6);
|
||||
|
||||
FX_Pan3D(SoundOwner[j][k].voice,sndang>>6,sndist>>6);
|
||||
|
@ -586,14 +586,14 @@ void testcallback(unsigned long num)
|
|||
|
||||
if (tempk > 0)
|
||||
{
|
||||
if ( (soundm[num]&16) == 0)
|
||||
if ((soundm[num]&16) == 0)
|
||||
for (tempj=0;tempj<tempk;tempj++)
|
||||
{
|
||||
tempi = SoundOwner[num][tempj].i;
|
||||
if (sprite[tempi].picnum == MUSICANDSFX && sector[sprite[tempi].sectnum].lotag < 3 && sprite[tempi].lotag < 999)
|
||||
{
|
||||
hittype[tempi].temp_data[0] = 0;
|
||||
if ( (tempj + 1) < tempk )
|
||||
if ((tempj + 1) < tempk)
|
||||
{
|
||||
SoundOwner[num][tempj].voice = SoundOwner[num][tempk-1].voice;
|
||||
SoundOwner[num][tempj].i = SoundOwner[num][tempk-1].i;
|
||||
|
@ -635,5 +635,5 @@ int issoundplaying(short i, int num)
|
|||
return 1;
|
||||
else return 0;
|
||||
}
|
||||
else return (Sound[num].num);
|
||||
else return(Sound[num].num);
|
||||
}
|
||||
|
|
|
@ -82,8 +82,8 @@ static void PopulateForm(void)
|
|||
mode3d = checkvideomode(&settings.xdim3d, &settings.ydim3d, settings.bpp3d, settings.fullscreen, 1);
|
||||
if (mode3d < 0) {
|
||||
int i, cd[] = { 32, 24, 16, 15, 8, 0 };
|
||||
for (i=0; cd[i]; ) { if (cd[i] >= settings.bpp3d) i++; else break; }
|
||||
for ( ; cd[i]; i++) {
|
||||
for (i=0; cd[i];) { if (cd[i] >= settings.bpp3d) i++; else break; }
|
||||
for (; cd[i]; i++) {
|
||||
mode3d = checkvideomode(&settings.xdim3d, &settings.ydim3d, cd[i], settings.fullscreen, 1);
|
||||
if (mode3d < 0) continue;
|
||||
settings.bpp3d = cd[i];
|
||||
|
@ -210,19 +210,19 @@ static GtkWidget *create_window(void)
|
|||
GtkWidget *startbuttonlabel;
|
||||
GtkAccelGroup *accel_group;
|
||||
|
||||
accel_group = gtk_accel_group_new ();
|
||||
accel_group = gtk_accel_group_new();
|
||||
|
||||
// Basic window
|
||||
startwin = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_title (GTK_WINDOW (startwin), apptitle); // NOTE: use global app title
|
||||
gtk_window_set_position (GTK_WINDOW (startwin), GTK_WIN_POS_CENTER);
|
||||
gtk_window_set_resizable (GTK_WINDOW (startwin), FALSE);
|
||||
gtk_window_set_type_hint (GTK_WINDOW (startwin), GDK_WINDOW_TYPE_HINT_DIALOG);
|
||||
startwin = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_title(GTK_WINDOW(startwin), apptitle); // NOTE: use global app title
|
||||
gtk_window_set_position(GTK_WINDOW(startwin), GTK_WIN_POS_CENTER);
|
||||
gtk_window_set_resizable(GTK_WINDOW(startwin), FALSE);
|
||||
gtk_window_set_type_hint(GTK_WINDOW(startwin), GDK_WINDOW_TYPE_HINT_DIALOG);
|
||||
|
||||
// Horizontal layout of banner and controls
|
||||
hlayout = gtk_hbox_new (FALSE, 0);
|
||||
gtk_widget_show (hlayout);
|
||||
gtk_container_add (GTK_CONTAINER (startwin), hlayout);
|
||||
hlayout = gtk_hbox_new(FALSE, 0);
|
||||
gtk_widget_show(hlayout);
|
||||
gtk_container_add(GTK_CONTAINER(startwin), hlayout);
|
||||
|
||||
// Banner
|
||||
{
|
||||
|
@ -230,267 +230,267 @@ static GtkWidget *create_window(void)
|
|||
banner = gtk_image_new_from_pixbuf(pixbuf);
|
||||
g_object_unref((gpointer)pixbuf);
|
||||
}
|
||||
gtk_widget_show (banner);
|
||||
gtk_box_pack_start (GTK_BOX (hlayout), banner, FALSE, FALSE, 0);
|
||||
gtk_misc_set_alignment (GTK_MISC (banner), 0.5, 0);
|
||||
gtk_widget_show(banner);
|
||||
gtk_box_pack_start(GTK_BOX(hlayout), banner, FALSE, FALSE, 0);
|
||||
gtk_misc_set_alignment(GTK_MISC(banner), 0.5, 0);
|
||||
|
||||
// Vertical layout of tab control and start+cancel buttons
|
||||
vlayout = gtk_vbox_new (FALSE, 0);
|
||||
gtk_widget_show (vlayout);
|
||||
gtk_box_pack_start (GTK_BOX (hlayout), vlayout, TRUE, TRUE, 0);
|
||||
vlayout = gtk_vbox_new(FALSE, 0);
|
||||
gtk_widget_show(vlayout);
|
||||
gtk_box_pack_start(GTK_BOX(hlayout), vlayout, TRUE, TRUE, 0);
|
||||
|
||||
// Tab control
|
||||
tabs = gtk_notebook_new ();
|
||||
gtk_widget_show (tabs);
|
||||
gtk_box_pack_start (GTK_BOX (vlayout), tabs, TRUE, TRUE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (tabs), 4);
|
||||
tabs = gtk_notebook_new();
|
||||
gtk_widget_show(tabs);
|
||||
gtk_box_pack_start(GTK_BOX(vlayout), tabs, TRUE, TRUE, 0);
|
||||
gtk_container_set_border_width(GTK_CONTAINER(tabs), 4);
|
||||
|
||||
// Vertical layout of config page main body
|
||||
configvlayout = gtk_vbox_new (FALSE, 0);
|
||||
gtk_widget_show (configvlayout);
|
||||
gtk_container_add (GTK_CONTAINER (tabs), configvlayout);
|
||||
configvlayout = gtk_vbox_new(FALSE, 0);
|
||||
gtk_widget_show(configvlayout);
|
||||
gtk_container_add(GTK_CONTAINER(tabs), configvlayout);
|
||||
|
||||
// Fixed-position layout of config page controls
|
||||
configlayout = gtk_fixed_new ();
|
||||
gtk_widget_show (configlayout);
|
||||
gtk_box_pack_start (GTK_BOX (configvlayout), configlayout, TRUE, TRUE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (configlayout), 6);
|
||||
configlayout = gtk_fixed_new();
|
||||
gtk_widget_show(configlayout);
|
||||
gtk_box_pack_start(GTK_BOX(configvlayout), configlayout, TRUE, TRUE, 0);
|
||||
gtk_container_set_border_width(GTK_CONTAINER(configlayout), 6);
|
||||
|
||||
// Fullscreen checkbox
|
||||
fullscreencheck = gtk_check_button_new_with_mnemonic ("_Fullscreen");
|
||||
gtk_widget_show (fullscreencheck);
|
||||
gtk_fixed_put (GTK_FIXED (configlayout), fullscreencheck, 248, 0);
|
||||
gtk_widget_set_size_request (fullscreencheck, 85, 29);
|
||||
gtk_widget_add_accelerator (fullscreencheck, "grab_focus", accel_group,
|
||||
GDK_F, GDK_MOD1_MASK,
|
||||
GTK_ACCEL_VISIBLE);
|
||||
fullscreencheck = gtk_check_button_new_with_mnemonic("_Fullscreen");
|
||||
gtk_widget_show(fullscreencheck);
|
||||
gtk_fixed_put(GTK_FIXED(configlayout), fullscreencheck, 248, 0);
|
||||
gtk_widget_set_size_request(fullscreencheck, 85, 29);
|
||||
gtk_widget_add_accelerator(fullscreencheck, "grab_focus", accel_group,
|
||||
GDK_F, GDK_MOD1_MASK,
|
||||
GTK_ACCEL_VISIBLE);
|
||||
|
||||
// 3D video mode label
|
||||
vmode3dlabel = gtk_label_new_with_mnemonic ("_Video mode:");
|
||||
gtk_widget_show (vmode3dlabel);
|
||||
gtk_fixed_put (GTK_FIXED (configlayout), vmode3dlabel, 0, 0);
|
||||
gtk_widget_set_size_request (vmode3dlabel, 88, 29);
|
||||
gtk_misc_set_alignment (GTK_MISC (vmode3dlabel), 0, 0.5);
|
||||
vmode3dlabel = gtk_label_new_with_mnemonic("_Video mode:");
|
||||
gtk_widget_show(vmode3dlabel);
|
||||
gtk_fixed_put(GTK_FIXED(configlayout), vmode3dlabel, 0, 0);
|
||||
gtk_widget_set_size_request(vmode3dlabel, 88, 29);
|
||||
gtk_misc_set_alignment(GTK_MISC(vmode3dlabel), 0, 0.5);
|
||||
|
||||
inputdevlabel = gtk_label_new ("Input devices:");
|
||||
gtk_widget_show (inputdevlabel);
|
||||
gtk_fixed_put (GTK_FIXED (configlayout), inputdevlabel, 0, 120);
|
||||
gtk_widget_set_size_request (inputdevlabel, 88, 20);
|
||||
gtk_misc_set_alignment (GTK_MISC (inputdevlabel), 0, 0.5);
|
||||
inputdevlabel = gtk_label_new("Input devices:");
|
||||
gtk_widget_show(inputdevlabel);
|
||||
gtk_fixed_put(GTK_FIXED(configlayout), inputdevlabel, 0, 120);
|
||||
gtk_widget_set_size_request(inputdevlabel, 88, 20);
|
||||
gtk_misc_set_alignment(GTK_MISC(inputdevlabel), 0, 0.5);
|
||||
|
||||
sounddrvlabel = gtk_label_new_with_mnemonic ("S_ound driver:");
|
||||
gtk_widget_show (sounddrvlabel);
|
||||
gtk_fixed_put (GTK_FIXED (configlayout), sounddrvlabel, 0, 40);
|
||||
gtk_widget_set_size_request (sounddrvlabel, 88, 29);
|
||||
gtk_misc_set_alignment (GTK_MISC (sounddrvlabel), 0, 0.5);
|
||||
sounddrvlabel = gtk_label_new_with_mnemonic("S_ound driver:");
|
||||
gtk_widget_show(sounddrvlabel);
|
||||
gtk_fixed_put(GTK_FIXED(configlayout), sounddrvlabel, 0, 40);
|
||||
gtk_widget_set_size_request(sounddrvlabel, 88, 29);
|
||||
gtk_misc_set_alignment(GTK_MISC(sounddrvlabel), 0, 0.5);
|
||||
|
||||
sounddrvcombo = gtk_combo_box_new_text ();
|
||||
gtk_widget_show (sounddrvcombo);
|
||||
gtk_fixed_put (GTK_FIXED (configlayout), sounddrvcombo, 88, 40);
|
||||
gtk_widget_set_size_request (sounddrvcombo, 31, 30);
|
||||
gtk_widget_add_accelerator (sounddrvcombo, "grab_focus", accel_group,
|
||||
GDK_O, GDK_MOD1_MASK,
|
||||
GTK_ACCEL_VISIBLE);
|
||||
sounddrvcombo = gtk_combo_box_new_text();
|
||||
gtk_widget_show(sounddrvcombo);
|
||||
gtk_fixed_put(GTK_FIXED(configlayout), sounddrvcombo, 88, 40);
|
||||
gtk_widget_set_size_request(sounddrvcombo, 31, 30);
|
||||
gtk_widget_add_accelerator(sounddrvcombo, "grab_focus", accel_group,
|
||||
GDK_O, GDK_MOD1_MASK,
|
||||
GTK_ACCEL_VISIBLE);
|
||||
|
||||
inputmousecheck = gtk_check_button_new_with_mnemonic ("Mo_use");
|
||||
gtk_widget_show (inputmousecheck);
|
||||
gtk_fixed_put (GTK_FIXED (configlayout), inputmousecheck, 88, 120);
|
||||
gtk_widget_set_size_request (inputmousecheck, 80, 20);
|
||||
gtk_widget_add_accelerator (inputmousecheck, "grab_focus", accel_group,
|
||||
GDK_U, GDK_MOD1_MASK,
|
||||
GTK_ACCEL_VISIBLE);
|
||||
inputmousecheck = gtk_check_button_new_with_mnemonic("Mo_use");
|
||||
gtk_widget_show(inputmousecheck);
|
||||
gtk_fixed_put(GTK_FIXED(configlayout), inputmousecheck, 88, 120);
|
||||
gtk_widget_set_size_request(inputmousecheck, 80, 20);
|
||||
gtk_widget_add_accelerator(inputmousecheck, "grab_focus", accel_group,
|
||||
GDK_U, GDK_MOD1_MASK,
|
||||
GTK_ACCEL_VISIBLE);
|
||||
|
||||
inputjoycheck = gtk_check_button_new_with_mnemonic ("_Joystick");
|
||||
gtk_widget_show (inputjoycheck);
|
||||
gtk_fixed_put (GTK_FIXED (configlayout), inputjoycheck, 168, 120);
|
||||
gtk_widget_set_size_request (inputjoycheck, 80, 20);
|
||||
gtk_widget_add_accelerator (inputjoycheck, "grab_focus", accel_group,
|
||||
GDK_J, GDK_MOD1_MASK,
|
||||
GTK_ACCEL_VISIBLE);
|
||||
inputjoycheck = gtk_check_button_new_with_mnemonic("_Joystick");
|
||||
gtk_widget_show(inputjoycheck);
|
||||
gtk_fixed_put(GTK_FIXED(configlayout), inputjoycheck, 168, 120);
|
||||
gtk_widget_set_size_request(inputjoycheck, 80, 20);
|
||||
gtk_widget_add_accelerator(inputjoycheck, "grab_focus", accel_group,
|
||||
GDK_J, GDK_MOD1_MASK,
|
||||
GTK_ACCEL_VISIBLE);
|
||||
|
||||
// 3D video mode combo
|
||||
{
|
||||
GtkListStore *list = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_INT);
|
||||
GtkCellRenderer *cell;
|
||||
|
||||
vmode3dcombo = gtk_combo_box_new_with_model (GTK_TREE_MODEL(list));
|
||||
vmode3dcombo = gtk_combo_box_new_with_model(GTK_TREE_MODEL(list));
|
||||
g_object_unref(G_OBJECT(list));
|
||||
|
||||
cell = gtk_cell_renderer_text_new();
|
||||
gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(vmode3dcombo), cell, FALSE);
|
||||
gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(vmode3dcombo), cell, "text", 0, NULL);
|
||||
}
|
||||
gtk_widget_show (vmode3dcombo);
|
||||
gtk_fixed_put (GTK_FIXED (configlayout), vmode3dcombo, 88, 0);
|
||||
gtk_widget_set_size_request (vmode3dcombo, 150, 29);
|
||||
gtk_widget_add_accelerator (vmode3dcombo, "grab_focus", accel_group,
|
||||
GDK_V, GDK_MOD1_MASK,
|
||||
GTK_ACCEL_VISIBLE);
|
||||
gtk_widget_show(vmode3dcombo);
|
||||
gtk_fixed_put(GTK_FIXED(configlayout), vmode3dcombo, 88, 0);
|
||||
gtk_widget_set_size_request(vmode3dcombo, 150, 29);
|
||||
gtk_widget_add_accelerator(vmode3dcombo, "grab_focus", accel_group,
|
||||
GDK_V, GDK_MOD1_MASK,
|
||||
GTK_ACCEL_VISIBLE);
|
||||
|
||||
// Always show config checkbox
|
||||
alwaysshowcheck = gtk_check_button_new_with_mnemonic ("_Always show configuration on start");
|
||||
gtk_widget_show (alwaysshowcheck);
|
||||
gtk_box_pack_start (GTK_BOX (configvlayout), alwaysshowcheck, FALSE, FALSE, 0);
|
||||
gtk_widget_add_accelerator (alwaysshowcheck, "grab_focus", accel_group,
|
||||
GDK_A, GDK_MOD1_MASK,
|
||||
GTK_ACCEL_VISIBLE);
|
||||
alwaysshowcheck = gtk_check_button_new_with_mnemonic("_Always show configuration on start");
|
||||
gtk_widget_show(alwaysshowcheck);
|
||||
gtk_box_pack_start(GTK_BOX(configvlayout), alwaysshowcheck, FALSE, FALSE, 0);
|
||||
gtk_widget_add_accelerator(alwaysshowcheck, "grab_focus", accel_group,
|
||||
GDK_A, GDK_MOD1_MASK,
|
||||
GTK_ACCEL_VISIBLE);
|
||||
|
||||
// Configuration tab
|
||||
configtab = gtk_label_new ("Configuration");
|
||||
gtk_widget_show (configtab);
|
||||
gtk_notebook_set_tab_label (GTK_NOTEBOOK (tabs), gtk_notebook_get_nth_page (GTK_NOTEBOOK (tabs), 0), configtab);
|
||||
configtab = gtk_label_new("Configuration");
|
||||
gtk_widget_show(configtab);
|
||||
gtk_notebook_set_tab_label(GTK_NOTEBOOK(tabs), gtk_notebook_get_nth_page(GTK_NOTEBOOK(tabs), 0), configtab);
|
||||
|
||||
// Messages scrollable area
|
||||
messagesscroll = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_widget_show (messagesscroll);
|
||||
gtk_container_add (GTK_CONTAINER (tabs), messagesscroll);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (messagesscroll), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
|
||||
messagesscroll = gtk_scrolled_window_new(NULL, NULL);
|
||||
gtk_widget_show(messagesscroll);
|
||||
gtk_container_add(GTK_CONTAINER(tabs), messagesscroll);
|
||||
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(messagesscroll), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
|
||||
|
||||
// Messages text area
|
||||
messagestext = gtk_text_view_new ();
|
||||
gtk_widget_show (messagestext);
|
||||
gtk_container_add (GTK_CONTAINER (messagesscroll), messagestext);
|
||||
gtk_text_view_set_editable (GTK_TEXT_VIEW (messagestext), FALSE);
|
||||
gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (messagestext), GTK_WRAP_WORD);
|
||||
gtk_text_view_set_cursor_visible (GTK_TEXT_VIEW (messagestext), FALSE);
|
||||
gtk_text_view_set_left_margin (GTK_TEXT_VIEW (messagestext), 2);
|
||||
gtk_text_view_set_right_margin (GTK_TEXT_VIEW (messagestext), 2);
|
||||
messagestext = gtk_text_view_new();
|
||||
gtk_widget_show(messagestext);
|
||||
gtk_container_add(GTK_CONTAINER(messagesscroll), messagestext);
|
||||
gtk_text_view_set_editable(GTK_TEXT_VIEW(messagestext), FALSE);
|
||||
gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(messagestext), GTK_WRAP_WORD);
|
||||
gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(messagestext), FALSE);
|
||||
gtk_text_view_set_left_margin(GTK_TEXT_VIEW(messagestext), 2);
|
||||
gtk_text_view_set_right_margin(GTK_TEXT_VIEW(messagestext), 2);
|
||||
|
||||
// Messages tab
|
||||
messagestab = gtk_label_new ("Messages");
|
||||
gtk_widget_show (messagestab);
|
||||
gtk_notebook_set_tab_label (GTK_NOTEBOOK (tabs), gtk_notebook_get_nth_page (GTK_NOTEBOOK (tabs), 1), messagestab);
|
||||
messagestab = gtk_label_new("Messages");
|
||||
gtk_widget_show(messagestab);
|
||||
gtk_notebook_set_tab_label(GTK_NOTEBOOK(tabs), gtk_notebook_get_nth_page(GTK_NOTEBOOK(tabs), 1), messagestab);
|
||||
|
||||
// Dialogue box buttons layout
|
||||
buttons = gtk_hbutton_box_new ();
|
||||
gtk_widget_show (buttons);
|
||||
gtk_box_pack_start (GTK_BOX (vlayout), buttons, FALSE, TRUE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (buttons), 3);
|
||||
gtk_button_box_set_layout (GTK_BUTTON_BOX (buttons), GTK_BUTTONBOX_END);
|
||||
buttons = gtk_hbutton_box_new();
|
||||
gtk_widget_show(buttons);
|
||||
gtk_box_pack_start(GTK_BOX(vlayout), buttons, FALSE, TRUE, 0);
|
||||
gtk_container_set_border_width(GTK_CONTAINER(buttons), 3);
|
||||
gtk_button_box_set_layout(GTK_BUTTON_BOX(buttons), GTK_BUTTONBOX_END);
|
||||
|
||||
// Cancel button
|
||||
cancelbutton = gtk_button_new ();
|
||||
gtk_widget_show (cancelbutton);
|
||||
gtk_container_add (GTK_CONTAINER (buttons), cancelbutton);
|
||||
GTK_WIDGET_SET_FLAGS (cancelbutton, GTK_CAN_DEFAULT);
|
||||
gtk_widget_add_accelerator (cancelbutton, "grab_focus", accel_group,
|
||||
GDK_C, GDK_MOD1_MASK,
|
||||
GTK_ACCEL_VISIBLE);
|
||||
gtk_widget_add_accelerator (cancelbutton, "clicked", accel_group,
|
||||
GDK_Escape, 0,
|
||||
GTK_ACCEL_VISIBLE);
|
||||
cancelbutton = gtk_button_new();
|
||||
gtk_widget_show(cancelbutton);
|
||||
gtk_container_add(GTK_CONTAINER(buttons), cancelbutton);
|
||||
GTK_WIDGET_SET_FLAGS(cancelbutton, GTK_CAN_DEFAULT);
|
||||
gtk_widget_add_accelerator(cancelbutton, "grab_focus", accel_group,
|
||||
GDK_C, GDK_MOD1_MASK,
|
||||
GTK_ACCEL_VISIBLE);
|
||||
gtk_widget_add_accelerator(cancelbutton, "clicked", accel_group,
|
||||
GDK_Escape, 0,
|
||||
GTK_ACCEL_VISIBLE);
|
||||
|
||||
cancelbuttonalign = gtk_alignment_new (0.5, 0.5, 0, 0);
|
||||
gtk_widget_show (cancelbuttonalign);
|
||||
gtk_container_add (GTK_CONTAINER (cancelbutton), cancelbuttonalign);
|
||||
cancelbuttonalign = gtk_alignment_new(0.5, 0.5, 0, 0);
|
||||
gtk_widget_show(cancelbuttonalign);
|
||||
gtk_container_add(GTK_CONTAINER(cancelbutton), cancelbuttonalign);
|
||||
|
||||
cancelbuttonlayout = gtk_hbox_new (FALSE, 2);
|
||||
gtk_widget_show (cancelbuttonlayout);
|
||||
gtk_container_add (GTK_CONTAINER (cancelbuttonalign), cancelbuttonlayout);
|
||||
cancelbuttonlayout = gtk_hbox_new(FALSE, 2);
|
||||
gtk_widget_show(cancelbuttonlayout);
|
||||
gtk_container_add(GTK_CONTAINER(cancelbuttonalign), cancelbuttonlayout);
|
||||
|
||||
cancelbuttonicon = gtk_image_new_from_stock ("gtk-cancel", GTK_ICON_SIZE_BUTTON);
|
||||
gtk_widget_show (cancelbuttonicon);
|
||||
gtk_box_pack_start (GTK_BOX (cancelbuttonlayout), cancelbuttonicon, FALSE, FALSE, 0);
|
||||
cancelbuttonicon = gtk_image_new_from_stock("gtk-cancel", GTK_ICON_SIZE_BUTTON);
|
||||
gtk_widget_show(cancelbuttonicon);
|
||||
gtk_box_pack_start(GTK_BOX(cancelbuttonlayout), cancelbuttonicon, FALSE, FALSE, 0);
|
||||
|
||||
cancelbuttonlabel = gtk_label_new_with_mnemonic ("_Cancel");
|
||||
gtk_widget_show (cancelbuttonlabel);
|
||||
gtk_box_pack_start (GTK_BOX (cancelbuttonlayout), cancelbuttonlabel, FALSE, FALSE, 0);
|
||||
cancelbuttonlabel = gtk_label_new_with_mnemonic("_Cancel");
|
||||
gtk_widget_show(cancelbuttonlabel);
|
||||
gtk_box_pack_start(GTK_BOX(cancelbuttonlayout), cancelbuttonlabel, FALSE, FALSE, 0);
|
||||
|
||||
// Start button
|
||||
startbutton = gtk_button_new ();
|
||||
gtk_widget_show (startbutton);
|
||||
gtk_container_add (GTK_CONTAINER (buttons), startbutton);
|
||||
GTK_WIDGET_SET_FLAGS (startbutton, GTK_CAN_DEFAULT);
|
||||
gtk_widget_add_accelerator (startbutton, "grab_focus", accel_group,
|
||||
GDK_S, GDK_MOD1_MASK,
|
||||
GTK_ACCEL_VISIBLE);
|
||||
gtk_widget_add_accelerator (startbutton, "clicked", accel_group,
|
||||
GDK_Return, 0,
|
||||
GTK_ACCEL_VISIBLE);
|
||||
startbutton = gtk_button_new();
|
||||
gtk_widget_show(startbutton);
|
||||
gtk_container_add(GTK_CONTAINER(buttons), startbutton);
|
||||
GTK_WIDGET_SET_FLAGS(startbutton, GTK_CAN_DEFAULT);
|
||||
gtk_widget_add_accelerator(startbutton, "grab_focus", accel_group,
|
||||
GDK_S, GDK_MOD1_MASK,
|
||||
GTK_ACCEL_VISIBLE);
|
||||
gtk_widget_add_accelerator(startbutton, "clicked", accel_group,
|
||||
GDK_Return, 0,
|
||||
GTK_ACCEL_VISIBLE);
|
||||
|
||||
startbuttonalign = gtk_alignment_new (0.5, 0.5, 0, 0);
|
||||
gtk_widget_show (startbuttonalign);
|
||||
gtk_container_add (GTK_CONTAINER (startbutton), startbuttonalign);
|
||||
startbuttonalign = gtk_alignment_new(0.5, 0.5, 0, 0);
|
||||
gtk_widget_show(startbuttonalign);
|
||||
gtk_container_add(GTK_CONTAINER(startbutton), startbuttonalign);
|
||||
|
||||
startbuttonlayout = gtk_hbox_new (FALSE, 2);
|
||||
gtk_widget_show (startbuttonlayout);
|
||||
gtk_container_add (GTK_CONTAINER (startbuttonalign), startbuttonlayout);
|
||||
startbuttonlayout = gtk_hbox_new(FALSE, 2);
|
||||
gtk_widget_show(startbuttonlayout);
|
||||
gtk_container_add(GTK_CONTAINER(startbuttonalign), startbuttonlayout);
|
||||
|
||||
startbuttonicon = gtk_image_new_from_stock ("gtk-execute", GTK_ICON_SIZE_BUTTON);
|
||||
gtk_widget_show (startbuttonicon);
|
||||
gtk_box_pack_start (GTK_BOX (startbuttonlayout), startbuttonicon, FALSE, FALSE, 0);
|
||||
startbuttonicon = gtk_image_new_from_stock("gtk-execute", GTK_ICON_SIZE_BUTTON);
|
||||
gtk_widget_show(startbuttonicon);
|
||||
gtk_box_pack_start(GTK_BOX(startbuttonlayout), startbuttonicon, FALSE, FALSE, 0);
|
||||
|
||||
startbuttonlabel = gtk_label_new_with_mnemonic ("_Start");
|
||||
gtk_widget_show (startbuttonlabel);
|
||||
gtk_box_pack_start (GTK_BOX (startbuttonlayout), startbuttonlabel, FALSE, FALSE, 0);
|
||||
startbuttonlabel = gtk_label_new_with_mnemonic("_Start");
|
||||
gtk_widget_show(startbuttonlabel);
|
||||
gtk_box_pack_start(GTK_BOX(startbuttonlayout), startbuttonlabel, FALSE, FALSE, 0);
|
||||
|
||||
// Wire up the signals
|
||||
g_signal_connect ((gpointer) startwin, "delete_event",
|
||||
G_CALLBACK (on_startwin_delete_event),
|
||||
NULL);
|
||||
g_signal_connect ((gpointer) fullscreencheck, "toggled",
|
||||
G_CALLBACK (on_fullscreencheck_toggled),
|
||||
NULL);
|
||||
g_signal_connect ((gpointer) sounddrvcombo, "changed",
|
||||
G_CALLBACK (on_sounddrvcombo_changed),
|
||||
NULL);
|
||||
g_signal_connect ((gpointer) inputmousecheck, "toggled",
|
||||
G_CALLBACK (on_inputmousecheck_toggled),
|
||||
NULL);
|
||||
g_signal_connect ((gpointer) inputjoycheck, "toggled",
|
||||
G_CALLBACK (on_inputjoycheck_toggled),
|
||||
NULL);
|
||||
g_signal_connect ((gpointer) vmode3dcombo, "changed",
|
||||
G_CALLBACK (on_vmode3dcombo_changed),
|
||||
NULL);
|
||||
g_signal_connect ((gpointer) alwaysshowcheck, "toggled",
|
||||
G_CALLBACK (on_alwaysshowcheck_toggled),
|
||||
NULL);
|
||||
g_signal_connect ((gpointer) cancelbutton, "clicked",
|
||||
G_CALLBACK (on_cancelbutton_clicked),
|
||||
NULL);
|
||||
g_signal_connect ((gpointer) startbutton, "clicked",
|
||||
G_CALLBACK (on_startbutton_clicked),
|
||||
NULL);
|
||||
g_signal_connect((gpointer) startwin, "delete_event",
|
||||
G_CALLBACK(on_startwin_delete_event),
|
||||
NULL);
|
||||
g_signal_connect((gpointer) fullscreencheck, "toggled",
|
||||
G_CALLBACK(on_fullscreencheck_toggled),
|
||||
NULL);
|
||||
g_signal_connect((gpointer) sounddrvcombo, "changed",
|
||||
G_CALLBACK(on_sounddrvcombo_changed),
|
||||
NULL);
|
||||
g_signal_connect((gpointer) inputmousecheck, "toggled",
|
||||
G_CALLBACK(on_inputmousecheck_toggled),
|
||||
NULL);
|
||||
g_signal_connect((gpointer) inputjoycheck, "toggled",
|
||||
G_CALLBACK(on_inputjoycheck_toggled),
|
||||
NULL);
|
||||
g_signal_connect((gpointer) vmode3dcombo, "changed",
|
||||
G_CALLBACK(on_vmode3dcombo_changed),
|
||||
NULL);
|
||||
g_signal_connect((gpointer) alwaysshowcheck, "toggled",
|
||||
G_CALLBACK(on_alwaysshowcheck_toggled),
|
||||
NULL);
|
||||
g_signal_connect((gpointer) cancelbutton, "clicked",
|
||||
G_CALLBACK(on_cancelbutton_clicked),
|
||||
NULL);
|
||||
g_signal_connect((gpointer) startbutton, "clicked",
|
||||
G_CALLBACK(on_startbutton_clicked),
|
||||
NULL);
|
||||
|
||||
// Associate labels with their controls
|
||||
gtk_label_set_mnemonic_widget (GTK_LABEL (vmode3dlabel), vmode3dcombo);
|
||||
gtk_label_set_mnemonic_widget (GTK_LABEL (sounddrvlabel), sounddrvcombo);
|
||||
gtk_label_set_mnemonic_widget(GTK_LABEL(vmode3dlabel), vmode3dcombo);
|
||||
gtk_label_set_mnemonic_widget(GTK_LABEL(sounddrvlabel), sounddrvcombo);
|
||||
|
||||
/* Store pointers to all widgets, for use by lookup_widget(). */
|
||||
GLADE_HOOKUP_OBJECT_NO_REF (startwin, startwin, "startwin");
|
||||
GLADE_HOOKUP_OBJECT (startwin, hlayout, "hlayout");
|
||||
GLADE_HOOKUP_OBJECT (startwin, banner, "banner");
|
||||
GLADE_HOOKUP_OBJECT (startwin, vlayout, "vlayout");
|
||||
GLADE_HOOKUP_OBJECT (startwin, tabs, "tabs");
|
||||
GLADE_HOOKUP_OBJECT (startwin, configvlayout, "configvlayout");
|
||||
GLADE_HOOKUP_OBJECT (startwin, configlayout, "configlayout");
|
||||
GLADE_HOOKUP_OBJECT (startwin, fullscreencheck, "fullscreencheck");
|
||||
GLADE_HOOKUP_OBJECT (startwin, vmode3dlabel, "vmode3dlabel");
|
||||
GLADE_HOOKUP_OBJECT (startwin, inputdevlabel, "inputdevlabel");
|
||||
GLADE_HOOKUP_OBJECT (startwin, sounddrvlabel, "sounddrvlabel");
|
||||
GLADE_HOOKUP_OBJECT (startwin, sounddrvcombo, "sounddrvcombo");
|
||||
GLADE_HOOKUP_OBJECT (startwin, inputmousecheck, "inputmousecheck");
|
||||
GLADE_HOOKUP_OBJECT (startwin, inputjoycheck, "inputjoycheck");
|
||||
GLADE_HOOKUP_OBJECT (startwin, vmode3dcombo, "vmode3dcombo");
|
||||
GLADE_HOOKUP_OBJECT (startwin, alwaysshowcheck, "alwaysshowcheck");
|
||||
GLADE_HOOKUP_OBJECT (startwin, configtab, "configtab");
|
||||
GLADE_HOOKUP_OBJECT (startwin, messagesscroll, "messagesscroll");
|
||||
GLADE_HOOKUP_OBJECT (startwin, messagestext, "messagestext");
|
||||
GLADE_HOOKUP_OBJECT (startwin, messagestab, "messagestab");
|
||||
GLADE_HOOKUP_OBJECT (startwin, buttons, "buttons");
|
||||
GLADE_HOOKUP_OBJECT (startwin, cancelbutton, "cancelbutton");
|
||||
GLADE_HOOKUP_OBJECT (startwin, cancelbuttonalign, "cancelbuttonalign");
|
||||
GLADE_HOOKUP_OBJECT (startwin, cancelbuttonlayout, "cancelbuttonlayout");
|
||||
GLADE_HOOKUP_OBJECT (startwin, cancelbuttonicon, "cancelbuttonicon");
|
||||
GLADE_HOOKUP_OBJECT (startwin, cancelbuttonlabel, "cancelbuttonlabel");
|
||||
GLADE_HOOKUP_OBJECT (startwin, startbutton, "startbutton");
|
||||
GLADE_HOOKUP_OBJECT (startwin, startbuttonalign, "startbuttonalign");
|
||||
GLADE_HOOKUP_OBJECT (startwin, startbuttonlayout, "startbuttonlayout");
|
||||
GLADE_HOOKUP_OBJECT (startwin, startbuttonicon, "startbuttonicon");
|
||||
GLADE_HOOKUP_OBJECT (startwin, startbuttonlabel, "startbuttonlabel");
|
||||
GLADE_HOOKUP_OBJECT_NO_REF(startwin, startwin, "startwin");
|
||||
GLADE_HOOKUP_OBJECT(startwin, hlayout, "hlayout");
|
||||
GLADE_HOOKUP_OBJECT(startwin, banner, "banner");
|
||||
GLADE_HOOKUP_OBJECT(startwin, vlayout, "vlayout");
|
||||
GLADE_HOOKUP_OBJECT(startwin, tabs, "tabs");
|
||||
GLADE_HOOKUP_OBJECT(startwin, configvlayout, "configvlayout");
|
||||
GLADE_HOOKUP_OBJECT(startwin, configlayout, "configlayout");
|
||||
GLADE_HOOKUP_OBJECT(startwin, fullscreencheck, "fullscreencheck");
|
||||
GLADE_HOOKUP_OBJECT(startwin, vmode3dlabel, "vmode3dlabel");
|
||||
GLADE_HOOKUP_OBJECT(startwin, inputdevlabel, "inputdevlabel");
|
||||
GLADE_HOOKUP_OBJECT(startwin, sounddrvlabel, "sounddrvlabel");
|
||||
GLADE_HOOKUP_OBJECT(startwin, sounddrvcombo, "sounddrvcombo");
|
||||
GLADE_HOOKUP_OBJECT(startwin, inputmousecheck, "inputmousecheck");
|
||||
GLADE_HOOKUP_OBJECT(startwin, inputjoycheck, "inputjoycheck");
|
||||
GLADE_HOOKUP_OBJECT(startwin, vmode3dcombo, "vmode3dcombo");
|
||||
GLADE_HOOKUP_OBJECT(startwin, alwaysshowcheck, "alwaysshowcheck");
|
||||
GLADE_HOOKUP_OBJECT(startwin, configtab, "configtab");
|
||||
GLADE_HOOKUP_OBJECT(startwin, messagesscroll, "messagesscroll");
|
||||
GLADE_HOOKUP_OBJECT(startwin, messagestext, "messagestext");
|
||||
GLADE_HOOKUP_OBJECT(startwin, messagestab, "messagestab");
|
||||
GLADE_HOOKUP_OBJECT(startwin, buttons, "buttons");
|
||||
GLADE_HOOKUP_OBJECT(startwin, cancelbutton, "cancelbutton");
|
||||
GLADE_HOOKUP_OBJECT(startwin, cancelbuttonalign, "cancelbuttonalign");
|
||||
GLADE_HOOKUP_OBJECT(startwin, cancelbuttonlayout, "cancelbuttonlayout");
|
||||
GLADE_HOOKUP_OBJECT(startwin, cancelbuttonicon, "cancelbuttonicon");
|
||||
GLADE_HOOKUP_OBJECT(startwin, cancelbuttonlabel, "cancelbuttonlabel");
|
||||
GLADE_HOOKUP_OBJECT(startwin, startbutton, "startbutton");
|
||||
GLADE_HOOKUP_OBJECT(startwin, startbuttonalign, "startbuttonalign");
|
||||
GLADE_HOOKUP_OBJECT(startwin, startbuttonlayout, "startbuttonlayout");
|
||||
GLADE_HOOKUP_OBJECT(startwin, startbuttonicon, "startbuttonicon");
|
||||
GLADE_HOOKUP_OBJECT(startwin, startbuttonlabel, "startbuttonlabel");
|
||||
|
||||
gtk_window_add_accel_group (GTK_WINDOW (startwin), accel_group);
|
||||
gtk_window_add_accel_group(GTK_WINDOW(startwin), accel_group);
|
||||
|
||||
return startwin;
|
||||
}
|
||||
|
@ -516,7 +516,7 @@ int startwin_close(void)
|
|||
{
|
||||
if (!gtkenabled) return 0;
|
||||
if (!startwin) return 1;
|
||||
gtk_widget_destroy (startwin);
|
||||
gtk_widget_destroy(startwin);
|
||||
startwin = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
@ -535,7 +535,7 @@ int startwin_puts(const char *str)
|
|||
textbuffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(textview));
|
||||
|
||||
gtk_text_buffer_get_end_iter(textbuffer, &enditer);
|
||||
for (aptr = bptr = str; *aptr != 0; ) {
|
||||
for (aptr = bptr = str; *aptr != 0;) {
|
||||
switch (*bptr) {
|
||||
case '\b':
|
||||
if (bptr > aptr)
|
||||
|
@ -576,7 +576,7 @@ int startwin_settitle(const char *title)
|
|||
{
|
||||
if (!gtkenabled) return 0;
|
||||
if (!startwin) return 1;
|
||||
gtk_window_set_title (GTK_WINDOW (startwin), title);
|
||||
gtk_window_set_title(GTK_WINDOW(startwin), title);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -584,7 +584,7 @@ int startwin_idle(void *s)
|
|||
{
|
||||
if (!gtkenabled) return 0;
|
||||
//if (!startwin) return 1;
|
||||
gtk_main_iteration_do (FALSE);
|
||||
gtk_main_iteration_do(FALSE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -57,8 +57,8 @@ static void PopulateForm(int pgs)
|
|||
mode = checkvideomode(&settings.xdim, &settings.ydim, settings.bpp, settings.fullscreen, 1);
|
||||
if (mode < 0) {
|
||||
int cd[] = { 32, 24, 16, 15, 8, 0 };
|
||||
for (i=0; cd[i]; ) { if (cd[i] >= settings.bpp) i++; else break; }
|
||||
for ( ; cd[i]; i++) {
|
||||
for (i=0; cd[i];) { if (cd[i] >= settings.bpp) i++; else break; }
|
||||
for (; cd[i]; i++) {
|
||||
mode = checkvideomode(&settings.xdim, &settings.ydim, cd[i], settings.fullscreen, 1);
|
||||
if (mode < 0) continue;
|
||||
settings.bpp = cd[i];
|
||||
|
|
|
@ -36,7 +36,7 @@ Replacement cd-auth routine by Jonathon Fowler.
|
|||
* of it all. Because it's amusing. Who cares?
|
||||
*/
|
||||
|
||||
char testcd( char *fn, long testsiz )
|
||||
char testcd(char *fn, long testsiz)
|
||||
{
|
||||
DWORD driveletters;
|
||||
int i, fil, dalen;
|
||||
|
@ -67,7 +67,7 @@ char testcd( char *fn, long testsiz )
|
|||
}
|
||||
|
||||
#else
|
||||
char testcd( char *fn )
|
||||
char testcd(char *fn)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@ int Win_MsgBox(char *name, char *fmt, ...)
|
|||
|
||||
|
||||
// this replaces the Error() function in jmact/util_lib.c
|
||||
extern void Shutdown(void ); // game.c
|
||||
extern void Shutdown(void); // game.c
|
||||
void Error(char *error, ...)
|
||||
{
|
||||
char buf[1000];
|
||||
|
|
Loading…
Reference in a new issue