Skip to content

Commit

Permalink
update vsgamesection
Browse files Browse the repository at this point in the history
  • Loading branch information
EpochFlame committed Sep 20, 2023
1 parent d32c6bf commit 2a7d128
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 45 deletions.
5 changes: 3 additions & 2 deletions asm/plugProjectKandoU/vsGameSection.s
Original file line number Diff line number Diff line change
Expand Up @@ -8729,7 +8729,7 @@ getVsEditNumber__Q24Game13VsGameSectionFv:
"exec__Q24Game32FSMState<Q24Game13VsGameSection>FPQ24Game13VsGameSection":
/* 801C4BA8 001C1AE8 4E 80 00 20 */ blr

__sinit_vsGameSection_cpp: # static initializer
.fn __sinit_vsGameSection_cpp, local # static initializer
/* 801C4BAC 001C1AEC 3C 80 80 51 */ lis r4, __float_nan@ha
/* 801C4BB0 001C1AF0 38 00 FF FF */ li r0, -1
/* 801C4BB4 001C1AF4 C0 04 48 B0 */ lfs f0, __float_nan@l(r4)
Expand All @@ -8739,4 +8739,5 @@ __sinit_vsGameSection_cpp: # static initializer
/* 801C4BC4 001C1B04 D0 0D 94 0C */ stfs f0, gfNAN___Q24Game5P2JST@sda21(r13)
/* 801C4BC8 001C1B08 D0 03 00 04 */ stfs f0, 4(r3)
/* 801C4BCC 001C1B0C D0 03 00 08 */ stfs f0, 8(r3)
/* 801C4BD0 001C1B10 4E 80 00 20 */ blr
/* 801C4BD0 001C1B10 4E 80 00 20 */ blr
.endfn __sinit_vsGameSection_cpp
10 changes: 7 additions & 3 deletions include/Game/StateMachine.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ struct StateMachine {
{
}

virtual void init(T*) { } // _08
virtual void init(T*); // _08
virtual void start(T* obj, int stateID, StateArg* arg) // _0C
{
obj->mCurrentState = nullptr;
transit(obj, stateID, arg);
}
virtual void exec(T* obj); // _10
void create(int limit);
virtual void exec(T* obj); // _10
void create(int limit); // must be placed above transit
virtual void transit(T* obj, int stateID, StateArg* arg); // _14

void registerState(FSMState<T>* state);
Expand All @@ -64,6 +64,10 @@ struct StateMachine {
int mCurrentID; // _18, ID of current/active state
};

template <typename T>
void StateMachine<T>::init(T*)
{
}
template <typename T>
void StateMachine<T>::create(int limit)
{
Expand Down
10 changes: 5 additions & 5 deletions include/Game/VsGameSection.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ struct VsGameSection : public BaseGameSection {
virtual void startMainBgm(); // _64
virtual void section_fadeout(); // _68
virtual void goNextFloor(ItemHole::Item*); // _6C
virtual bool challengeDisablePelplant(); /*{ return false; }*/ // _80 (weak)
virtual bool player2enabled(); /*{ return true; }*/ // _134 (weak)
virtual char* getCaveFilename(); /*{ return mCaveInfoFilename; }*/ // _84 (weak)
virtual char* getEditorFilename(); /*{ return mEditFilename; }*/ // _88 (weak)
virtual int getVsEditNumber(); /*{ return mEditNumber; }*/ // _8C (weak)
virtual bool challengeDisablePelplant() { return false; } // _80 (weak)
virtual bool player2enabled() { return true; } // _134 (weak)
virtual char* getCaveFilename() { return mCaveInfoFilename; } // _84 (weak)
virtual char* getEditorFilename() { return mEditFilename; } // _88 (weak)
virtual int getVsEditNumber() { return mEditNumber; } // _8C (weak)
virtual void onMovieStart(MovieConfig*, u32, u32); // _B0
virtual void onMovieDone(MovieConfig*, u32, u32); // _B4
virtual void gmOrimaDown(int); // _D0
Expand Down
35 changes: 0 additions & 35 deletions src/plugProjectKandoU/vsGameSection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1540,41 +1540,6 @@ void VsGameSection::clearGetCherryCount()
mPlayer2Cherries = 0;
}

/*
* --INFO--
* Address: 801C49B8
* Size: 000008
*/
bool VsGameSection::challengeDisablePelplant() { return false; }

/*
* --INFO--
* Address: 801C49C0
* Size: 000008
*/
bool VsGameSection::player2enabled() { return true; }

/*
* --INFO--
* Address: 801C49C8
* Size: 000008
*/
char* VsGameSection::getCaveFilename() { return mCaveInfoFilename; }

/*
* --INFO--
* Address: 801C49D0
* Size: 000008
*/
char* VsGameSection::getEditorFilename() { return mEditFilename; }

/*
* --INFO--
* Address: 801C49D8
* Size: 000008
*/
int VsGameSection::getVsEditNumber() { return mEditNumber; }

/*
* --INFO--
* Address: 801C49E0
Expand Down

0 comments on commit 2a7d128

Please sign in to comment.