diff options
| author | Aurel <285191559+0Aurel@users.noreply.github.com> | 2026-05-23 17:10:58 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-05-23 17:10:58 +0200 |
| commit | 51640eb100522a3986779599f057d72c8cb9e42e (patch) | |
| tree | 96dd74c92bc9d024088cf506597973448140ec2e /src/Main/Game/Game.cpp | |
| parent | 0bb7400136dd84c00abdaf96c5dbdb63c02f836f (diff) | |
* Game_16 OK
* Remove unnecessary FadeControl constructor definition
* Define HW_RESET_PARAMETER_BUF macro to replace hardcoded address
* Refactor Game constructor to use proper C++ initialization
Address Yanis' review comments:
- Make Game::func_0202cf44 static with Game* parameter to allow
passing as callback pointer
- Replace raw mUnk_00c array with Game_0c class containing constructor
- Add Game_0c constructor with inline initialization calling func_ov016_0211fab8
- Add FadeControl_Derived1 class for mFadeControl member
- Use C++ initializer list in Game constructor for mModeId, mPrevModeId,
mMode, mUnk_00c, and mFadeControl
* Fix Game constructor and FadeControl initialization
- Use PAD macro in Game_0c instead of unk8 pad[]
- Pass 'this' instead of 'pad' to func_ov016_0211fab8
- Add FadeControl constructor that calls _ZN11FadeControlC2Ev
- FadeControl_Derived1 now uses empty constructor (base class ctor called automatically)
- Update mUnk_00c.pad to mUnk_00c.pad_0x00 (PAD macro creates named member)
- Add types.h include to nds/system.h
* Remove explicit call to mangled constructor symbol
- Removed _ZN11FadeControlC2Ev call from FadeControl constructor
- FadeControl now has an empty constructor (called automatically by derived classes)
- FadeControl_Derived1 uses empty constructor which calls base class ctor
* Update symbols.txt for func_0202cf44 signature change
Changed mangled name from _ZN4Game13func_0202cf44Ev to
_ZN4Game13func_0202cf44EPS_ to reflect the function becoming
static with a Game* parameter.
Diffstat (limited to 'src/Main/Game/Game.cpp')
| -rw-r--r-- | src/Main/Game/Game.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/Main/Game/Game.cpp b/src/Main/Game/Game.cpp index b02fa9f9..fa3019c2 100644 --- a/src/Main/Game/Game.cpp +++ b/src/Main/Game/Game.cpp @@ -467,38 +467,38 @@ THUMB void Game::func_0202cf34() { } extern "C" void func_02017cd0(); -ARM void Game::func_0202cf44() { +ARM void Game::func_0202cf44(Game *game) { while (true) { - if (mUnk_100) { - mUnk_0f4 += 1; + if (game->mUnk_100) { + game->mUnk_0f4 += 1; while (REG_GFX_RAM_COUNT_2 != 0) { } func_02005778(); func_02017cd0(); - if (mUnk_0fc != mUnk_0fe) { - this->func_0202c678(); + if (game->mUnk_0fc != game->mUnk_0fe) { + game->func_0202c678(); } if (data_027e080c.func_0202eef8()) { data_027e08f8.mUnk_1 = true; } else { - data_027e0c54.func_02036240(&mUnk_0f0); - data_027e0c38.func_02033d84(&mUnk_0f0); - mMode->vfunc_0c(&mUnk_0f0); - gMessageManager.func_02036c50(&mUnk_0f0); + data_027e0c54.func_02036240(&game->mUnk_0f0); + data_027e0c38.func_02033d84(&game->mUnk_0f0); + game->mMode->vfunc_0c(&game->mUnk_0f0); + gMessageManager.func_02036c50(&game->mUnk_0f0); if ((s32) (data_027e080c.mUnk_04 == 3 || data_027e080c.mUnk_08 == 3) == 0) { - gFadeController.SetScreenBrightness(mUnk_103); + gFadeController.SetScreenBrightness(game->mUnk_103); } - data_027e0cbc.func_0203d67c(&mUnk_0f0); + data_027e0cbc.func_0203d67c(&game->mUnk_0f0); if (gOverlayManager.mLoadedOverlays[0] != OverlayId_None) { data_027e0db0.func_ov000_0207b43c(); } - if (mModeId == 2) { + if (game->mModeId == 2) { data_027e077c.func_ov009_0211653c(); } data_02068894.func_0203235c(); data_02075dac.func_0203f974(); } - mUnk_100 = false; + game->mUnk_100 = false; } data_027e08e4.func_0202f2ac(); } |
