From a0bd2f3da42da2f5249e2a4892e2b48b51b2fd86 Mon Sep 17 00:00:00 2001 From: Misa Date: Sat, 28 Sep 2024 00:52:19 +0000 Subject: [PATCH] Refactor: Use fullmap() everywhere This replaces all instances of unlocking all rooms on the map with calls to map.fullmap(), for consistency. This also fixes two comments that got swapped around in startgamemode(). I don't know how that happened. [skip ci] --- desktop_version/src/Script.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/desktop_version/src/Script.cpp b/desktop_version/src/Script.cpp index 188ef45c..7c005567 100644 --- a/desktop_version/src/Script.cpp +++ b/desktop_version/src/Script.cpp @@ -1437,7 +1437,7 @@ void scriptclass::run(void) { game.unlocknum(Unlock_SECRETLAB); game.insecretlab = true; - SDL_memset(map.explored, true, sizeof(map.explored)); + map.fullmap(); } else if (words[0] == "leavesecretlab") { @@ -2746,7 +2746,7 @@ void scriptclass::startgamemode(const enum StartMode mode) { game.timetrialcountdown = 0; game.timetrialparlost = true; - SDL_memset(map.explored, true, sizeof(map.explored)); + map.fullmap(); } graphics.fademode = FADE_START_FADEIN; @@ -2756,9 +2756,9 @@ void scriptclass::startgamemode(const enum StartMode mode) game.startspecial(0); /* Unlock the entire map */ - SDL_memset(obj.collect, true, sizeof(obj.collect[0]) * 20); + map.fullmap(); /* Give all 20 trinkets */ - SDL_memset(map.explored, true, sizeof(map.explored)); + SDL_memset(obj.collect, true, sizeof(obj.collect[0]) * 20); i = 400; /* previously a nested for-loop set this */ game.insecretlab = true; map.showteleporters = true;