Decompile overlay 24 (Part 1) (#65)

* GameModeAdventure_001 OK

* GameModeAdventure_024 17%

* GameModeAdventure_024 73%

* GameModeAdventure_024 99%

* jp region differences

* rename GameModeAdventure_024 and GameModeAdventure + UnkStruct_ov000_020d8660_024 OK

* UnkActorSystem1OK

* UnkActorSystem2 OK

* delink more of ov024 & UnkStruct_027e0998_024 OK

* improve instance stuff & UnkStruct_027e0cf8_024 OK

* AdventureModeManager_160_024 OK & GameModeStartUp OK

* fix regressions

* fix regressions 2

* AdventureModeManager_170 OK

* AdventureModeManager_174_Base OK

* AdventureModeManager_174 OK

* mark GameModeAdventure_024 as complete

* AdventureModeManager_178 OK

* AdventureModeManager_180 OK

* AdventureModeManager_184_024 OK

* AdventureModeManager_18C_024 OK & AdventureModeManager_190_024 OK

* AdventureModeManager_15C_20_00 61%

* AdventureModeManager_15C_20_00 OK

* jp version differences

* delink what's left in the overlay

* fix regressions

* AdventureModeManager_1B8_Base_024 98%

* AdventureModeManager_1B8 48% and link AdventureModeManager_024

* AdventureModeManager_1B8_Base and AdventureModeManager_1B8 OK

* oops

* mark statics as local
This commit is contained in:
Yanis
2026-05-18 21:14:27 +02:00
committed by GitHub
parent 0f74fd4201
commit 90203403dd
250 changed files with 10263 additions and 2619 deletions
@@ -124,7 +124,7 @@ ARM void ActorUnk_ov000_020a8bb0::func_ov000_020a8e9c(Vec3p *param1) {
ARM void ActorUnk_ov000_020a8bb0::vfunc_b0() {
if (data_027e09b8->func_01ffd420() == 0) {
ActorUnk_vfunc_b0 auStack_60;
auStack_60.mUnk_24 = this;
auStack_60.mpActor = this;
auStack_60.mUnk_0C = this->mUnk_5C.mUnk_20;
auStack_60.mUnk_14 = 0;
auStack_60.mUnk_18 = -1;
@@ -238,7 +238,7 @@ ARM void ActorUnk_ov000_020a8bb0::vfunc_20() {}
// non-matching
ARM void ActorUnk_ov000_020a8bb0::vfunc_24() {
if (data_027e09b8->func_ov000_020732dc(3) == 0 || !(this->mUnk_0B0 & 4)) {
if (!data_027e09b8->func_ov000_020732dc(3) || !(this->mUnk_0B0 & 4)) {
this->vfunc_20();
}
+1 -1
View File
@@ -835,5 +835,5 @@ bool Cutscene_IsAdventureFlagSet(s32 csIndex) {
return false;
}
return GET_FLAG(data_027e09b8->mAdventureFlags, pEntry->mFlag);
return data_027e09b8->HasAdventureFlag(pEntry->mFlag);
}
@@ -6,7 +6,7 @@ ARM GameModeManagerBase_104::GameModeManagerBase_104() :
mUnk_1A(false) {}
ARM GameModeManagerBase_104::~GameModeManagerBase_104() {
GameModeLinkList<GameModeManagerBase_104_0C> *pNode = this->mUnk_0C.mList.GetPrev();
GameModeLinkList<GameModeManagerBase_104_0C> *pNode = this->mUnk_0C.mList.GetPrevList();
GameModeLinkList<GameModeManagerBase_104_0C> *pOrigin =
(GameModeLinkList<GameModeManagerBase_104_0C> *) ((u8 *) this + offsetof(GameModeManagerBase_104, mUnk_0C));
+1 -8
View File
@@ -341,11 +341,4 @@ ARM void TreasureManager::func_ov000_020aa0ac(ItemId itemId) {
}
}
void TreasureManager::func_ov000_020aa200() {
data_ov000_020b6510 = this;
}
bool TreasureManager::func_ov000_020aa210() {
data_ov000_020b6510 = NULL;
//! @bug: no return value
}
DECL_INSTANCE(TreasureManager, gpTreasureManager);
+2 -2
View File
@@ -196,7 +196,7 @@ struct stack_struct {
};
ARM void MapObject::func_ov000_0209d434(s8 *param1, UnkStruct_ov019_020d24c8_28_258_00 *param2, unk32 param3) {
unk32 sp10;
Vec2s sp10;
stack_struct spC;
s32 var_r2;
@@ -214,7 +214,7 @@ ARM void MapObject::func_ov000_0209d434(s8 *param1, UnkStruct_ov019_020d24c8_28_
return;
}
if (data_027e0998->vfunc_00(&this->mPos, &sp10, &this->mUnk_38)) {
if (data_027e0998->vfunc_00(&this->mPos, &sp10, (u16 *) &this->mUnk_38)) {
spC.mUnk_06 = 0x00;
MI_CpuFill32(0, &spC, sizeof(spC));
spC.mUnk_05 = -1;
@@ -118,7 +118,7 @@ ARM bool MapObjectSwitchStep::vfunc_00(void) {
this->func_ov000_0209e11c(0, 1);
}
if (data_027e09a4->mSceneIndex >= SceneIndex_battle01 && data_027e09a4->mSceneIndex < SceneIndex_Max) {
if (data_027e09a4->mUnk_00.mSceneIndex >= SceneIndex_battle01 && data_027e09a4->mUnk_00.mSceneIndex < SceneIndex_Max) {
MapObjectSwitchStep_data_020b6118.func_ov000_0205fc20(0x78, 0x0C, NULL, NULL);
SET_FLAG(this->mFlags, MapObjFlag_5);
}
@@ -203,15 +203,15 @@ ARM void MapObjectSwitchStep::vfunc_18(s8 *param1, s8 param2) {
return;
}
if (data_027e09a4->mSceneIndex >= SceneIndex_battle01 && data_027e09a4->mSceneIndex < SceneIndex_Max) {
unk32 sp10;
if (data_027e09a4->mUnk_00.mSceneIndex >= SceneIndex_battle01 && data_027e09a4->mUnk_00.mSceneIndex < SceneIndex_Max) {
Vec2s sp10;
stack_struct sp8;
unk32 sp4;
u32 sp4;
//! TODO: fake match?
sp4 = *(u32 *) &this->mUnk_38;
if (data_027e0998->vfunc_00(&this->mPos, &sp10, &sp4)) {
if (data_027e0998->vfunc_00(&this->mPos, &sp10, (u16 *) &sp4)) {
sp8.mUnk_06 = 0x00;
MI_CpuFill32(0, &sp8, sizeof(sp8));
sp8.mUnk_05 = -1;
+12 -22
View File
@@ -38,7 +38,6 @@ THUMB ActorManager *ActorManager::Create() {
}
THUMB ActorManager::ActorManager() {
this->SetInstance(this);
this->mUnk_20 = 0;
this->mUnk_21 = 0;
this->mUnk_22 = 0;
@@ -63,8 +62,6 @@ THUMB ActorManager::~ActorManager() {
if (this->mActorTable != NULL) {
delete this->mActorTable;
}
this->ClearInstance();
}
THUMB void ActorManager::func_ov001_020bafdc() {
@@ -98,7 +95,7 @@ THUMB void ActorManager::func_ov001_020bb018(UnkStruct_func_ov001_020bb018_param
int aligned0A = ALIGN_NEXT(unk_0A, 8);
int aligned08 = ALIGN_NEXT(unk_08, 8);
int iVar5 = data_027e09a0->func_ov000_020702a8(data_027e09a4->mSceneIndex)->mUnk_20;
int iVar5 = data_027e09a0->func_ov000_020702a8(data_027e09a4->mUnk_00.mSceneIndex)->mUnk_20;
s32 allocCount;
if (data_027e09a4->mUnk_60 == 0) {
@@ -124,7 +121,7 @@ THUMB void ActorManager::func_ov001_020bb018(UnkStruct_func_ov001_020bb018_param
unk32 iVar5;
if (func_01ffd3b0() != 0) {
iVar5 = data_027e09a4->mSceneIndex;
iVar5 = data_027e09a4->mUnk_00.mSceneIndex;
if (iVar5 == SceneIndex_f_rabbit) {
this->mUnk_34 = 0xFFFFECCD; // ~0x1332
@@ -154,8 +151,8 @@ THUMB void ActorManager::func_ov001_020bb018(UnkStruct_func_ov001_020bb018_param
auStack_28.func_ov000_02059270(0x24, "drop4", 0x2D200000);
auStack_28.func_ov000_02059270(0x25, "drop5", 0x2D200000);
CourseEntry *ptr = data_027e09a0->func_ov000_0207029c(iVar5);
if ((ptr->mUnk_1D - 1) == 1) {
CourseEntry *ptr = data_027e09a0->GetCourseEntry(iVar5);
if ((ptr->unk_1D - 1) == 1) {
auStack_28.func_ov000_02059270(0x38, "mic_0", 0x35B00000);
auStack_28.func_ov000_02059270(0x39, "mic_1", 0x35B00000);
auStack_28.func_ov000_02059270(0x3A, "mic_on", 0x35B00000);
@@ -199,7 +196,7 @@ THUMB void ActorManager::func_ov001_020bb018(UnkStruct_func_ov001_020bb018_param
}
}
if (data_027e09a4->UnkCheck(data_027e09a4->mSceneIndex)) {
if (data_027e09a4->UnkCheck(data_027e09a4->mUnk_00.mSceneIndex)) {
func_ov071_0215e8d4();
}
@@ -212,7 +209,7 @@ THUMB void ActorManager::func_ov001_020bb018(UnkStruct_func_ov001_020bb018_param
THUMB void ActorManager::func_ov001_020bb414(ActorManager *instance) {
func_ov001_020ba59c(&data_0204999c);
if (data_027e09a4->UnkCheck(data_027e09a4->mSceneIndex)) {
if (data_027e09a4->UnkCheck(data_027e09a4->mUnk_00.mSceneIndex)) {
instance->func_ov001_020bb844();
}
@@ -225,7 +222,7 @@ THUMB void ActorManager::func_ov001_020bb414(ActorManager *instance) {
}
THUMB void ActorManager::func_ov001_020bb488() {
if (data_027e09a4->mUnk_0C != 1) {
if (data_027e09a4->IsNotCutscene()) {
switch (data_027e09a4->func_01ffd400()->mUnk_10) {
case 0x00:
case 0x01:
@@ -244,7 +241,7 @@ THUMB void ActorManager::func_ov001_020bb488() {
data_027e0cf4->func_ov021_020f8cdc();
}
if (data_027e09a4->UnkCheck(data_027e09a4->mSceneIndex)) {
if (data_027e09a4->UnkCheck(data_027e09a4->mUnk_00.mSceneIndex)) {
data_027e0d70->func_ov071_0215e8f8();
}
}
@@ -264,7 +261,7 @@ THUMB void ActorManager::func_ov001_020bb548() {
i++;
}
unk32 value = data_027e09a4->mSceneIndex;
unk32 value = data_027e09a4->mUnk_00.mSceneIndex;
if (data_027e09a4->UnkCheck(value)) {
data_027e0d70->func_ov071_0215e9ac();
@@ -321,7 +318,7 @@ THUMB void ActorManager::func_ov001_020bb6b0(UnkStruct_SceneChange1 *param1) {
for (int i = 0; i < ARRAY_LEN(data_ov000_020ab1ac); i++) {
UnkStruct_ov000_020ab1ac *pEntry = &data_ov000_020ab1ac[i];
if (pEntry->mUnk_00 == iVar5->mActorId && pEntry->mUnk_04 == param1->mNextSceneIndex &&
if (pEntry->mUnk_00 == iVar5->mActorId && pEntry->mUnk_04 == param1->mSceneIndex &&
pEntry->mUnk_08 == param1->mRoomIndex) {
(*piVar1)->mUnk_39 = 1;
(*piVar1)->vfunc_08();
@@ -337,7 +334,7 @@ THUMB void ActorManager::func_ov001_020bb6b0(UnkStruct_SceneChange1 *param1) {
THUMB bool ActorManager::func_ov001_020bb728(s32 param1) {
UnkStruct_SceneChange1 *piVar1 = data_027e09a4->func_ov000_02070560();
if (piVar1->mNextSceneIndex != SceneIndex_f_water || piVar1->mRoomIndex != 0) {
if (piVar1->mSceneIndex != SceneIndex_f_water || piVar1->mRoomIndex != 0) {
return false;
}
@@ -402,11 +399,4 @@ THUMB void ActorManager::func_ov001_020bb844() {
}
}
THUMB void ActorManager::SetInstance(ActorManager *instance) {
gpActorManager = instance;
}
THUMB int ActorManager::ClearInstance() {
gpActorManager = NULL;
//! @bug: the function expects a return value (though it seems unused)
}
DECL_INSTANCE(ActorManager, gpActorManager);
+2 -9
View File
@@ -12,7 +12,7 @@ CargoManager::CargoManager() {
CargoManager::~CargoManager() {}
void CargoManager::func_ov001_020bf830() {
if (this->mCargo.mAmount == 0 && data_027e09a4->func_01ffd3d8() == 0) {
if (this->mCargo.mAmount == 0 && !data_027e09a4->func_01ffd3d8()) {
this->mCargo.mType = CargoType_None;
}
@@ -20,13 +20,6 @@ void CargoManager::func_ov001_020bf830() {
this->mUnk_1C = 0;
}
void CargoManager::SetInstance(CargoManager *pInstance) {
gpCargoManager = pInstance;
}
bool CargoManager::ClearInstance() {
gpCargoManager = NULL;
//! @bug: missing return
}
DECL_INSTANCE(CargoManager, gpCargoManager);
THUMB_END
@@ -0,0 +1,366 @@
#include "Game/Game.hpp"
#include "Game/GameModeAdventure.hpp"
#include "MainGame/AdventureMode.hpp"
#include "Save/SaveManager.hpp"
#include "System/OverlayManager.hpp"
#include "Unknown/UnkStruct_0204a110.hpp"
#include "Unknown/UnkStruct_020d8698.hpp"
#include "Unknown/UnkStruct_027e0998.hpp"
#include "Unknown/UnkStruct_027e09a4.hpp"
#include "Unknown/UnkStruct_027e0cf8.hpp"
#include "Unknown/UnkStruct_ov000_020b4f70.hpp"
#include "Unknown/UnkStruct_ov024_020d8694.hpp"
#include "Unknown/UnkStruct_ov024_020d86a0.hpp"
#include "Unknown/UnkStruct_ov088_02177218.hpp"
#include <dsprot.h>
extern "C" {
void *func_ov024_020d1658();
void *func_ov000_02066294();
void *func_ov024_020ccd1c();
void GX_SetGraphicsMode(unk32 param1, unk32 param2, unk32 param3);
void GXS_SetGraphicsMode(unk32 param1);
}
extern int data_ov001_020c27a8;
extern int data_ov001_020c276c;
THUMB_BEGIN
AdventureModeManager *AdventureModeManager::Create(unk32 param1) {
return new(HeapIndex_1) AdventureModeManager(param1);
}
AdventureModeManager::AdventureModeManager(unk32 param1) {
this->mUnk_154 = 0;
this->mUnk_158 = &this->mUnk_104;
this->mUnk_15C = new(HeapIndex_1) AdventureModeManager_15C();
this->mUnk_160 = NULL;
this->mUnk_164 = NULL;
this->mUnk_168 = NULL;
this->mUnk_16C = NULL;
this->mUnk_174 = NULL;
this->mUnk_178 = NULL;
this->mUnk_17C = NULL;
this->mUnk_180 = NULL;
this->mUnk_184 = NULL;
this->mUnk_188 = NULL;
this->mUnk_18C = NULL;
this->mUnk_190 = NULL;
this->mUnk_194 = NULL;
this->mUnk_198 = NULL;
this->mUnk_19C = NULL;
this->mUnk_1A0 = NULL;
this->mUnk_1A4 = NULL;
this->mUnk_1A8 = NULL;
this->mUnk_1AC = new(HeapIndex_1) AdventureModeManager_1AC();
this->mUnk_1B0 = NULL;
this->mUnk_1B4 = false;
this->mUnk_1B5 = false;
this->mUnk_1B8 = NULL;
this->mUnk_1BC = NULL;
this->mUnk_1C0 = 0;
this->mAllowMapPaint = false;
UnkStruct_027e0998::Create();
func_ov024_020d1658();
this->mUnk_170 = new(HeapIndex_1) AdventureModeManager_170(&this->mUnk_104);
GX_SetGraphicsMode(1, 0, 1);
GXS_SetGraphicsMode(5);
this->mUnk_1C4.sceneIndex = SceneIndex_None;
this->mUnk_1C4.unk_04 = 0;
this->mUnk_1C4.unk_06 = -1;
}
void AdventureModeManager::vfunc_10(unk32 param1, unk32 param2, unk32 param3) {
data_027e0998->func_ov000_02061760();
}
void AdventureModeManager::func_ov001_020c00d4() {
GetAdventureModeManager()->mUnk_16C = new(HeapIndex_1) AdventureModeManager_16C(&GetAdventureModeManager()->mUnk_104);
}
void AdventureModeManager::func_ov001_020c0104() {
GetAdventureModeManager()->mUnk_1B8 = new(HeapIndex_1) AdventureModeManager_1B8(2, 1, 1);
GetAdventureModeManager()->mUnk_1B8->mUnk_08 = 1;
GetAdventureModeManager()->mUnk_164 =
new(HeapIndex_1) AdventureModeManager_164(&GetAdventureModeManager()->mUnk_104, &GetAdventureModeManager()->mUnk_004);
GetAdventureModeManager()->mUnk_19C = new(HeapIndex_1) AdventureModeManager_19C(&GetAdventureModeManager()->mUnk_104);
if (DSProt_DetectNotDummy(NULL) != 0) {
DSProt_DetectNotFlashcart(AdventureModeManager::func_ov001_020c00d4);
}
}
void AdventureModeManager::func_ov001_020c0194() {
GetAdventureModeManager()->mUnk_1B8 = new(HeapIndex_1) AdventureModeManager_1B8(2, 1, 1);
GetAdventureModeManager()->mUnk_1B8->mUnk_08 = 1;
GetAdventureModeManager()->mUnk_164 =
new(HeapIndex_1) AdventureModeManager_164(&GetAdventureModeManager()->mUnk_104, &GetAdventureModeManager()->mUnk_004);
GetAdventureModeManager()->mUnk_19C = new(HeapIndex_1) AdventureModeManager_19C(&GetAdventureModeManager()->mUnk_104);
}
void AdventureModeManager::vfunc_14() {
data_027e09a4->func_ov000_0207056c();
UnkStruct_027e0cf8::Create();
if (data_027e09a4->func_01ffd3d8()) {
this->mUnk_004.func_ov001_020bd734(&data_ov001_020c276c);
if (data_027e09a4->IsNotCutscene()) {
if (data_027e09a4->IsDarkRealm()) {
this->mUnk_004.func_0201c00c(6, 1);
} else {
this->mUnk_004.func_0201c00c(4, 1);
}
}
} else {
this->mUnk_004.func_ov001_020bd734(&data_ov001_020c27a8);
if (data_027e09a4->IsNotCutscene()) {
this->mUnk_004.func_0201c00c(0, 1);
}
}
if (data_027e09a4->func_01ffd3d8()) {
if (DSProt_DetectEmulator(AdventureModeManager::func_ov001_020c0194) == 0) {
AdventureModeManager::func_ov001_020c0104();
}
} else {
if (gOverlayManager.mLoadedOverlays[OverlaySlot_9] == OverlayIndex_PlayerSub) {
this->mUnk_1BC = new(HeapIndex_1) AdventureModeManager_1BC();
}
this->mUnk_1B8 = new(HeapIndex_1) AdventureModeManager_1B8(2, 1, 0);
if (data_027e09a4->IsNotCutscene()) {
this->mUnk_168 = new(HeapIndex_1) AdventureModeManager_168(&this->mUnk_104);
}
this->mUnk_188 = new(HeapIndex_1) AdventureModeManager_188(&this->mUnk_104);
if (gOverlayManager.mLoadedOverlays[OverlaySlot_6] == OverlayIndex_Land) {
this->mUnk_194 = new(HeapIndex_1) AdventureModeManager_194(&this->mUnk_104);
}
if (gOverlayManager.mLoadedOverlays[OverlaySlot_7] == OverlayIndex_Field) {
this->mUnk_198 = new(HeapIndex_1) AdventureModeManager_198(&this->mUnk_104);
}
if (gOverlayManager.mLoadedOverlays[OverlaySlot_8] == OverlayIndex_Village) {
this->mUnk_17C = new(HeapIndex_1) AdventureModeManager_17C(&this->mUnk_104);
this->mUnk_1A0 = new(HeapIndex_1) AdventureModeManager_1A0(&this->mUnk_104);
this->mUnk_1A4 = new(HeapIndex_1) AdventureModeManager_1A4(&this->mUnk_104);
}
if (data_027e09a4->IsCutscene()) {
this->mUnk_1A8 = new(HeapIndex_1) AdventureModeManager_1A8(&this->mUnk_104);
}
AdventureModeManager_1B0 *var_r5 = new(HeapIndex_1) AdventureModeManager_1B0();
this->mUnk_1B0 = var_r5;
if (data_027e09a4->IsNotCutscene()) {
//! TODO: fake match?
GameModeLinkListNode *pList = (GameModeLinkListNode *) &this->mUnk_104;
((GameModeLinkListNode *) ((u8 *) pList + 4))->func_020166cc(var_r5->GetNode());
var_r5->vfunc_18();
this->mUnk_1B5 = true;
}
if (data_027e09a4->IsCutscene()) {
this->mUnk_104.func_ov088_0217230c();
}
func_ov000_02066294();
}
func_ov024_020ccd1c();
if (data_027e09a4->IsNotCutscene()) {
GameModeManagerBase_104 *ptr = &this->mUnk_104;
GameModeLinkListNode *origin = data_ov024_020d8698->GetOrigin();
ptr->mList.func_020166cc(data_ov024_020d8698->GetNode());
((UnkStruct_020d8698 *) origin)->vfunc_18();
this->mUnk_1B4 = true;
}
this->mUnk_160 = new(HeapIndex_1) AdventureModeManager_160(&this->mUnk_104, this->mUnk_1B8);
this->mUnk_184 = new(HeapIndex_1) AdventureModeManager_184(&this->mUnk_104);
this->mUnk_174 = new(HeapIndex_1) AdventureModeManager_174(&this->mUnk_104);
this->mUnk_178 = new(HeapIndex_1) AdventureModeManager_178(&this->mUnk_104);
this->mUnk_180 = new(HeapIndex_1) AdventureModeManager_180(&this->mUnk_104);
this->mUnk_18C = new(HeapIndex_1) AdventureModeManager_18C(&this->mUnk_104);
this->mUnk_190 = new(HeapIndex_1) AdventureModeManager_190(&this->mUnk_104);
UnkStruct_ov024_020d8694::Create(&this->mUnk_004);
data_ov024_020d86a0->func_ov001_020bd818();
}
void AdventureModeManager::vfunc_18() {
delete this->mUnk_1B8;
this->mUnk_1B8 = NULL;
delete this->mUnk_160;
this->mUnk_160 = NULL;
delete this->mUnk_190;
this->mUnk_190 = NULL;
delete this->mUnk_18C;
this->mUnk_18C = NULL;
delete this->mUnk_180;
this->mUnk_180 = NULL;
delete this->mUnk_17C;
this->mUnk_17C = NULL;
delete this->mUnk_178;
this->mUnk_178 = NULL;
delete this->mUnk_174;
this->mUnk_174 = NULL;
delete this->mUnk_184;
this->mUnk_184 = NULL;
AdventureModeManager::func_ov001_020c083c();
if (data_ov024_020d8698 != NULL) {
AdventureModeManager::func_ov001_020c0894();
this->mUnk_1B4 = false;
}
if (data_027e09a4->func_01ffd3d8()) {
delete this->mUnk_16C;
this->mUnk_16C = NULL;
delete this->mUnk_19C;
this->mUnk_19C = NULL;
delete this->mUnk_164;
this->mUnk_164 = NULL;
} else {
if (data_027e09a4->IsCutscene()) {
AdventureModeManager::func_ov001_020c0824();
}
delete this->mUnk_1B0;
this->mUnk_1B0 = NULL;
this->mUnk_1B5 = false;
if (this->mUnk_168 != NULL) {
delete this->mUnk_168;
this->mUnk_168 = NULL;
}
delete this->mUnk_188;
this->mUnk_188 = NULL;
AdventureModeManager::func_ov001_020c0854();
delete this->mUnk_1BC;
this->mUnk_1BC = NULL;
delete this->mUnk_198;
this->mUnk_198 = NULL;
delete this->mUnk_194;
this->mUnk_194 = NULL;
if (gOverlayManager.mLoadedOverlays[8] == OverlayIndex_Village) {
delete this->mUnk_1A0;
this->mUnk_1A0 = NULL;
delete this->mUnk_1A4;
this->mUnk_1A4 = NULL;
}
if (data_027e09a4->IsCutscene()) {
delete this->mUnk_1A8;
this->mUnk_1A8 = NULL;
}
}
AdventureModeManager::func_ov001_020c0874();
this->mUnk_004.func_ov001_020bd784();
}
void AdventureModeManager::vfunc_1C() {
if (this->mUnk_1BC != NULL) {
this->mUnk_1BC->func_ov093_02175514();
}
data_ov024_020d8698->func_ov024_020cd094();
data_ov024_020d8698->func_ov024_020cd150();
if (!data_027e09a4->func_01ffd3d8()) {
this->mUnk_1B0->func_ov031_0210fad0();
}
}
void AdventureModeManager::vfunc_20() {
if (data_ov000_020b4f70 != NULL) {
data_ov000_020b4f70->func_ov000_020662e8();
}
this->func_ov024_020c699c();
data_ov024_020d8694->func_ov024_020cb0c4();
}
void AdventureModeManager::func_ov001_020c0824() {
if (data_ov088_02177218 != NULL) {
delete data_ov088_02177218;
}
}
void AdventureModeManager::func_ov001_020c083c() {
if (data_ov024_020d8694 != NULL) {
delete data_ov024_020d8694;
}
}
void AdventureModeManager::func_ov001_020c0854() {
if (data_ov000_020b4f70 != NULL) {
delete data_ov000_020b4f70;
}
}
void AdventureModeManager::func_ov001_020c0874() {
if (data_027e0cf8 != NULL) {
delete data_027e0cf8;
}
}
void AdventureModeManager::func_ov001_020c0894() {
if (data_ov024_020d8698 != NULL) {
delete data_ov024_020d8698;
}
}
UnkStruct_ov000_020b4f70::~UnkStruct_ov000_020b4f70() {
data_ov000_020b4f70 = NULL;
}
AdventureModeManager_15C::AdventureModeManager_15C() :
mUnk_00(0),
mUnk_20(&this->mUnk_04) {
this->mUnk_44 = 0;
this->mUnk_45 = 0;
this->mUnk_46 = 0;
this->mUnk_47 = 0;
unk32 value = data_0204999c.func_02013014();
this->mUnk_20.mUnk_00 = new(HeapIndex_1) AdventureModeManager_15C_20_00(0);
data_0204999c.func_020130d4(value);
}
AdventureModeManager_15C::~AdventureModeManager_15C() {
delete this->mUnk_20.mUnk_00;
}
THUMB_END
@@ -0,0 +1,26 @@
#include "Game/Game.hpp"
#include "Game/GameModeAdventure.hpp"
#include "MainGame/AdventureMode.hpp"
#include "Unknown/UnkStruct_0204a110.hpp"
extern "C" {
void *func_ov001_020b6520(unk32 param1);
void func_ov020_020c4ac0(void *);
void func_0201659c();
}
extern int data_ov001_020c27a8;
extern int data_ov001_020c276c;
THUMB_BEGIN
GameModeAdventure::GameModeAdventure() {
func_0201659c();
gGame.func_02013370(2);
data_0204a110.func_ov001_020bd514(0, AdventureModeManager::Create, 0, 1);
gSaveManager.func_ov001_020ba670();
gSaveManager.func_ov001_020ba7a8();
func_ov020_020c4ac0(func_ov001_020b6520(0));
}
THUMB_END
+2 -2
View File
@@ -5,11 +5,11 @@
#include "Unknown/UnkStruct_027e09a4.hpp"
THUMB void ItemManager::func_ov001_020bb9f8() {
if (data_027e09a4->mUnk_0C != 1 && gOverlayManager.mLoadedOverlays[OverlaySlot_10] != OverlayIndex_PlayerPhantom) {
if (data_027e09a4->IsNotCutscene() && gOverlayManager.mLoadedOverlays[OverlaySlot_10] != OverlayIndex_PlayerPhantom) {
this->mTearsAmount = 0;
}
CourseEntry *pEntry = data_027e09a0->func_ov000_0207029c(data_027e09a4->mSceneIndex);
CourseEntry *pEntry = data_027e09a0->GetCourseEntry(data_027e09a4->mUnk_00.mSceneIndex);
if (pEntry->mSaveCourseIndex < SaveCourseIndex_Max) {
this->mKeyAmount = gSaveManager.mUnk_000->mUnk_36[pEntry->mSaveCourseIndex].mKeyAmount;
+4 -11
View File
@@ -26,7 +26,7 @@ inline bool Test3(s32 val) {
bool ret = true;
if (!Test2(val)) {
if (*((volatile unk32 *) &data_027e09a4->mSceneIndex) != 36) {
if (*((volatile unk32 *) &data_027e09a4->mUnk_00.mSceneIndex) != 36) {
ret = false;
}
}
@@ -36,11 +36,11 @@ inline bool Test3(s32 val) {
// https://decomp.me/scratch/svwnb
bool PassengerManager::func_ov001_020bf870() {
s32 sceneIndex = data_027e09a4->mSceneIndex;
s32 sceneIndex = data_027e09a4->mUnk_00.mSceneIndex;
bool ret = true;
if (!Test3(sceneIndex)) {
if (*((volatile unk32 *) &data_027e09a4->mSceneIndex) != 37) {
if (*((volatile unk32 *) &data_027e09a4->mUnk_00.mSceneIndex) != 37) {
ret = false;
}
}
@@ -78,13 +78,6 @@ bool PassengerManager::func_ov001_020bfa1c() {
return !((date2 << 0x1B) & 1);
}
void PassengerManager::SetInstance(PassengerManager *pInstance) {
gpPassengerManager = pInstance;
}
bool PassengerManager::ClearInstance() {
gpPassengerManager = NULL;
//! @bug missing return
}
DECL_INSTANCE(PassengerManager, gpPassengerManager);
THUMB_END
+1 -1
View File
@@ -172,7 +172,7 @@ void CargoManager::RemoveAmount(unk32 decr) {
}
bool CargoManager::func_ov017_020bec9c() {
if (data_027e09a4->func_01ffd3d8() != 0) {
if (data_027e09a4->func_01ffd3d8()) {
return data_027e0cd8->mUnk_0C->mUnk_160->func_ov026_02106aa8();
}
+2 -2
View File
@@ -96,9 +96,9 @@ ARM void UnkStruct_02011e10::func_ov018_020c4980() {
this->mUnk_00[HeapIndex_Main] = func_020012e0(arenaLo, arenaHi - arenaLo, 2);
unk32 length = func_0202d624(NULL, 0);
void *ptr = ::operator new(length, 0);
void *ptr = ::operator new(length, 0, 4);
func_0202d624(ptr, length);
ptr = ::operator new(0xBE000, 0);
ptr = ::operator new(0xBE000, 0, 4);
void *uVar3 = func_02001fd4(ptr, 0xBE000);
this->mUnk_24[0] = (unk32) uVar3;
+1 -1
View File
@@ -44,7 +44,7 @@ ARM UnkSubStruct9::UnkSubStruct9(stack_struct1 param1) :
}
stack = &this->mUnk_004;
func_020166cc(&this->mUnk_004.mUnk_04, &stack, param1.param1);
func_020166cc(&this->mUnk_004, &stack, param1.param1);
this->mUnk_004.mUnk_2C = 1;
}
+77 -77
View File
@@ -30,15 +30,15 @@ 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,
};
static const UnkStruct_ov019_020d1e70 data_ov019_020d1e70;
UnkStruct_ov019_020d1e94 UnkStruct_ov019_020d1e70::data_ov019_020d1e94 = {
0x00, 0x00, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14,
};
static const UnkStruct_ov019_020d1e70 data_ov019_020d1e70;
UnkStruct_ov019_020d1e4c UnkStruct_ov019_020d1e70::data_ov019_020d1e4c = {
0x14, 0x14, 0x14, 0x04, 0x03, -0x47, 0x00, 0x0281, -0x47, {0x00, 0x00}, 0x0281,
};
static PTMF<FileSelectMain> data_ov019_020d1f94[FileSelectState_Max] = {
FileSelectMain::func_ov019_020c8290, // FileSelectState_Unk_00
@@ -66,32 +66,6 @@ static PTMF<FileSelectMain> data_ov019_020d1f94[FileSelectState_Max] = {
FileSelectMain::func_ov019_020c80f4, // FileSelectState_OptionsFromChooseMode
};
static PTMF<FileSelectMain> data_ov019_020d1edc[FileSelectState_Max] = {
FileSelectMain::func_ov019_020c6d0c, // FileSelectState_Unk_00
FileSelectMain::func_ov019_020c6d48, // FileSelectState_Init
FileSelectMain::func_ov019_020c6e14, // FileSelectState_SlotSelectIdle
FileSelectMain::func_ov019_020c717c, // FileSelectState_SlotSelectToFileManager
FileSelectMain::func_ov019_020c71f0, // FileSelectState_FileManagerFromSlotSelect
FileSelectMain::func_ov019_020c7210, // FileSelectState_FileManagerToSlotSelect
FileSelectMain::func_ov019_020c71d0, // FileSelectState_SlotSelectFromFileManager
FileSelectMain::func_ov019_020c7274, // FileSelectState_FileManagerIdle
FileSelectMain::func_ov019_020c7768, // FileSelectState_FileManagerToChooseMode
FileSelectMain::func_ov019_020c77b8, // FileSelectState_ChooseModeFromFileManager
FileSelectMain::func_ov019_020c7804, // FileSelectState_ChooseModeToFileManager
FileSelectMain::func_ov019_020c7858, // FileSelectState_FileManagerFromChooseMode
FileSelectMain::func_ov019_020c7878, // FileSelectState_ChooseModeIdle
FileSelectMain::func_ov019_020c78ac, // FileSelectState_ChooseModeToEnterGameMode
FileSelectMain::func_ov019_020c7910, // FileSelectState_EnterGameMode
FileSelectMain::func_ov019_020c7c3c, // FileSelectState_SlotSelectToNewFile
FileSelectMain::func_ov019_020c7c48, // FileSelectState_NewFileToSlotSelect
FileSelectMain::func_ov019_020c7c70, // FileSelectState_FileManagerToCopyErase
FileSelectMain::func_ov019_020c7d3c, // FileSelectState_CopyEraseFromFileManager
FileSelectMain::func_ov019_020c80dc, // FileSelectState_ChooseModeToContactMode
FileSelectMain::func_ov019_020c80e8, // FileSelectState_OptionsToChooseMode
FileSelectMain::func_ov019_020c6d08, // FileSelectState_NewFileFromSlotSelect
FileSelectMain::func_ov019_020c6d08, // FileSelectState_OptionsFromChooseMode
};
static PTMF<FileSelectMain> data_ov019_020d204c[FileSelectState_Max] = {
FileSelectMain::func_ov019_020cb26c, // FileSelectState_Unk_00
FileSelectMain::func_ov019_020cb4bc, // FileSelectState_Init
@@ -118,6 +92,32 @@ static PTMF<FileSelectMain> data_ov019_020d204c[FileSelectState_Max] = {
FileSelectMain::func_ov019_020cb268, // FileSelectState_OptionsFromChooseMode
};
static PTMF<FileSelectMain> data_ov019_020d1edc[FileSelectState_Max] = {
FileSelectMain::func_ov019_020c6d0c, // FileSelectState_Unk_00
FileSelectMain::func_ov019_020c6d48, // FileSelectState_Init
FileSelectMain::func_ov019_020c6e14, // FileSelectState_SlotSelectIdle
FileSelectMain::func_ov019_020c717c, // FileSelectState_SlotSelectToFileManager
FileSelectMain::func_ov019_020c71f0, // FileSelectState_FileManagerFromSlotSelect
FileSelectMain::func_ov019_020c7210, // FileSelectState_FileManagerToSlotSelect
FileSelectMain::func_ov019_020c71d0, // FileSelectState_SlotSelectFromFileManager
FileSelectMain::func_ov019_020c7274, // FileSelectState_FileManagerIdle
FileSelectMain::func_ov019_020c7768, // FileSelectState_FileManagerToChooseMode
FileSelectMain::func_ov019_020c77b8, // FileSelectState_ChooseModeFromFileManager
FileSelectMain::func_ov019_020c7804, // FileSelectState_ChooseModeToFileManager
FileSelectMain::func_ov019_020c7858, // FileSelectState_FileManagerFromChooseMode
FileSelectMain::func_ov019_020c7878, // FileSelectState_ChooseModeIdle
FileSelectMain::func_ov019_020c78ac, // FileSelectState_ChooseModeToEnterGameMode
FileSelectMain::func_ov019_020c7910, // FileSelectState_EnterGameMode
FileSelectMain::func_ov019_020c7c3c, // FileSelectState_SlotSelectToNewFile
FileSelectMain::func_ov019_020c7c48, // FileSelectState_NewFileToSlotSelect
FileSelectMain::func_ov019_020c7c70, // FileSelectState_FileManagerToCopyErase
FileSelectMain::func_ov019_020c7d3c, // FileSelectState_CopyEraseFromFileManager
FileSelectMain::func_ov019_020c80dc, // FileSelectState_ChooseModeToContactMode
FileSelectMain::func_ov019_020c80e8, // FileSelectState_OptionsToChooseMode
FileSelectMain::func_ov019_020c6d08, // FileSelectState_NewFileFromSlotSelect
FileSelectMain::func_ov019_020c6d08, // FileSelectState_OptionsFromChooseMode
};
const unk32 data_ov019_020d1bbc[] = {0x00000000, 0x00000000, 0x00000000, 0x00000001};
//! TODO: move to class
@@ -156,7 +156,7 @@ ARM FileSelectMain::FileSelectMain() :
params.param1 = &this->mUnk_0C;
this->mUnk_03E0.Init(&params);
this->mUnk_0C.mList.func_020166cc(&this->mUnk_0100.mUnk_04);
this->mUnk_0C.mList.func_020166cc(&this->mUnk_0100);
this->mUnk_0100.mUnk_2A = 0;
this->mUnk_0488.mUnk_2C = 1;
this->mUnk_07E4.mUnk_2C = 1;
@@ -188,7 +188,7 @@ ARM FileSelectMain::FileSelectMain() :
REG_DISPCNT &= 0xFFFFE0FF;
REG_DISPCNT |= 0x00001C00;
_G2_SetBlend(&REG_BLDCNT, 4, 8, 0, 0x10);
this->mUnk_0C.mList.func_020166cc(&this->mUnk_005C.mUnk_04);
this->mUnk_0C.mList.func_020166cc(&this->mUnk_005C);
this->func_ov019_020c63dc();
this->func_ov019_020c6d10();
}
@@ -200,31 +200,31 @@ ARM FileSelectMain::~FileSelectMain() {
ARM void FileSelectMain::func_ov019_020c6c14() {}
ARM void FileSelectMain::func_ov019_020c6c18() {
this->mUnk_0C.mList.func_020166cc(&this->mUnk_0488.mUnk_04);
this->mUnk_0C.mList.func_020166cc(&this->mUnk_07E4.mUnk_04);
this->mUnk_0C.mList.func_020166cc(&this->mUnk_0AC4.mUnk_04);
this->mUnk_0C.mList.func_020166cc(&this->mUnk_0488);
this->mUnk_0C.mList.func_020166cc(&this->mUnk_07E4);
this->mUnk_0C.mList.func_020166cc(&this->mUnk_0AC4);
}
ARM void FileSelectMain::func_ov019_020c6c54() {
this->mUnk_0C.mList.func_020166cc(&this->mUnk_0DA4.mUnk_04);
this->mUnk_0C.mList.func_020166cc(&this->mUnk_11BC.mUnk_04);
this->mUnk_0C.mList.func_020166cc(&this->mUnk_15D4.mUnk_04);
this->mUnk_0C.mList.func_020166cc(&this->mUnk_18EC.mUnk_04);
this->mUnk_0C.mList.func_020166cc(&this->mUnk_0DA4);
this->mUnk_0C.mList.func_020166cc(&this->mUnk_11BC);
this->mUnk_0C.mList.func_020166cc(&this->mUnk_15D4);
this->mUnk_0C.mList.func_020166cc(&this->mUnk_18EC);
}
ARM void FileSelectMain::func_ov019_020c6c9c() {}
ARM void FileSelectMain::func_ov019_020c6ca0() {
GameModeLinkListNode::func_020166ac(&this->mUnk_0488.mUnk_04);
GameModeLinkListNode::func_020166ac(&this->mUnk_07E4.mUnk_04);
GameModeLinkListNode::func_020166ac(&this->mUnk_0AC4.mUnk_04);
GameModeLinkListNode::func_020166ac(&this->mUnk_0488);
GameModeLinkListNode::func_020166ac(&this->mUnk_07E4);
GameModeLinkListNode::func_020166ac(&this->mUnk_0AC4);
}
ARM void FileSelectMain::func_ov019_020c6cd0() {
GameModeLinkListNode::func_020166ac(&this->mUnk_0DA4.mUnk_04);
GameModeLinkListNode::func_020166ac(&this->mUnk_11BC.mUnk_04);
GameModeLinkListNode::func_020166ac(&this->mUnk_15D4.mUnk_04);
GameModeLinkListNode::func_020166ac(&this->mUnk_18EC.mUnk_04);
GameModeLinkListNode::func_020166ac(&this->mUnk_0DA4);
GameModeLinkListNode::func_020166ac(&this->mUnk_11BC);
GameModeLinkListNode::func_020166ac(&this->mUnk_15D4);
GameModeLinkListNode::func_020166ac(&this->mUnk_18EC);
}
ARM void FileSelectMain::func_ov019_020c6d08() {}
@@ -981,10 +981,10 @@ ARM void FileSelectMain::func_ov019_020c7dc8() {
Vec2us sp10_sp12[2]; // sp4 sp6 sp10 sp12
if (this->mState == FileSelectState_ChooseModeToContactMode) {
UnkSystem2_UnkSubSystem1_Derived2 *pUVar5 = this->mUnk_03E8[this->mSaveSlotIndex].mUnk_04;
sp10_sp12[0].x = pUVar5->mPos.x + data_ov019_020d1e70.mUnk_20.x;
sp10_sp12[0].y = pUVar5->mPos.y + data_ov019_020d1e70.mUnk_20.y;
sp10_sp12[1] = sp10_sp12[0];
UnkSystem2_UnkSubSystem1_Base *pUVar5 = this->mUnk_03E8[this->mSaveSlotIndex].mUnk_04;
sp10_sp12[0].x = pUVar5->mPos.x + data_ov019_020d1e70.mUnk_20.x;
sp10_sp12[0].y = pUVar5->mPos.y + data_ov019_020d1e70.mUnk_20.y;
sp10_sp12[1] = sp10_sp12[0];
var_r1 = UnkStruct_ov019_020d1e70::data_ov019_020d1e4c.mUnk_14;
var_r2 = UnkStruct_ov019_020d1e70::data_ov019_020d1e4c.mUnk_18;
@@ -1126,7 +1126,7 @@ ARM void FileSelectMain::vfunc_08(Input *pButtons, TouchControl *pTouchControl)
}
CALL_PTMF(PTMF<FileSelectMain>, data_ov019_020d1f94[this->mState]);
this->mUnk_002C.UnkOperations3();
this->mUnk_002C.UpdateLogic();
REG_BLDALPHA = this->mUnk_002C.func_0201eaa0() | 0x1000;
}
@@ -1138,7 +1138,7 @@ ARM void FileSelectMain::func_ov019_020c8290() {
// non-matching
ARM void FileSelectMain::func_ov019_020c82c4() {
this->mUnk_039C.UnkOperations(&this->mUnk_0100.mPos, true);
this->mUnk_039C.Update(&this->mUnk_0100.mPos);
if (!this->func_ov019_020cb238() && this->mUnk_039C.mUnk_0C) {
this->SetState(FileSelectState_SlotSelectIdle);
@@ -1180,10 +1180,10 @@ ARM void FileSelectMain::func_ov019_020c854c() {
this->GetUnk03E0(i).mUnk_004.mUnk_2A = false;
}
this->mUnk_075C.UnkOperations2(&this->mUnk_0488.mPos, true);
this->mUnk_0A80.UnkOperations2(&this->mUnk_07E4.mPos, true);
this->mUnk_0D60.UnkOperations2(&this->mUnk_0AC4.mPos, true);
this->mUnk_00BC.UnkOperations2(&this->mUnk_005C.mPos, true);
this->mUnk_075C.Update(&this->mUnk_0488.mPos);
this->mUnk_0A80.Update(&this->mUnk_07E4.mPos);
this->mUnk_0D60.Update(&this->mUnk_0AC4.mPos);
this->mUnk_00BC.Update(&this->mUnk_005C.mPos);
}
ARM void FileSelectMain::func_ov019_020c8aac() {
@@ -1250,11 +1250,11 @@ ARM void FileSelectMain::func_ov019_020c8c4c() {
this->GetUnk03E0(i).mUnk_004.mUnk_2A = false;
}
this->mUnk_039C.UnkOperations2(&this->mUnk_0100.mPos, true);
this->mUnk_07A0.UnkOperations2(&this->mUnk_0488.mPos, true);
this->mUnk_0A80.UnkOperations2(&this->mUnk_07E4.mPos, true);
this->mUnk_0D60.UnkOperations2(&this->mUnk_0AC4.mPos, true);
this->mUnk_00BC.UnkOperations2(&this->mUnk_005C.mPos, true);
this->mUnk_039C.Update(&this->mUnk_0100.mPos);
this->mUnk_07A0.Update(&this->mUnk_0488.mPos);
this->mUnk_0A80.Update(&this->mUnk_07E4.mPos);
this->mUnk_0D60.Update(&this->mUnk_0AC4.mPos);
this->mUnk_00BC.Update(&this->mUnk_005C.mPos);
}
ARM void FileSelectMain::func_ov019_020c92dc() {
@@ -1262,9 +1262,9 @@ ARM void FileSelectMain::func_ov019_020c92dc() {
this->GetUnk03E0(i).mUnk_004.mUnk_2A = false;
}
this->mUnk_00BC.UnkOperations2(&this->mUnk_005C.mPos, true);
this->mUnk_00BC.Update(&this->mUnk_005C.mPos);
this->mUnk_1078.UnkOperations2(&this->mUnk_0DA4.mPos, true);
this->mUnk_1078.Update(&this->mUnk_0DA4.mPos);
UnkStruct_ov019_020d24c8_28_258 local_30(0x8B, 0x06);
Vec2s local_5c;
Vec2s local_58;
@@ -1273,7 +1273,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.UnkOperations2(&this->mUnk_11BC.mPos, true);
this->mUnk_1490.Update(&this->mUnk_11BC.mPos);
UnkStruct_ov019_020d24c8_28_258 local_48(0x8B, 0x06);
Vec2s local_60;
Vec2s local_64;
@@ -1282,8 +1282,8 @@ 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.UnkOperations2(&this->mUnk_15D4.mPos, true);
this->mUnk_1BC0.UnkOperations2(&this->mUnk_18EC.mPos, true);
this->mUnk_18A8.Update(&this->mUnk_15D4.mPos);
this->mUnk_1BC0.Update(&this->mUnk_18EC.mPos);
this->mUnk_1144.func_ov000_020609c4();
this->mUnk_155C.func_ov000_020609c4();
@@ -1378,9 +1378,9 @@ ARM void FileSelectMain::func_ov019_020c9d88() {
}
ARM void FileSelectMain::func_ov019_020c9e08() {
this->mUnk_00BC.UnkOperations2(&this->mUnk_005C.mPos, true);
this->mUnk_00BC.Update(&this->mUnk_005C.mPos);
this->mUnk_1100.UnkOperations2(&this->mUnk_0DA4.mPos, true);
this->mUnk_1100.Update(&this->mUnk_0DA4.mPos);
UnkStruct_ov019_020d24c8_28_258 local_30(0x8B, 0x06);
Vec2s local_5c;
Vec2s local_58;
@@ -1389,7 +1389,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.UnkOperations2(&this->mUnk_11BC.mPos, true);
this->mUnk_1518.Update(&this->mUnk_11BC.mPos);
UnkStruct_ov019_020d24c8_28_258 local_48(0x8B, 0x05);
Vec2s local_6c;
Vec2s local_68;
@@ -1398,8 +1398,8 @@ 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.UnkOperations2(&this->mUnk_15D4.mPos, true);
this->mUnk_1BC0.UnkOperations2(&this->mUnk_18EC.mPos, true);
this->mUnk_18A8.Update(&this->mUnk_15D4.mPos);
this->mUnk_1BC0.Update(&this->mUnk_18EC.mPos);
this->mUnk_1144.func_ov000_020609c4();
this->mUnk_155C.func_ov000_020609c4();
@@ -1414,7 +1414,7 @@ ARM void FileSelectMain::func_ov019_020c9e08() {
}
ARM void FileSelectMain::func_ov019_020ca6a4() {
this->mUnk_039C.UnkOperations(&this->mUnk_0100.mPos, true);
this->mUnk_039C.Update(&this->mUnk_0100.mPos);
}
ARM void FileSelectMain::func_ov019_020ca80c() {
@@ -1465,9 +1465,9 @@ ARM void FileSelectMain::func_ov019_020ca940() {
this->GetUnk03E0(i).mUnk_004.mUnk_2A = false;
}
this->mUnk_00BC.UnkOperations2(&this->mUnk_005C.mPos, true);
this->mUnk_00BC.Update(&this->mUnk_005C.mPos);
this->mUnk_1100.UnkOperations2(&this->mUnk_0DA4.mPos, true);
this->mUnk_1100.Update(&this->mUnk_0DA4.mPos);
UnkStruct_ov019_020d24c8_28_258 local_30(0x8B, 0x06);
Vec2s local_5c;
Vec2s local_58;
@@ -1476,7 +1476,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.UnkOperations2(&this->mUnk_11BC.mPos, true);
this->mUnk_1518.Update(&this->mUnk_11BC.mPos);
UnkStruct_ov019_020d24c8_28_258 local_48(0x8B, 0x05);
Vec2s local_6c;
Vec2s local_68;
@@ -1485,8 +1485,8 @@ 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.UnkOperations2(&this->mUnk_15D4.mPos, true);
this->mUnk_1BC0.UnkOperations2(&this->mUnk_18EC.mPos, true);
this->mUnk_18A8.Update(&this->mUnk_15D4.mPos);
this->mUnk_1BC0.Update(&this->mUnk_18EC.mPos);
this->mUnk_1144.func_ov000_020609c4();
this->mUnk_155C.func_ov000_020609c4();
+3 -3
View File
@@ -41,9 +41,9 @@ ARM void FileSelectManager_160::vfunc_0C(unk32 param1) {
}
}
ARM void FileSelectManager_160::vfunc_14() {}
ARM void FileSelectManager_160::vfunc_14(unk32 param1) {}
ARM void FileSelectManager_160::vfunc_10() {
ARM void FileSelectManager_160::vfunc_10(unk32 param1, unk32 param2) {
data_0204999c.func_02013014();
data_0204999c.mUnk_60 = 0xD6D8;
data_0204a088->func_ov000_02061248();
@@ -80,7 +80,7 @@ ARM void FileSelectManager_160::vfunc_1C(unk32 param1) {
}
}
ARM void FileSelectManager_160::vfunc_20() {
ARM void FileSelectManager_160::vfunc_20(unk32 param1, unk32 param2) {
data_0204999c.func_02013014();
data_0204999c.mUnk_60 = 0xD6D8;
this->mUnk_14 = NULL;
+4 -5
View File
@@ -2,7 +2,6 @@
#include "FileSelect/FileSelectOptionsManager.hpp"
#include "Unknown/UnkStruct_0204a088.hpp"
#include "Unknown/UnkStruct_0204a110.hpp"
#include "Unknown/UnkStruct_0204aeec.hpp"
#include "Unknown/UnkStruct_ov000_020b50c0.hpp"
ARM FileSelectManager_164::FileSelectManager_164(GameModeManagerBase_104 *param1, FileSelectMain *param2) {
@@ -44,9 +43,9 @@ ARM void FileSelectManager_164::vfunc_0C(unk32 param1) {
}
}
ARM void FileSelectManager_164::vfunc_14() {}
ARM void FileSelectManager_164::vfunc_14(unk32 param1) {}
ARM void FileSelectManager_164::vfunc_10() {
ARM void FileSelectManager_164::vfunc_10(unk32 param1, unk32 param2) {
data_0204999c.func_02013014();
data_0204999c.mUnk_60 = 0xD6D8;
data_ov000_020b50c0.func_ov000_0206a758();
@@ -66,7 +65,7 @@ ARM void FileSelectManager_164::vfunc_18(unk32 param1) {
if (param1 == 0) {
this->mUnk_0C = 1;
gpFSOptionsManager->func_ov019_020cc85c(2);
data_0204aeec.func_0201e698();
data_0204a110.GetUnkDDC()->func_0201e698();
}
}
@@ -90,7 +89,7 @@ ARM void FileSelectManager_164::vfunc_1C(unk32 param1) {
}
}
ARM void FileSelectManager_164::vfunc_20() {
ARM void FileSelectManager_164::vfunc_20(unk32 param1, unk32 param2) {
data_0204999c.func_02013014();
data_0204999c.mUnk_60 = 0xD6D8;
FileSelectManager_164::func_ov019_020d02f4();
+2 -3
View File
@@ -55,7 +55,7 @@ ARM FileSelectMicTest::FileSelectMicTest() :
mUnk_304(BTN_ID_RETURN, 0x8E, 0x00, 0x01, 0x8E, 0x00),
mUnk_3F8(0x8D, 0x01),
mUnk_630(1) {
this->mUnk_0C.mList.func_020166cc(&this->mUnk_304.mUnk_044.mUnk_04);
this->mUnk_0C.mList.func_020166cc(&this->mUnk_304.mUnk_044);
this->mUnk_020.func_0201f730(BMG_ID(BMGGroup_select, 0x06));
this->mUnk_3F8.mUnk_14E = 1;
this->mUnk_3F8.func_0201f730(BMG_ID(BMGGroup_select, 0x43));
@@ -131,7 +131,6 @@ ARM void FileSelectMicTest::func_ov019_020ceaac() {
}
ARM void FileSelectMicTest::func_ov019_020cebcc() {
this->mUnk_304.mUnk_000.mUnk_0A = false;
this->mUnk_304.mUnk_000.mUnk_0B = true;
this->mUnk_304.mUnk_000.mUnk_0C = false;
@@ -181,7 +180,7 @@ ARM void FileSelectMicTest::vfunc_08(Input *pButtons, TouchControl *pTouchContro
}
if (this->mState - 1 <= FSMicTestState_OptionsToMicTest) {
this->mUnk_304.mUnk_000.UnkOperations(NULL, false);
this->mUnk_304.mUnk_000.UpdateLogic();
UnkStruct_ov019_020d24c8_28_258 local_2c(0x8D, 0x01);
volatile Vec2us result;
+12 -12
View File
@@ -179,10 +179,10 @@ ARM FileSelectOptions::FileSelectOptions(s32 saveSlotIndex) :
mUnk_1A68(&mUnk_19D0),
mUnk_1AB8(&mUnk_19D0, 0x8C, 0x09, BMG_ID(BMGGroup_select, 0x07)) {
this->mUnk_1CF5 = false;
this->mUnk_0C.mList.func_020166cc(&this->mUnk_10A8.mUnk_04);
this->mUnk_0C.mList.func_020166cc(&this->mUnk_19D0.mUnk_04);
this->mUnk_0C.mList.func_020166cc(&this->mUnk_1388.mUnk_04);
this->mUnk_0C.mList.func_020166cc(&this->mUnk_16AC.mUnk_04);
this->mUnk_0C.mList.func_020166cc(&this->mUnk_10A8);
this->mUnk_0C.mList.func_020166cc(&this->mUnk_19D0);
this->mUnk_0C.mList.func_020166cc(&this->mUnk_1388);
this->mUnk_0C.mList.func_020166cc(&this->mUnk_16AC);
this->mUnk_10A8.mUnk_2A = false;
this->mUnk_1388.mUnk_2C = true;
this->mUnk_16AC.mUnk_2C = true;
@@ -505,11 +505,11 @@ ARM void FileSelectOptions::func_ov019_020cd7f8() {
}
ARM void FileSelectOptions::func_ov019_020cd8d4() {
this->mUnk_1064.UnkOperations(&this->mUnk_0024.mUnk_004, true);
this->mUnk_1064.Update(&this->mUnk_0024.mUnk_004);
this->mUnk_1420.func_ov000_02063f64();
this->mUnk_1744.func_ov000_02063f64();
this->mUnk_1A68.func_ov000_02063f64();
this->mUnk_1344.UnkOperations2(&this->mUnk_10A8.mPos, true);
this->mUnk_1344.Update(&this->mUnk_10A8.mPos);
}
ARM bool FileSelectOptions::func_ov019_020cdbdc() {
@@ -634,12 +634,12 @@ ARM UnkStruct_ov019_020d24c8_2C_24::UnkStruct_ov019_020d24c8_2C_24(GameModeManag
this->mUnk_FC3[0].mUnk_00 = *src;
this->mUnk_103E = pSaveSub17->mUnk_7E;
param1->mList.func_020166cc(&this->mUnk_490.mUnk_04);
param1->mList.func_020166cc(&this->mUnk_4F0.mUnk_04);
param1->mList.func_020166cc(&this->mUnk_9C0.mUnk_04);
param1->mList.func_020166cc(&this->mUnk_A20.mUnk_04);
param1->mList.func_020166cc(&this->mUnk_EF0.mUnk_04);
param1->mList.func_020166cc(&this->mUnk_F50.mUnk_04);
param1->mList.func_020166cc(&this->mUnk_490);
param1->mList.func_020166cc(&this->mUnk_4F0);
param1->mList.func_020166cc(&this->mUnk_9C0);
param1->mList.func_020166cc(&this->mUnk_A20);
param1->mList.func_020166cc(&this->mUnk_EF0);
param1->mList.func_020166cc(&this->mUnk_F50);
this->mUnk_490.mPosOffset.x = 0;
this->mUnk_490.mPosOffset.y = 0;
+1 -1
View File
@@ -23,7 +23,7 @@ ARM GameModeFileSelect *GameModeFileSelect::Create() {
ARM GameModeFileSelect::~GameModeFileSelect() {
data_0204a088->func_ov000_02061098();
gSaveManager.func_ov000_020ba7c8(this->mSaveSlotIndex);
gSaveManager.func_ov001_020ba7c8(this->mSaveSlotIndex);
data_ov000_020b504c.func_ov001_020be6f4();
data_02049bd4.func_02014c60(2);
data_ov000_020b51b8.func_ov000_0206d0bc(1);
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,150 @@
#include "MainGame/AdventureMode.hpp"
#include "Message/BMG.hpp"
#include "Unknown/UnkStruct_0204a088.hpp"
#include "Unknown/UnkStruct_0204a110.hpp"
#include "Unknown/UnkStruct_0204e5f8.hpp"
#include "Unknown/UnkStruct_027e09a4.hpp"
#include "Unknown/UnkStruct_ov000_020b5214.hpp"
#include "Unknown/UnkStruct_ov024_020d8660.hpp"
#include "regs.h"
#include "versions.h"
extern "C" void GX_func_0008(void *, unk32, unk32);
AdventureModeManager_15C_20_00::AdventureModeManager_15C_20_00(bool param1) :
mUnk_778(false),
mUnk_779(param1),
mUnk_77A(-1) {
if (param1 != 0) {
this->mUnk_1B8.mUnk_20 = 2;
this->mUnk_250.mUnk_20 = 2;
this->mUnk_020 = &this->mUnk_1B8;
this->mUnk_024 = &this->mUnk_250;
this->mUnk_01C = 3;
} else {
this->mUnk_0F8.mUnk_20 = 2;
this->mUnk_158.mUnk_20 = 2;
this->mUnk_020 = &this->mUnk_0F8;
this->mUnk_024 = &this->mUnk_158;
this->mUnk_01C = 0;
}
this->mUnk_0C.mList.func_020166cc(this->mUnk_020);
this->mUnk_0C.mList.func_020166cc(this->mUnk_024);
this->mUnk_028.mUnk_04 = this->mUnk_020;
this->mUnk_078.mUnk_04 = this->mUnk_024;
}
void AdventureModeManager_15C_20_00::func_ov024_020ca48c() {
if (this->mUnk_779) {
this->mUnk_1B8.func_ov000_02063a3c(0x28, 0x57, 0, 0x0A, 0x57, 0);
this->mUnk_250.func_ov000_02063a3c(0x29, 0x57, 1, 0x0B, 0x57, 1);
this->mUnk_300.func_ov000_02062f18(this->mUnk_020, 0x57, 0);
this->mUnk_53C.func_ov000_02062f18(this->mUnk_024, 0x57, 1);
this->mUnk_2E8.UnknownAction(0x57, 0x02);
} else {
this->mUnk_0F8.func_ov000_020633c0(0x28, 0x56, 1, 0x03, 0x56, 1);
this->mUnk_158.func_ov000_020633c0(0x29, 0x56, 2, 0x03, 0x56, 0);
this->mUnk_300.func_ov000_02062f18(this->mUnk_020, 0x56, 0);
this->mUnk_53C.func_ov000_02062f18(this->mUnk_024, 0x56, 1);
}
}
void AdventureModeManager_15C_20_00::func_ov024_020ca5c8() {
this->mUnk_020->mUnk_2B = true;
this->mUnk_020->mUnk_2A = true;
this->mUnk_024->mUnk_2B = true;
this->mUnk_024->mUnk_2A = true;
if (data_ov024_020d8660 != NULL && data_ov024_020d8660->mUnk_00 != NULL) {
this->mUnk_300.mUnk_04.func_0201f730(BMG_ID(BMGGroup_maingame, MsgIndex_Continue1));
this->mUnk_53C.mUnk_04.func_0201f730(BMG_ID(BMGGroup_maingame, MsgIndex_MiniGameQuit));
} else {
this->mUnk_300.mUnk_04.func_0201f730(BMG_ID(BMGGroup_maingame, MsgIndex_Continue1));
this->mUnk_53C.mUnk_04.func_0201f730(BMG_ID(BMGGroup_maingame, MsgIndex_SaveAndQuit1));
}
this->mUnk_778 = true;
}
void AdventureModeManager_15C_20_00::func_ov024_020ca658() {
if (this->mUnk_778) {
this->mUnk_020->mUnk_2B = false;
this->mUnk_020->mUnk_2A = false;
this->mUnk_024->mUnk_2B = false;
this->mUnk_024->mUnk_2A = false;
this->mUnk_53C.mUnk_04.func_0201f498();
this->mUnk_300.mUnk_04.func_0201f498();
this->mUnk_778 = false;
}
}
void AdventureModeManager_15C_20_00::vfunc_08(Input *pButtons, TouchControl *pTouchControl) {
switch (this->mUnk_01C) {
case 1:
case 2:
this->mUnk_028.func_ov000_02063f64();
this->mUnk_078.func_ov000_02063f64();
if (!this->mUnk_779 && !this->mUnk_0C8.mUnk_0C) {
this->mUnk_0C8.UpdateLogic();
#if IS_JP
GX_func_0008(&REG_BLDCNT, 0x2F, this->mUnk_0C8.func_0201edbc());
if (data_0204a110.mUnk_008 != 1) {
GX_func_0008(&REG_BLDCNT_SUB, 0x3F, this->mUnk_0C8.func_0201edbc());
}
#else
GX_func_0008(&REG_BLDCNT, 0x0F, this->mUnk_0C8.func_0201edbc());
if (data_0204a110.mUnk_008 != 1) {
GX_func_0008(&REG_BLDCNT_SUB, 0x1F, this->mUnk_0C8.func_0201edbc());
}
#endif
}
if (!this->func_ov017_020c19a0()) {
if (this->mUnk_01C == 1) {
this->mUnk_01C = 3;
} else {
this->mUnk_01C = 0;
if (data_ov024_020d8660->func_ov024_020c4d74() && this->mUnk_77A == 0x2A) {
data_ov024_020d8660->mUnk_00->vfunc_28();
}
}
}
break;
case 3: {
switch (data_0204a110.func_01ff9b50()) {
case 0x28:
data_ov000_020b5214.func_ov000_0206db44(0x04);
this->mUnk_77A = data_0204a110.func_01ff9b50();
this->func_ov017_020c1c80(1);
break;
case 0x29:
if (data_ov024_020d8660 != NULL && data_ov024_020d8660->func_ov024_020c4d74()) {
data_ov000_020b5214.func_ov000_0206db44(0x04);
this->mUnk_77A = 0x2A;
this->func_ov017_020c1c80(0);
} else {
data_ov000_020b5214.func_ov000_0206db44(0x04);
this->mUnk_77A = data_0204a110.func_01ff9b50();
this->func_ov017_020c1c80(0);
}
break;
default:
break;
}
break;
}
default:
break;
}
}
AdventureModeManager_15C_20_00::~AdventureModeManager_15C_20_00() {}
@@ -0,0 +1,432 @@
#include "MainGame/AdventureMode.hpp"
#include "Unknown/UnkStruct_0204a088.hpp"
#include "Unknown/UnkStruct_0204a110.hpp"
#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_020b51b8.hpp"
#include "Unknown/UnkStruct_ov024_020d86a0.hpp"
#include "regs.h"
extern "C" void func_02019b3c();
extern "C" AdventureModeManager_160_18 *func_ov006_020b6ab0(void *, void *);
//! TODO: this is fake according to GameModeTitleScreen::GameModeTitleScreen()
extern "C" AdventureModeManager_160_14 *func_ov001_020b6520(void *, void *, int);
bool AdventureModeManager_160_4C::vfunc_0C() {
return data_0204a088->func_ov000_02061224();
}
AdventureModeManager_160::AdventureModeManager_160(GameModeManagerBase_104 *param1, AdventureModeManager_1B8 *param2) :
mUnk_0C(0),
mUnk_10(param1),
mUnk_14(NULL),
mUnk_18(0),
mUnk_1C(param2),
mUnk_20(0x1000),
mUnk_24(0, 0) {
data_0204a088->func_ov000_020611dc(this, 2);
this->mUnk_70.mUnk_00.mUnk_18 = 0;
}
AdventureModeManager_160::~AdventureModeManager_160() {}
void AdventureModeManager_160::vfunc_08(unk32 param1) {
switch (param1) {
case 1:
case 6:
case 7:
case 10:
if (data_0204a110.mUnk_008 == 1) {
this->mUnk_28.func_ov000_02066218(0x14);
this->mUnk_0C = 3;
this->mUnk_70.mUnk_26 = true;
} else if (data_0204a110.mUnk_DC0.mUnk_00) {
this->func_ov024_020c83bc();
} else {
this->func_ov024_020c8454();
}
return;
case 5:
case 8:
this->mUnk_0C = 0;
break;
default:
break;
}
}
void AdventureModeManager_160::vfunc_0C(unk32 param1) {
switch (param1) {
case 1:
case 5:
case 6:
case 7:
case 8:
case 10:
switch (this->mUnk_0C) {
case 0:
case 1:
case 2:
break;
case 3:
if (this->mUnk_28.mUnk_0D == this->mUnk_28.mUnk_10) {
if (data_0204a110.mUnk_DC0.mUnk_00) {
this->func_ov024_020c83bc();
} else {
this->func_ov024_020c8454();
}
}
break;
case 4:
if (!data_0204a110.mUnk_DC0.mUnk_00) {
this->func_ov024_020c8454();
}
break;
case 5:
if (data_0204a110.mUnk_DA8.mUnk_0C < 0) {
if (GetAdventureModeManager()->mAllowMapPaint) {
this->func_ov024_020c7cfc();
} else {
this->func_ov024_020c7d4c(param1);
}
}
break;
case 6:
if (data_ov000_020b504c.func_ov000_02067f88(0, 1) != 0) {
this->func_ov024_020c7d4c(param1);
}
break;
case 7:
if (!data_0204a110.GetUnkDDC()->GetUnk0C()->UnkCheck1()) {
data_0204a088->func_ov000_02061230();
}
break;
default:
break;
}
break;
case 0:
case 2:
case 3:
case 4:
case 9:
default:
break;
}
if (param1 == 5) {
data_ov000_020b51b8.func_ov000_0206c608(2, 0, 0x1000);
}
if (data_0204a110.mUnk_008 == 5) {
data_ov000_020b51b8.func_ov000_0206c608(2, 0, 0x1000);
}
}
void AdventureModeManager_160::vfunc_10(unk32 param1, unk32 param2) {
if ((param1 == 5 || param1 == 8) && param2 == 2) {
this->func_ov024_020c7d4c(param1);
}
}
void AdventureModeManager_160::vfunc_14(unk32 param1) {
if (param1 == 10) {
this->mUnk_14->mUnk_1C = 1;
this->mUnk_70.mUnk_25 = true;
}
this->mUnk_0C = 8;
}
void AdventureModeManager_160::func_ov024_020c7cfc() {
this->mUnk_0C = 6;
UnkStruct_ov000_02067bc4::UnkStruct1 stack;
stack.mUnk_0D = 1;
data_ov000_020b504c.func_ov000_02067cf8(BMG_ID(BMGGroup_maingame, MsgIndex_MapPaintNotAllowed), 1, &stack);
}
void AdventureModeManager_160::func_ov024_020c7d4c(unk32 param1) {
this->func_ov024_020c851c(param1);
UnkStruct_ov019_020d24c8_28_258 local_30(0x5F, 0);
data_0204a110.GetUnkDDC()->func_0201e588(1, (s16) (-local_30.mUnk_0E / 2), 0, 8, 0);
this->mUnk_18->func_ov006_020b6c74();
this->mUnk_0C = 7;
if (param1 == 6) {
if (data_027e09a4->func_01ffd3d8()) {
data_0204a110.func_02019538(4, 1);
} else {
data_0204a110.func_02019538(0, 1);
}
}
REG_BG2CNT_SUB = (REG_BG2CNT_SUB & ~0x03) | 0x01;
}
void AdventureModeManager_160::vfunc_18(unk32 param1) {
this->mUnk_14 = NULL;
switch (param1) {
case 1:
data_ov000_020b5214.func_ov000_0206db44(0x3C);
this->mUnk_1C->func_ov024_020d1364();
this->func_ov024_020c8428();
if (!GetAdventureModeManager()->func_ov024_020c681c() && !data_ov024_020d86a0->mUnk_0F) {
this->mUnk_70.mUnk_27 = true;
}
break;
case 8:
data_ov000_020b5214.func_ov000_0206db44(0x49);
// fallthrough
case 5:
this->mUnk_1C->func_ov024_020d1364();
this->func_ov024_020c8428();
this->mUnk_70.mUnk_00.mUnk_1A = 0x14;
this->mUnk_70.mUnk_00.func_0201bbcc(-1, 1);
data_0204e5f8.func_0201b9a8(&this->mUnk_70);
this->mUnk_70.mUnk_24 = 2;
break;
case 7:
data_ov000_020b5214.func_ov000_0206db44(0x3C);
this->mUnk_1C->func_ov024_020d1364();
this->func_ov024_020c8428();
break;
default:
break;
}
data_ov000_020b504c.func_ov000_02067e60(0, 1);
}
void AdventureModeManager_160::vfunc_1C(unk32 param1) {
switch (param1) {
case 1:
case 7:
switch (this->mUnk_0C) {
case 9:
if (!data_0204a110.GetUnkDDC()->GetUnk0C()->UnkCheck1() && gSaveManager.IsUnk210()) {
data_0204a110.mUnk_DA8.func_0201cf30();
this->mUnk_18 = 0;
this->mUnk_0C = 10;
}
break;
case 10:
if (data_0204a110.mUnk_DA8.mUnk_0C < 0) {
if (this->mUnk_70.mUnk_27 || this->mUnk_70.mUnk_25) {
this->func_ov024_020c84c4();
} else {
unk32 temp = this->mUnk_20;
if (temp != 0x1000) {
Vec2s copy;
copy.x = this->mUnk_24.x;
copy.y = this->mUnk_24.y;
Vec2s sp18;
sp18.x = copy.x;
sp18.y = copy.y;
Vec2s sp14;
sp14.x = 0;
sp14.y = 0;
data_0204a110.mUnk_DC0.func_0201db14(0x1000, temp, &sp14, &sp18, 6, 3);
}
this->mUnk_0C = 11;
}
}
break;
case 1:
if (this->mUnk_4C.mUnk_0D == this->mUnk_4C.mUnk_10) {
unk32 temp = this->mUnk_20;
if (temp != 0x1000) {
Vec2s copy;
copy.x = this->mUnk_24.x;
copy.y = this->mUnk_24.y;
Vec2s sp10;
sp10.x = copy.x;
sp10.y = copy.y;
Vec2s spC;
spC.x = 0;
spC.y = 0;
data_0204a110.mUnk_DC0.func_0201db14(0x1000, temp, &spC, &sp10, 6, 3);
}
this->mUnk_0C = 11;
}
break;
case 11:
if (!data_0204a110.mUnk_DC0.mUnk_08->mUnk_0A) {
if (this->mUnk_70.mUnk_26) {
this->mUnk_28.func_ov000_02066218(0x14);
this->mUnk_0C = 12;
} else {
this->func_ov024_020c8484();
}
}
break;
case 12:
if (this->mUnk_28.mUnk_0D == this->mUnk_28.mUnk_10) {
this->func_ov024_020c8484();
}
break;
default:
break;
}
break;
case 5:
case 8:
switch (this->mUnk_0C) {
case 9:
if (!data_0204a110.GetUnkDDC()->GetUnk0C()->UnkCheck1() && gSaveManager.IsUnk210()) {
if (this->mUnk_70.mUnk_00.mUnk_0D == this->mUnk_70.mUnk_00.mUnk_10) {
this->mUnk_70.mUnk_24--;
if (this->mUnk_70.mUnk_24 == 0) {
this->mUnk_18 = 0;
data_0204a088->func_ov000_02061224();
this->mUnk_70.mUnk_00.func_0201bba4(0, 0x14);
data_0204e5f8.func_0201b9a8(&this->mUnk_70);
this->mUnk_0C = 2;
}
}
}
break;
case 2:
if (this->mUnk_70.mUnk_00.mUnk_0D == this->mUnk_70.mUnk_00.mUnk_10) {
data_0204a088->func_ov000_02061230();
}
break;
}
break;
default:
break;
}
}
void AdventureModeManager_160::vfunc_20(unk32 param1, unk32 param2) {
if (param1 != 1) {
return;
}
data_0204a088->func_ov000_02061248();
if (this->mUnk_70.mUnk_27) {
this->mUnk_70.mUnk_27 = false;
SceneIndex sceneIndex = GetAdventureModeManager()->mUnk_1C4.sceneIndex;
if (data_027e09a4->func_01ffd3d8()) {
GetAdventureModeManager()->func_ov024_020c555c(1);
} else {
if (data_027e09a0->func_ov000_02070378(sceneIndex)) {
GetAdventureModeManager()->func_ov024_020c555c(4);
} else {
GetAdventureModeManager()->func_ov024_020c555c(0);
}
}
GetAdventureModeManager()->func_ov024_020c53e8();
if (data_027e09a0->func_ov000_02070378(sceneIndex)) {
GetAdventureModeManager()->func_ov024_020c671c();
} else {
GetAdventureModeManager()->func_ov024_020c66c0();
}
if (this->mUnk_70.mUnk_26) {
this->mUnk_28.vfunc_0C();
}
} else {
this->mUnk_70.mUnk_25 = false;
}
}
void AdventureModeManager_160::vfunc_24() {}
void AdventureModeManager_160::func_ov024_020c83bc() {
data_0204a110.mUnk_DC0.func_0201dd58(6, 3);
this->mUnk_0C = 4;
this->mUnk_20 = data_0204a110.mUnk_DC0.mUnk_08->func_0201ec30();
Vec2s local_14;
func_0201e8d4(&local_14, data_0204a110.mUnk_DC0.mUnk_04);
this->mUnk_24.x = local_14.x;
Vec2s local_18;
func_0201e8d4(&local_18, data_0204a110.mUnk_DC0.mUnk_04);
this->mUnk_24.y = local_18.y;
}
void AdventureModeManager_160::func_ov024_020c8428() {
data_0204a110.GetUnkDDC()->func_0201e698();
this->mUnk_18->func_ov006_020b6c80();
this->mUnk_0C = 9;
func_02019b3c();
}
void AdventureModeManager_160::func_ov024_020c8454() {
data_ov000_020b5214.func_ov000_0206db44(0x3B);
data_0204a110.mUnk_DA8.func_0201ced8();
this->mUnk_0C = 5;
}
void AdventureModeManager_160::func_ov024_020c8484() {
this->mUnk_0C = 0;
data_0204a088->func_ov000_02061230();
this->mUnk_70.mUnk_26 = false;
this->mUnk_20 = 0x1000;
Vec2s_Clear(&this->mUnk_24);
}
void AdventureModeManager_160::func_ov024_020c84c4() {
this->mUnk_4C.func_0201bb84(0x14, 2, 0x14);
if (this->mUnk_70.mUnk_25) {
this->mUnk_4C.mUnk_18 = true;
this->mUnk_4C.mUnk_19 = false;
} else {
this->mUnk_4C.mUnk_18 = false;
this->mUnk_4C.mUnk_19 = true;
}
data_0204e5f8.func_0201b9a8(&this->mUnk_4C);
this->mUnk_0C = 1;
}
void AdventureModeManager_160::func_ov024_020c851c(unk32 param1) {
data_0204a088->func_ov000_02061248();
//! TODO: fake match
this->mUnk_14 = func_ov001_020b6520(&this->mUnk_10, this->mUnk_1C, param1);
this->mUnk_18 = func_ov006_020b6ab0(&this->mUnk_10, this->mUnk_1C);
if (param1 == 1 || param1 == 6) {
this->mUnk_18->func_ov006_020b6bcc();
}
this->mUnk_14->mUnk_40 = this->mUnk_18;
if (param1 == 10) {
this->mUnk_14->mUnk_51 = true;
this->mUnk_14->func_ov006_020b6938();
}
}
@@ -0,0 +1,81 @@
#include "MainGame/AdventureMode.hpp"
#include "Unknown/UnkStruct_0204a088.hpp"
#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_020b5214.hpp"
#include "regs.h"
extern "C" GameModeManagerBase_104 *func_ov008_020b6520(void *);
bool AdventureModeManager_170_14::vfunc_0C() {
return data_0204a088->func_ov000_02061224();
}
AdventureModeManager_170::AdventureModeManager_170(GameModeManagerBase_104 *param1) :
mUnk_0C(0),
mUnk_10(param1),
mUnk_38(0) {
data_0204a088->func_ov000_020611dc(this, 4);
}
AdventureModeManager_170::~AdventureModeManager_170() {}
void AdventureModeManager_170::vfunc_08(unk32 param1) {
if (param1 == 1) {
this->mUnk_14.func_0201bb84(0x3C, 2, 0x3C);
data_0204e5f8.func_0201b9a8(&this->mUnk_14);
}
}
void AdventureModeManager_170::vfunc_0C(unk32 param1) {
if (param1 != 1) {
return;
}
if (this->mUnk_14.mUnk_0D == this->mUnk_14.mUnk_10) {
data_0204a088->func_ov000_02061230();
}
if (this->mUnk_38 > 0) {
this->mUnk_38--;
if (this->mUnk_38 == 0) {
REG_DISPCNT = (REG_DISPCNT & ~0x1F00) | 0x1000;
REG_DISPCNT_SUB = (REG_DISPCNT_SUB & ~0x1F00) | 0x1000;
}
}
}
void AdventureModeManager_170::vfunc_10(unk32 param1, unk32 param2) {
if (data_0204a110.mUnk_008 == 1) {
data_0204a110.mUnk_DFE = true;
}
data_0204e5f8.mUnk_38 = 0;
if (data_ov000_020b4f70 != NULL) {
data_ov000_020b4f70->func_ov000_020662e8();
}
data_ov000_020b504c.func_ov000_02067bf0()->vfunc_18(1);
data_0204a110.func_02019538(0x1C, 1);
data_0204a088->func_ov000_02061248();
data_027e0ce0->mUnk_34->func_ov008_020b6a50();
this->mUnk_0C = func_ov008_020b6520(&this->mUnk_10);
data_0204a088->mUnk_120 = 0;
this->mUnk_38 = 2;
data_ov000_020b5214.func_ov000_0206d83c(0x0A);
}
void AdventureModeManager_170::vfunc_18(unk32 param1) {
this->mUnk_0C = 0;
}
void AdventureModeManager_170::vfunc_24() {
data_0204e5f8.mUnk_38 = true;
data_0204a088->mUnk_120 = -1;
}
@@ -0,0 +1,181 @@
#include "MainGame/AdventureMode.hpp"
#include "Unknown/UnkStruct_0204a088.hpp"
#include "Unknown/UnkStruct_0204a110.hpp"
#include "Unknown/UnkStruct_0204e5f8.hpp"
extern "C" void func_ov002_020b6d50(void *);
extern "C" void func_ov002_020b6d68(void *);
extern "C" unk32 func_ov002_020b6cf4(void *, unk32 param1);
THUMB_BEGIN
AdventureModeManager_174::AdventureModeManager_174(GameModeManagerBase_104 *param1) :
AdventureModeManager_174_Base(param1),
mUnk_B8(0) {
data_0204a088->func_ov000_020611dc(this, 5);
}
void AdventureModeManager_174::vfunc_08(unk32 param1) {
switch (param1) {
case 1:
case 6:
this->mUnk_10.func_0201bb84(0x14, 2, 0x14);
this->mUnk_10.mUnk_18 = 1;
data_0204e5f8.func_0201b9a8(&this->mUnk_10);
break;
case 0:
case 2:
case 3:
case 4:
case 5:
case 7:
case 8:
case 9:
case 10:
case 11:
case 12:
case 13:
default:
break;
}
}
void AdventureModeManager_174::vfunc_0C(unk32 param1) {
switch (param1) {
case 1:
case 6:
if (this->mUnk_10.mUnk_0D == this->mUnk_10.mUnk_10) {
data_0204a088->func_ov000_02061230();
}
break;
case 0:
case 2:
case 3:
case 4:
case 5:
case 7:
case 8:
case 9:
case 10:
case 11:
case 12:
case 13:
default:
break;
}
}
void AdventureModeManager_174::vfunc_10(unk32 param1, unk32 param2) {
if (param2 != 1) {
return;
}
GetAdventureModeManager()->func_ov024_020c699c();
switch (param1) {
case 1:
case 6:
this->func_ov024_020c88f0();
this->mUnk_B8 = func_ov002_020b6cf4(&this->mUnk_0C, 0);
func_ov002_020b6d50(&this->mUnk_BC);
break;
case 2:
case 8:
data_0204a110.func_02019528();
data_0204a110.func_02018d78(3);
data_0204a088->func_ov000_02061248();
func_ov002_020b6d68(&this->mUnk_BC);
this->mUnk_B8 = func_ov002_020b6cf4(&this->mUnk_0C, 2);
break;
case 12:
case 13:
this->mUnk_B8 = func_ov002_020b6cf4(&this->mUnk_0C, 0);
break;
case 0:
case 3:
case 4:
case 5:
case 7:
case 9:
case 10:
case 11:
default:
break;
}
}
void AdventureModeManager_174::vfunc_18(unk32 param1) {
switch (param1) {
case 1:
this->mUnk_10.func_0201bb84(0x14, 2, 0x14);
this->mUnk_10.mUnk_18 = 1;
data_0204e5f8.func_0201b9a8(&this->mUnk_10);
break;
case 2:
this->mUnk_10.func_0201bb84(0x14, 2, 0x14);
this->mUnk_10.mUnk_18 = 0;
data_0204e5f8.func_0201b9a8(&this->mUnk_10);
break;
case 8:
case 12:
case 13:
default:
break;
}
}
void AdventureModeManager_174::vfunc_1C(unk32 param1) {
switch (param1) {
case 1:
case 2:
if (this->mUnk_10.mUnk_0D == this->mUnk_10.mUnk_10) {
data_0204a088->func_ov000_02061230();
}
break;
case 8:
case 12:
case 13:
default:
break;
}
}
void AdventureModeManager_174::vfunc_20(unk32 param1, unk32 param2) {
if (param2 != 1) {
return;
}
this->mUnk_B8 = 0;
switch (param1) {
case 1:
this->func_ov024_020c8b2c();
break;
case 2:
func_ov002_020b6d50(&this->mUnk_BC);
data_0204a088->func_ov000_02061248();
data_0204a110.func_02018d78(5);
GetAdventureModeManager()->func_ov024_020c555c(5);
GetAdventureModeManager()->func_ov024_020c53e8();
GetAdventureModeManager()->vfunc_38(SceneIndex_f_hyral, 0, 0, 0);
data_0204a110.func_02019528();
data_0204a110.func_02019538(0x0F, 1);
break;
case 8:
data_0204a110.func_02018d78(5);
func_ov002_020b6d50(&this->mUnk_BC);
data_0204a088->func_ov000_02061248();
data_0204a110.func_02019528();
data_0204a110.func_02019538(0x0F, 1);
data_0204a110.GetUnkD9C()->func_0201c494(0);
break;
default:
break;
}
}
void AdventureModeManager_174::vfunc_24() {}
THUMB_END
AdventureModeManager_174::~AdventureModeManager_174() {}
@@ -0,0 +1,168 @@
#include "MainGame/AdventureMode.hpp"
#include "System/OverlayManager.hpp"
#include "Unknown/UnkStruct_02049f8c.hpp"
#include "Unknown/UnkStruct_0204a088.hpp"
#include "Unknown/UnkStruct_0204a110.hpp"
#include "Unknown/UnkStruct_027e095c.hpp"
#include "Unknown/UnkStruct_027e0998.hpp"
#include "Unknown/UnkStruct_027e09ac.hpp"
#include "Unknown/UnkStruct_027e0cd8.hpp"
#include "Unknown/UnkStruct_027e0cdc.hpp"
#include "Unknown/UnkStruct_ov000_020b4f70.hpp"
THUMB_BEGIN
bool AdventureModeManager_174_Base_10::vfunc_0C() {
data_0204a088->func_ov000_02061224();
}
bool AdventureModeManager_174_Base_10::vfunc_10() {
data_0204a088->func_ov000_02061224();
}
AdventureModeManager_174_Base::AdventureModeManager_174_Base(GameModeManagerBase_104 *param1) :
mUnk_0C(param1) {
this->mUnk_A4 = 99;
this->mUnk_A6 = 99;
this->mUnk_A8 = 0;
this->mUnk_AA = 0;
this->mUnk_B0 = 0x1000;
this->mUnk_B4.x = 0;
this->mUnk_B4.y = 0;
this->mUnk_3C.func_ov000_02071f98();
}
void AdventureModeManager_174_Base::func_ov024_020c88f0() {
this->mUnk_38 = data_0204a110.mUnk_DF0;
if (data_0204a110.mUnk_DF0 != 0) {
data_0204a110.func_02018be0(0);
}
data_027e095c->func_ov000_020592ec();
data_027e095c->func_ov000_020592a0();
data_ov000_020b504c.func_ov000_02067bf0()->vfunc_18(1);
data_0204a110.func_02019528();
this->mUnk_34 = data_0204a110.mUnk_008;
data_0204a110.func_02018d78(3);
data_0204a088->func_ov000_02061248();
if (data_0204a110.mUnk_DF4 == 0) {
data_0204a110.func_02018c2c();
}
if (data_ov000_020b4f70 != NULL) {
data_ov000_020b4f70->func_ov000_0206654c();
}
if (data_0204a110.mUnk_DC0.mUnk_00) {
data_0204a110.mUnk_DC0.func_0201dd58(1, 3);
this->mUnk_B0 = data_0204a110.mUnk_DC0.mUnk_08->func_0201ec30();
Vec2s auStack_14;
func_0201e8d4(&auStack_14, data_0204a110.mUnk_DC0.mUnk_04);
this->mUnk_B4.x = auStack_14.x;
Vec2s auStack_18;
func_0201e8d4(&auStack_18, data_0204a110.mUnk_DC0.mUnk_04);
this->mUnk_B4.y = auStack_18.y;
}
data_ov000_020b504c.func_ov000_02068068(1);
data_0204a088->mUnk_120 = NULL;
UnkStruct_027e09ac *ptr = data_027e09ac;
this->mUnk_3C = data_027e09ac->mUnk_014;
this->mUnk_A4 = ptr->mUnk_14C;
this->mUnk_A6 = ptr->mUnk_14E;
this->mUnk_A8 = ptr->mUnk_150;
this->mUnk_AA = ptr->mUnk_152;
ptr->func_ov000_020726f0(0x21, 0, 0);
data_02049ba0.Unload(OverlaySlot_17);
data_ov000_020b504c.func_ov000_02067b20();
}
void AdventureModeManager_174_Base::func_ov024_020c8b2c() {
data_027e09ac->func_ov000_020729c4(&this->mUnk_3C, this->mUnk_A6, this->mUnk_A4, this->mUnk_A8, this->mUnk_AA);
if (this->mUnk_38 != data_0204a110.mUnk_DF0) {
data_0204a110.func_02018be0(this->mUnk_38);
}
data_027e0cdc->func_ov000_02082a48(0);
data_027e095c->func_ov000_020592ec();
data_027e095c->func_ov000_020592a0();
data_0204a088->func_ov000_02061248();
data_027e0cd8->func_ov000_02081c28();
AdventureModeManager *pAdvMgr = GetAdventureModeManager();
if (data_027e09a4->func_01ffd3d8()) {
GetAdventureModeManager()->func_ov024_020c555c(1);
} else {
if (data_027e0998->func_ov024_020c7354()) {
GetAdventureModeManager()->func_ov024_020c555c(4);
} else {
GetAdventureModeManager()->func_ov024_020c555c(0);
}
}
GetAdventureModeManager()->func_ov024_020c53e8();
data_0204a110.func_02019528();
data_0204a110.func_02018d78(0);
if (this->mUnk_34 == 1) {
data_0204a110.mUnk_DFE = true;
}
if (data_027e09a4->IsDarkRealm()) {
data_0204a110.func_02019538(6, 1);
} else {
if (data_027e09a4->func_01ffd3d8()) {
data_0204a110.func_02019538(4, 1);
} else {
data_0204a110.func_02019538(0, 1);
}
}
if (data_027e09a4->func_01ffd3d8() || data_027e0998->func_ov024_020c7354()) {
pAdvMgr->func_ov024_020c671c();
} else {
pAdvMgr->func_ov024_020c66c0();
}
if (data_0204a110.mUnk_DF4 == 1) {
data_0204a110.func_02018c2c();
}
if (data_ov000_020b4f70 != NULL) {
data_ov000_020b4f70->func_ov000_020665b8();
}
unk32 temp = this->mUnk_B0;
if (this->mUnk_B0 != 0x1000) {
Vec2s copy;
copy.x = this->mUnk_B4.x;
copy.y = this->mUnk_B4.y;
Vec2s sp18;
sp18.x = copy.x;
sp18.y = copy.y;
Vec2s sp14;
sp14.x = 0;
sp14.y = 0;
data_0204a110.mUnk_DC0.func_0201db14(0x1000, temp, &sp14, &sp18, 1, 3);
this->mUnk_B0 = 0x1000;
this->mUnk_B4.x = 0;
this->mUnk_B4.y = 0;
}
data_ov000_020b504c.func_ov000_02068068(0);
data_0204a088->mUnk_120 = 0xffff;
data_02049f8c.mUnk_00 = this->mUnk_AC;
data_ov000_020b504c.func_ov000_02067b60();
}
THUMB_END
@@ -0,0 +1,30 @@
#include "MainGame/AdventureMode.hpp"
#include "Unknown/UnkStruct_0204a088.hpp"
#include "Unknown/UnkStruct_0204a110.hpp"
extern "C" unk32 func_ov004_020b697c(void *, unk32 param1);
THUMB_BEGIN
AdventureModeManager_178::AdventureModeManager_178(GameModeManagerBase_104 *param1) :
AdventureModeManager_178_Base(param1),
mUnk_B8(0) {
data_0204a088->func_ov000_020611dc(this, 0x0D);
}
void AdventureModeManager_178::vfunc_10(unk32 param1, unk32 param2) {
if (param2 == 1) {
data_0204a088->func_ov000_02061248();
this->mUnk_B8 = func_ov004_020b697c(&this->mUnk_0C, 0);
}
}
void AdventureModeManager_178::vfunc_20(unk32 param1, unk32 param2) {
if (param2 == 1) {
this->mUnk_B8 = 0;
data_0204a088->func_ov000_02061248();
data_0204a110.func_02019528();
}
}
THUMB_END
@@ -0,0 +1,36 @@
#include "MainGame/AdventureMode.hpp"
#include "Unknown/UnkStruct_0204a088.hpp"
#include "Unknown/UnkStruct_0204e5f8.hpp"
THUMB_BEGIN
AdventureModeManager_178_Base::AdventureModeManager_178_Base(GameModeManagerBase_104 *param1) :
AdventureModeManager_174_Base(param1) {}
void AdventureModeManager_178_Base::vfunc_08(unk32 param1) {
if (param1 == 1 || param1 == 5) {
this->mUnk_10.func_0201bb84(0x14, 2, 0x14);
data_0204e5f8.func_0201b9a8(&this->mUnk_10);
}
}
void AdventureModeManager_178_Base::vfunc_0C(unk32 param1) {
if (this->mUnk_10.mUnk_0D == this->mUnk_10.mUnk_10) {
data_0204a088->func_ov000_02061230();
}
}
void AdventureModeManager_178_Base::vfunc_18(unk32 param1) {
if (param1 == 1 || param1 == 5) {
this->mUnk_10.func_0201bb84(0x14, 2, 0x14);
data_0204e5f8.func_0201b9a8(&this->mUnk_10);
}
}
void AdventureModeManager_178_Base::vfunc_1C(unk32 param1) {
if (this->mUnk_10.mUnk_0D == this->mUnk_10.mUnk_10) {
data_0204a088->func_ov000_02061230();
}
}
THUMB_END
@@ -0,0 +1,243 @@
#include "MainGame/AdventureMode.hpp"
#include "MapObject/MapObjectManager.hpp"
#include "MapObject/MapObjectUnkSPTB.hpp"
#include "Unknown/UnkStruct_0204a088.hpp"
#include "Unknown/UnkStruct_0204a110.hpp"
#include "Unknown/UnkStruct_0204e5f8.hpp"
#include "Unknown/UnkStruct_027e09a4.hpp"
#include "Unknown/UnkStruct_ov000_020b4f70.hpp"
extern "C" unk32 func_ov014_020b6520(void *, int, int);
THUMB_BEGIN
bool AdventureModeManager_180_18::vfunc_0C(void) {
data_0204a088->func_ov000_02061224();
}
AdventureModeManager_180::AdventureModeManager_180(GameModeManagerBase_104 *param1) :
mUnk_0C(0),
mUnk_10(0),
mUnk_14(param1),
mUnk_40(0x14),
mUnk_44(false),
mUnk_45(false) {
data_0204a088->func_ov000_020611dc(this, 0x0C);
}
AdventureModeManager_180::~AdventureModeManager_180() {}
void AdventureModeManager_180::vfunc_08(unk32 param1) {
this->mUnk_0C = 1;
switch (param1) {
case 5:
this->mUnk_18.mUnk_18 = true;
this->mUnk_18.mUnk_19 = true;
this->mUnk_18.func_0201bb84(0x10, 2, 0x10);
data_0204e5f8.func_0201b9a8(&this->mUnk_18);
break;
case 1:
this->mUnk_18.mUnk_18 = false;
this->mUnk_18.mUnk_19 = true;
this->mUnk_18.func_0201bb84(0x14, 2, 0x14);
data_0204e5f8.func_0201b9a8(&this->mUnk_18);
break;
default:
break;
}
}
void AdventureModeManager_180::vfunc_0C(unk32 param1) {
switch (param1) {
case 5:
if (this->mUnk_18.mUnk_0D == this->mUnk_18.mUnk_10) {
this->mUnk_0C = 0;
data_0204a088->func_ov000_02061230();
}
break;
case 1:
switch (this->mUnk_0C) {
case 1:
if (data_0204a110.mUnk_008 != 1 && this->mUnk_44) {
this->mUnk_44 = false;
this->func_ov024_020c9430(1, this->mUnk_40);
}
if (this->mUnk_18.mUnk_0D == this->mUnk_18.mUnk_10) {
this->mUnk_0C = 2;
this->func_ov024_020c957c();
}
break;
case 2:
if (data_0204a110.mUnk_DA8.mUnk_0C < 0) {
this->mUnk_0C = 0;
data_0204a088->func_ov000_02061230();
}
break;
default:
break;
}
break;
default:
break;
}
}
#pragma opt_dead_assignments off
void AdventureModeManager_180::vfunc_10(unk32 param1, unk32 param2) {
if (param2 != 1) {
return;
}
unk32 r6 = 0;
switch (param1) {
case 5:
data_0204a110.func_02019538(0x0D, 1);
this->func_ov024_020c9430(0, -1);
break;
case 1:
this->mUnk_44 = true;
data_0204a110.func_02019538(0x0E, 1);
if (data_ov000_020b4f70 != NULL) {
data_ov000_020b4f70->func_ov000_0206654c();
}
if (data_0204a110.mUnk_008 == 1) {
this->mUnk_45 = true;
data_0204a110.mUnk_DFE = true;
}
break;
default:
break;
}
}
#pragma opt_dead_assignments reset
void AdventureModeManager_180::func_ov024_020c9430(unk32 param1, unk32 param2) {
data_0204a088->func_ov000_02061248();
this->mUnk_10 = func_ov014_020b6520(&this->mUnk_14, param1, param2);
}
void AdventureModeManager_180::vfunc_18(unk32 param1) {
switch (param1) {
case 5:
this->mUnk_18.func_0201bb84(0x10, 2, 0x10);
data_0204e5f8.func_0201b9a8(&this->mUnk_18);
break;
case 1:
this->func_ov024_020c95c4();
break;
default:
break;
}
}
void AdventureModeManager_180::vfunc_1C(unk32 param1) {
switch (param1) {
case 5:
if (this->mUnk_18.mUnk_0D == this->mUnk_18.mUnk_10) {
data_0204a088->func_ov000_02061230();
}
break;
case 1:
switch (this->mUnk_0C) {
case 3:
if (data_0204a110.mUnk_DA8.mUnk_0C < 0) {
this->mUnk_0C = 1;
this->mUnk_18.func_0201bb84(0x14, 2, 0x14);
data_0204e5f8.func_0201b9a8(&this->mUnk_18);
}
break;
case 1:
if (this->mUnk_18.mUnk_0D == this->mUnk_18.mUnk_10) {
data_0204a088->func_ov000_02061230();
}
break;
default:
break;
}
break;
default:
break;
}
}
void AdventureModeManager_180::vfunc_20(unk32 param1, unk32 param2) {
if (param2 != 1) {
return;
}
this->mUnk_10 = 0;
data_0204a088->func_ov000_02061248();
switch (param1) {
case 5:
break;
case 1:
if (this->mUnk_45) {
this->mUnk_45 = false;
data_0204a110.mUnk_DFE = true;
}
GetAdventureModeManager()->func_ov024_020c555c(0);
GetAdventureModeManager()->func_ov024_020c53e8();
if (data_027e09a4->func_01ffd3d8()) {
GetAdventureModeManager()->func_ov024_020c671c();
} else {
GetAdventureModeManager()->func_ov024_020c66c0();
}
if (data_ov000_020b4f70 != NULL) {
data_ov000_020b4f70->func_ov000_020665b8();
}
break;
default:
break;
}
}
void AdventureModeManager_180::vfunc_24() {}
void AdventureModeManager_180::func_ov024_020c957c() {
data_0204a110.mUnk_DA8.func_0201ced8();
this->mUnk_0C = 2;
struct {
void *ptr;
unk32 actorId;
} local_10;
local_10.ptr = &data_ov000_020b34c4;
local_10.actorId = MapObjectId_SPTB;
MapObject **ppMapObj =
gpMapObjManager->func_01fff520((UnkStruct_ov000_020b34c4 *) &local_10, gpMapObjManager->mMapObjTable);
if (gpMapObjManager->mUnk_08 != ppMapObj) {
MapObjectUnkSPTB *pStampStation = (MapObjectUnkSPTB *) *ppMapObj;
pStampStation->func_ov031_0210b9c4();
}
}
void AdventureModeManager_180::func_ov024_020c95c4() {
data_0204a110.mUnk_DA8.func_0201cf30();
this->mUnk_0C = 3;
struct {
void *ptr;
unk32 actorId;
} local_10;
local_10.ptr = &data_ov000_020b34c4;
local_10.actorId = MapObjectId_SPTB;
MapObject **ppMapObj =
gpMapObjManager->func_01fff520((UnkStruct_ov000_020b34c4 *) &local_10, gpMapObjManager->mMapObjTable);
if (gpMapObjManager->mUnk_08 != ppMapObj) {
MapObjectUnkSPTB *pStampStation = (MapObjectUnkSPTB *) *ppMapObj;
pStampStation->func_ov031_0210b9e0();
}
}
THUMB_END
@@ -0,0 +1,167 @@
#include "MainGame/AdventureMode.hpp"
#include "Unknown/UnkStruct_0204a088.hpp"
#include "Unknown/UnkStruct_0204a110.hpp"
#include "Unknown/UnkStruct_0204e5f8.hpp"
#include "Unknown/UnkStruct_020d8698.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_ov024_020d8660.hpp"
extern "C" AdventureModeManager_184_10 *func_ov010_020b65fc(void *);
extern "C" AdventureModeManager_184_10 *func_ov010_020b6520(void *);
extern "C" AdventureModeManager_184_14 *func_ov010_020b88c4(void *);
THUMB_BEGIN
AdventureModeManager_184::AdventureModeManager_184(GameModeManagerBase_104 *param1) {
this->mUnk_0C = param1;
this->mUnk_10 = NULL;
this->mUnk_14 = NULL;
this->mUnk_18 = false;
data_0204a088->func_ov000_020611dc(this, 6);
}
AdventureModeManager_184::~AdventureModeManager_184() {}
void AdventureModeManager_184::vfunc_08(unk32 param1) {
if (!data_027e09a4->func_01ffd3d8()) {
this->func_ov024_020c979c(param1);
}
}
void AdventureModeManager_184::vfunc_0C(unk32 param1) {
if (this->mUnk_10 == NULL && this->mUnk_18 && data_0204a110.func_02019548()) {
this->mUnk_18 = false;
if (data_ov024_020d8660->mUnk_1C == 5) {
data_027e0994->mUnk_004.func_0201c0c4(0x25);
}
data_0204a088->func_ov000_02061248();
MapObjectId mapObjId = data_027e09b8->mUnk_0C->mMapObjId;
if (data_027e09a4->func_01ffd3d8() ||
(data_027e09b8->func_ov000_020732dc(2) &&
(mapObjId != MapObjectId_WDST ||
(mapObjId == MapObjectId_WDST && !data_ov000_020b504c.func_ov000_02067f88(0, 0))))) {
this->mUnk_10 = func_ov010_020b65fc(&this->mUnk_0C);
} else {
this->mUnk_10 = func_ov010_020b6520(&this->mUnk_0C);
}
if (data_ov024_020d8660 != NULL && data_ov024_020d8660->mUnk_1C == 5) {
this->mUnk_14 = func_ov010_020b88c4(&this->mUnk_0C);
}
this->mUnk_10->func_ov010_020b7008();
data_ov024_020d8698->func_ov024_020cd368(0, 0);
data_ov024_020d8698->func_ov024_020cd3f0(0);
}
if (this->mUnk_10 != NULL && this->mUnk_10->vfunc_20()) {
data_0204a088->func_ov000_02061230();
}
}
void AdventureModeManager_184::vfunc_10(unk32 param1, unk32 param2) {
this->func_ov024_020c979c(param1);
}
void AdventureModeManager_184::vfunc_14(unk32 param1) {}
void AdventureModeManager_184::func_ov024_020c979c(unk32 param1) {
this->mUnk_18 = true;
if (param1 != 1) {
return;
}
MapObjectId mapObjId = data_027e09b8->mUnk_0C->mMapObjId;
if (data_027e09a4->func_01ffd3d8()) {
if (data_027e09a4->IsDarkRealm()) {
data_0204a110.func_02019538(7, 0);
} else {
data_0204a110.func_02019538(5, 0);
}
} else if (data_027e09b8->func_ov000_020732dc(2) &&
(mapObjId != MapObjectId_WDST ||
(mapObjId == MapObjectId_WDST && !data_ov000_020b504c.func_ov000_02067f88(0, 0)))) {
data_0204a110.func_02019538(2, 0);
} else {
data_0204a110.func_02019538(1, 0);
}
}
void AdventureModeManager_184::vfunc_18(unk32 param1) {
switch (param1) {
case 1:
this->mUnk_10->func_ov010_020b7054();
if (data_ov000_020b504c.func_ov000_02067f88(0, 0)) {
data_ov024_020d8698->func_ov024_020cd3a4();
data_ov024_020d8698->func_ov024_020cd400();
}
break;
case 2:
data_ov024_020d8698->func_ov024_020cd3a4();
data_ov024_020d8698->func_ov024_020cd400();
GetAdventureModeManager()->func_ov024_020c6c60();
data_ov000_020b504c.func_ov000_02067f5c(0);
break;
default:
break;
}
if (GetAdventureModeManager()->mUnk_1BC != NULL && param1 != 1 && param1 != 2) {
GetAdventureModeManager()->mUnk_1BC->mUnk_34 = 0;
}
}
void AdventureModeManager_184::vfunc_1C(unk32 param1) {
switch (param1) {
case 1:
if (this->mUnk_10 != NULL && this->mUnk_10->vfunc_20()) {
if (data_027e09a4->func_01ffd3d8()) {
data_0204a088->func_ov000_02061224();
} else {
data_0204a088->func_ov000_02061230();
}
}
break;
case 5:
case 8:
case 9:
break;
default:
break;
}
}
void AdventureModeManager_184::vfunc_20(unk32 param1, unk32 param2) {
switch (param1) {
case 1:
this->mUnk_10 = NULL;
this->mUnk_14 = NULL;
break;
case 5:
case 8:
case 9:
data_ov024_020d8698->func_ov024_020cd3a4();
data_ov024_020d8698->func_ov024_020cd400();
GetAdventureModeManager()->func_ov024_020c6c60();
data_ov000_020b504c.func_ov000_02067f5c(0);
break;
default:
break;
}
}
void AdventureModeManager_184::vfunc_24() {
this->mUnk_10 = NULL;
this->mUnk_14 = NULL;
}
THUMB_END
@@ -0,0 +1,405 @@
#include "MainGame/AdventureMode.hpp"
#include "Save/AdventureFlags.hpp"
#include "Unknown/UnkStruct_02049f8c.hpp"
#include "Unknown/UnkStruct_0204a088.hpp"
#include "Unknown/UnkStruct_0204a110.hpp"
#include "Unknown/UnkStruct_0204e5f8.hpp"
#include "Unknown/UnkStruct_027e0998.hpp"
#include "Unknown/UnkStruct_027e09a4.hpp"
#include "Unknown/UnkStruct_027e09b8.hpp"
#include "Unknown/UnkStruct_ov000_020b5214.hpp"
#include "regs.h"
extern "C" AdventureModeManager_18C_10 *func_ov011_020b6520(void *, int);
extern "C" void func_ov011_020b84f0(s16 *param1, void *, unk32 param2);
extern "C" void func_02019b3c();
THUMB_BEGIN
AdventureModeManager_18C_14::AdventureModeManager_18C_14() {}
bool AdventureModeManager_18C_14::vfunc_0C(void) {
return data_0204a088->func_ov000_02061224();
}
bool AdventureModeManager_18C_14::vfunc_10(void) {
return data_0204a088->func_ov000_02061224();
}
AdventureModeManager_18C::AdventureModeManager_18C(GameModeManagerBase_104 *param1) :
mUnk_0C(param1),
mUnk_10(NULL),
mUnk_38(false),
mUnk_39(false),
mUnk_3A(false),
mUnk_3C(0x1000) {
this->mUnk_40.x = 0;
this->mUnk_40.y = 0;
this->mUnk_44 = 0x1000;
this->mUnk_48.x = 0;
this->mUnk_48.y = 0;
data_0204a088->func_ov000_020611dc(this, 8);
}
AdventureModeManager_18C::~AdventureModeManager_18C() {}
void AdventureModeManager_18C::vfunc_08(unk32 param1) {
switch (param1) {
case 1:
this->func_ov024_020ca034();
break;
case 6:
this->func_ov024_020ca034();
break;
case 2:
break;
case 5:
this->func_ov024_020ca034();
break;
default:
break;
}
}
void AdventureModeManager_18C::vfunc_0C(unk32 param1) {
switch (param1) {
case 6:
switch (this->mUnk_54) {
case 1:
if (this->mUnk_14.mUnk_0D == this->mUnk_14.mUnk_10) {
data_ov000_020b5214.func_ov000_0206db44(0x43);
data_0204a110.mUnk_DA8.func_0201ced8();
this->mUnk_54 = 2;
}
if (data_0204a110.mUnk_008 != 1 && this->mUnk_38) {
this->mUnk_38 = false;
this->func_ov024_020c9c6c();
}
break;
case 2:
if (data_0204a110.mUnk_DA8.mUnk_0C < 0) {
data_0204a088->func_ov000_02061230();
this->mUnk_54 = 3;
}
break;
default:
break;
}
break;
case 1:
if (this->mUnk_14.mUnk_0D == this->mUnk_14.mUnk_10) {
data_0204a088->func_ov000_02061230();
this->mUnk_54 = 3;
}
if (data_0204a110.mUnk_008 != 1 && this->mUnk_38) {
this->mUnk_38 = false;
this->func_ov024_020c9c6c();
}
break;
case 2:
break;
case 5:
if (this->mUnk_14.mUnk_0D == this->mUnk_14.mUnk_10) {
data_0204a088->func_ov000_02061230();
this->mUnk_54 = 3;
}
break;
default:
break;
}
}
void AdventureModeManager_18C::vfunc_10(unk32 param1, unk32 param2) {
if (param2 != 1) {
return;
}
data_0204a088->func_ov000_02061248();
switch (param1) {
case 1:
case 6:
this->mUnk_38 = 1;
if (data_0204a110.mUnk_DC0.mUnk_00) {
data_0204a110.mUnk_DC0.func_0201dd58(1, 3);
this->mUnk_3C = data_0204a110.mUnk_DC0.mUnk_08->func_0201ec30();
Vec2s auStack_14;
func_0201e8d4(&auStack_14, data_0204a110.mUnk_DC0.mUnk_04);
this->mUnk_40.x = auStack_14.x;
Vec2s auStack_18;
func_0201e8d4(&auStack_18, data_0204a110.mUnk_DC0.mUnk_04);
this->mUnk_40.y = auStack_18.y;
}
if (data_0204a110.mUnk_008 == 1) {
this->mUnk_39 = true;
data_0204a110.mUnk_DFE = true;
}
break;
case 5:
this->func_ov024_020c9c6c();
break;
case 2: {
this->func_ov024_020c9c6c();
unk32 temp = this->mUnk_44;
Vec2s copy;
copy.x = this->mUnk_48.x;
copy.y = this->mUnk_48.y;
Vec2s sp14;
sp14.x = 0;
sp14.y = 0;
Vec2s sp18;
sp18.x = copy.x;
sp18.y = copy.y;
data_0204a110.mUnk_DC0.func_0201db14(temp, 0x1000, &sp18, &sp14, 8, 4);
this->mUnk_44 = 0x1000;
this->mUnk_48.x = 0;
this->mUnk_48.y = 0;
break;
}
default:
break;
}
this->mUnk_50 = data_02049f8c.mUnk_00;
data_02049f8c.mUnk_00 = 0;
}
void AdventureModeManager_18C::func_ov024_020c9c6c() {
GetAdventureModeManager()->func_ov024_020c699c();
data_027e0994->mUnk_004.func_0201c0c4(0x65);
if (this->mUnk_3A) {
this->mUnk_10 = func_ov011_020b6520(&this->mUnk_0C, this->mUnk_4C);
this->mUnk_10->func_ov011_020b89f0(this->mUnk_4C);
} else {
unk32 var_r4 = -1;
if (data_027e09b8->HasAdventureFlag(AdventureFlag_ObtainedFireGlyph)) {
var_r4 = 3;
} else if (data_027e09b8->HasAdventureFlag(AdventureFlag_ObtainedOceanGlyph)) {
var_r4 = 2;
} else if (data_027e09b8->HasAdventureFlag(AdventureFlag_ObtainedSnowGlyph)) {
var_r4 = 1;
} else if (data_027e09b8->HasAdventureFlag(AdventureFlag_ObtainedForestGlyph)) {
var_r4 = 0;
}
this->mUnk_10 = func_ov011_020b6520(&this->mUnk_0C, var_r4);
}
REG_DISPCNT_SUB = (REG_DISPCNT_SUB & ~0x1F00) | 0x1C00;
REG_BG2CNT_SUB = (REG_BG2CNT_SUB & ~0x03) | 0x03;
REG_BG3CNT_SUB = (REG_BG3CNT_SUB & ~0x03) | 0x02;
}
void AdventureModeManager_18C::vfunc_14(unk32 param1) {
this->mUnk_10->func_ov011_020b88ac();
this->mUnk_54 = 3;
}
void AdventureModeManager_18C::vfunc_18(unk32 param1) {
switch (param1) {
case 1:
data_ov000_020b5214.func_ov000_0206db44(0x44);
data_ov000_020b5214.func_ov000_0206db44(0x45);
if (this->mUnk_3A) {
this->func_ov024_020ca034();
} else {
data_0204a110.mUnk_DA8.func_0201cf30();
this->mUnk_54 = 4;
}
break;
case 5:
data_ov000_020b5214.func_ov000_0206db44(0x44);
this->func_ov024_020ca034();
break;
case 2: {
if (this->mUnk_10->mUnk_10EC - 4 <= 3) {
s16 stack[4];
func_ov011_020b84f0(stack, this->mUnk_10, this->mUnk_10->mUnk_10EC);
data_0204a110.mUnk_DC0.func_0201dc10(stack, 8, 4);
}
data_ov000_020b5214.func_ov000_0206db44(0x48);
this->func_ov024_020ca034();
break;
}
case 0:
default:
break;
}
}
void AdventureModeManager_18C::vfunc_1C(unk32 param1) {
switch (param1) {
case 1:
switch (this->mUnk_54) {
case 4:
if (data_0204a110.mUnk_DA8.mUnk_0C < 0) {
this->func_ov024_020ca034();
}
break;
case 1:
if (this->mUnk_14.mUnk_0D == this->mUnk_14.mUnk_10) {
data_0204a088->func_ov000_02061230();
this->mUnk_54 = 0;
}
break;
default:
break;
}
break;
case 5:
if (this->mUnk_14.mUnk_0D == this->mUnk_14.mUnk_10) {
data_0204a088->func_ov000_02061230();
this->mUnk_54 = 0;
}
break;
case 2:
if (this->mUnk_14.mUnk_0D == this->mUnk_14.mUnk_10) {
this->mUnk_54 = 0;
}
break;
case 0:
default:
break;
}
}
void AdventureModeManager_18C::vfunc_20(unk32 param1, unk32 param2) {
if (param2 != 1) {
return;
}
switch (param1) {
case 1: {
if (!data_027e09a4->func_01ffd3d8()) {
GetAdventureModeManager()->mUnk_004.func_0201c0c4(0x68);
}
if (data_027e09a4->func_01ffd3d8()) {
GetAdventureModeManager()->func_ov024_020c555c(1);
} else if (data_027e0998->func_ov024_020c7354()) {
GetAdventureModeManager()->func_ov024_020c555c(4);
} else {
GetAdventureModeManager()->func_ov024_020c555c(0);
}
GetAdventureModeManager()->func_ov024_020c53e8();
if (data_027e09a4->func_01ffd3d8() || data_027e0998->func_ov024_020c7354()) {
GetAdventureModeManager()->func_ov024_020c671c();
} else {
GetAdventureModeManager()->func_ov024_020c66c0();
}
if (this->mUnk_39 != 0) {
this->mUnk_39 = false;
data_0204a110.mUnk_DFE = true;
}
unk32 temp = this->mUnk_3C;
if (temp != 0x1000) {
Vec2s copy;
copy.x = this->mUnk_40.x;
copy.y = this->mUnk_40.y;
Vec2s sp18;
sp18.x = copy.x;
sp18.y = copy.y;
Vec2s sp14;
sp14.x = 0;
sp14.y = 0;
data_0204a110.mUnk_DC0.func_0201db14(0x1000, temp, &sp14, &sp18, 1, 3);
this->mUnk_3C = 0x1000;
this->mUnk_40.x = 0;
this->mUnk_40.y = 0;
}
break;
}
case 2: {
u32 temp_r6 = this->mUnk_10->mUnk_10EC;
u8 temp_r7 = this->mUnk_10->mUnk_10E9;
switch (temp_r6) {
case 4:
case 5:
case 6:
case 7:
this->mUnk_44 = data_0204a110.mUnk_DC0.mUnk_08->func_0201ec30();
Vec2s auStack_14;
func_0201e8d4(&auStack_14, data_0204a110.mUnk_DC0.mUnk_04);
this->mUnk_48.x = auStack_14.x;
Vec2s auStack_18;
func_0201e8d4(&auStack_18, data_0204a110.mUnk_DC0.mUnk_04);
this->mUnk_48.y = auStack_18.y;
data_0204a110.mUnk_DC0.func_0201d628();
GetAdventureModeManager()->func_ov024_020c555c(4);
GetAdventureModeManager()->func_ov024_020c53e8();
GetAdventureModeManager()->func_ov024_020c6770(temp_r6, temp_r7, 0, 4);
break;
default:
GetAdventureModeManager()->func_ov024_020c555c(3);
GetAdventureModeManager()->func_ov024_020c53e8();
GetAdventureModeManager()->vfunc_38(temp_r6, temp_r7, 0, 0);
break;
}
break;
}
case 5:
default:
break;
}
data_02049f8c.mUnk_00 = this->mUnk_50;
data_0204a088->func_ov000_02061248();
func_02019b3c();
}
void AdventureModeManager_18C::vfunc_24() {
this->mUnk_10 = NULL;
this->mUnk_3A = false;
}
void AdventureModeManager_18C::func_ov024_020ca034() {
this->mUnk_14.func_0201bb84(0x14, 2, 0x14);
this->mUnk_14.mUnk_18 = false;
this->mUnk_14.mUnk_19 = true;
data_0204e5f8.func_0201b9a8(&this->mUnk_14);
this->mUnk_54 = true;
}
void AdventureModeManager_18C::func_ov024_020ca068(unk32 param1) {
this->mUnk_3A = true;
this->mUnk_4C = param1;
}
bool AdventureModeManager_18C::func_ov024_020ca074() {
return this->mUnk_3A;
}
THUMB_END
@@ -0,0 +1,99 @@
#include "MainGame/AdventureMode.hpp"
#include "Unknown/UnkStruct_0204a088.hpp"
#include "Unknown/UnkStruct_0204e5f8.hpp"
#include "Unknown/UnkStruct_027e09a4.hpp"
#include "regs.h"
extern "C" AdventureModeManager_190_10 *func_ov011_020b8e54(void *, int);
THUMB_BEGIN
bool AdventureModeManager_190_14::vfunc_0C() {
return data_0204a088->func_ov000_02061224();
}
bool AdventureModeManager_190_38::vfunc_0C() {
return this->mpParent->func_ov024_020ca280();
}
AdventureModeManager_190::AdventureModeManager_190(GameModeManagerBase_104 *param1) :
mUnk_0C(param1),
mUnk_10(NULL),
mUnk_38(this),
mUnk_60(-1) {
data_0204a088->func_ov000_020611dc(this, 0x15);
}
void AdventureModeManager_190::vfunc_08(unk32 param1) {
if (param1 == 1) {
this->func_ov024_020ca21c();
}
}
void AdventureModeManager_190::vfunc_0C(unk32 param1) {
if (param1 == 1 && this->mUnk_14.mUnk_0D == this->mUnk_14.mUnk_10) {
data_0204a088->func_ov000_02061230();
}
}
void AdventureModeManager_190::vfunc_10(unk32 param1, unk32 param2) {
if (param1 == 1) {
data_0204a088->func_ov000_02061248();
this->mUnk_10 = func_ov011_020b8e54(&this->mUnk_0C, this->mUnk_60);
REG_DISPCNT_SUB = (REG_DISPCNT_SUB & ~0x1F00) | 0x1800;
}
}
void AdventureModeManager_190::vfunc_18(unk32 param1) {
if (param1 == 1) {
this->func_ov024_020ca21c();
}
}
void AdventureModeManager_190::vfunc_1C(unk32 param1) {
if (param1 == 1 && this->mUnk_14.mUnk_0D == this->mUnk_14.mUnk_10) {
data_0204a088->func_ov000_02061230();
}
}
void AdventureModeManager_190::vfunc_20(unk32 param1, unk32 param2) {
if (param1 == 1) {
this->mUnk_10 = NULL;
data_0204a088->func_ov000_02061248();
if (data_027e09a4->func_01ffd3d8()) {
GetAdventureModeManager()->func_ov024_020c555c(1);
GetAdventureModeManager()->func_ov024_020c53e8();
} else {
GetAdventureModeManager()->func_ov024_020c555c(0);
GetAdventureModeManager()->func_ov024_020c53e8();
}
if (data_027e09a4->func_01ffd3d8()) {
GetAdventureModeManager()->func_ov024_020c671c();
} else {
GetAdventureModeManager()->func_ov024_020c66c0();
}
}
}
void AdventureModeManager_190::func_ov024_020ca21c() {
this->mUnk_14.func_0201bb84(0x14, 2, 0x14);
this->mUnk_14.mUnk_18 = false;
this->mUnk_14.mUnk_19 = true;
data_0204e5f8.func_0201b9a8(&this->mUnk_14);
}
bool AdventureModeManager_190::func_ov024_020ca24c(unk32 param1) {
this->mUnk_60 = param1;
this->mUnk_38.func_0201bb84(0x14, 2, 0x14);
this->mUnk_38.mUnk_18 = false;
this->mUnk_38.mUnk_19 = true;
data_0204e5f8.func_0201b9a8(&this->mUnk_38);
}
bool AdventureModeManager_190::func_ov024_020ca280() {
return this->mUnk_10->func_ov011_020b8f20(this->mUnk_60);
}
THUMB_END
@@ -0,0 +1,676 @@
#include "MainGame/AdventureMode.hpp"
#include "Save/SaveManager.hpp"
#include "System/SysNew.hpp"
#include "Unknown/UnkMemFuncs.h"
#include "Unknown/UnkStruct_0204a110.hpp"
#include "Unknown/UnkStruct_027e0ce0.hpp"
#include "Unknown/UnkStruct_ov000_020b52b4.hpp"
#include "Unknown/UnkStruct_ov017_020c3f70.hpp"
extern "C" {
void GX_LoadBG0Char(void *ptr, u32 offset, u32 size);
void GX_LoadBG1Char(void *ptr, u32 offset, u32 size);
void GX_LoadBG2Char(void *ptr, u32 offset, u32 size);
void GX_LoadBG3Char(void *ptr, u32 offset, u32 size);
void GXS_LoadBG0Char(void *ptr, u32 offset, u32 size);
void GXS_LoadBG1Char(void *ptr, u32 offset, u32 size);
void GXS_LoadBG2Char(void *ptr, u32 offset, u32 size);
void GXS_LoadBG3Char(void *ptr, u32 offset, u32 size);
void GXS_BeginLoadBGExtPltt(void);
void GXS_LoadBGExtPltt(void *ptr, u32 offset, u32 size);
void GXS_EndLoadBGExtPltt(void);
void DC_func_0004(void *, int);
void DC_func_0002();
void func_ov000_0205a950(u8 bgType, bool isTopScreen, bool);
void func_ov000_0205a944(u8 bgType, bool isTopScreen, bool);
void func_01ffb644(q20 x, q20 y);
unk32 func_01ffb558();
void func_02029058(void *, void *);
u32 func_0202955c(void *, int, void *, int, void *);
}
static const bool data_ov024_020d7544[] = {true, false, true};
static const u8 data_ov024_020d7547[] = {0x03, 0x01, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00};
static u16 data_ov024_020d869c;
//! TODO figure this out
struct SomeSaveFileStruct {
/* 00 */ void *unk_00;
SomeSaveFileStruct(unk32 param1);
~SomeSaveFileStruct();
};
static const AdventureModeManager_1B8_Base_1C data_ov024_020d8200(0x14, 0x08, 0xD8, 0xB0);
AdventureModeManager_1B8_Base::AdventureModeManager_1B8_Base(u8 bgType, bool param2,
const AdventureModeManager_1B8_Base_1C *param3, bool param4,
bool param5) {
this->mUnk_00 = ADVMGR_UNK;
this->mUnk_04 = ADVMGR_UNK;
this->mUnk_08 = false;
this->mUnk_09 = param5;
this->mUnk_0A = false;
this->mUnk_0B = 0xBF;
this->mUnk_0C = 0x00;
this->mBGType = bgType;
this->mIsTopScreen = param2;
this->mUnk_10 = param4;
this->mUnk_14 = GetUnkValue_ImplS(param3->mUnk_06, param4);
this->mUnk_18 = (u8 *) ::operator new(this->mUnk_14, HeapIndex_1, 4);
MI_CpuCopy16((void *) param3, &this->mUnk_1C, sizeof(AdventureModeManager_1B8_Base_1C));
this->func_ov024_020d0698();
}
AdventureModeManager_1B8_Base::~AdventureModeManager_1B8_Base() {
delete this->mUnk_18;
}
void AdventureModeManager_1B8_Base::func_ov024_020d0698() {
_MI_CpuFill(0, this->mUnk_18, this->mUnk_14);
this->mUnk_0A = true;
this->mUnk_0D = true;
this->mUnk_00 = ADVMGR_UNK;
this->mUnk_04 = ADVMGR_UNK;
}
void AdventureModeManager_1B8_Base::func_ov024_020d06d0() {
if (this->mIsTopScreen && data_0204a110.mUnk_008 == 1) {
return;
}
if (this->mUnk_08) {
func_ov000_0205a950(this->mBGType, this->mIsTopScreen, this->mUnk_09);
} else {
func_ov000_0205a944(this->mBGType, this->mIsTopScreen, this->mUnk_09);
}
this->mUnk_0D = true;
this->func_ov024_020d0a64();
}
void AdventureModeManager_1B8_Base::func_ov024_020d072c(unk8 *param1) {
if (this->mUnk_0A) {
this->func_ov024_020d0a64();
}
}
static inline void SetUnkValue4(int a, int b, int *pVal) {
if (a <= b) {
if (*pVal < 0) {
*pVal = -*pVal;
}
} else if (*pVal > 0) {
*pVal = -*pVal;
}
}
// https://decomp.me/scratch/LhXwS
bool AdventureModeManager_1B8_Base::func_ov024_020d0744(s32 arg1, s32 arg2, s32 arg3, s32 arg4, u8 arg5, u8 arg6) {
bool sp10;
s32 sp8;
s32 temp_r1;
s32 temp_r2;
s32 var_r11;
sp10 = false;
if (arg6 == 0) {
return false;
}
temp_r2 = arg3 - arg1;
temp_r1 = arg4 - arg2;
if (temp_r2 == 0 && temp_r1 == 0) {
sp10 = this->func_ov024_020d0924(arg3, arg4, arg5, arg6);
} else {
if (temp_r2 >= 0) {
sp8 = temp_r2;
} else {
sp8 = -temp_r2;
}
s32 var_r11 = (temp_r1 >= 0) ? temp_r1 : -temp_r1;
if (sp8 >= var_r11) {
func_01ffb644(INT_TO_Q20(temp_r1), INT_TO_Q20(temp_r2));
s32 var_r11_2 = (arg1 <= arg3) ? 1 : -1;
unk32 var_r5 = INT_TO_Q20(arg2);
unk32 var_r6 = func_01ffb558();
SetUnkValue4(arg2, arg4, &var_r6);
for (int i = 0; i <= sp8; i++) {
if (this->func_ov024_020d0924(arg1, ROUND_Q20(var_r5), arg5, arg6)) {
sp10 = true;
}
arg1 += var_r11_2;
var_r5 += var_r6;
}
} else {
func_01ffb644(INT_TO_Q20(temp_r2), INT_TO_Q20(temp_r1));
unk32 var_r5 = INT_TO_Q20(arg1);
s32 var_r11_2 = (arg2 <= arg4) ? 1 : -1;
unk32 var_r6 = func_01ffb558();
SetUnkValue4(arg1, arg3, &var_r6);
for (int i = 0; i <= var_r11; i++) {
if (this->func_ov024_020d0924(ROUND_Q20(var_r5), arg2, arg5, arg6)) {
sp10 = true;
}
var_r5 += var_r6;
arg2 += var_r11_2;
}
}
}
return sp10;
}
bool AdventureModeManager_1B8_Base::func_ov024_020d0924(unk32 param1, unk32 param2, u8 param3, u8 param4) {
unk32 var_r4;
unk32 var_r5;
unk32 var_r6;
unk32 var_r7;
unk32 var_r7_2;
unk32 var_r8;
if (param4 == 0) {
return false;
}
if (this->mUnk_10 && param3 >= 0x10) {
param3 &= 0x0F;
}
unk32 temp = param4 >> 1;
if ((param4 & 1) == 0) {
var_r7 = temp - 1;
} else {
var_r7 = temp;
}
var_r5 = param1 - var_r7;
if (var_r5 <= this->mUnk_1C.mUnk_00) {
var_r5 = this->mUnk_1C.mUnk_00;
}
var_r6 = param1 + temp;
if (var_r6 >= this->mUnk_1C.mUnk_00 + this->mUnk_1C.mUnk_04 - 1) {
var_r6 = this->mUnk_1C.mUnk_00 + this->mUnk_1C.mUnk_04 - 1;
}
if (var_r5 > var_r6) {
return false;
}
var_r7_2 = param2 - var_r7;
var_r8 = param2 + temp;
if (var_r7_2 <= this->mUnk_1C.mUnk_02) {
var_r7_2 = this->mUnk_1C.mUnk_02;
}
if (var_r8 >= this->mUnk_1C.mUnk_02 + this->mUnk_1C.mUnk_06 - 1) {
var_r8 = this->mUnk_1C.mUnk_02 + this->mUnk_1C.mUnk_06 - 1;
}
if (var_r7_2 > var_r8) {
return false;
}
for (; var_r7_2 <= var_r8; var_r7_2++) {
for (var_r4 = var_r5; var_r4 <= var_r6; var_r4++) {
unk32 index = this->func_ov024_020d0db4(var_r4, var_r7_2);
u8 *pBuffer = this->mUnk_18;
if (this->mUnk_10) {
u8 value = pBuffer[index];
if (var_r4 & 1) {
pBuffer[index] = (value & 0x0F) | (param3 * 16);
} else {
pBuffer[index] = (value & 0xF0) | param3;
}
} else {
pBuffer[index] = param3;
}
}
if (var_r7_2 < this->mUnk_0B) {
this->mUnk_0B = var_r7_2;
}
if (var_r7_2 > this->mUnk_0C) {
this->mUnk_0C = var_r7_2;
}
}
this->mUnk_0A = true;
return true;
}
// https://decomp.me/scratch/e7SZ5
void AdventureModeManager_1B8_Base::func_ov024_020d0a64() {
u32 var_r2;
s32 var_r2_2;
s32 var_r3;
u32 var_r6;
s32 var_r6_2;
s32 var_r7;
u8 *temp_r7;
s32 var_r8;
if (this->mUnk_0D) {
this->mUnk_0B = this->mUnk_1C.mUnk_02;
this->mUnk_0C = 0xBF - this->mUnk_1C.mUnk_02;
if (this->func_ov024_020d0e98()) {
if (this->mUnk_10) {
var_r6 = (this->mUnk_1C.mUnk_02 * 0x100) / 2;
} else {
var_r6 = this->mUnk_1C.mUnk_02 * 0x100;
}
if (var_r6 != 0) {
SomeSaveFileStruct sp4(var_r6);
_MI_CpuFill(0, sp4.unk_00, var_r6);
this->TryLoadBGChar(sp4.unk_00, GetUnkValue2(), var_r6);
}
var_r6 = this->mUnk_1C.mUnk_02 + this->mUnk_1C.mUnk_06;
var_r7 = GetUnkValue(0xC0 - var_r6);
if (var_r7 != 0) {
SomeSaveFileStruct sp0(var_r7);
_MI_CpuFill(0, sp0.unk_00, var_r7);
this->TryLoadBGChar(sp0.unk_00, GetUnkValue2() + GetUnkValue(var_r6), var_r7);
}
}
this->mUnk_0D = false;
}
if (this->func_ov024_020d0e98()) {
this->mUnk_0B = this->mUnk_0B - this->mUnk_1C.mUnk_02;
this->mUnk_0C = this->mUnk_0C - this->mUnk_1C.mUnk_02;
}
this->mUnk_0B = (this->mUnk_0B / 8) * 8;
this->mUnk_0C = (((this->mUnk_0C / 8) + 1) * 8) - 1;
if (this->mUnk_10) {
var_r6_2 = (this->mUnk_0B * 256) / 2;
} else {
var_r6_2 = (this->mUnk_0B * 256);
}
temp_r7 = &this->mUnk_18[var_r6_2];
if (this->func_ov024_020d0e98()) {
if (this->mUnk_10) {
var_r6_2 += (this->mUnk_1C.mUnk_02 * 0x100) / 2;
} else {
var_r6_2 += this->mUnk_1C.mUnk_02 * 0x100;
}
}
var_r2_2 = GetUnkValue2();
if (this->mUnk_10) {
var_r3 = ((this->mUnk_0C - this->mUnk_0B + 1) * 0x100) / 2;
} else {
var_r3 = (this->mUnk_0C - this->mUnk_0B + 1) * 0x100;
}
this->TryLoadBGChar(temp_r7, var_r6_2 + var_r2_2, var_r3);
this->mUnk_0A = false;
this->mUnk_0B = 0xBF;
this->mUnk_0C = 0;
}
void AdventureModeManager_1B8_Base::TryLoadBGChar(void *ptr, u32 offset, u32 size) {
DC_func_0002();
if (!this->mIsTopScreen) {
switch (this->mBGType) {
case 0:
GX_LoadBG0Char(ptr, offset, size);
break;
case 1:
GX_LoadBG1Char(ptr, offset, size);
break;
case 2:
GX_LoadBG2Char(ptr, offset, size);
break;
case 3:
GX_LoadBG3Char(ptr, offset, size);
break;
default:
break;
}
} else if (data_0204a110.mUnk_008 != 1) {
switch (this->mBGType) {
case 0:
GXS_LoadBG0Char(ptr, offset, size);
break;
case 1:
GXS_LoadBG1Char(ptr, offset, size);
break;
case 2:
GXS_LoadBG2Char(ptr, offset, size);
break;
case 3:
GXS_LoadBG3Char(ptr, offset, size);
break;
default:
break;
}
}
}
unk32 AdventureModeManager_1B8_Base::func_ov024_020d0db4(unk32 param1, unk32 param2) {
u32 temp_r0;
s32 temp_r2;
s32 temp_r3;
temp_r3 = param2 - this->mUnk_1C.mUnk_02;
temp_r2 = (param1 >> 3) + ((temp_r3 >> 3) << 5);
temp_r0 = temp_r3 << 0x1D;
if (this->mUnk_10) {
return (temp_r2 << 5) + (temp_r0 >> 0x1B) + ((param1 & 0x07) >> 1);
}
return (param1 & 0x07) + ((temp_r2 << 6) + (temp_r0 >> 0x1A));
}
bool AdventureModeManager_1B8_Base::func_ov024_020d0df8(unk32 param1, unk32 param2) {
bool var_r4 = false;
if (param1 >= 0 && param1 < 0x100 && param2 >= 0 && param2 < 0xC0) {
u8 temp_r0 = this->mUnk_18[this->func_ov024_020d0db4(param1, param2)];
if (this->mUnk_10) {
if (param1 & 1) {
if (temp_r0 & 0xF0) {
var_r4 = true;
}
} else {
if (temp_r0 & 0x0F) {
var_r4 = true;
}
}
} else {
if (temp_r0 != 0) {
var_r4 = true;
}
}
}
return var_r4;
}
void AdventureModeManager_1B8_Base::func_ov024_020d0e64(void *ptr, u32 size) {
DC_func_0004(ptr, size * 2);
GXS_BeginLoadBGExtPltt();
GXS_LoadBGExtPltt(ptr, 0x4000, size * 2);
GXS_EndLoadBGExtPltt();
}
bool AdventureModeManager_1B8_Base::func_ov024_020d0e98() {
if (this->mUnk_1C.mUnk_02 > 0 || this->mUnk_1C.mUnk_06 < 0xC0) {
return true;
}
return false;
}
void AdventureModeManager_1B8_Base::func_ov024_020d0ec0(s32 *pFlags, s32 position, bool doSet) {
if (doSet) {
SET_FLAG_ALT(pFlags, position);
} else {
UNSET_FLAG_ALT(pFlags, position);
}
}
bool AdventureModeManager_1B8_Base::func_ov024_020d0f0c(s32 *pFlags, s32 position) {
if (GET_FLAG_ALT(pFlags, position)) {
return true;
}
return false;
}
unk32 AdventureModeManager_1B8_Base::func_ov024_020d0f2c(unk32 param1, unk32 param2) {
return data_ov024_020d8200.mUnk_04 * (param2 - data_ov024_020d8200.mUnk_02) + (param1 - data_ov024_020d8200.mUnk_00);
}
AdventureModeManager_1B8::AdventureModeManager_1B8(u8 bgType, bool param2, bool param3) :
AdventureModeManager_1B8_Base(bgType, param2, &data_ov024_020d8200, param3, false) {
this->mUnk_24 = 0xFF;
this->mUnk_28 = NULL;
this->func_ov024_020d0e64(&data_ov024_020d869c, sizeof(data_ov024_020d869c));
}
AdventureModeManager_1B8::~AdventureModeManager_1B8() {}
void AdventureModeManager_1B8::func_ov024_020d0fb4(unk32 param1, unk32 param2, u8 param3, u8 param4, TouchControl *param5) {
param1 -= data_0204a110.mUnk_E02;
if (CHECK_TOUCH_FLAGS(param5, TouchFlag_TouchedNow) ||
(param5->mState.touch && this->mUnk_00 == ADVMGR_UNK && this->mUnk_04 == ADVMGR_UNK)) {
if (this->func_ov024_020d0924(param1, param2, param3, param4)) {
this->mUnk_00 = param1;
this->mUnk_04 = param2;
if (param3 == 0) {
data_ov000_020b52b4.func_ov000_0206f778(param1, param2, 0x42);
} else {
data_ov000_020b52b4.func_ov000_0206f778(param1, param2, 0x41);
}
} else {
this->mUnk_00 = ADVMGR_UNK;
this->mUnk_04 = ADVMGR_UNK;
}
} else if (param5->mState.touch) {
if (this->func_ov024_020d0744(this->mUnk_00, this->mUnk_04, param1, param2, param3, param4)) {
this->mUnk_00 = param1;
this->mUnk_04 = param2;
if (param3 == 0) {
data_ov000_020b52b4.func_ov000_0206f778(param1, param2, 0x42);
} else {
data_ov000_020b52b4.func_ov000_0206f778(param1, param2, 0x41);
}
data_027e0ce0->func_ov017_020bd69c();
} else {
this->mUnk_00 = ADVMGR_UNK;
this->mUnk_04 = ADVMGR_UNK;
}
} else {
this->mUnk_00 = ADVMGR_UNK;
this->mUnk_04 = ADVMGR_UNK;
}
}
void AdventureModeManager_1B8::func_ov024_020d114c() {
this->mUnk_00 = ADVMGR_UNK;
this->mUnk_04 = ADVMGR_UNK;
}
bool AdventureModeManager_1B8::func_ov024_020d1160() {
SomeSaveFileStruct sp1C(0x4A90);
s32 *unk_00 = (s32 *) sp1C.unk_00;
void *sp14 = (void *) ((u8 *) sp1C.unk_00 + 0x1290);
void *unk_28 = this->mUnk_28;
this->func_ov024_020d14a8((AdventureModeManager_1B8_Base_1C *) &data_ov024_020d8200, 0x1290, unk_00);
for (int spC = 0; spC < 4; spC++) {
u32 temp_r0 = func_0202955c(unk_00, 0x1290, unk_28, 4, sp14);
if (temp_r0 != 0 && temp_r0 <= 0xFFC) {
if (0xFFC - temp_r0 != 0) {
MI_CpuFill8((void *) ((u8 *) unk_28 + temp_r0), 0, 0xFFC - temp_r0);
}
return true;
}
if (spC < 3) {
int sp8 = data_ov024_020d8200.mUnk_00 + data_ov024_020d8200.mUnk_04;
int sp4 = data_ov024_020d8200.mUnk_02 + data_ov024_020d8200.mUnk_06;
int var_r5;
int var_r6;
int var_r7;
int var_r8;
bool var_r9;
int var_r10;
for (var_r8 = data_ov024_020d8200.mUnk_02; var_r8 < sp4; var_r8 += 2) {
for (var_r10 = data_ov024_020d8200.mUnk_00; var_r10 < sp8; var_r10 += 2) {
var_r7 = 0;
for (var_r5 = 0; var_r5 < 2; var_r5++) {
for (var_r6 = 0; var_r6 < 2; var_r6++) {
int result = AdventureModeManager_1B8_Base::func_ov024_020d0f2c(var_r10 + var_r6, var_r8 + var_r5);
if (AdventureModeManager_1B8_Base::func_ov024_020d0f0c(unk_00, result)) {
var_r7++;
}
}
}
if (data_ov024_020d7547[spC] == var_r7) {
var_r9 = data_ov024_020d7544[spC];
for (var_r5 = 0; var_r5 < 2; var_r5++) {
for (var_r6 = 0; var_r6 < 2; var_r6++) {
int result =
AdventureModeManager_1B8_Base::func_ov024_020d0f2c(var_r10 + var_r6, var_r8 + var_r5);
AdventureModeManager_1B8_Base::func_ov024_020d0ec0(unk_00, result, var_r9);
}
}
}
}
}
}
}
return false;
}
void AdventureModeManager_1B8::func_ov024_020d1364() {
if (this->mUnk_24 == 0xFF) {
return;
}
if (this->mUnk_24 >= 0x78) {
return;
}
if (!this->func_ov024_020d1160()) {
return;
}
gSaveManager.func_ov017_020c3040(this->mUnk_28, this->mUnk_24);
SET_FLAG(gSaveManager.mUnk_000->mUnk_B30, this->mUnk_24);
}
void AdventureModeManager_1B8::func_ov024_020d13cc(s32 param1) {
this->mUnk_24 = param1;
this->func_ov024_020d0698();
if (this->mUnk_24 == 0xFF) {
return;
}
if (this->mUnk_24 >= 0x78) {
return;
}
if (GET_FLAG(gSaveManager.mUnk_000->mUnk_B30, this->mUnk_24)) {
SomeSaveFileStruct sp4(0x2290);
void *unk_00 = sp4.unk_00;
if (gSaveManager.func_ov000_020a0b70(unk_00, this->mUnk_24)) {
s32 *ptr = (s32 *) ((u8 *) sp4.unk_00 + 0x1000);
func_02029058(unk_00, ptr);
this->func_ov024_020d1564(&data_ov024_020d8200, 0x1290, ptr, 1);
return; // this is required
}
}
}
bool AdventureModeManager_1B8::func_ov024_020d14a8(AdventureModeManager_1B8_Base_1C *param1, unk32 param2, s32 *pFlags) {
int i;
int var_r5;
int temp_r6;
int var_r7;
int temp_r1;
bool ret = false;
MI_CpuFill8(pFlags, 0, param2);
temp_r6 = param1->mUnk_00 + param1->mUnk_04;
var_r5 = param1->mUnk_02;
temp_r1 = var_r5 + param1->mUnk_06;
var_r7 = 0;
for (; var_r5 < temp_r1; var_r5++) {
for (i = param1->mUnk_00; i < temp_r6; var_r7++, i++) {
if (this->func_ov024_020d0df8(i, var_r5)) {
this->func_ov024_020d0ec0(pFlags, var_r7, 1);
ret = true;
}
}
}
return ret;
}
void AdventureModeManager_1B8::func_ov024_020d1564(const AdventureModeManager_1B8_Base_1C *param1, unk32 param2, s32 *pFlags,
const u8 param4) {
int i;
int var_r5;
int temp_r6;
int var_r7;
int temp_r1;
temp_r6 = param1->mUnk_00 + param1->mUnk_04;
var_r5 = param1->mUnk_02;
temp_r1 = var_r5 + param1->mUnk_06;
var_r7 = 0;
for (; var_r5 < temp_r1; var_r5++) {
for (i = param1->mUnk_00; i < temp_r6; var_r7++, i++) {
if (AdventureModeManager_1B8_Base::func_ov024_020d0f0c(pFlags, var_r7)) {
this->func_ov024_020d0924(i, var_r5, param4, 1);
}
}
}
}
void AdventureModeManager_1B8::func_ov024_020d1614(void *param1) {
this->mUnk_28 = param1;
_MI_CpuFill(0, this->mUnk_28, 0x1000);
data_ov017_020c3f70.func_ov017_020bba78();
}
void AdventureModeManager_1B8::func_ov024_020d1638() {
data_ov017_020c3f70.func_ov017_020bba94();
this->mUnk_28 = NULL;
}
@@ -0,0 +1,96 @@
#include "Game/GameModeAdventure.hpp"
#include "Save/SaveManager.hpp"
#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_020b50c0.hpp"
#include "Unknown/UnkStruct_ov024_020d8660.hpp"
#include "versions.h"
extern "C" {
unk32 func_0200e234();
}
THUMB_BEGIN
GameModeAdventure::~GameModeAdventure() {
UnkStruct_027e09a4::Destroy();
delete gSaveManager.mUnk_000;
gSaveManager.mUnk_000 = NULL;
func_0200e234();
data_ov000_020b504c.func_ov001_020be6f4();
data_ov000_020b50c0.func_ov001_020bd87c();
}
void GameModeAdventure::vfunc_08() {
this->GameModeBase::vfunc_08();
data_ov000_020b504c.func_ov001_020be510();
data_ov000_020b50c0.func_ov001_020bd854();
SaveFile *pSaveFile = data_ov000_020b4eec.func_ov001_020be12c();
#if IS_JP
SaveInfoData *pSaveInfoData = &pSaveFile->mSlots[0].mSaveInfo.mSaveInfoData[0];
if (pSaveInfoData->mSceneIndex == SceneIndex_f_ajito2) {
pSaveInfoData->mSceneIndex = SceneIndex_f_ajito;
pSaveInfoData->mRoomIndex = 0;
pSaveInfoData->mSpawnIndex = 0;
UNSET_FLAG(pSaveInfoData->mAdventureFlags.data, AdventureFlag_WadatsumiMinigameSequence);
}
#endif
data_027e09a4->func_ov000_020705e8(pSaveFile, 0);
}
THUMB_END
void GameModeAdventure::vfunc_0C() {
unk32 value = data_0204a110.mUnk_DF8;
data_027e09a4->func_ov000_0207087c(value);
data_ov024_020d8660->func_ov024_020c4b4c(value);
}
void GameModeAdventure::vfunc_10() {
data_027e09a4->func_ov000_020708d8(data_0204a110.mUnk_DF8);
}
void GameModeAdventure::vfunc_14() {
data_027e09a4->func_ov000_02070834(&data_0204a110.mUnk_DF2);
}
void GameModeAdventure::vfunc_18() {
unk32 value = data_0204a110.mUnk_DF8;
data_027e09a4->func_ov000_02070938(value);
if (data_ov024_020d8660->mUnk_00 != NULL) {
data_ov024_020d8660->mUnk_00->vfunc_1C(value);
}
}
void GameModeAdventure::vfunc_1C() {
data_027e09a4->func_ov000_02070a4c(data_0204a110.mUnk_DF8);
}
void GameModeAdventure::vfunc_20() {
UnkStruct_027e09a4 *temp = data_027e09a4;
unk8 *ptr = &data_0204a110.mUnk_DF2;
if (data_0204a088->mUnk_120 & 1) {
temp->func_ov017_020bb994(ptr);
}
if (data_ov024_020d8660->mUnk_00 != NULL) {
data_ov024_020d8660->mUnk_00->vfunc_18(ptr);
}
}
void UnkStruct_027e09a4::Destroy() {
delete data_027e09a4;
}
@@ -0,0 +1,29 @@
#include "Unknown/UnkStruct_ov024_020d8660.hpp"
UnkActorSystem1::UnkActorSystem1() {
this->mUnk_04 = false;
}
UnkActorSystem1::~UnkActorSystem1() {}
void UnkActorSystem1::vfunc_08() {
this->mUnk_04 = true;
}
void UnkActorSystem1::vfunc_0C() {
this->mUnk_04 = false;
}
void UnkActorSystem1::vfunc_10(unk32 param1) {}
void UnkActorSystem1::vfunc_14(unk32 param1) {}
void UnkActorSystem1::vfunc_18(unk8 *param1) {}
void UnkActorSystem1::vfunc_1C(unk32 param1) {}
void UnkActorSystem1::vfunc_20(unk32 param1) {}
bool UnkActorSystem1::vfunc_2C() {
return this->mUnk_04;
}
@@ -0,0 +1,106 @@
#include "Unknown/Common.hpp"
#include "Unknown/UnkStruct_0204af1c.hpp"
#include "Unknown/UnkStruct_ov000_020b5214.hpp"
UnkActorSystem2::UnkActorSystem2(bool param1) :
mUnk_01B(true),
mUnk_10C(false),
mUnk_10D(false) {
if (param1) {
this->func_ov024_020c4ec0();
}
}
void UnkActorSystem2::func_ov024_020c4ec0() {
this->func_ov024_020c4ed8();
this->mUnk_18 = true;
}
void UnkActorSystem2::func_ov024_020c4ed8() {
this->mUnk_01C.func_ov000_0206082c(0x4D, 0);
}
void UnkActorSystem2::func_ov024_020c4ef0() {
this->mUnk_094.func_ov000_0206082c(0x53, 0);
}
void UnkActorSystem2::func_ov024_020c4f08() {
this->mUnk_10C = true;
this->mUnk_01C.mUnk_6E = true;
}
void UnkActorSystem2::func_ov024_020c4f18() {
this->mUnk_10C = false;
this->mUnk_01C.mUnk_6E = false;
}
void UnkActorSystem2::func_ov024_020c4f28() {
this->mUnk_10D = true;
this->mUnk_094.mUnk_6E = true;
data_ov000_020b5214.func_ov000_0206db44(0xA8);
}
void UnkActorSystem2::func_ov024_020c4f4c() {
this->mUnk_10D = false;
this->mUnk_094.mUnk_6E = false;
}
void UnkActorSystem2::func_ov024_020c4f5c() {
this->mUnk_01C.func_ov000_02060af8();
}
void UnkActorSystem2::func_ov024_020c4f6c() {
this->mUnk_094.func_ov000_02060af8();
}
bool UnkActorSystem2::func_ov024_020c4f7c() {
return this->mUnk_094.mUnk_6E;
}
void UnkActorSystem2::vfunc_08(Input *pButtons, TouchControl *pTouchControl) {
this->mUnk_01C.func_ov000_020609c4();
this->mUnk_094.func_ov000_020609c4();
if (this->mUnk_01C.func_ov000_02060a98(0x04000) || this->mUnk_01C.func_ov000_02060a98(0x40000) ||
this->mUnk_01C.func_ov000_02060a98(0x7C000)) {
data_ov000_020b5214.func_ov000_0206db44(0xA6);
} else if (this->mUnk_01C.func_ov000_02060a98(0xB8000)) {
data_ov000_020b5214.func_ov000_0206db44(0xA7);
}
}
void UnkActorSystem2::vfunc_10(unk8 *param1) {
Vec2us vec;
if (this->func_ov024_020c510c()) {
return;
}
if (this->mUnk_10C) {
UnkStruct_ov019_020d24c8_28_258 UStack_30(0x4D, 0);
vec.x = UStack_30.mPosU.x;
vec.y = UStack_30.mPosU.y;
data_0204af1c.func_0201aad0(&this->mUnk_01C, &vec, 0, NULL);
}
if (this->mUnk_10D) {
UnkStruct_ov019_020d24c8_28_258 UStack_30(0x4D, 0);
vec.x = UStack_30.mPosU.x;
vec.y = UStack_30.mPosU.y;
data_0204af1c.func_0201aad0(&this->mUnk_094, &vec, 0, NULL);
}
}
bool UnkActorSystem2::func_ov024_020c510c() {
if (!this->mUnk_01B) {
return true;
}
return false;
}
void UnkActorSystem2::func_ov024_020c5120(bool param1) {
this->mUnk_01B = param1;
}
UnkActorSystem2::~UnkActorSystem2() {}
@@ -0,0 +1,166 @@
#include "Cutscene/Cutscene.hpp"
#include "MainGame/AdventureMode.hpp"
#include "System/SysNew.hpp"
#include "Unknown/UnkStruct_0204a088.hpp"
#include "Unknown/UnkStruct_027e0998.hpp"
#include "Unknown/UnkStruct_027e0cd8.hpp"
#include "Unknown/UnkStruct_ov024_020d86a0.hpp"
#include "Unknown/UnkStruct_ov026_02138d10.hpp"
extern "C" void func_ov024_020d51dc(Vec2s *param1, u32 param2);
void UnkStruct_ov024_020d86a0::Destroy() {
delete data_ov024_020d86a0;
}
void UnkStruct_027e0998::Destroy() {
delete data_027e0998;
}
UnkStruct_027e0998::~UnkStruct_027e0998() {
data_027e0998 = NULL;
}
UnkStruct_027e0998::UnkStruct_027e0998() {}
UnkStruct_027e0998 *UnkStruct_027e0998::Create() {
return new(HeapIndex_1) UnkStruct_027e0998();
}
bool UnkStruct_027e0998::vfunc_00(Vec3p *pPos, Vec2s *param2, u16 *param3) {
if (data_027e09a4->IsCutscene()) {
CutsceneParamsEntry *pEntry = Cutscene_GetParamEntry(data_027e09a4->CurrentCSIndex());
if (pEntry->mUnk_18 == 1) {
return false;
}
}
if (data_027e09a4->IsPassenger()) {
return false;
}
if (data_027e09a4->func_01ffd3d8() && data_ov026_02138d10->func_ov026_020e6a6c()) {
return false;
}
if (!this->func_ov024_020c716c()) {
return false;
}
switch (this->mUnk_44) {
case 3:
return this->func_ov024_020c727c(param2, param3);
case 4:
if (data_027e09a4->func_01ffd3d8()) {
u32 value = *(u32 *) param3;
// position? param3 could be a Vec2us
u16 stack[4];
stack[2] = 0x200;
stack[3] = 0x000;
if (*(u32 *) &stack[2] != value) {
return false;
}
return this->func_ov024_020c7214(pPos, param2, param3);
}
return this->func_ov024_020c727c(param2, param3);
default:
break;
}
if (data_027e0cd8->func_ov000_02082124()) {
bool var_r2 = true;
if (*param3 != 0x100 && *param3 != 0x101) {
var_r2 = false;
}
if (!var_r2) {
return false;
}
Vec3p pos;
pos.x = data_027e0cd8->mUnk_24.x;
pos.y = data_027e0cd8->mUnk_24.y;
pos.z = data_027e0cd8->mUnk_24.z;
return this->UnkStruct_027e0998_Base::vfunc_00(&pos, param2, param3);
}
return this->func_ov024_020c7214(pPos, param2, param3);
}
bool UnkStruct_027e0998::func_ov024_020c716c() {
if (GetAdventureModeManager()->func_ov024_020c681c() &&
(this->func_ov024_020c7300(0x01) || this->func_ov024_020c7300(0x06) || this->func_ov024_020c7300(0x07) ||
this->func_ov024_020c7300(0x02) || this->func_ov024_020c7300(0x03) || this->func_ov024_020c7300(0x0A))) {
return true;
}
return false;
}
bool UnkStruct_027e0998::func_ov024_020c7214(Vec3p *pPos, Vec2s *param2, u16 *param3) {
bool temp_r4 = this->UnkStruct_027e0998_Base::vfunc_00(pPos, param2, param3);
if (data_027e09a4->func_01ffd3d8()) {
Vec2s sp0;
func_ov024_020d51dc(&sp0, data_027e09a4->CurrentSceneIndex());
param2->x += sp0.x;
param2->y += sp0.y;
}
return temp_r4;
}
bool UnkStruct_027e0998::func_ov024_020c727c(Vec2s *param1, u16 *param2) {
bool var_r2 = true;
if (*param2 != 0x100 && *param2 != 0x101) {
var_r2 = false;
}
if (!var_r2) {
return false;
}
bool temp_r4 = this->UnkStruct_027e0998_Base::vfunc_00(&data_027e09a4->mUnk_30, param1, param2);
Vec2s sp0;
func_ov024_020d51dc(&sp0, data_027e09a4->mUnk_2C);
param1->x += sp0.x;
param1->y += sp0.y;
return temp_r4;
}
bool UnkStruct_027e0998::func_ov024_020c7300(unk32 param1) {
UnkStruct_0204a088 *ptr = data_0204a088;
unk32 unk_00;
unk32 unk_04;
unk32 unk_08;
u16 temp_ip;
temp_ip = ptr->mUnk_128;
unk_00 = ptr->mUnk_00;
unk_04 = ptr->mUnk_04;
unk_08 = ptr->mUnk_08;
if (unk_00 == param1 || (unk_04 == param1 && temp_ip == 0) || (unk_08 == param1 && temp_ip != 0)) {
return true;
}
return false;
}
bool UnkStruct_027e0998::func_ov024_020c7354() {
if (data_027e09a4->func_01ffd400()->mUnk_10 == 6 && !data_027e09a4->IsPirate()) {
return true;
}
return false;
}
@@ -0,0 +1,239 @@
#include "MainGame/AdventureMode.hpp"
#include "System/SysNew.hpp"
#include "Unknown/UnkStruct_027e09a4.hpp"
#include "Unknown/UnkStruct_027e0cf8.hpp"
extern "C" bool func_ov024_020d5354(unk32 *param1, unk16 *param2, ItemId itemId);
extern "C" void func_ov024_020d524c(Vec2us *param1, unk32 param2);
extern "C" void func_ov024_020d51dc(Vec2us *param1, unk32 param2);
UnkStruct_027e0cf8 *UnkStruct_027e0cf8::Create() {
return new(HeapIndex_1) UnkStruct_027e0cf8();
}
UnkStruct_027e0cf8::UnkStruct_027e0cf8() {
this->mUnk_00 = new(HeapIndex_1) UnkStruct_027e0cf8_00();
this->mUnk_04 = NULL;
this->mUnk_08 = new(HeapIndex_1) UnkStruct_027e0cf8_08();
this->mUnk_0C = new(HeapIndex_1) UnkStruct_027e0cf8_0C();
this->mUnk_10.x = 0;
this->mUnk_10.y = 0;
this->mUnk_14.x = 0;
this->mUnk_14.y = 0;
this->mUnk_18 = -1;
this->mUnk_1C = false;
this->mUnk_20 = -1;
this->mUnk_24 = -1;
this->mUnk_28 = 0;
this->mUnk_2A = 0;
if (data_027e09a4->IsDarkRealm()) {
this->mUnk_04 = new(HeapIndex_1) UnkStruct_027e0cf8_04();
}
}
UnkStruct_027e0cf8::~UnkStruct_027e0cf8() {
this->func_ov024_020c7750();
if (data_027e09a4->IsDarkRealm()) {
delete this->mUnk_04;
this->mUnk_04 = NULL;
}
delete this->mUnk_0C;
this->mUnk_0C = NULL;
delete this->mUnk_08;
this->mUnk_08 = NULL;
delete this->mUnk_00;
this->mUnk_00 = NULL;
}
void UnkStruct_027e0cf8::func_ov024_020c755c(void *param1) {
unk32 local_1c = -1;
unk16 local_20 = 0;
if (this->func_ov024_020c78ac(&local_1c, &local_20)) {
this->mUnk_18 = 0;
this->func_ov024_020c75d0(param1, local_1c, local_20);
} else {
this->mUnk_18 = -1;
this->func_ov024_020c75d0(param1, -1, 0);
}
}
//! TODO: figure this out
struct SomeSaveFileStruct {
/* 00 */ SaveFile *mpSaveFiles[MAX_SAVE_SLOTS];
/* 08 */ STRUCT_PAD(0x00, 0xC4);
/* CC */ unk32 mUnk_CC;
SomeSaveFileStruct(unk32 param1);
~SomeSaveFileStruct();
};
void UnkStruct_027e0cf8::func_ov024_020c75d0(void *param1, unk32 param2, u16 param3) {
if (this->mUnk_1C) {
UnkStruct_027e0cf8::func_ov024_020c7724();
}
unk32 uVar1 = ((SomeSaveFileStruct *) param1)->mUnk_CC;
volatile Vec2us local_1c;
func_ov024_020d524c((Vec2us *) &local_1c, uVar1);
Vec2us result;
result.x = local_1c.x;
result.y = local_1c.y;
this->mUnk_10.x = result.x;
this->mUnk_10.y = result.y;
volatile Vec2us local_20;
func_ov024_020d51dc((Vec2us *) &local_20, uVar1);
result.x = local_20.x;
result.y = local_20.y;
this->mUnk_14.x = result.x;
this->mUnk_14.y = result.y;
Vec2s local_24;
local_24.x = this->mUnk_10.x;
local_24.y = this->mUnk_10.y;
this->mUnk_08->func_ov024_020d32e8(&local_24);
Vec2s local_28;
local_28.x = this->mUnk_14.x;
local_28.y = this->mUnk_14.y;
this->mUnk_0C->func_ov024_020cff8c(param1, &local_28);
Vec2s local_2c;
local_2c.x = this->mUnk_14.x;
local_2c.y = this->mUnk_14.y;
Vec2s vec;
vec.x = 0x1E;
vec.y = 0x96;
this->mUnk_00->func_ov024_020cfb7c(param1, &local_2c, param2, param3, 0x1E, 0x96);
if (data_027e09a4->IsDarkRealm()) {
this->mUnk_04->func_ov026_020dc300();
}
this->func_ov024_020c7750();
if (param2 == -1) {
this->mUnk_08->func_ov024_020d3324(param1);
} else {
this->mUnk_08->func_ov024_020d3348(param1, param2, param3, 0x28, 0x5A);
}
this->mUnk_1C = true;
}
void UnkStruct_027e0cf8::func_ov024_020c7724() {
this->mUnk_1C = 0;
if (this->mUnk_18 >= 0) {
this->func_ov024_020c78d0();
}
this->mUnk_0C->func_ov024_020d0004();
}
void UnkStruct_027e0cf8::func_ov024_020c7750() {
if (!data_027e09a4->IsDarkRealm()) {
this->mUnk_08->func_ov024_020d340c();
}
}
void UnkStruct_027e0cf8::func_ov024_020c7780() {
if (!data_027e09a4->IsDarkRealm()) {
this->mUnk_08->func_ov024_020d32d8();
}
}
void UnkStruct_027e0cf8::func_ov024_020c77b0(unk32 param1) {
this->mUnk_08->func_ov024_020d341c(param1);
}
void UnkStruct_027e0cf8::func_ov024_020c77c0() {
this->mUnk_0C->func_ov024_020d02e0();
}
void UnkStruct_027e0cf8::func_ov024_020c77d0() {
this->mUnk_0C->func_ov024_020d0340();
}
void UnkStruct_027e0cf8::func_ov024_020c77e0(Vec2s *param1) {
UnkStruct_027e0cf8_0C *ptr = this->mUnk_0C;
Vec2s local_8;
local_8.x = param1->x;
local_8.y = param1->y;
ptr->func_ov024_020d03f8(&local_8);
}
void UnkStruct_027e0cf8::func_ov024_020c7804(Vec2s *param1) {
UnkStruct_027e0cf8_0C *ptr = this->mUnk_0C;
Vec2s local_8;
local_8.x = param1->x;
local_8.y = param1->y;
ptr->func_ov024_020d041c(&local_8);
}
void UnkStruct_027e0cf8::func_ov024_020c7828(ItemId itemId) {
unk32 local_c = -1;
unk16 local_10 = 0;
if (func_ov024_020d5354(&local_c, &local_10, itemId)) {
this->func_ov024_020c7878(local_c, local_10);
}
}
void UnkStruct_027e0cf8::func_ov024_020c7878(unk32 param1, u16 param2) {
this->mUnk_20 = param1;
this->mUnk_28 = param2;
}
void UnkStruct_027e0cf8::func_ov024_020c7884() {
this->mUnk_24 = this->mUnk_20;
this->mUnk_2A = this->mUnk_28;
}
void UnkStruct_027e0cf8::func_ov024_020c7898() {
this->mUnk_20 = this->mUnk_24;
this->mUnk_28 = this->mUnk_2A;
}
bool UnkStruct_027e0cf8::func_ov024_020c78ac(unk32 *param1, unk16 *param2) {
if (this->mUnk_20 != -1) {
u16 temp = this->mUnk_28;
if (temp != 0) {
*param1 = this->mUnk_20;
*param2 = temp;
return true;
}
}
return false;
}
void UnkStruct_027e0cf8::func_ov024_020c78d0() {
this->mUnk_20 = -1;
this->mUnk_28 = 0;
}
void UnkStruct_027e0cf8::func_ov024_020c78e4(unk32 param1) {
if (this->mUnk_0C != NULL) {
this->mUnk_0C->func_ov024_020d05d0(param1, 1);
}
}
void UnkStruct_027e0cf8::func_ov024_020c7900(unk32 param1) {
if (this->mUnk_0C != NULL) {
this->mUnk_0C->func_ov024_020d05d0(param1, 0);
}
}
DECL_INSTANCE(UnkStruct_027e0cf8, data_027e0cf8);
@@ -0,0 +1,156 @@
#include "Actor/Actor.hpp"
#include "Actor/ActorManager.hpp"
#include "Unknown/UnkStruct_0204a110.hpp"
#include "Unknown/UnkStruct_020d8698.hpp"
#include "Unknown/UnkStruct_027e09a4.hpp"
#include "Unknown/UnkStruct_027e09b8.hpp"
#include "Unknown/UnkStruct_ov000_020b51b8.hpp"
#include "Unknown/UnkStruct_ov024_020d8660.hpp"
#include "regs.h"
#include "versions.h"
extern "C" {
void GX_func_0008(void *, unk32, unk32);
}
extern unk32 data_ov000_020b3000;
UnkStruct_ov024_020d8660 *data_ov024_020d8660 = NULL;
void UnkStruct_ov024_020d8660::func_ov024_020c4a8c(UnkActorSystem1 *param1) {
this->mUnk_00 = param1;
this->mUnk_1C = this->mUnk_00->vfunc_24();
data_ov000_020b51b8.func_ov000_0206d0bc(0x14);
}
void UnkStruct_ov024_020d8660::func_ov024_020c4ac0() {
// this will automatically assign the instance pointer to `data_ov024_020d8660`
static UnkStruct_ov024_020d8660 instance;
}
UnkStruct_ov024_020d8660::~UnkStruct_ov024_020d8660() {}
UnkStruct_ov024_020d8660::UnkStruct_ov024_020d8660() {
this->mUnk_00 = NULL;
this->mActorId = ActorId_None;
this->mUnk_08 = 0;
this->mUnk_1C = 0;
}
void UnkStruct_ov024_020d8660::func_ov024_020c4b4c(unk32 param1) {
if (this->mUnk_00 != NULL) {
if (data_027e09b8->func_01ffd420() == 0) {
this->mUnk_00->vfunc_10(param1);
} else {
this->mUnk_00->vfunc_14(param1);
}
}
}
void UnkStruct_ov024_020d8660::func_ov024_020c4ba0() {
if (this->mUnk_00 != NULL) {
this->mUnk_00->vfunc_20(1);
data_ov024_020d8698->func_ov024_020cd150();
}
if (this->mUnk_00 != NULL && !this->mUnk_00->mUnk_04) {
this->mUnk_00->vfunc_08();
}
if (this->mActorId != 0) {
struct {
void *ptr;
unk32 actorId;
} uStack_68;
uStack_68.actorId = this->mActorId;
uStack_68.ptr = &data_ov000_020b3000;
Actor **ppActor = gpActorManager->func_01fff350(&uStack_68, gpActorManager->mActorTable);
Actor *pActor = NULL;
if (ppActor != gpActorManager->mUnk_08) {
pActor = *ppActor;
}
if (pActor != NULL) {
ActorUnk_vfunc_b0 auStack_60;
auStack_60.mUnk_0C = this->mUnk_08;
auStack_60.mUnk_14 = this->mUnk_0C.mUnk_00;
auStack_60.mUnk_18 = this->mUnk_0C.mUnk_04;
auStack_60.mUnk_1C = this->mUnk_0C.mUnk_08;
auStack_60.mUnk_20 = this->mUnk_0C.mUnk_0C;
auStack_60.mUnk_21 = this->mUnk_0C.mUnk_0D;
auStack_60.mUnk_32 = 2;
auStack_60.mpActor = pActor;
auStack_60.mUnk_30 = 0;
data_027e09b8->func_ov000_02073470(&auStack_60, 0);
}
this->mActorId = ActorId_None;
this->mUnk_08 = 0;
}
}
void UnkStruct_ov024_020d8660::func_ov024_020c4cc8() {
if (this->mUnk_00 == NULL) {
return;
}
if (!this->mUnk_00->vfunc_2C()) {
return;
}
this->mUnk_00->vfunc_0C();
this->mUnk_00 = NULL;
this->mUnk_1C = 0;
if (data_027e09a4->func_01ffd3d8()) {
data_0204a110.func_02019538(4, 1);
} else {
data_0204a110.func_02019538(0, 1);
}
#if IS_JP
GX_func_0008(&REG_BLDCNT, 0x2F, 0);
GX_func_0008(&REG_BLDCNT_SUB, 0x3F, 0);
if (data_027e09a4->func_01ffd3d8()) {
data_0204a110.mUnk_D9C.func_0201c494(1);
} else {
data_0204a110.mUnk_D9C.func_0201c494(0);
}
#else
GX_func_0008(&REG_BLDCNT, 0x0F, 0);
GX_func_0008(&REG_BLDCNT_SUB, 0x1F, 0);
#endif
}
bool UnkStruct_ov024_020d8660::func_ov024_020c4d74() {
if (this->mUnk_00 != NULL) {
return true;
}
return false;
}
void UnkStruct_ov024_020d8660::func_ov024_020c4d88(ActorId actorId, unk32 param2) {
this->mActorId = actorId;
this->mUnk_08 = param2;
this->mUnk_0C.mUnk_00 = 0;
this->mUnk_0C.mUnk_04 = -1;
this->mUnk_0C.mUnk_08 = -1;
this->mUnk_0C.mUnk_0C = false;
this->mUnk_0C.mUnk_0D = false;
}
void UnkStruct_ov024_020d8660::func_ov024_020c4dac(ActorId actorId, unk32 param2, UnkActorSystem_Infos1 *param3) {
this->mActorId = actorId;
this->mUnk_08 = param2;
this->mUnk_0C.mUnk_00 = param3->mUnk_00;
this->mUnk_0C.mUnk_04 = param3->mUnk_04;
this->mUnk_0C.mUnk_08 = param3->mUnk_08;
this->mUnk_0C.mUnk_0C = param3->mUnk_0C;
this->mUnk_0C.mUnk_0D = param3->mUnk_0D;
}
DECL_INSTANCE(UnkStruct_ov024_020d8660, data_ov024_020d8660);
+2 -12
View File
@@ -11,15 +11,12 @@ MiscAdvManager *MiscAdvManager::Create() {
}
MiscAdvManager::MiscAdvManager() {
MiscAdvManager::SetInstance(this);
this->mLettersRead = 0;
this->mStampsFlag = 0;
this->mSongs = 0;
}
MiscAdvManager::~MiscAdvManager() {
MiscAdvManager::ClearInstance();
}
MiscAdvManager::~MiscAdvManager() {}
void MiscAdvManager::func_ov024_020d6310(MiscAdvManager *pSrc) {
u16 local_10;
@@ -193,11 +190,4 @@ void MiscAdvManager::func_ov024_020d6610() {
this->func_ov024_020d6530();
}
void MiscAdvManager::SetInstance(MiscAdvManager *pInstance) {
gpMiscAdvManager = pInstance;
}
int MiscAdvManager::ClearInstance() {
gpMiscAdvManager = NULL;
//! @bug: missing return
}
DECL_INSTANCE(MiscAdvManager, gpMiscAdvManager);
+1 -1
View File
@@ -275,7 +275,7 @@ bool PassengerManager::CanCompleteTrip() {
bool result = false;
if (this->mPassenger.mActorId != ActorId_None && this->mPassenger.mUnk_04 == 0 &&
data_027e09a4->mSceneIndex != SceneIndex_t_minigame) {
data_027e09a4->mUnk_00.mSceneIndex != SceneIndex_t_minigame) {
result = true;
}
+1 -1
View File
@@ -9,7 +9,7 @@
extern "C" {
void func_0201659c();
void func_0200e234();
void func_ov001_020b6520(unk32 param1);
void *func_ov001_020b6520(unk32 param1);
}
ARM GameModeTitleScreen::GameModeTitleScreen() {
+8 -8
View File
@@ -2,7 +2,7 @@
#include "Game/GameMode.hpp"
#include "Unknown/UnkStruct_02049be0.hpp"
#include "Unknown/UnkStruct_0204a060.hpp"
#include "Unknown/UnkStruct_0204aeac.hpp"
#include "Unknown/UnkStruct_0204a110.hpp"
#include "Unknown/UnkStruct_0204af1c.hpp"
#include "Unknown/UnkStruct_027e0954.hpp"
#include "Unknown/UnkStruct_ov000_020b5214.hpp"
@@ -62,7 +62,7 @@ TitleScreen::TitleScreen() :
auStack_68.func_ov000_02059270(0x3E, "title", 0x32500000);
}
data_0204aeac.func_0201c494(3);
data_0204a110.mUnk_D9C.func_0201c494(3);
this->mUnk_218.func_0201effc(0x0F, 1, 0x1F);
}
@@ -171,8 +171,8 @@ void TitleScreen::vfunc_08(Input *pButtons, TouchControl *pTouchControl) {
}
CALL_PTMF(TitleScreenPTMF<TitleScreen>, data_ov025_020c5aec[this->mState], pButtons, pTouchControl);
data_0204aeac.func_0201c4d8(0, 0x0B, 8);
data_0204aeac.func_0201c504(1, 10, 0x10, 8);
data_0204a110.mUnk_D9C.func_0201c4d8(0, 0x0B, 8);
data_0204a110.mUnk_D9C.func_0201c504(1, 10, 0x10, 8);
}
void TitleScreen::func_ov025_020c5200(Input *pButtons, TouchControl *pTouchControl) {}
@@ -193,7 +193,7 @@ test:
}
void TitleScreen::func_ov025_020c5240(Input *pButtons, TouchControl *pTouchControl) {
this->mUnk_218.UnkOperations();
this->mUnk_218.UpdateLogic();
this->mUnk_204.mUnk_10 = this->mUnk_218.func_0201f04c();
if (this->mUnk_024.func_ov000_02060af8() == 0) {
@@ -230,7 +230,7 @@ void TitleScreen::func_ov025_020c53d0(Input *pButtons, TouchControl *pTouchContr
this->mUnk_18C.mUnk_6E = true;
}
this->mUnk_218.UnkOperations();
this->mUnk_218.UpdateLogic();
this->mUnk_204.mUnk_10 = this->mUnk_218.func_0201f04c();
if (this->mUnk_218.mUnk_0C) {
@@ -284,12 +284,12 @@ void TitleScreen::func_ov025_020c55e4(Input *pButtons, TouchControl *pTouchContr
void TitleScreen::vfunc_14(unk8 *param1) {
if (param1[1] == 0) {
this->func_ov025_020c592c();
data_0204aeac.func_0201c494(3);
data_0204a110.mUnk_D9C.func_0201c494(3);
}
if (param1[0] == 0) {
this->func_ov025_020c5964();
data_0204aeac.func_0201c494(0);
data_0204a110.mUnk_D9C.func_0201c494(0);
}
}
+1 -1
View File
@@ -45,7 +45,7 @@ ARM void TitleScreenManager::vfunc_2C(unk8 *param1) {
this->func_02018830(param1);
}
ARM void TitleScreenManager::vfunc_38(unk32 param1, unk32 param2, unk32 param3, unk32 param4) {}
ARM void TitleScreenManager::vfunc_38(u32 param1, u8 param2, unk16 param3, unk16 param4) {}
ARM void TitleScreenManager::func_ov025_020c4c20() {
((TitleScreen *) this->mpGameMode)->func_ov025_020c4e6c();
@@ -159,7 +159,7 @@ ARM void MapObjectChestBase::vfunc_04() {
sp48.z -= FLOAT_TO_Q20(0.5f);
}
if (data_027e09a4->mSceneIndex == SceneIndex_d_flame) {
if (data_027e09a4->mUnk_00.mSceneIndex == SceneIndex_d_flame) {
local_64.x = this->mUnk_3A.x;
local_66.y = this->mUnk_3A.y;
+3 -3
View File
@@ -555,9 +555,9 @@ extern "C" void func_01ff9fbc(Mat2p *, unk32, Mat2p *);
extern q4 data_0203f964[];
ARM void MapObjectDoorBase::func_ov031_020fcb78(s8 *param1, s8 param2) {
unk32 sp10;
Vec2s sp10;
stack_struct sp8;
unk32 sp4;
u32 sp4;
bool var_r2;
if (!GET_FLAG(this->mFlags, MapObjFlag_5)) {
@@ -575,7 +575,7 @@ ARM void MapObjectDoorBase::func_ov031_020fcb78(s8 *param1, s8 param2) {
//! TODO: fake match?
sp4 = *(u32 *) &this->mUnk_38;
if (data_027e0998->vfunc_00(&this->mPos, &sp10, &sp4) && uVar4 != 0) {
if (data_027e0998->vfunc_00(&this->mPos, &sp10, (u16 *) &sp4) && uVar4 != 0) {
Mat2p m;
if (this->IsOrientedVertically()) {
@@ -364,7 +364,7 @@ ARM void MapObjectDoorDangerSpawn::vfunc_5C(unk32 param1, unk32 param2) {
this->MapObjectDoorBase::vfunc_5C(param1, param2);
var_r6 = 1;
temp_r8 = data_027e09a4->mSceneIndex;
temp_r8 = data_027e09a4->mUnk_00.mSceneIndex;
if (param2 != 0 && (temp_r8 - SceneIndex_tekiya00) > 4) {
var_r6 = 0;
+1 -1
View File
@@ -31,7 +31,7 @@ ARM ItemId ActorUnkGORY::func_ov036_0211bcb0(unk32 param1) {
case 3:
return ItemId_NormalShield;
case 4:
if (GET_FLAG(data_027e09b8->mAdventureFlags, AdventureFlag_BoughtGoronShopQuiver)) {
if (data_027e09b8->HasAdventureFlag(AdventureFlag_BoughtGoronShopQuiver)) {
return ItemId_TenPriceCard;
}
+6 -6
View File
@@ -78,7 +78,7 @@ ARM u16 ActorUnkSHIT::func_ov036_0211ceec(void) {
case ItemId_AncientCoin:
case ItemId_PricelessStone:
case ItemId_RegalRing: {
return data_ov000_020b6510->func_ov000_020a9b4c(this->mItemId - ItemId_DemonFossil) * 2;
return gpTreasureManager->func_ov000_020a9b4c(this->mItemId - ItemId_DemonFossil) * 2;
}
case ItemId_HeartContainer:
return 2000;
@@ -210,7 +210,7 @@ ARM bool ActorUnkSHIT::func_ov036_0211d2dc(void) {
case ItemId_GoronAmber:
case ItemId_MysticJade:
case ItemId_AncientCoin:
if (data_ov000_020b6510->func_ov000_020a9ca4(this->mItemId - ItemId_DemonFossil)) {
if (gpTreasureManager->func_ov000_020a9ca4(this->mItemId - ItemId_DemonFossil)) {
return false;
}
@@ -220,11 +220,11 @@ ARM bool ActorUnkSHIT::func_ov036_0211d2dc(void) {
return false;
case ItemId_HeartContainer:
if (this->mUnk_5C.mParams[3] == 5) {
if (GET_FLAG(data_027e09b8->mAdventureFlags, AdventureFlag_Unk_10F)) {
if (data_027e09b8->HasAdventureFlag(AdventureFlag_Unk_10F)) {
return false;
}
} else {
if (GET_FLAG(data_027e09b8->mAdventureFlags, AdventureFlag_Unk_10E)) {
if (data_027e09b8->HasAdventureFlag(AdventureFlag_Unk_10E)) {
return false;
}
}
@@ -262,7 +262,7 @@ ARM bool ActorUnkSHIT::func_ov036_0211d2dc(void) {
return false;
}
if (GET_FLAG(data_027e09b8->mAdventureFlags, AdventureFlag_BoughtGoronShopQuiver)) {
if (data_027e09b8->HasAdventureFlag(AdventureFlag_BoughtGoronShopQuiver)) {
return false;
}
@@ -270,7 +270,7 @@ ARM bool ActorUnkSHIT::func_ov036_0211d2dc(void) {
case ItemId_BombBag:
case ItemId_BombBagMedium:
case ItemId_BombBagLarge:
if (GET_FLAG(data_027e09b8->mAdventureFlags, AdventureFlag_BoughtBombBagFromBeedle)) {
if (data_027e09b8->HasAdventureFlag(AdventureFlag_BoughtBombBagFromBeedle)) {
return false;
}
+1 -1
View File
@@ -15,7 +15,7 @@ ARM ActorProfileUnkTUTO::ActorProfileUnkTUTO() :
ARM ActorUnkTUTO::ActorUnkTUTO() {}
ARM void ActorUnkTUTO::func_ov037_02120a10(void) {}
ARM void ActorUnkTUTO::func_ov037_02120a64(void) {}
ARM unk32 ActorUnkTUTO::func_ov037_02120a64(void) {}
ARM void ActorUnkTUTO::func_ov037_02120afc(void) {}
ARM void ActorUnkTUTO::func_ov037_02120b10(void) {}
ARM void ActorUnkTUTO::func_ov037_02120ba8(void) {}
+126 -120
View File
@@ -175,7 +175,7 @@ ARM bool ItemManager::func_ov110_02184a40(ItemId itemId) {
}
data_027e0ce0->mUnk_34->func_ov110_02185d3c(itemId);
data_ov000_020b6510->func_ov000_020aa0ac(itemId);
gpTreasureManager->func_ov000_020aa0ac(itemId);
gpMiscAdvManager->GiveLetterOrPriceCard(itemId);
if (!GET_FLAG(this->mFlags, ItemFlag_LokomoSword) && itemId == ItemId_TearLight &&
@@ -188,123 +188,129 @@ ARM bool ItemManager::func_ov110_02184a40(ItemId itemId) {
// BMG IDs
static const u32 sBMGItemMap[] = {
BMG_ID(BMGGroup_maingame, 0x01), // ItemId_Nothing
BMG_ID(BMGGroup_maingame, 0x02), // ItemId_NormalShield
BMG_ID(BMGGroup_castle, 0xD6), // ItemId_NormalSword
BMG_ID(BMGGroup_dungeon, 0x7A), // ItemId_Whirlwind
BMG_ID(BMGGroup_maingame, 0x03), // ItemId_BombBag
BMG_ID(BMGGroup_dungeon, 0x7B), // ItemId_NormalBow
BMG_ID(BMGGroup_dungeon, 0x7C), // ItemId_Boomerang
BMG_ID(BMGGroup_dungeon, 0x7D), // ItemId_Whip
BMG_ID(BMGGroup_dungeon, 0x7E), // ItemId_SandRod
BMG_ID(BMGGroup_maingame, 0x04), // ItemId_9
BMG_ID(BMGGroup_maingame, 0x05), // ItemId_NormalKey
BMG_ID(BMGGroup_maingame, 0x06), // ItemId_BossKey
BMG_ID(BMGGroup_maingame, 0x07), // ItemId_GreenRupee
BMG_ID(BMGGroup_maingame, 0x08), // ItemId_BlueRupee
BMG_ID(BMGGroup_maingame, 0x09), // ItemId_RedRupee
BMG_ID(BMGGroup_maingame, 0x0A), // ItemId_BigGreenRupee
BMG_ID(BMGGroup_maingame, 0x0B), // ItemId_BigRedRupee
BMG_ID(BMGGroup_maingame, 0x0C), // ItemId_BigGoldRupee
BMG_ID(BMGGroup_maingame, 0x0D), // ItemId_ForceGem_18
BMG_ID(BMGGroup_maingame, 0x0E), // ItemId_ForceGem_19
BMG_ID(BMGGroup_maingame, 0x0F), // ItemId_ForceGem_20
BMG_ID(BMGGroup_tower, 0x00), // ItemId_ForestGlyph
BMG_ID(BMGGroup_tower, 0x01), // ItemId_SnowGlyph
BMG_ID(BMGGroup_tower, 0x02), // ItemId_OceanGlyph
BMG_ID(BMGGroup_tower, 0x03), // ItemId_FireGlyph
BMG_ID(BMGGroup_forest, 0xEB), // ItemId_RestoredForestGlyph
BMG_ID(BMGGroup_snow, 0x00), // ItemId_RestoredSnowGlyph
BMG_ID(BMGGroup_water, 0x00), // ItemId_RestoredOceanGlyph
BMG_ID(BMGGroup_flame_fld, 0x8E), // ItemId_RestoredFireGlyph
BMG_ID(BMGGroup_desert, 0x48), // ItemId_RestoredDesertOceanGlyph
BMG_ID(BMGGroup_maingame, 0x10), // ItemId_FinalTrack
BMG_ID(BMGGroup_maingame, 0x11), // ItemId_SpiritTrain
BMG_ID(BMGGroup_maingame, 0x12), // ItemId_TrainCannon
BMG_ID(BMGGroup_maingame, 0x13), // ItemId_SpiritTrainCar
BMG_ID(BMGGroup_maingame, 0x14), // ItemId_TrainWagon
BMG_ID(BMGGroup_maingame, 0x15), // ItemId_ForceGem_35
BMG_ID(BMGGroup_maingame, 0x16), // ItemId_ForceGem_36
BMG_ID(BMGGroup_maingame, 0x17), // ItemId_ForceGem_37
BMG_ID(BMGGroup_castle, 0xD7), // ItemId_RecruitUniform
BMG_ID(BMGGroup_maingame, 0x18), // ItemId_PostmasterLetter
BMG_ID(BMGGroup_maingame, 0x19), // ItemId_HeartContainer
BMG_ID(BMGGroup_maingame, 0x1A), // ItemId_QuiverMedium
BMG_ID(BMGGroup_maingame, 0x1B), // ItemId_BombBagMedium
BMG_ID(BMGGroup_maingame, 0x1C), // ItemId_ForceGem_43
BMG_ID(BMGGroup_maingame, 0x1D), // ItemId_ForceGem_44
BMG_ID(BMGGroup_maingame, 0x1E), // ItemId_ForceGem_45
BMG_ID(BMGGroup_maingame, 0x1F), // ItemId_ForceGem_46
BMG_ID(BMGGroup_maingame, 0x20), // ItemId_ForceGem_47
BMG_ID(BMGGroup_maingame, 0x21), // ItemId_ForceGem_48
BMG_ID(BMGGroup_maingame, 0x22), // ItemId_ForceGem_49
BMG_ID(BMGGroup_maingame, 0x23), // ItemId_ForceGem_50
BMG_ID(BMGGroup_maingame, 0x24), // ItemId_ForceGem_51
BMG_ID(BMGGroup_maingame, 0x25), // ItemId_ForceGem_52
BMG_ID(BMGGroup_maingame, 0x26), // ItemId_ForceGem_53
BMG_ID(BMGGroup_maingame, 0x27), // ItemId_ForceGem_54
BMG_ID(BMGGroup_maingame, 0x28), // ItemId_ForceGem_55
BMG_ID(BMGGroup_maingame, 0x29), // ItemId_ForceGem_56
BMG_ID(BMGGroup_maingame, 0x2A), // ItemId_ForceGem_57
BMG_ID(BMGGroup_maingame, 0x2B), // ItemId_ForceGem_58
BMG_ID(BMGGroup_maingame, 0x2C), // ItemId_ForceGem_59
BMG_ID(BMGGroup_maingame, 0x2D), // ItemId_ForceGem_60
BMG_ID(BMGGroup_maingame, 0x2E), // ItemId_ForceGem_61
BMG_ID(BMGGroup_maingame, 0x2F), // ItemId_PanFlute
BMG_ID(BMGGroup_village, 0xF7), // ItemId_StampBook
BMG_ID(BMGGroup_dungeon, 0x7F), // ItemId_LightBow
BMG_ID(BMGGroup_maingame, 0x30), // ItemId_LokomoSword
BMG_ID(BMGGroup_maingame, 0x31), // ItemId_TenPriceCard
BMG_ID(BMGGroup_maingame, 0x32), // ItemId_RedPotion
BMG_ID(BMGGroup_maingame, 0x33), // ItemId_PurplePotion
BMG_ID(BMGGroup_maingame, 0x34), // ItemId_YellowPotion
BMG_ID(BMGGroup_maingame, 0x35), // ItemId_DemonFossil
BMG_ID(BMGGroup_maingame, 0x36), // ItemId_StalfosSkull
BMG_ID(BMGGroup_maingame, 0x37), // ItemId_StarFragment
BMG_ID(BMGGroup_maingame, 0x38), // ItemId_BeeLarvae
BMG_ID(BMGGroup_maingame, 0x39), // ItemId_WoodHeart
BMG_ID(BMGGroup_maingame, 0x3A), // ItemId_DarkPearlLoop
BMG_ID(BMGGroup_maingame, 0x3B), // ItemId_WhitePearlLoop
BMG_ID(BMGGroup_maingame, 0x3C), // ItemId_RutoCrown
BMG_ID(BMGGroup_maingame, 0x3D), // ItemId_DragonScale
BMG_ID(BMGGroup_maingame, 0x3E), // ItemId_PirateNecklace
BMG_ID(BMGGroup_maingame, 0x3F), // ItemId_PalaceDish
BMG_ID(BMGGroup_maingame, 0x40), // ItemId_GoronAmber
BMG_ID(BMGGroup_maingame, 0x41), // ItemId_MysticJade
BMG_ID(BMGGroup_maingame, 0x42), // ItemId_AncientCoin
BMG_ID(BMGGroup_maingame, 0x43), // ItemId_PricelessStone
BMG_ID(BMGGroup_maingame, 0x44), // ItemId_RegalRing
BMG_ID(BMGGroup_maingame, 0x45), // ItemId_ArrowsRefill
BMG_ID(BMGGroup_maingame, 0x46), // ItemId_BombsRefill
BMG_ID(BMGGroup_maingame, 0x47), // ItemId_SoldOutSign
BMG_ID(BMGGroup_village, 0xF8), // ItemId_AncientShield
BMG_ID(BMGGroup_maingame, 0x48), // ItemId_QuiverLarge
BMG_ID(BMGGroup_maingame, 0x49), // ItemId_BombBagLarge
BMG_ID(BMGGroup_maingame, 0x4A), // ItemId_RandCommonTreasure
BMG_ID(BMGGroup_maingame, 0x4B), // ItemId_RandUncommonTreasure
BMG_ID(BMGGroup_maingame, 0x4C), // ItemId_RandRareTreasure
BMG_ID(BMGGroup_maingame, 0x4D), // ItemId_RandLegendaryTreasure
BMG_ID(BMGGroup_tower, 0x04), // ItemId_TearLight
BMG_ID(BMGGroup_tower, 0x05), // ItemId_LightCompass
BMG_ID(BMGGroup_maingame, 0x4E), // ItemId_ScrollSpinAttack
BMG_ID(BMGGroup_maingame, 0x4F), // ItemId_ScrollBeam
BMG_ID(BMGGroup_village, 0xF9), // ItemId_LinebeckLetter
BMG_ID(BMGGroup_forest, 0xEC), // ItemId_PanFluteSong_101
BMG_ID(BMGGroup_dungeon, 0x80), // ItemId_PanFluteSong_102
BMG_ID(BMGGroup_water, 0x01), // ItemId_PanFluteSong_103
BMG_ID(BMGGroup_village, 0xFA), // ItemId_PanFluteSong_104
BMG_ID(BMGGroup_snow, 0x01), // ItemId_PanFluteSong_105
BMG_ID(BMGGroup_maingame, 0x50), // ItemId_RabbitNet
BMG_ID(BMGGroup_maingame, 0x51), // ItemId_BeedleCard
BMG_ID(BMGGroup_maingame, 0x52), // ItemId_SilverCard
BMG_ID(BMGGroup_maingame, 0x53), // ItemId_GoldCard
BMG_ID(BMGGroup_maingame, 0x54), // ItemId_PlatinumCard
BMG_ID(BMGGroup_maingame, 0x55), // ItemId_DiamondCard
BMG_ID(BMGGroup_maingame, 0x56), // ItemId_FreebieCard
BMG_ID(BMGGroup_maingame, 0x57), // ItemId_QuintupleCard
BMG_ID(BMGGroup_maingame, 0x58), // ItemId_CarbenLetter
BMG_ID(BMGGroup_maingame, 0x59), // ItemId_RecruitUniform2
BMG_ID(BMGGroup_maingame, 0x5A), // ItemId_EngineerUniform
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemNothing), // ItemId_Nothing
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemNormalShield), // ItemId_NormalShield
BMG_ID(BMGGroup_castle, 0xD6), // ItemId_NormalSword
BMG_ID(BMGGroup_dungeon, 0x7A), // ItemId_Whirlwind
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemBombBag), // ItemId_BombBag
BMG_ID(BMGGroup_dungeon, 0x7B), // ItemId_NormalBow
BMG_ID(BMGGroup_dungeon, 0x7C), // ItemId_Boomerang
BMG_ID(BMGGroup_dungeon, 0x7D), // ItemId_Whip
BMG_ID(BMGGroup_dungeon, 0x7E), // ItemId_SandRod
BMG_ID(BMGGroup_maingame, MsgIndex_Empty_04), // ItemId_9
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemSmallKey), // ItemId_NormalKey
BMG_ID(BMGGroup_maingame, MsgIndex_Empty_06), // ItemId_BossKey
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemGreenRupee), // ItemId_GreenRupee
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemBlueRupee), // ItemId_BlueRupee
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemRedRupee), // ItemId_RedRupee
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemBigGreenRupee), // ItemId_BigGreenRupee
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemBigRedRupee), // ItemId_BigRedRupee
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemBigGoldRupee), // ItemId_BigGoldRupee
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemForceGem_18), // ItemId_ForceGem_18
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemForceGem_19), // ItemId_ForceGem_19
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemForceGem_20), // ItemId_ForceGem_20
BMG_ID(BMGGroup_tower, 0x00), // ItemId_ForestGlyph
BMG_ID(BMGGroup_tower, 0x01), // ItemId_SnowGlyph
BMG_ID(BMGGroup_tower, 0x02), // ItemId_OceanGlyph
BMG_ID(BMGGroup_tower, 0x03), // ItemId_FireGlyph
BMG_ID(BMGGroup_forest, 0xEB), // ItemId_RestoredForestGlyph
BMG_ID(BMGGroup_snow, 0x00), // ItemId_RestoredSnowGlyph
BMG_ID(BMGGroup_water, 0x00), // ItemId_RestoredOceanGlyph
BMG_ID(BMGGroup_flame_fld, 0x8E), // ItemId_RestoredFireGlyph
BMG_ID(BMGGroup_desert, 0x48), // ItemId_RestoredDesertOceanGlyph
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemFinalTrack), // ItemId_FinalTrack
BMG_ID(BMGGroup_maingame, MsgIndex_Empty_11), // ItemId_SpiritTrain
BMG_ID(BMGGroup_maingame, MsgIndex_Empty_12), // ItemId_TrainCannon
BMG_ID(BMGGroup_maingame, MsgIndex_Empty_13), // ItemId_SpiritTrainCar
BMG_ID(BMGGroup_maingame, MsgIndex_Empty_14), // ItemId_TrainWagon
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemForceGem_35), // ItemId_ForceGem_35
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemForceGem_36), // ItemId_ForceGem_36
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemForceGem_37), // ItemId_ForceGem_37
BMG_ID(BMGGroup_castle, 0xD7), // ItemId_RecruitUniform
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemLetter), // ItemId_PostmasterLetter
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemHeartContainer), // ItemId_HeartContainer
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemMediumQuiver), // ItemId_QuiverMedium
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemMediumBombBag), // ItemId_BombBagMedium
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemForceGem_43), // ItemId_ForceGem_43
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemForceGem_44), // ItemId_ForceGem_44
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemForceGem_45), // ItemId_ForceGem_45
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemForceGem_46), // ItemId_ForceGem_46
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemForceGem_47), // ItemId_ForceGem_47
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemForceGem_48), // ItemId_ForceGem_48
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemForceGem_49), // ItemId_ForceGem_49
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemForceGem_50), // ItemId_ForceGem_50
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemForceGem_51), // ItemId_ForceGem_51
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemForceGem_52), // ItemId_ForceGem_52
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemForceGem_53), // ItemId_ForceGem_53
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemForceGem_54), // ItemId_ForceGem_54
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemForceGem_55), // ItemId_ForceGem_55
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemForceGem_56), // ItemId_ForceGem_56
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemForceGem_57), // ItemId_ForceGem_57
BMG_ID(BMGGroup_maingame, MsgIndex_Empty_2B), // ItemId_ForceGem_58
BMG_ID(BMGGroup_maingame, MsgIndex_Empty_2C), // ItemId_ForceGem_59
BMG_ID(BMGGroup_maingame, MsgIndex_Empty_2D), // ItemId_ForceGem_60
BMG_ID(BMGGroup_maingame, MsgIndex_Empty_2E), // ItemId_ForceGem_61
BMG_ID(BMGGroup_maingame, MsgIndex_Empty_2F), // ItemId_PanFlute
BMG_ID(BMGGroup_village, 0xF7), // ItemId_StampBook
BMG_ID(BMGGroup_dungeon, 0x7F), // ItemId_LightBow
BMG_ID(BMGGroup_maingame, MsgIndex_Empty_30), // ItemId_LokomoSword
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemTenPriceCard), // ItemId_TenPriceCard
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemRedPotion), // ItemId_RedPotion
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemPurplePotion), // ItemId_PurplePotion
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemYellowPotion), // ItemId_YellowPotion
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemDemonFossil), // ItemId_DemonFossil
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemStalfosSkull), // ItemId_StalfosSkull
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemStarFragment), // ItemId_StarFragment
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemBeeLarvae), // ItemId_BeeLarvae
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemWoodHeart), // ItemId_WoodHeart
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemDarkPearlLoop), // ItemId_DarkPearlLoop
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemWhitePearlLoop), // ItemId_WhitePearlLoop
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemRutoCrown), // ItemId_RutoCrown
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemDragonScale), // ItemId_DragonScale
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemPirateNecklace), // ItemId_PirateNecklace
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemPalaceDish), // ItemId_PalaceDish
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemGoronAmber), // ItemId_GoronAmber
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemMysticJade), // ItemId_MysticJade
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemAncientCoin), // ItemId_AncientCoin
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemPricelessStone), // ItemId_PricelessStone
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemRegalRing), // ItemId_RegalRing
BMG_ID(BMGGroup_maingame, MsgIndex_Empty_45), // ItemId_ArrowsRefill
BMG_ID(BMGGroup_maingame, MsgIndex_Empty_46), // ItemId_BombsRefill
BMG_ID(BMGGroup_maingame, MsgIndex_Empty_47), // ItemId_SoldOutSign
BMG_ID(BMGGroup_village, 0xF8), // ItemId_AncientShield
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemLargeQuiver), // ItemId_QuiverLarge
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemLargeBombBag), // ItemId_BombBagLarge
BMG_ID(BMGGroup_maingame, MsgIndex_Empty_4A), // ItemId_RandCommonTreasure
BMG_ID(BMGGroup_maingame, MsgIndex_Empty_4B), // ItemId_RandUncommonTreasure
BMG_ID(BMGGroup_maingame, MsgIndex_Empty_4C), // ItemId_RandRareTreasure
BMG_ID(BMGGroup_maingame, MsgIndex_Empty_4D), // ItemId_RandLegendaryTreasure
BMG_ID(BMGGroup_tower, 0x04), // ItemId_TearLight
BMG_ID(BMGGroup_tower, 0x05), // ItemId_LightCompass
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemScrollSpinAttack), // ItemId_ScrollSpinAttack
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemScrollBeam), // ItemId_ScrollBeam
BMG_ID(BMGGroup_village, 0xF9), // ItemId_LinebeckLetter
BMG_ID(BMGGroup_forest, 0xEC), // ItemId_PanFluteSong_101
BMG_ID(BMGGroup_dungeon, 0x80), // ItemId_PanFluteSong_102
BMG_ID(BMGGroup_water, 0x01), // ItemId_PanFluteSong_103
BMG_ID(BMGGroup_village, 0xFA), // ItemId_PanFluteSong_104
BMG_ID(BMGGroup_snow, 0x01), // ItemId_PanFluteSong_105
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemRabbitNet), // ItemId_RabbitNet
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemBeedleCard), // ItemId_BeedleCard
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemSilverCard), // ItemId_SilverCard
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemGoldCard), // ItemId_GoldCard
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemPlatinumCard), // ItemId_PlatinumCard
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemDiamondCard), // ItemId_DiamondCard
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemFreebieCard), // ItemId_FreebieCard
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemQuintupleCard), // ItemId_QuintupleCard
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemCarbenLetter), // ItemId_CarbenLetter
#if IS_JP
BMG_ID(BMGGroup_village, 0xFB), // ItemId_RecruitUniform2
BMG_ID(BMGGroup_village, 0xFC), // ItemId_EngineerUniform
#else
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemRecruitUniform2), // ItemId_RecruitUniform2
BMG_ID(BMGGroup_maingame, MsgIndex_GetItemEngineerUniform), // ItemId_EngineerUniform
#endif
};
// Adventure Flags
@@ -534,7 +540,7 @@ ARM void PlayerGet::vfunc_0c(UnkStruct_PlayerGet_vfunc_0c_param1 *param1) {
}
break;
default:
itemId = data_ov000_020b6510->func_ov000_020aa02c(itemId);
itemId = gpTreasureManager->func_ov000_020aa02c(itemId);
break;
}
@@ -882,7 +888,7 @@ ARM void PlayerGet::vfunc_10(unk32 param1, unk32 param2) {
break;
case ItemId_RecruitUniform2:
case ItemId_EngineerUniform:
if (data_027e09a4->mSceneIndex == SceneIndex_f_first) {
if (data_027e09a4->mUnk_00.mSceneIndex == SceneIndex_f_first) {
this->mUnk_28->func_ov058_02152a24();
}
break;
@@ -302,7 +302,7 @@ ARM void PlayerSceneChange::vfunc_0c(UnkStruct_PlayerGet_vfunc_0c_param1 *param1
this->mUnk_68 = data_027e09a4->func_ov000_02070554();
}
SceneIndex eScene = data_027e09a4->mSceneIndex;
SceneIndex eScene = data_027e09a4->mUnk_00.mSceneIndex;
if (eScene == SceneIndex_tekiya07) {
this->mUnk_68 = 0x18;
} else {
+11 -11
View File
@@ -44,8 +44,8 @@ ARM void GameModeManagerBase::vfunc_00() {
}
}
ARM void GameModeManagerBase::vfunc_04() {
data_ov000_020b50c0.func_ov000_02069d7c();
ARM void GameModeManagerBase::vfunc_04(unk32 param1) {
data_ov000_020b50c0.func_ov000_02069d7c(param1);
if (this->mUnk_150) {
this->mUnk_150 = false;
@@ -71,7 +71,7 @@ ARM void GameModeManagerBase::vfunc_2C(unk8 *param1) {}
ARM void GameModeManagerBase::vfunc_30(unk32 param1) {
GameModeLinkList<GameModeManagerBase_104> *pNode;
for (pNode = this->mUnk_104.mList.GetNext(); pNode != this->mUnk_104.GetOrigin(); pNode = pNode->GetPrev()) {
for (pNode = this->mUnk_104.mList.GetNextList(); pNode != this->mUnk_104.GetOrigin(); pNode = pNode->GetPrevList()) {
pNode->GetTarget()->vfunc_0C(param1);
}
}
@@ -122,10 +122,10 @@ ARM void GameModeManagerBase::func_0201875c(void) {
local_30.c = &this->mButtons;
local_30.d = &this->mTouchControl;
for (pNode = this->mUnk_104.mList.GetNext(); pNode != this->mUnk_104.GetOrigin(); pNode = pNode->GetPrev()) {
for (pNode = this->mUnk_104.mList.GetNextList(); pNode != this->mUnk_104.GetOrigin(); pNode = pNode->GetPrevList()) {
if (this->func_02018af0(pNode) && this->func_02018b54(pNode)) {
for (pNode2 = pNode->GetTarget()->mUnk_0C.mList.GetNext(); pNode2 != pNode->GetTarget()->mUnk_0C.GetOrigin();
pNode2 = pNode2->GetPrev()) {
for (pNode2 = pNode->GetTarget()->mUnk_0C.mList.GetNextList(); pNode2 != pNode->GetTarget()->mUnk_0C.GetOrigin();
pNode2 = pNode2->GetPrevList()) {
pNode2->GetTarget()->vfunc_08(&local_30);
}
}
@@ -146,9 +146,9 @@ ARM void GameModeManagerBase::func_02018830(unk8 *param1) {
local_28.a = this->mNextButtonID;
local_28.b = param1;
for (pNode = this->mUnk_104.mList.GetPrev(); pNode != this->mUnk_104.GetOrigin(); pNode = pNode->GetNext2()) {
for (pNode = this->mUnk_104.mList.GetPrevList(); pNode != this->mUnk_104.GetOrigin(); pNode = pNode->GetNext2()) {
if (this->func_02018af0(pNode) && this->func_02018b54(pNode) && this->func_02018b90(pNode, (unk8 *) param1)) {
for (pNode2 = pNode->GetTarget()->mUnk_0C.mList.GetPrev(); pNode2 != pNode->GetTarget()->mUnk_0C.GetOrigin();
for (pNode2 = pNode->GetTarget()->mUnk_0C.mList.GetPrevList(); pNode2 != pNode->GetTarget()->mUnk_0C.GetOrigin();
pNode2 = pNode2->GetNext2()) {
pNode2->GetTarget()->vfunc_0C(&local_28);
}
@@ -159,7 +159,7 @@ ARM void GameModeManagerBase::func_02018830(unk8 *param1) {
ARM void GameModeManagerBase::func_02018908() {
GameModeLinkList<GameModeManagerBase_104> *pNode;
for (pNode = this->mUnk_104.mList.GetNext(); pNode != this->mUnk_104.GetOrigin(); pNode = pNode->GetPrev()) {
for (pNode = this->mUnk_104.mList.GetNextList(); pNode != this->mUnk_104.GetOrigin(); pNode = pNode->GetPrevList()) {
if (this->func_02018af0(pNode) && this->func_02018b54(pNode)) {
pNode->GetTarget()->vfunc_08(&this->mButtons, &this->mTouchControl);
}
@@ -169,7 +169,7 @@ ARM void GameModeManagerBase::func_02018908() {
ARM void GameModeManagerBase::func_02018984(unk8 *param1) {
GameModeLinkList<GameModeManagerBase_104> *pNode;
for (pNode = this->mUnk_104.mList.GetPrev(); pNode != this->mUnk_104.GetOrigin(); pNode = pNode->GetNext2()) {
for (pNode = this->mUnk_104.mList.GetPrevList(); pNode != this->mUnk_104.GetOrigin(); pNode = pNode->GetNext2()) {
if (this->func_02018af0(pNode) && this->func_02018b54(pNode) && this->func_02018b90(pNode, param1)) {
pNode->GetTarget()->vfunc_10(param1);
}
@@ -179,7 +179,7 @@ ARM void GameModeManagerBase::func_02018984(unk8 *param1) {
ARM void GameModeManagerBase::func_02018a14(unk8 *param1) {
GameModeLinkList<GameModeManagerBase_104> *pNode;
for (pNode = this->mUnk_104.mList.GetNext(); pNode != this->mUnk_104.GetOrigin(); pNode = pNode->GetPrev()) {
for (pNode = this->mUnk_104.mList.GetNextList(); pNode != this->mUnk_104.GetOrigin(); pNode = pNode->GetPrevList()) {
if (this->func_02018af0(pNode) && this->func_02018b54(pNode)) {
pNode->GetTarget()->vfunc_14(param1);
}