summaryrefslogtreecommitdiff
path: root/src/wmresourcemng.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/wmresourcemng.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/wmresourcemng.cpp b/src/wmresourcemng.cpp
index 741abb2..9854fc2 100644
--- a/src/wmresourcemng.cpp
+++ b/src/wmresourcemng.cpp
@@ -112,7 +112,8 @@ void *dWMResourceMng_c::operator[](u32 key) {
void dWMResourceMng_c::prepareResources() {
// first off, initialise every brres file used
for (int i = 0; i < resCount(); i++) {
- if ((keyForIndex(i) >> 16) == '3D') {
+ //if ((keyForIndex(i) >> 16) == '3D') {
+ if (isResFile_byIndex(i)) {
nw4r::g3d::ResFile resFile(dataForIndex(i));
resFile.CheckRevision();
resFile.Init();
@@ -123,13 +124,16 @@ void dWMResourceMng_c::prepareResources() {
// them to every other file ... because I don't think it's a good idea to
// bind them before they've been initialised
for (int i = 0; i < resCount(); i++) {
- if ((keyForIndex(i) >> 16) == '3D') {
+ //if ((keyForIndex(i) >> 16) == '3D') {
+ if (isResFile_byIndex(i)) {
nw4r::g3d::ResFile firstFile(dataForIndex(i));
for (int j = 0; j < resCount(); j++) {
- nw4r::g3d::ResFile secondFile(dataForIndex(j));
+ if (isResFile_byIndex(j)) {
+ nw4r::g3d::ResFile secondFile(dataForIndex(j));
- firstFile.Bind(secondFile);
+ firstFile.Bind(secondFile);
+ }
}
}
}