From 5daad95f1d0a3833becca1059efd768354b97fee Mon Sep 17 00:00:00 2001 From: Misa Date: Sat, 2 May 2020 10:45:35 -0700 Subject: [PATCH] Move "return to editor" alpha timer update to logic functions Otherwise it'll go by too quickly. Also something subtle here - I didn't make it conditional on game.advancetext, so now it'll still decrement even if you have advancetext up. --- desktop_version/src/Logic.cpp | 7 +++++++ desktop_version/src/Render.cpp | 3 --- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/desktop_version/src/Logic.cpp b/desktop_version/src/Logic.cpp index d460f534..2cdef85b 100644 --- a/desktop_version/src/Logic.cpp +++ b/desktop_version/src/Logic.cpp @@ -1664,4 +1664,11 @@ void gamelogic() { map.glitchname = map.getglitchname(game.roomx, game.roomy); } + +#if !defined(NO_CUSTOM_LEVELS) + if (map.custommode && !map.custommodeforreal && ed.returneditoralpha > 0) + { + ed.returneditoralpha -= 15; + } +#endif } diff --git a/desktop_version/src/Render.cpp b/desktop_version/src/Render.cpp index 5dbe5637..82bf1301 100644 --- a/desktop_version/src/Render.cpp +++ b/desktop_version/src/Render.cpp @@ -1390,9 +1390,6 @@ void gamerender() if(map.custommode && !map.custommodeforreal && !game.advancetext){ //Return to level editor graphics.bprintalpha(5, 5, "[Press ENTER to return to editor]", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), ed.returneditoralpha, false); - if (ed.returneditoralpha > 0) { - ed.returneditoralpha -= 15; - } } #endif