summaryrefslogtreecommitdiff
path: root/src/koopatlas
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2012-09-16 20:13:29 +0200
committerTreeki <treeki@gmail.com>2012-09-16 20:13:29 +0200
commit7cccf6fd2715cd1fae9745ae2b15c077a97e4e2f (patch)
treec79a81d147511fcad842e8f1a64d9c0e58828ebb /src/koopatlas
parentbe31f99777d00238151df5851042a9e896d24f74 (diff)
parenteb4b6edcbef13c80b0051abe9dc89c93e7a960d0 (diff)
downloadkamek-7cccf6fd2715cd1fae9745ae2b15c077a97e4e2f.tar.gz
kamek-7cccf6fd2715cd1fae9745ae2b15c077a97e4e2f.zip
Merge branch 'file-select' into level-select
Diffstat (limited to 'src/koopatlas')
-rw-r--r--src/koopatlas/hud.cpp67
-rw-r--r--src/koopatlas/pathmanager.cpp7
2 files changed, 8 insertions, 66 deletions
diff --git a/src/koopatlas/hud.cpp b/src/koopatlas/hud.cpp
index 8f4b778..3989a1c 100644
--- a/src/koopatlas/hud.cpp
+++ b/src/koopatlas/hud.cpp
@@ -383,72 +383,7 @@ void dWMHud_c::setWorldName() {
int world = node->levelNumber[0];
int level = node->levelNumber[1];
- switch (world) {
- case 1:
- setWorldText("Yoshi's\nIsland");
- break;
-
- case 2:
- if (((level > 1) && (level < 5)) || (level == 15) || (level == 33) || (level == 34))
- setWorldText("Soggy\nSewers");
- else
- setWorldText("Rubble\nRuins");
- break;
-
- case 3:
- setWorldText("Mushroom\nPeaks");
- break;
-
- case 4:
- setWorldText("Sakura\nVillage");
- break;
-
- case 5:
- if ((level < 6) || (level == 15) || (level == 33) || (level == 34))
- setWorldText("FreezeFlame\nValley");
- else
- setWorldText("FreezeFlame\nVolcano");
- break;
-
- case 6:
- setWorldText("Pumpkin\nBoneyard");
- break;
-
- case 7:
- if (level < 4)
- setWorldText("Sky\nMountain");
- else
- setWorldText("Starry\nSkies");
- break;
-
- case 8:
- if ((level < 6) || (level == 15) || (level == 25) || (level == 33) || (level == 34))
- setWorldText("Koopa\nPlanet");
- else
- setWorldText("Koopa\nCore");
- break;
-
- case 9:
- setWorldText("Bonus\nLand");
- break;
-
- case 10:
- if ((level < 6) || (level == 30) || (level == 41) )
- setWorldText("Goldwood\nForest");
- else if ((level < 11) || (level == 32))
- setWorldText("Mini-Mega\nIsland");
- else if ((level < 16) || (level == 33) || (level == 34) || (level == 31) )
- setWorldText("Crystal\nCaves");
- else if (level < 19)
- setWorldText("Bombard\nCliffs");
- else
- setWorldText("Sky\nCity");
- break;
-
- default:
- setWorldText("Unknown\nWorld");
- break;
- }
+ setWorldText(NewerWorldName(NewerWorldForLevelID(world, level)));
}
}
diff --git a/src/koopatlas/pathmanager.cpp b/src/koopatlas/pathmanager.cpp
index ffc4dfd..49ee728 100644
--- a/src/koopatlas/pathmanager.cpp
+++ b/src/koopatlas/pathmanager.cpp
@@ -560,6 +560,13 @@ void dWMPathManager_c::moveThroughPath() {
SaveBlock *save = GetSaveFile()->GetBlock(-1);
save->current_path_node = pathLayer->findNodeID(to);
+ if (to->type == dKPNode_s::LEVEL) {
+ NWRWorld nWorld = NewerWorldForLevelID(to->levelNumber[0], to->levelNumber[1]);
+ if (nWorld != UNKNOWN_WORLD) {
+ save->currentNewerWorld = (u8)nWorld;
+ }
+ }
+
dWMHud_c::instance->showPointBar();
SpammyReport("Point bar shown\n");
} else {