Decompile overlay 24 (Part 3) (#68)

* name func_01ffd3d8 and func_01ffd400

* name func_01ffd3b0

* match func_ov024_020cf9d4 + improve the Random struct

* UnkStruct_027e0cf8_00_0C_024 45%

* match PassengerManager::GetRandomIndex

* UnkStruct_027e0cf8_00_0C_024 OK

* UnkStruct_027e0cf8_00_0C_024: do other sections

* UnkStruct_027e0cf8_08_024 55%

* cleanup: remplace delete into null by the delete macro

* UnkStruct_027e0cf8_08_024 OK

* fix build issues

* UnkStruct_ov024_020d86a0_024 OK

* PlayerActor_A0_38_024 .text OK, CreditsEndingType OK

* tools: create courselist.py to convert .CLB data to yaml

* UnkDataStruct4_14 OK

* UnkDataStruct4 17%

* UnkDataStruct4 OK

* MiscAdvManager OK

* PassengerManager OK

* fix build issues

* ZeldaTrainBinary OK

* mark PassengerManager as complete and adjust delinks

* UnkStruct_027e0cf8_08_00_024 OK

* document more of UnkStruct_027e0ce0

* savefile hotfixes

* UnkStruct_027e0ce0_34_024 OK

* code_020d46b4_024 OK

* UnkStruct_027e0d00 & UnkStruct_027e0d00_20 OK

* code_020d51dc_024 OK

* fix weird formatting

* UnkTrainSystem1 OK

* fix jp broken match

* UnkTrainSystem2 OK

* UnkStruct_027e0d08_024 31%

* fix build issues

* UnkStruct_027e0d08 OK!!!

* remove useless parenthesis

* ActorUnk_ov000_020a8bb0_EC OK

* move ActorUnk_ov000_020a8bb0_EC to MainGame/Actor/

* ActorUnkOBPC OK

* add sjiswrap support

* solve remaining gaps and fix build issues

* reorganise files + counter docs

* tools: remove format command execution from defaults
This commit is contained in:
Yanis
2026-06-09 23:01:32 +02:00
committed by GitHub
parent 14cae7cbb1
commit 5e934a8c9b
173 changed files with 7933 additions and 2059 deletions
+19 -20
View File
@@ -3,13 +3,14 @@
#include "Actor/ActorId.hpp"
#include "Actor/ActorManager.hpp"
#include "Actor/ActorUnkNSHD.hpp"
#include "MainGame/AdventureMode.hpp"
#include "MainGame/MiscAdvManager.hpp"
#include "MapObject/MapObjectChestBase.hpp"
#include "MapObject/MapObjectManager.hpp"
#include "Player/PlayerGet.hpp"
#include "System/OverlayManager.hpp"
#include "Unknown/Common.hpp"
#include "Unknown/UnkStruct_020d8698.hpp"
#include "Unknown/UICounterManager.hpp"
#include "Unknown/UnkStruct_027e09a4.hpp"
#include "Unknown/UnkStruct_027e09b8.hpp"
#include "Unknown/UnkStruct_027e09bc.hpp"
@@ -37,7 +38,6 @@ extern "C" void func_ov000_0205ca74(unk32);
extern "C" void func_01ffb6e4(unk32, const void *, void *);
extern "C" void func_01ffc5a0(ModelRender *, unk32, u16, void *, unk32);
extern "C" void func_ov000_0208f820();
extern "C" unk32 func_ov024_020d5354(unk32 *, u16 *);
extern "C" void func_ov000_02058fc4(unk32 *, UnkStruct_PlayerGet_74 *, VecFx32 *);
extern unk32 *data_027e0958;
extern "C" void func_ov000_0208ba10(void *, void *, unk32);
@@ -155,7 +155,7 @@ ARM bool ItemManager::func_ov110_02184a40(ItemId itemId) {
if (this->mEquippedItem == ItemFlag_None) {
this->mEquippedItem = itemFlag;
data_ov024_020d8698->func_ov024_020cd458(this->mEquippedItem, false);
gpUICounterManager->func_ov024_020cd458(this->mEquippedItem, false);
}
} else {
itemFlag = GetItemFlag(itemId);
@@ -466,9 +466,9 @@ ARM PlayerGet::~PlayerGet() {
UnkStruct_ov000_0208f820_28_98 *pUnk_28_98 = this->mUnk_28->mUnk_98;
if (pUnk_28_98 != 0) {
pUnk_28_98->mUnk_38.mUnk_40 &= ~0x10;
pUnk_28_98->mUnk_38.mUnk_08 &= ~0x10;
if (pUnk_28_98->mUnk_38.mUnk_40 == 0) {
if (pUnk_28_98->mUnk_38.mUnk_08 == 0) {
// real?
pUnk_28_98->mUnk_38.~UnkStruct_PlayerGet_64();
}
@@ -629,7 +629,7 @@ ARM void PlayerGet::vfunc_0c(UnkStruct_PlayerGet_vfunc_0c_param1 *param1) {
}
}
UnkStruct_027e09bc_0c *uVar11 = data_027e09bc->mUnk_0C;
UnkStruct_027e09bc_0C *uVar11 = data_027e09bc->mUnk_0C;
uVar11->func_ov000_0207834c(this->mUnk_34, func_ov000_02077590(4), 0);
UnkStruct_PlayerGet_48 *pUnk_48 = this->mUnk_48;
@@ -677,7 +677,7 @@ ARM void PlayerGet::vfunc_0c(UnkStruct_PlayerGet_vfunc_0c_param1 *param1) {
if (pUnk28_98 != NULL) {
UnkStruct_PlayerGet_64 *ptr = &pUnk28_98->mUnk_38;
ptr->mUnk_40 |= 0x10;
ptr->mUnk_08 |= 0x10;
this->mUnk_64.func_ov000_0208a100();
}
}
@@ -1022,30 +1022,29 @@ ARM void PlayerGet::vfunc_18(unk32 param1, unk32 param2, unk32 param3) {
ARM UnkStruct_PlayerGet_ec::UnkStruct_PlayerGet_ec() :
UnkSystem7(NULL) {}
// non-matching
THUMB void UnkStruct_027e0ce0_34::func_ov110_02185d3c(ItemId itemId) {
unk32 uStack_14;
u16 auStack_18[2];
s32 flagPos;
s16 flagValue;
switch (itemId) {
case ItemId_SpiritTrain:
this->func_ov024_020d3d98(0, 0);
this->mUnk_2C = 1;
this->mUnk_00 = 0;
this->mUnk_10 = 0;
this->mUnk_2C = 1;
this->mUnk_00[0] = 0;
this->mUnk_10[0] = 0;
break;
case ItemId_SpiritTrainCar:
this->func_ov024_020d3d98(2, 0);
this->mUnk_2C = 2;
this->mUnk_04 = 2;
this->mUnk_14 = 0;
this->mUnk_2C = 2;
this->mUnk_00[1] = 2;
this->mUnk_10[1] = 0;
break;
default:
uStack_14 = -1;
auStack_18[0] = 0;
flagPos = -1;
flagValue = 0;
if (func_ov024_020d5354(&uStack_14, auStack_18) != 0) {
this->func_ov024_020d3ee8(uStack_14, auStack_18[0], 1);
if (func_ov024_020d5354(&flagPos, &flagValue, itemId)) {
this->SetTrackFlag(flagPos, flagValue, true);
}
break;
}