From 92c0f93a6fb84be1ec9f4fdaea20e569e6611e1d Mon Sep 17 00:00:00 2001 From: Misa Date: Thu, 30 Apr 2020 12:32:53 -0700 Subject: [PATCH] Move finalstretch animation code to gamelogic() Otherwise, the tile animations will go too fast. However, the overall color cycling hasn't been going fast, since it was never in gamerender() in the first place. --- desktop_version/src/Graphics.cpp | 15 --------------- desktop_version/src/Logic.cpp | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/desktop_version/src/Graphics.cpp b/desktop_version/src/Graphics.cpp index 8ddbe85d..851ea03e 100644 --- a/desktop_version/src/Graphics.cpp +++ b/desktop_version/src/Graphics.cpp @@ -2279,21 +2279,6 @@ void Graphics::drawmap() void Graphics::drawfinalmap() { - //Update colour cycling for final level - if (map.final_colormode) { - map.final_aniframedelay--; - if(map.final_aniframedelay==0) - { - foregrounddrawn=false; - } - if (map.final_aniframedelay <= 0) { - map.final_aniframedelay = 2; - map.final_aniframe++; - if (map.final_aniframe >= 4) - map.final_aniframe = 0; - } - } - if (!foregrounddrawn) { FillRect(foregroundBuffer, 0x00000000); if(map.tileset==0){ diff --git a/desktop_version/src/Logic.cpp b/desktop_version/src/Logic.cpp index 8bed0f9b..b4240af0 100644 --- a/desktop_version/src/Logic.cpp +++ b/desktop_version/src/Logic.cpp @@ -1306,6 +1306,23 @@ void gamelogic() } } } + + //Update colour cycling for final level + if (map.finalmode && map.final_colormode) + { + map.final_aniframedelay--; + if(map.final_aniframedelay==0) + { + graphics.foregrounddrawn=false; + } + if (map.final_aniframedelay <= 0) { + map.final_aniframedelay = 2; + map.final_aniframe++; + if (map.final_aniframe >= 4) + map.final_aniframe = 0; + } + } + int j; if (game.roomchange) {