From 514b240348a7c401fa6725ae74540d5f3ee29cfb Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sat, 19 Mar 2022 21:07:50 -0400 Subject: added fade in to new game and fixed music on new game --- src/renderer.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/renderer.cpp') diff --git a/src/renderer.cpp b/src/renderer.cpp index b24ddbf..b6a9b4a 100644 --- a/src/renderer.cpp +++ b/src/renderer.cpp @@ -396,6 +396,12 @@ void Renderer::renderGame( SDL_RenderCopy(ren_.get(), canvas.get(), &zoomRect, nullptr); + if (game.losing == LoseState::NewGame) { + SDL_SetRenderDrawBlendMode(ren_.get(), SDL_BLENDMODE_BLEND); + SDL_SetRenderDrawColor(ren_.get(), 0, 0, 0, game.initialFade.getProgress(255, 0)); + SDL_RenderFillRect(ren_.get(), nullptr); + } + texture_ptr overlays( SDL_CreateTexture( ren_.get(), -- cgit 1.4.1