Skip to content

Commit

Permalink
Refactor: Use fullmap() everywhere
Browse files Browse the repository at this point in the history
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]
  • Loading branch information
InfoTeddy committed Sep 28, 2024
1 parent 8a00ea7 commit a0bd2f3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions desktop_version/src/Script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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")
{
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit a0bd2f3

Please sign in to comment.