summaryrefslogtreecommitdiff
path: root/src/koopatlas/mapdata.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/koopatlas/mapdata.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/koopatlas/mapdata.cpp b/src/koopatlas/mapdata.cpp
index 4a51519..524fb4f 100644
--- a/src/koopatlas/mapdata.cpp
+++ b/src/koopatlas/mapdata.cpp
@@ -50,9 +50,9 @@ bool dKPMapData_c::load(const char *filename) {
bool didLoadTilesets = loadTilesets();
bool didLoadBG = (bgLoader.load("/Maps/Water.brres") != 0);
- bool nodeLoader.load("/Maps/visCobCourse.brres");
+ bool didLoadNode = nodeLoader.load("/Maps/visCobCourse.brres");
- return didLoadTilesets && didLoadBG;
+ return didLoadTilesets && didLoadBG && didLoadNode;
}
bool dKPMapData_c::loadTilesets() {
@@ -90,13 +90,14 @@ void dKPMapData_c::unloadTilesets() {
}
bgLoader.unload();
- nodeLoader.unload()
+ nodeLoader.unload();
}
void dKPMapData_c::fixup() {
fixedUp = true;
fixRef(data->layers);
+ fixRef(data->tilesets);
for (int iLayer = 0; iLayer < data->layerCount; iLayer++) {
dKPLayer_s *layer = fixRef(data->layers[iLayer]);
@@ -143,6 +144,7 @@ void dKPMapData_c::fixup() {
if (node->type == dKPNode_s::CHANGE)
fixRef(node->destMap);
else if (node->type == dKPNode_s::LEVEL) {
+ break;
node->allocator.link(-1, GameHeaps[0], 0, 0x20);
@@ -155,7 +157,7 @@ void dKPMapData_c::fixup() {
nw4r::g3d::ResAnmVis anmRes = rf.GetResAnmVis("cobCourse");
node->model.setup(mdl, &node->allocator, 0x224, 1, 0);
- node->color.setup(mdl, anmRes, &node->allocator, 0, 1);
+ node->color.setup(mdl, anmRes, &node->allocator, 0);
node->color.bind(&node->model, anmRes, 0);
node->model.bindAnim(&node->color, 0.0f);
SetupTextures_MapObj(&node->model, 0);
@@ -165,7 +167,6 @@ void dKPMapData_c::fixup() {
}
}
- fixRef(data->tilesets);
}