mirror of
https://github.com/zeldaret/st
synced 2026-08-24 23:36:03 -04:00
Decompile overlay 1 (Part 3) (#95)
* ZeldaArrangeBinary OK * ZeldaMapBinary 26% * UnkStruct_SceneChange1 -> EntranceInfo * cleanup EntranceInfo ctors * fix regressions * ZeldaMapBinary 47% * fix regressions * ZeldaMapBinary 73% * ZeldaMapBinary 89% * ZeldaMapBinary 99%
This commit is contained in:
@@ -73,10 +73,10 @@ bool MapObjectChestBase::vfunc_00() {
|
||||
|
||||
UnkStruct_027e0cd8_0C_Base *pUVar2 = data_027e0cd8->mUnk_0C;
|
||||
|
||||
if (this->mUnk_20.mUnk_00[3] == 1) {
|
||||
if (this->mUnk_20.mParams[3] == 1) {
|
||||
this->mPos.x += 0x7FC;
|
||||
|
||||
Vec2b sp48(this->mUnk_3A.x, this->mUnk_3A.y);
|
||||
Vec2bCpp sp48(this->mUnk_3A.x, this->mUnk_3A.y);
|
||||
pUVar2->func_ov000_020801b0(&sp48, 7, 1);
|
||||
|
||||
sp48.x++;
|
||||
@@ -84,7 +84,7 @@ bool MapObjectChestBase::vfunc_00() {
|
||||
}
|
||||
|
||||
this->vfunc_38(this->vfunc_3C(), 1);
|
||||
this->mItemId = this->mUnk_20.mUnk_00[0];
|
||||
this->mItemId = this->mUnk_20.mParams[0];
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -98,11 +98,11 @@ void MapObjectChestBase::vfunc_04() {
|
||||
VecFx32 local_44;
|
||||
VecFx32 sp18;
|
||||
VecFx32 spC;
|
||||
Vec2b local_5e;
|
||||
Vec2b local_62;
|
||||
Vec2b local_64;
|
||||
Vec2b local_66;
|
||||
Vec2b local_68;
|
||||
Vec2bCpp local_5e;
|
||||
Vec2bCpp local_62;
|
||||
Vec2bCpp local_64;
|
||||
Vec2bCpp local_66;
|
||||
Vec2bCpp local_68;
|
||||
Vec2us local_6c;
|
||||
|
||||
pUVar5 = data_027e0cd8->mUnk_0C;
|
||||
@@ -129,22 +129,22 @@ void MapObjectChestBase::vfunc_04() {
|
||||
|
||||
local_68.x = this->mUnk_3A.x;
|
||||
local_68.y = this->mUnk_3A.y;
|
||||
iVar2 = pUVar5->func_01ffedf4((Vec2b *) &local_68);
|
||||
iVar2 = pUVar5->func_01ffedf4((Vec2bCpp *) &local_68);
|
||||
|
||||
if (this->mUnk_20.mUnk_00[3] == 1) {
|
||||
Vec2b temp_r0(this->mUnk_3A.x, this->mUnk_3A.y);
|
||||
if (this->mUnk_20.mParams[3] == 1) {
|
||||
Vec2bCpp temp_r0(this->mUnk_3A.x, this->mUnk_3A.y);
|
||||
temp_r0.x--;
|
||||
|
||||
if (pUVar5->func_01ffedf4((Vec2b *) &temp_r0) > iVar2 || gpMapObjManager->func_01fff498(local_5e) != NULL) {
|
||||
if (pUVar5->func_01ffedf4((Vec2bCpp *) &temp_r0) > iVar2 || gpMapObjManager->func_01fff498(local_5e) != NULL) {
|
||||
sp48.x -= FLOAT_TO_FX32(0.5f);
|
||||
}
|
||||
|
||||
temp_r0.x += 3;
|
||||
if (pUVar5->func_01ffedf4((Vec2b *) &temp_r0) > iVar2 || gpMapObjManager->func_01fff498(local_5e) != NULL) {
|
||||
if (pUVar5->func_01ffedf4((Vec2bCpp *) &temp_r0) > iVar2 || gpMapObjManager->func_01fff498(local_5e) != NULL) {
|
||||
sp3C.x += FLOAT_TO_FX32(0.5f);
|
||||
}
|
||||
} else {
|
||||
Vec2b temp_r0(this->mUnk_3A.x, this->mUnk_3A.y);
|
||||
Vec2bCpp temp_r0(this->mUnk_3A.x, this->mUnk_3A.y);
|
||||
temp_r0.x--;
|
||||
temp_r0.y += 2;
|
||||
// local_5e.y = this->mUnk_3A.y + (this->mUnk_3A.x - 1);
|
||||
@@ -168,7 +168,7 @@ void MapObjectChestBase::vfunc_04() {
|
||||
sp48.z -= FLOAT_TO_FX32(0.5f);
|
||||
}
|
||||
|
||||
if (data_027e09a4->mUnk_00.mSceneIndex == SceneIndex_d_flame) {
|
||||
if (data_027e09a4->CurrentSceneIndex() == SceneIndex_d_flame) {
|
||||
local_64.x = this->mUnk_3A.x;
|
||||
local_66.y = this->mUnk_3A.y;
|
||||
|
||||
|
||||
@@ -82,12 +82,12 @@ MapObjectDoorBase::MapObjectDoorBase() :
|
||||
void MapObjectDoorBase::func_ov031_020fbf10(bool param1, bool param2) {
|
||||
if (this->IsOrientedVertically()) {
|
||||
this->mPos.z += FLOAT_TO_FX32(0.5f);
|
||||
Vec2b local_16(1, 2);
|
||||
Vec2bCpp local_16(1, 2);
|
||||
this->func_ov000_0209d2f0(5, 1, &local_16);
|
||||
|
||||
} else {
|
||||
this->mPos.x += FLOAT_TO_FX32(0.5f);
|
||||
Vec2b local_18(2, 1);
|
||||
Vec2bCpp local_18(2, 1);
|
||||
this->func_ov000_0209d2f0(5, 1, &local_18);
|
||||
}
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ bool MapObjectDoorClick::vfunc_00(void) {
|
||||
this->mUnk_8D = false;
|
||||
this->mUnk_88 = false;
|
||||
this->mUnk_78 = 10;
|
||||
this->mUnk_A4 = this->mUnk_20.mUnk_00[1];
|
||||
this->mUnk_A4 = this->mUnk_20.mParams[1];
|
||||
this->vfunc2_10();
|
||||
|
||||
local_1c.x = -0x1000;
|
||||
@@ -70,9 +70,9 @@ bool MapObjectDoorClick::vfunc_00(void) {
|
||||
local_28.x = 0x1000;
|
||||
local_28.z = 0x266;
|
||||
|
||||
unk32 value = ((this->mUnk_20.mUnk_00[2] & 0xFF) << 8) | 0x21C07006;
|
||||
unk32 value = ((this->mUnk_20.mParams[2] & 0xFF) << 8) | 0x21C07006;
|
||||
unk32 uVar2;
|
||||
if (this->mUnk_20.mUnk_00[3] == 0) {
|
||||
if (this->mUnk_20.mParams[3] == 0) {
|
||||
uVar2 = 0x1B;
|
||||
} else {
|
||||
uVar2 = 0x1C;
|
||||
@@ -273,7 +273,7 @@ void MapObjectDoorClick::vfunc_5C(unk32 param1, unk32 param2) {
|
||||
|
||||
break;
|
||||
case 8:
|
||||
if (this->mUnk_20.mUnk_00[2] & 0xFF) {
|
||||
if (this->mUnk_20.mParams[2] & 0xFF) {
|
||||
this->MapObjectDoorBase::vfunc_5C(param1, param2);
|
||||
this->func_ov031_020fcf0c(1);
|
||||
this->mUnk_10 = this->vfunc2_14();
|
||||
@@ -405,7 +405,7 @@ void MapObjectDoorClick::vfunc_78(void) {
|
||||
}
|
||||
|
||||
void MapObjectDoorClick::vfunc2_10(void) {
|
||||
unk32 index = this->mUnk_20.mUnk_00[0];
|
||||
unk32 index = this->mUnk_20.mParams[0];
|
||||
this->mUnk_94.vfunc_08(GetModelFromProfile2<MapObjectProfileDoorClick>(index, data_ov031_02110c1c[index]));
|
||||
}
|
||||
|
||||
|
||||
@@ -64,21 +64,21 @@ void MapObjectDoorDangerSpawn::vfunc_04(void) {
|
||||
UnkStruct_027e0cd8_0C_Base *ptr;
|
||||
VecFx32 auStack_20;
|
||||
|
||||
if (this->mUnk_20.mUnk_00[1] == 2) {
|
||||
if (this->mUnk_20.mParams[1] == 2) {
|
||||
this->mUnk_6C = 0;
|
||||
|
||||
ptr = data_027e0cd8->mUnk_0C;
|
||||
ptr->func_ov000_0208053c(this->mUnk_20.mUnk_00[0]);
|
||||
ptr->func_ov000_020803ec(this->mUnk_20.mUnk_00[0]);
|
||||
ptr->func_ov000_0208053c(this->mUnk_20.mParams[0]);
|
||||
ptr->func_ov000_020803ec(this->mUnk_20.mParams[0]);
|
||||
this->vfunc_5C(2, 1);
|
||||
return;
|
||||
}
|
||||
|
||||
if (this->mUnk_20.mUnk_00[1] == 3) {
|
||||
if (this->mUnk_20.mParams[1] == 3) {
|
||||
this->mUnk_8C = 0;
|
||||
}
|
||||
|
||||
if (this->mUnk_20.mUnk_00[1] == 4) {
|
||||
if (this->mUnk_20.mParams[1] == 4) {
|
||||
if (this->func_ov000_0209d29c(0) != 0) {
|
||||
this->mUnk_6C = 0;
|
||||
this->MapObjectDoorBase::vfunc_5C(2, 1);
|
||||
@@ -114,10 +114,10 @@ void MapObjectDoorDangerSpawn::vfunc_04(void) {
|
||||
}
|
||||
|
||||
if (run) {
|
||||
data_027e0cd8->mUnk_0C->func_ov000_0208053c(this->mUnk_20.mUnk_00[0]);
|
||||
data_027e0cd8->mUnk_0C->func_ov000_0208053c(this->mUnk_20.mParams[0]);
|
||||
}
|
||||
#else
|
||||
data_027e0cd8->mUnk_0C->func_ov000_0208053c(this->mUnk_20.mUnk_00[0]);
|
||||
data_027e0cd8->mUnk_0C->func_ov000_0208053c(this->mUnk_20.mParams[0]);
|
||||
#endif
|
||||
|
||||
ptr = data_027e0cd8->mUnk_0C;
|
||||
@@ -125,7 +125,7 @@ void MapObjectDoorDangerSpawn::vfunc_04(void) {
|
||||
if (this->func_ov031_020fdec8()) {
|
||||
this->mUnk_A2 = true;
|
||||
this->mUnk_8C = 0;
|
||||
ptr->func_ov000_020803ec(this->mUnk_20.mUnk_00[0]);
|
||||
ptr->func_ov000_020803ec(this->mUnk_20.mParams[0]);
|
||||
this->vfunc_5C(0, 0);
|
||||
|
||||
UnkStruct_027e09bc_0C *uVar5 = data_027e09bc->mUnk_0C;
|
||||
@@ -148,7 +148,7 @@ void MapObjectDoorDangerSpawn::vfunc2_08(void) {
|
||||
data_027e09bc->mUnk_0C->func_ov000_02078230(0);
|
||||
}
|
||||
|
||||
data_ov000_020b51b8.func_ov000_0206c96c(data_ov031_02110c00[this->mUnk_20.mUnk_00[3]]);
|
||||
data_ov000_020b51b8.func_ov000_0206c96c(data_ov031_02110c00[this->mUnk_20.mParams[3]]);
|
||||
}
|
||||
|
||||
struct UnkStruct_Copy {
|
||||
@@ -229,7 +229,7 @@ void MapObjectDoorDangerSpawn::vfunc_08(void) {
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (this->mUnk_20.mUnk_00[1] == 4 && this->func_ov000_0209d29c(0) != 0) {
|
||||
if (this->mUnk_20.mParams[1] == 4 && this->func_ov000_0209d29c(0) != 0) {
|
||||
if (this->func_ov000_0209d29c(1) != 0) {
|
||||
return;
|
||||
}
|
||||
@@ -364,7 +364,7 @@ void MapObjectDoorDangerSpawn::vfunc_5C(unk32 param1, unk32 param2) {
|
||||
this->MapObjectDoorBase::vfunc_5C(param1, param2);
|
||||
|
||||
var_r6 = 1;
|
||||
temp_r8 = data_027e09a4->mUnk_00.mSceneIndex;
|
||||
temp_r8 = data_027e09a4->CurrentSceneIndex();
|
||||
|
||||
if (param2 != 0 && (temp_r8 - SceneIndex_tekiya00) > 4) {
|
||||
var_r6 = 0;
|
||||
@@ -378,7 +378,7 @@ void MapObjectDoorDangerSpawn::vfunc_5C(unk32 param1, unk32 param2) {
|
||||
}
|
||||
|
||||
if (var_r6 != 0) {
|
||||
data_ov000_020b51b8.func_ov000_0206c9a8(data_ov031_02110c00[this->mUnk_20.mUnk_00[3]], 0, 0x7F, 0);
|
||||
data_ov000_020b51b8.func_ov000_0206c9a8(data_ov031_02110c00[this->mUnk_20.mParams[3]], 0, 0x7F, 0);
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -388,7 +388,7 @@ void MapObjectDoorDangerSpawn::vfunc_5C(unk32 param1, unk32 param2) {
|
||||
this->func_ov000_0209d2c4(0, false);
|
||||
|
||||
if (param2 == 0) {
|
||||
(*ptr)->mUnk_0C->func_ov000_0208053c(this->mUnk_20.mUnk_00[0]);
|
||||
(*ptr)->mUnk_0C->func_ov000_0208053c(this->mUnk_20.mParams[0]);
|
||||
}
|
||||
|
||||
if (param2 == 0) {
|
||||
@@ -407,7 +407,7 @@ bool MapObjectDoorDangerSpawn::vfunc_64(void) {
|
||||
unk32 var_r0;
|
||||
bool var_r5;
|
||||
|
||||
switch (this->mUnk_20.mUnk_00[1]) {
|
||||
switch (this->mUnk_20.mParams[1]) {
|
||||
case 1:
|
||||
case 4:
|
||||
if (MapObjectDoorBase::vfunc_64()) {
|
||||
@@ -415,15 +415,15 @@ bool MapObjectDoorDangerSpawn::vfunc_64(void) {
|
||||
}
|
||||
|
||||
pUVar4 = data_027e0cd8->mUnk_0C;
|
||||
if (!pUVar4->func_ov000_020802ec(this->mUnk_20.mUnk_00[0], data_027e0ce0->func_01fff148(0))) {
|
||||
if (!pUVar4->func_ov000_020802ec(this->mUnk_20.mParams[0], data_027e0ce0->func_01fff148(0))) {
|
||||
return true;
|
||||
}
|
||||
|
||||
var_r0 = 0;
|
||||
var_r5 = false;
|
||||
|
||||
if (this->mUnk_20.mUnk_00[0] != 0) {
|
||||
var_r0 = gpActorManager->func_ov000_020970c8(this->mUnk_20.mUnk_00[0], NULL);
|
||||
if (this->mUnk_20.mParams[0] != 0) {
|
||||
var_r0 = gpActorManager->func_ov000_020970c8(this->mUnk_20.mParams[0], NULL);
|
||||
} else {
|
||||
var_r0 = gpActorManager->func_ov000_0209704c();
|
||||
}
|
||||
@@ -443,7 +443,7 @@ bool MapObjectDoorDangerSpawn::vfunc_64(void) {
|
||||
bool MapObjectDoorDangerSpawn::vfunc_68(void) {
|
||||
UnkStruct_027e0cd8_0C_Base *pUVar2 = data_027e0cd8->mUnk_0C;
|
||||
|
||||
if (this->mUnk_20.mUnk_00[2] == 1) {
|
||||
if (this->mUnk_20.mParams[2] == 1) {
|
||||
if (func_ov000_0209d29c(1)) {
|
||||
return true;
|
||||
}
|
||||
@@ -453,9 +453,9 @@ bool MapObjectDoorDangerSpawn::vfunc_68(void) {
|
||||
}
|
||||
}
|
||||
|
||||
if (this->mUnk_20.mUnk_00[0] != 0) {
|
||||
if (gpActorManager->func_ov000_020970c8(this->mUnk_20.mUnk_00[0], &this->mUnk_A4) == 0) {
|
||||
pUVar2->func_ov000_0208053c(this->mUnk_20.mUnk_00[0]);
|
||||
if (this->mUnk_20.mParams[0] != 0) {
|
||||
if (gpActorManager->func_ov000_020970c8(this->mUnk_20.mParams[0], &this->mUnk_A4) == 0) {
|
||||
pUVar2->func_ov000_0208053c(this->mUnk_20.mParams[0]);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -468,12 +468,12 @@ bool MapObjectDoorDangerSpawn::vfunc_68(void) {
|
||||
bool MapObjectDoorDangerSpawn::vfunc_6C(void) {
|
||||
UnkStruct_027e0cd8_0C_Base *pUVar5;
|
||||
|
||||
switch (this->mUnk_20.mUnk_00[1]) {
|
||||
switch (this->mUnk_20.mParams[1]) {
|
||||
case 1:
|
||||
case 4:
|
||||
pUVar5 = data_027e0cd8->mUnk_0C;
|
||||
|
||||
if (this->mUnk_20.mUnk_00[2] == 1) {
|
||||
if (this->mUnk_20.mParams[2] == 1) {
|
||||
if (this->func_ov000_0209d29c(1) != 0) {
|
||||
return false;
|
||||
}
|
||||
@@ -483,8 +483,8 @@ bool MapObjectDoorDangerSpawn::vfunc_6C(void) {
|
||||
}
|
||||
}
|
||||
|
||||
if (this->mUnk_20.mUnk_00[0] != 0) {
|
||||
if (gpActorManager->func_ov000_020970c8(this->mUnk_20.mUnk_00[0], NULL) == 0) {
|
||||
if (this->mUnk_20.mParams[0] != 0) {
|
||||
if (gpActorManager->func_ov000_020970c8(this->mUnk_20.mParams[0], NULL) == 0) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
@@ -493,8 +493,8 @@ bool MapObjectDoorDangerSpawn::vfunc_6C(void) {
|
||||
}
|
||||
}
|
||||
|
||||
if (pUVar5->func_ov000_020802ec(this->mUnk_20.mUnk_00[0], data_027e0ce0->func_01fff148(0))) {
|
||||
pUVar5->func_ov000_020803ec(this->mUnk_20.mUnk_00[0]);
|
||||
if (pUVar5->func_ov000_020802ec(this->mUnk_20.mParams[0], data_027e0ce0->func_01fff148(0))) {
|
||||
pUVar5->func_ov000_020803ec(this->mUnk_20.mParams[0]);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -503,12 +503,12 @@ bool MapObjectDoorDangerSpawn::vfunc_6C(void) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (this->mUnk_20.mUnk_00[1] == 3) {
|
||||
if (this->mUnk_20.mParams[1] == 3) {
|
||||
if (this->func_ov000_0209d29c(0) != 0) {
|
||||
u16 uVar4 = this->mUnk_20.mUnk_00[0];
|
||||
u16 uVar4 = this->mUnk_20.mParams[0];
|
||||
|
||||
if (uVar4 != 0 && gpActorManager->func_ov000_020970c8(uVar4, 0) != 0) {
|
||||
data_027e0cd8->mUnk_0C->func_ov000_020803ec(this->mUnk_20.mUnk_00[0]);
|
||||
data_027e0cd8->mUnk_0C->func_ov000_020803ec(this->mUnk_20.mParams[0]);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -524,10 +524,10 @@ bool MapObjectDoorDangerSpawn::func_ov031_020fdec8(void) {
|
||||
VecFx32 *uVar3;
|
||||
int iVar1;
|
||||
|
||||
switch (this->mUnk_20.mUnk_00[1]) {
|
||||
switch (this->mUnk_20.mParams[1]) {
|
||||
case 1:
|
||||
case 4:
|
||||
if (this->mUnk_20.mUnk_00[2] == 1) {
|
||||
if (this->mUnk_20.mParams[2] == 1) {
|
||||
if (this->func_ov000_0209d29c(1) != 0) {
|
||||
return false;
|
||||
}
|
||||
@@ -537,8 +537,8 @@ bool MapObjectDoorDangerSpawn::func_ov031_020fdec8(void) {
|
||||
}
|
||||
}
|
||||
|
||||
if (this->mUnk_20.mUnk_00[0] != 0) {
|
||||
if (gpActorManager->func_ov000_020970c8(this->mUnk_20.mUnk_00[0], 0) == 0) {
|
||||
if (this->mUnk_20.mParams[0] != 0) {
|
||||
if (gpActorManager->func_ov000_020970c8(this->mUnk_20.mParams[0], 0) == 0) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
@@ -548,9 +548,9 @@ bool MapObjectDoorDangerSpawn::func_ov031_020fdec8(void) {
|
||||
}
|
||||
|
||||
pUVar4 = data_027e0cd8->mUnk_0C;
|
||||
uVar3 = (VecFx32 *) &pUVar4->func_ov001_020b8a5c(data_027e09a4->func_ov000_02070560()->mSpawnIndex, 0)->mUnk_00;
|
||||
uVar3 = (VecFx32 *) &pUVar4->func_ov001_020b8a5c(data_027e09a4->func_ov000_02070560()->spawnIndex, 0)->mUnk_00;
|
||||
|
||||
if (pUVar4->func_ov000_020802ec(this->mUnk_20.mUnk_00[0], uVar3)) {
|
||||
if (pUVar4->func_ov000_020802ec(this->mUnk_20.mParams[0], uVar3)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -41,12 +41,12 @@ bool MapObjectDoorSwitch::vfunc_00(void) {
|
||||
this->mUnk_094.vfunc_08(this->GetModel());
|
||||
this->func_ov031_020fbf10(true, true);
|
||||
|
||||
if (this->mUnk_20.mUnk_00[3] == 1) {
|
||||
if (this->mUnk_20.mParams[3] == 1) {
|
||||
this->mUnk_8F = false;
|
||||
}
|
||||
|
||||
#if IS_JP
|
||||
if (this->mUnk_20.mUnk_00[2] == 1) {
|
||||
if (this->mUnk_20.mParams[2] == 1) {
|
||||
this->mUnk_141 = true;
|
||||
}
|
||||
#endif
|
||||
@@ -91,7 +91,7 @@ bool MapObjectDoorSwitch::vfunc_00(void) {
|
||||
}
|
||||
|
||||
void MapObjectDoorSwitch::vfunc_08(void) {
|
||||
if (this->mUnk_20.mUnk_00[3] == 2 && data_027e09b8->func_01ffd420()) {
|
||||
if (this->mUnk_20.mParams[3] == 2 && data_027e09b8->func_01ffd420()) {
|
||||
this->MapObjectDoorBase::vfunc_08();
|
||||
} else if (this->mUnk_16 == 5 && this->vfunc_6C()) {
|
||||
this->vfunc_5C(0, 0);
|
||||
|
||||
@@ -29,7 +29,7 @@ bool MapObjectDoorTouch::vfunc_00(void) {
|
||||
|
||||
void MapObjectDoorTouch::vfunc2_10(void) {
|
||||
MapObjectProfileDoorTouch *p = GET_PROFILE(MapObjectProfileDoorTouch);
|
||||
unk32 index = this->mUnk_20.mUnk_00[0];
|
||||
unk32 index = this->mUnk_20.mParams[0];
|
||||
this->mUnk_94.vfunc_08(GetModelFromProfile2<MapObjectProfileDoorTouch>(index, data_ov031_02110c3c[index]));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user