mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 17:49:43 +01:00
Fix the game texture clearing during menu shaking
Because of how `blackout` works, screen shaking must clear the gameplay buffer. `blackout` simply pauses rendering, so if the gameplay buffer gets cleared, then the screen will just be black, otherwise it'll look like the game is "frozen". VVVVVV only uses `blackout` during screen shaking, so it works as intended. However, when reimplementing this behavior in the move to using the SDL_Renderer system, I failed to notice that since my implementation always clears the gameplay buffer when shaking, if you open the menu during a shake, instead of seeing gameplay during the transition animation, you only see black. This has been fixed with a simple `game.blackout` check before clearing the gameplay buffer.
This commit is contained in:
parent
acfa085fd1
commit
fb15a0b515
1 changed files with 1 additions and 1 deletions
|
@ -3173,7 +3173,7 @@ void Graphics::screenshake(void)
|
|||
clear();
|
||||
|
||||
// Clear the gameplay texture so blackout() is actually black after a screenshake
|
||||
if (game.gamestate == GAMEMODE)
|
||||
if (game.gamestate == GAMEMODE && game.blackout)
|
||||
{
|
||||
set_render_target(gameplayTexture);
|
||||
clear();
|
||||
|
|
Loading…
Reference in a new issue