diff options
author | Treeki <treeki@gmail.com> | 2012-10-18 03:55:02 +0200 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2012-10-18 03:55:02 +0200 |
commit | edf303f6ba8e30e04e828cb0b9b268d534f194c4 (patch) | |
tree | 88a6c51b3045470694cb56c161cdf53a578f0944 /src/koopatlas | |
parent | 9af56ee115dea9cbb9ee5b8317fefdb396a0e744 (diff) | |
download | kamek-edf303f6ba8e30e04e828cb0b9b268d534f194c4.tar.gz kamek-edf303f6ba8e30e04e828cb0b9b268d534f194c4.zip |
refactored level info a little
Diffstat (limited to 'src/koopatlas')
-rw-r--r-- | src/koopatlas/core.cpp | 7 | ||||
-rw-r--r-- | src/koopatlas/core.h | 3 | ||||
-rw-r--r-- | src/koopatlas/hud.cpp | 4 | ||||
-rw-r--r-- | src/koopatlas/pathmanager.cpp | 2 |
4 files changed, 4 insertions, 12 deletions
diff --git a/src/koopatlas/core.cpp b/src/koopatlas/core.cpp index 462b995..b635ba0 100644 --- a/src/koopatlas/core.cpp +++ b/src/koopatlas/core.cpp @@ -176,9 +176,7 @@ bool WMInit_LoadResources1(void *ptr) { dScKoopatlas_c *wm = (dScKoopatlas_c*)ptr; - bool result1 = wm->mapListLoader.load("/Maps/List.txt"); - bool result2 = wm->levelInfoLoader.load("/NewerRes/LevelInfo.bin"); - return result1 && result2; + return wm->mapListLoader.load("/Maps/List.txt"); } bool WMInit_LoadResources2(void *ptr) { @@ -250,8 +248,6 @@ bool WMInit_SetupExtra(void *ptr) { wm->player->modelHandler->mdlClass->startAnimation(0, 1.2f, 10.0f, 0.0f); // since we've got all the resources, set up the path data too - SpammyReport("preparing level info\n"); - wm->levelInfo.load(wm->levelInfoLoader.buffer); SpammyReport("preparing path manager\n"); wm->pathManager.setup(); @@ -424,7 +420,6 @@ int dScKoopatlas_c::onDelete() { DVD_FreeFile(GetDVDClass2(), "SI_propeller"); DVD_FreeFile(GetDVDClass2(), "SI_star"); - levelInfoLoader.unload(); mapListLoader.unload(); CleanUpEffectThings(); diff --git a/src/koopatlas/core.h b/src/koopatlas/core.h index 0f7c3a3..88efdba 100644 --- a/src/koopatlas/core.h +++ b/src/koopatlas/core.h @@ -113,9 +113,6 @@ class dScKoopatlas_c : public dScene_c { const char *getMapNameForIndex(int index); int getIndexForMapName(const char *name); - dDvdLoader_c levelInfoLoader; - dLevelInfo_c levelInfo; - void startLevel(dLevelInfo_c::entry_s *level); bool canDoStuff(); diff --git a/src/koopatlas/hud.cpp b/src/koopatlas/hud.cpp index a32d32a..2288fe7 100644 --- a/src/koopatlas/hud.cpp +++ b/src/koopatlas/hud.cpp @@ -322,7 +322,7 @@ void dWMHud_c::playHideAnim(int id) { void dWMHud_c::loadHeaderInfo() { - dLevelInfo_c *levelInfo = &dScKoopatlas_c::instance->levelInfo; + dLevelInfo_c *levelInfo = &dLevelInfo_c::s_info; dLevelInfo_c::entry_s *infEntry = levelInfo->searchBySlot( nodeForHeader->levelNumber[0]-1, nodeForHeader->levelNumber[1]-1); @@ -464,7 +464,7 @@ void dWMHud_c::loadFooterInfo() { bool starVisibility[3]; starVisibility[0] = false; - dLevelInfo_c *linfo = &dScKoopatlas_c::instance->levelInfo; + dLevelInfo_c *linfo = &dLevelInfo_c::s_info; dLevelInfo_c::entry_s *lastLevel = linfo->searchByDisplayNum(save->newerWorldID, lastLevelIDs[save->newerWorldID]); if (lastLevel) { starVisibility[0] = (save->GetLevelCondition(lastLevel->worldSlot,lastLevel->levelSlot) & COND_NORMAL); diff --git a/src/koopatlas/pathmanager.cpp b/src/koopatlas/pathmanager.cpp index 5cf029c..95c545f 100644 --- a/src/koopatlas/pathmanager.cpp +++ b/src/koopatlas/pathmanager.cpp @@ -746,7 +746,7 @@ void dWMPathManager_c::activatePoint() { isEnteringLevel = true; levelStartWait = 40; - enteredLevel = dScKoopatlas_c::instance->levelInfo.searchBySlot(w, l); + enteredLevel = dLevelInfo_c::s_info.searchBySlot(w, l); } } |