Skip to content

Commit

Permalink
Blood: Add option to toggle voxels
Browse files Browse the repository at this point in the history
  • Loading branch information
tmyqlfpir authored and Hendricks266 committed Dec 18, 2024
1 parent f570281 commit 01afdb6
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions source/blood/src/menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ void ShowDifficulties();
void SetDifficultyAndStart(CGameMenuItemChain *);
void SetDifficultyCustomAndStart(CGameMenuItemChain *);
void SetDetail(CGameMenuItemSlider *);
void SetVoxels(CGameMenuItemZBool *);
void SetGamma(CGameMenuItemSlider *);
void SetMusicVol(CGameMenuItemSlider *);
void SetSoundVol(CGameMenuItemSlider *);
Expand Down Expand Up @@ -473,16 +474,17 @@ CGameMenuItemTitle itemOptionsDisplayTitle("DISPLAY SETUP", 1, 160, 20, 2038);
CGameMenuItemChain itemOptionsDisplayColor("COLOR CORRECTION", 3, 66, 60, 180, 0, &menuOptionsDisplayColor, -1, NULL, 0);
CGameMenuItemChain itemOptionsDisplayMode("VIDEO MODE", 3, 66, 70, 180, 0, &menuOptionsDisplayMode, -1, SetupVideoModeMenu, 0);
CGameMenuItemSlider itemOptionsDisplaySliderDetail("DETAIL:", 3, 66, 80, 180, &gDetail, 0, 4, 1, SetDetail, -1, -1);
CGameMenuItemZBool itemOptionsDisplayBoolCrosshair("CROSSHAIR:", 3, 66, 90, 180, gAimReticle, SetCrosshair, NULL, NULL);
CGameMenuItemZBool itemOptionsDisplayBoolCenterHoriz("CENTER HORIZON LINE:", 3, 66, 100, 180, gCenterHoriz, SetCenterHoriz, NULL, NULL);
CGameMenuItemZCycle itemOptionsDisplayCycleLevelStats("LEVEL STATS:", 3, 66, 110, 180, gLevelStats, SetLevelStats, pzLevelStatsStrings, ARRAY_SSIZE(pzLevelStatsStrings), 0);
CGameMenuItemZBool itemOptionsDisplayBoolPowerupDuration("POWERUP DURATION:", 3, 66, 120, 180, gPowerupDuration, SetPowerupDuration, NULL, NULL);
CGameMenuItemZBool itemOptionsDisplayBoolShowMapTitle("MAP TITLE:", 3, 66, 130, 180, gShowMapTitle, SetShowMapTitle, NULL, NULL);
CGameMenuItemZBool itemOptionsDisplayBoolMessages("MESSAGES:", 3, 66, 140, 180, gMessageState, SetMessages, NULL, NULL);
CGameMenuItemZBool itemOptionsDisplayBoolWidescreen("WIDESCREEN:", 3, 66, 150, 180, r_usenewaspect, SetWidescreen, NULL, NULL);
CGameMenuItemSlider itemOptionsDisplayFOV("FOV:", 3, 66, 160, 180, &gFov, 75, 140, 5, SetFOV, -1, -1, kMenuSliderValue);
CGameMenuItemZBool itemOptionsDisplayBoolVoxels("VOXELS:", 3, 66, 90, 180, 0, SetVoxels, NULL, NULL);
CGameMenuItemZBool itemOptionsDisplayBoolCrosshair("CROSSHAIR:", 3, 66, 100, 180, gAimReticle, SetCrosshair, NULL, NULL);
CGameMenuItemZBool itemOptionsDisplayBoolCenterHoriz("CENTER HORIZON LINE:", 3, 66, 110, 180, gCenterHoriz, SetCenterHoriz, NULL, NULL);
CGameMenuItemZCycle itemOptionsDisplayCycleLevelStats("LEVEL STATS:", 3, 66, 120, 180, gLevelStats, SetLevelStats, pzLevelStatsStrings, ARRAY_SSIZE(pzLevelStatsStrings), 0);
CGameMenuItemZBool itemOptionsDisplayBoolPowerupDuration("POWERUP DURATION:", 3, 66, 130, 180, gPowerupDuration, SetPowerupDuration, NULL, NULL);
CGameMenuItemZBool itemOptionsDisplayBoolShowMapTitle("MAP TITLE:", 3, 66, 140, 180, gShowMapTitle, SetShowMapTitle, NULL, NULL);
CGameMenuItemZBool itemOptionsDisplayBoolMessages("MESSAGES:", 3, 66, 150, 180, gMessageState, SetMessages, NULL, NULL);
CGameMenuItemZBool itemOptionsDisplayBoolWidescreen("WIDESCREEN:", 3, 66, 160, 180, r_usenewaspect, SetWidescreen, NULL, NULL);
CGameMenuItemSlider itemOptionsDisplayFOV("FOV:", 3, 66, 170, 180, &gFov, 75, 140, 5, SetFOV, -1, -1, kMenuSliderValue);
#ifdef USE_OPENGL
CGameMenuItemChain itemOptionsDisplayPolymost("POLYMOST SETUP", 3, 66, 170, 180, 0, &menuOptionsDisplayPolymost, -1, SetupVideoPolymostMenu, 0);
CGameMenuItemChain itemOptionsDisplayPolymost("POLYMOST SETUP", 3, 66, 180, 180, 0, &menuOptionsDisplayPolymost, -1, SetupVideoPolymostMenu, 0);
#endif

const char *pzRendererStrings[] = {
Expand Down Expand Up @@ -1298,6 +1300,7 @@ void SetupOptionsMenu(void)
menuOptionsDisplay.Add(&itemOptionsDisplayColor, true);
menuOptionsDisplay.Add(&itemOptionsDisplayMode, false);
menuOptionsDisplay.Add(&itemOptionsDisplaySliderDetail, false);
menuOptionsDisplay.Add(&itemOptionsDisplayBoolVoxels, false);
menuOptionsDisplay.Add(&itemOptionsDisplayBoolCrosshair, false);
menuOptionsDisplay.Add(&itemOptionsDisplayBoolCenterHoriz, false);
menuOptionsDisplay.Add(&itemOptionsDisplayCycleLevelStats, false);
Expand All @@ -1310,6 +1313,7 @@ void SetupOptionsMenu(void)
menuOptionsDisplay.Add(&itemOptionsDisplayPolymost, false);
#endif
menuOptionsDisplay.Add(&itemBloodQAV, false);
itemOptionsDisplayBoolVoxels.at20 = usevoxels;
itemOptionsDisplayBoolCrosshair.at20 = gAimReticle;
itemOptionsDisplayBoolCenterHoriz.at20 = gCenterHoriz;
itemOptionsDisplayCycleLevelStats.m_nFocus = gLevelStats;
Expand Down Expand Up @@ -1750,6 +1754,11 @@ void SetDetail(CGameMenuItemSlider *pItem)
gDetail = pItem->nValue;
}

void SetVoxels(CGameMenuItemZBool *pItem)
{
usevoxels = pItem->at20;
}

void SetGamma(CGameMenuItemSlider *pItem)
{
gGamma = pItem->nValue;
Expand Down

0 comments on commit 01afdb6

Please sign in to comment.