diff options
| author | Aetias <144526980+AetiasHax@users.noreply.github.com> | 2025-07-17 12:21:10 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-17 12:21:10 +0200 |
| commit | 573b696ff8d3e83765d4483e5a31e0ec5676044d (patch) | |
| tree | 1cf20516095cb8a3185de07efbad6974d2260709 /src/Main | |
| parent | 7a01af4783ca2904590ed0ba6e61261d98706f47 (diff) | |
Bump dsd to v0.10.1; UnkStruct_027e05f8_2 OK (#121)
* Unique delink file names
* Fix build
* Revert back to single link
* UnkStruct_027e05f8_2 OK
* `dsd fix ctor-symbols`
* Fix symbols spanning over two delink files
* `dsd fix ctor-symbols` again
* Add missing function `func_02050a20`
* Name `.p__sinit` symbols in USA after their EUR counterparts
* Apply dsd signatures
* Bump dsd to 0.10.0; Fix dsd not updating automatically
* Rename overlay functions
* Fix auto-download wibo
* Fix generating objdiff report
Diffstat (limited to 'src/Main')
| -rw-r--r-- | src/Main/DTCM/UnkStruct_027e05f8_2.cpp | 29 | ||||
| -rw-r--r-- | src/Main/Game/Game.cpp | 2 | ||||
| -rw-r--r-- | src/Main/System/OverlayManager.cpp | 4 |
3 files changed, 28 insertions, 7 deletions
diff --git a/src/Main/DTCM/UnkStruct_027e05f8_2.cpp b/src/Main/DTCM/UnkStruct_027e05f8_2.cpp index f4c6c079..df31e1d3 100644 --- a/src/Main/DTCM/UnkStruct_027e05f8_2.cpp +++ b/src/Main/DTCM/UnkStruct_027e05f8_2.cpp @@ -1,6 +1,27 @@ #include "DTCM/UnkStruct_027e05f8.hpp" -void UnkStruct_027e05f8::Init() {} -void UnkStruct_027e05f8::func_02037458(u16 param1) {} -void UnkStruct_027e05f8::func_02037480() {} -unk32 UnkStruct_027e05f8::func_02037490(unk32 param1) {} +#pragma section dtcm begin +UnkStruct_027e05f8 data_027e05f8; +#pragma section dtcm end + +#define REG_027fffa8 (*(volatile u16 *) 0x027fffa8) + +THUMB UnkStruct_027e05f8::UnkStruct_027e05f8() : + mUnk_0(0), + mUnk_2(0), + mUnk_4(0) {} + +ARM void UnkStruct_027e05f8::func_02037458(u16 param1) { + mUnk_2 = param1 & (param1 ^ mUnk_0); + mUnk_4 = mUnk_0 & (param1 ^ mUnk_0); + mUnk_0 = param1; +} + +ARM void UnkStruct_027e05f8::func_02037480() { + mUnk_2 = 0; + mUnk_4 = 0; +} + +ARM bool UnkStruct_027e05f8::func_02037490() { + return ((REG_027fffa8 & 0x8000) >> 15) == 1; +} diff --git a/src/Main/Game/Game.cpp b/src/Main/Game/Game.cpp index fcbd4097..6519614f 100644 --- a/src/Main/Game/Game.cpp +++ b/src/Main/Game/Game.cpp @@ -196,7 +196,7 @@ THUMB bool Game::StartGameMode() { data_027e077c.Init(0); Fill16(0, (u16 *) &data_027e0d04, 6); func_02033d40(&data_027e0c38); - data_027e05f8.Init(); + data_027e05f8 = UnkStruct_027e05f8(); if (gOverlayManager.mLoadedOverlays[0] != OverlayId_None) { data_ov000_020ec7dc.func_ov000_0207c0f0(mModeId); gTouchControl.Init(); diff --git a/src/Main/System/OverlayManager.cpp b/src/Main/System/OverlayManager.cpp index 8454e27b..3f78516e 100644 --- a/src/Main/System/OverlayManager.cpp +++ b/src/Main/System/OverlayManager.cpp @@ -10,7 +10,7 @@ extern "C" void func_ov007_021028a0(u32 **); THUMB void OverlayManager::Load(OverlayIndex index, OverlayId id) { if (id != OverlayId_None) { - Overlay_Load(NULL, id); + FS_LoadOverlay(NULL, id); } this->mLoadedOverlays[index] = id; @@ -27,7 +27,7 @@ THUMB void OverlayManager::LoadIfNotLoaded(OverlayIndex index, OverlayId id) { THUMB void OverlayManager::Unload(OverlayIndex index) { if (this->mLoadedOverlays[index] != OverlayId_None) { - Overlay_Unload(NULL, this->mLoadedOverlays[index]); + FS_UnloadOverlay(NULL, this->mLoadedOverlays[index]); this->mLoadedOverlays[index] = OverlayId_None; } } |
