more progress

This commit is contained in:
Yanis002
2025-02-06 22:45:45 +01:00
parent 308b9c2340
commit e109eeadba
10 changed files with 62 additions and 90 deletions
+28 -30
View File
@@ -5,27 +5,30 @@
extern ARM unk32 func_ov000_020d7f18(u32*, unk32);
extern ARM unk32 func_02037628(u8*);
extern ARM void func_0203dc74(UnkStruct_02038aa0*, unk32, unk32);
extern u32** data_027e0ce0[];
extern u32* data_027e0ce0[];
extern u32 data_02056924[];
extern UnkStruct_MsgProc_Base_unk_2C* data_02068e6c;
extern UnkStruct_MsgProc_Base_unk_2C* data_02068e8c;
extern u16 data_02056918[];
extern ActorTypeId data_0205691c[];
// this should be `data_027e0ffc->func_ov000_020cec60(u16, Vec3p*, s32);`
extern u32* data_027e0ffc;
extern void func_ov000_020cec60(u32*, u16, Vec3p*, Actor*, unk32);
struct UnkStruct_027e0ffc {
void func_ov000_020cec60(u16, Vec3p*, Actor*, unk32);
};
extern UnkStruct_027e0ffc* data_027e0ffc;
ARM void UnkStruct_027E0C68::func_0203643c(int *param_1, UnkStruct_027E0C68* param_2, u32 param_3) {
extern u32 data_027e0618[];
// non-matching
ARM void UnkStruct_027E0C68::func_0203643c(u32 *param_1, UnkStruct_027E0C68* param_2, u32 param_3) {
BMGGroups *pBVar2 = param_2->pGroups;
*param_1 = BMG_GET_MSG_ADDR(pBVar2, param_3);
*param_1 = ((u32)pBVar2->entries[param_3 >> 0x10].pDAT1 + (pBVar2->entries[param_3 >> 0x10].func_02037258(param_3 & 0xFFFF)->offset & ~1));
}
// non-matching
THUMB void UnkStruct_027E0C68::func_02036490(unk32 param_2, unk32 param_3, unk32 param_4) {
s32 i;
this->mUnk_03 = 0;
this->mUnk_0c = 0;
@@ -51,40 +54,35 @@ THUMB void UnkStruct_027E0C68::func_02036490(unk32 param_2, unk32 param_3, unk32
break;
}
for (i = 0; i < ARRAY_LEN(this->mUnk_18); i++) {
if (this->mUnk_18[i] != NULL) {
this->mUnk_18[i] = NULL;
}
for (s32 i = 0; i < ARRAY_LEN(this->mUnk_18); i++) {
this->mUnk_18[i] = NULL;
}
for (i = 0; i < ARRAY_LEN(this->mUnk_28); i++) {
if (this->mUnk_28[i] != NULL) {
this->mUnk_28[i] = NULL;
}
for (s32 i = 0; i < ARRAY_LEN(this->mUnk_28); i++) {
this->mUnk_28[i] = NULL;
}
for (i = 0; i < ARRAY_LEN(this->mUnk_18); i++) {
this->mUnk_18[i] = new(*data_027e0ce0[0], 4) UnkStruct_020386d8();
for (s32 i = 0; i < ARRAY_LEN(this->mUnk_18); i++) {
this->mUnk_18[i] = new(data_027e0ce0[1], 4) UnkStruct_020386d8();
}
this->mUnk_18[0]->mUnk_39 = 0;
this->mUnk_18[1]->mUnk_39 = 1;
// switch?
if (*data_027e0618 == 2 || *data_027e0618 == 3 || *data_027e0618 == 6) {
for (i = 0; i < ARRAY_LEN(this->mUnk_28); i++) {
for (s32 i = 0; i < ARRAY_LEN(this->mUnk_28); i++) {
switch (data_02056924[i + 1]) {
case 0:
if (*data_027e0618 != 2) {
this->mUnk_28[i] = new(*data_027e0ce0[0], 4) UnkStruct_020397f8();
func_0203dc74(this->mUnk_28[i], 0xE0, 0x40);
this->mUnk_28[i] = new(data_027e0ce0[1], 4) UnkStruct_020397f8();
this->mUnk_28[i]->func_0203dc74(0xE0, 0x40);
this->mUnk_28[i]->mUnk_2c = &data_02068e6c;
this->mUnk_28[i]->mUnk_50 = i != 0;
}
break;
case 1:
this->mUnk_28[i] = new(*data_027e0ce0[0], 4) MsgProc_Type3();
func_0203dc74(this->mUnk_28[i], 0x50, 0x60);
this->mUnk_28[i] = new(data_027e0ce0[1], 4) MsgProc_Type3();
this->mUnk_28[i]->func_0203dc74(0x50, 0x60);
this->mUnk_28[i]->mUnk_2c = &data_02068e6c;
break;
case 2:
@@ -92,8 +90,8 @@ THUMB void UnkStruct_027E0C68::func_02036490(unk32 param_2, unk32 param_3, unk32
break;
case 3:
if (func_0202ab48() == 0) {
this->mUnk_28[i] = new(*data_027e0ce0[0], 4) MsgProc_Type2();
func_0203dc74(this->mUnk_28[i], 0xC0, 0x20);
this->mUnk_28[i] = new(data_027e0ce0[1], 4) MsgProc_Type2();
this->mUnk_28[i]->func_0203dc74(0xC0, 0x20);
this->mUnk_28[i]->mUnk_2c = &data_02068e8c;
} else {
this->mUnk_28[i] = NULL;
@@ -327,7 +325,7 @@ ARM void UnkStruct_027E0C68::func_0203690c(unk32 param_2, unk32 param_3, unk32 p
pActor = gActorManager->GetActor(&actorRef);
if (pActor != NULL) {
func_ov000_020cec60(data_027e0ffc, data_02056918[this->mUnk_10], &pActor->mPos, pActor, 0);
data_027e0ffc->func_ov000_020cec60(data_02056918[this->mUnk_10], &pActor->mPos, pActor, 0);
}
}
}
@@ -349,7 +347,7 @@ ARM void UnkStruct_027E0C68::func_02036bbc(void) {
pSVar3 = this->mUnk_28[i];
if (pSVar3 != NULL && ((bVar2 && pSVar3->mUnk_50 == 0) || (bVar4 && pSVar3->mUnk_50 != 0))) {
pSVar3->vfunc_44(data_027e0d78.mTouchLastX, data_027e0d78.mTouchLastY);
pSVar3->vfunc_44(gTouchControl.mTouchLastX, gTouchControl.mTouchLastY);
}
}
}
@@ -416,7 +414,7 @@ ARM void UnkStruct_027E0C68::func_02036d6c(void) {
for (i = 0; i < ARRAY_LEN(this->mUnk_28); i++) {
if (func_0202ab48() == 0 || i != 5) {
this->mUnk_28[i]->func_02038b40();
this->mUnk_28[i]->UnkStruct_02038aa0::vfunc_10();
}
}
}
+2 -5
View File
@@ -67,14 +67,11 @@ ARM void MsgProc_Type2::vfunc_40(unk32 param_2, unk32 param_3) {
param_3 += this->mUnk_168;
this->func_0203c4ac(param_2 + this->mUnk_16a, param_3 + this->mUnk_16c);
this->func_02038ef4(param_2, param_3);
this->UnkStruct_02038aa0::vfunc_30(param_2, param_3);
}
//! TODO: solve vfunc oddities
extern "C" bool func_0203dcb4(unk32);
// non-matching
ARM bool MsgProc_Type2::vfunc_14(unk32 param_2, unk32 param_3) {
return func_0203dcb4(param_2 + this->mUnk_162);
return this->UnkStruct_0203dae0::vfunc_14(param_2 + this->mUnk_162, param_3);
}
ARM MsgProc_Type2::~MsgProc_Type2() {
+4 -2
View File
@@ -2,6 +2,8 @@
#include "DTCM/UnkStruct_027e103c.hpp"
#include "Message/MessageManager.hpp"
extern u32 data_027e0618[];
ARM UnkStruct_0203881c::UnkStruct_0203881c() {
this->mUnk_14 = 0x1000;
this->mUnk_18 = 0;
@@ -39,7 +41,7 @@ ARM void UnkStruct_02038aa0::vfunc_4c(u32 param1, unk32 param2) {
this->UnkStruct_0203dae0::vfunc_10(param1, param2);
}
ARM void UnkStruct_02038aa0::vfunc_10(unk32 param1) {}
ARM void UnkStruct_02038aa0::vfunc_10() {}
ARM void UnkStruct_02038aa0::func_02038b40() {
this->mUnk_15c = -1;
@@ -115,7 +117,7 @@ ARM s32 UnkStruct_02038aa0::func_02038d10() {
ARM void UnkStruct_02038aa0::vfunc_2c() {}
ARM void UnkStruct_02038aa0::vfunc_30() {
ARM void UnkStruct_02038aa0::vfunc_30(unk32 param_2, unk32 param_3) {
if (this->mUnk_15c > 0) {
this->func_0203e090();
} else {
+7 -5
View File
@@ -8,9 +8,11 @@
extern "C" void func_ov000_020d0460(void*);
extern "C" void func_0203efd8(void*, void*);
extern "C" void func_0203ee48(void*);
extern "C" void func_ov018_02169634(UnkStruct_020397f8*);
extern unk16 data_02056a0e[];
extern u8 data_02056a08[];
extern u32 data_027e0618[];
THUMB UnkStruct_020397f8::UnkStruct_020397f8() :
UnkStruct_02038aa0(0, 0), mUnk_164(NULL) {
@@ -402,7 +404,7 @@ ARM void UnkStruct_020397f8::vfunc_44(s32 touchLastX, s32 touchLastY) {
}
if ((data_02056be4[data_027e077c.mUnk_0] & 2) == 0) {
if ((data_027e0d78.mFlags & 1) != 0) {
if ((gTouchControl.mFlags & 1) != 0) {
if (this->mUnk_50 == 0 && data_027e0d38 != 0) {
if (func_ov000_02079e04() == 0 && data_027e0e28->func_ov000_0207bc48() == 0) {
if (data_027e0618[0x101] == 0 && data_027e103c->mUnk_24 == 0) {
@@ -415,12 +417,12 @@ ARM void UnkStruct_020397f8::vfunc_44(s32 touchLastX, s32 touchLastY) {
this->mUnk_57f = 1;
}
} else {
if (data_027e0d78.mTouch != 0) {
if (gTouchControl.mTouch != 0) {
this->func_0203a6d0(iVar5, iVar2);
return;
}
if (data_027e0d78.mTouch == 0) {
if (gTouchControl.mTouch == 0) {
switch(this->mUnk_150[1]) {
case 3:
case 4:
@@ -440,7 +442,7 @@ ARM void UnkStruct_020397f8::vfunc_44(s32 touchLastX, s32 touchLastY) {
case 2:
//! TODO: fixme
// if (this->mUnk_164->mUnk_168.mUnk_06 <= 0) {
// if ((data_027e0d78.mFlags & 2) != 0) {
// if ((gTouchControl.mFlags & 2) != 0) {
// this->mUnk_128.mUnk_14 = 0;
// if (this->func_0203b0bc() != 0) {
@@ -455,7 +457,7 @@ ARM void UnkStruct_020397f8::vfunc_44(s32 touchLastX, s32 touchLastY) {
case 0:
case 1:
default:
if ((data_027e0d78.mFlags & 2) != 0) {
if ((gTouchControl.mFlags & 2) != 0) {
this->mUnk_128.mUnk_14 = 0;
if (this->func_0203b0bc() != 0) {