Skip to content
Permalink
Browse files

Rework of the Descent 2 final boss fade-to-black effect introduced in 5…

…b18219: In the original game the silent 2 second countdown would lapse before the screen faded to black. In restoration, it would fade to black as the countdown started. This rework fixes this discrepancy.
  • Loading branch information...
zicodxx committed Sep 17, 2019
1 parent 427f45f commit dafdcb8596f64b9fb38375e6c80a2ec2b3705a57
Showing with 6 additions and 3 deletions.
  1. +6 −3 similar/main/collide.cpp
@@ -1353,8 +1353,11 @@ window_event_result do_final_boss_frame(void)
Final_boss_countdown_time -= FrameTime;
if (Final_boss_countdown_time > 0)
{
int flash_value = f2i(((F1_0*2)-Final_boss_countdown_time)*16); // countdown is 2 seconds (as set by do_final_boss_hacks()), so make a flash value that maxes out over that time
PALETTE_FLASH_SET(-flash_value,-flash_value,-flash_value); // set palette to inverted flash_value to fade to black
if (Final_boss_countdown_time <= F1_0*2)
{
int flash_value = f2i(((F1_0*2)-Final_boss_countdown_time)*16); // during final 2 seconds of final boss countdown (as set by do_final_boss_hacks()), make a flash value that maxes out over that time
PALETTE_FLASH_SET(-flash_value,-flash_value,-flash_value); // set palette to inverted flash_value to fade to black
}
GameUniqueState.Final_boss_countdown_time = Final_boss_countdown_time;
return window_event_result::ignored;
}
@@ -1402,7 +1405,7 @@ void do_final_boss_hacks(void)
if (!(Game_mode & GM_MULTI))
buddy_message("Nice job, %s!", static_cast<const char *>(get_local_player().callsign));

GameUniqueState.Final_boss_countdown_time = F1_0*2;
GameUniqueState.Final_boss_countdown_time = F1_0*4; // was F1_0*2 originally. extended to F1_0*4 to play fade to black which happened after countdown ended in the original game.
}

}

0 comments on commit dafdcb8

Please sign in to comment.
You can’t perform that action at this time.