From c2b92e563229d633fefcabb4544b3bf73dc40db0 Mon Sep 17 00:00:00 2001 From: Colin Noga Date: Mon, 13 May 2013 09:57:02 -0500 Subject: Fixes to world map messages, roll your own model, shy guy giant and topman speeds --- src/koopatlas/core.cpp | 16 ++++++++-------- src/koopatlas/pathmanager.cpp | 6 ++++-- src/makeYourOwnModelSprite.cpp | 10 ++++++++++ src/newer.cpp | 2 +- src/shyguyGiants.cpp | 6 +++--- src/topman.cpp | 3 +-- 6 files changed, 27 insertions(+), 16 deletions(-) diff --git a/src/koopatlas/core.cpp b/src/koopatlas/core.cpp index 6618650..6101197 100644 --- a/src/koopatlas/core.cpp +++ b/src/koopatlas/core.cpp @@ -539,14 +539,14 @@ void dScKoopatlas_c::executeState_Normal() { state.setState(&StateID_CSMenu); hud->hideAll(); #ifdef NEWER_DEBUG - } else if (nowPressed & WPAD_MINUS) { - pathManager.unlockAllPaths(2); - } else if (nowPressed & WPAD_A) { - pathManager.unlockAllPaths(0); - SaveBlock *save = GetSaveFile()->GetBlock(-1); - for (int w = 0; w < 6; w++) - for (int l = 0; l < 6; l++) - save->SetLevelCondition(w, l, COND_COIN_ALL); + // } else if (nowPressed & WPAD_MINUS) { + // pathManager.unlockAllPaths(2); + // } else if (nowPressed & WPAD_A) { + // pathManager.unlockAllPaths(0); + // SaveBlock *save = GetSaveFile()->GetBlock(-1); + // for (int w = 0; w < 6; w++) + // for (int l = 0; l < 6; l++) + // save->SetLevelCondition(w, l, COND_COIN_ALL); #endif } } diff --git a/src/koopatlas/pathmanager.cpp b/src/koopatlas/pathmanager.cpp index b1108b8..271bcbe 100644 --- a/src/koopatlas/pathmanager.cpp +++ b/src/koopatlas/pathmanager.cpp @@ -243,8 +243,10 @@ void dWMPathManager_c::setup() { completionMessageType = CMP_MSG_EXITS; } } - if (CanFinishWorld && flag == totalFlag) - completionMessageType = CMP_MSG_WORLD; + if (CanFinishWorld && flag == totalFlag) { + shouldRequestSave = true; + completionMessageType = CMP_MSG_WORLD; + } if (CanFinishAlmostAllCoins) { if ((conds & COND_COIN_ALL) == COND_COIN_ALL) diff --git a/src/makeYourOwnModelSprite.cpp b/src/makeYourOwnModelSprite.cpp index 82718c7..978e830 100644 --- a/src/makeYourOwnModelSprite.cpp +++ b/src/makeYourOwnModelSprite.cpp @@ -558,6 +558,16 @@ int dMakeYourOwn::onCreate() { setupAnim("anim", 1.0); break; + + case 49: // Chestnut Canopy + + setupModel("chestnut", "g3d/canopy_3.brres", "canopy_3"); + SetupTextures_MapObj(&bodyModel, 0); + this->pos.z = 0.0; + + // setupAnim("anim38", 1.0); + break; + } allocator.unlink(); diff --git a/src/newer.cpp b/src/newer.cpp index a48a4c0..edbbf3b 100644 --- a/src/newer.cpp +++ b/src/newer.cpp @@ -6,7 +6,7 @@ int lastLevelIDs[] = { -1, /*no world*/ 27, 27, 27, 27, 27, 27, 27, 25, 10, - 24, 24, 24, 3, 21 + 24, 24, 21, 24, 3 }; diff --git a/src/shyguyGiants.cpp b/src/shyguyGiants.cpp index aefcb3c..a2c4008 100644 --- a/src/shyguyGiants.cpp +++ b/src/shyguyGiants.cpp @@ -161,8 +161,8 @@ daShyGuyGiant *daShyGuyGiant::build() { } } } -void daShyGuyGiant::_vf278(void *other) { - PlaySound(this, SE_EMY_HANACHAN_STOMP); + void daShyGuyGiant::_vf278(void *other) { + PlaySound(this, SE_EMY_HANACHAN_STOMP); } void daShyGuyGiant::bouncePlayerWhenJumpedOn(void *player) { @@ -300,7 +300,7 @@ bool daShyGuyGiant::calculateTileCollisions() { // u8 one = (blah & 0xFF); // static const float incs[5] = {0.00390625f, 0.0078125f, 0.015625f, 0.0234375f, 0.03125f}; // x_speed_inc = incs[one]; - max_speed.x = (direction == 1) ? -1.0f : 1.0f; + max_speed.x = (direction == 1) ? -this->XSpeed : this->XSpeed; } else { x_speed_inc = 0.0f; } diff --git a/src/topman.cpp b/src/topman.cpp index cebf626..3d309a6 100644 --- a/src/topman.cpp +++ b/src/topman.cpp @@ -39,7 +39,6 @@ class daTopman : public dEn_c { void updateModelMatrices(); bool calculateTileCollisions(); - // void spriteCollision(ActivePhysics *apThis, ActivePhysics *apOther); void playerCollision(ActivePhysics *apThis, ActivePhysics *apOther); void yoshiCollision(ActivePhysics *apThis, ActivePhysics *apOther); @@ -259,7 +258,7 @@ bool daTopman::calculateTileCollisions() { // u8 one = (blah & 0xFF); // static const float incs[5] = {0.00390625f, 0.0078125f, 0.015625f, 0.0234375f, 0.03125f}; // x_speed_inc = incs[one]; - max_speed.x = (direction == 1) ? -1.0f : 1.0f; + max_speed.x = (direction == 1) ? -0.8f : 0.8f; } else { x_speed_inc = 0.0f; } -- cgit v1.2.3