From 6956c9fa2f56c2fa5af8ace0dbe298ab2a6c201b Mon Sep 17 00:00:00 2001 From: Treeki Date: Mon, 1 Oct 2012 04:55:05 +0200 Subject: fix to the last level star on the HUD --- src/koopatlas/hud.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/koopatlas/hud.cpp') 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); -- cgit v1.2.3