Match ActorItemDrop (#82)

* feat: begin decompilation

* feat: improve

* feat: update symbols

* feat: huge improvements on decompiling

* feat: rename files and add function to give item

* feat: improvements

* feat: decompiling stuff

* feat: remove deprecated comment

* feat: other improvements

* feat: use float values for mUnk_50 and mUnk_52

* ActorDroppedItem OK

* fix build issues

* fix regressions

* DroppedItem -> ItemDrop and name actor ids

---------

Co-authored-by: Yanis002 <35189056+Yanis002@users.noreply.github.com>
This commit is contained in:
Alessevan
2026-06-17 14:08:35 -04:00
committed by GitHub
parent 1a098fe4b9
commit dfc8f2748c
497 changed files with 1595 additions and 1028 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ ARM Actor::Actor() {
this->mVel.z = 0;
this->mUnk_2C = 0xCD;
this->mUnk_38 = 0;
this->mUnk_3C = 0;
this->mUnk_3C = NULL;
this->mUnk_40 = 0;
this->mUnk_48 = 4;
this->mUnk_4C = -1;
+2 -2
View File
@@ -97,8 +97,8 @@ ARM void ActorUnkSWOB::func_ov000_0209aa30(void) {
AStack_7c.func_ov000_020975f8();
for (j = 0, i = 0; i < ARRAY_LEN(this->mUnk_A4); i++) {
if (gpActorManager->func_01fff3b4(this->mUnk_A4[i].mUnk_00) == NULL) {
this->mUnk_A4[i].mUnk_00 = 0;
if (gpActorManager->func_01fff3b4(this->mUnk_A4[i].ref) == NULL) {
this->mUnk_A4[i].ref.Reset();
vec.x = INT_TO_FX32(gRandom.Next32(11) - 5);
vec.y = 0;
+1 -1
View File
@@ -254,7 +254,7 @@ ARM void MapObject::func_ov000_0209d54c(void *param1, MapObject *thisx, unk32 pa
}
ARM void MapObject::func_ov000_0209d5c8(ActorRef ref) {
if (ref.index != 0) {
if (ref.type_index != 0) {
Actor *pActor = gpActorManager->func_01fff3b4(ref.Get32());
if (pActor != NULL) {
+21 -30
View File
@@ -60,15 +60,19 @@ ARM ActorProfileHeart::ActorProfileHeart() :
this->mUnk_04.Init(FLOAT_TO_FX32(0.25));
}
ARM void ActorHeart::func_ov031_020eed64(ActorParams *param_2, unk32 param_3, unk32 param_4) {
ARM void ActorHeart::func_ov031_020eed64(ActorRef *pOutRef, const VecFx32 *pPos, u32 params, ActorRef ref) {
ActorParams actorParams;
actorParams.mUnk_28.Reset();
actorParams.func_ov000_020975f8();
actorParams.mInitialPos = param_2->mInitialPos;
actorParams.mUnk_28 = param_4;
actorParams.mUnk_2C = param_3;
actorParams.mInitialPos.x = pPos->x;
actorParams.mInitialPos.y = pPos->y;
actorParams.mInitialPos.z = pPos->z;
actorParams.mUnk_28 = ref;
actorParams.mUnk_2C = params;
this->func_ov000_020973f4(&data_ov000_020b539c_eur, ActorId_Heart, &actorParams, 0);
Actor::func_ov000_020973f4(pOutRef, &data_ov000_020b539c_eur, ActorId_Heart, &actorParams, 0);
}
ARM void ActorHeart::func_ov031_020f0750() {}
@@ -130,7 +134,7 @@ void ActorHeart::vfunc_20() {
this->mUnk_C8.mUnk_10 = stack.mUnk_04; // d8
stack.mUnk_06 = stack.mUnk_04;
this->mUnk_C8.mUnk_12 = stack.mUnk_06; // da
this->mUnk_3C = (unk32) & this->mUnk_98;
this->mUnk_3C = &this->mUnk_98;
CALL_PTMF(PTMF<ActorHeart>, data_ov031_02113d74[this->mUnk_4C]);
@@ -218,7 +222,6 @@ ARM void ActorHeart::func_ov031_020ef1b4(unk16 param_2) {
CALL_PTMF(PTMF<ActorHeart>, data_ov031_02113da4[this->mUnk_4C]);
}
// non-matching (r1 and r2 swapped)
ARM void ActorHeart::func_ov031_020ef208() {
bool var2 = true;
bool var1 = true;
@@ -236,18 +239,12 @@ ARM void ActorHeart::func_ov031_020ef208() {
return;
}
if ((u8) this->mUnk_BE == 0) {
if (this->mUnk_50 < this->mUnk_52) {
this->mUnk_50++;
var2 = false;
} else {
var2 = true;
}
if (var2) {
this->mUnk_BE = 0x01;
this->mUnk_50 = 0x00;
this->mUnk_52 = 0x3C;
if (!this->IsTimerOut()) {
return;
}
this->mUnk_BE = 0x01;
this->mUnk_52 = 0x3C;
this->mUnk_50 = 0x00;
return;
}
@@ -257,15 +254,10 @@ ARM void ActorHeart::func_ov031_020ef208() {
SET_FLAG(this->mFlags, ActorFlag_Visible);
}
if (this->mUnk_50 < this->mUnk_52) {
this->mUnk_50++;
var2 = false;
} else {
var2 = true;
}
if (var2) {
this->func_ov000_020984d0();
if (!this->IsTimerOut()) {
return;
}
this->func_ov000_020984d0();
}
ARM void ActorHeart::func_ov031_020ef2ec() {
@@ -456,15 +448,14 @@ ARM ActorHeart_c4::ActorHeart_c4(Actor *param1) :
this->mUnk_04 = 1;
}
// non-matching
ARM unk32 ActorHeart_c4::vfunc_00(Actor_c4_stack param_2, unk32 param_3) {
ARM bool ActorHeart_c4::vfunc_00(ActorRef ref, unk32 param_3) {
if (param_3 != 0) {
ActorHeart *pHeart = GET_ACTORHEART(this);
pHeart->mUnk_C4 = param_2.param1;
pHeart->mUnk_C4 = ref;
pHeart->func_ov031_020ef1b4(0x04);
}
return this->Actor_c4::vfunc_00(param_2, param_3);
return this->Actor_c4::vfunc_00(ref, param_3);
}
ARM void ActorHeart_c4::vfunc_04() {
+562
View File
@@ -0,0 +1,562 @@
#include "Actor/ActorItemDrop.hpp"
#include "Actor/ActorManager.hpp"
#include "System/SysNew.hpp"
#include "Unknown/UnkStruct_027e09a8.hpp"
#include "Unknown/UnkStruct_027e09b8.hpp"
#include "Unknown/UnkStruct_027e0cd8.hpp"
#include "Unknown/UnkStruct_027e0ce0.hpp"
#include "Unknown/UnkStruct_027e0d34.hpp"
#include "versions.h"
extern "C" void func_01ffedac(u16 *, VecFx32 *);
extern "C" void func_01fff05c(u32 *, UnkStruct_027e0cd8_0c *, VecFx32 *);
extern "C" void func_ov000_0205c1f0(unk32 *, u16);
extern "C" void func_ov000_0205c204(unk32 *, VecFx32 *, unk32, unk32, unk32);
extern "C" void func_ov017_020bf99c();
static const Cylinder data_ov031_02114ba0(0x800);
static const u32 data_ov031_02110bc8[] = {
0x1D, // ItemDropType_Arrow
0x1E, // ItemDropType_Bomb
0x1F, // ItemDropType_RedPotion
0x20, // ItemDropType_DemonFossil
0x21, // ItemDropType_StalfosSkull
0x22, // ItemDropType_StarFragment
0x23, // ItemDropType_BeeLarvae
0x24, // ItemDropType_WoodHeart
0x25, // ItemDropType_PirateNecklace
};
DECL_PROFILE(ActorProfileArrowDrop);
ARM Actor *ActorProfileArrowDrop::Create() {
return new(HeapIndex_2) ActorItemDrop();
}
ARM ActorProfileArrowDrop::ActorProfileArrowDrop() :
ActorProfile(ActorId_ArrowDrop) {
this->mUnk_04.Init(0x400);
}
DECL_PROFILE(ActorProfileBombDrop);
ARM Actor *ActorProfileBombDrop::Create() {
return new(HeapIndex_2) ActorItemDrop();
}
ARM ActorProfileBombDrop::ActorProfileBombDrop() :
ActorProfile(ActorId_BombDrop) {
this->mUnk_04.Init(0x400);
}
DECL_PROFILE(ActorProfileRedPotionDrop);
ARM Actor *ActorProfileRedPotionDrop::Create() {
return new(HeapIndex_2) ActorItemDrop();
}
ARM ActorProfileRedPotionDrop::ActorProfileRedPotionDrop() :
ActorProfile(ActorId_RedPotionDrop) {
this->mUnk_04.Init(0x400);
}
DECL_PROFILE(ActorProfileTreasureDrop);
ARM Actor *ActorProfileTreasureDrop::Create() {
return new(HeapIndex_2) ActorItemDrop();
}
ARM ActorProfileTreasureDrop::ActorProfileTreasureDrop() :
ActorProfile(ActorId_TreasureDrop) {
this->mUnk_04.Init(0x400);
}
ARM void ActorItemDrop::func_ov031_020f9f8c(ActorRef *pOutRef, const VecFx32 *pPos, u32 params, ActorRef ref) {
ActorParams actorParams;
actorParams.mUnk_28.Reset();
actorParams.func_ov000_020975f8();
actorParams.mInitialPos.x = pPos->x;
actorParams.mInitialPos.y = pPos->y;
actorParams.mInitialPos.z = pPos->z;
actorParams.mUnk_28 = ref;
actorParams.mParams[0] = params & 0xFF;
Actor::func_ov000_020973f4(pOutRef, &data_ov000_020b539c_eur, ActorId_TreasureDrop, &actorParams, 0);
}
ARM ActorItemDrop::ActorItemDrop() :
mUnk_AE(0x0),
mUnk_B0(0x6),
mUnk_D8(FLOAT_TO_FX32(0.5f)),
mUnk_DC(0),
mUnk_E0(0),
mUnk_E4(this),
mUnk_108(0x0) {
this->mUnk_10C.x = FLOAT_TO_FX32(0.0f);
this->mUnk_10C.y = FLOAT_TO_FX32(0.0f);
this->mUnk_10C.z = FLOAT_TO_FX32(0.0f);
this->mUnk_118 = false;
this->mUnk_119 = false;
switch (this->GetActorId()) {
case ActorId_ArrowDrop:
if (GET_FLAG(data_027e0ce0->mUnk_2C->mFlags, ItemFlag_Bow)) {
this->mItemTypeId = ItemDropType_Arrow;
this->mUnk_D8 = FLOAT_TO_FX32(0.5f);
} else {
this->mItemTypeId = ItemDropType_Unknown;
}
break;
case ActorId_BombDrop:
if (GET_FLAG(data_027e0ce0->mUnk_2C->mFlags, ItemFlag_Bombs)) {
this->mItemTypeId = ItemDropType_Bomb;
this->mUnk_D8 = FLOAT_TO_FX32(0.3f);
} else {
this->mItemTypeId = ItemDropType_Unknown;
}
break;
case ActorId_RedPotionDrop:
this->mItemTypeId = ItemDropType_RedPotion;
this->mUnk_D8 = FLOAT_TO_FX32(0.4f);
this->mUnk_119 = true;
break;
case ActorId_TreasureDrop:
ItemDropType itemType;
switch (this->mUnk_5C.mParams[0]) {
case 0:
itemType = ItemDropType_DemonFossil;
break;
case 1:
itemType = ItemDropType_StalfosSkull;
break;
case 2:
itemType = ItemDropType_StarFragment;
break;
case 3:
itemType = ItemDropType_BeeLarvae;
break;
case 4:
itemType = ItemDropType_WoodHeart;
break;
case 9:
itemType = ItemDropType_PirateNecklace;
break;
default:
itemType = ItemDropType_Unknown;
break;
}
this->mItemTypeId = itemType;
this->mUnk_D8 = FLOAT_TO_FX32(0.3f);
this->mUnk_119 = true;
break;
default:
this->mItemTypeId = ItemDropType_Unknown;
break;
}
this->mUnk_B8 = 0x13100;
this->mUnk_40 = &this->mUnk_E4;
u16 sp0;
func_01ffedac(&sp0, &this->mPos);
if (data_027e0cd8->mUnk_0C->func_ov000_02080180(&sp0) == 0x5) {
this->mUnk_34 = (Cylinder *) &data_ov031_02114ba0;
}
}
ARM bool ActorItemDrop::vfunc_18(unk32 param1) {
if (this->mItemTypeId >= ItemDropType_Unknown) {
return false;
}
this->mUnk_52 = FLOAT_TO_FX32(0.1173f);
this->mUnk_50 = FLOAT_TO_FX32(0.0f);
this->func_ov031_020fa424(ActorDroppedItemState_0);
return true;
}
ARM void ActorItemDrop::vfunc_20() {
this->func_ov031_020fa260();
}
ARM void ActorItemDrop::vfunc_24() {
if (this->mUnk_4C == ActorDroppedItemState_6) {
this->func_ov031_020fa260();
}
}
static PTMF<ActorItemDrop> data_ov031_02114bb0[ActorDroppedItemState_Max] = {
ActorItemDrop::func_ov031_020fa46c, // ActorDroppedItemState_0
ActorItemDrop::func_ov031_020fa4a0, // ActorDroppedItemState_1
ActorItemDrop::func_ov031_020fa568, // ActorDroppedItemState_2
ActorItemDrop::func_ov031_020fa5f0, // ActorDroppedItemState_3
ActorItemDrop::func_ov031_020fa664, // ActorDroppedItemState_4
ActorItemDrop::func_ov031_020fa678, // ActorDroppedItemState_5
ActorItemDrop::func_ov031_020fa72c, // ActorDroppedItemState_6
};
ARM void ActorItemDrop::func_ov031_020fa260() {
this->mUnk_3C = &this->mUnk_B4;
CALL_PTMF(PTMF<ActorItemDrop>, data_ov031_02114bb0[this->mUnk_4C]);
if (this->IsTimerOut()) {
this->func_ov000_020989e0();
if (this->mUnk_BC & 0x3FFFF) {
switch (this->mUnk_D0) {
case 8:
case 16:
if (this->mUnk_119) {
bool var_r1_3 = false;
if (this->mUnk_C0.type_index == 0x100 && this->mUnk_C0.unk_id == 0) {
var_r1_3 = true;
}
if (var_r1_3 || (this->mUnk_C0.type_index == 0x100 && this->mUnk_C0.unk_id == 1 &&
data_027e0ce0->func_01fff1e0())) {
this->func_ov031_020fa424(ActorDroppedItemState_6);
}
} else if (this->mUnk_C0.type_index & 0x100) {
this->func_ov031_020fa424(ActorDroppedItemState_6);
}
break;
case 12:
this->mUnk_DC = this->mUnk_C0;
this->mUnk_B8 &= ~0x1000;
this->func_ov031_020fa424(ActorDroppedItemState_3);
break;
default:
break;
}
}
}
if (this->mUnk_5C.mUnk_24 < 0 && this->mUnk_4C != ActorDroppedItemState_6) {
this->func_ov031_020fa900();
}
VecFx32_Copy(&this->mPos, &this->mPrevPos);
VecFx32_Add(&this->mPos, &this->mVel, &this->mPos);
if (this->mUnk_4C != ActorDroppedItemState_3) {
this->func_ov000_02098b8c(0x0, 0x0);
}
if (this->mUnk_46 & 3) {
this->mVel.y = FLOAT_TO_FX32(0.0f);
}
VecFx32_Add(&this->mPos, &this->mUnk_10C, &this->mPos);
this->mUnk_10C.x = FLOAT_TO_FX32(0.0f);
this->mUnk_10C.y = FLOAT_TO_FX32(0.0f);
this->mUnk_10C.z = FLOAT_TO_FX32(0.0f);
}
static PTMF<ActorItemDrop> data_ov031_02114be8[ActorDroppedItemState_Max] = {
ActorItemDrop::func_ov031_020fa468, // ActorDroppedItemState_0
ActorItemDrop::func_ov031_020fa494, // ActorDroppedItemState_1
ActorItemDrop::func_ov031_020fa524, // ActorDroppedItemState_2
ActorItemDrop::func_ov031_020fa5d8, // ActorDroppedItemState_3
ActorItemDrop::func_ov031_020fa650, // ActorDroppedItemState_4
ActorItemDrop::func_ov031_020fa668, // ActorDroppedItemState_5
ActorItemDrop::func_ov031_020fa6c8, // ActorDroppedItemState_6
};
ARM void ActorItemDrop::func_ov031_020fa424(ActorState state) {
#if IS_JP
if (this->mUnk_4C == ActorDroppedItemState_6 && state == ActorDroppedItemState_6) {
return;
}
#endif
this->mUnk_4C = state;
this->mUnk_44 = 0x9C;
CALL_PTMF(PTMF<ActorItemDrop>, data_ov031_02114be8[this->mUnk_4C]);
}
ARM void ActorItemDrop::func_ov031_020fa468() {}
ARM void ActorItemDrop::func_ov031_020fa46c() {
func_ov000_02098838();
if (this->mVel.y > FLOAT_TO_FX32(0.0f)) {
return;
}
this->func_ov031_020fa424(ActorDroppedItemState_1);
}
ARM void ActorItemDrop::func_ov031_020fa494() {
this->mUnk_44 = 0x9F;
}
ARM void ActorItemDrop::func_ov031_020fa4a0() {
u32 stack;
func_ov000_02098838();
if (!(this->mUnk_46 & 0x3)) {
return;
}
func_01fff05c(&stack, data_027e0cd8->mUnk_0C, &this->mPos);
if (((stack >> 0x5) & 0x3) == 0x2 && this->mItemTypeId != ItemDropType_Arrow && this->mItemTypeId != ItemDropType_Bomb) {
this->func_ov000_020984d0();
return;
}
this->func_ov031_020fa424(ActorDroppedItemState_2);
}
ARM void ActorItemDrop::func_ov031_020fa524() {
this->mVel.x = FLOAT_TO_FX32(0.0f);
this->mVel.y = FLOAT_TO_FX32(0.0f);
this->mVel.z = FLOAT_TO_FX32(0.0f);
if (!this->mUnk_118 && this->mUnk_52 - this->mUnk_50 > FLOAT_TO_FX32(0.044f)) {
this->mUnk_52 = FLOAT_TO_FX32(0.044f);
this->mUnk_50 = FLOAT_TO_FX32(0.0f);
}
this->mUnk_44 = 0x9F;
}
// non-matching
ARM void ActorItemDrop::func_ov031_020fa568() {
if (this->mUnk_5C.mUnk_24 >= 0) {
return;
}
switch (this->mUnk_108) {
case 0x0:
if (!(this->mUnk_46 & 0x3)) {
this->mUnk_108++;
}
break;
case 0x1:
this->func_ov000_02098838();
if (this->mUnk_46 & 0x3) {
this->mVel.x = FLOAT_TO_FX32(0.0f);
this->mVel.y = FLOAT_TO_FX32(0.0f);
this->mVel.z = FLOAT_TO_FX32(0.0f);
this->mUnk_108 = 0x0;
}
break;
default:
break;
}
}
ARM void ActorItemDrop::func_ov031_020fa5d8() {
func_ov017_020bf99c();
this->mUnk_B4.func_ov000_02097bec();
}
ARM void ActorItemDrop::func_ov031_020fa5f0() {
this->func_ov017_020bf9c8(gpActorManager->func_01fff3b4(this->mUnk_DC));
if (GET_FLAG(this->mFlags, ActorFlag_5)) {
this->mVel.x = FLOAT_TO_FX32(0.0f);
this->mVel.y = FLOAT_TO_FX32(0.0f);
this->mVel.z = FLOAT_TO_FX32(0.0f);
this->mUnk_B8 |= 0x1000;
this->func_ov031_020fa424(ActorDroppedItemState_1);
}
}
ARM void ActorItemDrop::func_ov031_020fa650() {
this->mVel.x = FLOAT_TO_FX32(0.0f);
this->mVel.y = FLOAT_TO_FX32(0.0f);
this->mVel.z = FLOAT_TO_FX32(0.0f);
}
ARM void ActorItemDrop::func_ov031_020fa664() {}
ARM void ActorItemDrop::func_ov031_020fa668() {
this->mVel.x = FLOAT_TO_FX32(0.0f);
this->mVel.z = FLOAT_TO_FX32(0.0f);
}
class UnkActor_ov031_020fa678 : public Actor {
public:
/* 000 (base) */
/* 94 */ STRUCT_PAD(0x94, 0xE8);
/* E8 */ VecFx32 mUnk_E8;
};
ARM void ActorItemDrop::func_ov031_020fa678() {
UnkActor_ov031_020fa678 *actor = (UnkActor_ov031_020fa678 *) gpActorManager->func_01fff3b4(this->mUnk_E0);
if (actor == NULL) {
this->func_ov031_020fa424(ActorDroppedItemState_1);
return;
}
VecFx32_Copy(&actor->mUnk_E8, &this->mPos);
}
ARM void ActorItemDrop::func_ov031_020fa6c8() {
this->mUnk_52 = FLOAT_TO_FX32(15.9998f);
this->mUnk_50 = FLOAT_TO_FX32(0.0f);
this->mVel.x = FLOAT_TO_FX32(0.0f);
this->mVel.y = FLOAT_TO_FX32(0.0f);
this->mVel.z = FLOAT_TO_FX32(0.0f);
this->mUnk_4A = 0x0;
this->mUnk_44 = 0x0;
this->mUnk_B4.func_ov000_02097bec();
UNSET_FLAG(this->mFlags, ActorFlag_Visible);
data_027e09a8->func_ov000_02071b30(0x77, &this->mPos, 0x0);
}
ARM void ActorItemDrop::func_ov031_020fa72c() {
this->mUnk_3C = NULL;
if (data_027e09b8->func_01ffd420()) {
return;
}
bool executeFunction = true;
switch (this->mItemTypeId) {
case ItemDropType_Arrow:
data_027e0ce0->mUnk_2C->GiveArrows(5);
break;
case ItemDropType_Bomb:
data_027e0ce0->mUnk_2C->GiveBombs(3);
break;
case ItemDropType_RedPotion:
executeFunction = data_027e0d34->TryItemGive(ItemId_RedPotion);
break;
case ItemDropType_DemonFossil:
executeFunction = data_027e0d34->TryItemGive(ItemId_DemonFossil);
break;
case ItemDropType_StalfosSkull:
executeFunction = data_027e0d34->TryItemGive(ItemId_StalfosSkull);
break;
case ItemDropType_StarFragment:
executeFunction = data_027e0d34->TryItemGive(ItemId_StarFragment);
break;
case ItemDropType_BeeLarvae:
executeFunction = data_027e0d34->TryItemGive(ItemId_BeeLarvae);
break;
case ItemDropType_WoodHeart:
executeFunction = data_027e0d34->TryItemGive(ItemId_WoodHeart);
break;
case ItemDropType_PirateNecklace:
executeFunction = data_027e0d34->TryItemGive(ItemId_PirateNecklace);
break;
default:
executeFunction = true;
break;
}
if (executeFunction) {
this->func_ov000_020984d0();
}
}
ARM void ActorItemDrop::vfunc_2c(unk32 param1) {
VecFx32 vec1;
VecFx32 vec2;
unk32 value;
if (!this->func_01fff5d0(param1, 0x0)) {
return;
}
vec1 = this->mPos;
vec1.y += FLOAT_TO_FX32(0.03113);
this->func_ov017_020bf5c4(&vec1, 0x400, 0x400, 0x1F, 0x0);
func_ov000_0205c1f0(&value, data_ov031_02110bc8[this->mItemTypeId]);
vec2 = this->mPos;
vec2.y += this->mUnk_D8;
func_ov000_0205c204(&value, &vec2, 0x1000, 0x1000, 0x1F);
}
ARM void ActorItemDrop::func_ov031_020fa900() {
bool var_r2 = true;
bool var_r3 = true;
bool var_ip = true;
if (this->mUnk_4C != ActorDroppedItemState_3 && this->mUnk_4C != ActorDroppedItemState_4) {
var_ip = false;
}
if (!var_ip && this->mUnk_4C != ActorDroppedItemState_5) {
var_r3 = false;
}
if (!var_r3 && this->mUnk_4C != ActorDroppedItemState_6) {
var_r2 = false;
}
if (var_r2) {
SET_FLAG(this->mFlags, ActorFlag_Visible);
} else if (!this->mUnk_118) {
if (this->Actor::IsTimerOut()) {
this->mUnk_118 = true;
this->mUnk_52 = 60;
this->mUnk_50 = 0;
}
} else {
if ((this->mUnk_50 % 8) < 4) {
UNSET_FLAG(this->mFlags, ActorFlag_Visible);
} else {
SET_FLAG(this->mFlags, ActorFlag_Visible);
}
if (this->Actor::IsTimerOut()) {
this->func_ov000_020984d0();
}
}
}
ARM ActorDroppedItem_c4::ActorDroppedItem_c4(Actor *param_1) :
Actor_c4(param_1) {
this->mUnk_20 = param_1;
this->mUnk_04 = 0x1;
}
#define GET_ACTOR_DROPPED_ITEM(pActor) ((ActorItemDrop *) (pActor))
ARM bool ActorDroppedItem_c4::vfunc_00(ActorRef ref, unk32 param_2) {
if (param_2 != 0) {
ActorItemDrop *actorDroppedItem = GET_ACTOR_DROPPED_ITEM(this->mUnk_20);
actorDroppedItem->mUnk_E0 = ref;
actorDroppedItem->func_ov031_020fa424(ActorDroppedItemState_4);
}
return Actor_c4::vfunc_00(ref, param_2);
}
ARM void ActorDroppedItem_c4::vfunc_04() {
GET_ACTOR_DROPPED_ITEM(this->mUnk_20)->func_ov031_020fa424(ActorDroppedItemState_5);
Actor_c4::vfunc_04();
}
ARM void ActorDroppedItem_c4::vfunc_0c(unk32 param_1) {
GET_ACTOR_DROPPED_ITEM(this->mUnk_20)->func_ov031_020fa424(ActorDroppedItemState_1);
Actor_c4::vfunc_0c(param_1);
}
ARM void ActorDroppedItem_c4::vfunc_08() {
GET_ACTOR_DROPPED_ITEM(this->mUnk_20)->func_ov031_020fa424(ActorDroppedItemState_6);
Actor_c4::vfunc_08();
}
ARM ActorItemDrop::~ActorItemDrop() {}
+17 -26
View File
@@ -32,29 +32,21 @@ ARM ActorProfileRupee::ActorProfileRupee() :
this->mUnk_04.size = 0x556;
}
struct stack_struct {
VecFx32 sp4; // 4 8 c
unk32 pad1;
unk16 sp14;
u8 pad2[0x16];
unk32 sp2C;
unk32 sp30;
ARM void ActorRupee::func_ov031_020e8d2c(ActorRef *pOutRef, const VecFx32 *pPos, u32 params, u32 unk_2C, ActorRef ref) {
ActorParams actorParams;
void func_ov000_020975f8();
};
actorParams.mUnk_28.Reset();
actorParams.func_ov000_020975f8();
// non-matching
ARM void ActorRupee::func_ov031_020e8d2c(VecFx32 *param1, u8 param2, unk32 param3, unk32 param4) {
stack_struct stack;
stack.sp2C = 0;
stack.func_ov000_020975f8();
stack.sp14 = param2 & 0xFF;
stack.sp4.x = param1->x;
stack.sp4.y = param1->y;
stack.sp4.z = param1->z;
stack.sp2C = param4;
stack.sp30 = param3;
this->func_ov000_020973f4(&data_ov000_020b539c_eur, ActorId_Rupee, (ActorParams *) &stack, 0);
actorParams.mInitialPos.x = pPos->x;
actorParams.mInitialPos.y = pPos->y;
actorParams.mInitialPos.z = pPos->z;
actorParams.mParams[0] = params & 0xFF;
actorParams.mUnk_28 = ref;
actorParams.mUnk_2C = unk_2C;
Actor::func_ov000_020973f4(pOutRef, &data_ov000_020b539c_eur, ActorId_Rupee, &actorParams, 0);
}
ARM ActorRupee::ActorRupee() :
@@ -622,7 +614,7 @@ ARM void ActorRupee::vfunc_20() {
uVar3 = uStack_18;
if ((u16) this->mUnk_9A <= (u16) this->mUnk_98) {
this->mUnk_3C = (unk32) & this->mUnk_9C;
this->mUnk_3C = &this->mUnk_9C;
uStack_18 = uVar2;
this->func_ov000_020989e0();
uVar3 = uStack_18;
@@ -865,15 +857,14 @@ ARM ActorRupee_c4::ActorRupee_c4(Actor *param1) :
this->mUnk_04 = 1;
}
// non-matching
ARM unk32 ActorRupee_c4::vfunc_00(Actor_c4_stack param1, unk32 param2) {
ARM bool ActorRupee_c4::vfunc_00(ActorRef ref, unk32 param2) {
if (param2 != 0) {
ActorRupee *pRupee = GET_ACTOR_RUPEE(this->mUnk_20);
pRupee->mUnk_C0 = param1.param1;
pRupee->mUnk_C0 = ref.Get32();
pRupee->func_ov031_020e9904(7);
}
return this->Actor_c4::vfunc_00(param1, param2);
return this->Actor_c4::vfunc_00(ref, param2);
}
ARM void ActorRupee_c4::vfunc_04() {
@@ -1,61 +0,0 @@
//! TODO: This file was generated automatically and might contain errors
#include "Actor/ActorUnkSPAR_SPBM_SPDR_SPTR.hpp"
#include "System/SysNew.hpp"
// --- Actor SPAR ---
ARM DECL_PROFILE(ActorProfileUnkSPAR);
ARM Actor *ActorProfileUnkSPAR::Create() {
return new(HeapIndex_2) ActorUnkSPAR();
}
ARM ActorProfileUnkSPAR::ActorProfileUnkSPAR() :
ActorProfile(ActorId_SPAR) {}
ARM ActorUnkSPAR::ActorUnkSPAR() {}
// --- Actor SPBM ---
ARM DECL_PROFILE(ActorProfileUnkSPBM);
ARM Actor *ActorProfileUnkSPBM::Create() {
return new(HeapIndex_2) ActorUnkSPBM();
}
ARM ActorProfileUnkSPBM::ActorProfileUnkSPBM() :
ActorProfile(ActorId_SPBM) {}
ARM ActorUnkSPBM::ActorUnkSPBM() {}
// --- Actor SPDR ---
ARM DECL_PROFILE(ActorProfileUnkSPDR);
ARM Actor *ActorProfileUnkSPDR::Create() {
return new(HeapIndex_2) ActorUnkSPDR();
}
ARM ActorProfileUnkSPDR::ActorProfileUnkSPDR() :
ActorProfile(ActorId_SPDR) {}
ARM ActorUnkSPDR::ActorUnkSPDR() {}
// --- Actor SPTR ---
ARM DECL_PROFILE(ActorProfileUnkSPTR);
ARM Actor *ActorProfileUnkSPTR::Create() {
return new(HeapIndex_2) ActorUnkSPTR();
}
ARM ActorProfileUnkSPTR::ActorProfileUnkSPTR() :
ActorProfile(ActorId_SPTR) {}
ARM ActorUnkSPTR::ActorUnkSPTR() {}
ARM ActorProfileUnkSPAR::~ActorProfileUnkSPAR() {}
ARM ActorProfileUnkSPBM::~ActorProfileUnkSPBM() {}
ARM ActorProfileUnkSPDR::~ActorProfileUnkSPDR() {}
ARM ActorProfileUnkSPTR::~ActorProfileUnkSPTR() {}
@@ -22,7 +22,7 @@ ARM PlayerSceneChange::PlayerSceneChange() {
this->mUnk_80.coords = this->mUnk_34->coords;
this->mUnk_8C = 0;
this->mUnk_90 = 0;
this->mUnk_90.Reset();
*((u32 *) this->mUnk_94) = 0;
this->mUnk_98 = -1;
this->mUnk_9C.x = 0;
@@ -47,12 +47,11 @@ ARM PlayerSceneChange::~PlayerSceneChange() {
}
ARM s16 PlayerSceneChange::func_ov112_02184bbc(s16 param1) {
// fake match?
if ((u32) (*(u16 *) &this->mUnk_90 << 0x10) >> 0x1E == 1) {
Actor *iVar1 = gpActorManager->func_01fff3b4(this->mUnk_90);
if (this->mUnk_90.type == ActorRefType_1) {
Actor *pActor = gpActorManager->func_01fff3b4(this->mUnk_90);
if (iVar1 != NULL) {
return iVar1->mAngle;
if (pActor != NULL) {
return pActor->mAngle;
}
} else if (this->mUnk_94[0] == 0x1000) {
return this->mUnk_AE;