Add some more inlines

This commit is contained in:
LagoLunatic
2026-09-25 14:03:54 -04:00
parent 624ab5f13c
commit 96bbf3e97e
15 changed files with 92 additions and 71 deletions
+1 -1
View File
@@ -5,7 +5,7 @@
struct andsw0_class {
/* 0x000 */ fopAc_ac_c actor;
/* 0x290 */ u32 _pad[2];
/* 0x290 */ request_of_phase_process_class mPhase; // Unused
/* 0x298 */ s8 mAction;
/* 0x299 */ u8 mNumSwitchesToCheck;
/* 0x29A */ u8 mBehaviorType;
+1 -1
View File
@@ -6,7 +6,7 @@
struct bossitem_class {
/* 0x000 */ fopAc_ac_c actor;
/* 0x290 */ u8 m290[0x298 - 0x290];
/* 0x290 */ request_of_phase_process_class mPhase; // Unused
}; // Size: 0x298
namespace daBossItem_prm {
+1 -1
View File
@@ -7,7 +7,7 @@
class esa_class : public fopAc_ac_c {
public:
/* 0x290 */ u8 field_0x290[0x298 - 0x290];
/* 0x290 */ request_of_phase_process_class mPhase; // Unused
/* 0x298 */ u8 field_0x298;
/* 0x29C */ f32 mGroundHeight;
/* 0x2A0 */ s8 mActionState;
+1 -1
View File
@@ -10,7 +10,7 @@ public:
inline BOOL execute();
public:
/* 0x290 */ u8 m290[0x298 - 0x290];
/* 0x290 */ request_of_phase_process_class mPhase; // Unused
};
#endif /* D_A_SEATAG_H */
+8 -8
View File
@@ -1,7 +1,7 @@
#ifndef D_A_TAG_KB_ITEM_H
#define D_A_TAG_KB_ITEM_H
#include "f_op/f_op_actor_mng.h"
#include "f_op/f_op_actor.h"
class daTagKbItem_c : public fopAc_ac_c {
public:
@@ -15,13 +15,13 @@ public:
bool _execute();
bool _draw();
/* 0x290 */ u8 field_0x290[0x298 - 0x290];
/* 0x298 */ u8 field_0x298;
/* 0x299 */ u8 field_0x299;
/* 0x29C */ s32 field_0x29c;
/* 0x2A0 */ u8 field_0x2a0;
/* 0x2A1 */ u8 field_0x2a1;
/* 0x2A4 */ s32 field_0x2a4;
/* 0x290 */ request_of_phase_process_class mPhase; // Unused
/* 0x298 */ bool field_0x298;
/* 0x299 */ bool field_0x299;
/* 0x29C */ int mItemBitNo;
/* 0x2A0 */ u8 mItemNo;
/* 0x2A1 */ u8 mEnemyKind;
/* 0x2A4 */ int mSwBitNo;
/* 0x2A8 */ fopAc_ac_c* mpActor;
}; // Size: 0x2AC
+3 -3
View File
@@ -34,12 +34,12 @@ public:
u8 getPrmTagNo();
enum Prm_e {
PRM_TAG_NO_W = 8,
PRM_TAG_NO_W = 0x08,
PRM_TAG_NO_S = 0x00,
};
public:
/* Place member variables here */
/* 0x290 */ request_of_phase_process_class mPhs;
/* 0x290 */ request_of_phase_process_class mPhase;
/* 0x298 */ fpc_ProcID mMsgID;
/* 0x29C */ msg_class* mpCurrMsg;
/* 0x2A0 */ u32 mMsgNo;
+1 -2
View File
@@ -7,7 +7,6 @@ class JPABaseEmitter;
class JPABaseParticle;
class daTpota_c : public fopAc_ac_c {
struct unknown_struct {
JPABaseParticle* ptcl;
f32 pos_y;
@@ -24,7 +23,7 @@ public:
bool _draw();
public:
/* 0x290 */ u8 field_0x290[0x298 - 0x290];
/* 0x290 */ request_of_phase_process_class mPhase; // Unused
/* 0x298 */ JPABaseEmitter* mpEmitters[2];
/* 0x2A0 */ cXyz mPositions[2];
/* 0x2B8 */ csXyz mAngles[2];
+4 -1
View File
@@ -312,12 +312,15 @@ static BOOL daAndsw0_IsDelete(andsw0_class*) {
}
/* 0000096C-00000974 .text daAndsw0_Delete__FP12andsw0_class */
static BOOL daAndsw0_Delete(andsw0_class*) {
static BOOL daAndsw0_Delete(andsw0_class*i_this) {
fopAcM_RegisterDeleteID(i_this);
return TRUE;
}
/* 00000974-00000A64 .text daAndsw0_Create__FP10fopAc_ac_c */
static cPhs_State daAndsw0_Create(fopAc_ac_c* ac) {
fopAcM_RegisterCreateID(ac);
fopAc_ac_c* player = dComIfGp_getPlayer(0);
fopAcM_ct(ac, andsw0_class);
+2
View File
@@ -17,11 +17,13 @@ static BOOL daBossItem_IsDelete(bossitem_class* i_this) {
/* 00000080-00000088 .text daBossItem_Delete__FP14bossitem_class */
static BOOL daBossItem_Delete(bossitem_class* i_this) {
fopAcM_RegisterDeleteID(i_this);
return TRUE;
}
/* 00000088-00000128 .text daBossItem_Create__FP10fopAc_ac_c */
static cPhs_State daBossItem_Create(fopAc_ac_c* i_this) {
fopAcM_RegisterCreateID(i_this);
bossitem_class* a_this = (bossitem_class*)i_this;
fopAcM_ct(i_this, bossitem_class);
+1 -1
View File
@@ -83,7 +83,7 @@ void bg_check(esa_class* i_this) {
}
}
else {
fopAcM_OffStatus(i_this, fopAcStts_UNK4000_e);
cLib_offBit<u32>(i_this->actor_status, fopAcStts_UNK4000_e);
}
}
+23 -9
View File
@@ -4,31 +4,45 @@
#include "d/actor/d_a_seatag.h"
#include "f_op/f_op_actor_mng.h"
/* 00000078-00000080 .text daSeatag_Draw__FP10daSeatag_c */
static BOOL daSeatag_Draw(daSeatag_c*) {
inline BOOL daSeatag_c::draw() {
return TRUE;
}
/* 00000080-00000088 .text daSeatag_Execute__FP10daSeatag_c */
static BOOL daSeatag_Execute(daSeatag_c*) {
inline BOOL daSeatag_c::execute() {
return TRUE;
}
inline cPhs_State daSeatag_c::create() {
fopAcM_ct(this, daSeatag_c);
return cPhs_COMPLEATE_e;
}
/* 00000078-00000080 .text daSeatag_Draw__FP10daSeatag_c */
static BOOL daSeatag_Draw(daSeatag_c* i_this) {
return ((daSeatag_c*)i_this)->draw();
}
/* 00000080-00000088 .text daSeatag_Execute__FP10daSeatag_c */
static BOOL daSeatag_Execute(daSeatag_c* i_this) {
return ((daSeatag_c*)i_this)->execute();
}
/* 00000088-00000090 .text daSeatag_IsDelete__FP10daSeatag_c */
static BOOL daSeatag_IsDelete(daSeatag_c*) {
return TRUE;
}
/* 00000090-000000C0 .text daSeatag_Delete__FP10daSeatag_c */
static BOOL daSeatag_Delete(daSeatag_c* a_this) {
a_this->~daSeatag_c();
static BOOL daSeatag_Delete(daSeatag_c* i_this) {
fopAcM_RegisterDeleteID(i_this);
i_this->~daSeatag_c();
return TRUE;
}
/* 000000C0-00000110 .text daSeatag_Create__FP10fopAc_ac_c */
static cPhs_State daSeatag_Create(fopAc_ac_c* a_this) {
fopAcM_ct(a_this, daSeatag_c);
return cPhs_COMPLEATE_e;
static cPhs_State daSeatag_Create(fopAc_ac_c* i_this) {
fopAcM_RegisterCreateID(i_this);
return ((daSeatag_c*)i_this)->create();
}
static actor_method_class l_daSeatag_Method = {
+18 -13
View File
@@ -5,13 +5,19 @@
#include "d/dolzel_rel.h" // IWYU pragma: keep
#include "d/actor/d_a_tag_kb_item.h"
#include "d/d_com_inf_game.h"
namespace daTagKbItem_prm {
inline u32 getItemNo(daTagKbItem_c* i_this) { return fopAcM_GetParam(i_this) & 0xFF; }
inline s8 getItemBitNo(daTagKbItem_c* i_this) { return (fopAcM_GetParam(i_this) >> 8) & 0xFF; }
inline s8 getEnemyKind(daTagKbItem_c* i_this) { return (fopAcM_GetParam(i_this) >> 16) & 0xFF; }
inline u32 getSwBitNo(daTagKbItem_c* i_this) { return (fopAcM_GetParam(i_this) >> 24) & 0xFF; }
};
/* 00000078-000000C8 .text _delete__13daTagKbItem_cFv */
bool daTagKbItem_c::_delete() {
#if VERSION > VERSION_JPN
if (field_0x2a0 != 0xff && field_0x2a4 != 0xff) {
dComIfGs_offSwitch(field_0x2a4, home.roomNo);
if (mItemNo != dItemNo_NONE_e && mSwBitNo != 0xff) {
fopAcM_offSwitch(this, mSwBitNo);
}
#endif
return true;
@@ -19,12 +25,11 @@ bool daTagKbItem_c::_delete() {
/* 000000C8-0000010C .text CreateInit__13daTagKbItem_cFv */
void daTagKbItem_c::CreateInit() {
field_0x2a0 = fopAcM_GetParam(this);
s8 paramBit = fopAcM_GetParamBit(fopAcM_GetParam(this), 8, 8);
field_0x29c = paramBit;
field_0x2a1 = fopAcM_GetParamBit(fopAcM_GetParam(this), 0x10, 8);
field_0x2a4 = fopAcM_GetParamBit(fopAcM_GetParam(this), 0x18, 8);
field_0x298 = 0;
mItemNo = daTagKbItem_prm::getItemNo(this);
mItemBitNo = daTagKbItem_prm::getItemBitNo(this);
mEnemyKind = daTagKbItem_prm::getEnemyKind(this);
mSwBitNo = daTagKbItem_prm::getSwBitNo(this);
field_0x298 = false;
field_0x299 = 0;
mpActor = NULL;
}
@@ -34,8 +39,8 @@ cPhs_State daTagKbItem_c::_create() {
fopAcM_ct(this, daTagKbItem_c);
CreateInit();
if ((field_0x29c != 0x1f && dComIfGs_isItem(field_0x29c, fopAcM_GetHomeRoomNo(this))) ||
(field_0x2a4 != 0xff && dComIfGs_isSwitch(field_0x2a4, fopAcM_GetHomeRoomNo(this))))
if ((mItemBitNo != 0x1f && fopAcM_isItem(this, mItemBitNo)) ||
(mSwBitNo != 0xff && fopAcM_isSwitch(this, mSwBitNo)))
{
return cPhs_ERROR_e;
}
@@ -45,8 +50,8 @@ cPhs_State daTagKbItem_c::_create() {
/* 000001BC-000001C4 .text _execute__13daTagKbItem_cFv */
bool daTagKbItem_c::_execute() {
#if VERSION <= VERSION_JPN
if ((field_0x29c != 0x1f && dComIfGs_isItem(field_0x29c, fopAcM_GetHomeRoomNo(this))) ||
(field_0x2a4 != 0xff && dComIfGs_isSwitch(field_0x2a4, fopAcM_GetHomeRoomNo(this))))
if ((mItemBitNo != 0x1f && fopAcM_isItem(this, mItemBitNo)) ||
(mSwBitNo != 0xff && fopAcM_isSwitch(this, mSwBitNo)))
{
fopAcM_delete(this);
}
+1 -1
View File
@@ -112,7 +112,7 @@ cPhs_State daTagPhoto_c::_create() {
NULL
};
return dComLbG_PhaseHandler(&mPhs, l_method, this);
return dComLbG_PhaseHandler(&mPhase, l_method, this);
}
/* 000001C8-000001D0 .text createHeap__12daTagPhoto_cFv */
+9 -12
View File
@@ -78,18 +78,18 @@ void daTpota_c::clear_splash() {
/* 00000380-000003F4 .text renew_splash__9daTpota_cFv */
void daTpota_c::renew_splash() {
if (mpEmitters[1] != NULL) {
JSUPtrList* list = mpEmitters[1]->getParticleList();
unknown_struct *unknown_struct = field_0x2C4;
JSUList<JPABaseParticle>* list = mpEmitters[1]->getParticleList();
unknown_struct* unknown_struct = field_0x2C4;
if(list != NULL){
clear_splash();
for (JSUPtrLink* link = list->getFirstLink(); link != NULL && (link != NULL); link = link->getNext()){
JPABaseParticle* particle = (JPABaseParticle*)link->getObjectPtr();
for (JSULink<JPABaseParticle>* link = list->getFirst(); link != NULL && link != list->getEnd(); link = link->getNext()) {
JPABaseParticle* const particle = link->getObject();
JGeometry::TVec3<f32> position;
particle->getGlobalPosition(position);
unknown_struct->ptcl = particle;
unknown_struct->pos_y = position.y;
unknown_struct++;
}
}
}
}
}
@@ -97,18 +97,15 @@ void daTpota_c::renew_splash() {
/* 000003F4-000004C8 .text _execute__9daTpota_cFv */
bool daTpota_c::_execute() {
if (mpEmitters[1] != NULL){
JSUPtrList* list = mpEmitters[1]->getParticleList();
JSUList<JPABaseParticle>* list = mpEmitters[1]->getParticleList();
if(list != NULL){
for (JSUPtrLink* link = list->getFirstLink(); link != NULL && (link != NULL);
link = link->getNext()){
JPABaseParticle* particle = (JPABaseParticle *)link->getObjectPtr();
for (JSULink<JPABaseParticle>* link = list->getFirst(); link != NULL && link != list->getEnd(); link = link->getNext()) {
JPABaseParticle* const particle = link->getObject();
JGeometry::TVec3<f32> position;
particle->getGlobalPosition(position);
if(check_water_h(particle, position.y)){
cXyz local_48;
local_48.x = position.x;
local_48.y = -230.0;
local_48.z = position.z;
local_48.set(position.x, -230.0f, position.z);
make_ripple(local_48);
}
}
+18 -17
View File
@@ -379,23 +379,23 @@ const s16 daWindMill_c::m_max_rot_speed[] = {
const u8 daNpc_Kg1_c::m_highscore = 20;
/* 80056AD0-80056AFC .text kb_dig__13daTagKbItem_cFP10fopAc_ac_c */
void daTagKbItem_c::kb_dig(fopAc_ac_c* i_actor) {
field_0x299 = 1;
mpActor = i_actor;
void daTagKbItem_c::kb_dig(fopAc_ac_c* i_pigActor) {
field_0x299 = true;
mpActor = i_pigActor;
dig_main();
}
/* 80056AFC-80056CC0 .text dig_main__13daTagKbItem_cFv */
void daTagKbItem_c::dig_main() {
#if VERSION > VERSION_JPN
if (fopAcM_isSwitch(this, field_0x2a4)) {
if (fopAcM_isSwitch(this, mSwBitNo)) {
return;
}
#endif
if (field_0x299 == 0) {
if (!field_0x299) {
return;
}
if (field_0x298 != 0) {
if (field_0x298) {
return;
}
@@ -409,16 +409,17 @@ void daTagKbItem_c::dig_main() {
// Not a pig.
return;
}
if (
mItemNo != dItemNo_NONE_e
#if VERSION <= VERSION_JPN
if (field_0x2a0 != 0xFF && field_0x298 == 0) {
#else
if (field_0x2a0 != 0xFF) {
&& !field_0x298
#endif
) {
angle.y = cM_rndF((f32)0x7FFE);
s8 roomNo = current.roomNo;
daItem_c* item = (daItem_c*)fopAcM_fastCreateItem(
&mpActor->current.pos, field_0x2a0, roomNo, &angle,
&scale, cM_rndF(5.0f), 60.0f + cM_rndFX(5.0f), -6.0f, field_0x29c
&mpActor->current.pos, mItemNo, roomNo, &angle,
&scale, cM_rndF(5.0f), 60.0f + cM_rndFX(5.0f), -6.0f, mItemBitNo
);
if (item) {
fopAcM_OnStatus(item, fopAcStts_UNK4000_e);
@@ -426,8 +427,8 @@ void daTagKbItem_c::dig_main() {
#if VERSION <= VERSION_JPN
fopAcM_delete(this);
#else
if (field_0x2a4 != 0xFF) {
fopAcM_onSwitch(this, field_0x2a4);
if (mSwBitNo != 0xFF) {
fopAcM_onSwitch(this, mSwBitNo);
} else {
fopAcM_delete(this);
}
@@ -435,9 +436,9 @@ void daTagKbItem_c::dig_main() {
r30 = true;
}
if (field_0x2a1 != 0xFF) {
mpActor->home.angle.z = field_0x2a1;
fopAcM_onSwitch(this, field_0x2a4);
if (mEnemyKind != 0xFF) {
mpActor->home.angle.z = mEnemyKind;
fopAcM_onSwitch(this, mSwBitNo);
fopAcM_delete(this);
r30 = true;
}
@@ -445,7 +446,7 @@ void daTagKbItem_c::dig_main() {
if (r30) {
field_0x298 = r30;
}
field_0x299 = 0;
field_0x299 = false;
}
#if VERSION > VERSION_DEMO