Decompile overlay 1 (Part 7) (#106)

* run ninja format

* delink what's left from overlay 1 (except dsprotect)

* fix regressions

* UnkStruct_027e0ce0_1C_001 97%

* UnkStruct_0204a110_001 OK

* UnkStruct_ov024_020d86a0_001 OK

* UnkStruct_ov000_020b50c0_001 OK

* GameModeCreate OK

* AdventureModeManager_001 OK

* GameModeAdventure_001 OK

* AdventureModeManager_001 OKn't because weak issues

* ZeldaCollisionBinary OK

* UnkStruct_027e09c0_001 OK

* UnkStruct_ov000_020b504c_001 OK

* UnkStruct_ov000_02067bc4.hpp -> UnkStruct_ov000_020b504c.hpp

* match overlay 97

* match overlay 100

* run ninja format
This commit is contained in:
Yanis
2026-07-13 18:41:32 +02:00
committed by GitHub
parent 4daa8d8e86
commit 8d759ee331
138 changed files with 3528 additions and 1057 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
#include "Unknown/UnkStruct_ov000_02067bc4.hpp"
#include "Unknown/UnkStruct_ov000_020b504c.hpp"
#include "Unknown/UnkSystem1.hpp"
UnkSystem1_ov000_Base::UnkSystem1_ov000_Base(unk32 param1) {
+3 -3
View File
@@ -1,7 +1,7 @@
#include "Unknown/UnkStruct_ov000_02067bc4.hpp"
#include "Unknown/UnkStruct_ov000_020b504c.hpp"
#include "Unknown/UnkSystem1.hpp"
UnkSystem1_ov000_Derived1::UnkSystem1_ov000_Derived1(unk32 param1, UnkStruct_ov000_02067bc4::UnkStruct1 *param2) :
UnkSystem1_ov000_Derived1::UnkSystem1_ov000_Derived1(unk32 param1, UnkTextStruct1 *param2) :
UnkSystem1_ov000_Base(-1) {
this->mUnk_0C = param2;
this->mUnk_10 = param1;
@@ -27,7 +27,7 @@ void UnkSystem1_ov000_Derived1::vfunc_08(unk32 param1) {
if (this->mUnk_0C != 0) {
this->mUnk_06 = data_ov000_020b504c.func_ov000_02067cf8(param1, this->mUnk_10, this->mUnk_0C);
} else {
UnkStruct_ov000_02067bc4::UnkStruct1 local_18(-1);
UnkTextStruct1 local_18(-1);
this->mUnk_06 = data_ov000_020b504c.func_ov000_02067cf8(param1, this->mUnk_10, &local_18);
}
}
@@ -15,19 +15,16 @@
#include <dsprot.h>
extern "C" {
void *func_ov024_020d1658();
void *func_ov000_02066294();
}
extern "C" void *func_ov000_02066294();
extern int data_ov001_020c27a8;
extern int data_ov001_020c276c;
extern s16 data_ov001_020c27a8;
extern s16 data_ov001_020c276c;
AdventureModeManager *AdventureModeManager::Create(unk32 param1) {
GameModeManagerBase *AdventureModeManager::Create(UnkStruct_0204a110_Sub2 *param1) {
return new(HeapIndex_1) AdventureModeManager(param1);
}
AdventureModeManager::AdventureModeManager(unk32 param1) {
AdventureModeManager::AdventureModeManager(UnkStruct_0204a110_Sub2 *param1) {
this->mUnk_154 = 0;
this->mUnk_158 = &this->mUnk_104;
this->mUnk_15C = new(HeapIndex_1) AdventureModeManager_15C();
@@ -59,7 +56,7 @@ AdventureModeManager::AdventureModeManager(unk32 param1) {
this->mAllowMapPaint = false;
UnkStruct_027e0998::Create();
func_ov024_020d1658();
UnkStruct_ov024_020d86a0::Create();
this->mUnk_170 = new(HeapIndex_1) AdventureModeManager_170(&this->mUnk_104);
@@ -2,14 +2,9 @@
#include "Game/GameModeAdventure.hpp"
#include "MainGame/AdventureMode.hpp"
#include "Unknown/UnkStruct_0204a110.hpp"
#include "Unknown/UnkStruct_ov024_020d8660.hpp"
extern "C" {
void func_ov020_020c4ac0(void *);
void func_0201659c();
}
extern int data_ov001_020c27a8;
extern int data_ov001_020c276c;
extern "C" void func_0201659c();
GameModeAdventure::GameModeAdventure() {
func_0201659c();
@@ -17,5 +12,6 @@ GameModeAdventure::GameModeAdventure() {
data_0204a110.func_ov001_020bd514(0, AdventureModeManager::Create, 0, 1);
gSaveManager.func_ov001_020ba670();
gSaveManager.func_ov001_020ba7a8();
func_ov020_020c4ac0(UnkStruct_027e09a4::Create(0));
UnkStruct_027e09a4::Create(0);
UnkStruct_ov024_020d8660::func_ov024_020c4ac0();
}
+78
View File
@@ -0,0 +1,78 @@
#include "Game/Game.hpp"
#include "Game/GameModeAdventure.hpp"
#include "Game/GameModeBattle.hpp"
#include "Game/GameModeContactMode.hpp"
#include "Game/GameModeDownloadPlay.hpp"
#include "Game/GameModeTitleScreen.hpp"
#include "Save/SaveFile.hpp"
#include "System/OverlayManager.hpp"
#include "Unknown/UnkStruct_ov000_020b4eec.hpp"
#include "versions.h"
#include <nitro/mi.h>
// different function order
#if IS_JP
GameModeBase *GameModeTitleScreen::Create() {
data_02049ba0.func_020148d0(OverlayIndex_Title);
SaveSlot::func_ov000_020a1028(&gGame.mpSaveSlot->mInfoData);
SaveTreasureData *pTreasureData = &gGame.mpSaveSlot->mTreasureData;
MI_CpuClearFast(pTreasureData, sizeof(SaveTreasureData));
for (int i = 0; i < ARRAY_LEN(pTreasureData->unk_3C); i++) {
pTreasureData->unk_3C[i] = TreasureType_None;
}
SaveSlot::func_ov000_020a10f4(&gGame.mpSaveSlot->mUnk_2600);
return new(HeapIndex_1) GameModeTitleScreen();
}
GameModeBase *GameModeAdventure::Create() {
data_02049ba0.func_020148d0(OverlayIndex_MainGame);
return new(HeapIndex_1) GameModeAdventure();
}
#else
GameModeBase *GameModeAdventure::Create() {
data_02049ba0.func_020148d0(OverlayIndex_MainGame);
return new(HeapIndex_1) GameModeAdventure();
}
GameModeBase *GameModeTitleScreen::Create() {
data_02049ba0.func_020148d0(OverlayIndex_Title);
SaveSlot::func_ov000_020a1028(&gGame.mpSaveSlot->mInfoData);
SaveTreasureData *pTreasureData = &gGame.mpSaveSlot->mTreasureData;
MI_CpuClearFast(pTreasureData, sizeof(SaveTreasureData));
for (int i = 0; i < ARRAY_LEN(pTreasureData->unk_3C); i++) {
pTreasureData->unk_3C[i] = TreasureType_None;
}
SaveSlot::func_ov000_020a10f4(&gGame.mpSaveSlot->mUnk_2600);
return new(HeapIndex_1) GameModeTitleScreen();
}
#endif
GameModeBase *GameModeContactMode::Create() {
data_02049ba0.func_020148d0(OverlayIndex_Wxc);
return GameModeContactMode::CreateInstance();
}
GameModeBase *GameModeDownloadPlay::Create() {
data_02049ba0.func_020148d0(OverlayIndex_Download);
return GameModeDownloadPlay::CreateInstance();
}
GameModeBase *GameModeBattle::Create() {
data_02049ba0.func_020148d0(OverlayIndex_BattleGame);
return new(HeapIndex_1) GameModeBattle(data_ov000_020b4eec.mUnk_00);
}
GameSaveSlot *UnkStruct_ov000_020b4eec::func_ov001_020be12c() {
return gGame.mpSaveSlot;
}
+2 -12
View File
@@ -6,6 +6,7 @@
#include "MapObject/MapObjectManager.hpp"
#include "System/OverlayManager.hpp"
#include "System/SysNew.hpp"
#include "Unknown/Common.hpp"
#include "Unknown/UnkStruct_0204a110.hpp"
#include "Unknown/UnkStruct_0204e5f8.hpp"
#include "Unknown/UnkStruct_027e0954.hpp"
@@ -22,7 +23,7 @@
#include "Unknown/UnkStruct_027e0ce0.hpp"
#include "Unknown/UnkStruct_027e0cec.hpp"
#include "Unknown/UnkStruct_027e0cf8.hpp"
#include "Unknown/UnkStruct_ov000_02067bc4.hpp"
#include "Unknown/UnkStruct_ov000_020b504c.hpp"
#include "Unknown/UnkStruct_ov000_020b50c0.hpp"
#include "versions.h"
@@ -36,17 +37,6 @@ extern "C" u16 func_ov026_02106564(void *);
extern const OverlayIndex data_ov000_020b21c4[];
extern const OverlayIndex data_ov000_020b21e0[];
struct UnkStruct_ov000_020aa88c {
/* 00 */ bool mUnk_00;
/* 01 */ bool mUnk_01;
/* 02 */ bool mUnk_02;
/* 03 */ bool mUnk_03;
/* 04 */ unk16 mUnk_04;
/* 06 */ u16 mUnk_06;
/* 08 */
};
extern UnkStruct_ov000_020aa88c data_ov000_020aa88c[];
static const SceneIndex_Halfs data_ov001_020c25c0[10] = {
SceneIndex_t_area1, SceneIndex_t_area0, SceneIndex_t_area0, SceneIndex_t_area0, SceneIndex_t_area0,
SceneIndex_t_area1, SceneIndex_t_area2, SceneIndex_t_area3, SceneIndex_t_area1, SceneIndex_t_area2,
@@ -0,0 +1,131 @@
#include "System/SysNew.hpp"
#include "Unknown/UnkStruct_0204a088.hpp"
#include "Unknown/UnkStruct_0204a110.hpp"
#include "Unknown/UnkStruct_027e09a4.hpp"
#include <nitro/gx.h>
extern "C" void func_02019a74();
extern "C" void func_02019b3c();
extern "C" void func_02019c4c();
void UnkStruct_0204a110::func_ov001_020bd514(unk32 param1, GameModeMgrCreateCallback createCallback, bool param3,
bool param4) {
this->func_02018c90(param1);
if (param1 == 4) {
this->mUnk_010.func_0201c890(0x12000, 0x12000, param3, param4, true);
} else if (param1 == 2) {
this->mUnk_010.func_0201c890(0x12000, 0x12000, param3, param4, true);
} else {
this->mUnk_010.func_0201c890(0x4800, 0x12000, param3, param4, true);
}
if (createCallback == NULL) {
createCallback = GameModeManagerBase::Create;
}
this->mpManager = createCallback(&this->mUnk_010);
GX_DispOn();
GXS_DispOn();
}
void UnkStruct_0204a110::func_ov001_020bd58c(void) {
this->mUnk_010.func_ov001_020bd7c0();
DELETE(this->mpManager);
}
void UnkStruct_0204a110::func_ov001_020bd5b0(void) {
GX_SetVisibleWindows(0);
GXS_SetVisibleWindows(0);
func_02019a74();
func_02019b3c();
func_02019c4c();
this->mUnk_DDC.func_0201de24();
this->mUnk_DC0.func_0201d628();
if (data_027e09a4 != NULL && data_027e09a4->IsTrain()) {
this->mUnk_D9C.func_0201c494(1);
} else {
this->mUnk_D9C.func_0201c494(0);
}
this->mUnk_E02 = 0;
this->mUnk_E04 = 0;
this->mpManager->vfunc_14();
}
void UnkStruct_0204a110::func_ov001_020bd638(void) {
if (this->mpManager != NULL) {
this->mpManager->vfunc_18();
this->mpManager->func_02018a8c();
}
this->mUnk_DDC.func_0201de24();
this->mUnk_DC0.func_0201d628();
this->mUnk_E02 = 0;
this->mUnk_E04 = 0;
}
void UnkStruct_0204a110::func_ov001_020bd678(void) {
this->mpManager->vfunc_1C();
}
void UnkStruct_0204a110::func_ov001_020bd68c(void) {
this->mpManager->vfunc_20();
this->mpManager->func_02018a8c();
}
UnkStruct_0204a088 *UnkStruct_0204a088::Create() {
return new(HeapIndex_1) UnkStruct_0204a088();
}
UnkStruct_0204a088::UnkStruct_0204a088() :
mUnk_120(0) {
this->func_ov001_020bd6f8();
}
void UnkStruct_0204a088::func_ov001_020bd6f8() {
this->mUnk_120 = -1;
this->mUnk_123 = false;
this->mUnk_124 = false;
this->mUnk_125 = false;
this->mUnk_126 = false;
this->mUnk_127 = false;
this->mUnk_128 = 0;
this->mUnk_00 = 0;
this->mUnk_04 = -1;
this->mUnk_08 = -1;
}
DECL_INSTANCE_CTOR(UnkStruct_0204a088, data_0204a088);
void GameModeManagerBase_004::func_ov001_020bd734(const s16 *param1) {
unk32 uVar3 = data_0204999c.func_02013014();
for (int i = 0; param1[i] != 0x3C; i++) {
this->mUnk_00[param1[i]] = new(HeapIndex_1) GameModeManagerBase_004_00(param1[i]);
}
data_0204999c.func_020130d4(uVar3);
}
void GameModeManagerBase_004::func_ov001_020bd784() {
unk32 uVar3 = data_0204999c.func_02013014();
for (u32 i = 0; i < 0x3C; i++) {
if (this->mUnk_00[i] != NULL) {
DELETE(this->mUnk_00[i]);
}
}
data_0204999c.func_020130d4(uVar3);
}
void UnkStruct_0204a110_Sub2::func_ov001_020bd7c0() {
this->mUnk_044[0] = 0;
this->mUnk_044[1] = 0;
}
+1 -1
View File
@@ -1,7 +1,7 @@
#include "System/SysNew.hpp"
#include "Unknown/UnkStruct_0204a088.hpp"
#include "Unknown/UnkStruct_027e09b8.hpp"
#include "Unknown/UnkStruct_ov000_02067bc4.hpp"
#include "Unknown/UnkStruct_ov000_020b504c.hpp"
#include <nitro/mi.h>
@@ -0,0 +1,99 @@
#include "System/SysNew.hpp"
#include "Unknown/UnkStruct_027e09a4.hpp"
#include "Unknown/UnkStruct_027e09c0.hpp"
#include "Unknown/UnkStruct_027e09e8.hpp"
#include "Unknown/UnkStruct_027e0a48.hpp"
#include "Unknown/UnkStruct_027e0b48.hpp"
#include <nitro/mi.h>
UnkStruct_027e09c0 *UnkStruct_027e09c0::Create() {
return new(HeapIndex_1) UnkStruct_027e09c0();
}
void UnkStruct_027e09c0::Destroy() {
UnkStruct_027e09c0::DestroyImpl();
}
UnkStruct_027e09c0::UnkStruct_027e09c0() :
mUnk_000(0),
mUnk_044(this->mUnk_004),
mUnk_048(NULL),
mUnk_04C(NULL),
mUnk_050(0),
mUnk_054(NULL),
mUnk_058(NULL),
mUnk_05C(0),
mUnk_760(NULL),
mUnk_764(NULL),
mUnk_768(0),
mUnk_76C(NULL),
mUnk_770(NULL),
mUnk_774(0) {
this->mUnk_048 = this->mUnk_060;
this->mUnk_04C = this->mUnk_060;
this->mUnk_050 = 0x20;
this->mUnk_054 = &this->mUnk_060[32];
this->mUnk_058 = &this->mUnk_060[32];
this->mUnk_05C = 0x20;
this->mUnk_760 = &this->mUnk_778;
this->mUnk_764 = &this->mUnk_778;
this->mUnk_768 = 0x20;
this->mUnk_76C = &this->mUnk_878;
this->mUnk_770 = &this->mUnk_878;
this->mUnk_774 = 0x20;
}
void UnkStruct_027e09c0::func_ov001_020be394() {
if (data_027e09a4->IsLand()) {
data_027e0a48.func_ov000_0207ef30();
} else {
data_027e0a48.func_ov000_0207f048();
}
data_027e0b48.func_ov001_020be474();
}
void UnkStruct_027e09c0::func_ov001_020be3c4() {
data_027e0b48.func_ov001_020be4e4();
data_027e0a48.func_ov000_0207f1f0();
}
void UnkStruct_027e09c0::func_ov001_020be3dc(UnkFileSystem3 *param1, UnkStruct_027e0cd8_0C_Base *param2) {
data_027e0a48.func_ov000_0207f280(param2);
data_027e09e8.func_ov000_0207ba84(param1, param2);
}
void UnkStruct_027e09c0::func_ov001_020be400() {
for (UnkStruct_027e09c0_04 **pIt = this->mUnk_004; pIt != this->mUnk_044; pIt++) {
if (*pIt != NULL) {
(*pIt)->func_ov000_0207f4d4();
}
}
this->mUnk_044 = this->mUnk_004;
this->mUnk_000 = 0;
data_027e0a48.func_ov000_0207f2d8();
data_027e09e8.func_ov000_0207baa0();
}
void UnkStruct_027e09c0::DestroyImpl() {
if (data_027e09c0 != NULL) {
delete data_027e09c0;
}
}
DECL_INSTANCE(UnkStruct_027e09c0, data_027e09c0);
void UnkStruct_027e0b48::func_ov001_020be474() {
bool isLand = data_027e09a4->IsLand();
this->mUnk_000.Init(0x74 * (isLand ? 4 : 8), 1);
MI_CpuClearFast(this->mUnk_008, sizeof(this->mUnk_008));
}
void UnkStruct_027e0b48::func_ov001_020be4e4() {
this->mUnk_000.Reset();
}
+1 -1
View File
@@ -12,7 +12,7 @@
#include "Unknown/UnkStruct_027e0cd8.hpp"
#include "Unknown/UnkStruct_027e0ce0.hpp"
#include "Unknown/UnkStruct_027e0cec.hpp"
#include "Unknown/UnkStruct_ov000_02067bc4.hpp"
#include "Unknown/UnkStruct_ov000_020b504c.hpp"
#include "Unknown/UnkStruct_ov000_020b50c0.hpp"
#include "Unknown/UnkStruct_ov024_020d8660.hpp"
#include "Unknown/UnkStruct_ov024_020d8694.hpp"
@@ -15,7 +15,7 @@
#include <printf.h>
#include <vector>
extern "C" BMDSectionModel *func_ov000_0205abcc(void *, void *, unk32, unk32, unk32);
extern "C" BMDSectionModel *func_ov000_0205abcc(void *, void *, unk32, unk32, void *);
extern "C" void func_ov089_02165c34(void *);
extern AABB data_027e0ca8;
extern AABB data_027e0cc0;
@@ -96,9 +96,9 @@ UnkStruct_027e0cd8_0C_Base::UnkStruct_027e0cd8_0C_Base(UnkStruct_027e0cd8 *param
VecFx32 sp18;
VecFx32 spC;
this->mUnk_0A0 = 0;
this->mUnk_0A4 = 0;
this->mUnk_0A8 = 0;
this->mUnk_0A0.x = 0;
this->mUnk_0A0.y = 0;
this->mUnk_0A0.z = 0;
fx32 y = (this->mUnk_11C << 14);
fx32 z = ((u32) (u16) this->mUnk_09C.y >> 1) << 12;
@@ -282,7 +282,7 @@ void UnkStruct_027e0cd8_0C_Base::LoadSceneModel(const EntranceInfo *param1) {
this->mUnk_070.mUnk_04 = (char *) local_78;
this->mUnk_070.vfunc_08(0x10);
BMDSectionModel *pBMD = func_ov000_0205abcc(&local_50, &this->mUnk_070, 0x01, 0x00, 0x00);
BMDSectionModel *pBMD = func_ov000_0205abcc(&local_50, &this->mUnk_070, 0x01, 0x00, NULL);
G3d_Model *pModel = G3d_GetModelPtr(pBMD);
G3d_0200e6a0(pModel, 0x00, 0x40);
G3d_0200e6a0(pModel, 0x00, 0x80);
@@ -0,0 +1,404 @@
#include "Actor/ActorManager.hpp"
#include "System/OverlayManager.hpp"
#include "Unknown/Common.hpp"
#include "Unknown/UnkStruct_027e09b8.hpp"
#include "Unknown/UnkStruct_027e0ce0.hpp"
#include "Unknown/UnkStruct_ov024_020d8660.hpp"
#include <nitro/mi.h>
#include <string.h>
extern "C" bool func_ov000_0208e874(const u8 *, int, int, int);
extern "C" const char *func_ov000_0208e830(int);
extern unk32 data_ov000_020b3000;
UnkStruct_027e0ce0_1C::UnkStruct_027e0ce0_1C() {
this->mUnk_D4 = NULL;
this->mUnk_D8 = NULL;
MI_CpuFill32(0, this->mUnk_08, sizeof(this->mUnk_08));
MI_CpuFill32(0, this->mUnk_5C, sizeof(this->mUnk_5C));
MI_CpuFill32(0, this->mUnk_C8, sizeof(this->mUnk_C8));
}
UnkStruct_027e0ce0_1C::~UnkStruct_027e0ce0_1C() {}
// https://decomp.me/scratch/3dDWf
void UnkStruct_027e0ce0_1C::func_ov001_020bccec() {
if (data_027e09a4->IsTrain()) {
return;
}
bool isSceneBattle = data_027e09a4->IsSceneModeBattle();
bool isCutscene = data_027e09a4->IsCutscene();
wchar_t path[32];
path[0] = L'\0';
path[sizeof(path) / 2 - 1] = L'\0';
for (unsigned long var_r5 = 0; var_r5 < PlayerCharacter_Max; var_r5++) {
for (unsigned long var_r4 = 0; var_r4 < ARRAY_LEN(this->mUnk_08[var_r5]); var_r4++) {
const UnkStruct_ov000_020ab4dc *ptr = &data_ov000_020ab4dc[var_r5];
if (func_ov000_0208e874(&ptr->mUnk_86[var_r4], var_r5, var_r4, 1)) {
this->mUnk_08[var_r5][var_r4] = new(HeapIndex_1) UnkStruct_027e0ce0_1C_08(var_r5, var_r4, 0);
switch (var_r4) {
case 3:
this->mUnk_D4 = new(HeapIndex_1) UnkStruct_027e0ce0_1C_D4();
this->mUnk_08[var_r5][var_r4]->func_ov000_020588f0(this->mUnk_D4, 0x6AB0, 0,
(void *) ((u32) this->mUnk_D4 + 0x6AB0));
break;
case 4:
this->mUnk_D8 = new(HeapIndex_1) UnkStruct_027e0ce0_1C_D8();
this->mUnk_08[var_r5][var_r4]->func_ov000_020588f0(this->mUnk_D8, 0x6AB0, 0,
(void *) ((u32) this->mUnk_D8 + 0x6AB0));
break;
default:
this->mUnk_08[var_r5][var_r4]->func_ov000_020586b4(NULL, 0, 0, NULL);
break;
}
}
}
if (isSceneBattle || isCutscene) {
continue;
}
for (unsigned long var_r7 = 0; var_r7 < ARRAY_LEN(this->mUnk_5C[var_r5]); var_r7++) {
int value = var_r7 + 7;
bool canLoadAnimation;
if (var_r5 == 0) {
switch (value) {
case 7:
if (data_027e09a4->GetCurrentCourseEntry()->unk_1B & 4) {
canLoadAnimation = true;
} else {
canLoadAnimation = false;
}
break;
case 9:
if (gOverlayManager.IsPlayerSub()) {
canLoadAnimation = true;
} else {
canLoadAnimation = false;
}
break;
case 10:
if (gOverlayManager.IsPlayerPhantom()) {
canLoadAnimation = true;
} else {
canLoadAnimation = false;
}
break;
case 15:
if (data_027e09a4->CurrentSceneIndex() == SceneIndex_b_last23) {
canLoadAnimation = true;
} else {
canLoadAnimation = false;
}
break;
default:
canLoadAnimation = false;
break;
}
} else if (var_r5 == 1) {
if (value == 12 && gOverlayManager.IsBossDeago()) {
canLoadAnimation = true;
} else if (value == 13 && data_027e09a4->CurrentSceneIndex() == 0x24) {
canLoadAnimation = true;
}
} else if (var_r5 == 2) {
if (value == 11 && data_027e09a4->CurrentSceneIndex() == 0x28) {
canLoadAnimation = true;
} else if (value == 14 && data_027e09a4->CurrentSceneIndex() == 0x25) {
canLoadAnimation = true;
} else if (value == 15 && data_027e09a4->CurrentSceneIndex() == 0x27) {
canLoadAnimation = true;
}
} else {
canLoadAnimation = false;
}
if (canLoadAnimation) {
const UnkStruct_ov000_020ab4dc *ptr = &data_ov000_020ab4dc[var_r5];
strncpy((char *) path, ptr->mpDirectory, sizeof(path) - 1);
const char *anm = "/anm/";
int len = strlen((char *) path);
strncpy((char *) path + len, anm, sizeof(path) - 1 - len);
const char *string = func_ov000_0208e830(value);
len = strlen((char *) path);
strncpy((char *) path + len, string, sizeof(path) - 1 - len);
const char *ext = ".nsbca";
len = strlen((char *) path);
strncpy((char *) path + len, ext, sizeof(path) - 1 - len);
UnkFileSystem5 **target = &this->mUnk_5C[var_r5][var_r7];
this->mUnk_5C[var_r5][var_r7] = new(HeapIndex_1) UnkFileSystem5((char *) path, 0xA1, HeapIndex_1, 0);
this->mUnk_5C[var_r5][var_r7]->vfunc_08(0x10);
}
}
bool canCreateC8;
switch (var_r5) {
case 0:
canCreateC8 = true;
break;
case 1:
if (gOverlayManager.IsPlayerPhantom()) {
canCreateC8 = true;
} else {
canCreateC8 = false;
}
break;
case 2:
canCreateC8 = false;
break;
default:
canCreateC8 = false;
break;
}
if (canCreateC8) {
const UnkStruct_ov000_020ab4dc *ptr;
ptr = &data_ov000_020ab4dc[var_r5];
this->mUnk_C8[var_r5] = new(HeapIndex_1) UnkStruct_027e0ce0_1C_C8(var_r5, ptr->mUnk_98);
}
}
}
void UnkStruct_027e0ce0_1C::func_ov001_020bcfec() {
if (data_027e09a4->IsTrain()) {
return;
}
for (unsigned long i = 0; i < PlayerCharacter_Max; i++) {
DELETE(this->mUnk_C8[i]);
for (unsigned long j = 0; j < ARRAY_LEN(this->mUnk_5C[i]); j++) {
DELETE(this->mUnk_5C[i][j]);
}
for (unsigned long j = 0; j < ARRAY_LEN(this->mUnk_08[i]); j++) {
DELETE(this->mUnk_08[i][j]);
}
}
DELETE(this->mUnk_D8);
DELETE(this->mUnk_D4);
}
void UnkStruct_027e0ce0_1C::func_ov001_020bd0a4(bool param1) {
if (data_027e09a4->IsTrain()) {
return;
}
if (param1) {
for (unsigned long i = 0; i < PlayerCharacter_Max; i++) {
for (unsigned long j = 0; j < ARRAY_LEN(this->mUnk_08[i]); j++) {
if (this->mUnk_08[i][j] != NULL) {
continue;
}
if (func_ov000_0208e874(&data_ov000_020ab4dc[i].mUnk_86[j], i, j, 0)) {
this->mUnk_08[i][j] = new(HeapIndex_1) UnkStruct_027e0ce0_1C_08(i, j, 0);
this->mUnk_08[i][j]->func_ov000_020586b4(0, 0, 0, 0);
this->mUnk_00[i].mUnk_00 |= (1 << j);
}
}
}
}
if (gOverlayManager.IsMapLava() || gOverlayManager.IsDungeonDesert()) {
wchar_t path[32];
path[sizeof(path) / 2 - 1] = L'\0';
strncpy((char *) path, data_ov000_020ab4dc[0].mpDirectory, sizeof(path) - 1);
const char *anm = "/anm/";
int len = strlen((char *) path);
strncpy((char *) path + len, anm, sizeof(path) - 1 - len);
const char *string = func_ov000_0208e830(8);
len = strlen((char *) path);
strncpy((char *) path + len, string, sizeof(path) - 1 - len);
const char *ext = ".nsbca";
len = strlen((char *) path);
strncpy((char *) path + len, ext, sizeof(path) - 1 - len);
UnkFileSystem5 **target = &this->mUnk_5C[PlayerCharacter_Link][1];
(*target) = new(HeapIndex_1) UnkFileSystem5((char *) path, 0xA1, HeapIndex_1, 0);
(*target)->vfunc_08(0x10);
}
}
void UnkStruct_027e0ce0_1C::func_ov001_020bd1ec() {
if (data_027e09a4->IsTrain()) {
return;
}
UnkFileSystem5 **target = &this->mUnk_5C[PlayerCharacter_Link][1];
if (*target != NULL) {
DELETE(*target);
}
for (unsigned long i = 0; i < PlayerCharacter_Max; i++) {
for (unsigned long j = 0; j < ARRAY_LEN(this->mUnk_08[i]); j++) {
if (*(const u16 *) &this->mUnk_00[i].mUnk_00 & (1 << j)) {
this->mUnk_00[i].mUnk_00 &= ~(1 << j);
DELETE(this->mUnk_08[i][j]);
}
}
}
}
PlayerLinkActor_A0::~PlayerLinkActor_A0() {
this->func_ov000_02091ea0();
delete this->mUnk_80;
delete this->mUnk_24;
delete this->mUnk_20;
delete this->mUnk_1C;
delete this->mUnk_18;
delete this->mUnk_14;
delete this->mUnk_10;
data_02049ba0.Unload(OverlaySlot_17);
}
void PlayerLinkActor_A0::func_ov001_020bd2e0() {
STACK_PAD(0x04);
if (this->mUnk_10 != NULL) {
this->mUnk_10->mUnk_00 = 0;
}
if (this->mUnk_18 != NULL) {
this->mUnk_18->func_ov082_02157bb8();
}
if (this->mUnk_20 != NULL) {
this->mUnk_20->func_ov024_020d19d8();
}
if (gOverlayManager.IsMapC1()) {
this->mUnk_28 = new(HeapIndex_1) PlayerLinkActor_A0_28(this->mUnk_10, this->mUnk_14);
}
this->mUnk_2C.func_ov000_0208e704();
this->mUnk_34.func_ov000_02082748();
this->mUnk_5C.~UnkStruct_PlayerGet_64();
this->mUnk_74 = -1;
this->mUnk_78 = false;
this->mUnk_7E = true;
}
void PlayerLinkActor_A0::func_ov001_020bd358() {
if (this->func_ov000_02091f08(0x15)) {
this->func_ov000_020921e4(0x00);
}
if (this->mUnk_28 != NULL) {
DELETE(this->mUnk_28);
}
}
//! TODO: fake match
void PlayerLinkActor_A0::func_ov001_020bd388(bool param1, bool param2) {
if (param1) {
this->mUnk_7D = false;
}
if (this->mUnk_1C != NULL) {
this->mUnk_1C->func_ov101_02183290();
}
if (param2) {
return;
}
if (data_027e09a4->func_ov000_0207059c() && data_ov024_020d8660->mUnk_1C == 1) {
this->mUnk_04->func_ov000_02088268();
if (this->mUnk_68 != 0x67) {
this->func_ov000_020921e4(0x67);
}
return;
}
if (data_027e09a4->func_ov000_0207059c() && data_ov024_020d8660->mUnk_1C == 4) {
this->mUnk_04->func_ov000_02088268();
if (this->mUnk_68 != 0x76) {
this->func_ov000_020921e4(0x76);
}
return;
}
bool var_r1;
if (this->mUnk_68 != 0x3F) {
unk32 temp_r0 = data_027e09a4->func_ov000_02070554();
if (data_ov000_020aa88c[temp_r0].mUnk_04) {
if (temp_r0 == 0x33) {
struct {
void *ptr;
unk32 actorId;
} local_18;
local_18.ptr = &data_ov000_020b3000;
local_18.actorId = ActorId_Beedle;
Actor **pBeedle = gpActorManager->func_01fff350(&local_18, gpActorManager->mActorTable);
if (0) {
var_r1_true:
var_r1 = true;
} else if (pBeedle == gpActorManager->mUnk_08) {
goto var_r1_false;
} else {
goto var_r1_true;
}
} else if (data_027e09a4->CurrentSceneIndex() == SceneIndex_f_hyral &&
data_027e09a4->func_ov000_02070560()->roomIndex == 5 &&
!data_027e09b8->HasAdventureFlag(AdventureFlag_WatchedZeldasBedroomFirstCS)) {
this->mUnk_7D = false;
var_r1 = false;
} else {
var_r1 = true;
}
} else {
goto var_r1_false;
}
} else {
var_r1_false:
var_r1 = false;
}
if (var_r1) {
this->func_ov000_020921e4(0x3F);
} else if (this->mUnk_68 != 0) {
this->func_ov000_020921e4(0x00);
}
}
UnkStruct_027e0ce0_40_Base_7C::UnkStruct_027e0ce0_40_Base_7C(unk32 param1) :
mUnk_00(param1),
mUnk_04(param1 == -1 ? new(HeapIndex_1) UnkStruct_027e0ce0_40_Base_7C_04() : NULL),
mUnk_08(NULL, 0x8FE, 0x41),
mUnk_14(0) {}
UnkStruct_027e0ce0_40_Base_7C::~UnkStruct_027e0ce0_40_Base_7C() {
delete this->mUnk_04;
}
@@ -0,0 +1,200 @@
#include "System/SysNew.hpp"
#include "Unknown/UnkStruct_027e09a0.hpp"
#include "Unknown/UnkStruct_027e09a4.hpp"
#include "Unknown/UnkStruct_ov000_020b504c.hpp"
#include <nitro/mi.h>
extern "C" void *func_02022884(unk32);
extern u8 gBufferTrainMsg[0x8C00];
static const char *data_ov001_020c2cf4[] = {
NULL, "tower", "tower_lobby", "intrain", "castle", "castle_town", "forest",
"snow", "water", "flame", "flame_fld", "desert", "village", "dungeon",
};
void UnkStruct_ov000_020b504c::func_ov001_020be504(void) {
this->mUnk_000->func_ov000_02068f0c();
}
void UnkStruct_ov000_020b504c::func_ov001_020be510(void) {
this->mUnk_000->mUnk_10++;
this->mUnk_000->func_ov000_020676f8("maingame", HeapIndex_1);
this->mUnk_028 = new(HeapIndex_1) UnkStruct_ov000_020b504c_28(0x00);
this->mUnk_02C = new(HeapIndex_1) UnkStruct_ov000_020b504c_2C(0x00);
UnkStruct_ov000_020b504c_28 *pvVar1 = new(HeapIndex_1) UnkStruct_ov000_020b504c_28(0x01);
UnkStruct_ov000_020b504c_0C_Derived1 *pvVar2 = new(HeapIndex_1) UnkStruct_ov000_020b504c_0C_Derived1(0x00);
UnkStruct_ov000_020b504c_0C_Derived1 *pvVar3 = new(HeapIndex_1) UnkStruct_ov000_020b504c_0C_Derived1(0x01);
void *uVar4 = func_02022884(0x00);
UnkStruct_ov000_020b504c_0C_Derived2 *pvVar5 = new(HeapIndex_1) UnkStruct_ov000_020b504c_0C_Derived2();
this->mUnk_00C[0] = this->mUnk_028;
this->mUnk_00C[1] = pvVar1;
this->mUnk_00C[2] = pvVar2;
this->mUnk_00C[3] = pvVar3;
this->mUnk_00C[4] = (UnkStruct_ov000_020b504c_0C_Base *) uVar4;
this->mUnk_00C[5] = pvVar5;
this->mUnk_008 = new(HeapIndex_1) UnkStruct_ov000_020b504c_08();
}
void UnkStruct_ov000_020b504c::func_ov001_020be5e8(void) {
this->mUnk_000->mUnk_10++;
this->mUnk_000->func_ov000_020676f8("battle_common", HeapIndex_1);
this->mUnk_000->func_ov000_020676f8("battle_parent", HeapIndex_1);
UnkStruct_ov000_020b504c_2C *pvVar1 = new(HeapIndex_1) UnkStruct_ov000_020b504c_2C(0x00);
UnkStruct_ov000_020b504c_0C_Derived3 *pvVar2 = new(HeapIndex_1) UnkStruct_ov000_020b504c_0C_Derived3(0x00);
void *iVar3 = func_02022884(0x00);
this->mUnk_00C[0] = pvVar1;
this->mUnk_00C[2] = pvVar2;
this->mUnk_00C[4] = (UnkStruct_ov000_020b504c_0C_Base *) iVar3;
this->mUnk_008 = new(HeapIndex_1) UnkStruct_ov000_020b504c_08();
}
void UnkStruct_ov000_020b504c::func_ov001_020be668(void) {
this->mUnk_000->mUnk_10++;
this->mUnk_000->func_ov000_020676f8("select", HeapIndex_1);
UnkStruct_ov000_020b504c_2C *pvVar1 = new(HeapIndex_1) UnkStruct_ov000_020b504c_2C(0x00);
UnkStruct_ov000_020b504c_0C_Derived3 *pvVar2 = new(HeapIndex_1) UnkStruct_ov000_020b504c_0C_Derived3(0x00);
void *iVar3 = func_02022884(0x00);
this->mUnk_00C[0] = pvVar1;
this->mUnk_00C[2] = pvVar2;
this->mUnk_00C[4] = (UnkStruct_ov000_020b504c_0C_Base *) iVar3;
this->mUnk_008 = new(HeapIndex_1) UnkStruct_ov000_020b504c_08();
}
void UnkStruct_ov000_020b504c::func_ov001_020be6d8(void) {
this->mUnk_000->mUnk_10++;
this->mUnk_000->func_ov000_020676f8("collect", HeapIndex_1);
}
void UnkStruct_ov000_020b504c::func_ov001_020be6f4(void) {
DELETE(this->mUnk_00C[5]);
DELETE(this->mUnk_00C[4]);
DELETE(this->mUnk_00C[2]);
DELETE(this->mUnk_00C[3]);
if (this->mUnk_02C != NULL || this->mUnk_028 != NULL) {
DELETE(this->mUnk_02C);
DELETE(this->mUnk_028);
this->mUnk_00C[0] = NULL;
} else {
DELETE(this->mUnk_00C[0]);
}
DELETE(this->mUnk_00C[1]);
DELETE(this->mUnk_008);
this->mUnk_000->func_ov000_02068f0c();
}
void UnkStruct_ov000_020b504c::func_ov001_020be79c(SceneIndex sceneIndex) {
MI_CpuFill32(0, this->mUnk_05C, sizeof(this->mUnk_05C));
if (data_027e09a4->IsCutscene()) {
this->mUnk_00C[6] = new(HeapIndex_1) UnkStruct_ov000_020b504c_0C_Derived4();
}
this->mUnk_000->mUnk_10++;
this->mUnk_000->func_ov000_020676f8("field", HeapIndex_1);
const char *unk_14 = data_ov001_020c2cf4[data_027e09a0->func_ov000_020702a8(sceneIndex)->mUnk_14];
if (unk_14 != NULL) {
this->mUnk_000->func_ov000_020676f8(unk_14, HeapIndex_1);
}
if (data_027e09a4->IsCutscene()) {
this->mUnk_000->func_ov000_020677b0("staff.bmg", HeapIndex_1);
}
}
void UnkStruct_ov000_020b504c::func_ov001_020be82c(SceneIndex sceneIndex) {
MI_CpuFill32(0, this->mUnk_05C, sizeof(this->mUnk_05C));
this->mUnk_000->mUnk_10++;
const char *unk_14 = data_ov001_020c2cf4[data_027e09a0->func_ov000_020702a8(sceneIndex)->mUnk_14];
if (unk_14 != NULL) {
this->mUnk_000->func_ov000_020676f8(unk_14, HeapIndex_1);
} else {
this->mUnk_000->func_ov000_020676f8("dungeon", HeapIndex_1);
}
}
void UnkStruct_ov000_020b504c::func_ov001_020be880(SceneIndex sceneIndex) {
MI_CpuFill32(0, this->mUnk_05C, sizeof(this->mUnk_05C));
this->mUnk_000->mUnk_10++;
this->mUnk_000->func_ov000_02067804("train", gBufferTrainMsg, sizeof(gBufferTrainMsg));
if (data_027e09a0->GetCourseEntry(sceneIndex)->unk_10 == 4 || sceneIndex == SceneIndex_t_tutorial ||
sceneIndex == SceneIndex_e3_train) {
this->mUnk_000->func_ov000_020676f8("train_extra", HeapIndex_1);
}
}
void UnkStruct_ov000_020b504c::func_ov001_020be8e0(void) {
if (data_027e09a4->GetCurrentCourseEntry()->unk_10 != 5) {
this->func_ov001_020be504();
}
for (int i = 0; i < ARRAY_LEN(this->mUnk_00C); i++) {
if (this->mUnk_00C[i] != NULL) {
this->mUnk_00C[i]->vfunc_18(0x00);
}
}
DELETE(this->mUnk_00C[6]);
}
void UnkStruct_ov000_020b504c::func_ov001_020be92c(UnkStruct_027e0cd8_04_0C *param1) {
if (data_027e09a4->IsLand()) {
this->mUnk_000->mUnk_10++;
}
}
void UnkStruct_ov000_020b504c::func_ov001_020be94c(void) {
if (data_027e09a4->IsLand()) {
this->mUnk_06F = false;
this->func_ov001_020be504();
}
for (int i = 0; i < ARRAY_LEN(this->mUnk_00C); i++) {
if (this->mUnk_00C[i] != NULL) {
this->mUnk_00C[i]->vfunc_18(0x00);
}
}
if (this->mUnk_008 != NULL) {
this->mUnk_008->func_ov000_020a4764();
}
}
void UnkStruct_ov000_020b504c::func_ov001_020be998(void) {
this->mUnk_000->mUnk_10++;
this->mUnk_000->func_ov000_020676f8("demo", HeapIndex_1);
this->mUnk_000->func_ov000_020676f8("demo01_05", HeapIndex_1);
this->mUnk_000->func_ov000_020676f8("demo06_10", HeapIndex_1);
this->mUnk_000->func_ov000_020676f8("demo11_15", HeapIndex_1);
this->mUnk_000->func_ov000_020676f8("demo16_20", HeapIndex_1);
this->mUnk_000->func_ov000_020676f8("demo21_25", HeapIndex_1);
}
void UnkStruct_ov000_020b504c::func_ov001_020be9fc(void) {
if (!this->mUnk_06F) {
this->mUnk_000->func_ov000_020676f8("shop", HeapIndex_1);
this->mUnk_000->func_ov000_020676f8("collect", HeapIndex_1);
this->mUnk_06F = true;
}
}
void UnkStruct_ov000_020b504c::func_ov001_020bea2c(void) {
this->mUnk_000->func_ov000_020676f8("post", HeapIndex_1);
}
@@ -0,0 +1,688 @@
#include "Unknown/UnkStruct_027e09a0.hpp"
#include "Unknown/UnkStruct_027e09a4.hpp"
#include "Unknown/UnkStruct_027e09b8.hpp"
#include "Unknown/UnkStruct_027e0cd8.hpp"
#include "Unknown/UnkStruct_027e0d08.hpp"
#include "Unknown/UnkStruct_ov000_020b50c0.hpp"
#include "Unknown/UnkStruct_ov000_020b51b8.hpp"
#include "Unknown/UnkStruct_ov000_020b52e8.hpp"
#include "versions.h"
extern "C" BOOL NNS_SndArcLoadBank(unk32 param1, unk32 param2);
extern "C" void func_0200240c(unk32);
extern "C" unk32 func_ov026_0212e54c();
void UnkStruct_ov000_020b50c0::func_ov001_020bd854(void) {
data_027e099c->func_ov001_020bde6c();
data_ov000_020b51b8.func_ov000_0206bbfc(0x01);
this->func_ov001_020bd934(false);
}
void UnkStruct_ov000_020b50c0::func_ov001_020bd87c(void) {
#if IS_JP
data_ov000_020b51b8.func_ov000_0206c4ec(0x00);
data_027e099c->func_ov001_020bde7c();
data_027e099c->func_ov000_0206f61c(0x00);
this->func_ov000_0206a52c(0x01);
#else
data_ov000_020b51b8.func_ov000_0206c4ec(0x00);
data_027e099c->func_ov001_020bde7c();
this->func_ov000_0206a52c(0x01);
this->func_ov001_020bd934(true);
#endif
}
void UnkStruct_ov000_020b50c0::func_ov001_020bd8ac(void) {
unk32 value = data_0204999c.mUnk_24[0];
this->func_ov000_0206a52c(0x02);
NNS_SndArcLoadBank(0x89, value);
this->mUnk_A8[2] = -1;
this->func_ov001_020bd934(true);
}
void UnkStruct_ov000_020b50c0::func_ov001_020bd8dc(void) {
this->func_ov001_020bd934(0x00);
}
void UnkStruct_ov000_020b50c0::func_ov001_020bd8e8(void) {
data_ov000_020b51b8.func_ov000_0206bbfc(0x01);
this->func_ov000_0206a260(0x0A, 0x02, -1);
this->func_ov001_020bd934(false);
}
void UnkStruct_ov000_020b50c0::func_ov001_020bd910(void) {
#if IS_JP
data_ov000_020b51b8.func_ov000_0206c4ec(0x00);
data_027e099c->func_ov001_020bde7c();
data_027e099c->func_ov000_0206f61c(0x00);
this->func_ov000_0206a52c(0x01);
#else
data_ov000_020b51b8.func_ov000_0206c4ec(0x00);
this->func_ov000_0206a52c(0x01);
this->func_ov001_020bd934(true);
#endif
}
void UnkStruct_ov000_020b50c0::func_ov001_020bd934(bool param1) {
if (param1) {
this->func_ov000_0206a704(0x00);
func_0200240c(0);
return;
}
if (this->mUnk_94 == 2) {
this->func_ov000_0206a704(0x02);
return;
}
this->func_ov000_0206a740();
if (this->mUnk_94 == 3) {
func_0200240c(1);
}
}
void UnkStruct_ov000_020b50c0::func_ov001_020bd970(const EntranceInfo *param1) {
SceneIndex scene = param1->sceneIndex;
unk32 iVar7 = data_027e09a0->GetCourseEntry(scene)->unk_10;
unk32 uVar6 = 0;
unk32 uVar5 = 0;
unk32 local_18 = -1;
unk32 local_1c = -1;
u8 csIndex = param1->csIndex;
if (param1->isCS == true && csIndex != CutsceneIndex_Max) {
switch (csIndex) {
case CutsceneIndex_TitleScreen:
uVar6 = 0x4A;
break;
case CutsceneIndex_Intro:
uVar6 = 0x4C;
break;
case CutsceneIndex_EngineerCertificate:
uVar6 = 0x4D;
break;
case CutsceneIndex_SpiritTowerSplit_01:
uVar6 = 0x4E;
break;
case CutsceneIndex_SpiritTowerSplit_02:
uVar6 = 0x4F;
break;
case CutsceneIndex_SpiritTowerSplit_03:
uVar6 = 0x50;
break;
case CutsceneIndex_SpiritTowerSplit_04:
uVar6 = 0x51;
break;
case CutsceneIndex_SpiritTowerSplit_05:
uVar6 = 0x52;
break;
case CutsceneIndex_WalkingToSpiritTower:
uVar6 = 0x53;
break;
case CutsceneIndex_FirstAnjeanMeeting:
uVar6 = 0x54;
break;
case CutsceneIndex_FirstPhantomPossession:
uVar6 = 0x55;
break;
case CutsceneIndex_ForestTempleCompleted_01:
uVar6 = 0x56;
break;
case CutsceneIndex_ForestTempleCompleted_02:
uVar6 = 0x57;
break;
case CutsceneIndex_ForestTempleCompleted_03:
uVar6 = 0x58;
break;
case CutsceneIndex_BlizzardTempleCompleted_01:
uVar6 = 0x59;
break;
case CutsceneIndex_BlizzardTempleCompleted_02:
uVar6 = 0x5A;
break;
case CutsceneIndex_BlizzardTempleCompleted_03:
uVar6 = 0x5B;
break;
case CutsceneIndex_MarineTempleCompleted_01:
uVar6 = 0x5C;
break;
case CutsceneIndex_MarineTempleCompleted_02:
uVar6 = 0x5D;
break;
case CutsceneIndex_MarineTempleCompleted_03:
uVar6 = 0x5E;
break;
case CutsceneIndex_StavenInTOSAfterFireGlyph_01:
uVar6 = 0x5F;
break;
case CutsceneIndex_StavenInTOSAfterFireGlyph_02:
uVar6 = 0x60;
break;
case CutsceneIndex_MountainTempleCompleted_01:
uVar6 = 0x61;
break;
case CutsceneIndex_MountainTempleCompleted_02:
uVar6 = 0x62;
break;
case CutsceneIndex_MountainTempleCompleted_03:
uVar6 = 0x63;
break;
case CutsceneIndex_StavenPreBattle:
uVar6 = 0x64;
break;
case CutsceneIndex_StavenPostBattle:
uVar6 = 0x65;
break;
case CutsceneIndex_MalladusOnTOSSummit_01:
uVar6 = 0x66;
break;
case CutsceneIndex_MalladusOnTOSSummit_02:
uVar6 = 0x67;
break;
case CutsceneIndex_PassengerCarAnjeanBowOfLight:
uVar6 = 0x68;
break;
case CutsceneIndex_LokomoSword:
uVar6 = 0x69;
break;
case CutsceneIndex_PassengerCarBeforeMalladusFight:
uVar6 = 0x6A;
break;
case CutsceneIndex_BoardingDemonTrain:
uVar6 = 0x6B;
break;
case CutsceneIndex_BeforeMalladusBeast_01:
uVar6 = 0x6C;
break;
case CutsceneIndex_BeforeMalladusBeast_02:
uVar6 = 0x6D;
break;
case CutsceneIndex_BeforeMalladusBeast_03:
uVar6 = 0x6E;
break;
case CutsceneIndex_PreCredits:
uVar6 = 0x6F;
break;
case CutsceneIndex_Credits_01:
uVar6 = 0x71;
break;
case CutsceneIndex_Credits_02:
uVar6 = 0x72;
break;
case CutsceneIndex_Credits_03:
uVar6 = 0x73;
break;
case CutsceneIndex_SpiritPipes:
uVar6 = 0x74;
break;
case CutsceneIndex_ForestTracksRestoredFromGlyph:
uVar6 = 0x75;
break;
case CutsceneIndex_MalladusBeastDestroyed:
uVar6 = 0x76;
default:
break;
}
} else {
if (iVar7 == 2 || iVar7 == 4) {
this->mUnk_E4 = func_ov026_0212e54c();
}
uVar6 = 0;
switch (iVar7) {
case 2:
case 4:
uVar6 = 0x02;
break;
case 0:
case 6:
uVar6 = 0x03;
break;
case 1:
case 3:
uVar6 = 0x04;
break;
case 5:
uVar6 = 0x0A;
break;
default:
break;
}
uVar5 = 0;
u8 unk_1F = data_027e09a0->GetCourseEntry(scene)->unk_1F;
switch (unk_1F) {
case 0x00:
uVar5 = 0x0B;
break;
case 0x01:
uVar5 = 0x0C;
break;
case 0x02:
uVar5 = 0x0D;
break;
case 0x03:
uVar5 = 0x0E;
local_18 = 0x07;
break;
case 0x04:
if (data_027e09b8->HasAdventureFlag(AdventureFlag_ObtainedSnowSource)) {
uVar5 = 0x0F;
local_18 = 0x07;
} else {
uVar5 = 0x10;
uVar6 = 0x08;
local_18 = 0x02;
}
break;
case 0x05:
uVar5 = 0x11;
local_18 = 0x07;
break;
case 0x06:
if (data_027e09b8->HasAdventureFlag(AdventureFlag_ObtainedFireSource)) {
uVar5 = 0x12;
local_18 = 0x07;
} else {
uVar5 = 0x13;
uVar6 = 0x08;
local_18 = 0x02;
}
break;
case 0x07:
uVar5 = 0x16;
break;
case 0x08:
uVar5 = 0x17;
break;
case 0x09: {
int index = param1->roomIndex;
if (index <= 2) {
uVar5 = 0x1D;
} else if (index <= 6) {
uVar5 = 0x1E;
} else if (index <= 11) {
uVar5 = 0x1F;
} else if (index <= 16) {
uVar5 = 0x20;
} else if (index <= 20) {
uVar5 = 0x21;
} else if (index == 30) {
uVar5 = 0x22;
} else {
switch (index) {
case 40:
uVar5 = 0x1D;
break;
case 41:
uVar5 = 0x1E;
break;
case 21:
case 22:
case 42:
uVar5 = 0x1F;
break;
case 43:
uVar5 = 0x20;
break;
case 23:
case 24:
uVar5 = 0x21;
break;
default:
uVar5 = 0x22;
break;
}
}
local_1c = 0x1C;
break;
}
case 0x0A:
uVar5 = 0x24;
break;
case 0x0B:
uVar5 = 0x27;
break;
case 0x0C:
uVar5 = 0x28;
break;
case 0x0D:
uVar5 = 0x29;
break;
case 0x0E:
uVar5 = 0x2A;
break;
case 0x0F:
uVar5 = 0x2B;
break;
case 0x10:
uVar5 = 0x2D;
break;
case 0x11:
uVar5 = 0x2E;
break;
case 0x12:
uVar5 = 0x2F;
break;
case 0x13:
uVar5 = 0x30;
break;
case 0x14:
uVar5 = 0x32;
break;
case 0x15:
uVar5 = 0x32;
break;
case 0x16:
if (data_027e09b8->HasAdventureFlag(AdventureFlag_WatchedSpiritTowerSplitCS) &&
!data_027e09b8->HasAdventureFlag(AdventureFlag_ObtainedSpiritTrain)) {
local_18 = 0x09;
}
uVar5 = 0x37;
break;
case 0x17:
if (data_027e09b8->HasAdventureFlag(AdventureFlag_WatchedSpiritTowerSplitCS) &&
!data_027e09b8->HasAdventureFlag(AdventureFlag_ObtainedSpiritTrain)) {
local_18 = 0x09;
}
uVar5 = 0x38;
break;
case 0x18:
uVar5 = 0x39;
break;
case 0x19:
uVar5 = 0x3A;
break;
case 0x1A:
uVar5 = 0x3B;
break;
case 0x1B:
uVar5 = 0x3C;
break;
case 0x1C:
uVar5 = 0x3E;
break;
case 0x1D:
uVar5 = 0x3F;
break;
case 0x1E:
uVar5 = 0x15;
break;
case 0x1F:
uVar5 = 0x18;
break;
case 0x20:
uVar5 = 0x19;
break;
case 0x21:
this->func_ov000_0206a52c(0x01);
uVar5 = 0x1A;
break;
case 0x22:
if (this->mUnk_A8[3] != 0x1B) {
this->func_ov000_0206a52c(0x01);
}
uVar5 = 0x1B;
break;
case 0x23:
uVar5 = 0x25;
break;
case 0x24:
uVar5 = 0x2C;
break;
case 0x25:
uVar5 = 0x31;
break;
case 0x26:
uVar5 = 0x33;
break;
case 0x27:
uVar5 = 0x34;
break;
case 0x28:
uVar5 = 0x3D;
break;
case 0x29:
uVar5 = 0x26;
break;
case 0x2A:
uVar5 = 0x40;
break;
case 0x2B:
uVar5 = 0x41;
break;
case 0x2C:
uVar5 = 0x42;
break;
case 0x2D:
uVar5 = 0x43;
break;
case 0x2E:
uVar5 = 0x44;
break;
case 0x2F:
uVar5 = 0x45;
break;
case 0x30:
uVar5 = 0x46;
break;
case 0x31:
uVar5 = 0x47;
break;
case 0x32:
uVar5 = 0x48;
break;
default:
break;
}
switch (unk_1F) {
case 0x10:
case 0x11:
case 0x12:
case 0x13:
case 0x14:
case 0x15:
case 0x25:
case 0x26:
case 0x27:
uVar6 = 0x05;
break;
default:
break;
}
if (scene == SceneIndex_b_last2) {
local_1c = 0x35;
} else if (scene == SceneIndex_b_last22) {
uVar6 = 0x06;
uVar5 = 0x36;
} else if (scene == SceneIndex_b_last23) {
uVar6 = 0x06;
}
if (scene == SceneIndex_f_passenger) {
uVar6 = 0x68;
uVar5 = 0x49;
}
}
this->func_ov000_0206a260(uVar6, 0x02, local_18);
this->func_ov000_0206a260(uVar5, 0x03, local_1c);
data_027e099c->func_ov001_020bde90(param1);
data_ov000_020b51b8.func_ov000_0206bbfc(0x00);
data_ov000_020b5214.func_ov000_0206d43c();
data_ov000_020b52e8.func_ov000_0206f994();
if (param1->isCS == true && csIndex != CutsceneIndex_Max) {
data_ov000_020b5214.func_ov000_0206d960();
} else {
data_ov000_020b5214.func_ov000_0206d984();
}
this->func_ov000_02069c78();
}
void UnkStruct_ov000_020b50c0::func_ov001_020bde04(const EntranceInfo *param1) {
unk32 unk_10 = data_027e09a0->GetCourseEntry(param1->sceneIndex)->unk_10;
data_027e099c->func_ov001_020bdfa0(param1);
if (unk_10 == 2 || unk_10 == 4) {
this->mUnk_E4 = 0;
}
data_ov000_020b5214.func_ov000_0206d984();
data_ov000_020b52e8.mUnk_04 = 0;
}
void UnkStruct_ov000_020b50c0::func_ov001_020bde4c(const EntranceInfo *param1) {
data_027e099c->func_ov001_020bdfb8(param1);
}
void UnkStruct_ov000_020b50c0::func_ov001_020bde5c(void) {
data_027e099c->func_ov001_020be030();
}
void UnkStruct_ov018_020c5ac0::func_ov001_020bde6c() {
UnkStruct_027e0d08::Create();
this->mUnk_01 = true;
}
void UnkStruct_ov018_020c5ac0::func_ov001_020bde7c() {
if (this->mUnk_01) {
UnkStruct_027e0d08::Destroy();
this->mUnk_01 = false;
}
}
void UnkStruct_ov018_020c5ac0::func_ov001_020bde90(const EntranceInfo *param1) {
s32 scene = param1->sceneIndex;
unk32 unk_10 = data_027e09a0->GetCourseEntry(scene)->unk_10;
unk32 var_r4 = 0;
unk32 sp8 = 0x00;
bool sp4 = true;
u8 csIndex = param1->csIndex;
if (param1->isCS == true && csIndex != CutsceneIndex_Max) {
this->func_ov000_0206f61c(0x00);
switch (csIndex) {
case CutsceneIndex_FirstPhantomPossession:
var_r4 = 0x00;
break;
case CutsceneIndex_FirstAnjeanMeeting:
case CutsceneIndex_StavenInTOSAfterFireGlyph_01:
case CutsceneIndex_StavenInTOSAfterFireGlyph_02:
case CutsceneIndex_MountainTempleCompleted_01:
case CutsceneIndex_StavenPreBattle:
case CutsceneIndex_StavenPostBattle:
var_r4 = 0x02;
break;
case CutsceneIndex_ForestTempleCompleted_02:
case CutsceneIndex_ForestTempleCompleted_03:
case CutsceneIndex_BlizzardTempleCompleted_02:
case CutsceneIndex_BlizzardTempleCompleted_03:
case CutsceneIndex_MarineTempleCompleted_02:
case CutsceneIndex_MarineTempleCompleted_03:
case CutsceneIndex_MountainTempleCompleted_02:
case CutsceneIndex_MountainTempleCompleted_03:
var_r4 = 0x01;
break;
case CutsceneIndex_BeforeMalladusBeast_03:
sp4 = false;
break;
default:
break;
}
} else {
if (unk_10 == 2 || unk_10 == 4) {
var_r4 = 0x01;
}
switch (scene) {
case SceneIndex_t_forest:
var_r4 = 0x00;
break;
case SceneIndex_t_smarine:
case SceneIndex_t_smount:
case SceneIndex_t_smount2:
case SceneIndex_t_smount3:
case SceneIndex_e3_smount:
this->func_ov000_0206f61c(0x00);
var_r4 = 0x02;
break;
case SceneIndex_t_dark:
case SceneIndex_t_eviltrain:
case SceneIndex_t_eviltrain2:
case SceneIndex_t_eviltrain3:
this->func_ov000_0206f61c(0x00);
var_r4 = 0x02;
sp8 = 0x01;
break;
default:
break;
}
}
if (this->mUnk_01 && sp4) {
data_027e0d08->func_ov024_020d5dd4(sp8);
}
this->mUnk_02 = 0x01;
this->func_ov000_0206f61c(var_r4);
}
void UnkStruct_ov018_020c5ac0::func_ov001_020bdfa0(const EntranceInfo *param1) {
u8 csIndex = param1->csIndex;
if (param1->isCS == true && csIndex != CutsceneIndex_Max) {
this->func_ov000_0206f61c(0x00);
}
}
void UnkStruct_ov018_020c5ac0::func_ov001_020bdfb8(const EntranceInfo *param1) {
if (data_027e0cd8->mUnk_0C != NULL && GET_FLAG2(data_027e0cd8->mUnk_0C->mUnk_128, UnkFlags2_7)) {
if (param1->isCS == true && param1->csIndex == CutsceneIndex_FirstPhantomPossession) {
this->func_ov000_0206f61c(0x00);
} else {
this->func_ov000_0206f61c(0x02);
}
} else if (this->mUnk_02 == 0) {
switch (param1->sceneIndex) {
case SceneIndex_t_smarine:
case SceneIndex_t_smount:
case SceneIndex_t_smount2:
case SceneIndex_t_smount3:
case SceneIndex_t_dark:
case SceneIndex_t_eviltrain:
case SceneIndex_t_eviltrain2:
case SceneIndex_t_eviltrain3:
case SceneIndex_e3_smount:
this->func_ov000_0206f61c(0x02);
break;
default:
this->func_ov000_0206f61c(0x00);
break;
}
}
this->mUnk_02 = 0;
}
void UnkStruct_ov018_020c5ac0::func_ov001_020be030() {}
void UnkStruct_027e0d08::Destroy() {
if (data_027e0d08 != NULL) {
delete data_027e0d08;
}
}
@@ -0,0 +1,26 @@
#include "Game/GameModeManager.hpp"
#include "Unknown/UnkStruct_0204a110.hpp"
#include "Unknown/UnkStruct_ov024_020d86a0.hpp"
UnkStruct_ov024_020d86a0::UnkStruct_ov024_020d86a0() {
this->mUnk_00 = new(HeapIndex_1) UnkStruct_ov024_020d86a0_00(this);
this->mUnk_0C = false;
this->mUnk_0D = false;
this->mUnk_0E = false;
this->mUnk_0F = false;
this->mUnk_10 = false;
this->mUnk_11 = false;
this->mUnk_00->mUnk_18 = false;
}
UnkStruct_ov024_020d86a0::~UnkStruct_ov024_020d86a0() {
delete this->mUnk_00;
}
void UnkStruct_ov024_020d86a0::func_ov001_020bd818() {
this->mUnk_0F = false;
gpCurrentGameModeMgr->func_02018ac4(0x64);
data_0204a110.mUnk_010.func_0201ca28(0x01);
}
DECL_INSTANCE(UnkStruct_ov024_020d86a0, data_ov024_020d86a0);
@@ -0,0 +1,92 @@
#include "Unknown/UnkFileSystem.hpp"
#include "Unknown/UnkStruct_027e09e8.hpp"
#include "Unknown/UnkStruct_027e0cd8.hpp"
#include "files.h"
extern "C" void func_01ffd1b4(VecFx32 *, VecFx32 *);
BOOL ZCB_ParseFile(ZCBFileInfos *pFileInfos, UnkStruct_027e09e8 *pDst, UnkStruct_027e0cd8_0C_Base *param3) {
int i;
ZCBHeader *pHeader;
ZCBSectionHeader *pSection;
pFileInfos->pFile->vfunc_08(0x10);
pHeader = (ZCBHeader *) pFileInfos->pFile->mpFile;
pSection = (ZCBSectionHeader *) ((u8 *) pHeader + sizeof(ZCBHeader));
for (i = 0; i < pHeader->nSections; i++) {
switch (pSection->type) {
case ZCBSectionType_VTXB:
ZCB_ParseVTXB(pFileInfos, (ZCBSectionVTXB *) pSection, pDst, param3);
break;
case ZCBSectionType_NRMB:
ZCB_ParseNRMB(pFileInfos, (ZCBSectionNRMB *) pSection, pDst);
break;
case ZCBSectionType_PCLB:
ZCB_ParsePCLB(pFileInfos, (ZCBSectionPCLB *) pSection, pDst);
break;
case ZCBSectionType_TRIB:
ZCB_ParseTRIB(pFileInfos, (ZCBSectionTRIB *) pSection, pDst);
break;
case ZCBSectionType_GRDB:
ZCB_ParseGRDB(pFileInfos, (ZCBSectionGRDB *) pSection, pDst, param3);
break;
default:
break;
}
pSection = (ZCBSectionHeader *) ((u8 *) pSection + pSection->nSize);
}
return true;
}
void ZCB_ParseVTXB(ZCBFileInfos *pFileInfos, ZCBSectionVTXB *pSection, UnkStruct_027e09e8 *pDst,
UnkStruct_027e0cd8_0C_Base *param3) {
u16 nEntries = pSection->header.nEntries;
VecFx32 sp24 = param3->mUnk_0A0;
VecFx32 sp18;
VecFx32 spC;
VecFx32_Copy(&sp24, &spC);
VecFx32_Copy(&sp24, &sp18);
for (u32 i = 0; i < nEntries; i++) {
VecFx32 *pEntry = &pSection->entries[i];
VecFx32_Add(pEntry, &sp24, pEntry);
func_01ffd1b4(&spC, pEntry);
}
pDst->mpVerticesTable = &pSection->entries[0];
pDst->mpVerticesTableEnd = &pSection->entries[nEntries];
pDst->mNumVertices = nEntries;
pDst->mUnk_48 = spC;
pDst->mUnk_54 = sp18;
}
void ZCB_ParseNRMB(ZCBFileInfos *pFileInfos, ZCBSectionNRMB *pSection, UnkStruct_027e09e8 *pDst) {
u32 nEntries = pSection->header.nEntries;
//! TODO: 6 = sizeof(ZCBEntryNRMB) - 2?
pDst->mpNormalTable = &pSection->entries[0];
pDst->mpNormalTableEnd = (ZCBEntryNRMB *) ((u8 *) pSection->entries + nEntries * 6);
pDst->mNumNormals = nEntries;
}
void ZCB_ParsePCLB(ZCBFileInfos *pFileInfos, ZCBSectionPCLB *pSection, UnkStruct_027e09e8 *pDst) {
u32 nEntries = pSection->header.nEntries;
pDst->mpPolyClassTable = &pSection->entries[0];
pDst->mpPolyClassTableEnd = &pSection->entries[nEntries];
pDst->mNumPolyClasses = nEntries;
}
void ZCB_ParseTRIB(ZCBFileInfos *pFileInfos, ZCBSectionTRIB *pSection, UnkStruct_027e09e8 *pDst) {
pDst->func_ov000_0207bab4(pSection->entries, pSection->header.nEntries);
}
void ZCB_ParseGRDB(ZCBFileInfos *pFileInfos, ZCBSectionGRDB *pSection, UnkStruct_027e09e8 *pDst,
UnkStruct_027e0cd8_0C_Base *param3) {
pDst->func_ov000_0207e99c(pSection, param3);
}
+1 -1
View File
@@ -521,7 +521,7 @@ BOOL ZMB_ParseROOM(ZMBFileInfos *pFileInfos, ZMBSectionROOM *pSection, UnkStruct
SET_FLAG2(pDst->mUnk_128, UnkFlags2_11);
}
data_027e0c90.max.y = pDst->mUnk_0A4 + var_r7;
data_027e0c90.max.y = pDst->mUnk_0A0.y + var_r7;
}
if (data_027e09a4->IsLand() || data_027e09a4->GetCurrentCourseEntry()->unk_10 == 0x05) {
View File
View File
View File
+3 -3
View File
@@ -96,7 +96,7 @@ UnkStruct_ov000_020b504c::UnkStruct_ov000_020b504c() :
this->mUnk_06E = 0;
for (int i = 0; i < ARRAY_LEN(this->mUnk_00C); i++) {
this->mUnk_00C[i].mUnk_00 = 0;
this->mUnk_00C[i] = NULL;
}
this->mUnk_028 = 0;
@@ -175,7 +175,7 @@ UnkStruct_0204a110::UnkStruct_0204a110() :
mUnk_000(0),
mUnk_008(-1),
mUnk_00C(-1),
mUnk_DEC(NULL),
mpManager(NULL),
mUnk_DF2(-1),
mUnk_DF3(-1),
mUnk_DFC(0),
@@ -191,7 +191,7 @@ UnkStruct_0204a110::UnkStruct_0204a110() :
void UnkStruct_0204a110::func_ov018_020c5300() {
func_02018c90(2);
this->mUnk_010.func_0201c890(0x0004800, 0x00016800, 1, 1, 0);
this->mUnk_010.func_0201c890(0x0004800, 0x00016800, true, true, false);
GX_DispOn();
GXS_DispOn();
}
@@ -12,7 +12,7 @@ UnkSystem1_ov019_Derived1::UnkSystem1_ov019_Derived1() :
}
void UnkSystem1_ov019_Derived1::vfunc_08(unk32 param1) {
UnkStruct_ov000_02067bc4::UnkStruct1 stack;
UnkTextStruct1 stack(-1, 0);
this->mUnk_06 = data_ov000_020b504c.func_ov000_02067cf8(param1, this->mUnk_10, &stack);
}
@@ -112,10 +112,10 @@ unk32 UnkSystem1_ov019_Derived1::vfunc_20(unk32 param1, unk32 param2, unk32 para
unk32 UnkSystem1_ov019_Derived1::func_ov019_020c5540(bool param1, unk16 param2) {
if (param2 >= 0) {
if (param1 != 1 || this->mUnk_18 != 0) {
this->mUnk_18 = param2;
unk32 sVar1 = this->mUnk_18 + 1;
UnkStruct_ov000_02067bc4 *pTest = data_ov000_020b504c.func_ov000_02067bc4(0);
pTest->mUnk_008->mUnk_54 = sVar1;
this->mUnk_18 = param2;
unk32 sVar1 = this->mUnk_18 + 1;
UnkStruct_ov000_020b504c_0C_Base *pTest = data_ov000_020b504c.func_ov000_02067bc4(0);
pTest->mUnk_08->mUnk_020.mCellAnim.unk_34 = (void *) sVar1; //! TODO: real?
}
return 1;
@@ -126,7 +126,7 @@ unk32 UnkSystem1_ov019_Derived1::func_ov019_020c5540(bool param1, unk16 param2)
void UnkSystem1_ov019_Derived1::func_ov019_020c5590(unk32 param1, unk32 param2, unk32 param3) {
data_02049bd4.mUnk_04++;
UnkStruct_ov000_02067bc4::UnkStruct1 auStack_20(-1, param3);
UnkTextStruct1 auStack_20(-1, param3);
this->mUnk_1A = data_ov000_020b504c.func_ov000_02067cf8(param1, this->mUnk_10, &auStack_20);
data_ov000_020b504c.func_ov000_02067bc4(this->mUnk_10)->func_02021bec(1);
data_ov000_020b504c.func_ov000_02067bc4(this->mUnk_10)->func_02021c08();
@@ -12,7 +12,7 @@ UnkSystem1_ov019_Derived2::UnkSystem1_ov019_Derived2() :
}
void UnkSystem1_ov019_Derived2::vfunc_08(unk32 param1) {
UnkStruct_ov000_02067bc4::UnkStruct1 stack;
UnkTextStruct1 stack(-1, 0);
this->mUnk_06 = data_ov000_020b504c.func_ov000_02067cf8(param1, this->mUnk_10, &stack);
}
@@ -29,7 +29,7 @@ unk32 UnkSystem1_ov019_Derived2::vfunc_1C(u32 param1, unk32 param2, unk32 param3
if (this->mUnk_04 <= 0) {
data_02049bd4.mUnk_04++;
UnkStruct_ov000_02067bc4::UnkStruct1 stack1;
UnkTextStruct1 stack1(-1, 0);
this->mUnk_13 = data_ov000_020b504c.func_ov000_02067cf8(BMG_ID(BMGGroup_select, 0x32), 0, &stack1);
data_ov000_020b504c.func_ov000_02067bc4(0)->func_02021bec(1);
data_ov000_020b504c.func_ov000_02067bc4(this->mUnk_10)->func_02021c08();
@@ -19,7 +19,7 @@ void UnkSystem1_ov019_Derived3::vfunc_04() {
}
void UnkSystem1_ov019_Derived3::vfunc_08(unk32 param1) {
UnkStruct_ov000_02067bc4::UnkStruct1 stack;
UnkTextStruct1 stack(-1, 0);
this->mUnk_06 = data_ov000_020b504c.func_ov000_02067cf8(param1, this->mUnk_10, &stack);
}
@@ -37,7 +37,7 @@ unk32 UnkSystem1_ov019_Derived3::vfunc_1C(u32 param1, unk32 param2, unk32 param3
if (this->mUnk_04 <= 0) {
data_02049bd4.mUnk_04++;
UnkStruct_ov000_02067bc4::UnkStruct1 stack1;
UnkTextStruct1 stack1(-1, 0);
if (this->mUnk_18 == 0) {
this->mUnk_13 = data_ov000_020b504c.func_ov000_02067cf8(BMG_ID(BMGGroup_select, 0x1E), 0, &stack1);
+4 -4
View File
@@ -966,10 +966,10 @@ void FileSelectMain::func_ov019_020c7d3c() {
this->mUnk_1C04.mUnk_12 = this->mSaveSlotIndex;
if (this->mUnk_1C04.mUnk_18 == 0) {
int uVar5 = this->mSaveSlotIndex == 0 ? 2 : 1;
UnkStruct_ov000_02067bc4_Sub2 *puVar3 = data_ov000_020b504c.func_ov000_02067bc4(0)->mUnk_008;
unk32 uVar2 = UnkStruct_ov019_020d1e70::data_ov019_020d1e4c.mUnk_10;
puVar3->mUnk_54 = uVar5;
int uVar5 = this->mSaveSlotIndex == 0 ? 2 : 1;
UnkStruct_ov000_020b504c_08 *puVar3 = data_ov000_020b504c.func_ov000_02067bc4(0)->mUnk_08;
unk32 uVar2 = UnkStruct_ov019_020d1e70::data_ov019_020d1e4c.mUnk_10;
puVar3->mUnk_020.mCellAnim.unk_34 = (void *) uVar5; //! TODO: real?
data_ov000_020b504c.func_ov000_0206807c(uVar2, &this->mUnk_1C04);
} else if (this->mUnk_1C04.mUnk_18 == 1) {
data_ov000_020b504c.func_ov000_0206807c(data_ov019_020d1e70.mUnk_0C, &this->mUnk_1C04);
+3 -5
View File
@@ -5,11 +5,11 @@
#include "Unknown/UnkStruct_ov003_020ba740.hpp"
#include <nitro/reg.h>
const unk16 data_ov019_020d1bb0[] = {0x01, 0x37, 0x38, 0x39, 0x3C, 0x00};
const s16 data_ov019_020d1bb0[] = {0x01, 0x37, 0x38, 0x39, 0x3C, 0x00};
static const UnkStruct_ov019_020d1d80 data_ov019_020d1db4(0x00020002);
GameModeManagerBase *FileSelectManager::Create(unk32 param1) {
GameModeManagerBase *FileSelectManager::Create(UnkStruct_0204a110_Sub2 *param1) {
return new(HeapIndex_1) FileSelectManager(param1);
}
@@ -116,6 +116,4 @@ void FileSelectManager::func_ov019_020c51a8() {
delete data_0204a088;
}
UnkStruct_0204a088_Base::~UnkStruct_0204a088_Base() {
data_0204a088 = NULL;
}
DECL_INSTANCE_DTOR(UnkStruct_0204a088, data_0204a088);
+4 -4
View File
@@ -467,7 +467,7 @@ void FileSelectOptions::func_ov019_020cd614() {
void FileSelectOptions::func_ov019_020cd788() {
data_ov000_020b504c.mUnk_030 = this->mUnk_0024.mUnk_FC0;
UnkStruct_ov000_02067bc4::UnkStruct1 stack1;
UnkTextStruct1 stack1(-1, 0);
data_ov000_020b504c.func_ov000_02067cf8(0x00020025, 0, &stack1);
this->mUnk_0024.func_ov019_020ce7d4(0);
@@ -559,9 +559,9 @@ void FileSelectOptions::func_ov019_020cdcb8() {
data_ov000_020b5214.func_ov000_0206db44(0x1F);
}
} else {
UnkStruct_ov000_02067bc4 *ptr = data_ov000_020b504c.func_ov000_02067bc4(0);
UnkStruct_ov000_020b504c_0C_Base *ptr = data_ov000_020b504c.func_ov000_02067bc4(0);
if (ptr->vfunc_08() == 0 ? true : false) {
if (!ptr->vfunc_08() ? true : false) {
if (data_ov000_020b504c.func_ov000_020682c0(0) == 0) {
SaveFile_00000_2600_Data *pSaveSub17 = gSaveManager.GetSaveSlot(this->mUnk_0024.mSaveSlotIndex)->Get2600Ptr();
pSaveSub17->unk_00 = this->mUnk_0024.mUnk_FC0;
@@ -570,7 +570,7 @@ void FileSelectOptions::func_ov019_020cdcb8() {
gSaveManager.mpSaveFile->mSaveSlotIndex = this->mUnk_0024.mSaveSlotIndex;
gSaveManager.func_ov019_020d08fc(2, SaveFile::func_ov019_020d13b8);
UnkStruct_ov000_02067bc4::UnkStruct1 stack1;
UnkTextStruct1 stack1(-1, 0);
this->mUnk_1CF4 = data_ov000_020b504c.func_ov000_02067cf8(0x00020032, 0, &stack1);
data_ov000_020b504c.func_ov000_02067bc4(0)->func_02021bec(1);
+7 -9
View File
@@ -1,6 +1,9 @@
#include "Game/GameModeFileSelect.hpp"
#include "FileSelect/FileSelect.hpp"
#include "Game/Game.hpp"
#include "Game/GameModeAdventure.hpp"
#include "Game/GameModeContactMode.hpp"
#include "Game/GameModeDownloadPlay.hpp"
#include "Save/AdventureFlags.hpp"
#include "Unknown/UnkStruct_02049bd4.hpp"
#include "Unknown/UnkStruct_0204a060.hpp"
@@ -9,12 +12,6 @@
#include "Unknown/UnkStruct_ov000_020b50c0.hpp"
#include "Unknown/UnkStruct_ov000_020b51b8.hpp"
extern "C" {
void func_ov001_020be054();
void func_ov001_020be0d8();
void func_ov001_020be0ec();
};
static const UnkStruct_ov019_020d1d80 data_ov019_020d1d80(0x00020001);
GameModeFileSelect *GameModeFileSelect::Create() {
@@ -58,15 +55,16 @@ void GameModeFileSelect::vfunc_20() {}
void GameModeFileSelect::LoadAdventureMode(u16 saveSlotIndex) {
this->mSaveSlotIndex = saveSlotIndex;
data_0204a060.func_020183d4(gSaveManager.GetSaveSlot(saveSlotIndex)->GetAdventureFlag(AdventureFlag_WatchedIntroCS),
(GameModeCreateCallback) func_ov001_020be054, 1);
GameModeAdventure::Create, 1);
}
void GameModeFileSelect::LoadBattleMode(u16 saveSlotIndex) {
this->mSaveSlotIndex = saveSlotIndex;
data_0204a060.func_020183d4(true, (GameModeCreateCallback) func_ov001_020be0ec, 1);
// note: GameModeDownloadPlay::Create calls GameModeBattle::Create at some point
data_0204a060.func_020183d4(true, GameModeDownloadPlay::Create, 1);
}
void GameModeFileSelect::LoadContactMode(u16 saveSlotIndex) {
this->mSaveSlotIndex = saveSlotIndex;
data_0204a060.func_020183d4(true, (GameModeCreateCallback) func_ov001_020be0d8, 1);
data_0204a060.func_020183d4(true, GameModeContactMode::Create, 1);
}
+1 -1
View File
@@ -4,7 +4,7 @@
#include "Unknown/UnkStruct_027e09a4.hpp"
#include "Unknown/UnkStruct_027e0cd8.hpp"
#include "Unknown/UnkStruct_027e0ce0.hpp"
#include "Unknown/UnkStruct_ov000_02067bc4.hpp"
#include "Unknown/UnkStruct_ov000_020b504c.hpp"
extern unk32 data_ov000_020b3000;
@@ -4,7 +4,7 @@
#include "Unknown/UnkStruct_0204e5f8.hpp"
#include "Unknown/UnkStruct_027e09a0.hpp"
#include "Unknown/UnkStruct_027e09a4.hpp"
#include "Unknown/UnkStruct_ov000_02067bc4.hpp"
#include "Unknown/UnkStruct_ov000_020b504c.hpp"
#include "Unknown/UnkStruct_ov000_020b51b8.hpp"
#include "Unknown/UnkStruct_ov024_020d86a0.hpp"
@@ -146,7 +146,7 @@ void AdventureModeManager_160::vfunc_14(unk32 param1) {
void AdventureModeManager_160::func_ov024_020c7cfc() {
this->mUnk_0C = 6;
UnkStruct_ov000_02067bc4::UnkStruct1 stack;
UnkTextStruct1 stack(-1, 0);
stack.mUnk_0D = 1;
data_ov000_020b504c.func_ov000_02067cf8(BMG_ID(BMGGroup_maingame, MsgIndex_MapPaintNotAllowed), 1, &stack);
}
@@ -3,8 +3,8 @@
#include "Unknown/UnkStruct_0204a110.hpp"
#include "Unknown/UnkStruct_0204e5f8.hpp"
#include "Unknown/UnkStruct_027e0ce0.hpp"
#include "Unknown/UnkStruct_ov000_02067bc4.hpp"
#include "Unknown/UnkStruct_ov000_020b4f70.hpp"
#include "Unknown/UnkStruct_ov000_020b504c.hpp"
#include "Unknown/UnkStruct_ov000_020b5214.hpp"
#include <nitro/gx.h>
@@ -5,8 +5,8 @@
#include "Unknown/UnkStruct_0204e5f8.hpp"
#include "Unknown/UnkStruct_027e09a4.hpp"
#include "Unknown/UnkStruct_027e09b8.hpp"
#include "Unknown/UnkStruct_ov000_02067bc4.hpp"
#include "Unknown/UnkStruct_ov000_020b4f70.hpp"
#include "Unknown/UnkStruct_ov000_020b504c.hpp"
#include "Unknown/UnkStruct_ov024_020d8660.hpp"
extern "C" AdventureModeManager_184_10 *func_ov010_020b65fc(void *);
@@ -3,8 +3,8 @@
#include "Unknown/UnkStruct_0204a088.hpp"
#include "Unknown/UnkStruct_0204a110.hpp"
#include "Unknown/UnkStruct_027e09a4.hpp"
#include "Unknown/UnkStruct_ov000_02067bc4.hpp"
#include "Unknown/UnkStruct_ov000_020b4eec.hpp"
#include "Unknown/UnkStruct_ov000_020b504c.hpp"
#include "Unknown/UnkStruct_ov000_020b50c0.hpp"
#include "Unknown/UnkStruct_ov024_020d8660.hpp"
#include "versions.h"
@@ -29,10 +29,10 @@ void GameModeAdventure::vfunc_08() {
data_ov000_020b504c.func_ov001_020be510();
data_ov000_020b50c0.func_ov001_020bd854();
SaveFile *pSaveFile = data_ov000_020b4eec.func_ov001_020be12c();
GameSaveSlot *pSaveFile = data_ov000_020b4eec.func_ov001_020be12c();
#if IS_JP
SaveInfoData *pSaveInfoData = &pSaveFile->mSlots[0].mInfoData[0];
SaveInfoData *pSaveInfoData = &pSaveFile->mInfoData;
if (pSaveInfoData->sceneIndex == SceneIndex_f_ajito2) {
pSaveInfoData->sceneIndex = SceneIndex_f_ajito;
@@ -7,8 +7,8 @@
#include "Unknown/UnkStruct_0204e5f8.hpp"
#include "Unknown/UnkStruct_027e09a4.hpp"
#include "Unknown/UnkStruct_027e0cd8.hpp"
#include "Unknown/UnkStruct_ov000_02067bc4.hpp"
#include "Unknown/UnkStruct_ov000_020b4f84.hpp"
#include "Unknown/UnkStruct_ov000_020b504c.hpp"
#include "Unknown/UnkStruct_ov024_020d8694.hpp"
#include <nitro/mi.h>
+3 -3
View File
@@ -6,7 +6,7 @@
#include "Unknown/UnkStruct_027e09a4.hpp"
#include "Unknown/UnkStruct_027e09b8.hpp"
#include "Unknown/UnkStruct_027e0ce0.hpp"
#include "Unknown/UnkStruct_ov000_02067bc4.hpp"
#include "Unknown/UnkStruct_ov000_020b504c.hpp"
#include "Unknown/UnkStruct_ov000_020b5214.hpp"
#include "Unknown/UnkStruct_ov024_020d8660.hpp"
#include "versions.h"
@@ -109,12 +109,12 @@ void UICounterManager::func_ov024_020cd094() {
return;
}
UnkStruct_ov000_02067bc4::UnkStruct1 local;
UnkTextStruct1 local;
#if __MWERKS__
local.data = data_ov000_020b504c.func_ov000_02067bc4(0)->mUnk_028.data;
#else
UnkStruct_ov000_02067bc4::UnkStruct1 *pData = &data_ov000_020b504c.func_ov000_02067bc4(0)->mUnk_028;
UnkTextStruct1 *pData = &data_ov000_020b504c.func_ov000_02067bc4(0)->mUnk_028;
local.mUnk_00 = pData->mUnk_00;
local.mUnk_02 = pData->mUnk_02;
+4 -3
View File
@@ -1,14 +1,15 @@
#include "TitleScreen/TitleScreen.hpp"
#include <nitro/reg.h>
const unk16 data_ov025_020c5a0c[] = {0x0016, 0x003C};
const s16 data_ov025_020c5a0c[] = {0x0016, 0x003C};
TitleScreenManager *TitleScreenManager::Create(unk32 param1) {
GameModeManagerBase *TitleScreenManager::Create(UnkStruct_0204a110_Sub2 *param1) {
return new(HeapIndex_1) TitleScreenManager(param1);
}
void TitleScreenManager::vfunc_14() {
this->mUnk_004.func_ov001_020bd734((unk32 *) data_ov025_020c5a0c);
this->mUnk_004.func_ov001_020bd734(data_ov025_020c5a0c);
this->mUnk_004.func_0201c00c(0x24, 1);
TitleScreen *pTitleScreen = new(HeapIndex_1) TitleScreen();
+1 -1
View File
@@ -109,7 +109,7 @@ extern "C" void CopySingle288(Mat4x3p *, Mat3p *);
extern "C" void func_01ffa60c(const Mat3p *, Mat3p *, Mat3p *);
MapObjectProfile_Derived2_20_Base *func_ov031_020f1404() {
return data_027e0ce0->mUnk_1C->mUnk_0C;
return data_027e0ce0->mUnk_1C->mUnk_08[PlayerCharacter_Link][1];
}
DECL_PROFILE(ActorProfileShotArrow);
+3
View File
@@ -0,0 +1,3 @@
#include "types.h"
u8 gBufferTrainMsg[0x8C00];
+3
View File
@@ -0,0 +1,3 @@
#include "types.h"
u8 gBufferCollectMsg[0x7000];
+3 -3
View File
@@ -17,8 +17,8 @@
#include "Unknown/UnkStruct_027e0cd8.hpp"
#include "Unknown/UnkStruct_027e0cec.hpp"
#include "Unknown/UnkStruct_027e0cf8.hpp"
#include "Unknown/UnkStruct_ov000_02067bc4.hpp"
#include "Unknown/UnkStruct_ov000_020b34c4.hpp"
#include "Unknown/UnkStruct_ov000_020b504c.hpp"
#include "Unknown/UnkStruct_ov000_020b51b8.hpp"
#include "Unknown/UnkStruct_ov000_020b51c0.hpp"
#include "versions.h"
@@ -48,7 +48,7 @@ extern "C" void func_020156c8(char *, char *, unk32);
extern "C" void func_020156f4(char *);
extern "C" void func_02015644(char *);
extern "C" BMDSectionModel *func_ov000_0205abcc(void *, void *, unk32, unk32, unk32);
extern "C" BMDSectionModel *func_ov000_0205abcc(void *, void *, unk32, unk32, void *);
extern "C" unk32 func_ov000_02077590(unk32);
static const unk32 data_ov110_02185dc4[1] = {8};
@@ -707,7 +707,7 @@ void PlayerGet::vfunc_0C(UnkStruct_PlayerGet_vfunc_0C_param1 *param1) {
}
data_027e0cf8->func_ov024_020c7828(this->mUnk_54.mItemId);
UnkStruct_ov000_02067bc4::UnkStruct1 auStack_30;
UnkTextStruct1 auStack_30(-1, 0);
data_ov000_020b504c.func_ov000_02067cf8(ItemManager::GetBmgIDFromItem(this->mUnk_54.mItemId), 0, &auStack_30);
break;
default:
@@ -8,8 +8,6 @@ extern "C" void func_ov000_0205d65c(void *, VecFx32 *, VecFx32 *, u32);
extern "C" void func_ov000_0208cac8(UnkStruct_ov000_0208f820_28 *, VecFx32 *, unk32);
extern "C" unk32 func_ov000_0208dc98(unk32);
extern "C" void func_ov000_020830a4(unk32, unk32, unk32, unk32, unk32, unk32);
extern "C" unk32 func_ov000_02093718(UnkStruct_ov000_0208f820_30 *);
extern "C" unk32 func_ov000_0209378c(UnkStruct_ov000_0208f820_30 *);
extern "C" void func_ov000_020830d4(unk32, u16, unk32, unk32, unk32);
PlayerSceneChange2::PlayerSceneChange2() {
@@ -67,8 +65,8 @@ void PlayerSceneChange2::vfunc_0C(UnkStruct_PlayerGet_vfunc_0C_param1 *param1) {
func_ov000_0208cac8(this->mUnk_28, &this->mUnk_60, 0);
func_ov000_020830a4(this->mUnk_48, 0, this->mUnk_28->mUnk_48, 1, 1, func_ov000_0208dc98(this->mUnk_28->mUnk_48));
func_ov000_020830d4(this->mUnk_48, this->mUnk_40->mUnk_00, func_ov000_02093718(this->mUnk_30),
func_ov000_0209378c(this->mUnk_30), 0);
func_ov000_020830d4(this->mUnk_48, this->mUnk_40->mUnk_00, this->mUnk_30->func_ov000_02093718(),
this->mUnk_30->func_ov000_0209378c(), 0);
break;
case 0x44:
func_ov000_0208cac8(this->mUnk_28, &this->mUnk_60, 0);
+4 -4
View File
@@ -3,17 +3,17 @@
#include "Unknown/UnkStruct_0204a110.hpp"
#include "Unknown/UnkStruct_0204e5f8.hpp"
#include "Unknown/UnkStruct_027e09b8.hpp"
#include "Unknown/UnkStruct_ov000_02067bc4.hpp"
#include "Unknown/UnkStruct_ov000_020b504c.hpp"
#include "Unknown/UnkStruct_ov000_020b50c0.hpp"
THUMB_BEGIN
GameModeManagerBase *GameModeManagerBase::Create(unk32 param1) {
GameModeManagerBase *GameModeManagerBase::Create(UnkStruct_0204a110_Sub2 *param1) {
return new(HeapIndex_1) GameModeManagerBase(param1);
}
GameModeManagerBase::GameModeManagerBase(unk32 param1) :
mUnk_100((void *) param1),
GameModeManagerBase::GameModeManagerBase(UnkStruct_0204a110_Sub2 *param1) :
mUnk_100(param1),
mNextButtonID(BTN_ID_NONE),
mButtonID(BTN_ID_NONE),
mUnk_150(false) {
+1 -1
View File
@@ -2,8 +2,8 @@
#include "System/OverlayManager.hpp"
#include "Unknown/Common.hpp"
#include "Unknown/UnkStruct_02049b18.hpp"
#include "Unknown/UnkStruct_ov000_02067bc4.hpp"
#include "Unknown/UnkStruct_ov000_020b4f84.hpp"
#include "Unknown/UnkStruct_ov000_020b504c.hpp"
#include "Unknown/UnkStruct_ov000_020b50c0.hpp"
#include "global.h"
#include <nitro/mi.h>
+3 -4
View File
@@ -2,13 +2,12 @@
#include "Game/Game.hpp"
#include "Game/GameMode.hpp"
#include "Game/GameModeFileSelect.hpp"
#include "Game/GameModeTitleScreen.hpp"
#include "System/OverlayManager.hpp"
#include "Unknown/UnkStruct_0204e5f8.hpp"
#include "Unknown/UnkStruct_ov000_020b51b8.hpp"
#include "versions.h"
extern "C" void func_ov001_020be078();
THUMB_BEGIN
bool UnkStruct_0204a060::vfunc_0C(void) {
@@ -16,11 +15,11 @@ bool UnkStruct_0204a060::vfunc_0C(void) {
}
void UnkStruct_0204a060::func_020183b8(void) {
func_ov001_020be078();
GameModeTitleScreen::Create();
}
void UnkStruct_0204a060::func_020183c0(void) {
this->func_020183d4(false, (GameModeCreateCallback) func_ov001_020be078, 1);
this->func_020183d4(false, GameModeTitleScreen::Create, 1);
}
bool UnkStruct_0204a060::func_020183d4(bool param1, GameModeCreateCallback createFunc, unk32 param3) {