Decompiling MapObjectUnkMTJR (#151)

* feat: Decompile ctors, vfuncs and funcs

* feat: Decompile funcs

* feat: Add data and deal with bss etc

* feat: Sync jp

* feat: Add content to empty class

* feat: Match vfunc_00

* fix: Actor/MapObject Profile macro access cleanup

* feat: Overlay 63 cleanup

* fix: Add "non-matching" comments on functions

* fix: Remove comment
This commit is contained in:
Mityno
2026-09-28 17:23:47 +02:00
committed by GitHub
parent b40c9e9c50
commit 9712128579
21 changed files with 224 additions and 93 deletions
@@ -5,6 +5,7 @@
#include "System/SysNew.hpp"
#include "Unknown/UnkStruct_027e09a8.hpp"
#include "Unknown/UnkStruct_027e0d38.hpp"
#include "profile.hpp"
extern "C" fx32 func_01ffb464(fx32);
extern "C" void func_01ff9218(fx32 *, fx32, fx32);
@@ -30,7 +31,7 @@ MapObjectProfileBombFlower::MapObjectProfileBombFlower() :
// non-matching
MapObjectBombFlower::MapObjectBombFlower() :
mUnk_48(G3d_GetModelPtr(GET_PROFILE(MapObjectProfileBombFlower)->mUnk_20.mUnk_50), 0x0, 0x0),
mUnk_48(G3d_GetModelPtr(GET_PROFILE_20_50(MapObjectProfileBombFlower)), 0x0, 0x0),
mUnk_B4(0x1000),
mUnk_B8(0x0),
mUnk_BA(0x0),
+2 -1
View File
@@ -8,6 +8,7 @@
#include "Unknown/UnkStruct_027e0d38.hpp"
#include "limits.h"
#include "profile.hpp"
extern "C" MapObject_10_Pot data_ov031_02118010;
@@ -43,7 +44,7 @@ ModelRender_ov000_020b198c::ModelRender_ov000_020b198c(G3d_Model *pModel, unk8 p
// non-matching
MapObjectPot::MapObjectPot() :
mUnk_48(G3d_GetModelPtr(GET_PROFILE(MapObjectProfilePot)->mUnk_20.mUnk_50), 0x1) {
mUnk_48(G3d_GetModelPtr(GET_PROFILE_20_50(MapObjectProfilePot)), 0x1) {
this->mUnk_40 = ActorId_NTUB;
this->mUnk_10 = &data_ov031_02118010;
SET_FLAG(this->mFlags, MapObjFlag_8);
+2 -1
View File
@@ -7,6 +7,7 @@
#include "Unknown/UnkStruct_027e09b8.hpp"
#include "Unknown/UnkStruct_027e0cec.hpp"
#include "Unknown/UnkStruct_ov000_020b5214.hpp"
#include "profile.hpp"
extern const char data_ov031_02110ce0;
@@ -40,7 +41,7 @@ MapObjectUnkSWHT::MapObjectUnkSWHT() :
mUnk_0F4(NULL),
mUnk_0F8(-0x1),
mUnk_0FC(0x0) {
this->mUnk_054.vfunc_08(G3d_GetModelPtr(GET_PROFILE(MapObjectProfileUnkSWHT)->mUnk_20.mUnk_50));
this->mUnk_054.vfunc_08(G3d_GetModelPtr(GET_PROFILE_20_50(MapObjectProfileUnkSWHT)));
this->mUnk_0B4.mpModel = this->mUnk_054.mpModel;
unk32 param2 = data_ov031_021179e8.func_ov000_02058a24();
+2 -1
View File
@@ -1,6 +1,7 @@
#define VECFX32_CTORS
#include "MapObject/MapObjectUnkSWSW.hpp"
#include "profile.hpp"
#include "Actor/Actor.hpp"
#include "Actor/ActorManager.hpp"
@@ -97,7 +98,7 @@ void MapObjectUnkSWSW_40::func_ov032_021210a0(fx32 param1) {
}
MapObjectUnkSWSW::MapObjectUnkSWSW() :
mUnk_040(G3d_GetUnkPtr(GET_PROFILE(MapObjectProfileUnkSWSW)->mUnk_20.mUnk_50, &data_ov032_02121ef4)),
mUnk_040(G3d_GetUnkPtr(GET_PROFILE_20_50(MapObjectProfileUnkSWSW), &data_ov032_02121ef4)),
mUnk_0AC(&this->mUnk_0CC, NULL),
mUnk_0EC(FLOAT_TO_FX32(0.0f), FLOAT_TO_FX32(0.5f), FLOAT_TO_FX32(-0.4202f)),
mUnk_0F8(NULL),
+33 -24
View File
@@ -10,7 +10,6 @@
#include "MapObject/MapObject.hpp"
#include "MapObject/MapObjectManager.hpp"
#include "Physics/Cylinder.hpp"
#include "Player/PlayerGet.hpp"
#include "Render/ModelRender.hpp"
#include "Save/AdventureFlags.hpp"
#include "System/Random.hpp"
@@ -156,8 +155,9 @@ unk32 UnkStruct_ov063_02162e88::vfunc_04(ActorRef param1, unk32 param2, unk32 pa
return ret1;
}
// non-matching
ActorUnkCANS::ActorUnkCANS() :
mUnk_0B0(G3d_GetModelPtr(((MapObjectProfile_Derived2_20 *) GET_PROFILE(ActorProfileUnkCANS)->vfunc_04())->mUnk_50)),
mUnk_0B0(G3d_GetModelPtr(GET_PROFILE(ActorProfileUnkCANS)->vfunc_04()->mUnk_50)),
mUnk_128(&mUnk_0B0, GET_PROFILE(ActorProfileUnkCANS)->vfunc_04()),
mUnk_1F4(),
mUnk_200(this),
@@ -244,6 +244,7 @@ void ActorUnkCANS::vfunc_24(void) {
}
}
// non-matching
void ActorUnkCANS::vfunc_20(void) {
if (mUnk_238 < mUnk_23A) {
mUnk_238++;
@@ -252,7 +253,7 @@ void ActorUnkCANS::vfunc_20(void) {
if (!this->func_ov017_020bef4c(0x4000) && mUnk_48 != 0 && mState != 4) {
return;
}
mUnk_3C = (Actor_9C *) &mUnk_200;
mUnk_3C = &mUnk_200;
CALL_PTMF(PTMF<ActorUnkCANS>, data_ov063_02162fb0[mState]);
@@ -295,9 +296,7 @@ void ActorUnkCANS::vfunc_20(void) {
if (var == 0) {
if (mUnk_268 != NULL) {
//! INFO: mUnk_268 is NOT an ActorUnkCANS*, this is a placeholder as mUnk_1F4 is not yet defined in
//! ActorUnkCASE (current type of *mUnk_268)
*(char *) &((ActorUnkCANS *) mUnk_268)->mUnk_1F4 = 0;
mUnk_268->mUnk_1F4 = 0;
}
} else {
@@ -384,7 +383,7 @@ void ActorUnkCANS::vfunc_20(void) {
case 11:
default:
if (iVar5 != 0) {
this->func_ov017_020bfb18((Actor_9C *) &mUnk_200);
this->func_ov017_020bfb18(&mUnk_200);
if (mState != 4) {
this->func_ov063_02158448(5);
}
@@ -395,9 +394,7 @@ void ActorUnkCANS::vfunc_20(void) {
}
}
if (mUnk_268 != NULL) {
//! INFO: mUnk_268 is NOT an ActorUnkCANS*, this is a placeholder as mUnk_1F4 is not yet defined in
//! ActorUnkCASE (current type of *mUnk_268)
*(char *) &((ActorUnkCANS *) mUnk_268)->mUnk_1F4 = (char) iVar5;
mUnk_268->mUnk_1F4 = iVar5;
}
}
}
@@ -468,16 +465,17 @@ void ActorUnkCANS::vfunc_2C(unk32 param1) {
}
void ActorUnkCANS::func_ov063_02158b0c(void) {
mUnk_268 = NULL;
((u16 *) mUnk_38)[4] = 1;
mUnk_34 = (Cylinder *) &data_ov063_02162e90;
mUnk_30 = (Cylinder *) &data_ov063_02162e90;
mUnk_268 = NULL;
mUnk_38->mUnk_08 = 1;
mUnk_34 = (Cylinder *) &data_ov063_02162e90;
mUnk_30 = (Cylinder *) &data_ov063_02162e90;
}
void ActorUnkCANS::func_ov063_02158b34(void) {
mUnk_128.vfunc_1C(data_ov063_02163068, 0x1000, 0x19A, 0);
}
// non-matching
void ActorUnkCANS::func_ov063_02158b98(void) {
if (mUnk_128.vfunc_28()->func_02015080(0x1000) || mUnk_128.vfunc_28()->func_02015080(0x11000) ||
mUnk_128.vfunc_28()->func_02015080(0x21000)) {
@@ -514,6 +512,7 @@ void ActorUnkCANS::func_ov063_02158d40(void) {
mUnk_238 = 0;
}
// non-matching
void ActorUnkCANS::func_ov063_02158db0(void) {
if (mUnk_128.vfunc_28()->func_02015080(0x1000) || mUnk_128.vfunc_28()->func_02015080(0xD000) ||
mUnk_128.vfunc_28()->func_02015080(0x19000) || mUnk_128.vfunc_28()->func_02015080(0x25000)) {
@@ -572,13 +571,13 @@ void ActorUnkCANS::func_ov063_02158db0(void) {
void ActorUnkCANS::func_ov063_021590c8(void) {
func_ov017_020bf634(this, (unk16 *) &mUnk_200.mUnk_10, this->func_ov063_0215a5bc(), this->func_ov063_0215a5d8());
((Actor_9C *) &mUnk_200)->func_ov000_02097bec();
mUnk_200.func_ov000_02097bec();
}
void ActorUnkCANS::func_ov063_02159100(void) {
func_ov017_020bf688(this);
if (!GET_FLAG(this->mFlags, 5)) {
if (!GET_FLAG(this->mFlags, ActorFlag_5)) {
return;
}
@@ -590,7 +589,7 @@ void ActorUnkCANS::func_ov063_02159100(void) {
return;
}
u16 *tmpArr = (u16 *) &mUnk_224.mUnk_08;
u16 *tmpArr = &mUnk_224.mUnk_08;
if (tmpArr[0] < tmpArr[1]) {
this->func_ov063_02158448(4);
return;
@@ -653,7 +652,7 @@ void ActorUnkCANS::func_ov063_02159258(void) {
void ActorUnkCANS::func_ov063_02159408(void) {
this->func_ov000_02099450(&mUnk_224, &data_027e07d4, 0, data_ov000_020aecf0[0]);
mUnk_128.vfunc_1C(data_ov063_02163068, 0, 0x19A, 0);
((Actor_9C *) &mUnk_200)->func_ov000_02097bec();
mUnk_200.func_ov000_02097bec();
}
void ActorUnkCANS::func_ov063_02159494(void) {
@@ -691,7 +690,7 @@ void ActorUnkCANS::func_ov063_021595a4(void) {
mVel.z = 0;
mUnk_270 = 0;
mUnk_128.vfunc_1C(data_ov063_021630b0, 0x1000, 0x400, 0);
((Actor_9C *) &mUnk_200)->func_ov000_02097bec();
mUnk_200.func_ov000_02097bec();
}
void ActorUnkCANS::func_ov063_02159618(void) {
@@ -767,6 +766,7 @@ void ActorUnkCANS::func_ov063_021598fc(void) {
mUnk_276 = gRandom.Next32(0) & 0x80000000 ? 1 : -1;
}
// non-matching
void ActorUnkCANS::func_ov063_021599e4(void) {
if (mUnk_128.vfunc_28()->func_02015080(0x1000) || mUnk_128.vfunc_28()->func_02015080(0xA000) ||
mUnk_128.vfunc_28()->func_02015080(0x13000) || mUnk_128.vfunc_28()->func_02015080(0x1C000)) {
@@ -878,6 +878,7 @@ void ActorUnkCANS::func_ov063_02159e20(void) {
mUnk_38->mUnk_08 = 3;
}
// non-matching
void ActorUnkCANS::func_ov063_02159ec0(void) {
this->vfunc_44();
@@ -898,6 +899,7 @@ void ActorUnkCANS::func_ov063_02159ec0(void) {
*(s16 *) &mUnk_44 |= 0x20;
}
// non-matching
// return bool ?
unk32 ActorUnkCANS::func_ov063_02159f3c(unk32 param1) {
s16 var;
@@ -940,6 +942,7 @@ unk32 ActorUnkCANS::func_ov063_02159f3c(unk32 param1) {
return func_01ff9a5c(data_027e0ce0->func_01fff148(0), &vec1, &vec2) < param1;
}
// non-matching
// return bool ?
unk32 ActorUnkCANS::func_ov063_0215a0f0(void) {
s16 var1;
@@ -987,6 +990,7 @@ unk32 ActorUnkCANS::func_ov063_0215a0f0(void) {
return func_01ff9a5c(data_027e0ce0->func_01fff148(0), &mPos, &vec) < 0x4CD;
}
// non-matching
unk32 ActorUnkCANS::func_ov063_0215a2c0(void) {
s16 var1;
func_ov000_020986b4((s16 *) &var1, this, 0);
@@ -1035,7 +1039,7 @@ unk32 ActorUnkCANS::func_ov063_0215a2c0(void) {
void ActorUnkCANS::func_ov063_0215a428(void) {
// A not very clean code to access 22C and 22E matching the asm
u16 *values = (u16 *) &mUnk_224.mUnk_08;
u16 *values = &mUnk_224.mUnk_08;
if (values[0] < values[1]) {
this->func_ov063_02158448(4);
} else if (mUnk_268 == NULL) {
@@ -1081,7 +1085,7 @@ unk32 ActorUnkCANS::func_ov063_0215a514(void) {
func_ov000_020986b4((s16 *) &var, this, 0);
var = (volatile s16) var - mUnk_26C;
return 0x4AAB < ABS(var);
return DEG_TO_ANG(105) + 1 < ABS(var);
}
// return bool ?
@@ -1093,12 +1097,13 @@ unk32 ActorUnkCANS::func_ov063_0215a56c(unk32 param1) {
return DEG_TO_ANG(90) <= ABS((s16) (param1 - mAngle));
}
// non-matching
void ActorUnkCANS::func_ov063_0215a5a0(VecFx32 *param1) {
// Does not match instruction order
VecFx32 vec;
vec.x = ((VecFx32 *) &mUnk_250)->x;
vec.y = ((VecFx32 *) &mUnk_250)->y;
vec.z = ((VecFx32 *) &mUnk_250)->z;
vec.x = mUnk_250.x;
vec.y = mUnk_250.y;
vec.z = mUnk_250.z;
param1->z = vec.z;
param1->x = vec.x;
param1->y = vec.y;
@@ -1118,6 +1123,7 @@ unk32 ActorUnkCANS::func_ov063_0215a5d8(void) {
return data_ov000_020aecfc[0];
}
// non-matching
void ActorUnkCANS::vfunc_10(Cylinder *param1) {
Cylinder *cylinder = this->mUnk_34;
*param1 = *cylinder;
@@ -1132,6 +1138,7 @@ void ActorUnkCANS::vfunc_10(Cylinder *param1) {
}
}
// non-matching
void ActorUnkCANS::func_ov063_0215a678(ActorUnkCANS *actor, UnkStruct_func_ov063_0215a678 *param2) {
ModelRender *modelRender = param2->mUnk_04;
u8 var1;
@@ -1209,6 +1216,7 @@ UnkStruct_ov063_02162ea8::UnkStruct_ov063_02162ea8() {
UnkStruct_ov063_02162ea8::~UnkStruct_ov063_02162ea8() {}
// non-matching
bool UnkStruct_ov063_02162ea8::vfunc_08(const UnkStruct_ov031_020f3310 *param1) {
bool retVal = UnkStruct_ov031_Items_00::vfunc_08(param1);
if (retVal && func_01ff9258(param1->mUnk_08.x, param1->mUnk_08.z) > 0) {
@@ -1224,6 +1232,7 @@ bool UnkStruct_ov063_02162ea8::vfunc_08(const UnkStruct_ov031_020f3310 *param1)
return retVal;
}
// non-matching
bool UnkStruct_ov063_02162ea8::vfunc_0C(const UnkStruct_ov031_020e54d4 *param1, unk32 *param2, unk32 param3) {
UnkStruct_02162ea8_vfunc_0C *param2Struct = (UnkStruct_02162ea8_vfunc_0C *) param2;
if ((*(u16 *) &param2Struct->mUnk_04 & 0x1000) != 0) {
+7 -2
View File
@@ -8,7 +8,6 @@
#include "Actor/ActorShotArrow.hpp"
#include "Actor/ActorUnkCANS.hpp"
#include "Actor/ActorUnkITWP.hpp"
#include "MapObject/MapObjectProfile_Derived2_20.hpp"
#include "Physics/Cylinder.hpp"
#include "Render/ModelRender.hpp"
#include "Unknown/UnkStruct_027e09a8.hpp"
@@ -69,6 +68,7 @@ static PTMF<ActorUnkCASE> data_ov063_02163110[0x6] = {ActorUnkCASE::func_ov063_0
DECL_PROFILE(ActorProfileUnkCASE);
// non-matching (profile is smaller than target)
Actor *ActorProfileUnkCASE::Create() {
return new(HeapIndex_2) ActorUnkCASE();
}
@@ -139,7 +139,7 @@ void ActorUnkCASE::func_ov063_0215acec(ActorRef *ref1, ActorRef ref2) {
}
ActorUnkCASE::ActorUnkCASE() :
mUnk_0B0(G3d_GetModelPtr(((MapObjectProfile_Derived2_20 *) GET_PROFILE(ActorProfileUnkCASE)->vfunc_04())->mUnk_50)),
mUnk_0B0(G3d_GetModelPtr(GET_PROFILE(ActorProfileUnkCASE)->vfunc_04()->mUnk_50)),
mUnk_120(0),
mUnk_124(this),
mUnk_14C(NULL),
@@ -312,6 +312,7 @@ void ActorUnkCASE::vfunc_24() {
this->vfunc_20();
}
// non-matching
void ActorUnkCASE::vfunc_20() {
mUnk_150.mUnk_1C = 1;
@@ -445,6 +446,7 @@ void ActorUnkCASE::vfunc_2C(unk32 param1) {
}
}
// non-matching
void ActorUnkCASE::func_ov063_0215b6c8(VecFx32 *param1, UnkAngleStruct angle) {
VecFx32 vec = *param1;
VecFx32_Copy(&vec, &mPos);
@@ -460,6 +462,7 @@ void ActorUnkCASE::func_ov063_0215b724(void) {
data_027e09a8->func_ov000_02071b30(0x9865, &mPos, 0);
}
// non-matching
void ActorUnkCASE::vfunc_10(Cylinder *param1) {
if (mUnk_14C != NULL) {
((ActorUnkCASE *) mUnk_14C)->vfunc_10(param1);
@@ -479,6 +482,7 @@ void ActorUnkCASE::func_ov063_0215b814(ActorRef ref) {
this->func_ov063_0215aefc(1);
}
// non-matching
void ActorUnkCASE::func_ov063_0215b854(void) {
if (mUnk_14C != NULL) {
ActorUnkCANS *actorCans = (ActorUnkCANS *) mUnk_14C;
@@ -506,6 +510,7 @@ static inline bool VecFx32_IsZero(VecFx32 *vec) {
return vec->x == 0 && vec->y == 0 && vec->z == 0;
}
// non-matching
void ActorUnkCASE::func_ov063_0215b8e8(VecFx32 *param1) {
if (mUnk_14C != NULL) {
+1 -1
View File
@@ -1,5 +1,4 @@
#include "Actor/ActorUnkRBLS.hpp"
#include "Actor/Actor_Derived1.hpp"
#include "Render/ModelRender.hpp"
#include "Unknown/UnkStruct_027e0cd8.hpp"
#include "nitro/fx.h"
@@ -18,6 +17,7 @@ Actor *ActorProfileUnkRBLS::Create() {
ActorProfileUnkRBLS::ActorProfileUnkRBLS() :
ActorProfile_Derived1(ActorId_RBLS) {}
// non-matching
ActorUnkRBLS::ActorUnkRBLS() :
mUnk_94(G3d_GetModelPtr(GET_PROFILE(ActorProfileUnkRBLS)->mUnk_3C.mUnk_50)),
mUnk_F4(&mUnk_94, GET_PROFILE(ActorProfileUnkRBLS)->vfunc_04()) {}
+1 -2
View File
@@ -1,6 +1,5 @@
#include "Actor/ActorUnkRMSD.hpp"
#include "Actor/ActorUnkRMSV.hpp"
#include "Actor/Actor_Derived1.hpp"
#include "nns/g3d/g3d.h"
#include "profile.hpp"
#include "types.h"
@@ -29,7 +28,7 @@ bool ActorUnkRMSD::vfunc_18(unk32 param1) {
}
void ActorUnkRMSD::vfunc_20(void) {
(*(Actor *) &this->mUnk_158).vfunc_34(); // Not an Actor
this->mUnk_158.vfunc_34();
}
void ActorUnkRMSD::vfunc_24(void) {
this->vfunc_20();
-1
View File
@@ -2,7 +2,6 @@
#include "Actor/Actor.hpp"
#include "Actor/ActorId.hpp"
#include "Actor/ActorUnkRMSBase.hpp"
#include "Actor/Actor_Derived1.hpp"
#include "nns/g3d/g3d.h"
#include "profile.hpp"
+1 -2
View File
@@ -1,6 +1,5 @@
#include "Actor/ActorUnkRMSW.hpp"
#include "Actor/ActorId.hpp"
#include "Actor/Actor_Derived1.hpp"
#include "nns/g3d/g3d.h"
#include "profile.hpp"
#include "types.h"
@@ -29,7 +28,7 @@ bool ActorUnkRMSW::vfunc_18(unk32 param1) {
}
void ActorUnkRMSW::vfunc_20(void) {
(*(Actor *) &this->mUnk_158).vfunc_34(); // Not an Actor
this->mUnk_158.vfunc_34();
}
void ActorUnkRMSW::vfunc_24(void) {
@@ -48,7 +48,7 @@ MapObjectProfileUnkLTRW::MapObjectProfileUnkLTRW() :
}
MapObjectUnkLTRW::MapObjectUnkLTRW() :
mUnk_40(G3d_GetModelPtr(GET_PROFILE(MapObjectProfileUnkLTRW)->mUnk_20.mUnk_50)),
mUnk_40(G3d_GetModelPtr(GET_PROFILE_20_50(MapObjectProfileUnkLTRW))),
mUnk_A0(1),
mUnk_A4(0),
mUnk_A6(0),
@@ -57,7 +57,7 @@ MapObjectUnkLTRW::MapObjectUnkLTRW() :
bool MapObjectUnkLTRW::vfunc_00() {
mPos.x -= FLOAT_TO_FX32(.5f);
mPos.z -= FLOAT_TO_FX32(.5f);
mUnk_10 = &GET_PROFILE(MapObjectProfileUnkLTRW)->mUnk_D4;
mUnk_10 = GET_PROFILE_D4(MapObjectProfileUnkLTRW);
SET_FLAG(mFlags, MapObjFlag_9);
mUnk_18[0] = 0x10;
mUnk_A8.mUnk_04h = mUnk_20.mUnk_08[0];
+119 -15
View File
@@ -1,26 +1,130 @@
//! TODO: This file was generated automatically and might contain errors
#include "MapObject/MapObjectUnkMTJR.hpp"
#include "System/SysNew.hpp"
#include "System/Random.hpp"
#include "Unknown/UnkStruct_027e09a8.hpp"
#include "Unknown/UnkStruct_027e0cec.hpp"
#include "flags.h"
#include "nitro/fx.h"
#include "nitro/math.h"
#include "profile.hpp"
// Overlay 31
extern "C" void func_ov031_020e0f30(ActorRef);
DECL_PROFILE(MapObjectProfileUnkMTJR);
MapObject *MapObjectProfileUnkMTJR::Create() {
return new(HeapIndex_2) MapObjectUnkMTJR();
return new(HeapIndex_ITCM) MapObjectUnkMTJR();
}
// non-matching
MapObjectProfileUnkMTJR::MapObjectProfileUnkMTJR() :
MapObjectProfile(MapObjectId_MTJR) {}
MapObjectProfileUnkSTAT_Base(MapObjectId_MTJR, MapObjectId_MTJR) {
mUnk_D4.mUnk_08 = 0x7009;
MapObjectUnkMTJR::MapObjectUnkMTJR() {}
VecFx32_Init(0, 0, 0, &mUnk_D4.mUnk_0C);
mUnk_D4.mUnk_18.x = FLOAT_TO_FX32(0.7f);
mUnk_D4.mUnk_18.y = FLOAT_TO_FX32(2.4f);
void MapObjectUnkMTJR::func_ov063_02160ffc(void) {}
void MapObjectUnkMTJR::func_ov063_02161070(void) {}
void MapObjectUnkMTJR::func_ov063_021611ac(void) {}
void MapObjectUnkMTJR::func_ov063_021611c0(void) {}
void MapObjectUnkMTJR::func_ov063_02161254(void) {}
void MapObjectUnkMTJR::func_ov063_02161288(void) {}
void MapObjectUnkMTJR::func_ov063_02161380(void) {}
mUnk_06 = -1;
UNSET_FLAG2(mUnk_1E, 0x0);
}
MapObjectUnkMTJR::~MapObjectUnkMTJR() {}
MapObjectProfileUnkMTJR::~MapObjectProfileUnkMTJR() {}
MapObjectUnkMTJR::MapObjectUnkMTJR() :
mUnk_40(G3d_GetModelPtr(GET_PROFILE_20_50(MapObjectProfileUnkMTJR))),
mUnk_A0(2),
mUnk_A4(0),
mUnk_A6(0),
mUnk_A8(NULL),
mUnk_AC(-1),
mUnk_B0(0) {}
bool MapObjectUnkMTJR::vfunc_00() {
if (!this->func_ov000_0209d29c(0)) {
return false;
}
mPos.x += FLOAT_TO_FX32(.5f);
mPos.z += FLOAT_TO_FX32(.5f);
mUnk_10 = GET_PROFILE_D4(MapObjectProfileUnkMTJR);
mUnk_AC = 0x86F;
mUnk_B0 = 4;
mUnk_A8.func_ov000_020a0334();
this->func_ov063_02161254(0);
return true;
}
// non-matching
void MapObjectUnkMTJR::vfunc_08() {
if (mUnk_A0 == 0) {
fx32 tmp_x = mPos.x - FLOAT_TO_FX32(1.f) + (fx32) gRandom.Next32(0);
fx32 tmp_y = mPos.y + (fx32) gRandom.Next32(0x1801);
fx32 tmp_z = mPos.z - FLOAT_TO_FX32(1.f) + (fx32) gRandom.Next32(0);
VecFx32 stack_vec = {tmp_x, tmp_y, tmp_z};
data_027e0cec->func_ov000_020a0220(&mUnk_A8, &stack_vec);
}
if (mUnk_A4 < mUnk_A6) {
mUnk_A4++;
}
}
void MapObjectUnkMTJR::vfunc_0C() {
this->vfunc_08();
}
bool MapObjectUnkMTJR::vfunc_1C(ActorRef param1, unk32 param2, VecFx32 *param3) {
switch (param2) {
case 13:
this->func_ov063_02161254(1);
func_ov031_020e0f30(param1);
break;
case 0:
case 1:
case 7:
case 8:
this->func_ov063_02161254(1);
break;
case 3:
case 12:
this->func_ov063_02161254(1);
return false;
break;
case 10:
case 11:
this->func_ov063_02161254(1);
break;
case 2:
case 4:
case 5:
case 6:
case 9:
default:
break;
}
return true;
}
void MapObjectUnkMTJR::func_ov063_02161254(unk32 param1) {
mUnk_A0 = param1;
mUnk_A6 = -1;
mUnk_A4 = 0;
if (param1 != 0 && param1 == 1) {
this->func_ov063_02161288();
}
}
void MapObjectUnkMTJR::func_ov063_02161288(void) {
data_027e09a8->func_ov000_02071b30(0xFC, &mPos, 0);
data_027e09a8->func_ov000_02071eac(&mPos);
VecFx32 vec = mPos;
data_027e0cec->func_ov000_0209feac(0xCC17, &vec, 4, 0, 0);
data_027e0cec->func_ov000_0209feac(0xCC18, &vec, 4, 0, 0);
data_027e0cec->func_ov000_0209feac(0xCC19, &vec, 4, 0, 0);
data_027e0cec->func_ov000_0209feac(0xCC1A, &vec, 4, 0, 0);
this->func_ov000_0209d2c4(1, true);
UNSET_FLAG(mFlags, 0);
}
void MapObjectUnkMTJR::vfunc_14() {
this->func_ov000_0209d518(&mPos, 0xD9A, 0xD9A, 0x1F);
mUnk_40.vfunc_18(&mPos);
}
@@ -42,6 +42,7 @@ MapObject *MapObjectProfileUnkSTAT::Create() {
return new(HeapIndex_ITCM) MapObjectUnkSTAT();
}
// non-matching
MapObjectProfileUnkSTAT::MapObjectProfileUnkSTAT() :
MapObjectProfileUnkSTAT_Base(MapObjectId_STAT, MapObjectId_STAT) {
mUnk_D4.mUnk_08 = 0x7007;
@@ -54,7 +55,7 @@ MapObjectProfileUnkSTAT::MapObjectProfileUnkSTAT() :
}
MapObjectUnkSTAT::MapObjectUnkSTAT() :
mUnk_40(G3d_GetModelPtr(GET_PROFILE(MapObjectProfileUnkSTAT)->mUnk_20.mUnk_50), true),
mUnk_40(G3d_GetModelPtr(GET_PROFILE_20_50(MapObjectProfileUnkSTAT)), true),
mUnk_4C(4),
mUnk_50(-1),
mUnk_54(0x8000),
@@ -67,6 +68,7 @@ MapObjectUnkSTAT::MapObjectUnkSTAT() :
mUnk_10 = GET_PROFILE_D4(MapObjectProfileUnkSTAT);
}
// non-matching
bool MapObjectUnkSTAT::vfunc_00(void) {
unk32 val;
switch (mUnk_20.mParams[0]) {
@@ -121,6 +123,7 @@ void MapObjectUnkSTAT::vfunc_14(void) {
mUnk_40.func_01ffc6d4(mAngleStruct, &vec);
}
// non-matching
void MapObjectUnkSTAT::func_ov063_0215f7ac(void) {
if (!this->func_ov000_0209d29c(0) || this->func_ov000_0209d29c(1)) {
return;