minor actor cleanup

This commit is contained in:
LagoLunatic
2024-01-23 04:25:43 -05:00
parent 4ca50bb60f
commit 2db5435315
7 changed files with 20 additions and 23 deletions
+1 -1
View File
@@ -7,7 +7,7 @@
class disappear_class : public fopAc_ac_c {
public:
/* 0x290 */ request_of_phase_process_class mPhase; // Unused
/* 0x298 */ s32 mSwitchNo;
/* 0x298 */ s32 mItemBitNo;
/* 0x29C */ s16 mTimer;
};
+1 -3
View File
@@ -23,11 +23,9 @@ namespace daObjOjtree {
BOOL Draw();
public:
/* Place member variables here */
/* 0x2C8 */ request_of_phase_process_class mPhs;
/* 0x2D0 */ J3DModel* mpModel;
/* 0x2D4 */ u8 field_0x2d4;
/* 0x2D5 */ u8 field_0x2d5[0x2d7 - 0x2d5];
/* 0x2D4 */ u8 mLockTimer;
};
};
+4 -4
View File
@@ -69,10 +69,10 @@ public:
void draw();
~daSea_packet_c() {}
f32 getMinX() {}
f32 getMinZ() {}
f32 getMaxX() {}
f32 getMaxZ() {}
f32 getMinX() { return mDrawMinX; }
f32 getMinZ() { return mDrawMinZ; }
f32 getMaxX() { return mDrawMaxX; }
f32 getMaxZ() { return mDrawMaxZ; }
GXTexObj* getSea0TexObj() { return &mTexSea0; }
GXTexObj* getSea1TexObj() { return &mTexSea1; }
GXTexObj* getYuraTexObj() { return &mTexYura; }
+1 -1
View File
@@ -540,7 +540,7 @@ BOOL stealItem_CB(void* actor);
fopAc_ac_c* fopAcM_myRoomSearchEnemy(s8 roomNo);
s32 fopAcM_createDisappear(fopAc_ac_c* i_actor, cXyz* p_pos, u8 i_scale, u8 i_health = 0, u8 i_switchNo = -1);
s32 fopAcM_createDisappear(fopAc_ac_c* i_actor, cXyz* p_pos, u8 i_scale, u8 i_health = 0, u8 i_itemBitNo = -1);
void fopAcM_setCarryNow(fopAc_ac_c* i_this, BOOL stageLayer);
void fopAcM_cancelCarryNow(fopAc_ac_c* i_this);
s32 fopAcM_otoCheck(fopAc_ac_c*, f32);
+7 -8
View File
@@ -42,7 +42,7 @@ static BOOL daDisappear_Execute(disappear_class* i_this) {
}
}
else {
fopAcM_createIball(&i_this->current.pos, i_this->mItemTableIdx, i_this->current.roomNo, &i_this->current.angle, i_this->mSwitchNo);
fopAcM_createIball(&i_this->current.pos, i_this->mItemTableIdx, i_this->current.roomNo, &i_this->current.angle, i_this->mItemBitNo);
}
}
}
@@ -102,17 +102,16 @@ static s32 daDisappear_Create(fopAc_ac_c* i_this) {
fopAcM_SetupActor(dis, disappear_class);
u32 params = dis->mBase.mParameters;
dis->mHealth = fopAcM_GetParam(dis) & 0xFF;
f32 scale = ((fopAcM_GetParam(dis) >> 8) & 0xFF) * 0.1f;
dis->mHealth = dis->mBase.mParameters & 0xFF;
float scale = ((dis->mBase.mParameters >> 8) & 0xFF) * 0.1f;
dis->mSwitchNo = (dis->mBase.mParameters >> 0x10) & 0xFF;
if (dis->mSwitchNo == 0xFF) {
dis->mSwitchNo = -1;
dis->mItemBitNo = (fopAcM_GetParam(dis) >> 0x10) & 0xFF;
if (dis->mItemBitNo == 0xFF) {
dis->mItemBitNo = -1;
}
set_disappear(dis, scale);
return cPhs_COMPLEATE_e;
}
+4 -4
View File
@@ -40,7 +40,7 @@ int daObjOjtree::Act_c::Create() {
pos.set(current.pos);
pos.y += 5000.0f;
fopAcM_create(PROC_JBO, 0, &pos, home.roomNo, &shape_angle, NULL, 0xff, NULL);
field_0x2d4 = 2;
mLockTimer = 2;
return TRUE;
}
@@ -73,7 +73,7 @@ s32 daObjOjtree::Act_c::Mthd_Delete() {
void daObjOjtree::Act_c::set_mtx() {
mDoMtx_stack_c::transS(current.pos);
mDoMtx_stack_c::ZXYrotM(shape_angle);
cMtx_copy(mDoMtx_stack_c::get(), mpModel->mBaseTransformMtx);
mpModel->setBaseTRMtx(mDoMtx_stack_c::get());
cMtx_copy(mDoMtx_stack_c::get(), M_tmp_mtx);
}
@@ -85,9 +85,9 @@ void daObjOjtree::Act_c::init_mtx() {
/* 000003F4-0000045C .text Execute__Q211daObjOjtree5Act_cFPPA3_A4_f */
int daObjOjtree::Act_c::Execute(Mtx** pMtx) {
if(field_0x2d4 != 0)
if(mLockTimer != 0)
{
if (--field_0x2d4 == 0)
if (--mLockTimer == 0)
{
mpBgW->SetLock();
}
+2 -2
View File
@@ -1274,8 +1274,8 @@ fopAc_ac_c* fopAcM_myRoomSearchEnemy(s8 roomNo) {
}
/* 80027A9C-80027B24 .text fopAcM_createDisappear__FP10fopAc_ac_cP4cXyzUcUcUc */
s32 fopAcM_createDisappear(fopAc_ac_c* i_actor, cXyz* p_pos, u8 i_scale, u8 i_health, u8 i_switchNo) {
u32 params = (i_switchNo & 0xFF) << 0x10 | (i_scale & 0xFF) << 0x08 | i_health & 0xFF;
s32 fopAcM_createDisappear(fopAc_ac_c* i_actor, cXyz* p_pos, u8 i_scale, u8 i_health, u8 i_itemBitNo) {
u32 params = (i_itemBitNo & 0xFF) << 0x10 | (i_scale & 0xFF) << 0x08 | i_health & 0xFF;
fopAc_ac_c* disappear = (fopAc_ac_c*)fopAcM_fastCreate(PROC_DISAPPEAR, params, p_pos, fopAcM_GetRoomNo(i_actor), &i_actor->current.angle);
if (disappear) {
disappear->mItemTableIdx = i_actor->mItemTableIdx;