summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/koopatlas/hud.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/koopatlas/hud.cpp b/src/koopatlas/hud.cpp
index 7046e77..7a1b9a6 100644
--- a/src/koopatlas/hud.cpp
+++ b/src/koopatlas/hud.cpp
@@ -490,14 +490,15 @@ void dWMHud_c::loadFooterInfo() {
// Star 1: all exits complete
// Star 2: all star coins obtained
- int lastLevelID = 27; // airship
- if (save->newerWorldID >= 10)
- lastLevelID = 24; // fortress
- else if (save->newerWorldID == 8)
- lastLevelID = 25; // final castle
+ static int lastLevelIDs[] = {
+ -1, /*no world*/
+ 27, 27, 27, 27, 27, 27, 27, 25,
+ -1, /*no end level in W9*/
+ 24, 24, 24, 3, 5
+ };
dLevelInfo_c *linfo = &dScKoopatlas_c::instance->levelInfo;
- dLevelInfo_c::entry_s *lastLevel = linfo->searchByDisplayNum(save->newerWorldID, lastLevelID);
+ dLevelInfo_c::entry_s *lastLevel = linfo->searchByDisplayNum(save->newerWorldID, lastLevelIDs[save->newerWorldID]);
bool lastComplete = false;
if (lastLevel) {
lastComplete = (save->GetLevelCondition(lastLevel->worldSlot,lastLevel->levelSlot) & COND_NORMAL);