mirror of
https://github.com/zeldaret/st
synced 2026-08-25 15:45:52 -04:00
CLLT and progress in TLKT (#132)
* feat: wip soontm * feat: enhance TLTK * feat: complete TLKT * fix: refactor went wild * fix: update MLCK * fix: hmmm * fix: continue reverse wrong refactor * style: remove comment * feat: delink destructors of ActorUnkTLKTnCLLT_Base
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
//! TODO: This file was generated automatically and might contain errors
|
||||
|
||||
#include "Actor/ActorUnkCLLT.hpp"
|
||||
#include "System/SysNew.hpp"
|
||||
|
||||
@@ -12,11 +10,36 @@ Actor *ActorProfileUnkCLLT::Create() {
|
||||
ActorProfileUnkCLLT::ActorProfileUnkCLLT() :
|
||||
ActorProfile(ActorId_CLLT) {}
|
||||
|
||||
ActorUnkCLLT::ActorUnkCLLT() {}
|
||||
ActorUnkCLLT::ActorUnkCLLT() :
|
||||
mUnk_9C(*(unk32 *) this) {}
|
||||
|
||||
void ActorUnkCLLT::func_ov031_020fb38c(void) {}
|
||||
void ActorUnkCLLT::func_ov031_020fb3c8(void) {}
|
||||
void ActorUnkCLLT::func_ov031_020fb40c(void) {}
|
||||
void ActorUnkCLLT::vfunc_58() {
|
||||
if (!data_ov000_020b504c.func_ov000_0206807c(this->mUnk_5C.mUnk_20, &this->mUnk_9C)) {
|
||||
return;
|
||||
}
|
||||
this->vfunc_60(ActorUnkCLLTState_2);
|
||||
}
|
||||
|
||||
ActorUnkCLLT::~ActorUnkCLLT() {}
|
||||
ActorProfileUnkCLLT::~ActorProfileUnkCLLT() {}
|
||||
void ActorUnkCLLT::vfunc_5C() {
|
||||
if ((u16) this->mUnk_9C.mUnk_08 != 0xFFFF) {
|
||||
this->mUnk_9C.vfunc_04();
|
||||
return;
|
||||
}
|
||||
this->vfunc_60(ActorUnkCLLTState_5);
|
||||
}
|
||||
|
||||
// non-matching
|
||||
void ActorUnkCLLT::vfunc_60(ActorState state) {
|
||||
if (state == ActorUnkCLLTState_1) {
|
||||
Actor *actor = func_ov031_020e3df8();
|
||||
if (actor != NULL) {
|
||||
this->mUnk_9C.mUnk_2C = actor->mRef;
|
||||
this->mUnk_9C.mUnk_30 = this->mRef;
|
||||
} else {
|
||||
this->mUnk_9C.mUnk_28 = 0;
|
||||
this->mUnk_9C.mUnk_2C = 0;
|
||||
this->mUnk_9C.mUnk_30 = 0;
|
||||
}
|
||||
}
|
||||
this->mState = state;
|
||||
}
|
||||
|
||||
@@ -81,6 +81,20 @@ bool ActorUnkMLCK::vfunc_18(unk32 param1) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// non-matching
|
||||
void ActorUnkMLCK::vfunc_64(unk32 param1) {
|
||||
this->mUnk_BC = param1;
|
||||
this->mUnk_C2 = 0xFFFF;
|
||||
this->mUnk_C0 = 0x0;
|
||||
if (param1 != 0x1) {
|
||||
return;
|
||||
}
|
||||
|
||||
this->mUnk_F1 = false;
|
||||
this->mUnk_C4 = data_ov000_020b52e8.func_ov000_0206f980(this->mUnk_B8);
|
||||
this->mUnk_C4->func_ov031_020fb184();
|
||||
}
|
||||
|
||||
void ActorUnkMLCK::vfunc_54(unk32 param1, unk32 param2) {
|
||||
if (param2 == 0) {
|
||||
return;
|
||||
@@ -105,20 +119,6 @@ void ActorUnkMLCK::vfunc_60() {
|
||||
this->vfunc_64(0x0);
|
||||
}
|
||||
|
||||
// non-matching
|
||||
void ActorUnkMLCK::vfunc_64(unk32 param1) {
|
||||
this->mUnk_BC = param1;
|
||||
this->mUnk_C2 = 0xFFFF;
|
||||
this->mUnk_C0 = 0x0;
|
||||
if (param1 != 0x1) {
|
||||
return;
|
||||
}
|
||||
|
||||
this->mUnk_F1 = false;
|
||||
this->mUnk_C4 = data_ov000_020b52e8.func_ov000_0206f980(this->mUnk_B8);
|
||||
this->mUnk_C4->func_ov031_020fb184();
|
||||
}
|
||||
|
||||
void ActorUnkMLCK::vfunc_68() {
|
||||
if (data_0204a088->mUnk_04 != -1 || data_0204a088->mUnk_08 != -1) {
|
||||
return;
|
||||
@@ -185,7 +185,7 @@ void ActorUnkMLCK::func_ov031_020faf24() {
|
||||
actor.mUnk_32 = 0x0;
|
||||
|
||||
VecFx32_Copy(data_027e0ce0->func_01fff148(0x0), &actor.mUnk_34);
|
||||
actor.mUnk_04 = (unk32) & this->mUnk_D8;
|
||||
actor.mUnk_04 = &this->mUnk_D8;
|
||||
|
||||
data_027e09b8->func_ov000_02073470(&actor, 0x0);
|
||||
|
||||
@@ -202,7 +202,7 @@ void ActorUnkMLCK::func_ov031_020faf24() {
|
||||
actor2.mUnk_32 = 0x0;
|
||||
|
||||
VecFx32_Copy(data_027e0ce0->func_01fff148(0x0), &actor2.mUnk_34);
|
||||
actor2.mUnk_04 = (unk32) & this->mUnk_E4;
|
||||
actor2.mUnk_04 = &this->mUnk_E4;
|
||||
|
||||
data_027e09b8->func_ov000_02073470(&actor2, 0x0);
|
||||
}
|
||||
@@ -234,7 +234,7 @@ void ActorUnkMLCK_B4_00::func_ov031_020fb184() {
|
||||
}
|
||||
|
||||
void ActorUnkMLCK_D8::vfunc2_00() {
|
||||
if (!this->mUnk_04) {
|
||||
if (!this->mUnk_04b) {
|
||||
return;
|
||||
}
|
||||
this->mUnk_08->func_ov031_020fb104();
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
#include "Actor/ActorUnkTLKT.hpp"
|
||||
|
||||
#include "Actor/Actor_Derived1.hpp"
|
||||
#include "System/SysNew.hpp"
|
||||
#include "Unknown/UnkStruct_027e09b8.hpp"
|
||||
#include "Unknown/UnkStruct_027e0ce0.hpp"
|
||||
#include "Unknown/UnkStruct_027e0d34.hpp"
|
||||
|
||||
extern "C" void func_ov000_02072fd0(UnkStackStruct1 *param0);
|
||||
extern "C" unk16 func_ov031_020e3dd0(Actor *param0);
|
||||
|
||||
DECL_PROFILE(ActorProfileUnkTLKT);
|
||||
|
||||
Actor *ActorProfileUnkTLKT::Create() {
|
||||
@@ -12,9 +18,10 @@ Actor *ActorProfileUnkTLKT::Create() {
|
||||
ActorProfileUnkTLKT::ActorProfileUnkTLKT() :
|
||||
ActorProfile(ActorId_TLKT) {}
|
||||
|
||||
ActorUnkTLKT::ActorUnkTLKT() {}
|
||||
ActorUnkTLKT::ActorUnkTLKT() {
|
||||
this->mUnk_04 = 0xFFFFFFFF;
|
||||
}
|
||||
|
||||
// non-matching
|
||||
ActorUnkTLKT::~ActorUnkTLKT() {
|
||||
if (this->mState == ActorUnkTLKTState_2) {
|
||||
this->func_ov031_020e4514();
|
||||
@@ -38,7 +45,7 @@ void ActorUnkTLKT::vfunc_24() {
|
||||
}
|
||||
|
||||
void ActorUnkTLKT::vfunc_58() {
|
||||
if (!data_027e09b8->func_ov000_020732ec(this->mUnk_9C.mUnk_04)) {
|
||||
if (!data_027e09b8->func_ov000_020732ec(this->mUnk_04)) {
|
||||
return;
|
||||
}
|
||||
this->vfunc_60(ActorUnkTLKTState_2);
|
||||
@@ -48,7 +55,7 @@ void ActorUnkTLKT::func_ov031_020e4274() {
|
||||
if (data_027e0d34->func_ov031_020d9758()) {
|
||||
return;
|
||||
}
|
||||
data_027e09b8->func_ov000_020732fc(this->mUnk_9C.mUnk_04);
|
||||
data_027e09b8->func_ov000_020732fc(this->mUnk_04);
|
||||
}
|
||||
|
||||
void ActorUnkTLKT::vfunc_64() {
|
||||
@@ -64,7 +71,6 @@ void ActorUnkTLKT::vfunc_64() {
|
||||
}
|
||||
}
|
||||
|
||||
// non-matching
|
||||
void ActorUnkTLKT::vfunc_68() {
|
||||
if (this->mState == ActorUnkTLKTState_2) {
|
||||
this->func_ov031_020e4514();
|
||||
@@ -75,13 +81,78 @@ void ActorUnkTLKT::vfunc_68() {
|
||||
this->func_ov031_020e3e6c();
|
||||
}
|
||||
|
||||
// non-matching
|
||||
void ActorUnkTLKT::vfunc_60(ActorState state) {}
|
||||
void ActorUnkTLKT::vfunc_60(ActorState state) {
|
||||
switch (state) {
|
||||
case ActorUnkTLKTState_1:
|
||||
Actor *actor = this->func_ov031_020e3df8();
|
||||
if (this->mUnk_5C.mParams[0] == 0x0 && actor == NULL) {
|
||||
this->vfunc_60(ActorUnkTLKTState_5);
|
||||
return;
|
||||
}
|
||||
ActorUnk_vfunc_B0 actorUnkSp40 = ActorUnk_vfunc_B0();
|
||||
actorUnkSp40.mUnk_04 = this;
|
||||
actorUnkSp40.mUnk_0C = this->mUnk_5C.mUnk_20;
|
||||
actorUnkSp40.mUnk_14 = 0x0;
|
||||
actorUnkSp40.mUnk_18 = -1;
|
||||
actorUnkSp40.mUnk_1C = -1;
|
||||
actorUnkSp40.mUnk_20 = false;
|
||||
actorUnkSp40.mUnk_21 = false;
|
||||
|
||||
switch (this->mUnk_5C.mParams[1]) {
|
||||
case 0x0: {
|
||||
actorUnkSp40.mUnk_32 = 0x5;
|
||||
VecFx32 *pos = data_027e0ce0->func_01fff148(0x0);
|
||||
VecFx32_Copy(pos, &actorUnkSp40.mUnk_34);
|
||||
actorUnkSp40.mUnk_08 |= 0x1;
|
||||
actorUnkSp40.mUnk_08 |= 0x1;
|
||||
break;
|
||||
}
|
||||
case 0x1:
|
||||
actorUnkSp40.mUnk_32 = 0x1;
|
||||
break;
|
||||
case 0x2:
|
||||
actorUnkSp40.mUnk_32 = 0x4;
|
||||
VecFx32_Copy(&this->mPos, &actorUnkSp40.mUnk_34);
|
||||
actorUnkSp40.mUnk_08 |= 0x1;
|
||||
break;
|
||||
case 0x3:
|
||||
actorUnkSp40.mUnk_08 |= 0x1;
|
||||
break;
|
||||
case 0x4:
|
||||
actorUnkSp40.mUnk_08 &= 0xFFFE;
|
||||
break;
|
||||
case 0x5:
|
||||
actorUnkSp40.mUnk_32 = 0x2;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
actorUnkSp40.mpActor = actor;
|
||||
actorUnkSp40.mUnk_2C = this;
|
||||
actorUnkSp40.mUnk_30 = func_ov031_020e3dd0(this);
|
||||
this->mUnk_04 = data_027e09b8->func_ov000_02073470(&actorUnkSp40, 0x0);
|
||||
break;
|
||||
case ActorUnkTLKTState_3:
|
||||
UnkStackStruct1 unkSp00;
|
||||
func_ov000_02072fd0(&unkSp00);
|
||||
unkSp00.mUnk_04 = static_cast<MapObject_UnkStruct1 *>(static_cast<ActorUnkTLKT_9C *>(this));
|
||||
|
||||
unkSp00.mUnk_3A = 0x0;
|
||||
unkSp00.mUnk_3B = 0x0;
|
||||
this->mUnk_04 = data_027e09b8->func_ov000_02073388(&unkSp00, 0x0);
|
||||
break;
|
||||
case ActorUnkTLKTState_4:
|
||||
data_027e0d34->func_ov031_020d9854(&this->mPos, FLOAT_TO_FX32(0.5f));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
this->mState = state;
|
||||
}
|
||||
|
||||
// non-matching
|
||||
void ActorUnkTLKT::func_ov031_020e4514() {
|
||||
u16 param = this->mUnk_5C.mParams[2];
|
||||
switch (param - (0xA * ((param >> 0x1F) + (param / 10)))) {
|
||||
switch (this->mUnk_5C.mParams[2] % 10) {
|
||||
case 0:
|
||||
this->func_ov000_02098a88(0x1, 0x1);
|
||||
return;
|
||||
|
||||
@@ -339,13 +339,8 @@ void MapObjectDoorBase::vfunc_5C(MapObjState state, unk32 param2) {
|
||||
|
||||
if (this->mUnk_86 && param2 == 0) {
|
||||
func_ov000_02072fd0(&auStack_5c);
|
||||
void *var_r0 = this;
|
||||
|
||||
if (this != NULL) {
|
||||
var_r0 = (u8 *) this + 0x40;
|
||||
}
|
||||
|
||||
auStack_5c.mUnk_04 = var_r0;
|
||||
auStack_5c.mUnk_04 = this;
|
||||
auStack_5c.mUnk_00 = 0x7B;
|
||||
auStack_5c.mUnk_0C.x = this->mPos.x;
|
||||
auStack_5c.mUnk_0C.y = this->mPos.y;
|
||||
@@ -420,13 +415,8 @@ void MapObjectDoorBase::vfunc_5C(MapObjState state, unk32 param2) {
|
||||
|
||||
if (this->mUnk_86 && param2 == 0) {
|
||||
func_ov000_02072fd0(&auStack_9c);
|
||||
void *var_r1 = this;
|
||||
|
||||
if (this != NULL) {
|
||||
var_r1 = (u8 *) this + 0x40;
|
||||
}
|
||||
|
||||
auStack_9c.mUnk_04 = var_r1;
|
||||
auStack_9c.mUnk_04 = this;
|
||||
auStack_9c.mUnk_00 = 0x76;
|
||||
auStack_9c.mUnk_0C.x = this->mPos.x;
|
||||
auStack_9c.mUnk_0C.y = this->mPos.y;
|
||||
|
||||
Reference in New Issue
Block a user