Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions TheForceEngine/TFE_A11y/accessibility.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,8 @@ namespace TFE_A11Y {
bool cutsceneCaptionsEnabled();
// True if captions or subtitles are enabled for gameplay
bool gameplayCaptionsEnabled();

// Helpers for External Use - this really should be in a separate file
string toUpper(string input);
string toLower(string input);
}
20 changes: 11 additions & 9 deletions TheForceEngine/TFE_DarkForces/mission.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,9 @@ namespace TFE_DarkForces
reticle_enable(true);
}
s_flatLighting = JFALSE;
s_nightvisionActive = JFALSE;
// Note: I am not sure why this is there but it overrides all player settings
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vanilla often set things to the same setting in multiple places. If it is not needed, it can be removed.

// By default the player load disables night vision so it won't carry over from previous maps.
// s_nightvisionActive = JFALSE;
}
}
else // Loading from save.
Expand Down Expand Up @@ -935,16 +937,16 @@ namespace TFE_DarkForces
s_visionFxCountdown = 2;
}

void disableNightvisionInternal()
void disableNightVisionInternal()
{
s_flatLighting = JFALSE;
s_visionFxEndCountdown = 3;
}

void disableNightvision()
void disableNightVision()
{
disableNightvisionInternal();
s_nightvisionActive = JFALSE;
disableNightVisionInternal();
s_nightVisionActive = JFALSE;
hud_sendTextMessage(9);
}

Expand All @@ -956,11 +958,11 @@ namespace TFE_DarkForces
{
hud_sendTextMessage(11);
sound_play(s_nightVisionDeactiveSoundSource);
s_nightvisionActive = JFALSE;
s_nightVisionActive = JFALSE;
return;
}

s_nightvisionActive = JTRUE;
s_nightVisionActive = JTRUE;
beginNightVision(16);
hud_sendTextMessage(10);
sound_play(s_nightVisionActiveSoundSource);
Expand Down Expand Up @@ -1302,9 +1304,9 @@ namespace TFE_DarkForces
}
if (inputMapping_getActionState(IADF_NIGHT_VISION_TOG) == STATE_PRESSED && s_playerInfo.itemGoggles)
{
if (s_nightvisionActive)
if (s_nightVisionActive)
{
disableNightvision();
disableNightVision();
}
else
{
Expand Down
9 changes: 7 additions & 2 deletions TheForceEngine/TFE_DarkForces/mission.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,16 @@ namespace TFE_DarkForces
void mission_pause(JBool pause);

void setScreenFxLevels(s32 healthFx, s32 shieldFx, s32 flashFx);
void disableNightvisionInternal();
void disableNightVisionInternal();

void enableMask();
void enableCleats();
void enableNightVision();
void enableHeadlamp();

void disableMask();
void disableCleats();
void disableNightvision();
void disableNightVision();

void mission_render(s32 rendererIndex = 0, bool forceTextureUpdate = false);

Expand Down
Loading
Loading