- and the last 2 hud CVARS for Blood…

This commit is contained in:
Christoph Oelckers 2019-10-24 01:41:55 +02:00
parent 3efb54e167
commit 3ed87f449e
5 changed files with 19 additions and 17 deletions

View file

@ -82,7 +82,6 @@ int32_t gAutoRun;
int32_t gFollowMap;
int32_t gOverlayMap;
int32_t gRotateMap;
int32_t gMessageState;
int32_t gMessageCount;
int32_t gMessageTime;
int32_t gMessageFont;
@ -93,7 +92,6 @@ bool gNoClip;
bool gInfiniteAmmo;
bool gFullMap;
int32_t gUpscaleFactor;
int32_t gPowerupDuration;
int32_t gDeliriumBlur;
//////////
@ -283,7 +281,6 @@ void CONFIG_SetDefaults(void)
//ud.default_skill = 1;
gUpscaleFactor = 0;
//ud.display_bonus_screen = 1;
gPowerupDuration = 1;
//ud.lockout = 0;
//ud.m_marker = 1;
//ud.maxautosaves = 5;
@ -314,7 +311,6 @@ void CONFIG_SetDefaults(void)
gOverlayMap = 0;
gRotateMap = 0;
gMessageState = 1;
gMessageCount = 4;
gMessageTime = 5;
gMessageFont = 0;

View file

@ -62,7 +62,6 @@ extern int32_t gAutoRun;
extern int32_t gFollowMap;
extern int32_t gOverlayMap;
extern int32_t gRotateMap;
extern int32_t gMessageState;
extern int32_t gMessageCount;
extern int32_t gMessageTime;
extern int32_t gMessageFont;
@ -74,7 +73,6 @@ extern bool gInfiniteAmmo;
extern bool gFullMap;
extern hashtable_t h_gamefuncs;
extern int32_t gUpscaleFactor;
extern int32_t gPowerupDuration;
extern int32_t gDeliriumBlur;
///////

View file

@ -42,6 +42,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "sound.h"
#include "view.h"
EXTERN_CVAR(Bool, hud_messages)
EXTERN_CVAR(Bool, hud_powerupduration)
BEGIN_BLD_NS
void SaveGame(CGameMenuItemZEditBitmap *, CGameMenuEvent *);
@ -415,9 +418,9 @@ CGameMenuItemChain itemOptionsDisplayMode("VIDEO MODE", 3, 66, 70, 180, 0, &menu
CGameMenuItemZBool itemOptionsDisplayBoolCrosshair("CROSSHAIR:", 3, 66, 80, 180, cl_crosshair, SetCrosshair, NULL, NULL);
CGameMenuItemZBool itemOptionsDisplayBoolCenterHoriz("CENTER HORIZON LINE:", 3, 66, 90, 180, r_horizcenter, SetCenterHoriz, NULL, NULL);
CGameMenuItemZBool itemOptionsDisplayBoolLevelStats("LEVEL STATS:", 3, 66, 100, 180, hud_stats, SetLevelStats, NULL, NULL);
CGameMenuItemZBool itemOptionsDisplayBoolPowerupDuration("POWERUP DURATION:", 3, 66, 110, 180, gPowerupDuration, SetPowerupDuration, NULL, NULL);
CGameMenuItemZBool itemOptionsDisplayBoolPowerupDuration("POWERUP DURATION:", 3, 66, 110, 180, hud_powerupduration, SetPowerupDuration, NULL, NULL);
CGameMenuItemZBool itemOptionsDisplayBoolShowMapTitle("MAP TITLE:", 3, 66, 120, 180, hud_showmapname, SetShowMapTitle, NULL, NULL);
CGameMenuItemZBool itemOptionsDisplayBoolMessages("MESSAGES:", 3, 66, 130, 180, gMessageState, SetMessages, NULL, NULL);
CGameMenuItemZBool itemOptionsDisplayBoolMessages("MESSAGES:", 3, 66, 130, 180, hud_messages, SetMessages, NULL, NULL);
CGameMenuItemZBool itemOptionsDisplayBoolWidescreen("WIDESCREEN:", 3, 66, 140, 180, r_usenewaspect, SetWidescreen, NULL, NULL);
CGameMenuItemSlider itemOptionsDisplayFOV("FOV:", 3, 66, 150, 180, &r_fov.Value, 75, 140, 5, SetFOV, -1, -1, kMenuSliderValue);
#ifdef USE_OPENGL
@ -1143,9 +1146,9 @@ void SetupOptionsMenu(void)
itemOptionsDisplayBoolCrosshair.at20 = cl_crosshair;
itemOptionsDisplayBoolCenterHoriz.at20 = r_horizcenter;
itemOptionsDisplayBoolLevelStats.at20 = hud_stats;
itemOptionsDisplayBoolPowerupDuration.at20 = gPowerupDuration;
itemOptionsDisplayBoolPowerupDuration.at20 = hud_powerupduration;
itemOptionsDisplayBoolShowMapTitle.at20 = hud_showmapname;
itemOptionsDisplayBoolMessages.at20 = gMessageState;
itemOptionsDisplayBoolMessages.at20 = hud_messages;
itemOptionsDisplayBoolWidescreen.at20 = r_usenewaspect;
menuOptionsDisplayMode.Add(&itemOptionsDisplayModeTitle, false);
@ -1441,8 +1444,7 @@ void SetCDVol(CGameMenuItemSlider *pItem)
void SetMessages(CGameMenuItemZBool *pItem)
{
gMessageState = pItem->at20;
gGameMessageMgr.SetState(gMessageState);
hud_messages = pItem->at20;
}
void SetMouseSensitivity(CGameMenuItemSliderFloat *pItem)
@ -1477,7 +1479,7 @@ void SetLevelStats(CGameMenuItemZBool *pItem)
void SetPowerupDuration(CGameMenuItemZBool* pItem)
{
gPowerupDuration = pItem->at20;
hud_powerupduration = pItem->at20;
}
void SetShowMapTitle(CGameMenuItemZBool* pItem)

View file

@ -61,6 +61,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "warp.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")
BEGIN_BLD_NS
struct VIEW {
@ -1224,7 +1232,7 @@ void sortPowerUps(POWERUPDISPLAY* powerups) {
void viewDrawPowerUps(PLAYER* pPlayer)
{
if (!gPowerupDuration)
if (!hud_powerupduration)
return;
// NoOne to author: the following powerups can be safely added in this list:
@ -1750,7 +1758,7 @@ void viewInit(void)
#endif
uint8_t *data = tileAllocTile(4077, kLensSize, kLensSize, 0, 0);
memset(data, 255, kLensSize*kLensSize);
gGameMessageMgr.SetState(gMessageState);
gGameMessageMgr.SetState(hud_messages);
gGameMessageMgr.SetCoordinates(1, 1);
char nFont;
if (gMessageFont == 0)

View file

@ -397,8 +397,6 @@ CVARD(Bool, r_voxels, true, CVAR_ARCHIVE, "enable/disable automatic sprite->voxe
// These have to wait until the HUD code is cleaned up (no idea which may survive and which won't.)
/*
{ "hud_messages", "enable/disable showing messages", (void*)&gMessageState, CVAR_BOOL, 0, 1 },
{ "hud_powerupduration", "enable/disable displaying the remaining seconds for power-ups", (void*)&gPowerupDuration, CVAR_BOOL, 0, 1 },
// Currently unavailable due to dependency on an obsolete OpenGL feature
{ "deliriumblur", "enable/disable delirium blur effect(polymost)", (void *)&gDeliriumBlur, CVAR_BOOL, 0, 1 },