diff options
author | Colin Noga <Tempus@chronometry.ca> | 2012-07-18 21:16:24 -0500 |
---|---|---|
committer | Colin Noga <Tempus@chronometry.ca> | 2012-07-18 21:16:24 -0500 |
commit | 8f1b1aa7eb7f8700e1979b5c4d1d4e96d274119b (patch) | |
tree | 5b5b60ec7b346758d4fb6e783a1315a8c3532481 /src/koopatlas/mapdata.cpp | |
parent | d2f76bb1313364397135c93c37672e57b50fb0a2 (diff) | |
download | kamek-8f1b1aa7eb7f8700e1979b5c4d1d4e96d274119b.tar.gz kamek-8f1b1aa7eb7f8700e1979b5c4d1d4e96d274119b.zip |
Updated doodad engine spec with delays, and a few other minor fixes
Diffstat (limited to '')
-rw-r--r-- | src/koopatlas/mapdata.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/koopatlas/mapdata.cpp b/src/koopatlas/mapdata.cpp index 6838741..4a51519 100644 --- a/src/koopatlas/mapdata.cpp +++ b/src/koopatlas/mapdata.cpp @@ -50,6 +50,7 @@ bool dKPMapData_c::load(const char *filename) { bool didLoadTilesets = loadTilesets(); bool didLoadBG = (bgLoader.load("/Maps/Water.brres") != 0); + bool nodeLoader.load("/Maps/visCobCourse.brres"); return didLoadTilesets && didLoadBG; } @@ -89,6 +90,7 @@ void dKPMapData_c::unloadTilesets() { } bgLoader.unload(); + nodeLoader.unload() } void dKPMapData_c::fixup() { @@ -140,6 +142,24 @@ void dKPMapData_c::fixup() { if (node->type == dKPNode_s::CHANGE) fixRef(node->destMap); + else if (node->type == dKPNode_s::LEVEL) { + + node->allocator.link(-1, GameHeaps[0], 0, 0x20); + + nw4r::g3d::ResFile rf(nodeLoader.buffer); + rf.CheckRevision(); + rf.Init(); + rf.Bind(rf); + + nw4r::g3d::ResMdl mdl = rf.GetResMdl("cobCourse"); + 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.bind(&node->model, anmRes, 0); + node->model.bindAnim(&node->color, 0.0f); + SetupTextures_MapObj(&node->model, 0); + } } break; } |