mirror of
https://github.com/zeldaret/st
synced 2026-05-23 15:01:41 -04:00
Decompile Title overlay (#20)
* Decompile Title overlay * math structs as cpp when applicable * fixes and improvements * regressions fix 1 * regressions fix 2
This commit is contained in:
@@ -29,7 +29,7 @@ const unk32 data_ov019_020d1be8[] = {
|
||||
ARM void SaveManager::func_ov019_020d086c(u16 param1) {
|
||||
func_02030d48(gSaveManager.mUnk_204);
|
||||
|
||||
STATIC_PTMFCALLBACK(SaveFile, gSaveManager.mUnk_23C, gSaveManager.mpSaveFile);
|
||||
STATIC_PTMFCALLBACK(PTMF<SaveFile>, gSaveManager.mUnk_23C, gSaveManager.mpSaveFile);
|
||||
gSaveManager.mUnk_20C = func_02030cfc();
|
||||
func_02030d58(gSaveManager.mUnk_204);
|
||||
|
||||
|
||||
@@ -5,12 +5,7 @@
|
||||
|
||||
extern "C" {
|
||||
void func_020166cc(void *param1, void *param2);
|
||||
|
||||
void func_ov000_02062e44(void *param1, void *param2);
|
||||
|
||||
//! TODO: conflict between UnkStructSub4, UnkStructSub4_2 and UnkStructSub19
|
||||
unk32 func_ov000_020609c4(void *thisx);
|
||||
void func_ov000_0206082c(void *thisx, unk32 param1, unk32 param2);
|
||||
};
|
||||
|
||||
// non-matching
|
||||
@@ -19,75 +14,75 @@ ARM UnkSubStruct9::UnkSubStruct9(stack_struct1 param1) :
|
||||
mUnk_064(0x89, 1),
|
||||
mUnk_29C(0x89, UnkStruct_ov019_020d1e70::data_ov019_020d1e4c.mUnk_04[param1.param2]),
|
||||
mUnk_2B4(0x89, 0x15) {
|
||||
this->mUnk_2CC.mUnk_6E = 1;
|
||||
this->mUnk_2CC.mUnk_70 = 0;
|
||||
this->mUnk_2CC.mUnk_5C = 0;
|
||||
this->mUnk_2CC.mUnk_5E = 0;
|
||||
this->mUnk_2CC.mUnk_74 = 0;
|
||||
func_ov000_0206082c(&this->mUnk_2CC, 0x89, 0x00);
|
||||
this->mUnk_2CC.mUnk_6E = true;
|
||||
this->mUnk_2CC.mUnk_70 = 0;
|
||||
this->mUnk_2CC.mUnk_5C.x = 0;
|
||||
this->mUnk_2CC.mUnk_5C.y = 0;
|
||||
this->mUnk_2CC.mUnk_74 = 0;
|
||||
this->mUnk_2CC.func_ov000_0206082c(0x89, 0x00);
|
||||
|
||||
this->mUnk_344.mUnk_6E = 1;
|
||||
this->mUnk_344.mUnk_70 = 0;
|
||||
this->mUnk_344.mUnk_5C = 0;
|
||||
this->mUnk_344.mUnk_5E = 0;
|
||||
this->mUnk_344.mUnk_74 = 0;
|
||||
func_ov000_0206082c(&this->mUnk_344, 0x89, 0x03);
|
||||
this->mUnk_344.mUnk_6E = true;
|
||||
this->mUnk_344.mUnk_70 = 0;
|
||||
this->mUnk_344.mUnk_5C.x = 0;
|
||||
this->mUnk_344.mUnk_5C.y = 0;
|
||||
this->mUnk_344.mUnk_74 = 0;
|
||||
this->mUnk_344.func_ov000_0206082c(0x89, 0x03);
|
||||
|
||||
this->mUnk_3BC.mUnk_6E = 1;
|
||||
this->mUnk_3BC.mUnk_70 = 0;
|
||||
this->mUnk_3BC.mUnk_5C = 0;
|
||||
this->mUnk_3BC.mUnk_5E = 0;
|
||||
this->mUnk_3BC.mUnk_74 = 0;
|
||||
func_ov000_0206082c(&this->mUnk_3BC, 0x89, 0x02);
|
||||
this->mUnk_3BC.mUnk_6E = true;
|
||||
this->mUnk_3BC.mUnk_70 = 0;
|
||||
this->mUnk_3BC.mUnk_5C.x = 0;
|
||||
this->mUnk_3BC.mUnk_5C.y = 0;
|
||||
this->mUnk_3BC.mUnk_74 = 0;
|
||||
this->mUnk_3BC.func_ov000_0206082c(0x89, 0x02);
|
||||
|
||||
this->mUnk_434.mUnk_6E = 1;
|
||||
this->mUnk_434.mUnk_70 = 0;
|
||||
this->mUnk_434.mUnk_5C = 0;
|
||||
this->mUnk_434.mUnk_5E = 0;
|
||||
this->mUnk_434.mUnk_74 = 0;
|
||||
func_ov000_0206082c(&this->mUnk_434, 0x89, 0x01);
|
||||
this->mUnk_434.mUnk_6E = true;
|
||||
this->mUnk_434.mUnk_70 = 0;
|
||||
this->mUnk_434.mUnk_5C.x = 0;
|
||||
this->mUnk_434.mUnk_5C.y = 0;
|
||||
this->mUnk_434.mUnk_74 = 0;
|
||||
this->mUnk_434.func_ov000_0206082c(0x89, 0x01);
|
||||
|
||||
this->mUnk_4AC.mUnk_6E = 1;
|
||||
this->mUnk_4AC.mUnk_70 = 0;
|
||||
this->mUnk_4AC.mUnk_5C = 0;
|
||||
this->mUnk_4AC.mUnk_5E = 0;
|
||||
this->mUnk_4AC.mUnk_74 = 0;
|
||||
func_ov000_0206082c(&this->mUnk_4AC, 0x89, 0x04);
|
||||
this->mUnk_4AC.mUnk_6E = true;
|
||||
this->mUnk_4AC.mUnk_70 = 0;
|
||||
this->mUnk_4AC.mUnk_5C.x = 0;
|
||||
this->mUnk_4AC.mUnk_5C.y = 0;
|
||||
this->mUnk_4AC.mUnk_74 = 0;
|
||||
this->mUnk_4AC.func_ov000_0206082c(0x89, 0x04);
|
||||
|
||||
this->mUnk_524.mUnk_6E = 1;
|
||||
this->mUnk_524.mUnk_70 = 0;
|
||||
this->mUnk_524.mUnk_5C = 0;
|
||||
this->mUnk_524.mUnk_5E = 0;
|
||||
this->mUnk_524.mUnk_74 = 0;
|
||||
func_ov000_0206082c(&this->mUnk_524, 0x89, 0x05);
|
||||
this->mUnk_524.mUnk_6E = true;
|
||||
this->mUnk_524.mUnk_70 = 0;
|
||||
this->mUnk_524.mUnk_5C.x = 0;
|
||||
this->mUnk_524.mUnk_5C.y = 0;
|
||||
this->mUnk_524.mUnk_74 = 0;
|
||||
this->mUnk_524.func_ov000_0206082c(0x89, 0x05);
|
||||
|
||||
this->mUnk_59C.mUnk_6E = 1;
|
||||
this->mUnk_59C.mUnk_70 = 0;
|
||||
this->mUnk_59C.mUnk_5C = 0;
|
||||
this->mUnk_59C.mUnk_5E = 0;
|
||||
this->mUnk_59C.mUnk_74 = 0;
|
||||
func_ov000_0206082c(&this->mUnk_59C, 0x89, 0x06);
|
||||
this->mUnk_59C.mUnk_6E = true;
|
||||
this->mUnk_59C.mUnk_70 = 0;
|
||||
this->mUnk_59C.mUnk_5C.x = 0;
|
||||
this->mUnk_59C.mUnk_5C.y = 0;
|
||||
this->mUnk_59C.mUnk_74 = 0;
|
||||
this->mUnk_59C.func_ov000_0206082c(0x89, 0x06);
|
||||
|
||||
this->mUnk_614.mUnk_6E = 1;
|
||||
this->mUnk_614.mUnk_70 = 0;
|
||||
this->mUnk_614.mUnk_5C = 0;
|
||||
this->mUnk_614.mUnk_5E = 0;
|
||||
this->mUnk_614.mUnk_74 = 0;
|
||||
func_ov000_0206082c(&this->mUnk_614, 0x89, 0x07);
|
||||
this->mUnk_614.mUnk_6E = true;
|
||||
this->mUnk_614.mUnk_70 = 0;
|
||||
this->mUnk_614.mUnk_5C.x = 0;
|
||||
this->mUnk_614.mUnk_5C.y = 0;
|
||||
this->mUnk_614.mUnk_74 = 0;
|
||||
this->mUnk_614.func_ov000_0206082c(0x89, 0x07);
|
||||
|
||||
this->mUnk_68C.mUnk_6E = 1;
|
||||
this->mUnk_68C.mUnk_70 = 0;
|
||||
this->mUnk_68C.mUnk_5C = 0;
|
||||
this->mUnk_68C.mUnk_5E = 0;
|
||||
this->mUnk_68C.mUnk_74 = 0;
|
||||
func_ov000_0206082c(&this->mUnk_68C, 0x89, 0x08);
|
||||
this->mUnk_68C.mUnk_6E = true;
|
||||
this->mUnk_68C.mUnk_70 = 0;
|
||||
this->mUnk_68C.mUnk_5C.x = 0;
|
||||
this->mUnk_68C.mUnk_5C.y = 0;
|
||||
this->mUnk_68C.mUnk_74 = 0;
|
||||
this->mUnk_68C.func_ov000_0206082c(0x89, 0x08);
|
||||
|
||||
this->mUnk_704.mUnk_6E = 1;
|
||||
this->mUnk_704.mUnk_70 = 0;
|
||||
this->mUnk_704.mUnk_5C = 0;
|
||||
this->mUnk_704.mUnk_5E = 0;
|
||||
this->mUnk_704.mUnk_74 = 0;
|
||||
func_ov000_0206082c(&this->mUnk_704, 0x89, 0x09);
|
||||
this->mUnk_704.mUnk_6E = true;
|
||||
this->mUnk_704.mUnk_70 = 0;
|
||||
this->mUnk_704.mUnk_5C.x = 0;
|
||||
this->mUnk_704.mUnk_5C.y = 0;
|
||||
this->mUnk_704.mUnk_74 = 0;
|
||||
this->mUnk_704.func_ov000_0206082c(0x89, 0x09);
|
||||
|
||||
if (this->mSaveSlotIndex == 0) {
|
||||
this->mUnk_004.func_ov000_020633c0(0x40, 0x89, 0x02, 0x1F, 0x89, 0x00);
|
||||
@@ -131,16 +126,16 @@ ARM void UnkSubStruct9::func_ov019_020cbb40() {
|
||||
}
|
||||
|
||||
ARM void UnkSubStruct9::func_ov019_020cbb94() {
|
||||
func_ov000_020609c4(&this->mUnk_2CC);
|
||||
func_ov000_020609c4(&this->mUnk_344);
|
||||
func_ov000_020609c4(&this->mUnk_3BC);
|
||||
func_ov000_020609c4(&this->mUnk_434);
|
||||
func_ov000_020609c4(&this->mUnk_4AC);
|
||||
func_ov000_020609c4(&this->mUnk_524);
|
||||
func_ov000_020609c4(&this->mUnk_59C);
|
||||
func_ov000_020609c4(&this->mUnk_614);
|
||||
func_ov000_020609c4(&this->mUnk_68C);
|
||||
func_ov000_020609c4(&this->mUnk_704);
|
||||
this->mUnk_2CC.func_ov000_020609c4();
|
||||
this->mUnk_344.func_ov000_020609c4();
|
||||
this->mUnk_3BC.func_ov000_020609c4();
|
||||
this->mUnk_434.func_ov000_020609c4();
|
||||
this->mUnk_4AC.func_ov000_020609c4();
|
||||
this->mUnk_524.func_ov000_020609c4();
|
||||
this->mUnk_59C.func_ov000_020609c4();
|
||||
this->mUnk_614.func_ov000_020609c4();
|
||||
this->mUnk_68C.func_ov000_020609c4();
|
||||
this->mUnk_704.func_ov000_020609c4();
|
||||
}
|
||||
|
||||
struct struct_auStack_c0 {
|
||||
|
||||
@@ -13,13 +13,7 @@
|
||||
|
||||
extern "C" {
|
||||
void func_020249d4(void *pReg, unk32 param1, unk32 param2, unk32 param3, unk32 param4);
|
||||
|
||||
void func_ov000_02062e44(void *param1, void *param2);
|
||||
|
||||
//! TODO: conflict between UnkStructSub4, UnkStructSub4_2 and UnkStructSub19
|
||||
unk32 func_ov000_020609c4(void *thisx);
|
||||
unk32 func_ov000_02060af8(void *thisx);
|
||||
void func_ov000_0206082c(void *thisx, unk32 param1, unk32 param2);
|
||||
};
|
||||
|
||||
class UnkStruct_ov019_020d24c0 {
|
||||
@@ -39,7 +33,7 @@ public:
|
||||
UnkStruct_ov019_020d24c0 data_ov019_020d24c0(-0x100, 0, 0x100, 0);
|
||||
|
||||
UnkStruct_ov019_020d1e4c UnkStruct_ov019_020d1e70::data_ov019_020d1e4c = {
|
||||
0x14, 0x14, 0x14, 0x04, 0x03, -0x47, 0x00, 0x0281, -0x47, {0x00, 0x00}, 0x0281,
|
||||
0x14, 0x14, 0x14, 0x04, 0x03, -0x47, 0x00, 0x0281, -0x47, Vec2s(0x00, 0x00), 0x0281,
|
||||
};
|
||||
|
||||
UnkStruct_ov019_020d1e94 UnkStruct_ov019_020d1e70::data_ov019_020d1e94 = {
|
||||
@@ -240,7 +234,7 @@ ARM void FileSelectMain::func_ov019_020c6d08() {}
|
||||
ARM void FileSelectMain::func_ov019_020c6d0c() {}
|
||||
|
||||
ARM void FileSelectMain::func_ov019_020c6d10() {
|
||||
CALL_PTMF(FileSelectMain, data_ov019_020d1edc[this->mState]);
|
||||
CALL_PTMF(PTMF<FileSelectMain>, data_ov019_020d1edc[this->mState]);
|
||||
}
|
||||
|
||||
// https://decomp.me/scratch/EuA67
|
||||
@@ -304,8 +298,8 @@ ARM void FileSelectMain::func_ov019_020c6e3c() {
|
||||
unaff_r4 = 0;
|
||||
UnkStruct_ov019_020d24c8_28_258 local_3c(0x8A, 0x05);
|
||||
|
||||
local_40.x = local_3c.mPos.x;
|
||||
local_40.y = local_3c.mPos.y;
|
||||
local_40.x = local_3c.mPosU.x;
|
||||
local_40.y = local_3c.mPosU.y;
|
||||
|
||||
unaff_r9 = 10;
|
||||
func_ov000_02062e44(auStack_50, &this->GetUnk03E0(fileIndex).mUnk_004);
|
||||
@@ -723,8 +717,8 @@ ARM void FileSelectMain::func_ov019_020c77b8() {
|
||||
this->func_ov019_020c6c54();
|
||||
this->func_ov019_020c6ca0();
|
||||
this->func_ov019_020c757c();
|
||||
func_ov000_0206082c(&this->mUnk_1144, 0x8B, 0);
|
||||
func_ov000_0206082c(&this->mUnk_155C, 0x8B, 2);
|
||||
this->mUnk_1144.func_ov000_0206082c(0x8B, 0);
|
||||
this->mUnk_155C.func_ov000_0206082c(0x8B, 2);
|
||||
}
|
||||
|
||||
ARM void FileSelectMain::func_ov019_020c7804() {
|
||||
@@ -758,9 +752,9 @@ ARM void FileSelectMain::func_ov019_020c7878() {
|
||||
|
||||
ARM void FileSelectMain::func_ov019_020c78ac() {
|
||||
if (this->mExitMode == FileSelectExitMode_AdventureMode) {
|
||||
func_ov000_0206082c(&this->mUnk_1144, 0x8B, 1);
|
||||
this->mUnk_1144.func_ov000_0206082c(0x8B, 1);
|
||||
} else if (this->mExitMode == FileSelectExitMode_BattleMode) {
|
||||
func_ov000_0206082c(&this->mUnk_155C, 0x8B, 3);
|
||||
this->mUnk_155C.func_ov000_0206082c(0x8B, 3);
|
||||
}
|
||||
|
||||
this->mUnk_0DA4.mUnk_2A = false;
|
||||
@@ -1120,13 +1114,13 @@ ARM void FileSelectMain::func_ov019_020c80e8() {
|
||||
ARM void FileSelectMain::func_ov019_020c80f4() {}
|
||||
|
||||
// non-matching
|
||||
ARM void FileSelectMain::vfunc_08() {
|
||||
ARM void FileSelectMain::vfunc_08(GameModePTMFParam2Struct *param1, TouchControl *pTouchControl) {
|
||||
for (int i = 0; i < MAX_SAVE_SLOTS; i++) {
|
||||
this->mUnk_03E8[i].func_ov000_02063f64();
|
||||
this->GetUnk03E0(i).func_ov019_020cbb94();
|
||||
}
|
||||
|
||||
CALL_PTMF(FileSelectMain, data_ov019_020d1f94[this->mState]);
|
||||
CALL_PTMF(PTMF<FileSelectMain>, data_ov019_020d1f94[this->mState]);
|
||||
this->mUnk_002C.UnkOperations(NULL, false);
|
||||
REG_BLDALPHA = this->mUnk_002C.func_0201eaa0() | 0x1000;
|
||||
}
|
||||
@@ -1263,9 +1257,9 @@ ARM void FileSelectMain::func_ov019_020c92dc() {
|
||||
this->GetUnk03E0(i).mUnk_004.mUnk_2A = false;
|
||||
}
|
||||
|
||||
this->mUnk_00BC.UnkOperations(&this->mUnk_005C.mPos, true);
|
||||
this->mUnk_00BC.UnkOperations2(&this->mUnk_005C.mPos, true);
|
||||
|
||||
this->mUnk_1078.UnkOperations(&this->mUnk_0DA4.mPos, true);
|
||||
this->mUnk_1078.UnkOperations2(&this->mUnk_0DA4.mPos, true);
|
||||
UnkStruct_ov019_020d24c8_28_258 local_30(0x8B, 0x06);
|
||||
Vec2s local_5c;
|
||||
Vec2s local_58;
|
||||
@@ -1274,7 +1268,7 @@ ARM void FileSelectMain::func_ov019_020c92dc() {
|
||||
this->mUnk_1144.mUnk_5C.x = local_58.x + local_30.mPos.x - local_5c.x;
|
||||
this->mUnk_1144.mUnk_5C.y = local_58.y + local_30.mPos.y - local_5c.y;
|
||||
|
||||
this->mUnk_1490.UnkOperations(&this->mUnk_11BC.mPos, true);
|
||||
this->mUnk_1490.UnkOperations2(&this->mUnk_11BC.mPos, true);
|
||||
UnkStruct_ov019_020d24c8_28_258 local_48(0x8B, 0x06);
|
||||
Vec2s local_60;
|
||||
Vec2s local_64;
|
||||
@@ -1283,11 +1277,11 @@ ARM void FileSelectMain::func_ov019_020c92dc() {
|
||||
this->mUnk_1144.mUnk_5C.x = local_64.x + local_48.mPos.x - local_60.x;
|
||||
this->mUnk_1144.mUnk_5C.y = local_64.y + local_48.mPos.y - local_60.y;
|
||||
|
||||
this->mUnk_18A8.UnkOperations(&this->mUnk_15D4.mPos, true);
|
||||
this->mUnk_1BC0.UnkOperations(&this->mUnk_18EC.mPos, true);
|
||||
this->mUnk_18A8.UnkOperations2(&this->mUnk_15D4.mPos, true);
|
||||
this->mUnk_1BC0.UnkOperations2(&this->mUnk_18EC.mPos, true);
|
||||
|
||||
func_ov000_020609c4(&this->mUnk_1144);
|
||||
func_ov000_020609c4(&this->mUnk_155C);
|
||||
this->mUnk_1144.func_ov000_020609c4();
|
||||
this->mUnk_155C.func_ov000_020609c4();
|
||||
}
|
||||
|
||||
ARM void FileSelectMain::func_ov019_020c9b28() {
|
||||
@@ -1327,8 +1321,8 @@ ARM void FileSelectMain::func_ov019_020c9c18() {
|
||||
}
|
||||
|
||||
ARM void FileSelectMain::func_ov019_020c9c70() {
|
||||
func_ov000_020609c4(&this->mUnk_1144);
|
||||
func_ov000_020609c4(&this->mUnk_155C);
|
||||
this->mUnk_1144.func_ov000_020609c4();
|
||||
this->mUnk_155C.func_ov000_020609c4();
|
||||
|
||||
switch (data_0204a110.func_01ff9b50()) {
|
||||
case 0x46:
|
||||
@@ -1360,18 +1354,18 @@ ARM void FileSelectMain::func_ov019_020c9c70() {
|
||||
}
|
||||
|
||||
ARM void FileSelectMain::func_ov019_020c9d88() {
|
||||
func_ov000_020609c4(&this->mUnk_1144);
|
||||
func_ov000_020609c4(&this->mUnk_155C);
|
||||
this->mUnk_1144.func_ov000_020609c4();
|
||||
this->mUnk_155C.func_ov000_020609c4();
|
||||
|
||||
if (this->mExitMode == FileSelectExitMode_AdventureMode) {
|
||||
if (func_ov000_02060af8(&this->mUnk_1144) != 0) {
|
||||
if (this->mUnk_1144.func_ov000_02060af8() != 0) {
|
||||
this->SetState(FileSelectState_EnterGameMode);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (this->mExitMode == FileSelectExitMode_BattleMode) {
|
||||
if (func_ov000_02060af8(&this->mUnk_155C) != 0) {
|
||||
if (this->mUnk_155C.func_ov000_02060af8() != 0) {
|
||||
this->SetState(FileSelectState_EnterGameMode);
|
||||
return;
|
||||
}
|
||||
@@ -1379,9 +1373,9 @@ ARM void FileSelectMain::func_ov019_020c9d88() {
|
||||
}
|
||||
|
||||
ARM void FileSelectMain::func_ov019_020c9e08() {
|
||||
this->mUnk_00BC.UnkOperations(&this->mUnk_005C.mPos, true);
|
||||
this->mUnk_00BC.UnkOperations2(&this->mUnk_005C.mPos, true);
|
||||
|
||||
this->mUnk_1100.UnkOperations(&this->mUnk_0DA4.mPos, true);
|
||||
this->mUnk_1100.UnkOperations2(&this->mUnk_0DA4.mPos, true);
|
||||
UnkStruct_ov019_020d24c8_28_258 local_30(0x8B, 0x06);
|
||||
Vec2s local_5c;
|
||||
Vec2s local_58;
|
||||
@@ -1390,7 +1384,7 @@ ARM void FileSelectMain::func_ov019_020c9e08() {
|
||||
this->mUnk_1144.mUnk_5C.x = local_58.x + local_30.mPos.x - local_5c.x;
|
||||
this->mUnk_1144.mUnk_5C.y = local_58.y + local_30.mPos.y - local_5c.y;
|
||||
|
||||
this->mUnk_1518.UnkOperations(&this->mUnk_11BC.mPos, true);
|
||||
this->mUnk_1518.UnkOperations2(&this->mUnk_11BC.mPos, true);
|
||||
UnkStruct_ov019_020d24c8_28_258 local_48(0x8B, 0x05);
|
||||
Vec2s local_6c;
|
||||
Vec2s local_68;
|
||||
@@ -1399,11 +1393,11 @@ ARM void FileSelectMain::func_ov019_020c9e08() {
|
||||
this->mUnk_155C.mUnk_5C.x = local_68.x + local_48.mPos.x - local_6c.x;
|
||||
this->mUnk_155C.mUnk_5C.y = local_68.y + local_48.mPos.y - local_6c.y;
|
||||
|
||||
this->mUnk_18A8.UnkOperations(&this->mUnk_15D4.mPos, true);
|
||||
this->mUnk_1BC0.UnkOperations(&this->mUnk_18EC.mPos, true);
|
||||
this->mUnk_18A8.UnkOperations2(&this->mUnk_15D4.mPos, true);
|
||||
this->mUnk_1BC0.UnkOperations2(&this->mUnk_18EC.mPos, true);
|
||||
|
||||
func_ov000_020609c4(&this->mUnk_1144);
|
||||
func_ov000_020609c4(&this->mUnk_155C);
|
||||
this->mUnk_1144.func_ov000_020609c4();
|
||||
this->mUnk_155C.func_ov000_020609c4();
|
||||
|
||||
if (this->mExitMode == FileSelectExitMode_AdventureMode && this->mUnk_00BC.mUnk_0C) {
|
||||
data_02049a2c.GetUnk00_FileSelect()->LoadAdventureMode(this->mSaveSlotIndex);
|
||||
@@ -1466,9 +1460,9 @@ ARM void FileSelectMain::func_ov019_020ca940() {
|
||||
this->GetUnk03E0(i).mUnk_004.mUnk_2A = false;
|
||||
}
|
||||
|
||||
this->mUnk_00BC.UnkOperations(&this->mUnk_005C.mPos, true);
|
||||
this->mUnk_00BC.UnkOperations2(&this->mUnk_005C.mPos, true);
|
||||
|
||||
this->mUnk_1100.UnkOperations(&this->mUnk_0DA4.mPos, true);
|
||||
this->mUnk_1100.UnkOperations2(&this->mUnk_0DA4.mPos, true);
|
||||
UnkStruct_ov019_020d24c8_28_258 local_30(0x8B, 0x06);
|
||||
Vec2s local_5c;
|
||||
Vec2s local_58;
|
||||
@@ -1477,7 +1471,7 @@ ARM void FileSelectMain::func_ov019_020ca940() {
|
||||
this->mUnk_1144.mUnk_5C.x = local_58.x + local_30.mPos.x - local_5c.x;
|
||||
this->mUnk_1144.mUnk_5C.y = local_58.y + local_30.mPos.y - local_5c.y;
|
||||
|
||||
this->mUnk_1518.UnkOperations(&this->mUnk_11BC.mPos, true);
|
||||
this->mUnk_1518.UnkOperations2(&this->mUnk_11BC.mPos, true);
|
||||
UnkStruct_ov019_020d24c8_28_258 local_48(0x8B, 0x05);
|
||||
Vec2s local_6c;
|
||||
Vec2s local_68;
|
||||
@@ -1486,11 +1480,11 @@ ARM void FileSelectMain::func_ov019_020ca940() {
|
||||
this->mUnk_155C.mUnk_5C.x = local_68.x + local_48.mPos.x - local_6c.x;
|
||||
this->mUnk_155C.mUnk_5C.y = local_68.y + local_48.mPos.y - local_6c.y;
|
||||
|
||||
this->mUnk_18A8.UnkOperations(&this->mUnk_15D4.mPos, true);
|
||||
this->mUnk_1BC0.UnkOperations(&this->mUnk_18EC.mPos, true);
|
||||
this->mUnk_18A8.UnkOperations2(&this->mUnk_15D4.mPos, true);
|
||||
this->mUnk_1BC0.UnkOperations2(&this->mUnk_18EC.mPos, true);
|
||||
|
||||
func_ov000_020609c4(&this->mUnk_1144);
|
||||
func_ov000_020609c4(&this->mUnk_155C);
|
||||
this->mUnk_1144.func_ov000_020609c4();
|
||||
this->mUnk_155C.func_ov000_020609c4();
|
||||
}
|
||||
|
||||
ARM void FileSelectMain::func_ov019_020cb180() {
|
||||
@@ -1525,8 +1519,8 @@ ARM void FileSelectMain::func_ov019_020cb268() {}
|
||||
|
||||
ARM void FileSelectMain::func_ov019_020cb26c() {}
|
||||
|
||||
ARM void FileSelectMain::vfunc_10() {
|
||||
CALL_PTMF(FileSelectMain, data_ov019_020d204c[this->mState]);
|
||||
ARM void FileSelectMain::vfunc_10(unk8 *param1) {
|
||||
CALL_PTMF(PTMF<FileSelectMain>, data_ov019_020d204c[this->mState]);
|
||||
}
|
||||
|
||||
ARM void FileSelectMain::func_ov019_020cb2a8() {
|
||||
|
||||
@@ -34,7 +34,7 @@ ARM FileSelectManager::~FileSelectManager() {
|
||||
ARM void FileSelectManager::vfunc_10(unk32 param1, unk32 param2, unk32 param3) {
|
||||
void *unkPtr;
|
||||
|
||||
this->mUnk_004.func_0201c00c(0x25, 1, param3);
|
||||
this->mUnk_004.func_0201c00c(0x25, 1);
|
||||
|
||||
FileSelectMain *newSub3 = new(HeapIndex_1) FileSelectMain();
|
||||
unkPtr = newSub3;
|
||||
|
||||
@@ -84,7 +84,7 @@ ARM void FileSelectMicTest::func_ov019_020cea6c() {}
|
||||
ARM void FileSelectMicTest::func_ov019_020cea70() {}
|
||||
|
||||
ARM void FileSelectMicTest::func_ov019_020cea74() {
|
||||
CALL_PTMF(FileSelectMicTest, data_ov019_020d225c[this->mState]);
|
||||
CALL_PTMF(PTMF<FileSelectMicTest>, data_ov019_020d225c[this->mState]);
|
||||
}
|
||||
|
||||
// non-matching
|
||||
@@ -138,7 +138,7 @@ ARM void FileSelectMicTest::func_ov019_020cebcc() {
|
||||
this->mUnk_304.mUnk_0A4.func_ov000_0206415c(&local_10, 7, data_ov019_020d2248.mUnk_00, 0);
|
||||
}
|
||||
|
||||
ARM void FileSelectMicTest::vfunc_08() {
|
||||
ARM void FileSelectMicTest::vfunc_08(GameModePTMFParam2Struct *param1, TouchControl *pTouchControl) {
|
||||
switch (this->mState) {
|
||||
case FSMicTestState_MicTestIdle:
|
||||
this->mUnk_270.func_ov019_020cf168();
|
||||
@@ -177,7 +177,7 @@ ARM void FileSelectMicTest::vfunc_08() {
|
||||
data_ov000_020b51b8.func_ov000_0206c608(8, 0, 0x1000);
|
||||
}
|
||||
|
||||
ARM void FileSelectMicTest::vfunc_10() {
|
||||
ARM void FileSelectMicTest::vfunc_10(unk8 *param1) {
|
||||
this->mUnk_270.func_ov019_020cf21c();
|
||||
data_0204af1c.func_0201aa44(&this->mUnk_258.mUnk_00, &this->mUnk_258.mPos, 0, 0);
|
||||
this->mUnk_020.func_0201f4b4(0);
|
||||
@@ -189,7 +189,7 @@ ARM void FileSelectMicTest::vfunc_10() {
|
||||
|
||||
extern u8 data_ov000_020b5340[]; // bool?
|
||||
|
||||
ARM void FileSelectMicTest::vfunc_14() {
|
||||
ARM void FileSelectMicTest::vfunc_14(unk8 *param1) {
|
||||
if (this->mUnk_630 != 0) {
|
||||
if (data_ov000_020b5340[5] == 0) {
|
||||
this->mUnk_630 = 0;
|
||||
|
||||
@@ -12,8 +12,6 @@
|
||||
|
||||
extern "C" {
|
||||
void func_ov000_02062e44(void *param1, void *param2);
|
||||
|
||||
//! TODO: conflict between UnkStructSub4, UnkStructSub4_2 and UnkStructSub19
|
||||
void func_ov000_020623d8(void *param1, unk32 param2);
|
||||
};
|
||||
|
||||
@@ -22,19 +20,19 @@ public:
|
||||
/* 00 */ Vec2s mUnk_00;
|
||||
/* 04 */ Vec2s mUnk_04;
|
||||
/* 08 */ Vec2s mUnk_08;
|
||||
/* 0C */ Vec2s mUnk_0C;
|
||||
/* 10 */ Vec2s mUnk_10;
|
||||
/* 0C */ VEC2S mUnk_0C;
|
||||
/* 10 */ VEC2S mUnk_10;
|
||||
/* 14 */
|
||||
};
|
||||
|
||||
class UnkStruct_ov019_020d2170 {
|
||||
public:
|
||||
/* 14 */ Vec2s_cpp mUnk_00;
|
||||
/* 18 */ Vec2s_cpp mUnk_04;
|
||||
/* 1C */ Vec2s_cpp mUnk_08;
|
||||
/* 20 */ Vec2s_cpp mUnk_0C;
|
||||
/* 24 */ Vec2s_cpp mUnk_10;
|
||||
/* 28 */ Vec2s_cpp mUnk_14;
|
||||
/* 14 */ Vec2s mUnk_00;
|
||||
/* 18 */ Vec2s mUnk_04;
|
||||
/* 1C */ Vec2s mUnk_08;
|
||||
/* 20 */ Vec2s mUnk_0C;
|
||||
/* 24 */ Vec2s mUnk_10;
|
||||
/* 28 */ Vec2s mUnk_14;
|
||||
/* 2C */
|
||||
|
||||
static UnkStruct_ov019_020d215c data_ov019_020d215c;
|
||||
@@ -70,7 +68,8 @@ public:
|
||||
};
|
||||
|
||||
UnkStruct_ov019_020d215c UnkStruct_ov019_020d2170::data_ov019_020d215c = {
|
||||
{0, 0}, {0, 0}, {0, 0}, {-0x47, -0x01}, {0x0281, 0x00}};
|
||||
Vec2s(), Vec2s(), Vec2s(), {-0x47, -0x01}, {0x0281, 0x00},
|
||||
};
|
||||
|
||||
static const UnkStruct_ov019_020d2170 data_ov019_020d2170;
|
||||
|
||||
@@ -120,7 +119,7 @@ ARM FileSelectOptionsManager::~FileSelectOptionsManager() {
|
||||
this->mpOptions = NULL;
|
||||
}
|
||||
|
||||
ARM void FileSelectOptionsManager::vfunc_08() {
|
||||
ARM void FileSelectOptionsManager::vfunc_08(GameModePTMFParam2Struct *param1, TouchControl *pTouchControl) {
|
||||
if (this->mUnk_20 == 0) {
|
||||
return;
|
||||
}
|
||||
@@ -211,14 +210,14 @@ ARM FileSelectOptions::~FileSelectOptions() {
|
||||
}
|
||||
|
||||
ARM void FileSelectOptions::func_ov019_020ccd40() {
|
||||
CALL_PTMF(FileSelectOptions, data_ov019_020d21c0[this->mState]);
|
||||
CALL_PTMF(PTMF<FileSelectOptions>, data_ov019_020d21c0[this->mState]);
|
||||
}
|
||||
|
||||
ARM void FileSelectOptions::vfunc_08() {
|
||||
CALL_PTMF(FileSelectOptions, data_ov019_020d2188[this->mState]);
|
||||
ARM void FileSelectOptions::vfunc_08(GameModePTMFParam2Struct *param1, TouchControl *pTouchControl) {
|
||||
CALL_PTMF(PTMF<FileSelectOptions>, data_ov019_020d2188[this->mState]);
|
||||
}
|
||||
|
||||
ARM void FileSelectOptions::vfunc_10() {
|
||||
ARM void FileSelectOptions::vfunc_10(unk8 *param1) {
|
||||
this->mUnk_0024.func_ov019_020ce4dc();
|
||||
this->mUnk_1108.func_ov000_02062f30();
|
||||
this->mUnk_1794.func_ov000_02062f30();
|
||||
@@ -363,10 +362,10 @@ ARM void FileSelectOptions::func_ov019_020cd16c() {
|
||||
}
|
||||
|
||||
UnkStruct_ov019_020d24c8_28_258 local_34(0x8C, 0x00);
|
||||
local_58.x = local_34.mPos.x + UnkStruct_ov019_020d2170::data_ov019_020d215c.mUnk_08.x;
|
||||
local_58.y = local_34.mPos.y + UnkStruct_ov019_020d2170::data_ov019_020d215c.mUnk_08.y;
|
||||
local_54.y = local_34.mPos.y;
|
||||
local_54.x = local_34.mPos.x;
|
||||
local_58.x = local_34.mPosU.x + UnkStruct_ov019_020d2170::data_ov019_020d215c.mUnk_08.x;
|
||||
local_58.y = local_34.mPosU.y + UnkStruct_ov019_020d2170::data_ov019_020d215c.mUnk_08.y;
|
||||
local_54.y = local_34.mPosU.y;
|
||||
local_54.x = local_34.mPosU.x;
|
||||
this->mUnk_1064.func_0201e874(0x14, &local_54, &local_58, 7);
|
||||
|
||||
this->mUnk_1064.mUnk_0A = true;
|
||||
@@ -398,13 +397,14 @@ ARM void FileSelectOptions::func_ov019_020cd16c() {
|
||||
}
|
||||
|
||||
ARM void FileSelectOptions::func_ov019_020cd41c() {
|
||||
Vec2s_cpp local_40;
|
||||
Vec2us_cpp local_3c;
|
||||
Vec2s local_40;
|
||||
Vec2us local_3c;
|
||||
UnkStruct_ov019_020d24c8_28_258 local_34(0x8C, 0x00);
|
||||
|
||||
local_40.x = local_34.mPos.x + UnkStruct_ov019_020d2170::data_ov019_020d215c.mUnk_00.x;
|
||||
local_40.y = local_34.mPos.y + UnkStruct_ov019_020d2170::data_ov019_020d215c.mUnk_00.y;
|
||||
local_3c = local_34.mPos;
|
||||
local_40.x = local_34.mPosU.x + UnkStruct_ov019_020d2170::data_ov019_020d215c.mUnk_00.x;
|
||||
local_40.y = local_34.mPosU.y + UnkStruct_ov019_020d2170::data_ov019_020d215c.mUnk_00.y;
|
||||
local_3c.x = local_34.mPosU.x;
|
||||
local_3c.y = local_34.mPosU.y;
|
||||
this->mUnk_1064.func_0201e874(0x0C, &local_3c, &local_40, 0);
|
||||
this->mUnk_1064.mUnk_0A = true;
|
||||
this->mUnk_1064.mUnk_0C = false;
|
||||
@@ -414,22 +414,22 @@ ARM void FileSelectOptions::func_ov019_020cd41c() {
|
||||
this->mUnk_1064.mUnk_0C = true;
|
||||
}
|
||||
|
||||
Vec2s_cpp local_44;
|
||||
Vec2s_cpp local_30;
|
||||
Vec2s local_44;
|
||||
Vec2s local_30;
|
||||
func_ov000_02062e44(&local_44, &this->mUnk_1388);
|
||||
local_30.x = local_44.x + data_ov019_020d2170.mUnk_10.x;
|
||||
local_30.y = local_44.y + data_ov019_020d2170.mUnk_10.y;
|
||||
this->mUnk_1420.func_ov000_0206415c(&local_30, 0, 0x0C, 0);
|
||||
|
||||
Vec2s_cpp local_4c;
|
||||
Vec2s_cpp local_2c;
|
||||
Vec2s local_4c;
|
||||
Vec2s local_2c;
|
||||
func_ov000_02062e44(&local_4c, &this->mUnk_16AC);
|
||||
local_2c.x = local_4c.x + data_ov019_020d2170.mUnk_08.x;
|
||||
local_2c.y = local_4c.y + data_ov019_020d2170.mUnk_08.y;
|
||||
this->mUnk_1744.func_ov000_0206415c(&local_2c, 0, 0x0C, 0);
|
||||
|
||||
Vec2s_cpp local_54;
|
||||
Vec2s_cpp local_38;
|
||||
Vec2s local_54;
|
||||
Vec2s local_38;
|
||||
func_ov000_02062e44(&local_54, &this->mUnk_19D0);
|
||||
local_38.x = local_54.x + data_ov019_020d2170.mUnk_00.x;
|
||||
local_38.y = local_54.y + data_ov019_020d2170.mUnk_00.y;
|
||||
@@ -441,17 +441,18 @@ ARM void FileSelectOptions::func_ov019_020cd5f8() {
|
||||
}
|
||||
|
||||
ARM void FileSelectOptions::func_ov019_020cd614() {
|
||||
Vec2us_cpp local_34;
|
||||
Vec2s_cpp local_38;
|
||||
Vec2us_cpp local_3c;
|
||||
Vec2us_cpp local_40;
|
||||
Vec2us_cpp local_44;
|
||||
Vec2us local_34;
|
||||
Vec2s local_38;
|
||||
Vec2us local_3c;
|
||||
Vec2us local_40;
|
||||
Vec2us local_44;
|
||||
|
||||
UnkStruct_ov019_020d24c8_28_258 local_30(0x8C, 0);
|
||||
|
||||
local_38.x = local_30.mPos.x + UnkStruct_ov019_020d2170::data_ov019_020d215c.mUnk_00.x;
|
||||
local_38.y = local_30.mPos.y + UnkStruct_ov019_020d2170::data_ov019_020d215c.mUnk_00.y;
|
||||
local_3c = local_30.mPos;
|
||||
local_3c.x = local_30.mPos.x;
|
||||
local_3c.y = local_30.mPos.y;
|
||||
|
||||
this->mUnk_1064.func_0201e874(0x0C, &local_38, &local_3c, 0);
|
||||
this->mUnk_1064.mUnk_0A = true;
|
||||
@@ -606,7 +607,7 @@ ARM void FileSelectOptions::func_ov019_020cde9c() {
|
||||
|
||||
ARM UnkStruct_ov019_020d24c8_2C_24::UnkStruct_ov019_020d24c8_2C_24(GameModeManagerBase_104_0C *param1, s32 saveSlotIndex) :
|
||||
mSaveSlotIndex(saveSlotIndex),
|
||||
mUnk_004((Vec2s) {0, 0}),
|
||||
mUnk_004(0, 0),
|
||||
mUnk_008(0, 0),
|
||||
mUnk_020(0x8C, 1),
|
||||
mUnk_258(0x8C, 4),
|
||||
|
||||
@@ -9,10 +9,6 @@ void func_0200a7b0(unk32 param1, const char *param2, const char *param3, const c
|
||||
unk32 param7, unk32 param8);
|
||||
void func_020249d4(void *pReg, unk32 param1, unk32 param2, unk32 param3, unk32 param4);
|
||||
void func_020275e8();
|
||||
|
||||
//! TODO: conflict between UnkStructSub4, UnkStructSub4_2 and UnkStructSub19
|
||||
unk32 func_ov000_020609c4(void *thisx);
|
||||
unk32 func_ov000_02060af8(void *thisx);
|
||||
};
|
||||
|
||||
#pragma dont_reuse_strings off
|
||||
@@ -83,7 +79,7 @@ ARM FileSelectSubScreen::FileSelectSubScreen() :
|
||||
this->func_ov019_020cf73c(2, 1);
|
||||
}
|
||||
|
||||
ARM void FileSelectSubScreen::vfunc_08() {
|
||||
ARM void FileSelectSubScreen::vfunc_08(GameModePTMFParam2Struct *param1, TouchControl *pTouchControl) {
|
||||
this->mUnk_0024 = this->mUnk_0020;
|
||||
this->mUnk_0020 += 0x800;
|
||||
|
||||
@@ -171,7 +167,7 @@ ARM void FileSelectSubScreen::func_ov019_020cf73c(unk32 param1, unk32 param2) {
|
||||
}
|
||||
}
|
||||
|
||||
ARM void FileSelectSubScreen::vfunc_10() {
|
||||
ARM void FileSelectSubScreen::vfunc_10(unk8 *param1) {
|
||||
this->mUnk_002C.vfunc_04();
|
||||
}
|
||||
|
||||
@@ -182,11 +178,11 @@ ARM void FileSelect_UnkClass7::vfunc_00() {
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 0x1E; i++) {
|
||||
UnkStructSub4 *pVar6 = &this->mUnk_0004[i];
|
||||
UnkSubStruct19 *pVar6 = &this->mUnk_0004[i];
|
||||
|
||||
func_ov000_020609c4(pVar6);
|
||||
pVar6->func_ov000_020609c4();
|
||||
|
||||
if (func_ov000_02060af8(pVar6) != 0) {
|
||||
if (pVar6->func_ov000_02060af8() != 0) {
|
||||
pVar6->func_ov000_02060b64();
|
||||
this->mUnk_0E14[i].one = (u16) gRandom.Next(0, 256);
|
||||
this->mUnk_0E14[i].two = (u16) gRandom.Next(0, 192);
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
#include "Game/GameModeTitleScreen.hpp"
|
||||
#include "TitleScreen/TitleScreen.hpp"
|
||||
#include "Unknown/UnkStruct_02049a2c.hpp"
|
||||
#include "Unknown/UnkStruct_0204a088.hpp"
|
||||
#include "Unknown/UnkStruct_0204a110.hpp"
|
||||
#include "Unknown/UnkStruct_027e09a4.hpp"
|
||||
|
||||
struct UnkStruct_ov000_020a782c {
|
||||
/* 00 */ unk32 mUnk_00;
|
||||
/* 04 */ u8 mUnk_04;
|
||||
/* 05 */ u8 mUnk_05;
|
||||
/* 06 */ u8 mUnk_06;
|
||||
/* 07 */ u8 mUnk_07;
|
||||
};
|
||||
|
||||
extern "C" {
|
||||
void func_0201659c();
|
||||
void func_0200e234();
|
||||
void func_ov001_020b6520(unk32 param1);
|
||||
UnkStruct_ov000_020a782c *func_ov000_020a782c(unk32 param1);
|
||||
}
|
||||
|
||||
ARM GameModeTitleScreen::GameModeTitleScreen() {
|
||||
func_0201659c();
|
||||
data_02049a2c.func_02013370(2);
|
||||
data_0204a110.func_ov001_020bd514(0, TitleScreenManager::Create, 0, 1);
|
||||
func_ov001_020b6520(2);
|
||||
}
|
||||
|
||||
ARM GameModeTitleScreen::~GameModeTitleScreen() {
|
||||
UnkStruct_027e09a4::func_ov025_020c4a60();
|
||||
func_0200e234();
|
||||
}
|
||||
|
||||
struct stack_struct {
|
||||
/* 00 */ unk32 mUnk_00;
|
||||
/* 04 */ unk32 mUnk_04;
|
||||
/* 08 */ unk16 mUnk_08;
|
||||
/* 0A */ unk8 mUnk_0A;
|
||||
/* 0B */ unk8 mUnk_0B;
|
||||
/* 0C */ unk8 mUnk_0C;
|
||||
/* 0D */ unk8 mUnk_0D;
|
||||
/* 0E */ unk8 mUnk_0E;
|
||||
/* 0F */ unk8 mmUnk_0F;
|
||||
/* 10 */ unk8 mUnk_10;
|
||||
/* 11 */ unk8 mUnk_11;
|
||||
/* 12 */ unk8 mUnk_12;
|
||||
/* 13 */ unk8 mUnk_13;
|
||||
/* 14 */
|
||||
};
|
||||
|
||||
ARM void GameModeTitleScreen::vfunc_08(unk32 param1, unk32 param2, unk32 param3) {
|
||||
this->GameModeBase::vfunc_08(param1, param2, param3);
|
||||
|
||||
UnkStruct_ov000_020a782c *iVar1 = func_ov000_020a782c(0);
|
||||
u8 mUnk_04 = iVar1->mUnk_04;
|
||||
u8 mUnk_07 = iVar1->mUnk_07;
|
||||
u8 mUnk_06 = iVar1->mUnk_06;
|
||||
u8 mUnk_05 = iVar1->mUnk_05;
|
||||
|
||||
stack_struct stack;
|
||||
stack.mUnk_00 = mUnk_04;
|
||||
stack.mUnk_04 = 0;
|
||||
stack.mUnk_08 = 0;
|
||||
stack.mUnk_0A = mUnk_05;
|
||||
stack.mUnk_0B = mUnk_06;
|
||||
stack.mUnk_0C = 1;
|
||||
stack.mUnk_0D = 0;
|
||||
stack.mUnk_0E = mUnk_07;
|
||||
stack.mmUnk_0F = 0;
|
||||
stack.mUnk_10 = 0;
|
||||
|
||||
data_027e09a4->func_ov000_020707a8(&stack);
|
||||
}
|
||||
|
||||
ARM void GameModeTitleScreen::vfunc_0C() {
|
||||
data_027e09a4->func_ov000_0207087c(data_0204a110.mUnk_DF8);
|
||||
}
|
||||
|
||||
ARM void GameModeTitleScreen::vfunc_10() {
|
||||
data_027e09a4->func_ov000_020708d8(data_0204a110.mUnk_DF8);
|
||||
}
|
||||
|
||||
ARM void GameModeTitleScreen::vfunc_14() {
|
||||
data_027e09a4->func_ov000_02070834(&data_0204a110.mUnk_DF2);
|
||||
}
|
||||
|
||||
ARM void GameModeTitleScreen::vfunc_18() {
|
||||
data_027e09a4->func_ov000_02070938(data_0204a110.mUnk_DF8);
|
||||
}
|
||||
|
||||
ARM void GameModeTitleScreen::vfunc_1C() {
|
||||
data_027e09a4->func_ov000_02070a4c(data_0204a110.mUnk_DF8);
|
||||
}
|
||||
|
||||
ARM void GameModeTitleScreen::vfunc_20() {
|
||||
UnkStruct_027e09a4 *ptr4 = data_027e09a4;
|
||||
void *ptr = &data_0204a110.mUnk_DF2;
|
||||
|
||||
if ((data_0204a088->mUnk_120 & 1) != 0) {
|
||||
ptr4->func_ov017_020bb994(ptr);
|
||||
}
|
||||
}
|
||||
|
||||
ARM void UnkStruct_027e09a4::func_ov025_020c4a60() {
|
||||
delete data_027e09a4;
|
||||
}
|
||||
@@ -0,0 +1,397 @@
|
||||
#include "TitleScreen/TitleScreen.hpp"
|
||||
#include "Unknown/UnkStruct_02049be0.hpp"
|
||||
#include "Unknown/UnkStruct_0204a060.hpp"
|
||||
#include "Unknown/UnkStruct_0204aeac.hpp"
|
||||
#include "Unknown/UnkStruct_0204af1c.hpp"
|
||||
#include "Unknown/UnkStruct_027e0954.hpp"
|
||||
#include "Unknown/UnkStruct_ov000_020b5214.hpp"
|
||||
#include "nitro/button.h"
|
||||
#include "regs.h"
|
||||
#include "versions.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#pragma dont_reuse_strings off
|
||||
|
||||
extern "C" {
|
||||
void func_02018424();
|
||||
void func_ov000_0205be34(void *param1, unk32 param2);
|
||||
void func_ov000_0205bedc(void *param1, void *param2, void *param3, void *param4, unk32 param5, int);
|
||||
}
|
||||
|
||||
static TitleScreenPTMF<TitleScreen> data_ov025_020c5aec[TitleScreenState_Max] = {
|
||||
TitleScreen::func_ov025_020c5200, // TitleScreenState_None
|
||||
TitleScreen::func_ov025_020c5204, // TitleScreenState_IdleBeforeUI
|
||||
TitleScreen::func_ov025_020c5240, // TitleScreenState_DrawUIOnInput
|
||||
TitleScreen::func_ov025_020c53d0, // TitleScreenState_DrawUIOnCsCmd
|
||||
TitleScreen::func_ov025_020c55a4, // TitleScreenState_IdleBeforeFileSelect
|
||||
TitleScreen::func_ov025_020c55e4, // TitleScreenState_ToFileSelect
|
||||
};
|
||||
|
||||
#if IS_JP
|
||||
static const Vec2s data_ov025_020c5ae4(0x0000, 0x0000);
|
||||
static const Vec2s data_ov025_020c5ae8(0x0000, 0x0000);
|
||||
static const Vec2us data_ov025_020c5ae0(0x0100, 0x0080);
|
||||
static const Vec2s data_ov025_020c7398(0x0100, 0x0080);
|
||||
static const Vec2s data_ov025_020c7394(0x0000, 0x0094);
|
||||
static const Vec2s data_ov025_020c738e(0x0100, 0x0020);
|
||||
static const Vec2s data_ov025_020c738c(0x0100, 0x0020);
|
||||
#else
|
||||
static const Vec2s data_ov025_020c5ae4(0x0000, 0x0020);
|
||||
static const Vec2s data_ov025_020c5ae8(0x0100, 0x0080);
|
||||
static const Vec2us data_ov025_020c5ae0(0x0100, 0x0080);
|
||||
#endif
|
||||
|
||||
struct UnkStruct_StackTitleScreen {
|
||||
/* 00 */ unk32 pad[5];
|
||||
/* 14 */
|
||||
|
||||
UnkStruct_StackTitleScreen(const char *path, unk32 param1);
|
||||
void func_ov000_02059270(unk32 param1, char *param2, unk32 param3);
|
||||
void func_ov000_02059240();
|
||||
};
|
||||
|
||||
TitleScreen::TitleScreen() :
|
||||
mState(TitleScreenState_None),
|
||||
mShowUI(false),
|
||||
mUnk_021(false) {
|
||||
this->mUnk_18 = 1;
|
||||
this->mUnk_19 = 1;
|
||||
this->mUnk_1A = 1;
|
||||
|
||||
wchar_t acStack_54[32];
|
||||
char *pcVar1 = data_02049be0.func_02014ff4();
|
||||
acStack_54[ARRAY_LEN(acStack_54) - 1] = '\0';
|
||||
strncpy((char *) acStack_54, pcVar1, sizeof(acStack_54) - 1);
|
||||
|
||||
char *path = "/Screen/tex2d.bin";
|
||||
size_t len = strlen((char *) acStack_54);
|
||||
strncpy((char *) acStack_54 + len, path, sizeof(acStack_54) - len - 1);
|
||||
|
||||
UnkStruct_StackTitleScreen auStack_68((char *) acStack_54, 1);
|
||||
auStack_68.func_ov000_02059270(0x3E, "title", 0x32500000);
|
||||
auStack_68.func_ov000_02059240();
|
||||
|
||||
data_0204aeac.func_0201c494(3);
|
||||
this->mUnk_218.func_0201effc(0x0F, 1, 0x1F);
|
||||
}
|
||||
|
||||
TitleScreen::~TitleScreen() {
|
||||
data_ov000_020b5214.func_ov000_0206d83c(0x1E);
|
||||
this->func_ov025_020c5964();
|
||||
}
|
||||
|
||||
void TitleScreen::func_ov025_020c4e54() {
|
||||
this->mShowUI = true;
|
||||
this->func_ov025_020c4ea0(TitleScreenState_DrawUIOnInput);
|
||||
}
|
||||
|
||||
void TitleScreen::func_ov025_020c4e6c() {
|
||||
if (!this->mShowUI) {
|
||||
this->mShowUI = true;
|
||||
this->func_ov025_020c4ea0(TitleScreenState_DrawUIOnCsCmd);
|
||||
}
|
||||
}
|
||||
|
||||
void TitleScreen::func_ov025_020c4e90() {
|
||||
this->func_ov025_020c4ea0(TitleScreenState_IdleBeforeUI);
|
||||
}
|
||||
|
||||
void TitleScreen::func_ov025_020c4ea0(TitleScreenState state) {
|
||||
this->mState = state;
|
||||
|
||||
switch (this->mState) {
|
||||
case TitleScreenState_None:
|
||||
break;
|
||||
case TitleScreenState_IdleBeforeUI:
|
||||
break;
|
||||
case TitleScreenState_DrawUIOnCsCmd:
|
||||
this->mUnk_344 = 0;
|
||||
this->mUnk_218.func_0201effc(0x1E, 1, 0x1F);
|
||||
|
||||
this->mUnk_218.mUnk_0A = true;
|
||||
this->mUnk_218.mUnk_0B = false;
|
||||
this->mUnk_218.mUnk_0C = false;
|
||||
if (this->mUnk_218.mUnk_04 == this->mUnk_218.mUnk_06) {
|
||||
this->mUnk_218.mUnk_0A = false;
|
||||
this->mUnk_218.mUnk_0C = true;
|
||||
}
|
||||
|
||||
this->mUnk_204.mUnk_10 = true;
|
||||
this->mUnk_23C.UnknownAction(0x59, 2);
|
||||
|
||||
this->mUnk_254.func_ov000_0206082c(0x59, 2);
|
||||
this->mUnk_2CC.func_ov000_0206082c(0x59, 0);
|
||||
this->mUnk_024.func_ov000_0206082c(0x58, 1);
|
||||
this->mUnk_09C.func_ov000_0206082c(0x58, 3);
|
||||
this->mUnk_114.func_ov000_0206082c(0x58, 5);
|
||||
this->mUnk_18C.func_ov000_0206082c(0x58, 7);
|
||||
|
||||
this->mUnk_254.mUnk_6E = false;
|
||||
this->mUnk_2CC.mUnk_6E = false;
|
||||
this->mUnk_024.mUnk_6E = false;
|
||||
this->mUnk_09C.mUnk_6E = false;
|
||||
this->mUnk_114.mUnk_6E = false;
|
||||
this->mUnk_18C.mUnk_6E = false;
|
||||
break;
|
||||
case TitleScreenState_DrawUIOnInput:
|
||||
this->mUnk_218.func_0201effc(0x0F, 1, 0x1F);
|
||||
|
||||
this->mUnk_218.mUnk_0A = true;
|
||||
this->mUnk_218.mUnk_0B = false;
|
||||
this->mUnk_218.mUnk_0C = false;
|
||||
if (this->mUnk_218.mUnk_04 == this->mUnk_218.mUnk_06) {
|
||||
this->mUnk_218.mUnk_0A = false;
|
||||
this->mUnk_218.mUnk_0C = true;
|
||||
}
|
||||
|
||||
this->mUnk_204.mUnk_10 = true;
|
||||
this->mUnk_23C.UnknownAction(0x59, 2);
|
||||
|
||||
this->mUnk_254.func_ov000_0206082c(0x59, 2);
|
||||
this->mUnk_2CC.func_ov000_0206082c(0x59, 0);
|
||||
this->mUnk_024.func_ov000_0206082c(0x58, 1);
|
||||
this->mUnk_09C.func_ov000_0206082c(0x58, 3);
|
||||
this->mUnk_114.func_ov000_0206082c(0x58, 5);
|
||||
this->mUnk_18C.func_ov000_0206082c(0x58, 7);
|
||||
break;
|
||||
case TitleScreenState_IdleBeforeFileSelect:
|
||||
this->mUnk_024.func_ov000_0206082c(0x58, 0);
|
||||
break;
|
||||
case TitleScreenState_ToFileSelect:
|
||||
this->mUnk_024.func_ov000_0206082c(0x58, 2);
|
||||
this->mUnk_09C.func_ov000_0206082c(0x58, 4);
|
||||
this->mUnk_114.func_ov000_0206082c(0x58, 6);
|
||||
this->mUnk_18C.func_ov000_0206082c(0x58, 8);
|
||||
data_ov000_020b5214.func_ov000_0206d83c(0x1E);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void TitleScreen::vfunc_08(GameModePTMFParam2Struct *param1, TouchControl *pTouchControl) {
|
||||
if (this->mShowUI) {
|
||||
this->mUnk_024.func_ov000_020609c4();
|
||||
this->mUnk_09C.func_ov000_020609c4();
|
||||
this->mUnk_114.func_ov000_020609c4();
|
||||
this->mUnk_18C.func_ov000_020609c4();
|
||||
this->mUnk_254.func_ov000_020609c4();
|
||||
this->mUnk_2CC.func_ov000_020609c4();
|
||||
}
|
||||
|
||||
CALL_PTMF(TitleScreenPTMF<TitleScreen>, data_ov025_020c5aec[this->mState], param1, pTouchControl);
|
||||
data_0204aeac.func_0201c4d8(0, 0x0B, 8);
|
||||
data_0204aeac.func_0201c504(1, 10, 0x10, 8);
|
||||
}
|
||||
|
||||
void TitleScreen::func_ov025_020c5200(GameModePTMFParam2Struct *param1, TouchControl *pTouchControl) {}
|
||||
|
||||
// https://decomp.me/scratch/6nDGM
|
||||
void TitleScreen::func_ov025_020c5204(GameModePTMFParam2Struct *param1, TouchControl *pTouchControl) {
|
||||
if (pTouchControl->mFlags & 1) {
|
||||
this->mUnk_021 = 1U;
|
||||
}
|
||||
if ((pTouchControl->mFlags & 2) && (this->mUnk_021 != 0)) {
|
||||
goto test;
|
||||
}
|
||||
if (!(param1->mButtons & 8)) {
|
||||
return;
|
||||
}
|
||||
test:
|
||||
func_ov025_020c4e54();
|
||||
}
|
||||
|
||||
void TitleScreen::func_ov025_020c5240(GameModePTMFParam2Struct *param1, TouchControl *pTouchControl) {
|
||||
this->mUnk_218.UnkOperations();
|
||||
this->mUnk_204.mUnk_10 = this->mUnk_218.func_0201f04c();
|
||||
|
||||
if (this->mUnk_024.func_ov000_02060af8() == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this->mUnk_09C.func_ov000_02060af8() == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this->mUnk_114.func_ov000_02060af8() == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this->mUnk_18C.func_ov000_02060af8() == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
this->func_ov025_020c4ea0(TitleScreenState_IdleBeforeFileSelect);
|
||||
}
|
||||
|
||||
void TitleScreen::func_ov025_020c53d0(GameModePTMFParam2Struct *param1, TouchControl *pTouchControl) {
|
||||
this->mUnk_344++;
|
||||
|
||||
if (this->mUnk_344 == 15) {
|
||||
// do subscreen animations (logo)
|
||||
this->mUnk_254.mUnk_6E = true;
|
||||
this->mUnk_2CC.mUnk_6E = true;
|
||||
} else if (this->mUnk_344 == 60) {
|
||||
// do main screen animations (feather, strings and bg)
|
||||
this->mUnk_024.mUnk_6E = true;
|
||||
this->mUnk_09C.mUnk_6E = true;
|
||||
this->mUnk_114.mUnk_6E = true;
|
||||
this->mUnk_18C.mUnk_6E = true;
|
||||
}
|
||||
|
||||
this->mUnk_218.UnkOperations();
|
||||
this->mUnk_204.mUnk_10 = this->mUnk_218.func_0201f04c();
|
||||
|
||||
if (this->mUnk_218.mUnk_0C) {
|
||||
if (this->mUnk_024.func_ov000_02060af8() == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this->mUnk_09C.func_ov000_02060af8() == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this->mUnk_114.func_ov000_02060af8() == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this->mUnk_18C.func_ov000_02060af8() == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
this->func_ov025_020c4ea0(TitleScreenState_IdleBeforeFileSelect);
|
||||
}
|
||||
}
|
||||
|
||||
void TitleScreen::func_ov025_020c55a4(GameModePTMFParam2Struct *param1, TouchControl *pTouchControl) {
|
||||
if (CHECK_TOUCH_FLAGS(pTouchControl, TouchFlag_UntouchedNow) || CHECK_BUTTON_COMBO(param1->mButtons, BTN_START)) {
|
||||
data_ov000_020b5214.func_ov000_0206db44(0x0B);
|
||||
this->func_ov025_020c4ea0(TitleScreenState_ToFileSelect);
|
||||
}
|
||||
}
|
||||
|
||||
void TitleScreen::func_ov025_020c55e4(GameModePTMFParam2Struct *param1, TouchControl *pTouchControl) {
|
||||
if (this->mUnk_024.func_ov000_02060af8() == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this->mUnk_09C.func_ov000_02060af8() == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this->mUnk_114.func_ov000_02060af8() == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this->mUnk_18C.func_ov000_02060af8() == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
data_0204a060.func_020183d4(true, func_02018424, 1);
|
||||
}
|
||||
|
||||
void TitleScreen::vfunc_14(unk8 *param1) {
|
||||
if (param1[1] == 0) {
|
||||
this->func_ov025_020c592c();
|
||||
data_0204aeac.func_0201c494(3);
|
||||
}
|
||||
|
||||
if (param1[0] == 0) {
|
||||
this->func_ov025_020c5964();
|
||||
data_0204aeac.func_0201c494(0);
|
||||
}
|
||||
}
|
||||
|
||||
void TitleScreen::vfunc_10(unk8 *param1) {
|
||||
if (this->mShowUI) {
|
||||
if (param1[0] == 0 && this->mUnk_09C.mUnk_6E) {
|
||||
UnkStruct_ov019_020d24c8_28_258 uStack_3c(0x58, 0x00);
|
||||
data_0204af1c.func_0201aad0(&this->mUnk_09C, &uStack_3c.mPos, 0, 0);
|
||||
|
||||
UnkStruct_ov019_020d24c8_28_258 uStack_54(0x58, 0x01);
|
||||
data_0204af1c.func_0201aad0(&this->mUnk_024, &uStack_54.mPos, 0, 0);
|
||||
|
||||
UnkStruct_ov019_020d24c8_28_258 uStack_6c(0x58, 0x02);
|
||||
data_0204af1c.func_0201aad0(&this->mUnk_18C, &uStack_6c.mPos, 0, 0);
|
||||
|
||||
UnkStruct_ov019_020d24c8_28_258 uStack_84(0x58, 0x03);
|
||||
data_0204af1c.func_0201aad0(&this->mUnk_114, &uStack_84.mPos, 0, 0);
|
||||
}
|
||||
|
||||
if (param1[1] == 0 && this->mUnk_254.mUnk_6E) {
|
||||
#if IS_JP
|
||||
Vec2us pos1;
|
||||
pos1.x = this->mUnk_23C.mPos.x + data_ov025_020c5ae4.x;
|
||||
pos1.y = this->mUnk_23C.mPos.y + data_ov025_020c5ae4.y;
|
||||
data_0204af1c.func_0201aa44(&this->mUnk_23C, &pos1, 0, 0);
|
||||
|
||||
UnkStruct_ov019_020d24c8_28_258 uStack_9c(0x59, 0x01);
|
||||
Vec2us pos2;
|
||||
pos2.x = uStack_9c.mPos.x + data_ov025_020c5ae4.x;
|
||||
pos2.y = uStack_9c.mPos.y + data_ov025_020c5ae4.y;
|
||||
data_0204af1c.func_0201aad0(&this->mUnk_254, &pos2, 0, 0);
|
||||
|
||||
UnkStruct_ov019_020d24c8_28_258 uStack_b4(0x59, 0x00);
|
||||
Vec2us pos3;
|
||||
pos3.x = uStack_b4.mPos.x + data_ov025_020c5ae4.x;
|
||||
pos3.y = uStack_b4.mPos.y + data_ov025_020c5ae4.y;
|
||||
data_0204af1c.func_0201aad0(&this->mUnk_2CC, &pos3, 0, 0);
|
||||
#else
|
||||
data_0204af1c.func_0201aa44(&this->mUnk_23C, &this->mUnk_23C.mPos, 0, 0);
|
||||
|
||||
UnkStruct_ov019_020d24c8_28_258 uStack_9c(0x59, 0x01);
|
||||
data_0204af1c.func_0201aad0(&this->mUnk_254, &uStack_9c.mPos, 0, 0);
|
||||
|
||||
UnkStruct_ov019_020d24c8_28_258 uStack_b4(0x59, 0x00);
|
||||
data_0204af1c.func_0201aad0(&this->mUnk_2CC, &uStack_b4.mPos, 0, 0);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//! TODO: fake match?
|
||||
void TitleScreen::vfunc_0C(unk32 param1) {
|
||||
if (param1 == 1 && this->mShowUI) {
|
||||
UnkStruct_027e0954 *ptr = data_027e0954;
|
||||
void *iVar1 = &this->mUnk_204;
|
||||
|
||||
if (iVar1 != NULL) {
|
||||
iVar1 = (u32 *) iVar1 + 1;
|
||||
}
|
||||
|
||||
ptr->mUnk_14.func_020166f4(iVar1);
|
||||
}
|
||||
}
|
||||
|
||||
void TitleScreen::func_ov025_020c592c() {
|
||||
REG_DISPCNT &= ~0xE000;
|
||||
REG_DISPCNT |= 0x8000;
|
||||
|
||||
REG_WINOUT = (REG_WINOUT & ~0x3F00) | 0x1900;
|
||||
REG_WINOUT = (REG_WINOUT & ~0x3F) | 0x09;
|
||||
}
|
||||
|
||||
void TitleScreen::func_ov025_020c5964() {
|
||||
REG_DISPCNT &= ~0xE000;
|
||||
REG_WINOUT = (REG_WINOUT & ~0x3F) | 0x30;
|
||||
}
|
||||
|
||||
struct stack_struct {
|
||||
unk16 a;
|
||||
bool mUnk_02;
|
||||
};
|
||||
|
||||
void TitleScreen_Sub2::vfunc_00() {
|
||||
stack_struct sp14;
|
||||
Vec2s sp10;
|
||||
Vec2s spC;
|
||||
Vec2us sp8;
|
||||
|
||||
func_ov000_0205be34(&sp14, 0x3E);
|
||||
sp14.mUnk_02 = this->mUnk_10;
|
||||
sp8 = data_ov025_020c5ae0;
|
||||
spC = data_ov025_020c5ae8;
|
||||
sp10 = data_ov025_020c5ae4;
|
||||
func_ov000_0205bedc(&sp14, &sp10, &spC, &sp8, 0, 0);
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
#include "TitleScreen/TitleScreen.hpp"
|
||||
#include "regs.h"
|
||||
|
||||
const unk16 data_ov025_020c5a0c[] = {0x0016, 0x003C};
|
||||
|
||||
extern "C" {
|
||||
void GX_SetGraphicsMode(unk32 param1, unk32 param2, unk32 param3);
|
||||
void GXS_SetGraphicsMode(unk32 param1);
|
||||
}
|
||||
|
||||
ARM TitleScreenManager *TitleScreenManager::Create(unk32 param1) {
|
||||
return new(HeapIndex_1) TitleScreenManager(param1);
|
||||
}
|
||||
|
||||
ARM void TitleScreenManager::vfunc_14() {
|
||||
this->mUnk_004.func_ov001_020bd734((unk32 *) data_ov025_020c5a0c);
|
||||
this->mUnk_004.func_0201c00c(0x24, 1);
|
||||
|
||||
TitleScreen *pTitleScreen = new(HeapIndex_1) TitleScreen();
|
||||
void *pUVar2 = pTitleScreen;
|
||||
if (pTitleScreen != NULL) {
|
||||
pUVar2 = &pTitleScreen->mUnk_04;
|
||||
}
|
||||
this->mpTitleScreen = pTitleScreen;
|
||||
|
||||
this->mUnk_104.mUnk_04.func_020166cc(pUVar2);
|
||||
pTitleScreen->vfunc_18();
|
||||
}
|
||||
|
||||
ARM void TitleScreenManager::vfunc_18() {
|
||||
this->mUnk_004.func_ov001_020bd784();
|
||||
|
||||
delete this->mpTitleScreen;
|
||||
this->mpTitleScreen = NULL;
|
||||
}
|
||||
|
||||
ARM void TitleScreenManager::vfunc_24() {
|
||||
this->GameModeManagerBase::vfunc_24();
|
||||
this->func_0201875c();
|
||||
this->func_02018908();
|
||||
}
|
||||
|
||||
ARM void TitleScreenManager::vfunc_28(unk32 param1) {
|
||||
this->GameModeManagerBase::vfunc_28(param1);
|
||||
this->func_02018a14(param1);
|
||||
}
|
||||
|
||||
ARM void TitleScreenManager::vfunc_2C(unk32 param1) {
|
||||
this->func_02018984(param1);
|
||||
this->func_02018830(param1);
|
||||
}
|
||||
|
||||
ARM void TitleScreenManager::vfunc_38() {}
|
||||
|
||||
ARM void TitleScreenManager::func_ov025_020c4c20() {
|
||||
this->mpTitleScreen->func_ov025_020c4e6c();
|
||||
}
|
||||
|
||||
ARM void TitleScreenManager::func_ov025_020c4c30() {
|
||||
this->mpTitleScreen->func_ov025_020c4e90();
|
||||
}
|
||||
|
||||
TitleScreenManager::~TitleScreenManager() {}
|
||||
Reference in New Issue
Block a user