diff options
author | Treeki <treeki@gmail.com> | 2011-03-13 03:18:43 +0100 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2011-03-13 03:18:43 +0100 |
commit | 485c95c4fc071f954c7f808b0a89eb37d147c57b (patch) | |
tree | 1dff747edc9a33322daaa8b3bdd37eca0db01690 /src/wmresourcemng.cpp | |
parent | 72b2cb8e1bcb9970136efc8dc57b20b95ff7d082 (diff) | |
download | kamek-485c95c4fc071f954c7f808b0a89eb37d147c57b.tar.gz kamek-485c95c4fc071f954c7f808b0a89eb37d147c57b.zip |
WMResourceMng now works! also, a bit more cleanup
Diffstat (limited to '')
-rw-r--r-- | src/wmresourcemng.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/wmresourcemng.cpp b/src/wmresourcemng.cpp index 241dff3..ade1222 100644 --- a/src/wmresourcemng.cpp +++ b/src/wmresourcemng.cpp @@ -7,6 +7,8 @@ dWMResourceMng_c::dWMResourceMng_c() { hasSetPath = false; isSetLoaded = false; isLoadingComplete = false; + + MapReport("dWMResourceMng_c constructed @ %p\n", this); } dWMResourceMng_c::~dWMResourceMng_c() { @@ -37,6 +39,8 @@ bool dWMResourceMng_c::loadSet(const char *setName) { if (!hasSetPath) { snprintf(setPath, sizeof(setPath), "/Maps/%s.fileset", setName); hasSetPath = true; + + MapReport("Generated set path: %s\n", setPath); } void *result = setLoader.load(setPath); @@ -46,6 +50,8 @@ bool dWMResourceMng_c::loadSet(const char *setName) { // cool, we've got it, now load everything here setData = (WMResSetHeader*)result; + MapReport("Set loaded! Data: %p - Count: %d\n", result, setData->count); + resLoaders = new dDvdLoader_c[setData->count]; isSetLoaded = true; @@ -56,7 +62,11 @@ bool dWMResourceMng_c::loadSet(const char *setName) { bool isLoadingComplete = true; for (int i = 0; i < setData->count; i++) { - isLoadingComplete &= (resLoaders[i].load(setData->getName(i)) != 0); + void *thisResource = resLoaders[i].load(setData->getName(i)); + + MapReport("Load(%s) result: %p\n", setData->getName(i), thisResource); + + isLoadingComplete &= (thisResource != 0); } // if they are ALL loaded, then this will be true |