summaryrefslogtreecommitdiff
path: root/src/koopatlas/hud.cpp
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2012-10-01 04:55:05 +0200
committerTreeki <treeki@gmail.com>2012-10-01 04:55:05 +0200
commit6956c9fa2f56c2fa5af8ace0dbe298ab2a6c201b (patch)
treed1f537544096db83bb19f9209b40d1de2a3ee017 /src/koopatlas/hud.cpp
parentc6c8bdfaf7c5462104290154f815a11f32a6b7cc (diff)
downloadkamek-6956c9fa2f56c2fa5af8ace0dbe298ab2a6c201b.tar.gz
kamek-6956c9fa2f56c2fa5af8ace0dbe298ab2a6c201b.zip
fix to the last level star on the HUD
Diffstat (limited to '')
-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);