summaryrefslogtreecommitdiff
path: root/src/pregame.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/pregame.cpp23
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];