diff --git a/include/f_op/f_op_actor_mng.h b/include/f_op/f_op_actor_mng.h index 54e6af379..89161fae2 100644 --- a/include/f_op/f_op_actor_mng.h +++ b/include/f_op/f_op_actor_mng.h @@ -197,10 +197,6 @@ inline cXyz* fopAcM_GetPosition_p(fopAc_ac_c* pActor) { return &pActor->current.pos; } -inline cXyz& fopAcM_GetPosition(fopAc_ac_c* pActor) { - return pActor->current.pos; -} - inline cXyz* fopAcM_GetOldPosition_p(fopAc_ac_c* pActor) { return &pActor->old.pos; } diff --git a/src/d/actor/d_a_bst.cpp b/src/d/actor/d_a_bst.cpp index 451e8635d..4fb089d0c 100644 --- a/src/d/actor/d_a_bst.cpp +++ b/src/d/actor/d_a_bst.cpp @@ -250,11 +250,11 @@ static void pos_move(bst_class* i_this, unsigned char param_2) { vec.x = 0.0f; vec.y = 0.0f; - vec.z = fopAcM_GetSpeedF(i_this); + vec.z = i_this->speedF; mDoMtx_YrotS(*calc_mtx, i_this->current.angle.y); mDoMtx_XrotM(*calc_mtx, i_this->current.angle.x); - MtxPosition(&vec, &fopAcM_GetSpeed(i_this)); + MtxPosition(&vec, &i_this->speed); i_this->current.pos += i_this->speed; } @@ -2572,7 +2572,7 @@ static cPhs_State daBst_Create(fopAc_ac_c* a_this) { res = dComIfG_resLoad(&i_this->mPhs, "Bst"); if (res == cPhs_COMPLEATE_e) { i_this->mPa_smokeEcallBack.setFollowOff(); - i_this->field_0x02B4 = (u8) fopAcM_GetParam(i_this); + i_this->field_0x02B4 = fopAcM_GetParam(i_this) & 0xFF; if (!fopAcM_entrySolidHeap(i_this, useHeapInit, 0x96000)) { return cPhs_ERROR_e; diff --git a/src/d/actor/d_a_grass.cpp b/src/d/actor/d_a_grass.cpp index 72ee151bb..897f1e6f6 100644 --- a/src/d/actor/d_a_grass.cpp +++ b/src/d/actor/d_a_grass.cpp @@ -138,7 +138,7 @@ static cPhs_State daGrass_Create(fopAc_ac_c* i_ac) { OffsetData * offset = &l_offsetData[grp]; const csXyz * ofpos = offset->pos; u32 kind = daGrass_prm::getKind(i_this); - cXyz & acpos = fopAcM_GetPosition(i_this); + cXyz * acpos = &i_this->current.pos; if (kind == 0) { // grass @@ -149,9 +149,9 @@ static cPhs_State daGrass_Create(fopAc_ac_c* i_ac) { for (s32 i = 0; i < offset->num; ofpos++, i++) { cXyz pos; - pos.x = acpos.x + ofpos->x; - pos.y = acpos.y; - pos.z = acpos.z + ofpos->z; + pos.x = acpos->x + ofpos->x; + pos.y = acpos->y; + pos.z = acpos->z + ofpos->z; dComIfGp_getGrass()->newData(pos, fopAcM_GetRoomNo(i_this), item); } } @@ -160,12 +160,12 @@ static cPhs_State daGrass_Create(fopAc_ac_c* i_ac) { if (dComIfGp_createTree() != NULL) { f32 cosR = cM_scos(i_this->current.angle.y), sinR = cM_ssin(i_this->current.angle.y); cXyz pos; - pos.y = acpos.y; + pos.y = acpos->y; for (s32 i = 0; i < offset->num; ofpos++, i++) { - pos.x = acpos.x + (ofpos->x * cosR + ofpos->z * sinR); - pos.y = acpos.y; - pos.z = acpos.z + (ofpos->z * cosR - ofpos->x * sinR); + pos.x = acpos->x + (ofpos->x * cosR + ofpos->z * sinR); + pos.y = acpos->y; + pos.z = acpos->z + (ofpos->z * cosR - ofpos->x * sinR); dComIfGp_getTree()->newData(pos, 0, fopAcM_GetRoomNo(i_this)); } } @@ -184,9 +184,9 @@ static cPhs_State daGrass_Create(fopAc_ac_c* i_ac) { for (s32 i = 0; i < offset->num; ofpos++, i++) { cXyz pos; - pos.x = acpos.x + ofpos->x; - pos.y = acpos.y; - pos.z = acpos.z + ofpos->z; + pos.x = acpos->x + ofpos->x; + pos.y = acpos->y; + pos.z = acpos->z + ofpos->z; dComIfGp_getFlower()->newData(flowerType, pos, fopAcM_GetRoomNo(i_this), item); } } diff --git a/src/d/actor/d_a_obj_eskban.cpp b/src/d/actor/d_a_obj_eskban.cpp index ad9f44370..3ef8440f8 100644 --- a/src/d/actor/d_a_obj_eskban.cpp +++ b/src/d/actor/d_a_obj_eskban.cpp @@ -277,7 +277,7 @@ BOOL daObjEskban::Act_c::Execute(Mtx** pMtx) { if (hitObj) { fopAc_ac_c* hitAct = hitObj->GetAc(); if (hitAct && fopAcM_GetName(hitAct) == PROC_NPC_MD) { - cXyz dist = fopAcM_GetPosition(hitAct) - fopAcM_GetPosition(this); + cXyz dist = hitAct->current.pos - current.pos; dist.y = 0; if (dist.normalizeRS()) { dist *= 10; diff --git a/src/d/actor/d_a_wall.cpp b/src/d/actor/d_a_wall.cpp index 79dff42cb..e2b25324b 100644 --- a/src/d/actor/d_a_wall.cpp +++ b/src/d/actor/d_a_wall.cpp @@ -244,8 +244,8 @@ void daWall_c::set_tri() { vertex[0] = m_tri_vtx[mType][0]; vertex[1] = m_tri_vtx[mType][1]; vertex[2] = m_tri_vtx[mType][2]; - mDoMtx_stack_c::transS(fopAcM_GetPosition(this)); - mDoMtx_stack_c::YrotM(fopAcM_GetAngle_p(this)->y); + mDoMtx_stack_c::transS(current.pos); + mDoMtx_stack_c::YrotM(current.angle.y); for (int i = 0; i < 3; i++) { mDoMtx_stack_c::multVec(&vertex[i], &vertex[i]);