- mapped the remaining Shadow Warrior options to the CVARs.

This commit is contained in:
Christoph Oelckers 2019-10-27 16:53:00 +01:00
parent 2e7ba30068
commit bfea07570a
19 changed files with 85 additions and 305 deletions

View file

@ -42,7 +42,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "sound.h" #include "sound.h"
#include "view.h" #include "view.h"
EXTERN_CVAR(Bool, hud_messages)
EXTERN_CVAR(Bool, hud_powerupduration) EXTERN_CVAR(Bool, hud_powerupduration)
BEGIN_BLD_NS BEGIN_BLD_NS

View file

@ -61,11 +61,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "warp.h" #include "warp.h"
#include "weapon.h" #include "weapon.h"
CUSTOM_CVARD(Bool, hud_messages, true, CVAR_ARCHIVE|CVAR_FRONTEND_BLOOD, "enable/disable showing messages")
{
Blood::gGameMessageMgr.SetState(self);
}
CVARD(Bool, hud_powerupduration, true, CVAR_ARCHIVE|CVAR_FRONTEND_BLOOD, "enable/disable displaying the remaining seconds for power-ups") CVARD(Bool, hud_powerupduration, true, CVAR_ARCHIVE|CVAR_FRONTEND_BLOOD, "enable/disable displaying the remaining seconds for power-ups")

View file

@ -245,6 +245,11 @@ CVARD(Bool, hud_showmapname, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "enable/disab
CVARD(Bool, hud_position, false, CVAR_ARCHIVE, "aligns the status bar to the bottom/top") CVARD(Bool, hud_position, false, CVAR_ARCHIVE, "aligns the status bar to the bottom/top")
CVARD(Bool, hud_bgstretch, false, CVAR_ARCHIVE|CVAR_FRONTEND_DUKELIKE, "enable/disable background image stretching in wide resolutions") CVARD(Bool, hud_bgstretch, false, CVAR_ARCHIVE|CVAR_FRONTEND_DUKELIKE, "enable/disable background image stretching in wide resolutions")
CVARD(Int, hud_messagetime, 120, CVAR_ARCHIVE|CVAR_FRONTEND_DUKELIKE, "length of time to display multiplayer chat messages") CVARD(Int, hud_messagetime, 120, CVAR_ARCHIVE|CVAR_FRONTEND_DUKELIKE, "length of time to display multiplayer chat messages")
// Should be available to all games - the message handling should also be consolidated into a game independent feature.
/*CUSTOM_*/CVARD(Bool, hud_messages, true, CVAR_ARCHIVE | CVAR_FRONTEND_BLOOD|CVAR_FRONTEND_SHADOWWARRIOR, "enable/disable showing messages")
//{
//Blood::gGameMessageMgr.SetState(self); // this is for terminaing an active message. Cannot be done like this because CVARs are global.
//}
CVARD_NAMED(Int, hud_numbertile, althud_numbertile, 2930, CVAR_ARCHIVE|CVAR_FRONTEND_DUKELIKE, "first tile in alt hud number set") CVARD_NAMED(Int, hud_numbertile, althud_numbertile, 2930, CVAR_ARCHIVE|CVAR_FRONTEND_DUKELIKE, "first tile in alt hud number set")
CVARD_NAMED(Int, hud_numberpal, althud_numberpal, 0, CVAR_ARCHIVE|CVAR_FRONTEND_DUKELIKE, "pal for alt hud numbers") CVARD_NAMED(Int, hud_numberpal, althud_numberpal, 0, CVAR_ARCHIVE|CVAR_FRONTEND_DUKELIKE, "pal for alt hud numbers")

View file

@ -62,6 +62,7 @@ EXTERN_CVAR(Int, hud_messagetime)
EXTERN_CVAR(Bool, hud_glowingquotes) EXTERN_CVAR(Bool, hud_glowingquotes)
EXTERN_CVAR(Int, hud_textscale) EXTERN_CVAR(Int, hud_textscale)
EXTERN_CVAR(Int, hud_weaponscale) EXTERN_CVAR(Int, hud_weaponscale)
EXTERN_CVAR(Bool, hud_messages)
EXTERN_CVAR(Int, althud_numbertile) EXTERN_CVAR(Int, althud_numbertile)
EXTERN_CVAR(Int, althud_numberpal) EXTERN_CVAR(Int, althud_numberpal)

View file

@ -68,7 +68,7 @@ void RoomCheat(PLAYERp UNUSED(pp), char *UNUSED(cheat_string))
void SecretCheat(PLAYERp UNUSED(pp), char *UNUSED(cheat_string)) void SecretCheat(PLAYERp UNUSED(pp), char *UNUSED(cheat_string))
{ {
gs.Stats = !gs.Stats; hud_stats = !hud_stats;
} }
void NextCheat(PLAYERp UNUSED(pp), char *UNUSED(cheat_string)) void NextCheat(PLAYERp UNUSED(pp), char *UNUSED(cheat_string))

View file

@ -756,7 +756,7 @@ analyzesprites(int viewx, int viewy, int viewz, SWBOOL mirror)
} }
} }
if (gs.Shadows && TEST(tu->Flags, SPR_SHADOW)) if (r_shadows && TEST(tu->Flags, SPR_SHADOW))
{ {
DoShadows(tsp, viewz); DoShadows(tsp, viewz);
} }
@ -1432,7 +1432,7 @@ void SecretInfo(PLAYERp pp)
x = x / (xdim/320.0); x = x / (xdim/320.0);
y = y / (ydim/200.0); y = y / (ydim/200.0);
if (gs.Stats) if (hud_stats)
{ {
sprintf(ds, "Kills %d/%d", Player->Kills, TotalKillable); sprintf(ds, "Kills %d/%d", Player->Kills, TotalKillable);
DisplayMiniBarSmString(pp, x, y, PAL_XLAT_BROWN, ds); DisplayMiniBarSmString(pp, x, y, PAL_XLAT_BROWN, ds);
@ -1805,7 +1805,7 @@ void DrawCrosshair(PLAYERp pp)
extern int CrosshairX, CrosshairY; extern int CrosshairX, CrosshairY;
extern SWBOOL DemoMode,CameraTestMode; extern SWBOOL DemoMode,CameraTestMode;
if (!gs.Crosshair) if (!cl_crosshair)
return; return;
if (DemoMode || CameraTestMode) if (DemoMode || CameraTestMode)

View file

@ -92,6 +92,7 @@ Things required to make savegames work:
#include "common.h" #include "common.h"
#include "common_game.h" #include "common_game.h"
#include "gameconfigfile.h"
//#include "crc32.h" //#include "crc32.h"
@ -198,21 +199,8 @@ uint8_t AutoColor;
const GAME_SET gs_defaults = const GAME_SET gs_defaults =
{ {
32768, // mouse speed
128, // music vol
192, // fx vol
2, // border 2, // border
0, // border tile 0, // border tile
FALSE, // mouse aiming
FALSE, // mouse look
FALSE, // mouse invert
TRUE, // bobbing
FALSE, // tilting
TRUE, // shadows
FALSE, // auto run
TRUE, // crosshair
TRUE, // auto aim
TRUE, // messages
// Network game settings // Network game settings
0, // GameType 0, // GameType
@ -225,9 +213,6 @@ const GAME_SET gs_defaults =
0, // Time Limit 0, // Time Limit
0, // Color 0, // Color
TRUE, // nuke TRUE, // nuke
TRUE, // voxels
FALSE, // stats
FALSE, // mouse aiming on
"Track??", // waveform track name "Track??", // waveform track name
}; };
GAME_SET gs; GAME_SET gs;
@ -685,7 +670,7 @@ TerminateGame(void)
KB_Shutdown(); KB_Shutdown();
engineUnInit(); engineUnInit();
TermSetup(); G_SaveConfig();
//Terminate3DSounds(); // Kill the sounds linked list //Terminate3DSounds(); // Kill the sounds linked list
UnInitSound(); UnInitSound();
@ -795,30 +780,6 @@ void Set_GameMode(void)
//MONO_PRINT(ds); //MONO_PRINT(ds);
result = COVERsetgamemode(ScreenMode, ScreenWidth, ScreenHeight, ScreenBPP); result = COVERsetgamemode(ScreenMode, ScreenWidth, ScreenHeight, ScreenBPP);
if (result < 0)
{
buildprintf("Failure setting video mode %dx%dx%d %s! Attempting safer mode...",
*ScreenWidth,*ScreenHeight,*ScreenBPP,*ScreenMode ? "fullscreen" : "windowed");
ScreenMode = 0;
ScreenWidth = 640;
ScreenHeight = 480;
ScreenBPP = 8;
result = COVERsetgamemode(ScreenMode, ScreenWidth, ScreenHeight, ScreenBPP);
if (result < 0)
{
//uninitmultiplayers();
//uninitkeys();
KB_Shutdown();
engineUnInit();
TermSetup();
UnInitSound();
timerUninit();
DosScreen();
uninitgroupfile();
exit(0);
}
}
} }
void MultiSharewareCheck(void) void MultiSharewareCheck(void)
@ -836,13 +797,13 @@ void MultiSharewareCheck(void)
#endif #endif
//uninitmultiplayers(); //uninitmultiplayers();
//uninitkeys(); //uninitkeys();
G_SaveConfig();
KB_Shutdown(); KB_Shutdown();
engineUnInit(); engineUnInit();
TermSetup();
UnInitSound(); UnInitSound();
timerUninit(); timerUninit();
uninitgroupfile(); uninitgroupfile();
exit(0); Bexit(0);
} }
} }
@ -1448,10 +1409,10 @@ InitLevel(void)
if (ArgCheat) if (ArgCheat)
{ {
SWBOOL bak = gs.Messages; SWBOOL bak = hud_messages;
gs.Messages = FALSE; hud_messages = FALSE;
EveryCheatToggle(&Player[0],NULL); EveryCheatToggle(&Player[0],NULL);
gs.Messages = bak; hud_messages = bak;
GodMode = TRUE; GodMode = TRUE;
} }
@ -3046,10 +3007,7 @@ void InitPlayerGameSettings(void)
RESET(Player[myconnectindex].Flags, PF_AUTO_AIM); RESET(Player[myconnectindex].Flags, PF_AUTO_AIM);
} }
if (gs.MouseAimingOn) g_MyAimMode = in_aimmode;
SET(Player[myconnectindex].Flags, PF_MOUSE_AIMING_ON);
else
RESET(Player[myconnectindex].Flags, PF_MOUSE_AIMING_ON);
} }
@ -3137,7 +3095,7 @@ void InitRunLevel(void)
snd_reversestereo.Callback(); snd_reversestereo.Callback();
snd_fxvolume.Callback(); snd_fxvolume.Callback();
FX_SetVolume(gs.SoundVolume); // Turn volume back up FX_SetVolume(snd_fxvolume); // Turn volume back up
if (snd_ambience) if (snd_ambience)
StartAmbientSound(); StartAmbientSound();
} }
@ -3148,7 +3106,7 @@ RunLevel(void)
int i; int i;
InitRunLevel(); InitRunLevel();
FX_SetVolume(gs.SoundVolume); FX_SetVolume(snd_fxvolume);
SetSongVolume(mus_volume); SetSongVolume(mus_volume);
#if 0 #if 0
@ -4587,9 +4545,9 @@ FunctionKeys(PLAYERp pp)
{ {
KEY_PRESSED(KEYSC_F8) = 0; KEY_PRESSED(KEYSC_F8) = 0;
gs.Messages ^= 1; hud_messages = !hud_messages;
if (gs.Messages) if (hud_messages)
PutStringInfoLine(pp, "Messages ON"); PutStringInfoLine(pp, "Messages ON");
else else
PutStringInfoLine(pp, "Messages OFF"); PutStringInfoLine(pp, "Messages OFF");
@ -4994,33 +4952,19 @@ getinput(SW_PACKET *loc)
// MAKE SURE THIS WILL GET SET // MAKE SURE THIS WILL GET SET
SET_LOC_KEY(loc->bits, SK_QUIT_GAME, MultiPlayQuitFlag); SET_LOC_KEY(loc->bits, SK_QUIT_GAME, MultiPlayQuitFlag);
#if 0 // What kind of crap is this...? if (in_aimmode)
if (gs.MouseAimingType == 1) // while held g_MyAimMode = 0;
{
if (BUTTON(gamefunc_Mouse_Aiming)) if (BUTTON(gamefunc_Mouse_Aiming))
{ {
SET(pp->Flags, PF_MOUSE_AIMING_ON); if (in_aimmode)
gs.MouseAimingOn = TRUE; g_MyAimMode = 1;
}
else else
{ {
if (TEST(pp->Flags, PF_MOUSE_AIMING_ON)) CONTROL_ClearButton(gamefunc_Mouse_Aiming);
g_MyAimMode = !g_MyAimMode;
if (g_MyAimMode)
{ {
SET_LOC_KEY(loc->bits, SK_LOOK_UP, TRUE);
RESET(pp->Flags, PF_MOUSE_AIMING_ON);
gs.MouseAimingOn = FALSE;
}
}
}
else if (gs.MouseAimingType == 0) // togglable button
{
if (BUTTON(gamefunc_Mouse_Aiming) && !BUTTONHELD(gamefunc_Mouse_Aiming))
{
FLIP(pp->Flags, PF_MOUSE_AIMING_ON);
gs.MouseAimingOn = !gs.MouseAimingOn;
if (!TEST(pp->Flags, PF_MOUSE_AIMING_ON))
{
SET_LOC_KEY(loc->bits, SK_LOOK_UP, TRUE);
PutStringInfo(pp, "Mouse Aiming Off"); PutStringInfo(pp, "Mouse Aiming Off");
} }
else else
@ -5030,20 +4974,6 @@ getinput(SW_PACKET *loc)
} }
} }
if (TEST(pp->Flags, PF_MOUSE_AIMING_ON))
{
mouseaxis = analog_lookingupanddown;
}
else
{
mouseaxis = MouseAnalogAxes[1];
}
if (mouseaxis != MouseYAxisMode)
{
CONTROL_MapAnalogAxis(1, mouseaxis, controldevice_mouse);
MouseYAxisMode = mouseaxis;
}
#endif
CONTROL_GetInput(&info); CONTROL_GetInput(&info);
@ -5123,7 +5053,7 @@ getinput(SW_PACKET *loc)
aimvel = info.dpitch; aimvel = info.dpitch;
aimvel = min(127, aimvel); aimvel = min(127, aimvel);
aimvel = max(-128, aimvel); aimvel = max(-128, aimvel);
if (gs.MouseInvert) if (in_mouseflip)
aimvel = -aimvel; aimvel = -aimvel;
svel -= info.dx; svel -= info.dx;

View file

@ -2330,8 +2330,6 @@ void SetupMirrorTiles(void); // rooms.c
SWBOOL FAF_Sector(short sectnum); // rooms.c SWBOOL FAF_Sector(short sectnum); // rooms.c
int GetZadjustment(short sectnum,short hitag); // rooms.c int GetZadjustment(short sectnum,short hitag); // rooms.c
void TermSetup(void); // swconfig.c
void InitSetup(void); // setup.c void InitSetup(void); // setup.c
void LoadKVXFromScript(const char *filename); // scrip2.c void LoadKVXFromScript(const char *filename); // scrip2.c

View file

@ -1082,7 +1082,7 @@ JAnalyzeSprites(uspritetype * tspr)
// Check for voxels // Check for voxels
//if (bVoxelsOn) //if (bVoxelsOn)
if (gs.Voxels) if (r_voxels)
{ {
if (aVoxelArray[tspr->picnum].Voxel >= 0) if (aVoxelArray[tspr->picnum].Voxel >= 0)
{ {

View file

@ -2085,9 +2085,9 @@ MNU_InitMenus(void)
{ {
pClearTextLine(Player + myconnectindex, TEXT_INFO_LINE(0)); pClearTextLine(Player + myconnectindex, TEXT_INFO_LINE(0));
slidersettings[sldr_mouse] = gs.MouseSpeed/(MOUSE_SENS_MAX_VALUE/SLDR_MOUSESENSEMAX); slidersettings[sldr_mouse] = in_mousesensitivity; // (MOUSE_SENS_MAX_VALUE / SLDR_MOUSESENSEMAX);
slidersettings[sldr_sndfxvolume] = gs.SoundVolume / (FX_VOL_MAX_VALUE/SLDR_SNDFXVOLMAX); slidersettings[sldr_sndfxvolume] = snd_fxvolume / (FX_VOL_MAX_VALUE/SLDR_SNDFXVOLMAX);
slidersettings[sldr_musicvolume] = mus_volume / (MUSIC_VOL_MAX_VALUE/SLDR_MUSICVOLMAX); slidersettings[sldr_musicvolume] = mus_volume / (MUSIC_VOL_MAX_VALUE/SLDR_MUSICVOLMAX);
slidersettings[sldr_scrsize] = gs.BorderNum; slidersettings[sldr_scrsize] = gs.BorderNum;
slidersettings[sldr_brightness] = 10; slidersettings[sldr_brightness] = 10;
@ -2110,24 +2110,24 @@ MNU_InitMenus(void)
slidersettings[sldr_videores] = i; slidersettings[sldr_videores] = i;
} }
buttonsettings[btn_auto_run] = gs.AutoRun; buttonsettings[btn_auto_run] = cl_autorun;
buttonsettings[btn_auto_aim] = cl_autoaim; buttonsettings[btn_auto_aim] = cl_autoaim;
buttonsettings[btn_messages] = gs.Messages; buttonsettings[btn_messages] = hud_messages;
buttonsettings[btn_crosshair] = gs.Crosshair; buttonsettings[btn_crosshair] = cl_crosshair;
// buttonsettings[btn_bobbing] = gs.Bobbing; buttonsettings[btn_bobbing] = cl_viewbob;
buttonsettings[btn_shadows] = gs.Shadows; buttonsettings[btn_shadows] = r_shadows;
buttonsettings[btn_mouse_aim] = gs.MouseAimingType; buttonsettings[btn_mouse_aim] = in_aimmode;
buttonsettings[btn_mouse_invert] = gs.MouseInvert; buttonsettings[btn_mouse_invert] = in_mouseflip;
buttonsettings[btn_sound] = snd_enabled; buttonsettings[btn_sound] = snd_enabled;
buttonsettings[btn_music] = mus_enabled; buttonsettings[btn_music] = mus_enabled;
buttonsettings[btn_talking] = snd_speech; buttonsettings[btn_talking] = snd_speech;
buttonsettings[btn_voxels] = gs.Voxels; buttonsettings[btn_voxels] = r_voxels;
buttonsettings[btn_ambience] = snd_ambience; buttonsettings[btn_ambience] = snd_ambience;
buttonsettings[btn_playcd] = true;// gs.PlayCD; buttonsettings[btn_playcd] = true;// gs.PlayCD;
buttonsettings[btn_flipstereo] = snd_reversestereo; buttonsettings[btn_flipstereo] = snd_reversestereo;
buttonsettings[btn_stats] = gs.Stats; buttonsettings[btn_stats] = hud_stats;
slidersettings[sldr_gametype] = gs.NetGameType; slidersettings[sldr_gametype] = gs.NetGameType;
slidersettings[sldr_netlevel] = gs.NetLevel; slidersettings[sldr_netlevel] = gs.NetLevel;
@ -3231,10 +3231,10 @@ MNU_DoButton(MenuItem_p item, SWBOOL draw)
gs.NetNuke = state = buttonsettings[item->button]; gs.NetNuke = state = buttonsettings[item->button];
break; break;
case btn_voxels: case btn_voxels:
gs.Voxels = state = buttonsettings[item->button]; r_voxels = state = buttonsettings[item->button];
break; break;
case btn_stats: case btn_stats:
gs.Stats = state = buttonsettings[item->button]; hud_stats = state = buttonsettings[item->button];
break; break;
case btn_markers: case btn_markers:
gs.NetSpawnMarkers = state = buttonsettings[item->button]; gs.NetSpawnMarkers = state = buttonsettings[item->button];
@ -3246,7 +3246,7 @@ MNU_DoButton(MenuItem_p item, SWBOOL draw)
gs.NetHurtTeammate = state = buttonsettings[item->button]; gs.NetHurtTeammate = state = buttonsettings[item->button];
break; break;
case btn_crosshair: case btn_crosshair:
gs.Crosshair = state = buttonsettings[item->button]; cl_crosshair = state = buttonsettings[item->button];
break; break;
case btn_auto_aim: case btn_auto_aim:
last_value = cl_autoaim; last_value = cl_autoaim;
@ -3255,30 +3255,24 @@ MNU_DoButton(MenuItem_p item, SWBOOL draw)
MenuButtonAutoAim = TRUE; MenuButtonAutoAim = TRUE;
break; break;
case btn_messages: case btn_messages:
gs.Messages = state = buttonsettings[item->button]; hud_messages = state = buttonsettings[item->button];
break; break;
case btn_auto_run: case btn_auto_run:
last_value = gs.AutoRun; last_value = cl_autorun;
gs.AutoRun = state = buttonsettings[item->button]; cl_autorun = state = buttonsettings[item->button];
if (gs.AutoRun != last_value) if (cl_autorun != last_value)
MenuButtonAutoRun = TRUE; MenuButtonAutoRun = TRUE;
break; break;
case btn_mouse_aim: case btn_mouse_aim:
last_value = gs.MouseAimingType; last_value = in_aimmode;
gs.MouseAimingType = state = buttonsettings[item->button]; in_aimmode = state = buttonsettings[item->button];
if (gs.MouseAimingType != last_value)
{
//RESET(pp->Flags, PF_MOUSE_AIMING_ON);
//gs.MouseAimingOn = FALSE;
}
//extra_text = gs.MouseAimingType ? "Momentary" : "Toggle";
break; break;
case btn_mouse_invert: case btn_mouse_invert:
gs.MouseInvert = state = buttonsettings[item->button]; in_mouseflip = state = buttonsettings[item->button];
break;
case btn_bobbing:
cl_viewbob = state = buttonsettings[item->button];
break; break;
// case btn_bobbing:
// gs.Bobbing = state = buttonsettings[item->button];
// break;
case btn_sound: case btn_sound:
if (!FxInitialized) if (!FxInitialized)
@ -3348,7 +3342,7 @@ MNU_DoButton(MenuItem_p item, SWBOOL draw)
snd_reversestereo = state = buttonsettings[item->button]; snd_reversestereo = state = buttonsettings[item->button];
break; break;
case btn_shadows: case btn_shadows:
gs.Shadows = state = buttonsettings[item->button]; r_shadows = state = buttonsettings[item->button];
break; break;
case btn_parental: case btn_parental:
@ -3406,7 +3400,7 @@ MNU_DoButton(MenuItem_p item, SWBOOL draw)
switch (item->button) switch (item->button)
{ {
case btn_mouse_aim: case btn_mouse_aim:
extra_text = gs.MouseAimingType ? "Momentary" : "Toggle"; extra_text = in_aimmode ? "Momentary" : "Toggle";
break; break;
default: break; default: break;
} }
@ -3486,8 +3480,7 @@ MNU_DoSlider(short dir, MenuItem_p item, SWBOOL draw)
slidersettings[sldr_mouse] = offset; slidersettings[sldr_mouse] = offset;
gs.MouseSpeed = offset * (MOUSE_SENS_MAX_VALUE/SLDR_MOUSESENSEMAX); in_mousesensitivity = float(offset * (MOUSE_SENS_MAX_VALUE/SLDR_MOUSESENSEMAX));// [JM] Will need to verify this. !CHECKME!
in_mousesensitivity = float(gs.MouseSpeed); // [JM] Will need to verify this. !CHECKME!
break; break;
case sldr_sndfxvolume: case sldr_sndfxvolume:
@ -3501,8 +3494,8 @@ MNU_DoSlider(short dir, MenuItem_p item, SWBOOL draw)
offset = min(offset, short(SLDR_SNDFXVOLMAX-1)); offset = min(offset, short(SLDR_SNDFXVOLMAX-1));
slidersettings[sldr_sndfxvolume] = offset; slidersettings[sldr_sndfxvolume] = offset;
gs.SoundVolume = FX_MIN + (offset * VOL_MUL); snd_fxvolume = FX_MIN + (offset * VOL_MUL);
FX_SetVolume(gs.SoundVolume); FX_SetVolume(snd_fxvolume);
break; break;
case sldr_musicvolume: case sldr_musicvolume:

View file

@ -466,7 +466,7 @@ InitNetPlayerOptions(void)
if (CommEnabled) if (CommEnabled)
{ {
p.PacketType = PACKET_TYPE_PLAYER_OPTIONS; p.PacketType = PACKET_TYPE_PLAYER_OPTIONS;
p.AutoRun = gs.AutoRun; p.AutoRun = cl_autorun;
p.Color = gs.NetColor; p.Color = gs.NetColor;
strncpy(p.PlayerName, playername, 32); strncpy(p.PlayerName, playername, 32);

View file

@ -251,10 +251,7 @@ void pSetSuicide(PANEL_SPRITEp psp)
void pToggleCrosshair(PLAYERp pp) void pToggleCrosshair(PLAYERp pp)
{ {
if (gs.Crosshair) cl_crosshair = !cl_crosshair;
gs.Crosshair = FALSE;
else
gs.Crosshair = TRUE;
} }
// Player has a chance of yelling out during combat, when firing a weapon. // Player has a chance of yelling out during combat, when firing a weapon.

View file

@ -1819,7 +1819,7 @@ PlayerAutoLook(PLAYERp pp)
if (!TEST(pp->Flags, PF_FLYING|PF_SWIMMING|PF_DIVING|PF_CLIMBING|PF_JUMPING|PF_FALLING)) if (!TEST(pp->Flags, PF_FLYING|PF_SWIMMING|PF_DIVING|PF_CLIMBING|PF_JUMPING|PF_FALLING))
{ {
if (!TEST(pp->Flags, PF_MOUSE_AIMING_ON) && TEST(sector[pp->cursectnum].floorstat, FLOOR_STAT_SLOPE)) // If the floor is sloped if (!g_MyAimMode && TEST(sector[pp->cursectnum].floorstat, FLOOR_STAT_SLOPE)) // If the floor is sloped
{ {
// Get a point, 512 units ahead of player's position // Get a point, 512 units ahead of player's position
x = pp->posx + (sintable[(pp->pang + 512) & 2047] >> 5); x = pp->posx + (sintable[(pp->pang + 512) & 2047] >> 5);
@ -1876,6 +1876,7 @@ DoPlayerHorizon(PLAYERp pp)
// //DSPRINTF(ds,"pp->horizoff, %d", pp->horizoff); // //DSPRINTF(ds,"pp->horizoff, %d", pp->horizoff);
// MONO_PRINT(ds); // MONO_PRINT(ds);
// Fixme: This should probably be made optional.
PlayerAutoLook(pp); PlayerAutoLook(pp);
if (pp->input.aimvel) if (pp->input.aimvel)
@ -1885,19 +1886,10 @@ DoPlayerHorizon(PLAYERp pp)
} }
if (TEST_SYNC_KEY(pp, SK_CENTER_VIEW)) if (TEST_SYNC_KEY(pp, SK_CENTER_VIEW))
{
// if (TEST(pp->Flags, PF_MOUSE_AIMING_ON))
{ {
pp->horiz = pp->horizbase = 100; pp->horiz = pp->horizbase = 100;
pp->horizoff = 0; pp->horizoff = 0;
} }
// else
{
//gs.MouseAimingOn = FALSE;
// RESET(pp->Flags, PF_LOCK_HORIZ);
// SET(pp->Flags, PF_LOOKING);
}
}
// this is the locked type // this is the locked type
if (TEST_SYNC_KEY(pp, SK_SNAP_UP) || TEST_SYNC_KEY(pp, SK_SNAP_DOWN)) if (TEST_SYNC_KEY(pp, SK_SNAP_UP) || TEST_SYNC_KEY(pp, SK_SNAP_DOWN))

View file

@ -1279,7 +1279,7 @@ int LoadGame(short save_num)
PlaySong(LevelSong, RedBookSong[Level], TRUE, TRUE); PlaySong(LevelSong, RedBookSong[Level], TRUE, TRUE);
if (snd_ambience) if (snd_ambience)
StartAmbientSound(); StartAmbientSound();
FX_SetVolume(gs.SoundVolume); FX_SetVolume(snd_fxvolume);
SetSongVolume(mus_volume); SetSongVolume(mus_volume);
TRAVERSE_CONNECT(i) TRAVERSE_CONNECT(i)

View file

@ -31,21 +31,8 @@ BEGIN_SW_NS
typedef struct typedef struct
{ {
int MouseSpeed;
int mus_volume;
int SoundVolume;
int8_t BorderNum; int8_t BorderNum;
int8_t BorderTile; int8_t BorderTile; // Network only - disabled
SWBOOL MouseAimingType;
SWBOOL MouseLook;
SWBOOL MouseInvert;
SWBOOL Bobbing;
SWBOOL Tilting;
SWBOOL Shadows;
SWBOOL AutoRun;
SWBOOL Crosshair;
SWBOOL AutoAim;
SWBOOL Messages;
// Net Options from Menus // Net Options from Menus
uint8_t NetGameType; // 0=DeathMatch [spawn], 1=Cooperative 2=DeathMatch [no spawn] uint8_t NetGameType; // 0=DeathMatch [spawn], 1=Cooperative 2=DeathMatch [no spawn]
uint8_t NetLevel; // 1-28 uint8_t NetLevel; // 1-28
@ -57,9 +44,6 @@ typedef struct
uint8_t NetTimeLimit; // Limit time of game uint8_t NetTimeLimit; // Limit time of game
uint8_t NetColor; // Chosen color for player uint8_t NetColor; // Chosen color for player
SWBOOL NetNuke; SWBOOL NetNuke;
SWBOOL Voxels;
SWBOOL Stats;
SWBOOL MouseAimingOn; // whether it was on or off - NOT the type of mouse aiming
//SWBOOL PlayCD; // Not implemented and no idea how to support it without the music assets. //SWBOOL PlayCD; // Not implemented and no idea how to support it without the music assets.
char WaveformTrackName[MAXWAVEFORMTRACKLENGTH]; char WaveformTrackName[MAXWAVEFORMTRACKLENGTH];
} GAME_SET, *GAME_SETp; } GAME_SET, *GAME_SETp;

View file

@ -343,9 +343,6 @@ InitFX(void)
// Select which cards to use // Select which cards to use
SoundStartup(); SoundStartup();
// Get the current volume of the music and sound fx
gs.SoundVolume = FX_GetVolume();
for (vp = voc; vp < &voc[SIZ(voc)]; vp++) for (vp = voc; vp < &voc[SIZ(voc)]; vp++)
{ {
vp->playing = 0; vp->playing = 0;

View file

@ -5786,7 +5786,7 @@ KeyMain:
PlayerUpdateHealth(pp, InventoryDecls[InvDecl_Booster].amount); // This is for health PlayerUpdateHealth(pp, InventoryDecls[InvDecl_Booster].amount); // This is for health
// over 100% // over 100%
// Say something witty // Say something witty
if (pp == Player+myconnectindex && gs.Messages) if (pp == Player+myconnectindex && hud_messages)
{ {
if (adult_lockout || Global_PLock) if (adult_lockout || Global_PLock)
sprintf(ds,"Fortune Say: %s\n",ReadFortune[STD_RANDOM_RANGE(10)]); sprintf(ds,"Fortune Say: %s\n",ReadFortune[STD_RANDOM_RANGE(10)]);

View file

@ -100,120 +100,9 @@ void DecodePassword(char *pw)
DrawScreen = bak_DrawScreen; DrawScreen = bak_DrawScreen;
} }
/*
===================
=
= ReadGameSetup
=
===================
*/
void ReadGameSetup(int32_t scripthandle)
{
int dummy;
int ret;
dummy = -1;
SCRIPT_GetNumber(scripthandle, "Options", "BorderTile",&dummy);
if (dummy != -1) gs.BorderTile = dummy;
dummy = -1;
SCRIPT_GetNumber(scripthandle, "Options", "Bobbing",&dummy);
if (dummy != -1) gs.Bobbing = dummy;
dummy = -1;
SCRIPT_GetNumber(scripthandle, "Options", "Tilting",&dummy);
if (dummy != -1) gs.Tilting = dummy;
dummy = -1;
SCRIPT_GetNumber(scripthandle, "Options", "Shadows",&dummy);
if (dummy != -1) gs.Shadows = dummy;
dummy = -1;
SCRIPT_GetNumber(scripthandle, "Options", "AutoRun",&dummy);
if (dummy != -1) gs.AutoRun = dummy;
dummy = -1;
SCRIPT_GetNumber(scripthandle, "Options", "Crosshair",&dummy);
if (dummy != -1) gs.Crosshair = dummy;
dummy = -1;
SCRIPT_GetNumber(scripthandle, "Options", "Messages",&dummy);
if (dummy != -1) gs.Messages = dummy;
dummy = -1;
SCRIPT_GetNumber(scripthandle, "Controls", "MouseAiming",&dummy);
if (dummy != -1) gs.MouseAimingType = dummy;
dummy = -1;
SCRIPT_GetNumber(scripthandle, "Options", "NetGameType",&dummy);
if (dummy != -1) gs.NetGameType = dummy;
dummy = -1;
SCRIPT_GetNumber(scripthandle, "Options", "NetLevel",&dummy);
if (dummy != -1) gs.NetLevel = dummy;
dummy = -1;
SCRIPT_GetNumber(scripthandle, "Options", "NetMonsters",&dummy);
if (dummy != -1) gs.NetMonsters = dummy;
dummy = -1;
SCRIPT_GetNumber(scripthandle, "Options", "NetHurtTeammate",&dummy);
if (dummy != -1) gs.NetHurtTeammate = dummy;
dummy = -1;
SCRIPT_GetNumber(scripthandle, "Options", "NetSpawnMarkers",&dummy);
if (dummy != -1) gs.NetSpawnMarkers = dummy;
dummy = -1;
SCRIPT_GetNumber(scripthandle, "Options", "NetTeamPlay",&dummy);
if (dummy != -1) gs.NetTeamPlay = dummy;
dummy = -1;
SCRIPT_GetNumber(scripthandle, "Options", "NetKillLimit",&dummy);
if (dummy != -1) gs.NetKillLimit = dummy;
dummy = -1;
SCRIPT_GetNumber(scripthandle, "Options", "NetTimeLimit",&dummy);
if (dummy != -1) gs.NetTimeLimit = dummy;
dummy = -1;
SCRIPT_GetNumber(scripthandle, "Options", "NetColor",&dummy);
if (dummy != -1) gs.NetColor = dummy;
dummy = -1;
SCRIPT_GetNumber(scripthandle, "Options", "Voxels",&dummy);
if (dummy != -1) gs.Voxels = dummy;
dummy = -1;
SCRIPT_GetNumber(scripthandle, "Options", "Stats",&dummy);
if (dummy != -1) gs.Stats = dummy;
dummy = -1;
SCRIPT_GetNumber(scripthandle, "Options", "MouseAimingOn",&dummy);
if (dummy != -1) gs.MouseAimingOn = dummy;
dummy = -1;
SCRIPT_GetNumber(scripthandle, "Options", "MouseInvert",&dummy);
if (dummy != -1) gs.MouseInvert = dummy;
}
/*
===================
=
= WriteGameSetup
=
===================
*/
void WriteGameSetup(int32_t scripthandle)
{
}
void TermSetup(void) void TermSetup(void)
{ {
extern SWBOOL BotMode; extern SWBOOL BotMode;
//CONFIG_WriteSetup();
} }
END_SW_NS END_SW_NS

View file

@ -461,7 +461,7 @@ void PutStringInfo(PLAYERp pp, const char *string)
if (pp-Player != myconnectindex) if (pp-Player != myconnectindex)
return; return;
if (!gs.Messages) if (!hud_messages)
return; return;
CON_ConMessage("%s", string); // Put it in the console too CON_ConMessage("%s", string); // Put it in the console too
@ -526,7 +526,7 @@ void PutStringPlayerInfo(PLAYERp pp, const char *string)
if (pp-Player != myconnectindex) if (pp-Player != myconnectindex)
return; return;
if (!gs.Messages) if (!hud_messages)
return; return;
MNU_MeasureString(string, &w, &h); MNU_MeasureString(string, &w, &h);