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/pregame.cpp | |
parent | 9af56ee115dea9cbb9ee5b8317fefdb396a0e744 (diff) | |
download | kamek-edf303f6ba8e30e04e828cb0b9b268d534f194c4.tar.gz kamek-edf303f6ba8e30e04e828cb0b9b268d534f194c4.zip |
refactored level info a little
Diffstat (limited to '')
-rw-r--r-- | src/pregame.cpp | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/src/pregame.cpp b/src/pregame.cpp index 7600902..3a2e89c 100644 --- a/src/pregame.cpp +++ b/src/pregame.cpp @@ -2,25 +2,6 @@ #include "levelinfo.h" #include <newer.h> -dDvdLoader_c s_levelInfoLoader; -dLevelInfo_c s_levelInfo; -bool s_levelInfoLoaded = false; - -// TODO: refactor this a tiny bit -bool LoadLevelInfo() { - if (s_levelInfoLoaded) - return true; - - void *data = s_levelInfoLoader.load("/NewerRes/LevelInfo.bin"); - if (data) { - s_levelInfo.load(data); - s_levelInfoLoaded = true; - return true; - } - - return false; -} - class PregameLytHandler { public: m2d::EmbedLayout_c layout; @@ -84,10 +65,10 @@ void PregameLytHandler::hijack_loadLevelNumber() { LevelName = layout.findTextBoxByName("LevelName"); // work out the thing now - dLevelInfo_c::entry_s *level = s_levelInfo.searchBySlot(CurrentWorld, CurrentLevel); + dLevelInfo_c::entry_s *level = dLevelInfo_c::s_info.searchBySlot(CurrentWorld, CurrentLevel); if (level) { wchar_t convLevelName[160]; - const char *srcLevelName = s_levelInfo.getNameForLevel(level); + const char *srcLevelName = dLevelInfo_c::s_info.getNameForLevel(level); int i = 0; while (i < 159 && srcLevelName[i]) { convLevelName[i] = srcLevelName[i]; |