diff options
author | Treeki <treeki@gmail.com> | 2013-02-28 05:52:24 +0100 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2013-02-28 05:52:24 +0100 |
commit | 7cd2c9dc68ceeeefc8a35f43ee11a250592ca464 (patch) | |
tree | 49b61e419695e35089e05791794e449f2e41dfd5 /src | |
parent | 0a2acdf9ef641e01532b0cd7061ca844127f99a9 (diff) | |
download | kamek-7cd2c9dc68ceeeefc8a35f43ee11a250592ca464.tar.gz kamek-7cd2c9dc68ceeeefc8a35f43ee11a250592ca464.zip |
add effects to maps
Diffstat (limited to 'src')
-rw-r--r-- | src/koopatlas/map.cpp | 75 | ||||
-rw-r--r-- | src/koopatlas/map.h | 3 |
2 files changed, 77 insertions, 1 deletions
diff --git a/src/koopatlas/map.cpp b/src/koopatlas/map.cpp index 08cc0b3..da038c1 100644 --- a/src/koopatlas/map.cpp +++ b/src/koopatlas/map.cpp @@ -80,7 +80,9 @@ int dWMMap_c::onExecute() { bgModel.setDrawMatrix(bgMatrix); bgModel.setScale(1.0f, 1.0f, 1.0f); bgModel.calcWorld(false); - + + doEffects(); + return true; } @@ -501,3 +503,74 @@ void dWMMap_c::renderer_c::loadCamera(Mtx m) { GXLoadPosMtxImm(m, GX_PNMTX0); } + + +void dWMMap_c::doEffects() { + int mapID = dScKoopatlas_c::instance->currentMapID; + + // Note: effect::spawn() takes name, unk, pos, rot, scale + const S16Vec efRot = {0x1800, 0, 0}; + + if (mapID == 1) { + // Fullmap. + // Torches + static const VEC3 torchPos[6] = { + {8402.0f, -5528.0f, 7000.0f}, // Big Tower + {8444.0f, -5524.0f, 7000.0f}, // Tower + {8358.0f, -5524.0f, 7000.0f}, // Tower + {8420.0f, -5534.0f, 7000.0f}, // Tower + {8380.0f, -5534.0f, 7000.0f}, // Tower + {7804.0f, -5064.0f, 7000.0f}, // Castle + }; + const VEC3 reallyBigScale = {1.6f, 1.6f, 1.6f}; + const VEC3 bigScale = {1.2f, 1.2f, 1.2f}; + const VEC3 smallScale = {0.25f, 0.25f, 0.25f}; + for (int i = 0; i < 6; i++) { + const VEC3 *whichScale = &smallScale; + if (i == 0) + whichScale = &bigScale; + else if (i == 5) + whichScale = &reallyBigScale; + effects[i].spawn("Wm_cs_torch", 0, &torchPos[i], &efRot, whichScale); + } + + // Mountain Snow + const VEC3 efPos = {6000.0f, -5250.0f, 7000.0f}; + effects[6].spawn("Wm_cs_snow_b", 0, &efPos, &efRot, 0); + } + + if (mapID == 4) { + // Freezeflame Volcano -- DONE + const VEC3 efPos = {2200.0f, -2000.0f, 7000.0f}; + effects[0].spawn("Wm_cs_firespark", 0, &efPos, &efRot, 0); + } + + if (mapID == 6) { + // Koopa Planet -- DONE + const VEC3 efPos = {2200.0f, -2000.0f, 7000.0f}; + effects[0].spawn("Wm_cs_firespark", 0, &efPos, &efRot, 0); + } + + if (mapID == 7) { + // Koopa Core -- DONE + // Main area + const VEC3 efPos = {2500.0f, -2900.0f, 7000.0f}; + effects[0].spawn("Wm_cs_firespark", 0, &efPos, &efRot, 0); + // Castle area + const VEC3 efPos2 = {4500.0f, -3800.0f, 7000.0f}; + effects[1].spawn("Wm_cs_firespark", 0, &efPos2, &efRot, 0); + // Challenge House area + const VEC3 efPos3 = {2500.0f, -5500.0f, 7000.0f}; + effects[2].spawn("Wm_cs_firespark", 0, &efPos2, &efRot, 0); + } + + if (mapID == 3) { + // Mountain Backside -- DONE + VEC3 efPos = {3930.0f, -2700.0f, 7000.0f}; + effects[0].spawn("Wm_cs_snow_a", 0, &efPos, &efRot, 0); + efPos.y -= 700.0f; + effects[1].spawn("Wm_cs_snow_a", 0, &efPos, &efRot, 0); + } + +} + diff --git a/src/koopatlas/map.h b/src/koopatlas/map.h index 82bee1f..8469afa 100644 --- a/src/koopatlas/map.h +++ b/src/koopatlas/map.h @@ -61,6 +61,9 @@ class dWMMap_c : public dBase_c { enum EffRenderCount { EFFECT_RENDERER_COUNT = 12 }; BGGMEffectRenderer effectRenderers[EFFECT_RENDERER_COUNT]; + mEf::es2 effects[7]; + void doEffects(); + mHeapAllocator_c allocator; m3d::mdl_c bgModel; m3d::anmTexSrt_c bgSrtAnm; |