diff --git a/configure.py b/configure.py index 9e8975ea..bb4c286c 100755 --- a/configure.py +++ b/configure.py @@ -433,7 +433,11 @@ config.libs = [ Object(Matching, "MetroidPrime/ScriptObjects/CScriptGrapplePoint.cpp"), Object(Matching, "MetroidPrime/ScriptObjects/CHUDBillboardEffect.cpp"), Object(NonMatching, "MetroidPrime/Enemies/CFlickerBat.cpp"), - Object(NonMatching, "MetroidPrime/BodyState/CBodyStateCmdMgr.cpp", cflags=[*cflags_retro, "-inline auto"]), + Object( + NonMatching, + "MetroidPrime/BodyState/CBodyStateCmdMgr.cpp", + cflags=[*cflags_retro, "-inline auto"], + ), Object(NonMatching, "MetroidPrime/BodyState/CBodyStateInfo.cpp"), Object(NonMatching, "MetroidPrime/BodyState/CBSAttack.cpp"), Object(Matching, "MetroidPrime/BodyState/CBSDie.cpp"), @@ -547,9 +551,7 @@ config.libs = [ Object(Matching, "MetroidPrime/CHealthInfo.cpp"), Object(NonMatching, "MetroidPrime/Player/CGameState.cpp"), Object(Matching, "MetroidPrime/ScriptObjects/CScriptVisorFlare.cpp"), - Object( - NonMatching, "MetroidPrime/ScriptObjects/CScriptWorldTeleporter.cpp" - ), + Object(Matching, "MetroidPrime/ScriptObjects/CScriptWorldTeleporter.cpp"), Object(NonMatching, "MetroidPrime/ScriptObjects/CScriptVisorGoo.cpp"), Object(NonMatching, "MetroidPrime/Enemies/CJellyZap.cpp"), Object(Matching, "MetroidPrime/ScriptObjects/CScriptControllerAction.cpp"), @@ -1159,11 +1161,11 @@ config.libs = [ ], }, MusyX( - #debug=True, - #mw_version="GC/1.2.5", - #major=1, - #minor=5, - #patch=3, + # debug=True, + # mw_version="GC/1.2.5", + # major=1, + # minor=5, + # patch=3, objects=[ Object(Matching, "musyx/runtime/seq.c"), Object(Matching, "musyx/runtime/synth.c"), diff --git a/include/MetroidPrime/CAnimRes.hpp b/include/MetroidPrime/CAnimRes.hpp index aa3bf661..f14725a6 100644 --- a/include/MetroidPrime/CAnimRes.hpp +++ b/include/MetroidPrime/CAnimRes.hpp @@ -20,7 +20,7 @@ public: // CAnimRes() // : x4_charIdx(-1), x14_canLoop(false), x8_scale(????), x18_defaultAnim(-1) {} - CAnimRes(CAssetId ancs, const int charIdx, const CVector3f& scale, const int defaultAnim, const bool loop) + CAnimRes(CAssetId ancs, int charIdx, const CVector3f& scale, int defaultAnim, bool loop) : x0_ancsId(ancs) , x4_charIdx(charIdx) , x8_scale(scale) diff --git a/src/MetroidPrime/ScriptObjects/CScriptWorldTeleporter.cpp b/src/MetroidPrime/ScriptObjects/CScriptWorldTeleporter.cpp index 237d2521..5d6cca2f 100644 --- a/src/MetroidPrime/ScriptObjects/CScriptWorldTeleporter.cpp +++ b/src/MetroidPrime/ScriptObjects/CScriptWorldTeleporter.cpp @@ -32,8 +32,7 @@ CScriptWorldTeleporter::CScriptWorldTeleporter(TUniqueId uid, const rstl::string , x7c_backgroundScale(CVector3f::Zero()) , x88_soundId(CSfxManager::kInternalInvalidSfxId) , x8a_volume(0) -, x8b_panning(0) -{} +, x8b_panning(0) {} CScriptWorldTeleporter::CScriptWorldTeleporter( TUniqueId uid, const rstl::string& name, const CEntityInfo& info, bool active, CAssetId worldId, @@ -145,10 +144,15 @@ void CScriptWorldTeleporter::StartTransition(CStateManager& mgr) { if (x3c_type == kTT_Elevator && x50_playerAnim.GetACSFile() != kInvalidAssetId && x50_playerAnim.GetCharacter() != u32(-1)) { - transMgr->EnableTransition(CAnimRes(x50_playerAnim.GetACSFile(), x50_playerAnim.GetCharacter(), - x5c_playerScale, x50_playerAnim.GetInitialAnimation(), - true), - x68_platformModel, x6c_platformScale, x78_backgroundModel, +#if NONMATCHING + CAnimRes animRes(x50_playerAnim.GetACSFile(), x50_playerAnim.GetCharacter(), x5c_playerScale, + x50_playerAnim.GetInitialAnimation(), true); +#else + // Original uses reversed defaultAnim / charIdx. Bug or are our names wrong? + CAnimRes animRes(x50_playerAnim.GetACSFile(), x50_playerAnim.GetInitialAnimation(), + x5c_playerScale, x50_playerAnim.GetCharacter(), true); +#endif + transMgr->EnableTransition(animRes, x68_platformModel, x6c_platformScale, x78_backgroundModel, x7c_backgroundScale, x40_24_upElevator); x40_25_inTransition = true;