diff options
author | Colin Noga <Tempus@chronometry.ca> | 2012-07-18 21:50:37 -0500 |
---|---|---|
committer | Colin Noga <Tempus@chronometry.ca> | 2012-07-18 21:50:37 -0500 |
commit | 5f03da589c0d0eb22e73993198a709ddb95f2960 (patch) | |
tree | a05216246df9bd7fdd323bb1473efb5b415d238c /src/koopatlas/mapdata.cpp | |
parent | 8f1b1aa7eb7f8700e1979b5c4d1d4e96d274119b (diff) | |
download | kamek-5f03da589c0d0eb22e73993198a709ddb95f2960.tar.gz kamek-5f03da589c0d0eb22e73993198a709ddb95f2960.zip |
Putting the build into working order.
Diffstat (limited to '')
-rw-r--r-- | src/koopatlas/mapdata.cpp | 11 |
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); } |