diff --git a/configure.py b/configure.py index 61d65144..7adc17fd 100755 --- a/configure.py +++ b/configure.py @@ -1083,7 +1083,7 @@ def MatchingFor(*versions): Object(Matching, "Kameda/J2DManager.cpp"), Object(Matching, "Kameda/Task.cpp"), Object(NonMatching, "Kameda/Goal2D.cpp"), - Object(NonMatching, "Kameda/PauseManager.cpp"), + Object(Matching, "Kameda/PauseManager.cpp"), Object(NonMatching, "Kameda/Pause2D.cpp"), Object(Matching, "Kameda/WipeManager.cpp"), Object(Matching, "Kameda/Fade.cpp"), diff --git a/include/Kameda/Pause2D.h b/include/Kameda/Pause2D.h index a2e355a1..bc6b0bd8 100644 --- a/include/Kameda/Pause2D.h +++ b/include/Kameda/Pause2D.h @@ -54,5 +54,8 @@ class Pause2D { // Autogenerated static void *mPrintMessageTag; static void *mStarTag; static void *mStarDrawTag; + +private: + u8 _0[0x174]; }; // class Pause2D #endif // PAUSE2D_H diff --git a/include/Kameda/PauseManager.h b/include/Kameda/PauseManager.h index 56ffb50d..b6f33a63 100644 --- a/include/Kameda/PauseManager.h +++ b/include/Kameda/PauseManager.h @@ -1,53 +1,82 @@ #ifndef PAUSEMANAGER_H #define PAUSEMANAGER_H +#include "JSystem/J2D/J2DGrafContext.h" +#include "JSystem/JKernel/JKRArchive.h" #include "JSystem/JKernel/JKRHeap.h" +#include "Kameda/Pause2D.h" +#include "Kameda/PrintMemoryCard.h" +#include "Kameda/Result2D.h" #include "Osako/kartPad.h" #include "types.h" -class PauseManager { +class PauseManager +{ public: - PauseManager(JKRHeap *); // 0x801343d0 - void reset(); // 0x801345fc - void draw(); // 0x801346d0 - void exec(); // 0x801348f8 - static bool tstPause(); // 0x80135288 - void wipeOut(int); // 0x80135290 - static int getPauseChoice(); // 0x801352d0 - void setTA(); // 0x8013541c - - void setResultStartFlag(bool flag) {mResultStart = flag; } + PauseManager(JKRHeap *heap); // 0x801343d0 + ~PauseManager(); + void reset(); // 0x801345fc + void setPause(); + void clrPause(); + void draw(); // 0x801346d0 + void exec(); // 0x801348f8 + static bool tstPause(); // 0x80135288 + void wipeIn(); + void wipeOut(int); // 0x80135290 + static int getPauseChoice(); // 0x801352d0 + void getCharRankPos(int); + void setTA(); // 0x8013541c + + void setResultStartFlag(bool flag) { mResultStart = flag; } void setGameOverFlag(bool flag) { mGameOver = flag; } void setExecFlag(bool flag) { mExec = flag; } void setPauseEndFlag(bool flag) { mPauseEnd = flag; } - + void enablePause() { _14 = 0; } - static PauseManager *getManager() { - return mThis; - } + static PauseManager *getManager() { return mThis; } bool isResultStart() const { return mResultStart; } private: - static PauseManager *mThis; // 0x80416298 - static bool mIsPause; // 0x8041629c - static int mPauseSelector; // 0x804162a0 - static int mPauseChoice; // 0x804162a4 - static int mPauseNextChoice; // 0x804162a8 - static KartGamePad *mPausePad; // 0x804162ac - - u8 _0[0xe]; - bool mResultStart; - bool _f; - bool mGameOver; - u8 _11[0x13 - 0x11]; - bool mExec; - u32 _14; - bool mPauseEnd; - u8 _19[0x3c - 0x19]; + static PauseManager *mThis; // 0x80416298 + static bool mIsPause; // 0x8041629c + static int mPauseSelector; // 0x804162a0 + static int mPauseChoice; // 0x804162a4 + static int mPauseNextChoice; // 0x804162a8 + static KartGamePad *mPausePad; // 0x804162ac + + bool mNetFlag; // 0x00 + u8 _1[3]; // 0x01 + JKRArchive *mArchive; // 0x04 + PrintMemoryCard *mPrintMemoryCard; // 0x08 + u8 _c; // 0x0c + u8 _d; // 0x0d + bool mResultStart; // 0x0e + bool _f; // 0x0f + bool mGameOver; // 0x10 + u8 _11; // 0x11 + u8 _12; // 0x12 + bool mExec; // 0x13 + s32 _14; // 0x14 + bool mPauseEnd; // 0x18 + u8 _19; // 0x19 + u8 _1a; // 0x1a + u8 _1b; // 0x1b + Pause2D *mPause2D; // 0x1c + Result2D *mResult2D; // 0x20 + J2DOrthoGraph *mOrthoGraph; // 0x24 + s32 _28; // 0x28 + s32 mWipeOutFrame; // 0x2c + s32 mWipeOutDuration; // 0x30 + u32 _34; // 0x30 + bool _38; // 0x38 + u8 _39[3]; // 0x39 }; -inline PauseManager *GETPauseManager() { return PauseManager::getManager(); } +inline PauseManager *GETPauseManager() +{ + return PauseManager::getManager(); +} #endif diff --git a/include/Kameda/Result2D.h b/include/Kameda/Result2D.h index 5a111778..0eb8d13c 100644 --- a/include/Kameda/Result2D.h +++ b/include/Kameda/Result2D.h @@ -57,7 +57,7 @@ class Result2D { // Autogenerated void setDrawVS(); // 0x8014cb58 void setDrawTA(); // 0x8014cc10 void setDrawMG(); // 0x8014cd94 - void getResultSelector(); // 0x8014ce48 + static int getResultSelector(); // 0x8014ce48 void setRaceRank(); // 0x8014ce50 void setGPRank(); // 0x8014d924 void setVS(); // 0x8014df84 @@ -81,9 +81,12 @@ class Result2D { // Autogenerated void getFrameColor(JUTColor &); // 0x80150500 void getScale(int); // 0x8015057c void setScale(int); // 0x801505c4 - void setGPClr(); // 0x80150804 - void getAnmEnd(); // 0x80150830 - + static void setGPClr(); // 0x80150804 + bool getAnmEnd(); // 0x80150830 + + static inline bool getDrawFlag(); + static inline void setDrawFlag(bool drawFlag); + static const u64 mSetWordLineTag[9]; // 0x8036ec18 static const u64 mResultLayoutTag[11]; // 0x8036ec60 static const u64 mResultLineTag[20]; // 0x8036ecb8 @@ -101,6 +104,11 @@ class Result2D { // Autogenerated // Inline/Unused ~Result2D(); void getCharPos(int); + +public: + u8 _0[0x1980]; // 0x0 + u32 _1980; // 0x1980 + u8 _1984[0x1c24 - 0x1984]; // 0x1984 }; // class Result2D #endif // RESULT2D_H diff --git a/include/Kameda/SequenceInfo.h b/include/Kameda/SequenceInfo.h index 7bca7fbf..d19c317b 100644 --- a/include/Kameda/SequenceInfo.h +++ b/include/Kameda/SequenceInfo.h @@ -127,8 +127,10 @@ class SequenceInfo JMARandFast mRnd; // 00 int mStartNo[8]; // 004 KartGamePad *mDecidePad; // 024 +public: u8 _28; // 028 int _2c; // 02C +private: int _30; // 030 u8 mGhostFlags; // 034 u8 _35[0x3C - 0x35]; // 035 diff --git a/include/Kameda/WipeManager.h b/include/Kameda/WipeManager.h index 07833c4c..8511ec6a 100644 --- a/include/Kameda/WipeManager.h +++ b/include/Kameda/WipeManager.h @@ -71,6 +71,8 @@ class WipeManager void startWipe(int idx) { mMoveFlag[idx] = true; } void stopWipe(int idx) { mMoveFlag[idx] = false; } int getScreenCount() const { return mScrnCount; } + TWipeCurtain *getWipeCurtain() const { return mWipeCurtain; } + Mario *getMario() const { return mMario; } static WipeManager *getManager() { return mThis; } diff --git a/include/Osako/PadRecorder.h b/include/Osako/PadRecorder.h index bdcc8b22..934a6940 100644 --- a/include/Osako/PadRecorder.h +++ b/include/Osako/PadRecorder.h @@ -40,12 +40,12 @@ class PadRecorder KartPadRecord *getGhostRecord(u8 no); void playGhost(); // Inline - u32 getFrame() { return mFrame; }; + s32 getFrame() { return mFrame; }; void setFrame(u32 frame) { mFrame = frame; } static PadRecorder *mspRecorder; private: - u32 mFrame; + s32 mFrame; PadState mState; KartPadData mPadData[NUM_PLAYERPADS]; JUTGamePad::CButton mButton[NUM_PLAYERPADS]; diff --git a/src/Kameda/PauseManager.cpp b/src/Kameda/PauseManager.cpp index f84c724b..76e7350b 100644 --- a/src/Kameda/PauseManager.cpp +++ b/src/Kameda/PauseManager.cpp @@ -1,34 +1,638 @@ #include "Kameda/PauseManager.h" -#include "mathHelper.h" -PauseManager *PauseManager::mThis; // 0x80416298 +#include "Inagaki/GameAudioMain.h" +#include "JSystem/JKernel/JKRHeap.h" +#include "JSystem/JUtility/JUTAssert.h" +#include "Kameda/Goal2D.h" +#include "Kameda/J2DManager.h" +#include "Kameda/Pause2D.h" +#include "Kameda/PrintMemoryCard.h" +#include "Kameda/Result2D.h" +#include "Kameda/SequenceInfo.h" +#include "Kameda/WipeManager.h" +#include "Kaneshige/RaceInfo.h" +#include "Kaneshige/RaceMgr.h" +#include "Osako/NetGameMgr.h" +#include "Osako/RaceApp.h" +#include "Osako/ResMgr.h" +#include "Osako/kartPad.h" +#include "Osako/system.h" +#include "mathHelper.h" // For unused data + +PauseManager *PauseManager::mThis; bool PauseManager::mIsPause; int PauseManager::mPauseSelector; int PauseManager::mPauseChoice; int PauseManager::mPauseNextChoice; KartGamePad *PauseManager::mPausePad; -PauseManager::PauseManager(JKRHeap *) {} +static int button; + +PauseManager::PauseManager(JKRHeap *heap) +{ + if (!heap) + { + heap = JKRHeap::getCurrentHeap(); + } + + mArchive = ResMgr::getArchive(ResMgr::mcArcMRAMLoc); + mOrthoGraph = System::getJ2DOrtho(); + mPrintMemoryCard = new (heap, 0) PrintMemoryCard(heap); + + mThis = this; + + mNetFlag = NetGameMgr::ptr()->getState() != 0; + _12 = 0; + mExec = false; + + mPause2D = new (heap, 0) Pause2D(heap); + mResult2D = new (heap, 0) Result2D(heap); + + _11 = 1; + for (int i = 0; i < RaceMgr::getManager()->getKartNumber(); ++i) + { + for (int j = 0; j < 2; ++j) + { + if (gSequenceInfo.getPad2Player(gRaceInfo.getKartInfo(i)->getPad(j)) != -1) + { + _11 = 0; + } + } + } + + reset(); +} + +PauseManager::~PauseManager() +{ + // Unknown implementation +} + +void PauseManager::reset() +{ + _12 = 1; + mExec = true; + GameAudio::Main::getAudio()->setPause((GameAudio::Main::PAUSE_STATUS)2); -void PauseManager::reset() {} + mIsPause = false; + mPauseSelector = 0; + mPauseChoice = 13; + mPauseNextChoice = 13; + mPausePad = 0; -void PauseManager::draw() {} + _c = 0; + _d = 0; + mResultStart = false; + _f = 0; + mGameOver = false; + _14 = -1; + mPauseEnd = false; + mPause2D->init(); + mResult2D->init(); + _28 = 0; + mWipeOutFrame = 0; + mWipeOutDuration = 0; + _34 = 0; + _38 = 0; -void PauseManager::exec() { - //void Result2D::getDrawFlag() {} - //void Result2D::setDrawFlag(bool) {} + if (RaceMgr::getManager()->isReplayMode() && RaceMgr::getManager()->getRaceMode() == GRAND_PRIX) + { + Result2D::setGPClr(); + } + + mPrintMemoryCard->init(PrintMemoryCard::mcMsg40); } -bool PauseManager::tstPause() { +void PauseManager::setPause() +{ + // Unknown implementation +} + +void PauseManager::clrPause() +{ + // Unknown implementation +} + +void PauseManager::draw() +{ + if (!_12) + return; + + if (!mNetFlag) + { + mResult2D->draw(); + } + + if (_11 || (!mResultStart && !RaceMgr::getManager()->isReplayMode())) + { + mPause2D->draw(); + } + + if (_28) + { + switch (mPauseNextChoice) + { + case 1: + case 7: + WipeManager::getManager()->getMario()->draw((f32)(_28 + 1) / 40.0f, + JUTColor(0x00, 0x00, 0x00, 0xFF)); + break; + default: + _28 = 1; + } + } + + if (mWipeOutFrame > 0 && mWipeOutDuration > 0) + { + f32 f = (f32)mWipeOutFrame / (f32)mWipeOutDuration; + if (f > 1.0f) + { + f = 1.0f; + } + + WipeManager::getManager()->getWipeCurtain()->calc( + J2DManager::getManager()->getStatus2Kart(0x0), + f, + JUTColor(0x00, 0x00, 0x00, 0xFF)); + + WipeManager::getManager()->getWipeCurtain()->draw( + J2DManager::getManager()->getStatus2Kart(0x0), + f, + JUTColor(0x00, 0x00, 0x00, 0xFF)); + } + + if (_c) + { + mPrintMemoryCard->draw(); + } +} + +void PauseManager::exec() +{ + if (!mExec) + return; + + if (_14 >= 0) + { + _14 += 1; + } + + if (_c) + { + mPrintMemoryCard->calc(); + + switch (mPrintMemoryCard->get_14Thing()) + { + case 0: + _c = 0; + if (_d) + { + goto labelA; + } + goto labelB; + case 1: + _c = 0; + mPrintMemoryCard->init(PrintMemoryCard::mcMsg40); + mPrintMemoryCard->setStuff(0, 0, 0); + break; + } + return; + } + + if (mWipeOutFrame > 0 && mWipeOutDuration > 0) + { + if (mWipeOutFrame == mWipeOutDuration) + { + JUTFader *fader = System::mspDisplay->getFader(); + if (fader) + { + fader->startFadeOut(1); + } + } + mWipeOutFrame += 1; + } + + int var_28 = _28; + if (var_28) + { + if (var_28 < 40) + { + _28 = var_28 + 1; + return; + } + + mPauseChoice = mPauseNextChoice; + mPausePad = 0; + + J2DManager::getManager()->startPreRace(); + + _28 = 0; + Result2D::setDrawFlag(_38); + return; + } + + int var_34 = _34; + if (var_34) + { + if (var_34 < 11) + { + _34 = var_34 + 1; + } + else + { + mPauseChoice = mPauseNextChoice; + mPausePad = 0; + _34 = 0; + Result2D::setDrawFlag(_38); + + switch (mPauseNextChoice) + { + case 1: + case 7: + mPauseChoice = 13; + _28 = 1; + GameAudio::Main::getAudio()->fadeOutAll(40); + break; + default: + { + switch (mPauseNextChoice) + { + case 13: + if (!_38) + { + mIsPause = 0; + } + break; + default: + _34 = 1; + break; + } + break; + } + } + } + + mResult2D->calc(gSequenceInfo.getDecidePad()); + return; + } + + if (_14 < 120) + return; + + if (!tstPause() && !RaceMgr::getManager()->isReplayMode()) + { + if (_11) + { + mPausePad = &gGamePad1P; + mPauseSelector = 0; + mPauseChoice = 13; + } + else + { + KartGamePad *kartgamePad = gpaGamePad[0]; + if (kartgamePad && kartgamePad->testTrigger(JUTGamePad::START)) + { + mPausePad = kartgamePad; + mPauseSelector = 0; + mPauseChoice = 13; + } + } + } + + if (!mNetFlag && + ((mResultStart && Goal2D::mDrawEndFlag) || RaceMgr::getManager()->isReplayMode())) + { + mResult2D->calc(gSequenceInfo.getDecidePad()); + + if (RaceMgr::getManager()->isReplayMode() && + RaceApp::ptr()->getPadRecorder()->getFrame() >= MAX_INPUT_FRAME_COUNT) + { + mIsPause = 1; + mPause2D->init(); + Pause2D::setPauseStatus((Pause2D::PauseStatus)1); + GameAudio::Main::getAudio()->fadeOutAll(40); + mPauseNextChoice = 7; + _34 = 1; + _38 = 0; + } + else + { + KartGamePad *decidePad = gSequenceInfo.getDecidePad(); + if (decidePad->testTrigger(JUTGamePad::A) && Result2D::mResultState == 2 && + mResult2D->getAnmEnd()) + { + if (Result2D::getDrawFlag()) + { + switch (Result2D::getResultSelector()) + { + case 1: + case 7: + GameAudio::Main::getAudio()->startSystemSe(0x20002); + GameAudio::Main::getAudio()->setPause((GameAudio::Main::PAUSE_STATUS)2); + GameAudio::Main::getAudio()->fadeOutAll(40); + + mPauseNextChoice = Result2D::getResultSelector(); + _34 = 1; + _38 = 0; + mResult2D->_1980 = 1; + break; + case 8: + mPauseNextChoice = Result2D::getResultSelector(); + if (RaceMgr::getManager()->isRaceModeGp()) + { + _c = 1; + _d = 0; + mPrintMemoryCard->init(PrintMemoryCard::mcMsg39); + mPrintMemoryCard->calc(); + break; + } + GameAudio::Main::getAudio()->startSystemSe(0x20023); + labelB: + _34 = 1; + _38 = 0; + mResult2D->_1980 = 1; + break; + default: + GameAudio::Main::getAudio()->startSystemSe(0x20002); + GameAudio::Main::getAudio()->setPause((GameAudio::Main::PAUSE_STATUS)2); + mPauseNextChoice = Result2D::getResultSelector(); + _34 = 1; + _38 = 0; + mResult2D->_1980 = 1; + } + } + } + else + { + if (gSequenceInfo.getDecidePad()->testTrigger(JUTGamePad::START)) + { + if (RaceMgr::getManager()->isReplayMode()) + { + if (!Result2D::getDrawFlag()) + { + + mIsPause = 1; + mPause2D->init(); + Pause2D::setPauseStatus((Pause2D::PauseStatus)1); + GameAudio::Main::getAudio()->startSystemSe(0x20008); + GameAudio::Main::getAudio()->setPause((GameAudio::Main::PAUSE_STATUS)1); + mPauseNextChoice = 13; + _34 = 1; + _38 = 1; + Result2D::setDrawFlag(true); + mResult2D->init(); + } + else if (mResult2D->getAnmEnd()) + { + GameAudio::Main::getAudio()->startSystemSe(0x20009); + GameAudio::Main::getAudio()->setPause((GameAudio::Main::PAUSE_STATUS)0); + mPauseNextChoice = 13; + _34 = 1; + _38 = 0; + mResult2D->_1980 = 1; + } + } + } + else + { + if (gSequenceInfo.getDecidePad()->testTrigger(JUTGamePad::A)) + { + if (RaceMgr::getManager()->isReplayMode() && !Result2D::getDrawFlag()) + { + mIsPause = 1; + mPause2D->init(); + Pause2D::setPauseStatus((Pause2D::PauseStatus)1); + GameAudio::Main::getAudio()->startSystemSe(0x20008); + GameAudio::Main::getAudio()->setPause((GameAudio::Main::PAUSE_STATUS)1); + mPauseNextChoice = 13; + _34 = 1; + _38 = 1; + Result2D::setDrawFlag(true); + mResult2D->init(); + } + } + else if (gSequenceInfo.getDecidePad()->testTrigger(JUTGamePad::B) && + RaceMgr::getManager()->isReplayMode() && Result2D::getDrawFlag()) + { + GameAudio::Main::getAudio()->startSystemSe(0x20009); + GameAudio::Main::getAudio()->setPause((GameAudio::Main::PAUSE_STATUS)0); + mPauseNextChoice = 13; + _34 = 1; + _38 = 0; + mResult2D->_1980 = 1; + } + } + } + } + } + + if (!mPausePad) + return; + if (mNetFlag) + return; + if (mPauseEnd && _11 == 0x0) + return; + if (RaceMgr::getManager()->isReplayMode()) + return; + + mPause2D->calc(mPausePad); + if (tstPause()) + { + if (Pause2D::getPauseStatus() == (Pause2D::PauseStatus)3) + { + mPauseChoice = 13; + if (mPausePad->testTrigger(JUTGamePad::A)) + { + switch (Pause2D::getPauseSelector()) + { + case 1: + GameAudio::Main::getAudio()->startSystemSe(0x20023); + _28 = 1; + GameAudio::Main::getAudio()->fadeOutAll(40); + GameAudio::Main::getAudio()->setPause((GameAudio::Main::PAUSE_STATUS)2); + mPauseNextChoice = Pause2D::getPauseSelector(); + return; + case 8: + if (RaceMgr::getManager()->isRaceModeGp()) + { + _c = 1; + _d = 1; + mPrintMemoryCard->init(PrintMemoryCard::mcMsg39); + mPrintMemoryCard->calc(); + return; + } + GameAudio::Main::getAudio()->startSystemSe(0x20023); + labelA: + button = 0; + Pause2D::setPauseStatus((Pause2D::PauseStatus)4); + return; + case 0: + GameAudio::Main::getAudio()->startSystemSe(0x20009); + button = 0; + Pause2D::setPauseStatus((Pause2D::PauseStatus)4); + return; + default: + GameAudio::Main::getAudio()->startSystemSe(0x20023); + button = 0; + Pause2D::setPauseStatus((Pause2D::PauseStatus)4); + } + } + else + { + if (!mPausePad->testTrigger(JUTGamePad::START)) + return; + + button = 1; + Pause2D::setPauseStatus((Pause2D::PauseStatus)4); + GameAudio::Main::getAudio()->startSystemSe(0x20009); + GameAudio::Main::getAudio()->setPause((GameAudio::Main::PAUSE_STATUS)0); + return; + } + } + else + { + if (Pause2D::getPauseStatus() != (Pause2D::PauseStatus)0) + return; + + mPauseChoice = 13; + switch (button) + { + case 0: + switch (Pause2D::getPauseSelector()) + { + case 0: + mIsPause = 0; + GameAudio::Main::getAudio()->setPause((GameAudio::Main::PAUSE_STATUS)0); + default: + mPauseChoice = Pause2D::getPauseSelector(); + mPausePad = nullptr; + GameAudio::Main::getAudio()->setPause((GameAudio::Main::PAUSE_STATUS)2); + break; + } + break; + case 1: + mIsPause = 0; + mPauseSelector = 0; + mPauseChoice = 0; + mPausePad = nullptr; + break; + default: +#line 553 + JUT_ASSERT(0); + } + + return; + } + } + else + { + if (!mPausePad->testTrigger(JUTGamePad::START)) + return; + + mIsPause = 1; + mPause2D->init(); + Pause2D::setPauseStatus((Pause2D::PauseStatus)1); + GameAudio::Main::getAudio()->startSystemSe(0x20008); + GameAudio::Main::getAudio()->setPause((GameAudio::Main::PAUSE_STATUS)1); + return; + } +} + +bool Result2D::getDrawFlag() +{ + return mDrawFlag; +} + +void Result2D::setDrawFlag(bool drawFlag) +{ + mDrawFlag = drawFlag; +} + +bool PauseManager::tstPause() +{ return mIsPause; } -void PauseManager::wipeOut(int) {} +void PauseManager::wipeIn() +{ + // Unknown implementation +} + +void PauseManager::wipeOut(int duration) +{ + mWipeOutFrame = 1; + mWipeOutDuration = duration; + + WipeManager::getManager()->getWipeCurtain()->reset(); +} + +int PauseManager::getPauseChoice() +{ + if (mPauseChoice == 8) + { + GameAudio::Main::getAudio()->setPause((GameAudio::Main::PAUSE_STATUS)2); + } + + if (mThis->_f) + { + mPauseChoice = 5; + GameAudio::Main::getAudio()->setPause((GameAudio::Main::PAUSE_STATUS)2); + } -int PauseManager::getPauseChoice() {} + if (mThis->mGameOver) + { + mPauseChoice = 9; + GameAudio::Main::getAudio()->setPause((GameAudio::Main::PAUSE_STATUS)2); + } + + switch (mPauseChoice) + { + case 2: + case 3: + case 4: + case 6: + gSequenceInfo._28 = 1; + break; + } + + switch (mPauseChoice) + { + case 4: + gSequenceInfo._2c = 0; + break; + case 6: + gSequenceInfo._2c = 1; + break; + } + + if (mPauseChoice == 5) + { + GameAudio::Main::getAudio()->setPause((GameAudio::Main::PAUSE_STATUS)2); + + if (gSequenceInfo.isEndGP()) + { + if (gSequenceInfo.isGameClr()) + { + mPauseChoice = 11; + } + else + { + mPauseChoice = 12; + } + } + } + + return mPauseChoice; +} + +void PauseManager::getCharRankPos(int) +{ + // Unknown implementation +} -void PauseManager::setTA() { - +void PauseManager::setTA() +{ + mResult2D->setTA(); } -#include "JSystem/JAudio/JASFakeMatch2.h" +#include "JSystem/JAudio/JASFakeMatch2.h" // For static initializer diff --git a/src/Kameda/Result2D.cpp b/src/Kameda/Result2D.cpp index 535a4c9a..e71c72ef 100644 --- a/src/Kameda/Result2D.cpp +++ b/src/Kameda/Result2D.cpp @@ -165,7 +165,10 @@ void Result2D::setDrawTA() {} void Result2D::setDrawMG() {} -void Result2D::getResultSelector() {} +int Result2D::getResultSelector() +{ + return mResultSelector; +} void Result2D::setRaceRank() {} @@ -215,6 +218,6 @@ void Result2D::setScale(int) {} void Result2D::setGPClr() {} -void Result2D::getAnmEnd() {} +bool Result2D::getAnmEnd() {} #include "JSystem/JAudio/JASFakeMatch2.h" diff --git a/tools/check-changed-symbol-order.py b/tools/check-changed-symbol-order.py index 88f09a52..ce525c14 100644 --- a/tools/check-changed-symbol-order.py +++ b/tools/check-changed-symbol-order.py @@ -36,9 +36,17 @@ def source_to_unit() -> dict: units = json.load(f).get("units", []) out = {} for u in units: - sp = u.get("metadata", {}).get("source_path") - if sp: - out[norm(sp)] = (u["name"], u.get("base_path", "")) + metadata = u.get("metadata", {}) + if not metadata: + continue + sp = metadata.get("source_path") + if not sp: + continue + out[norm(sp)] = ( + u["name"], + u.get("base_path", ""), + metadata.get("complete", False), + ) return out @@ -58,11 +66,15 @@ def main(argv) -> int: print(f"skip {f} (not a tracked decomp unit)") skipped.append(f) continue - unit, base = entry + unit, base, complete = entry if base and not os.path.exists(os.path.join(root_dir, base)): print(f"skip {f} ({unit}: object not built)") skipped.append(f) continue + if not complete: + print(f"skip {f} ({unit}: object not marked as complete)") + skipped.append(f) + continue print(f"\n{'=' * 72}\n{f} -> {unit}\n{'=' * 72}") rc = subprocess.run([sys.executable, VALIDATOR, "-u", unit],