diff options
Diffstat (limited to 'src/wmresourcemng.cpp')
-rw-r--r-- | src/wmresourcemng.cpp | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/wmresourcemng.cpp b/src/wmresourcemng.cpp index 088cef4..741abb2 100644 --- a/src/wmresourcemng.cpp +++ b/src/wmresourcemng.cpp @@ -63,12 +63,18 @@ bool dWMResourceMng_c::loadSet(const char *setName) { // now try to load every resource // if even ONE of them fails, then don't return true - bool isLoadingComplete = true; + isLoadingComplete = true; for (int i = 0; i < setData->count; i++) { void *thisResource = resLoaders[i].load(setData->getName(i)); - MapReport("Load(%s) result: %p\n", setData->getName(i), thisResource); + u32 key = setData->entries[i].key; + char key1 = key >> 24; + char key2 = key >> 16; + char key3 = key >> 8; + char key4 = key & 0xFF; + + MapReport("Load(%c%c%c%c:%s) result: %p\n", key>>24, key>>16, key>>8, key&0xFF, setData->getName(i), thisResource); isLoadingComplete &= (thisResource != 0); } @@ -76,6 +82,8 @@ bool dWMResourceMng_c::loadSet(const char *setName) { // if they are ALL loaded, then this will be true if (isLoadingComplete) { prepareResources(); + + MapReport("Loading completed!\n"); } return isLoadingComplete; @@ -83,14 +91,20 @@ bool dWMResourceMng_c::loadSet(const char *setName) { void *dWMResourceMng_c::operator[](u32 key) { - if (!isLoadingComplete) + MapReport("Obtaining resource %c%c%c%c\n", key>>24, key>>16, key>>8, key&0xFF); + + if (!isLoadingComplete) { + MapReport("Loading is not complete. Returning 0\n"); return 0; + } for (int i = 0; i < setData->count; i++) { if (key == setData->entries[i].key) return resLoaders[i].buffer; } + MapReport("Not found!\n"); + return 0; } |