mirror of
https://github.com/zeldaret/tww.git
synced 2026-07-29 15:33:13 -04:00
minor actor cleanup
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user