summaryrefslogtreecommitdiff
path: root/src/levelinfo.cpp
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2012-10-18 03:55:02 +0200
committerTreeki <treeki@gmail.com>2012-10-18 03:55:02 +0200
commitedf303f6ba8e30e04e828cb0b9b268d534f194c4 (patch)
tree88a6c51b3045470694cb56c161cdf53a578f0944 /src/levelinfo.cpp
parent9af56ee115dea9cbb9ee5b8317fefdb396a0e744 (diff)
downloadkamek-edf303f6ba8e30e04e828cb0b9b268d534f194c4.tar.gz
kamek-edf303f6ba8e30e04e828cb0b9b268d534f194c4.zip
refactored level info a little
Diffstat (limited to 'src/levelinfo.cpp')
-rw-r--r--src/levelinfo.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/levelinfo.cpp b/src/levelinfo.cpp
index d5ef8e7..4d80492 100644
--- a/src/levelinfo.cpp
+++ b/src/levelinfo.cpp
@@ -1,5 +1,25 @@
#include "levelinfo.h"
+dDvdLoader_c s_levelInfoLoader;
+bool s_levelInfoLoaded = false;
+
+dLevelInfo_c dLevelInfo_c::s_info;
+
+bool LoadLevelInfo() {
+ if (s_levelInfoLoaded)
+ return true;
+
+ void *data = s_levelInfoLoader.load("/NewerRes/LevelInfo.bin");
+ if (data) {
+ dLevelInfo_c::s_info.load(data);
+ s_levelInfoLoaded = true;
+ return true;
+ }
+
+ return false;
+}
+
+
void dLevelInfo_c::load(void *buffer) {
data = (header_s*)buffer;