diff --git a/desktop_version/src/Game.cpp b/desktop_version/src/Game.cpp index 4687eb7e..f5096385 100644 --- a/desktop_version/src/Game.cpp +++ b/desktop_version/src/Game.cpp @@ -5689,9 +5689,7 @@ void Game::loadsummary(void) summary.seconds ); map.finalmode = summary.finalmode; - tele_currentarea = map.currentarea( - map.area(summary.savex, summary.savey) - ); + tele_currentarea = map.currentarea(summary.savex, summary.savey); SDL_memcpy(tele_crewstats, summary.crewstats, sizeof(tele_crewstats)); tele_trinkets = summary.trinkets; } @@ -5714,9 +5712,7 @@ void Game::loadsummary(void) summary.seconds ); map.finalmode = summary.finalmode; - quick_currentarea = map.currentarea( - map.area(summary.savex, summary.savey) - ); + quick_currentarea = map.currentarea(summary.savex, summary.savey); SDL_memcpy(quick_crewstats, summary.crewstats, sizeof(quick_crewstats)); quick_trinkets = summary.trinkets; } diff --git a/desktop_version/src/Input.cpp b/desktop_version/src/Input.cpp index 783f0214..ac985051 100644 --- a/desktop_version/src/Input.cpp +++ b/desktop_version/src/Input.cpp @@ -3068,11 +3068,9 @@ static void mapmenuactionpress(const bool version2_2) music.playef(Sound_GAMESAVED); game.savetime = game.timestring(); - game.savearea = map.currentarea(map.area(game.roomx, game.roomy)); + game.savearea = map.currentarea(game.roomx, game.roomy); game.savetrinkets = game.trinkets(); - if (game.roomx >= 102 && game.roomx <= 104 && game.roomy >= 110 && game.roomy <= 111) game.savearea = loc::gettext_roomname_special("The Ship"); - bool success; if(map.custommodeforreal) diff --git a/desktop_version/src/Map.cpp b/desktop_version/src/Map.cpp index 5188aa98..083e8555 100644 --- a/desktop_version/src/Map.cpp +++ b/desktop_version/src/Map.cpp @@ -1240,9 +1240,14 @@ void mapclass::spawncompanion(void) } } -const char* mapclass::currentarea(int t) +const char* mapclass::currentarea(const int roomx, const int roomy) { - switch(t) + if (roomx >= 102 && roomx <= 104 && roomy >= 110 && roomy <= 111) + { + return loc::gettext_roomname_special("The Ship"); + } + + switch (area(roomx, roomy)) { case 0: return loc::gettext_roomname_special("Dimension VVVVVV"); diff --git a/desktop_version/src/Map.h b/desktop_version/src/Map.h index a9248fe1..2e9f62af 100644 --- a/desktop_version/src/Map.h +++ b/desktop_version/src/Map.h @@ -108,7 +108,7 @@ public: void spawncompanion(void); - const char* currentarea(int t); + const char* currentarea(int roomx, int roomy); void loadlevel(int rx, int ry);