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