mirror of
https://github.com/zeldaret/st
synced 2026-07-08 22:34:49 -04:00
Decompiling pot actor (#102)
* refactor: rename actor * feat: delink * feat: prepare decompiling * feat: improvements * feat: few more changes * feat: match constructor of mapobjectpot * feat: match 100% * style: remove blank lines * refactor: remove implicit destructors
This commit is contained in:
@@ -0,0 +1,128 @@
|
||||
#include "Actor/ActorPot.hpp"
|
||||
|
||||
#include "MapObject/MapObjectProfile.hpp"
|
||||
#include "System/SysNew.hpp"
|
||||
#include "Unknown/UnkStruct_027e09a8.hpp"
|
||||
#include "Unknown/UnkStruct_027e0cec.hpp"
|
||||
#include "Unknown/UnkStruct_ov000_020b5d34.hpp"
|
||||
|
||||
static PTMF<ActorPot> data_ov031_021140a0[0x8] = {
|
||||
ActorPot::func_ov031_020f0df4, // ActorPotState_0
|
||||
ActorPot::func_ov031_020f0e0c, // ActorPotState_1
|
||||
ActorPot::func_ov031_020f0e24, // ActorPotState_2
|
||||
ActorPot::func_ov031_020f0e3c, // ActorPotState_3
|
||||
ActorPot::func_ov031_020f0e5c, // ActorPotState_4
|
||||
ActorPot::func_ov031_020f0f44, // ActorPotState_5
|
||||
ActorPot::func_ov031_020f0244, // ActorPotState_6
|
||||
ActorPot::func_ov031_020f0514 // ActorPotState_7
|
||||
};
|
||||
|
||||
static PTMF<ActorPot> data_ov031_02114060[0x8] = {
|
||||
ActorPot::func_ov031_020f0de8, // ActorPotState_0
|
||||
ActorPot::func_ov031_020f0e00, // ActorPotState_1
|
||||
ActorPot::func_ov031_020f0e18, // ActorPotState_2
|
||||
ActorPot::func_ov031_020f0e30, // ActorPotState_3
|
||||
ActorPot::func_ov031_020f0e48, // ActorPotState_4
|
||||
ActorPot::func_ov031_020f0e70, // ActorPotState_5
|
||||
ActorPot::func_ov031_020f0220, // ActorPotState_6
|
||||
ActorPot::func_ov031_020f04dc // ActorPotState_7
|
||||
};
|
||||
|
||||
DECL_PROFILE(ActorProfilePot);
|
||||
|
||||
Actor *ActorProfilePot::Create() {
|
||||
return new(HeapIndex_2) ActorPot();
|
||||
}
|
||||
|
||||
ActorProfilePot::ActorProfilePot() :
|
||||
ActorProfile(ActorId_NTUB) {
|
||||
this->mUnk_04.size = FLOAT_TO_FX32(0.5f);
|
||||
}
|
||||
|
||||
ActorPot::ActorPot() :
|
||||
mUnk_110(G3d_GetModelPtr(data_ov000_020b5d34.GetProfileFromId(MapObjectId_TSUB)->vfunc_04()->mUnk_50), 0x01) {}
|
||||
|
||||
bool ActorPot::vfunc_18(unk32 param1) {
|
||||
Actor_ov031_02113fd4::vfunc_18(param1);
|
||||
|
||||
this->vfunc_5C(ActorPotState_0);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void ActorPot::vfunc_5C(ActorState param1) {
|
||||
this->mUnk_EC = 0x0;
|
||||
this->mState = param1;
|
||||
|
||||
this->vfunc_60();
|
||||
|
||||
CALL_PTMF(PTMF<ActorPot>, data_ov031_02114060[this->mState]);
|
||||
}
|
||||
|
||||
void ActorPot::vfunc_20() {
|
||||
CALL_PTMF(PTMF<ActorPot>, data_ov031_021140a0[this->mState]);
|
||||
}
|
||||
|
||||
void ActorPot::vfunc_2C(unk32 param1) {
|
||||
if (!this->func_01fff5d0(param1, 0x0)) {
|
||||
return;
|
||||
}
|
||||
this->mUnk_110.vfunc_18(&this->mPos);
|
||||
}
|
||||
|
||||
void ActorPot::func_ov031_020f0de8() {
|
||||
this->func_ov031_020f0094();
|
||||
}
|
||||
|
||||
void ActorPot::func_ov031_020f0df4() {
|
||||
this->func_ov031_020f0098();
|
||||
}
|
||||
|
||||
void ActorPot::func_ov031_020f0e00() {
|
||||
this->func_ov031_020f009c();
|
||||
}
|
||||
|
||||
void ActorPot::func_ov031_020f0e0c() {
|
||||
this->func_ov031_020f00a0();
|
||||
}
|
||||
|
||||
void ActorPot::func_ov031_020f0e18() {
|
||||
this->func_ov031_020f009c();
|
||||
}
|
||||
|
||||
void ActorPot::func_ov031_020f0e24() {
|
||||
this->func_ov031_020f00c4();
|
||||
}
|
||||
|
||||
void ActorPot::func_ov031_020f0e30() {
|
||||
this->func_ov031_020f0198();
|
||||
}
|
||||
|
||||
void ActorPot::func_ov031_020f0e3c() {
|
||||
this->func_ov031_020f01ac();
|
||||
}
|
||||
|
||||
void ActorPot::func_ov031_020f0e48() {
|
||||
this->vfunc_40();
|
||||
}
|
||||
|
||||
void ActorPot::func_ov031_020f0e5c() {
|
||||
this->vfunc_44();
|
||||
}
|
||||
|
||||
void ActorPot::func_ov031_020f0e70() {
|
||||
data_027e09a8->func_ov000_02071b30(0x100, &this->mPos, 0x0);
|
||||
data_027e09a8->func_ov000_02071eac(&this->mPos);
|
||||
|
||||
VecFx32 sp8;
|
||||
VecFx32_Init(this->mPos.x, this->mPos.y + this->mUnk_110.mUnk_0C, this->mPos.z, &sp8);
|
||||
data_027e0cec->func_ov000_0209feac(0x8FF, &sp8, 0x4, 0x0, 0x0);
|
||||
data_027e0cec->func_ov000_0209feac(0x900, &sp8, 0x4, 0x0, 0x0);
|
||||
data_027e0cec->func_ov000_0209feac(0x822, &sp8, 0x4, 0x0, 0x0);
|
||||
|
||||
this->func_ov031_020f0450(0x1);
|
||||
}
|
||||
|
||||
void ActorPot::func_ov031_020f0f44() {
|
||||
this->func_ov031_020f04a8();
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
//! TODO: This file was generated automatically and might contain errors
|
||||
|
||||
#include "Actor/ActorUnkNTUB.hpp"
|
||||
#include "System/SysNew.hpp"
|
||||
|
||||
DECL_PROFILE(ActorProfileUnkNTUB);
|
||||
|
||||
Actor *ActorProfileUnkNTUB::Create() {
|
||||
return new(HeapIndex_2) ActorUnkNTUB();
|
||||
}
|
||||
|
||||
ActorProfileUnkNTUB::ActorProfileUnkNTUB() :
|
||||
ActorProfile(ActorId_NTUB) {}
|
||||
|
||||
ActorUnkNTUB::ActorUnkNTUB() {}
|
||||
|
||||
void ActorUnkNTUB::func_ov031_020f0cf0(void) {}
|
||||
void ActorUnkNTUB::func_ov031_020f0d04(void) {}
|
||||
void ActorUnkNTUB::func_ov031_020f0d2c(void) {}
|
||||
void ActorUnkNTUB::func_ov031_020f0d80(void) {}
|
||||
void ActorUnkNTUB::func_ov031_020f0db8(void) {}
|
||||
void ActorUnkNTUB::func_ov031_020f0de8(void) {}
|
||||
void ActorUnkNTUB::func_ov031_020f0df4(void) {}
|
||||
void ActorUnkNTUB::func_ov031_020f0e00(void) {}
|
||||
void ActorUnkNTUB::func_ov031_020f0e0c(void) {}
|
||||
void ActorUnkNTUB::func_ov031_020f0e18(void) {}
|
||||
void ActorUnkNTUB::func_ov031_020f0e24(void) {}
|
||||
void ActorUnkNTUB::func_ov031_020f0e30(void) {}
|
||||
void ActorUnkNTUB::func_ov031_020f0e3c(void) {}
|
||||
void ActorUnkNTUB::func_ov031_020f0e48(void) {}
|
||||
void ActorUnkNTUB::func_ov031_020f0e5c(void) {}
|
||||
void ActorUnkNTUB::func_ov031_020f0e70(void) {}
|
||||
void ActorUnkNTUB::func_ov031_020f0f44(void) {}
|
||||
|
||||
ActorUnkNTUB::~ActorUnkNTUB() {}
|
||||
ActorProfileUnkNTUB::~ActorProfileUnkNTUB() {}
|
||||
@@ -43,7 +43,7 @@ ModelRender_ov000_020b198c::ModelRender_ov000_020b198c(G3d_Model *pModel, unk8 p
|
||||
|
||||
// non-matching
|
||||
MapObjectPot::MapObjectPot() :
|
||||
mUnk_48(NULL, 0x1) {
|
||||
mUnk_48(G3d_GetModelPtr(GET_PROFILE(MapObjectProfilePot)->mUnk_20.mUnk_50), 0x1) {
|
||||
this->mUnk_40 = ActorId_NTUB;
|
||||
this->mUnk_10 = &data_ov031_02118010;
|
||||
SET_FLAG(this->mFlags, MapObjFlag_8);
|
||||
|
||||
Reference in New Issue
Block a user