MCPcopy Create free account
hub / github.com/TheForceEngine/TheForceEngine / handleVisionFx

Function handleVisionFx

TheForceEngine/TFE_DarkForces/mission.cpp:482–503  ·  view source on GitHub ↗

In DOS, this was part of drawWorld() - for TFE I split it out to limit the amount of game code in the renderer.

Source from the content-addressed store, hash-verified

480 // In DOS, this was part of drawWorld() -
481 // for TFE I split it out to limit the amount of game code in the renderer.
482 void handleVisionFx()
483 {
484 // Countdown to enable the night vision effect.
485 if (s_visionFxCountdown != 0)
486 {
487 s_visionFxCountdown--;
488 if (s_visionFxCountdown == 0)
489 {
490 setLuminanceMask(JFALSE, JTRUE, JFALSE);
491 }
492 }
493
494 // Countdown to disable the night vision effect.
495 if (s_visionFxEndCountdown != 0)
496 {
497 s_visionFxEndCountdown--;
498 if (s_visionFxEndCountdown == 0)
499 {
500 setLuminanceMask(JFALSE, JFALSE, JFALSE);
501 }
502 }
503 }
504
505 void mission_exitLevel()
506 {

Callers 2

mission_renderFunction · 0.85
mission_mainTaskFuncFunction · 0.85

Calls 1

setLuminanceMaskFunction · 0.85

Tested by

no test coverage detected