From 625dd1c5bf02cdafa965d321f94aafec1afe06ab Mon Sep 17 00:00:00 2001 From: AP-NJA Date: Sat, 11 Apr 2026 20:44:49 -0400 Subject: [PATCH 01/10] Invincible.cpp work --- src/donut/scn/step/chara/Invincible.cpp | 99 +++++++++++++++++++++++++ src/donut/scn/step/chara/Invincible.hpp | 48 ++++++++++++ 2 files changed, 147 insertions(+) create mode 100644 src/donut/scn/step/chara/Invincible.cpp create mode 100644 src/donut/scn/step/chara/Invincible.hpp diff --git a/src/donut/scn/step/chara/Invincible.cpp b/src/donut/scn/step/chara/Invincible.cpp new file mode 100644 index 0000000..dac6b45 --- /dev/null +++ b/src/donut/scn/step/chara/Invincible.cpp @@ -0,0 +1,99 @@ +#include "scn/step/chara/Invincible.hpp" +#include "scn/step/enemy/SuperStop.hpp" + +using namespace scn::step::chara; +using namespace scn::step::enemy; + +Invincible::Invincible() +{ + mInvincibleFrames = 0; + mFlashCycle = 0; + mUsingIntangibleMove = 0; + mIsCandyActive = 0; +} + +void Invincible::update(void) +{ + u32 nextFlash; + if (isInvincible()) + { + updateFrame(); + nextFlash = mFlashCycle + 1; + mFlashCycle = nextFlash; + if (nextFlash == 0x14) + { + mFlashCycle = 0x10; + } + } +} + +bool Invincible::isInvincible(void) const +{ + bool result = false; + if ((mUsingIntangibleMove != false) || (mIsCandyActive != false) || (mInvincibleFrames != 0)) + { + result = true; + } + + return result; +} + +void Invincible::set(u32 frames) +{ + if (mInvincibleFrames < frames) + { + mInvincibleFrames = frames; + } + + mFlashCycle = 0; + return; +} + +void Invincible::clear(void) +{ + mInvincibleFrames = 0; + // TODO: Investigate scn::step::enemy::onSuperStopStarted(const Manager &); +} + +void Invincible::setPerm() +{ + mUsingIntangibleMove = true; + mFlashCycle = 0; +} + +void Invincible::unsetMighty() +{ + mIsCandyActive = false; +} + +bool Invincible::isMighty() const +{ + return mIsCandyActive; +} + +#pragma peephole off +u32 Invincible::getFlashAlpha() const +{ + bool result = isInvincible(); + u32 alpha; + + if (result) + { + alpha = T_ALPHA_ANIM_TABLE[mFlashCycle / 2]; + } + else + { + alpha = 0; + } + + return alpha; +} + +void Invincible::updateFrame(void) +{ + u32 currentFrames = mInvincibleFrames; + if (currentFrames != 0) + { + mInvincibleFrames = currentFrames - 1; + } +} diff --git a/src/donut/scn/step/chara/Invincible.hpp b/src/donut/scn/step/chara/Invincible.hpp new file mode 100644 index 0000000..6337b16 --- /dev/null +++ b/src/donut/scn/step/chara/Invincible.hpp @@ -0,0 +1,48 @@ +#ifndef DONUT_SCN_STEP_CHARA_INVINCIBLE_HPP +#define DONUT_SCN_STEP_CHARA_INVINCIBLE_HPP + +#include "scn/step/enemy/SuperStop.hpp" +#include + +/* clang-format off */ +namespace scn { namespace step { namespace chara { + +const u32 T_ALPHA_ANIM_TABLE[10] = { + 0xF0, + 0x50, + 0xA0, + 0x14, + 0x8C, + 0x0A, + 0x78, + 0x00, + 0x64, + 0x00 +}; + +class Invincible +{ +public: + Invincible(); + void update(); + bool isInvincible() const; + void set(u32 frames); + void clear(); + void setPerm(); + void unsetMighty(); + bool isMighty() const; + u32 getFlashAlpha() const; + void updateFrame(); + +private: + u32 mInvincibleFrames; + u32 mFlashCycle; + bool mUsingIntangibleMove; + bool mIsCandyActive; +}; + +}}} + +/* clang-format on */ + +#endif From 104057cc22c3dddeee7e4032899881610506f54d Mon Sep 17 00:00:00 2001 From: AP-NJA Date: Thu, 2 Jul 2026 11:43:02 -0400 Subject: [PATCH 02/10] Guard.cpp functions --- src/donut/scn/step/hero/Guard.cpp | 58 +++++++++++++++++++++++++++++++ src/donut/scn/step/hero/Guard.hpp | 51 +++++++++++++++++++++++++++ src/donut/scn/step/hero/Hero.hpp | 11 ++++++ 3 files changed, 120 insertions(+) create mode 100644 src/donut/scn/step/hero/Guard.cpp create mode 100644 src/donut/scn/step/hero/Guard.hpp diff --git a/src/donut/scn/step/hero/Guard.cpp b/src/donut/scn/step/hero/Guard.cpp new file mode 100644 index 0000000..e57d99a --- /dev/null +++ b/src/donut/scn/step/hero/Guard.cpp @@ -0,0 +1,58 @@ +#include "scn/step/hero/Guard.hpp" + +using namespace scn::step::hero; + +Guard::Guard(Hero &hero) + : mHero(&hero) +{ + mEnableGuardState = false; + mEnableGuardFlash = false; + mGuardFlashCycle = 0; +} + +void Guard::update() +{ + if (mEnableGuardState != false) + { + u32 guardFlashCycle = mGuardFlashCycle + 1; + mGuardFlashCycle = guardFlashCycle; + + if (guardFlashCycle >= 20) + { + mGuardFlashCycle = 12; + } + } + + mEnableGuardFlash = mEnableGuardState; +} + +void Guard::setGuard(bool flag) +{ + mEnableGuardState = flag; + + if ((mEnableGuardFlash == false) && (mEnableGuardState == true)) + { + return; + } + + mGuardFlashCycle = 0; +} + +#pragma peephole off +_GXColor Guard::getColor() const +{ + _GXColor color; + u32 alpha = 0; + + if (mEnableGuardState != false) + { + alpha = T_ALPHA_TABLE[mGuardFlashCycle]; + } + + color.r = 0xFF; + color.g = 0xFF; + color.b = 0xFF; + color.a = alpha; + + return color; +} diff --git a/src/donut/scn/step/hero/Guard.hpp b/src/donut/scn/step/hero/Guard.hpp new file mode 100644 index 0000000..1dd60fa --- /dev/null +++ b/src/donut/scn/step/hero/Guard.hpp @@ -0,0 +1,51 @@ +#ifndef DONUT_SCN_STEP_HERO_GUARD_HPP +#define DONUT_SCN_STEP_HERO_GUARD_HPP + +#include +#include + +#include "scn/step/hero/Hero.hpp" + +/* clang-format off */ +namespace scn { namespace step { namespace hero { + +const u32 T_ALPHA_TABLE[20] = { + 0xC0, + 0xC0, + 0xA0, + 0x90, + 0x80, + 0x60, + 0x40, + 0x20, + 0x00, + 0x00, + 0x00, + 0x00, + 0x40, + 0x60, + 0x40, + 0x20, + 0x00, + 0x00, + 0x00, + 0x00 +}; + +class Guard +{ +public: + Guard(Hero &hero); + void update(); + void setGuard(bool flag); + _GXColor getColor() const; +private: + /* 0x00 */ Hero *mHero; + /* 0x04 */ bool mEnableGuardState; + /* 0x05 */ bool mEnableGuardFlash; + /* 0x08 */ u32 mGuardFlashCycle; +}; + +}}} + +#endif diff --git a/src/donut/scn/step/hero/Hero.hpp b/src/donut/scn/step/hero/Hero.hpp index 762feaa..fc2223e 100644 --- a/src/donut/scn/step/hero/Hero.hpp +++ b/src/donut/scn/step/hero/Hero.hpp @@ -1,10 +1,16 @@ #ifndef DONUT_SCN_STEP_HERO_HERO_HPP #define DONUT_SCN_STEP_HERO_HERO_HPP +#include + +#include "mem/ExplicitScopedPtr.hpp" #include "scn/step/common/Param.hpp" #include "scn/step/hero/Kind.hpp" +/* clang-format off */ namespace scn { namespace step { namespace hero { + class Guard; + class Param { // todo: put this in its own file public: common::Param* indiviKirby() const; @@ -17,7 +23,12 @@ namespace scn { namespace step { namespace hero { public: Param* param() const; Kind kind() const; // code merged + Guard* guard(); + private: + u8 m_0[0x168 - 0x0]; + mem::ExplicitScopedPtr mGuard; }; }}} +/* clang-format on */ #endif From 1db76099e6c44f65fae1de7644249e0a7fba6bf3 Mon Sep 17 00:00:00 2001 From: AP-NJA Date: Thu, 2 Jul 2026 11:43:56 -0400 Subject: [PATCH 03/10] Invincible.cpp functions --- src/donut/scn/step/chara/Invincible.cpp | 12 +++++------- src/donut/scn/step/chara/Invincible.hpp | 10 ++++------ 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/src/donut/scn/step/chara/Invincible.cpp b/src/donut/scn/step/chara/Invincible.cpp index dac6b45..b866436 100644 --- a/src/donut/scn/step/chara/Invincible.cpp +++ b/src/donut/scn/step/chara/Invincible.cpp @@ -1,8 +1,6 @@ #include "scn/step/chara/Invincible.hpp" -#include "scn/step/enemy/SuperStop.hpp" using namespace scn::step::chara; -using namespace scn::step::enemy; Invincible::Invincible() { @@ -12,7 +10,7 @@ Invincible::Invincible() mIsCandyActive = 0; } -void Invincible::update(void) +void Invincible::update() { u32 nextFlash; if (isInvincible()) @@ -27,7 +25,7 @@ void Invincible::update(void) } } -bool Invincible::isInvincible(void) const +bool Invincible::isInvincible() const { bool result = false; if ((mUsingIntangibleMove != false) || (mIsCandyActive != false) || (mInvincibleFrames != 0)) @@ -49,10 +47,10 @@ void Invincible::set(u32 frames) return; } -void Invincible::clear(void) +void Invincible::clear() { mInvincibleFrames = 0; - // TODO: Investigate scn::step::enemy::onSuperStopStarted(const Manager &); + mUsingIntangibleMove = false; } void Invincible::setPerm() @@ -89,7 +87,7 @@ u32 Invincible::getFlashAlpha() const return alpha; } -void Invincible::updateFrame(void) +void Invincible::updateFrame() { u32 currentFrames = mInvincibleFrames; if (currentFrames != 0) diff --git a/src/donut/scn/step/chara/Invincible.hpp b/src/donut/scn/step/chara/Invincible.hpp index 6337b16..63ae53c 100644 --- a/src/donut/scn/step/chara/Invincible.hpp +++ b/src/donut/scn/step/chara/Invincible.hpp @@ -1,7 +1,6 @@ #ifndef DONUT_SCN_STEP_CHARA_INVINCIBLE_HPP #define DONUT_SCN_STEP_CHARA_INVINCIBLE_HPP -#include "scn/step/enemy/SuperStop.hpp" #include /* clang-format off */ @@ -33,12 +32,11 @@ class Invincible bool isMighty() const; u32 getFlashAlpha() const; void updateFrame(); - private: - u32 mInvincibleFrames; - u32 mFlashCycle; - bool mUsingIntangibleMove; - bool mIsCandyActive; + /* 0x00 */ u32 mInvincibleFrames; + /* 0x04 */ u32 mFlashCycle; + /* 0x08 */ bool mUsingIntangibleMove; + /* 0x09 */ bool mIsCandyActive; }; }}} From dd7afc913ca47c5c73b12b8f739197fb8f8e01fc Mon Sep 17 00:00:00 2001 From: AP-NJA Date: Thu, 2 Jul 2026 11:52:30 -0400 Subject: [PATCH 04/10] Starting work on Enemy --- src/donut/scn/step/enemy/Enemy.cpp | 1 + src/donut/scn/step/enemy/Enemy.hpp | 25 +++++++++++++++ src/donut/scn/step/enemy/SuperStop.cpp | 43 ++++++++++++++++++++++++++ src/donut/scn/step/enemy/SuperStop.hpp | 28 +++++++++++++++++ 4 files changed, 97 insertions(+) create mode 100644 src/donut/scn/step/enemy/Enemy.cpp create mode 100644 src/donut/scn/step/enemy/Enemy.hpp create mode 100644 src/donut/scn/step/enemy/SuperStop.cpp create mode 100644 src/donut/scn/step/enemy/SuperStop.hpp diff --git a/src/donut/scn/step/enemy/Enemy.cpp b/src/donut/scn/step/enemy/Enemy.cpp new file mode 100644 index 0000000..1cb67b6 --- /dev/null +++ b/src/donut/scn/step/enemy/Enemy.cpp @@ -0,0 +1 @@ +#include "scn/step/enemy/Enemy.hpp" diff --git a/src/donut/scn/step/enemy/Enemy.hpp b/src/donut/scn/step/enemy/Enemy.hpp new file mode 100644 index 0000000..7ef1d0a --- /dev/null +++ b/src/donut/scn/step/enemy/Enemy.hpp @@ -0,0 +1,25 @@ +#ifndef DONUT_SCN_STEP_ENEMY_HPP +#define DONUT_SCN_STEP_ENEMY_HPP + +#include "mem/ExplicitScopedPtr.hpp" +#include "scn/step/Component.hpp" + +/* clang-format off */ +namespace scn { namespace step { namespace enemy { + +class Enemy +{ +public: + // Enemy(scn::step::Component &rComponent); + ~Enemy(); + + void objStop(); +public: + /* 0x0 */ Component *mComponent; + /* 0x4 */ u8 _4[0xAC - 0x4]; + /* 0x8 */ mem::ExplicitScopedPtr mObjStop; +}; + +}}} + +#endif diff --git a/src/donut/scn/step/enemy/SuperStop.cpp b/src/donut/scn/step/enemy/SuperStop.cpp new file mode 100644 index 0000000..40addf4 --- /dev/null +++ b/src/donut/scn/step/enemy/SuperStop.cpp @@ -0,0 +1,43 @@ +#include "scn/step/enemy/SuperStop.hpp" + +using namespace scn::step::enemy; + +SuperStop::SuperStop(Enemy &rEnemy) +{ + scn::step::spstop::Manager *pSuperStopManager; + + mEnemy = &rEnemy; + m_8 = false; + + pSuperStopManager = mEnemy->mComponent->superStopManager(); + pSuperStopManager->registerEventReceiver(*this); +} + +SuperStop::~SuperStop() +{ + scn::step::spstop::Manager *pSuperStopManager = mEnemy->mComponent->superStopManager(); + pSuperStopManager->unregisterEventReceiver(*this); +} + +void SuperStop::onObjCollReactHit() +{ + scn::step::spstop::Manager *pSuperStopManager = mEnemy->mComponent->superStopManager(); + + if (pSuperStopManager->isStopped()) + { + // mEnemy->objStop(); + } +} + +inline void SuperStop::onSuperStopStarted(const scn::step::spstop::Manager &rManager) +{ + m_8 = false; +} + +void SuperStop::onSuperStopFinished(const scn::step::spstop::Manager &rManager) +{ + if (m_8 == false) + { + // mEnemy->objStop(); + } +} diff --git a/src/donut/scn/step/enemy/SuperStop.hpp b/src/donut/scn/step/enemy/SuperStop.hpp new file mode 100644 index 0000000..487d1b8 --- /dev/null +++ b/src/donut/scn/step/enemy/SuperStop.hpp @@ -0,0 +1,28 @@ +#ifndef DONUT_SCN_STEP_ENEMY_SUPERSTOP_HPP +#define DONUT_SCN_STEP_ENEMY_SUPERSTOP_HPP + +#include "scn/step/enemy/Enemy.hpp" +#include "scn/step/spstop/Manager.hpp" + +/* clang-format off */ +namespace scn { namespace step { namespace enemy { + +class SuperStop : public scn::step::spstop::IEventReceiver +{ +public: + SuperStop(Enemy &rEnemy); + virtual ~SuperStop(); + + void onObjCollReactHit(); + virtual inline void onSuperStopStarted(const scn::step::spstop::Manager &rManager); + virtual void onSuperStopFinished(const scn::step::spstop::Manager &rManager); +private: + /* 0x4 */ Enemy *mEnemy; + /* 0x8 */ bool m_8; +}; + +}}} + +/* clang-format on */ + +#endif From e2ce99e75a1e2b0f63254eb0af2f8f3db8583d01 Mon Sep 17 00:00:00 2001 From: AP-NJA Date: Thu, 2 Jul 2026 11:54:38 -0400 Subject: [PATCH 05/10] Starting work on spstop --- src/donut/scn/step/Component.cpp | 18 ++++-- src/donut/scn/step/Component.hpp | 15 +++-- src/donut/scn/step/spstop/IEventReceiver.hpp | 19 ++++++ src/donut/scn/step/spstop/Manager.cpp | 65 ++++++++++++++++++++ src/donut/scn/step/spstop/Manager.hpp | 31 ++++++++++ 5 files changed, 136 insertions(+), 12 deletions(-) create mode 100644 src/donut/scn/step/spstop/IEventReceiver.hpp create mode 100644 src/donut/scn/step/spstop/Manager.cpp create mode 100644 src/donut/scn/step/spstop/Manager.hpp diff --git a/src/donut/scn/step/Component.cpp b/src/donut/scn/step/Component.cpp index 15060de..5e731b9 100644 --- a/src/donut/scn/step/Component.cpp +++ b/src/donut/scn/step/Component.cpp @@ -5,19 +5,29 @@ using namespace scn::step; using mem::ExplicitScopedPtrUtil::CheckPointerIsValid; -Component::~Component() { } +Component::~Component() +{ +} -core::SphereAccessor* Component::sphereAccessor() { +core::SphereAccessor *Component::sphereAccessor() +{ CheckPointerIsValid(mSphereAccessor.operator->()); return mSphereAccessor.operator->(); } -debug::GeneralDrawer* Component::debugGeneralDrawer() { +debug::GeneralDrawer *Component::debugGeneralDrawer() +{ CheckPointerIsValid(mDebugGeneralDrawer.operator->()); return mDebugGeneralDrawer.operator->(); } -debug::ObjInfoRepos* Component::debugObjInfoRepos() { +debug::ObjInfoRepos *Component::debugObjInfoRepos() +{ CheckPointerIsValid(mDebugObjInfoRepos.operator->()); return mDebugObjInfoRepos.operator->(); } + +spstop::Manager *Component::superStopManager() +{ + return mSuperStopManager.operator->(); +} diff --git a/src/donut/scn/step/Component.hpp b/src/donut/scn/step/Component.hpp index 2740616..d0ac705 100644 --- a/src/donut/scn/step/Component.hpp +++ b/src/donut/scn/step/Component.hpp @@ -1,18 +1,21 @@ #ifndef DONUT_SCN_STEP_COMPONENT_HPP #define DONUT_SCN_STEP_COMPONENT_HPP -#include #include "scn/step/Context.hpp" #include "scn/step/core/SphereAccessor.hpp" -#include "scn/step/debug/ShowGrid.hpp" -#include "scn/step/debug/ShowPegFrame.hpp" #include "scn/step/debug/GeneralDrawer.hpp" #include "scn/step/debug/ObjInfoRepos.hpp" -#include "scn/step/map/DataFile.hpp" +#include "scn/step/debug/ShowGrid.hpp" +#include "scn/step/debug/ShowPegFrame.hpp" #include "scn/step/hero/Manager.hpp" +#include "scn/step/map/DataFile.hpp" +#include "scn/step/spstop/Manager.hpp" +#include // todo: move these to their own headers +/* clang-format off */ + namespace g3d { class ResFileRepository { }; } @@ -41,10 +44,6 @@ namespace scn { namespace step { class Manager { }; } - namespace spstop { - class Manager { }; - } - namespace sfx { class BGFade { }; class ScreenFade { }; diff --git a/src/donut/scn/step/spstop/IEventReceiver.hpp b/src/donut/scn/step/spstop/IEventReceiver.hpp new file mode 100644 index 0000000..ccf55c5 --- /dev/null +++ b/src/donut/scn/step/spstop/IEventReceiver.hpp @@ -0,0 +1,19 @@ +#ifndef DONUT_SCN_STEP_SPSTOP_IEVENTRECEIVER_HPP +#define DONUT_SCN_STEP_SPSTOP_IEVENTRECEIVER_HPP + +/* clang-format off */ + +namespace scn { namespace step { namespace spstop { + +class Manager; + +class IEventReceiver +{ +public: + /* 0x8 */ virtual void onSuperStopStarted(const Manager &rManager); + /* 0xC */ virtual void onSuperStopFinished(const Manager &rManager); +}; + +}}} + +#endif diff --git a/src/donut/scn/step/spstop/Manager.cpp b/src/donut/scn/step/spstop/Manager.cpp new file mode 100644 index 0000000..7577d49 --- /dev/null +++ b/src/donut/scn/step/spstop/Manager.cpp @@ -0,0 +1,65 @@ +#include "scn/step/spstop/Manager.hpp" + +using namespace scn::step::spstop; + +Manager::Manager() +{ + m_204 = false; + mIsStopped = false; +} + +Manager::~Manager() +{ +} + +bool Manager::isStopped() const +{ + return mIsStopped; +} + +void Manager::update() +{ + u32 index; + IEventReceiver *pEventReceiver; + + if (m_204 != mIsStopped) + { + mIsStopped = m_204; + if (m_204 == false) + { + for (index = 0; index < mEventReceiver.mEntries; index++) + { + pEventReceiver = mEventReceiver[index]; + pEventReceiver->onSuperStopStarted(*this); + } + } + else + { + for (index = 0; index < mEventReceiver.mEntries; index++) + { + pEventReceiver = mEventReceiver[index]; + pEventReceiver->onSuperStopFinished(*this); + } + } + } + + return; +} + +void Manager::registerEventReceiver(IEventReceiver &rEventReceiver) +{ + if (mEventReceiver.mEntries != 128) + { + IEventReceiver *eventReceiver = mEventReceiver.mArray[mEventReceiver.mEntries]; + *eventReceiver = rEventReceiver; + mEventReceiver.mEntries = mEventReceiver.mEntries + 1; + } + + if (mIsStopped != false) + { + } +} + +void Manager::unregisterEventReceiver(IEventReceiver &rEventReceiver) +{ +} diff --git a/src/donut/scn/step/spstop/Manager.hpp b/src/donut/scn/step/spstop/Manager.hpp new file mode 100644 index 0000000..fa1fa68 --- /dev/null +++ b/src/donut/scn/step/spstop/Manager.hpp @@ -0,0 +1,31 @@ +#ifndef DONUT_SCN_STEP_SPSTOP_MANAGER_HPP +#define DONUT_SCN_STEP_SPSTOP_MANAGER_HPP + +#include + +#include "hel/common/MutableArray.hpp" +#include "scn/step/spstop/IEventReceiver.hpp" + +/* clang-format off */ +namespace scn { namespace step { namespace spstop { + +class Manager +{ +public: + Manager(); + ~Manager(); + bool isStopped() const; + void update(); + void registerEventReceiver(IEventReceiver &rEventReceiver); + void unregisterEventReceiver(IEventReceiver &rEventReceiver); +private: + /* 0x000 */ hel::common::MutableArray mEventReceiver; + /* 0x204 */ bool m_204; + /* 0x205 */ bool mIsStopped; +}; + +}}} + +/* clang-format on */ + +#endif From c9c9df31a15f79d7bb49d5bdd82138a11cf3a019 Mon Sep 17 00:00:00 2001 From: AP-NJA Date: Thu, 2 Jul 2026 11:56:53 -0400 Subject: [PATCH 06/10] MutableArray/Array class changes --- src/hel/common/Array.hpp | 9 ++++++--- src/hel/common/MutableArray.hpp | 10 +++++++--- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/hel/common/Array.hpp b/src/hel/common/Array.hpp index 4673e36..de7e3da 100644 --- a/src/hel/common/Array.hpp +++ b/src/hel/common/Array.hpp @@ -3,15 +3,18 @@ #include +/* clang-format off */ + namespace hel { namespace common { template class Array { public: - T& operator[](size_t index); -private: - /* 0x0 */ T mArray[S]; + Array() : mData() {}; + T &operator[](size_t index); +public: + /* 0x0 */ T mData[S]; }; } // common diff --git a/src/hel/common/MutableArray.hpp b/src/hel/common/MutableArray.hpp index 5893403..ebbf7b2 100644 --- a/src/hel/common/MutableArray.hpp +++ b/src/hel/common/MutableArray.hpp @@ -1,16 +1,20 @@ #ifndef HEL_COMMON_MUTABLEARRAY_HPP #define HEL_COMMON_MUTABLEARRAY_HPP -#include +#include "hel/common/Array.hpp" +/* clang-format off */ namespace hel { namespace common { template class MutableArray { public: + MutableArray() : mEntries(0), mArray() {}; ~MutableArray(); -private: - /* 0x0 */ T mArray[S]; + T &operator[](size_t size); +public: + /* 0x0 */ u32 mEntries; + /* 0x4 */ Array mArray; }; }} #endif From 1b555b60cf1b9c08eb2b577d750ab3de2f760e90 Mon Sep 17 00:00:00 2001 From: AP-NJA Date: Thu, 2 Jul 2026 11:59:04 -0400 Subject: [PATCH 07/10] SequenceLvMapRoot function jotting --- src/donut/seq/ISequence.hpp | 12 ++++++- src/donut/seq/SequenceLvMapRoot.cpp | 52 +++++++++++++++++++++++++++++ src/donut/seq/SequenceLvMapRoot.hpp | 30 +++++++++++++++++ 3 files changed, 93 insertions(+), 1 deletion(-) create mode 100644 src/donut/seq/SequenceLvMapRoot.cpp create mode 100644 src/donut/seq/SequenceLvMapRoot.hpp diff --git a/src/donut/seq/ISequence.hpp b/src/donut/seq/ISequence.hpp index 00ca9fb..8b838d0 100644 --- a/src/donut/seq/ISequence.hpp +++ b/src/donut/seq/ISequence.hpp @@ -1,8 +1,18 @@ #ifndef DONUT_SEQ_ISEQUENCE_HPP #define DONUT_SEQ_ISEQUENCE_HPP +#include + +/* clang-format off */ + namespace seq { - class ISequence; + +class ISequence +{ +public: + ~ISequence(); +}; + } #endif diff --git a/src/donut/seq/SequenceLvMapRoot.cpp b/src/donut/seq/SequenceLvMapRoot.cpp new file mode 100644 index 0000000..5ffdcd4 --- /dev/null +++ b/src/donut/seq/SequenceLvMapRoot.cpp @@ -0,0 +1,52 @@ +#include "seq/SequenceLvMapRoot.hpp" + +using namespace seq; + +SequenceLvMapRoot::SequenceLvMapRoot() +{ +} + +SequenceLvMapRoot::~SequenceLvMapRoot() +{ +} + +u32 SequenceLvMapRoot::nextAction() const +{ +} + +void SequenceLvMapRoot::createChildSequence() const +{ +} + +void SequenceLvMapRoot::onChildSequenceEnd() +{ +} + +void SequenceLvMapRoot::createScene() const +{ +} + +void SequenceLvMapRoot::onSceneEnd(scn::IScene &scene) +{ + return; +} + +void SequenceLvMapRoot::setupForLeaveDoor() +{ +} + +void SequenceLvMapRoot::resetContextHero(bool param_1) +{ +} + +void SequenceLvMapRoot::onChildSequenceEndForLvMap(ISequence &sequence) +{ +} + +void SequenceLvMapRoot::onChildsequenceEndForChallenge(ISequence &sequence) +{ +} + +void SequenceLvMapRoot::GetRuntimeTypeInfo() const +{ +} diff --git a/src/donut/seq/SequenceLvMapRoot.hpp b/src/donut/seq/SequenceLvMapRoot.hpp new file mode 100644 index 0000000..3a4527f --- /dev/null +++ b/src/donut/seq/SequenceLvMapRoot.hpp @@ -0,0 +1,30 @@ +#ifndef DONUT_SEQ_SEQUENCELVMAPROOT_HPP +#define DONUT_SEQ_SEQUENCELVMAPROOT_HPP + +#include "scn/IScene.hpp" +#include "seq/ISequence.hpp" + +/* clang-format off */ + +namespace seq { + +class SequenceLvMapRoot +{ +public: + SequenceLvMapRoot(); + ~SequenceLvMapRoot(); + u32 nextAction() const; + void createChildSequence() const; + void onChildSequenceEnd(); + void createScene() const; + void onSceneEnd(scn::IScene & scene); + void setupForLeaveDoor(); + void resetContextHero(bool param_1); + void onChildSequenceEndForLvMap(ISequence & sequence); + void onChildsequenceEndForChallenge(ISequence & sequence); + void GetRuntimeTypeInfo() const; +}; + +} + +#endif From d7e1b1bfab34a8b591ffcc57bf0cb7098ca6af6f Mon Sep 17 00:00:00 2001 From: AP-NJA Date: Thu, 2 Jul 2026 12:01:14 -0400 Subject: [PATCH 08/10] Update build procedure --- config/S72E01/splits.txt | 23 ++++++++++ config/S72E01/symbols.txt | 88 +++++++++++++++++++-------------------- configure.py | 36 +++++++++++++--- 3 files changed, 98 insertions(+), 49 deletions(-) diff --git a/config/S72E01/splits.txt b/config/S72E01/splits.txt index 147a984..010ddc9 100644 --- a/config/S72E01/splits.txt +++ b/config/S72E01/splits.txt @@ -369,14 +369,37 @@ donut/scn/step/GridPos.cpp: .text start:0x802214BC end:0x80221668 .sdata2 start:0x80560200 end:0x80560210 +donut/scn/step/chara/Invincible.cpp: + .text start:0x8026EE48 end:0x8026EFA8 + .rodata start:0x80417960 end:0x80417988 + +donut/scn/step/enemy/Enemy.cpp: + .text start:0x80284898 end:0x80288214 + .data start:0x80471E30 end:0x80471F00 + donut/scn/step/enemy/Param.cpp: .text start:0x8028C248 end:0x8028DA10 .data start:0x804726D8 end:0x80472C18 +donut/scn/step/enemy/SuperStop.cpp: + .text start:0x8028DF54 end:0x8028E0D4 + .data start:0x80472C60 end:0x80472C78 + donut/scn/step/block/BlockInfo.cpp: .text start:0x80300700 end:0x80300760 +donut/scn/step/hero/Guard.cpp: + .text start:0x803385F8 end:0x803386B4 + .rodata start:0x80419D00 end:0x80419D50 + donut/scn/step/hero/IndiviUtil.cpp: .text start:0x803418A4 end:0x80341C74 .data start:0x80484CD0 end:0x80484D28 .sdata2 start:0x80562C10 end:0x80562C20 + +donut/scn/step/spstop/Manager.cpp: + .text start:0x803D0B9C end:0x803D0E90 + +donut/seq/SequenceLvMapRoot.cpp: + .text start:0x803FEC20 end:0x803FF424 + .data start:0x80496478 end:0x804964A0 diff --git a/config/S72E01/symbols.txt b/config/S72E01/symbols.txt index ecce1dc..1ea1fb8 100644 --- a/config/S72E01/symbols.txt +++ b/config/S72E01/symbols.txt @@ -5988,7 +5988,7 @@ canSceneUpdate__Q23app7AppImplCFv = .text:0x801761D8; // type:function size:0x88 fn_80176268 = .text:0x80176268; // type:function size:0x4C fn_801762B4 = .text:0x801762B4; // type:function size:0x80 fn_80176334 = .text:0x80176334; // type:function size:0x8C -fn_801763C0 = .text:0x801763C0; // type:function size:0x34 +__rf__Q33hel6common25ScopedPtrCFv = .text:0x801763C0; // type:function size:0x34 fn_801763F4 = .text:0x801763F4; // type:function size:0x70 fn_80176464 = .text:0x80176464; // type:function size:0x24 fn_80176488 = .text:0x80176488; // type:function size:0x24 @@ -14454,16 +14454,16 @@ fn_8026ED28 = .text:0x8026ED28; // type:function size:0x98 fn_8026EDC0 = .text:0x8026EDC0; // type:function size:0x3C fn_8026EDFC = .text:0x8026EDFC; // type:function size:0x30 fn_8026EE2C = .text:0x8026EE2C; // type:function size:0x1C -fn_8026EE48 = .text:0x8026EE48; // type:function size:0x18 -fn_8026EE60 = .text:0x8026EE60; // type:function size:0x58 -fn_8026EEB8 = .text:0x8026EEB8; // type:function size:0x34 -fn_8026EEEC = .text:0x8026EEEC; // type:function size:0x1C -fn_8026EF08 = .text:0x8026EF08; // type:function size:0xC -fn_8026EF14 = .text:0x8026EF14; // type:function size:0x14 -fn_8026EF28 = .text:0x8026EF28; // type:function size:0xC -fn_8026EF34 = .text:0x8026EF34; // type:function size:0x8 -fn_8026EF3C = .text:0x8026EF3C; // type:function size:0x54 -fn_8026EF90 = .text:0x8026EF90; // type:function size:0x18 +__ct__Q43scn4step5chara10InvincibleFv = .text:0x8026EE48; // type:function size:0x18 +update__Q43scn4step5chara10InvincibleFv = .text:0x8026EE60; // type:function size:0x58 +isInvincible__Q43scn4step5chara10InvincibleCFv = .text:0x8026EEB8; // type:function size:0x34 +set__Q43scn4step5chara10InvincibleFUl = .text:0x8026EEEC; // type:function size:0x1C +clear__Q43scn4step5chara10InvincibleFv = .text:0x8026EF08; // type:function size:0xC +setPerm__Q43scn4step5chara10InvincibleFv = .text:0x8026EF14; // type:function size:0x14 +unsetMighty__Q43scn4step5chara10InvincibleFv = .text:0x8026EF28; // type:function size:0xC +isMighty__Q43scn4step5chara10InvincibleCFv = .text:0x8026EF34; // type:function size:0x8 +getFlashAlpha__Q43scn4step5chara10InvincibleCFv = .text:0x8026EF3C; // type:function size:0x54 +updateFrame__Q43scn4step5chara10InvincibleFv = .text:0x8026EF90; // type:function size:0x18 fn_8026EFA8 = .text:0x8026EFA8; // type:function size:0x50 fn_8026EFF8 = .text:0x8026EFF8; // type:function size:0xC4 fn_8026F0BC = .text:0x8026F0BC; // type:function size:0x20 @@ -15563,11 +15563,11 @@ fn_8028DF04 = .text:0x8028DF04; // type:function size:0x8 fn_8028DF0C = .text:0x8028DF0C; // type:function size:0x8 fn_8028DF14 = .text:0x8028DF14; // type:function size:0x8 fn_8028DF1C = .text:0x8028DF1C; // type:function size:0x38 -fn_8028DF54 = .text:0x8028DF54; // type:function size:0x58 -fn_8028DFAC = .text:0x8028DFAC; // type:function size:0x80 -fn_8028E02C = .text:0x8028E02C; // type:function size:0x54 -fn_8028E080 = .text:0x8028E080; // type:function size:0xC -fn_8028E08C = .text:0x8028E08C; // type:function size:0x48 +__ct__Q43scn4step5enemy9SuperStopFRQ43scn4step5enemy5Enemy = .text:0x8028DF54; // type:function size:0x58 +__dt__Q43scn4step5enemy9SuperStopFv = .text:0x8028DFAC; // type:function size:0x80 +onObjCollReactHit__Q43scn4step5enemy9SuperStopFv = .text:0x8028E02C; // type:function size:0x54 +onSuperStopStarted__Q43scn4step5enemy9SuperStopFRCQ43scn4step6spstop7Manager = .text:0x8028E080; // type:function size:0xC +onSuperStopFinished__Q43scn4step5enemy9SuperStopFRCQ43scn4step6spstop7Manager = .text:0x8028E08C; // type:function size:0x48 fn_8028E0D4 = .text:0x8028E0D4; // type:function size:0xD4 fn_8028E1A8 = .text:0x8028E1A8; // type:function size:0x8C fn_8028E234 = .text:0x8028E234; // type:function size:0xC8 @@ -21438,10 +21438,10 @@ fn_803384BC = .text:0x803384BC; // type:function size:0x2C fn_803384E8 = .text:0x803384E8; // type:function size:0x5C fn_80338544 = .text:0x80338544; // type:function size:0x8C fn_803385D0 = .text:0x803385D0; // type:function size:0x28 -fn_803385F8 = .text:0x803385F8; // type:function size:0x18 -fn_80338610 = .text:0x80338610; // type:function size:0x34 -fn_80338644 = .text:0x80338644; // type:function size:0x24 -fn_80338668 = .text:0x80338668; // type:function size:0x4C +__ct__Q43scn4step4hero5GuardFRQ43scn4step4hero4Hero = .text:0x803385F8; // type:function size:0x18 +update__Q43scn4step4hero5GuardFv = .text:0x80338610; // type:function size:0x34 +setGuard__Q43scn4step4hero5GuardFb = .text:0x80338644; // type:function size:0x24 +getColor__Q43scn4step4hero5GuardCFv = .text:0x80338668; // type:function size:0x4C fn_803386B4 = .text:0x803386B4; // type:function size:0x54 fn_80338708 = .text:0x80338708; // type:function size:0x60 fn_80338768 = .text:0x80338768; // type:function size:0x8 @@ -25847,13 +25847,13 @@ fn_803D0A60 = .text:0x803D0A60; // type:function size:0x74 fn_803D0AD4 = .text:0x803D0AD4; // type:function size:0x34 fn_803D0B08 = .text:0x803D0B08; // type:function size:0x8 fn_803D0B10 = .text:0x803D0B10; // type:function size:0x8C -fn_803D0B9C = .text:0x803D0B9C; // type:function size:0x30 -fn_803D0BCC = .text:0x803D0BCC; // type:function size:0x5C -fn_803D0C28 = .text:0x803D0C28; // type:function size:0x8 -fn_803D0C30 = .text:0x803D0C30; // type:function size:0xC4 -fn_803D0CF4 = .text:0x803D0CF4; // type:function size:0x4C -fn_803D0D40 = .text:0x803D0D40; // type:function size:0x80 -fn_803D0DC0 = .text:0x803D0DC0; // type:function size:0xD0 +__ct__Q43scn4step6spstop7ManagerFv = .text:0x803D0B9C; // type:function size:0x30 +__dt__Q43scn4step6spstop7ManagerFv = .text:0x803D0BCC; // type:function size:0x5C +isStopped__Q43scn4step6spstop7ManagerCFv = .text:0x803D0C28; // type:function size:0x8 +update__Q43scn4step6spstop7ManagerFv = .text:0x803D0C30; // type:function size:0xC4 +__vc__Q33hel6common53MutableArrayFUl = .text:0x803D0CF4; // type:function size:0x4C +registerEventReceiver__Q43scn4step6spstop7ManagerFRQ43scn4step6spstop14IEventReceiver = .text:0x803D0D40; // type:function size:0x80 +unregisterEventReceiver__Q43scn4step6spstop7ManagerFRQ43scn4step6spstop14IEventReceiver = .text:0x803D0DC0; // type:function size:0xD0 fn_803D0E90 = .text:0x803D0E90; // type:function size:0x1C fn_803D0EAC = .text:0x803D0EAC; // type:function size:0xA0 fn_803D0F4C = .text:0x803D0F4C; // type:function size:0xE4 @@ -27306,20 +27306,20 @@ fn_803FEC1C = .text:0x803FEC1C; // type:function size:0x4 fn_803FEC20 = .text:0x803FEC20; // type:function size:0x8C fn_803FECAC = .text:0x803FECAC; // type:function size:0x5C fn_803FED08 = .text:0x803FED08; // type:function size:0x5C -fn_803FED64 = .text:0x803FED64; // type:function size:0x1D0 -fn_803FEF34 = .text:0x803FEF34; // type:function size:0x14 -fn_803FEF48 = .text:0x803FEF48; // type:function size:0x4 -fn_803FEF4C = .text:0x803FEF4C; // type:function size:0x30 -fn_803FEF7C = .text:0x803FEF7C; // type:function size:0x1B8 -fn_803FF134 = .text:0x803FF134; // type:function size:0x50 -fn_803FF184 = .text:0x803FF184; // type:function size:0x24 -fn_803FF1A8 = .text:0x803FF1A8; // type:function size:0x4 -fn_803FF1AC = .text:0x803FF1AC; // type:function size:0x4 -fn_803FF1B0 = .text:0x803FF1B0; // type:function size:0x68 -fn_803FF218 = .text:0x803FF218; // type:function size:0x28 -fn_803FF240 = .text:0x803FF240; // type:function size:0x190 -fn_803FF3D0 = .text:0x803FF3D0; // type:function size:0x50 -fn_803FF420 = .text:0x803FF420; // type:function size:0x4 +__ct__Q23seq17SequenceLvMapRootFRCQ33seq17SequenceLvMapRoot6Recipe = .text:0x803FED64; // type:function size:0x1D0 +__as__Q33scn4step17ContextTotalScoreFRCQ33scn4step17ContextTotalScore = .text:0x803FEF34; // type:function size:0x14 +__dt__Q23seq17SequenceLvMapRootFv = .text:0x803FEF48; // type:function size:0x4 +nextAction__Q23seq17SequenceLvMapRootCFv = .text:0x803FEF4C; // type:function size:0x30 +createChildSequence__Q23seq17SequenceLvMapRootCFv = .text:0x803FEF7C; // type:function size:0x1B8 +__as__Q33scn4step11ContextHeroFRCQ33scn4step11ContextHero = .text:0x803FF134; // type:function size:0x50 +onChildSequenceEnd__Q23seq17SequenceLvMapRootFRQ23seq9ISequence = .text:0x803FF184; // type:function size:0x24 +createScene__Q23seq17SequenceLvMapRootCFv = .text:0x803FF1A8; // type:function size:0x4 +onSceneEnd__Q23seq17SequenceLvMapRootFRQ23scn6IScene = .text:0x803FF1AC; // type:function size:0x4 +setupForLeaveDoor__Q23seq17SequenceLvMapRootFv = .text:0x803FF1B0; // type:function size:0x68 +resetContextHero__Q23seq17SequenceLvMapRootFb = .text:0x803FF218; // type:function size:0x28 +onChildSequenceEndForLvMap__Q23seq17SequenceLvMapRootFRQ23seq9ISequence = .text:0x803FF240; // type:function size:0x190 +onChildSequenceEndForChallenge__Q23seq17SequenceLvMapRootFRQ23seq9ISequence = .text:0x803FF3D0; // type:function size:0x50 +GetRuntimeTypeInfo__Q23seq17SequenceLvMapRootCFv = .text:0x803FF420; // type:function size:0x4 fn_803FF424 = .text:0x803FF424; // type:function size:0x50 fn_803FF474 = .text:0x803FF474; // type:function size:0xE0 fn_803FF554 = .text:0x803FF554; // type:function size:0x30 @@ -28077,7 +28077,7 @@ lbl_804176C8 = .rodata:0x804176C8; // type:object size:0x18 lbl_804176E0 = .rodata:0x804176E0; // type:object size:0x20 lbl_80417700 = .rodata:0x80417700; // type:object size:0xA8 lbl_804177A8 = .rodata:0x804177A8; // type:object size:0x1B8 -lbl_80417960 = .rodata:0x80417960; // type:object size:0x28 +T_ALPHA_ANIM_TABLE__Q43scn4step5chara24@unnamed@Invincible_cpp@ = .rodata:0x80417960; // type:object size:0x28 lbl_80417988 = .rodata:0x80417988; // type:object size:0x10 lbl_80417998 = .rodata:0x80417998; // type:object size:0x10 lbl_804179A8 = .rodata:0x804179A8; // type:object size:0x18 @@ -28179,7 +28179,7 @@ lbl_80419C68 = .rodata:0x80419C68; // type:object size:0x10 lbl_80419C78 = .rodata:0x80419C78; // type:object size:0x18 lbl_80419C90 = .rodata:0x80419C90; // type:object size:0x58 lbl_80419CE8 = .rodata:0x80419CE8; // type:object size:0x18 -lbl_80419D00 = .rodata:0x80419D00; // type:object size:0x50 +T_ALPHA_TABLE__19@unnamed@Guard_cpp@ = .rodata:0x80419D00; // type:object size:0x50 lbl_80419D50 = .rodata:0x80419D50; // type:object size:0x50 data:4byte lbl_80419DA0 = .rodata:0x80419DA0; // type:object size:0x240 lbl_80419FE0 = .rodata:0x80419FE0; // type:object size:0x30 @@ -31852,7 +31852,7 @@ lbl_804726D8 = .data:0x804726D8; // type:object size:0x540 lbl_80472C18 = .data:0x80472C18; // type:object size:0x18 lbl_80472C30 = .data:0x80472C30; // type:object size:0x20 lbl_80472C50 = .data:0x80472C50; // type:object size:0x10 -lbl_80472C60 = .data:0x80472C60; // type:object size:0x18 +__vt__Q43scn4step5enemy9SuperStop = .data:0x80472C60; // type:object size:0x18 jumptable_80472C78 = .data:0x80472C78; // type:object size:0x28 scope:local jumptable_80472CA0 = .data:0x80472CA0; // type:object size:0x28 scope:local lbl_80472CC8 = .data:0x80472CC8; // type:object size:0x10 diff --git a/configure.py b/configure.py index f62eff6..ae1aafd 100755 --- a/configure.py +++ b/configure.py @@ -518,13 +518,24 @@ def MatchingFor(*versions): Object(NonMatching, "donut/scn/step/block/BlockInfo.cpp"), ], }, + { + "lib": "scn/step/chara", + "mw_version": config.linker_version, + "cflags": cflags_donut, + "progress_category": "donut", + "objects": [ + Object(NonMatching, "donut/scn/step/chara/Invincible.cpp"), + ], + }, { "lib": "scn/step/enemy", "mw_version": config.linker_version, "cflags": cflags_donut, "progress_category": "donut", "objects": [ + Object(NonMatching, "donut/scn/step/enemy/Enemy.cpp"), Object(NonMatching, "donut/scn/step/enemy/Param.cpp"), + Object(Matching, "donut/scn/step/enemy/SuperStop.cpp"), ], }, { @@ -533,13 +544,28 @@ def MatchingFor(*versions): "cflags": cflags_donut, "progress_category": "donut", "objects": [ - Object( - NonMatching, - "donut/scn/step/hero/IndiviUtil.cpp", - extra_cflags=["-O3"], - ), + Object(NonMatching, "donut/scn/step/hero/IndiviUtil.cpp", extra_cflags=["-O3"]), + Object(NonMatching, "donut/scn/step/hero/Guard.cpp"), + ], + }, + { + "lib": "scn/step/spstop", + "mw_version": config.linker_version, + "cflags": cflags_donut, + "progress_category": "donut", + "objects": [ + Object(NonMatching, "donut/scn/step/spstop/Manager.cpp", extra_cflags=["-O3,s"]), ], }, + { + "lib": "seq", + "mw_version": config.linker_version, + "cflags": cflags_donut, + "progress_category": "donut", + "objects": [ + Object(NonMatching, "donut/seq/SequenceLvMapRoot.cpp"), + ] + } ] From fa3fe798ac9104f7488535a4bdd7bf1830edbb15 Mon Sep 17 00:00:00 2001 From: AP-NJA Date: Thu, 2 Jul 2026 12:02:59 -0400 Subject: [PATCH 09/10] Quick parameter change --- configure.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.py b/configure.py index ae1aafd..e091026 100755 --- a/configure.py +++ b/configure.py @@ -535,7 +535,7 @@ def MatchingFor(*versions): "objects": [ Object(NonMatching, "donut/scn/step/enemy/Enemy.cpp"), Object(NonMatching, "donut/scn/step/enemy/Param.cpp"), - Object(Matching, "donut/scn/step/enemy/SuperStop.cpp"), + Object(NonMatching, "donut/scn/step/enemy/SuperStop.cpp"), ], }, { From b6feb5817b987a9afb4305e8fce8315a0f24ac54 Mon Sep 17 00:00:00 2001 From: AP-NJA Date: Fri, 10 Jul 2026 19:25:19 -0400 Subject: [PATCH 10/10] Adjust to accommodate current changes --- config/S72E01/splits.txt | 19 +++++++++++++++++++ config/S72E01/symbols.txt | 6 +++--- configure.py | 27 ++++++++++++++++++++++----- src/donut/scn/step/Component.cpp | 18 ++++++++++++++---- src/donut/scn/step/Component.hpp | 19 ++++++++++--------- src/donut/scn/step/enemy/Enemy.hpp | 9 ++++++--- src/donut/scn/step/spstop/Manager.hpp | 4 ++-- 7 files changed, 76 insertions(+), 26 deletions(-) diff --git a/config/S72E01/splits.txt b/config/S72E01/splits.txt index f40e7e7..39848d5 100644 --- a/config/S72E01/splits.txt +++ b/config/S72E01/splits.txt @@ -1960,6 +1960,10 @@ donut/scn/step/GridPos.cpp: donut/scn/step/boss/IState.cpp: .text start:0x80230D3C end:0x80230D98 +donut/scn/step/chara/Invincible.cpp: + .text start:0x8026EE48 end:0x8026EFA8 + .rodata start:0x80417960 end:0x80417988 + donut/scn/step/enemy/CustomBase.cpp: .text start:0x80281E20 end:0x80281FBC .data start:0x80471B80 end:0x80471BD8 @@ -1968,6 +1972,10 @@ donut/scn/step/enemy/CustomBase.cpp: donut/scn/step/enemy/Desc.cpp: .text start:0x802845E0 end:0x802846F0 +donut/scn/step/enemy/Enemy.cpp: + .text start:0x80284898 end:0x80288214 + .data start:0x80471E30 end:0x80471F00 + donut/scn/step/enemy/IState.cpp: .text start:0x80288D8C end:0x80288D8C @@ -1979,6 +1987,10 @@ donut/scn/step/enemy/StateBase.cpp: .text start:0x8028DDC4 end:0x8028DE48 .data start:0x80472C30 end:0x80472C50 +donut/scn/step/enemy/SuperStop.cpp: + .text start:0x8028DF54 end:0x8028E0D4 + .data start:0x80472C60 end:0x80472C78 + donut/scn/step/enemy/damage/StateDeadInWater.cpp: .text start:0x802AA9B4 end:0x802AAF74 .data start:0x80475D20 end:0x80475D40 @@ -2001,11 +2013,18 @@ donut/scn/step/enemy/waddledoo/ModelDesc.cpp: donut/scn/step/block/BlockInfo.cpp: .text start:0x80300700 end:0x80300760 +donut/scn/step/hero/Guard.cpp: + .text start:0x803385F8 end:0x803386B4 + .rodata start:0x80419D00 end:0x80419D50 + donut/scn/step/hero/IndiviUtil.cpp: .text start:0x803418A4 end:0x80341C74 .data start:0x80484CD0 end:0x80484D28 .sdata2 start:0x80562C10 end:0x80562C20 +donut/scn/step/spstop/Manager.cpp: + .text start:0x803D0B9C end:0x803D0E90 + donut/scn/vc/Loader.cpp: .text start:0x803F2834 end:0x803F2894 .data start:0x80495548 end:0x804955F0 diff --git a/config/S72E01/symbols.txt b/config/S72E01/symbols.txt index 6badc67..78cfe57 100644 --- a/config/S72E01/symbols.txt +++ b/config/S72E01/symbols.txt @@ -28076,7 +28076,7 @@ lbl_804176C8 = .rodata:0x804176C8; // type:object size:0x18 lbl_804176E0 = .rodata:0x804176E0; // type:object size:0x20 lbl_80417700 = .rodata:0x80417700; // type:object size:0xA8 lbl_804177A8 = .rodata:0x804177A8; // type:object size:0x1B8 -lbl_80417960 = .rodata:0x80417960; // type:object size:0x28 +T_ALPHA_ANIM_TABLE__Q43scn4step5chara24@unnamed@Invincible_cpp@ = .rodata:0x80417960; // type:object size:0x28 lbl_80417988 = .rodata:0x80417988; // type:object size:0x10 lbl_80417998 = .rodata:0x80417998; // type:object size:0x10 lbl_804179A8 = .rodata:0x804179A8; // type:object size:0x18 @@ -28178,7 +28178,7 @@ lbl_80419C68 = .rodata:0x80419C68; // type:object size:0x10 lbl_80419C78 = .rodata:0x80419C78; // type:object size:0x18 lbl_80419C90 = .rodata:0x80419C90; // type:object size:0x58 lbl_80419CE8 = .rodata:0x80419CE8; // type:object size:0x18 -lbl_80419D00 = .rodata:0x80419D00; // type:object size:0x50 +T_ALPHA_TABLE__19@unnamed@Guard_cpp@ = .rodata:0x80419D00; // type:object size:0x50 lbl_80419D50 = .rodata:0x80419D50; // type:object size:0x50 data:4byte lbl_80419DA0 = .rodata:0x80419DA0; // type:object size:0x240 lbl_80419FE0 = .rodata:0x80419FE0; // type:object size:0x30 @@ -31868,7 +31868,7 @@ lbl_804726D8 = .data:0x804726D8; // type:object size:0x540 lbl_80472C18 = .data:0x80472C18; // type:object size:0x18 __vt__Q43scn4step5enemy9StateBase = .data:0x80472C30; // type:object size:0x20 lbl_80472C50 = .data:0x80472C50; // type:object size:0x10 -lbl_80472C60 = .data:0x80472C60; // type:object size:0x18 +__vt__Q43scn4step5enemy9SuperStop = .data:0x80472C60; // type:object size:0x18 jumptable_80472C78 = .data:0x80472C78; // type:object size:0x28 scope:local jumptable_80472CA0 = .data:0x80472CA0; // type:object size:0x28 scope:local lbl_80472CC8 = .data:0x80472CC8; // type:object size:0x10 diff --git a/configure.py b/configure.py index d510c3b..3f76998 100755 --- a/configure.py +++ b/configure.py @@ -1172,6 +1172,15 @@ def MatchingFor(*versions): Object(Equivalent, "donut/scn/step/boss/IState.cpp", extra_cflags=["-O3,s"]), ], }, + { + "lib": "scn/step/chara", + "mw_version": config.linker_version, + "cflags": cflags_donut, + "progress_category": "donut", + "objects": [ + Object(Equivalent, "donut/scn/step/chara/Invincible.cpp"), + ], + }, { "lib": "scn/step/enemy", "mw_version": config.linker_version, @@ -1180,9 +1189,11 @@ def MatchingFor(*versions): "objects": [ Object(NonMatching, "donut/scn/step/enemy/CustomBase.cpp", extra_cflags=["-O3,s"]), Object(Equivalent, "donut/scn/step/enemy/Desc.cpp", extra_cflags=["-O3,s"]), + Object(NonMatching, "donut/scn/step/enemy/Enemy.cpp"), Object(Equivalent, "donut/scn/step/enemy/IState.cpp", extra_cflags=["-O3,s"]), Object(NonMatching, "donut/scn/step/enemy/Param.cpp", extra_cflags=["-O3,s"]), Object(Equivalent, "donut/scn/step/enemy/StateBase.cpp", extra_cflags=["-O3,s"]), + Object(NonMatching, "donut/scn/step/enemy/SuperStop.cpp"), Object(NonMatching, "donut/scn/step/enemy/damage/StateDeadInWater.cpp", extra_cflags=["-O3,s"]), Object(Equivalent, "donut/scn/step/enemy/waddledoo/Custom.cpp", extra_cflags=["-O3,s"]), @@ -1195,11 +1206,17 @@ def MatchingFor(*versions): "cflags": cflags_donut, "progress_category": "donut", "objects": [ - Object( - NonMatching, - "donut/scn/step/hero/IndiviUtil.cpp", - extra_cflags=["-O3"], - ), + Object(NonMatching, "donut/scn/step/hero/Guard.cpp"), + Object(NonMatching, "donut/scn/step/hero/IndiviUtil.cpp", extra_cflags=["-O3"]), + ], + }, + { + "lib": "scn/step/spstop", + "mw_version": config.linker_version, + "cflags": cflags_donut, + "progress_category": "donut", + "objects": [ + Object(NonMatching, "donut/scn/step/spstop/Manager.cpp", extra_cflags=["-O3,s"]), ], }, { diff --git a/src/donut/scn/step/Component.cpp b/src/donut/scn/step/Component.cpp index 71d296d..01a9625 100644 --- a/src/donut/scn/step/Component.cpp +++ b/src/donut/scn/step/Component.cpp @@ -5,16 +5,26 @@ using namespace scn::step; using mem::ExplicitScopedPtrUtil::CheckPointerIsValid; -Component::~Component() { } +Component::~Component() +{ +} -core::SphereAccessor* Component::sphereAccessor() { +core::SphereAccessor *Component::sphereAccessor() +{ return mSphereAccessor.operator->(); } -debug::GeneralDrawer* Component::debugGeneralDrawer() { +spstop::Manager *Component::superStopManager() +{ + return mSuperStopManager.operator->(); +} + +debug::GeneralDrawer *Component::debugGeneralDrawer() +{ return mDebugGeneralDrawer.operator->(); } -debug::ObjInfoRepos* Component::debugObjInfoRepos() { +debug::ObjInfoRepos *Component::debugObjInfoRepos() +{ return mDebugObjInfoRepos.operator->(); } diff --git a/src/donut/scn/step/Component.hpp b/src/donut/scn/step/Component.hpp index 01f7b0a..1af13fe 100644 --- a/src/donut/scn/step/Component.hpp +++ b/src/donut/scn/step/Component.hpp @@ -1,16 +1,19 @@ #ifndef DONUT_SCN_STEP_COMPONENT_HPP #define DONUT_SCN_STEP_COMPONENT_HPP -#include +#include "g3d/ResFileRepository.hpp" #include "scn/step/Context.hpp" #include "scn/step/core/SphereAccessor.hpp" -#include "scn/step/debug/ShowGrid.hpp" -#include "scn/step/debug/ShowPegFrame.hpp" #include "scn/step/debug/GeneralDrawer.hpp" #include "scn/step/debug/ObjInfoRepos.hpp" -#include "scn/step/map/DataFile.hpp" +#include "scn/step/debug/ShowGrid.hpp" +#include "scn/step/debug/ShowPegFrame.hpp" #include "scn/step/hero/Manager.hpp" -#include "g3d/ResFileRepository.hpp" +#include "scn/step/map/DataFile.hpp" +#include "scn/step/spstop/Manager.hpp" +#include + +// clang-format off namespace scn { namespace step { namespace core { @@ -36,10 +39,6 @@ namespace scn { namespace step { class Manager { }; } - namespace spstop { - class Manager { }; - } - namespace sfx { class BGFade { }; class ScreenFade { }; @@ -209,4 +208,6 @@ class Component { }} +// clang-format on + #endif diff --git a/src/donut/scn/step/enemy/Enemy.hpp b/src/donut/scn/step/enemy/Enemy.hpp index 12e37e0..7e98154 100644 --- a/src/donut/scn/step/enemy/Enemy.hpp +++ b/src/donut/scn/step/enemy/Enemy.hpp @@ -1,16 +1,17 @@ #ifndef DONUT_SCN_STEP_ENEMY_ENEMY_HPP #define DONUT_SCN_STEP_ENEMY_ENEMY_HPP +#include "scn/step/Component.hpp" #include "scn/step/enemy/IState.hpp" #include "util/StateChanger.hpp" +// clang-format off + namespace gobj { class FootState; } namespace scn { namespace step { - class Component; - namespace chara { class Model; } @@ -26,9 +27,11 @@ namespace scn { namespace step { util::StateChanger* stateChanger(); public: - STRUCT_FILL(0x1B8); + Component *mComponent; }; }}}; +// clang-format on + #endif diff --git a/src/donut/scn/step/spstop/Manager.hpp b/src/donut/scn/step/spstop/Manager.hpp index fa1fa68..3fd8fe2 100644 --- a/src/donut/scn/step/spstop/Manager.hpp +++ b/src/donut/scn/step/spstop/Manager.hpp @@ -6,7 +6,7 @@ #include "hel/common/MutableArray.hpp" #include "scn/step/spstop/IEventReceiver.hpp" -/* clang-format off */ +// clang-format off namespace scn { namespace step { namespace spstop { class Manager @@ -26,6 +26,6 @@ class Manager }}} -/* clang-format on */ +// clang-format on #endif