diff --git a/configure.py b/configure.py index e8f9e275b..b2d6ef876 100644 --- a/configure.py +++ b/configure.py @@ -414,7 +414,7 @@ config.libs = [ Object(NonMatching, "d/d_snap.cpp"), Object(Matching, "d/d_point_wind.cpp"), Object(NonMatching, "d/actor/d_a_agb.cpp"), - Object(Matching, "d/actor/d_a_arrow.cpp", cflags=[*cflags_framework, "-sym off"]), + Object(Matching, "d/actor/d_a_arrow.cpp", extra_cflags=["-sym off"]), Object(NonMatching, "d/actor/d_a_bg.cpp"), Object(NonMatching, "d/actor/d_a_bomb.cpp"), Object(NonMatching, "d/actor/d_a_bomb2.cpp"), @@ -1325,7 +1325,7 @@ config.libs = [ ActorRel(NonMatching, "d_a_wbird"), ActorRel(NonMatching, "d_a_ykgr"), ActorRel(Matching, "d_a_alldie"), - ActorRel(NonMatching, "d_a_am"), + ActorRel(Matching, "d_a_am", extra_cflags=["-sym off"]), ActorRel(NonMatching, "d_a_am2"), ActorRel(NonMatching, "d_a_amiprop"), ActorRel(NonMatching, "d_a_arrow_iceeff"), diff --git a/include/JAZelAudio/JAIZelBasic.h b/include/JAZelAudio/JAIZelBasic.h index 91626f1b4..e891140b9 100644 --- a/include/JAZelAudio/JAIZelBasic.h +++ b/include/JAZelAudio/JAIZelBasic.h @@ -4,6 +4,7 @@ #include "dolphin/types.h" #include "JAZelAudio/JAZelAudio_SE.h" #include "JAZelAudio/JAZelAudio_BGM.h" +#include "dolphin/mtx/mtx.h" class Vec; class JAISound; @@ -80,7 +81,7 @@ public: void talkOut(); void menuIn(); void menuOut(); - void getCameraInfo(Vec*, f32*[][][][], u32); + void getCameraInfo(Vec*, Mtx, u32); void getCameraMapInfo(u32); void setCameraPolygonPos(Vec*); void setCameraGroupInfo(u8); diff --git a/include/JSystem/J3DGraphAnimator/J3DAnimation.h b/include/JSystem/J3DGraphAnimator/J3DAnimation.h index dd1aacaca..bd7a2d461 100644 --- a/include/JSystem/J3DGraphAnimator/J3DAnimation.h +++ b/include/JSystem/J3DGraphAnimator/J3DAnimation.h @@ -645,9 +645,9 @@ public: } void setFrame(f32 frame) { mFrame = frame; } void setLoop(s16 loop) { mLoop = loop; } - bool checkState(u8 state) const { return mState & state; } + BOOL checkState(u8 state) const { return mState & state; } -private: +public: /* 0x04 */ u8 mAttribute; /* 0x05 */ u8 mState; /* 0x06 */ s16 mStart; diff --git a/include/JSystem/JParticle/JPAEmitter.h b/include/JSystem/JParticle/JPAEmitter.h index eb1a7c85f..366b9aba1 100644 --- a/include/JSystem/JParticle/JPAEmitter.h +++ b/include/JSystem/JParticle/JPAEmitter.h @@ -30,10 +30,10 @@ public: JPACallBackBase() {} virtual ~JPACallBackBase() {} - virtual void init(JPABaseEmitter*); - virtual void execute(JPABaseEmitter*); - virtual void executeAfter(JPABaseEmitter*); - virtual void draw(JPABaseEmitter*); + inline virtual void init(T); + inline virtual void execute(T); + inline virtual void executeAfter(T); + inline virtual void draw(T); }; template @@ -42,9 +42,9 @@ public: JPACallBackBase2() {} virtual ~JPACallBackBase2() {} - virtual void init(JPABaseEmitter*, JPABaseParticle*); - virtual void execute(JPABaseEmitter*, JPABaseParticle*); - virtual void draw(JPABaseEmitter*, JPABaseParticle*); + inline virtual void init(T, U); + inline virtual void execute(T, U); + inline virtual void draw(T, U); }; class JPABaseEmitter { @@ -166,4 +166,13 @@ public: /* 0x216 */ u8 field_0x216[0x218 - 0x216]; }; +void JPACallBackBase::init(JPABaseEmitter*) {} +void JPACallBackBase::execute(JPABaseEmitter*) {} +void JPACallBackBase::executeAfter(JPABaseEmitter*) {} +void JPACallBackBase::draw(JPABaseEmitter*) {} + +void JPACallBackBase2::init(JPABaseEmitter*, JPABaseParticle*) {} +void JPACallBackBase2::execute(JPABaseEmitter*, JPABaseParticle*) {} +void JPACallBackBase2::draw(JPABaseEmitter*, JPABaseParticle*) {} + #endif /* JPAEMITTER_H */ diff --git a/include/JSystem/JParticle/JPAParticle.h b/include/JSystem/JParticle/JPAParticle.h index 123b4d6b9..81565a9ff 100644 --- a/include/JSystem/JParticle/JPAParticle.h +++ b/include/JSystem/JParticle/JPAParticle.h @@ -15,6 +15,11 @@ class JPAParticleCallBack; class JPAResourceManager; struct JPAEmitterWorkData; +template +class JPACallBackBase; +template +class JPACallBackBase2; + class JPABaseParticle { public: void initParticle(); diff --git a/include/SSystem/SComponent/c_cc_d.h b/include/SSystem/SComponent/c_cc_d.h index e962f94da..f770141b0 100644 --- a/include/SSystem/SComponent/c_cc_d.h +++ b/include/SSystem/SComponent/c_cc_d.h @@ -364,9 +364,9 @@ public: virtual ~cCcD_ObjCommonBase() {} void ct(); void SetSPrm(u32 sprm) { mSPrm = sprm; } - s32 getSPrm() const { return mSPrm; } - void setRPrm(s32 rprm) { mRPrm = rprm; } - s32 getRPrm() const { return mRPrm; } + u32 getSPrm() const { return mSPrm; } + void SetRPrm(u32 rprm) { mRPrm = rprm; } + u32 getRPrm() const { return mRPrm; } cCcD_Obj* GetHitObj() { return mHitObj; } void ClrObj() { mHitObj = NULL; } u32 MskSPrm(u32 mask) const { return mSPrm & mask; } @@ -397,6 +397,7 @@ public: void SetType(u32 type) { mType = type; } void SetAtp(int atp) { mAtp = atp; } void ClrSet() { OffSPrmBit(1); } + void OnHitBit() { SetRPrm(1); } void OffHitBit() { ClrRPrm(1); } u32 ChkHit() { return MskRPrm(1); } @@ -495,6 +496,7 @@ public: void SetTgType(u32 type) { mObjTg.SetType(type); } void OnTgSPrmBit(u32 flag) { mObjTg.OnSPrmBit(flag); } void OffAtSetBit() { mObjAt.ClrSet(); } + void OnAtHitBit() { mObjAt.OnHitBit(); } void OffAtHitBit() { mObjAt.OffHitBit(); } void OnTgSetBit() { mObjTg.OnSPrmBit(1); } void OffTgSetBit() { mObjTg.ClrSet(); } diff --git a/include/d/actor/d_a_bomb.h b/include/d/actor/d_a_bomb.h new file mode 100644 index 000000000..9f4855baa --- /dev/null +++ b/include/d/actor/d_a_bomb.h @@ -0,0 +1,110 @@ +#ifndef D_A_BOMB_H +#define D_A_BOMB_H + +#include "d/d_particle.h" +#include "d/d_bg_s_acch.h" +#include "f_op/f_op_actor.h" + +class daBomb_fuseSmokeEcallBack : public dPa_levelEcallBack { +public: + void executeAfter(JPABaseEmitter*); + void execute(JPABaseEmitter*); + void draw(JPABaseEmitter*); + void setup(JPABaseEmitter*, const cXyz*, const csXyz*, signed char); +}; + +class daBomb_fuseSparksEcallBack : public dPa_levelEcallBack { +public: + void execute(JPABaseEmitter*); + void draw(JPABaseEmitter*); + void setup(JPABaseEmitter*, const cXyz*, const csXyz*, signed char); +}; + +class daBomb_c : public fopAc_ac_c { +public: + enum State_e { + + }; + + s16 getBombRestTime(); + s16 getBombCheck_Flag(); + void setBombCheck_Flag(); + void setBombFire_ON(); + void setBombNoHit(); + void setBombOffCoSet(); + void setBombOnCoSet(); + void setBombNoEff(); + void setBombRestTime(short); + void setNoGravityTime(short); + void prm_make(State_e, bool, bool); + void chk_state(State_e) const; + void change_state(State_e); + void prm_get_state() const; + void get_explode_instant() const; + void prm_get_cheapEff() const; + void prm_get_angXZero() const; + void prm_get_version() const; + void _prm_chk_version() const; + + void draw_norm(); + void draw_nut(); + void draw(); + void checkExplodeCc_norm(); + void checkExplodeCc_nut(); + void checkExplodeCc_cannon(); + void checkExplodeCc(); + void checkExplodeTimer(); + void checkExplode(); + void checkExplodeBg_norm(); + void checkExplodeBg_nut(); + void checkExplodeBg_cannon(); + void checkExplodeBg(); + void water_tention(); + void posMoveF(); + void bgCrrPos(); + void bgCrrPos_lava(); + void bgCrrPos_water(); + void chk_water_land(); + void chk_water_in(); + void chk_water_sink(); + void chk_lava_hit(); + void chk_dead_zone(); + void bound(float); + void set_real_shadow_flag(); + void setRoomInfo(); + void makeFireEffect(cXyz&, csXyz&); + void makeWaterEffect(); + void setFuseEffect(); + void eff_explode_normal(const csXyz*); + void eff_explode_cheap(const csXyz*); + void eff_explode(); + void procExplode_init(); + void procExplode(); + void procCarry_init(); + void procCarry(); + void procWait_init(); + void procWait(); + void waitState_cannon(); + void waitState_bomtyu(); + void procSink(); + void execute(); + void set_wind_vec(); + void anm_play_nut(); + void set_mtx(); + void init_mtx(); + void se_cannon_fly_set(); + void se_cannon_fly_stop(); + void eff_water_splash(); + void bombDelete(); + void createHeap(); + void create(); + daBomb_c(); + void create_init(); +}; + +class dBgS_BombAcch : public dBgS_Acch { +public: + +}; + +#endif /* D_A_BOMB_H */ diff --git a/include/d/actor/d_a_bomb2.h b/include/d/actor/d_a_bomb2.h new file mode 100644 index 000000000..98ce7734a --- /dev/null +++ b/include/d/actor/d_a_bomb2.h @@ -0,0 +1,135 @@ +#ifndef D_A_BOMB2_H +#define D_A_BOMB2_H + +#include "JSystem/JParticle/JPAEmitter.h" +#include "f_op/f_op_actor.h" + +namespace daBomb2 { + class Env_c { + public: + void set(const cXyz&); + void clean(); + void is_end() const; + void proc(const cXyz&); + }; + + class FuseSmokeCB_c { + public: + ~FuseSmokeCB_c(); + + void setOldPosP(const cXyz*, const cXyz*); + void deleteCallBack(); + void execute(JPABaseEmitter*); + void executeAfter(JPABaseEmitter*); + void draw(JPABaseEmitter*); + void setup(JPABaseEmitter*, const cXyz*, const csXyz*, signed char); + }; + + class FuseSparksCB_c { + public: + ~FuseSparksCB_c(); + + void deleteCallBack(); + void execute(JPABaseEmitter*); + void draw(JPABaseEmitter*); + void setup(JPABaseEmitter*, const cXyz*, const csXyz*, signed char); + }; + + class Act_c : public fopAc_ac_c { + public: + enum Prm_e { + + }; + + void remove_fuse_effect(); + void set_time(int); + s32 get_time() const; + bool chk_eat() const; + void set_eat(); + void set_no_hit(); + void chk_explode(); + + void solidHeapCB(fopAc_ac_c*); + void create_heap_nut(); + void create_heap(); + void crr_init(); + void cc_init(); + void start_explode_instant(); + void start_explode_interval(); + void start_carry(); + void start_proc_call(); + void create_init(); + void _create(); + Act_c(); + void _delete(); + void set_mtx(); + void init_mtx(); + void cc_set(); + void camera_lockoff() const; + void posMoveF(); + void bgCrrPos(); + void bgCrrPos_lava(); + void bgCrrPos_water(); + void chk_water_in() const; + void chk_lava_in() const; + void setRoomInfo(); + void bound(float); + void set_nut_exp_interval(); + void anm_play(); + void set_wind_vec(); + void eff_explode(); + void eff_explode_normal(const csXyz*); + void eff_explode_water(); + void eff_fuse_init(); + void eff_fuse_start(); + void eff_fuse_move(); + void eff_fuse_end(); + void eff_water_splash(); + void se_fall_water(); + void se_explode(); + void se_explode_water(); + void se_ignition(); + void set_sound_env(int, int); + void chk_exp_cc_nut(); + void chk_exp_cc(); + void chk_exp_bg_nut(); + void chk_exp_bg(); + void chk_exp_timer(); + void chk_sink_bg_nut(); + void chk_sink_bg(); + void chk_exp_pre(); + void chk_exp_post(); + void chk_sink_post(); + void set_real_shadow_flag(); + void carry_fuse_start(); + void on_carry(); + void off_carry(); + void mode_wait_init(); + void mode_wait(); + void mode_carry_init(); + void mode_carry(); + void mode_explode_init(); + void mode_explode(); + void mode_sink_init(); + void mode_sink(); + void mode_proc_call(); + void tensor_init(); + void vib_init(); + void vib_proc(); + void set_vib_tensor(); + void tensor_wait(); + void tensor_wait_drop(); + void tensor_wait_ground(); + void tensor_carry(); + void tensor_explode(); + void tensor_sink(); + void tensor_proc_call(); + void _execute(); + void is_draw(); + void draw_nut(); + void draw_shadow(); + void _draw(); + }; +}; + +#endif /* D_A_BOMB2_H */ diff --git a/include/d/actor/d_a_player.h b/include/d/actor/d_a_player.h index 29be5cd72..71b36cda3 100644 --- a/include/d/actor/d_a_player.h +++ b/include/d/actor/d_a_player.h @@ -70,7 +70,7 @@ public: /* 0x290 */ u8 mAttackState; /* 0x291 */ u8 field_0x291; /* 0x292 */ u8 field_0x292[0x294 - 0x292]; - /* 0x294 */ s16 field_0x294; + /* 0x294 */ s16 mDamageWaitTimer; /* 0x296 */ s16 mQuakeTimer; /* 0x298 */ int field_0x298; /* 0x29C */ u32 field_0x29c; @@ -91,10 +91,11 @@ public: /* 0x300 */ f32 field_0x300; /* 0x304 */ daPy_demo_c mDemo; + u8 getCutType() const { return mAttackState; } + s16 getDamageWaitTimer() const { return mDamageWaitTimer; } s16 getBodyAngleX() { return mBodyAngle.x; } s16 getBodyAngleY() { return mBodyAngle.y; } void changeDemoMoveAngle(s16 angle) { mDemo.setMoveAngle(angle); } - u8 getCutType() const { return mAttackState; } void onPlayerNoDraw() { field_0x29c |= 0x8000000; } void offPlayerNoDraw() { field_0x29c &= ~0x8000000; } diff --git a/include/d/d_cc_uty.h b/include/d/d_cc_uty.h new file mode 100644 index 000000000..0bff3f3ff --- /dev/null +++ b/include/d/d_cc_uty.h @@ -0,0 +1,29 @@ +#ifndef D_CC_UTY_H +#define D_CC_UTY_H + +#include "SSystem/SComponent/c_cc_d.h" +#include "f_op/f_op_actor.h" + +struct CcAtInfo { + /* 0x00 */ cCcD_Obj* mpObj; + /* 0x04 */ fopAc_ac_c* mpActor; + /* 0x08 */ u8 mDamage; + /* 0x09 */ u8 mbDead; + /* 0x0A */ u8 mResultingAttackType; + /* 0x0B */ u8 m0B[0x0E - 0x0B]; + /* 0x0E */ s16 m0E; + /* 0x10 */ u8 m10[0x12 - 0x10]; + /* 0x12 */ u16 mPlCutBit; + /* 0x14 */ cXyz* pParticlePos; + /* 0x18 */ s32 mHitSoundId; +}; + +void cc_pl_cut_bit_get(); +void at_se_get(cCcD_Obj*); +void at_se_getC(cCcD_Obj*); +void def_se_set(fopAc_ac_c*, cCcD_Obj*, unsigned long); +void def_se_set_p(fopAc_ac_c*, cXyz*, cCcD_Obj*, unsigned long); +void at_power_check(CcAtInfo*); +void cc_at_check(fopAc_ac_c*, CcAtInfo*); + +#endif /* D_CC_UTY_H */ diff --git a/include/d/d_com_inf_game.h b/include/d/d_com_inf_game.h index 669588b0d..9921818e7 100644 --- a/include/d/d_com_inf_game.h +++ b/include/d/d_com_inf_game.h @@ -720,6 +720,10 @@ inline void dComIfGs_initDan(s8 i_stageNo) { g_dComIfG_gameInfo.save.initDan(i_stageNo); } +inline void dComIfGs_onActor(int i_no, int i_roomNo) { + g_dComIfG_gameInfo.save.onActor(i_no, i_roomNo); +} + inline BOOL dComIfGs_isActor(int i_no, int i_roomNo) { return g_dComIfG_gameInfo.save.isActor(i_no, i_roomNo); } diff --git a/include/d/d_particle.h b/include/d/d_particle.h index b7545af79..8fb51a661 100644 --- a/include/d/d_particle.h +++ b/include/d/d_particle.h @@ -34,7 +34,7 @@ public: class dPa_levelEcallBack : public JPACallBackBase { public: virtual ~dPa_levelEcallBack() {} - virtual void setup(JPABaseEmitter*, cXyz const*, csXyz const*, s8) {} + virtual void setup(JPABaseEmitter*, cXyz const*, csXyz const*, s8) = 0; }; class dPa_followEcallBack : public dPa_levelEcallBack { diff --git a/include/f_op/f_op_actor.h b/include/f_op/f_op_actor.h index 9c048e212..9abf44762 100644 --- a/include/f_op/f_op_actor.h +++ b/include/f_op/f_op_actor.h @@ -228,7 +228,7 @@ public: /* 0x285 */ s8 mHealth; /* 0x288 */ s32 mItemTableIdx; /* 0x28C */ u8 mItemStealNum; - /* 0x28D */ u8 mItemStealLeft; + /* 0x28D */ s8 mItemStealLeft; fopAc_ac_c(); ~fopAc_ac_c(); diff --git a/include/f_op/f_op_actor_mng.h b/include/f_op/f_op_actor_mng.h index f62be57d0..60f3f3c93 100644 --- a/include/f_op/f_op_actor_mng.h +++ b/include/f_op/f_op_actor_mng.h @@ -545,6 +545,10 @@ inline void fopAcM_seStart(fopAc_ac_c* actor, u32 sfxID, u32 param_2) { mDoAud_seStart(sfxID, &actor->mEyePos, param_2, dComIfGp_getReverb(fopAcM_GetRoomNo(actor))); } +inline void fopAcM_monsSeStart(fopAc_ac_c* actor, u32 sfxID, u32 param_2) { + mDoAud_monsSeStart(sfxID, &actor->mEyePos, fopAcM_GetID(actor), 0, dComIfGp_getReverb(fopAcM_GetRoomNo(actor))); +} + extern "C" { void fopAcM_initManager__Fv(void); void fopAcM_CreateAppend__Fv(void); diff --git a/include/m_Do/m_Do_audio.h b/include/m_Do/m_Do_audio.h index 1dd104b46..fd4f4770e 100644 --- a/include/m_Do/m_Do_audio.h +++ b/include/m_Do/m_Do_audio.h @@ -74,6 +74,14 @@ inline void mDoAud_seDeleteObject(Vec* i_sePos) { mDoAud_zelAudio_c::getInterface()->seDeleteObject(i_sePos); } +inline void mDoAud_monsSeStart(u32 param_0, Vec* param_1, u32 param_2, u32 param_3, s8 i_reverb) { + mDoAud_zelAudio_c::getInterface()->monsSeStart(param_0, param_1, param_2, param_3, i_reverb); +} + +inline void mDoAud_onEnemyDamage() { + mDoAud_zelAudio_c::getInterface()->onEnemyDamage(); +} + inline void mDoAud_bgmMuteMtDragon() { mDoAud_zelAudio_c::getInterface()->bgmMuteMtDragon(); } diff --git a/include/m_Do/m_Do_ext.h b/include/m_Do/m_Do_ext.h index 27f749dab..8a95c8a7c 100644 --- a/include/m_Do/m_Do_ext.h +++ b/include/m_Do/m_Do_ext.h @@ -32,7 +32,7 @@ public: void setFrame(f32 frame) { mFrameCtrl->setFrame(frame); } void setPlayMode(int i_mode) { mFrameCtrl->setAttribute(i_mode); } void setLoopFrame(f32 i_frame) { mFrameCtrl->setLoop(i_frame); } - bool isStop() { + BOOL isStop() { bool stopped = true; if (!mFrameCtrl->checkState(1) && mFrameCtrl->getRate() != 0.0f) { stopped = false; @@ -284,14 +284,16 @@ public: J3DModel* getModel() { return mpModel; } void setFrame(f32 frame) { mFrameCtrl.setFrame(frame); } f32 getFrame() { return mFrameCtrl.getFrame(); } - bool isStop() const { //regswap somewhere here + BOOL isStop() { //regswap somewhere here bool stopped = true; if (!mFrameCtrl.checkState(1) && mFrameCtrl.getRate() != 0.0f) { stopped = false; } - return stopped; } + BOOL checkFrame(f32 frame) { + return mFrameCtrl.checkPass(frame); + } void update(); void updateDL(); diff --git a/src/d/actor/d_a_am.cpp b/src/d/actor/d_a_am.cpp index e5296a2a5..e5f20cc46 100644 --- a/src/d/actor/d_a_am.cpp +++ b/src/d/actor/d_a_am.cpp @@ -10,6 +10,7 @@ #include "d/d_procname.h" #include "d/d_cc_d.h" #include "d/d_bg_s_acch.h" +#include "d/d_bg_s_lin_chk.h" #include "d/d_particle.h" #include "d/d_s_play.h" #include "d/d_com_inf_game.h" @@ -19,18 +20,20 @@ #include "d/d_snap.h" #include "d/actor/d_a_player.h" #include "d/d_jnt_hit.h" +#include "d/d_cc_uty.h" +#include "d/actor/d_a_bomb.h" +#include "d/actor/d_a_bomb2.h" + +// Needed for the .data section to match. +static f32 dummy1[3] = {1.0f, 1.0f, 1.0f}; +static f32 dummy2[3] = {1.0f, 1.0f, 1.0f}; +static u8 dummy3[4] = {0x02, 0x00, 0x02, 0x01}; +static f64 dummy4[2] = {3.0, 0.5}; class am_class : public fopEn_enemy_c { public: - enum Action { - ACTION_DOUSA = 0x0, - ACTION_MODORU_MOVE = 0x1, - ACTION_HANDOU_MOVE = 0x2, - ACTION_ITAI_MOVE = 0x3, - }; - /* 0x02AC */ request_of_phase_process_class mPhs; - /* 0x02B4 */ JntHit_c* m02B4; + /* 0x02B4 */ JntHit_c* mEyeJntHit; /* 0x02B8 */ mDoExt_McaMorf* mpMorf; /* 0x02BC */ u8 m02BC[0x02C0 - 0x02BC]; /* 0x02C0 */ u8 mType; @@ -38,28 +41,26 @@ public: /* 0x02C2 */ u8 mStartsInactive; /* 0x02C3 */ u8 mSwitch; /* 0x02C4 */ u8 mAction; - /* 0x02C5 */ u8 m02C5; + /* 0x02C5 */ u8 mState; /* 0x02C6 */ u8 mHugeKnockback; - /* 0x02C7 */ bool mbIsBeingHit; - /* 0x02C8 */ s16 m02C8[4]; - /* 0x02D0 */ s16 m02D0[5]; - /* 0x02DA */ s16 m02DA; - /* 0x02DC */ s16 m02DC; + /* 0x02C7 */ bool mbIsBodyBeingHit; + /* 0x02C8 */ s16 mCountDownTimers[4]; + /* 0x02D0 */ s16 mCountUpTimers[5]; + /* 0x02DA */ s16 mDesiredRotY; + /* 0x02DC */ s16 mSpawnRotY; /* 0x02DE */ u8 m02DE[0x02E0 - 0x02DE]; - /* 0x02E0 */ int m02E0; - /* 0x02E4 */ int m02E4; + /* 0x02E0 */ int mCurrBckIdx; + /* 0x02E4 */ u32 mSwallowedActorProcID; /* 0x02E8 */ f32 mAreaRadius; /* 0x02EC */ f32 m02EC; - /* 0x02F0 */ f32 m02F0; - /* 0x02F4 */ cXyz m02F4; - /* 0x0300 */ cXyz m0300; - /* 0x030C */ cXyz m030C; - /* 0x0318 */ cXyz m0318; - /* 0x0324 */ cXyz m0324; - /* 0x0330 */ csXyz m0330; - /* 0x0336 */ s16 m0336; - /* 0x0338 */ s16 m0338; - /* 0x033A */ u8 m033A[0x033C - 0x033A]; + /* 0x02F0 */ f32 mSpawnPosY; + /* 0x02F4 */ cXyz mEyeballPos; + /* 0x0300 */ cXyz mMouthPos; + /* 0x030C */ cXyz mWaistPos; + /* 0x0318 */ cXyz mJawPos; + /* 0x0324 */ cXyz mSpawnPos; + /* 0x0330 */ csXyz mEyeRot; + /* 0x0336 */ csXyz mDesiredEyeRot; /* 0x033C */ JPABaseEmitter* m033C; /* 0x0340 */ JPABaseEmitter* m0340; /* 0x0344 */ dPa_smokeEcallBack mSmokeCbs[4]; @@ -69,13 +70,54 @@ public: /* 0x0604 */ dCcD_Sph mEyeSph; /* 0x0730 */ dCcD_Sph mMouthSph; /* 0x085C */ dCcD_Cyl mBodyCyl; - /* 0x098C */ dCcD_Cyl mSwordCyl; + /* 0x098C */ dCcD_Cyl mNeedleCyl; /* 0x0ABC */ enemyice mEnemyIce; /* 0x0E74 */ enemyfire mEnemyFire; }; +enum Action { + ACTION_DOUSA = 0x0, + ACTION_MODORU_MOVE = 0x1, + ACTION_HANDOU_MOVE = 0x2, + ACTION_ITAI_MOVE = 0x3, +}; + +enum AM_RES_FILE_IDS { + /* BAS */ + AM_BAS_BOM_NOMI=0x5, + AM_BAS_BOM_NOMI2=0x6, + AM_BAS_CLOSE=0x7, + AM_BAS_CLOSE_LOOP=0x8, + AM_BAS_DAMAGE=0x9, + AM_BAS_DAMAGE_END=0xA, + AM_BAS_DAMAGE_LOOP=0xB, + AM_BAS_DEAD=0xC, + AM_BAS_OKIRU=0xD, + AM_BAS_OPEN=0xE, + AM_BAS_OPEN_LOOP=0xF, + AM_BAS_SLEEP=0x10, + AM_BAS_SLEEP_LOOP=0x11, + + /* BCK */ + AM_BCK_BOM_NOMI=0x14, + AM_BCK_CLOSE=0x15, + AM_BCK_CLOSE_LOOP=0x16, + AM_BCK_DAMAGE=0x17, + AM_BCK_DAMAGE_END=0x18, + AM_BCK_DAMAGE_LOOP=0x19, + AM_BCK_DEAD=0x1A, + AM_BCK_OKIRU=0x1B, + AM_BCK_OPEN=0x1C, + AM_BCK_OPEN_LOOP=0x1D, + AM_BCK_SLEEP=0x1E, + AM_BCK_SLEEP_LOOP=0x1F, + + /* BDL */ + AM_BDL_AM=0x22, +}; + /* 00000078-0000021C .text nodeCallBack__FP7J3DNodei */ -BOOL nodeCallBack(J3DNode* node, int param_1) { +static BOOL nodeCallBack(J3DNode* node, int param_1) { if (!param_1) { J3DJoint* joint = (J3DJoint*)node; s32 jntNo = joint->getJntNo(); @@ -88,29 +130,29 @@ BOOL nodeCallBack(J3DNode* node, int param_1) { cXyz offset; switch (jntNo) { - case 1: + case 1: // kosi (waist) offset.x = 0.0f; offset.y = 240.0f; offset.z = 60.0f; - MtxPosition(&offset, &i_this->m02F4); + MtxPosition(&offset, &i_this->mEyeballPos); offset.x = 0.0f; offset.y = 150.0f; offset.z = 70.0f; - MtxPosition(&offset, &i_this->m0300); + MtxPosition(&offset, &i_this->mMouthPos); offset.x = 0.0f; offset.y = 0.0f; offset.z = 0.0f; - MtxPosition(&offset, &i_this->m030C); + MtxPosition(&offset, &i_this->mWaistPos); break; - case 2: + case 2: // ago (jaw) offset.x = 0.0f; offset.y = 0.0f; offset.z = 0.0f; - MtxPosition(&offset, &i_this->m0318); + MtxPosition(&offset, &i_this->mJawPos); break; - case 4: - cMtx_YrotM(*calc_mtx, i_this->m0330.y); - cMtx_XrotM(*calc_mtx, i_this->m0330.x); + case 4: // eye + cMtx_YrotM(*calc_mtx, i_this->mEyeRot.y); + cMtx_XrotM(*calc_mtx, i_this->mEyeRot.x); } if (jntNo >= 1 && jntNo <= 4) { @@ -123,7 +165,7 @@ BOOL nodeCallBack(J3DNode* node, int param_1) { } /* 0000021C-000002E4 .text draw_SUB__FP8am_class */ -void draw_SUB(am_class* i_this) { +static void draw_SUB(am_class* i_this) { J3DModel* model = i_this->mpMorf->getModel(); model->setBaseScale(i_this->mScale); mDoMtx_stack_c::transS(i_this->current.pos); @@ -138,7 +180,7 @@ void draw_SUB(am_class* i_this) { } /* 000002E4-00000378 .text daAM_Draw__FP8am_class */ -BOOL daAM_Draw(am_class* i_this) { +static BOOL daAM_Draw(am_class* i_this) { g_env_light.setLightTevColorType(i_this->mpMorf->getModel(), &i_this->mTevStr); dSnap_RegistFig(0xB7, i_this, 1.0f, 1.0f, 1.0f); @@ -154,8 +196,8 @@ BOOL daAM_Draw(am_class* i_this) { } /* 00000378-000004A4 .text anm_init__FP8am_classifUcfi */ -void anm_init(am_class* i_this, int bckFileIdx, f32 morf, u8 loopMode, f32 speed, int soundFileIdx) { - i_this->m02E0 = bckFileIdx; +static void anm_init(am_class* i_this, int bckFileIdx, f32 morf, u8 loopMode, f32 speed, int soundFileIdx) { + i_this->mCurrBckIdx = bckFileIdx; if (soundFileIdx >= 0) { void* soundAnm = dComIfG_getObjectRes("AM", soundFileIdx); J3DAnmTransform* bckAnm = (J3DAnmTransform*)dComIfG_getObjectRes("AM", bckFileIdx); @@ -167,13 +209,19 @@ void anm_init(am_class* i_this, int bckFileIdx, f32 morf, u8 loopMode, f32 speed } /* 000004A4-00000784 .text body_atari_check__FP8am_class */ -void body_atari_check(am_class* i_this) { +static void body_atari_check(am_class* i_this) { daPy_py_c* player = daPy_getPlayerActorClass(); +#if VERSION == VERSION_JPN + if (i_this->mStartsInactive == 1 && i_this->mSwitch != 0xFF && !dComIfGs_isSwitch(i_this->mSwitch, dComIfGp_roomControl_getStayNo())) { + return; + } +#endif + i_this->mStts.Move(); - if (i_this->mBodyCyl.ChkTgHit() || i_this->mSwordCyl.ChkTgHit()) { - if (i_this->mbIsBeingHit) { + if (i_this->mBodyCyl.ChkTgHit() || i_this->mNeedleCyl.ChkTgHit()) { + if (i_this->mbIsBodyBeingHit) { return; } @@ -181,12 +229,12 @@ void body_atari_check(am_class* i_this) { if (i_this->mBodyCyl.ChkTgHit()) { hitObj = i_this->mBodyCyl.GetTgHitObj(); } else { - hitObj = i_this->mSwordCyl.GetTgHitObj(); + hitObj = i_this->mNeedleCyl.GetTgHitObj(); } if (!hitObj) { return; } - i_this->mbIsBeingHit = true; + i_this->mbIsBodyBeingHit = true; switch (hitObj->GetAtType()) { case AT_TYPE_SWORD: @@ -204,17 +252,19 @@ void body_atari_check(am_class* i_this) { break; case AT_TYPE_SKULL_HAMMER: fopAcM_seStart(i_this, JA_SE_LK_HAMMER_HIT, 0x42); +#if VERSION != VERSION_JPN if (i_this->mStartsInactive == 1 && i_this->mSwitch != 0xFF && !dComIfGs_isSwitch(i_this->mSwitch, dComIfGp_roomControl_getStayNo())) { return; } - if (i_this->mAction == am_class::ACTION_HANDOU_MOVE) { +#endif + if (i_this->mAction == ACTION_HANDOU_MOVE) { return; } - if (i_this->mAction == am_class::ACTION_ITAI_MOVE) { + if (i_this->mAction == ACTION_ITAI_MOVE) { return; } - i_this->mAction = am_class::ACTION_HANDOU_MOVE; - i_this->m02C5 = 30; + i_this->mAction = ACTION_HANDOU_MOVE; + i_this->mState = 0x1E; i_this->mHugeKnockback = 0; if (player->getCutType() == 0x11) { // If the player hits the Armos Knight with the Skull Hammer's side swing, knock it back much farther than normal. @@ -226,27 +276,225 @@ void body_atari_check(am_class* i_this) { break; } } else { - i_this->mbIsBeingHit = false; + i_this->mbIsBodyBeingHit = false; } } /* 00000784-00000D14 .text medama_atari_check__FP8am_class */ -void medama_atari_check(am_class* i_this) { - /* Nonmatching */ +static BOOL medama_atari_check(am_class* i_this) { + daPy_py_c* player = (daPy_py_c*)dComIfGp_getPlayer(0); + cCcD_Obj* hitObj = i_this->mEyeSph.GetTgHitObj(); + bool ret = false; + + if (i_this->mStartsInactive == 1 && i_this->mSwitch != 0xFF && !dComIfGs_isSwitch(i_this->mSwitch, dComIfGp_roomControl_getStayNo())) { + return ret; + } + + i_this->mStts.Move(); + if (!i_this->mEyeSph.ChkTgHit()) { + return ret; + } + if (!hitObj) { + return ret; + } + + CcAtInfo atInfo; + atInfo.pParticlePos = NULL; + cXyz hitPos = *i_this->mEyeSph.GetTgHitPosP(); + + switch (hitObj->GetAtType()) { + case AT_TYPE_GRAPPLING_HOOK: + if (i_this->mCurrBckIdx != AM_BCK_SLEEP && i_this->mCurrBckIdx != AM_BCK_SLEEP_LOOP) { + if (i_this->mItemStealLeft > 0) { + i_this->mMaxHealth = 10; + i_this->mHealth = 10; + atInfo.mpObj = i_this->mEyeSph.GetTgHitObj(); + atInfo.pParticlePos = NULL; + cc_at_check(i_this, &atInfo); + i_this->mMaxHealth = 10; + i_this->mHealth = 10; + dComIfGp_particle_set(0x27B, &i_this->mAttentionInfo.mPosition, NULL, NULL); + } else { + dComIfGp_particle_set(0xC, &hitPos, NULL, NULL); + } + fopAcM_seStart(i_this, JA_SE_LK_MS_WEP_HIT, 0x42); + } + break; + case AT_TYPE_SWORD: + case AT_TYPE_MACHETE: + case 0x00000800: + case AT_TYPE_DARKNUT_SWORD: + case AT_TYPE_MOBLIN_SPEAR: + fopAcM_seStart(i_this, JA_SE_LK_SW_HIT_S, 0x42); + break; + case AT_TYPE_BOOMERANG: + case AT_TYPE_BOKO_STICK: + case 0x00002000: + case AT_TYPE_STALFOS_MACE: + fopAcM_seStart(i_this, JA_SE_LK_W_WEP_HIT, 0x42); + break; + case AT_TYPE_LIGHT_ARROW: + ret = true; + i_this->mEnemyIce.mNumFramesDyingToLightArrowsSoFar = 1; + i_this->mEnemyIce.m1AC = 1.0f; + i_this->mEnemyIce.mYOffset = 80.0f; + i_this->mAttentionInfo.mFlags = 0; + break; + case AT_TYPE_NORMAL_ARROW: + case AT_TYPE_FIRE_ARROW: + case AT_TYPE_ICE_ARROW: + // Using the fopAcM_seStart inline multiple times in a single case makes the codegen not match. + // fopAcM_seStart(i_this, JA_SE_LK_MS_WEP_HIT, 0x42); + mDoAud_seStart(JA_SE_LK_MS_WEP_HIT, &i_this->mEyePos, 0x42, dComIfGp_getReverb(fopAcM_GetRoomNo(i_this))); + ret = true; + if (i_this->mCurrBckIdx == AM_BCK_SLEEP || i_this->mCurrBckIdx == AM_BCK_SLEEP_LOOP) { + anm_init(i_this, AM_BCK_OKIRU, 1.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f, -1); + i_this->mAttentionInfo.mFlags = 0x4; + i_this->mNeedleCyl.OnAtSPrmBit(1); + i_this->mNeedleCyl.OnAtHitBit(); + i_this->mAction = ACTION_DOUSA; + i_this->mState = 2; + } else { + dComIfGp_particle_set(0x10, &i_this->mEyeballPos, &player->shape_angle, NULL); + // fopAcM_seStart(i_this, JA_SE_CM_AM_EYE_DAMAGE, 0); + mDoAud_seStart(JA_SE_CM_AM_EYE_DAMAGE, &i_this->mEyePos, 0, dComIfGp_getReverb(fopAcM_GetRoomNo(i_this))); + fopAcM_monsSeStart(i_this, JA_SE_CV_AM_EYE_DAMAGE, 0x42); + i_this->mAction = ACTION_ITAI_MOVE; + i_this->mState = 0x28; + } + break; + default: + dComIfGp_particle_set(0xC, &hitPos, NULL, NULL); + fopAcM_seStart(i_this, JA_SE_LK_MS_WEP_HIT, 0x42); + break; + } + + // return ret; // Doesn't match, too few instructions + // return ret ? TRUE : FALSE; // Doesn't match, optimized into arithmetic instead of a branch + return ret ? (ret ? TRUE : TRUE) : FALSE; // Matches, tricking the compiler into using a branch } /* 00000D14-00000F04 .text bomb_move_set__FP8am_classUc */ -void bomb_move_set(am_class* i_this, u8) { - /* Nonmatching */ +static void bomb_move_set(am_class* i_this, u8 alwaysMoveY) { + if (i_this->mSwallowedActorProcID == -1) { + return; + } + fopAc_ac_c* swallowedActor = fopAcM_SearchByID(i_this->mSwallowedActorProcID); + if (!swallowedActor) { + return; + } + + cMtx_YrotS(*calc_mtx, i_this->shape_angle.y); + + cXyz mouthOffset(0.0f, 120.0f, 40.0f); + cXyz mouthPos; + MtxPosition(&mouthOffset, &mouthPos); + mouthPos += i_this->current.pos; + + // Pull the bomb into the Armos Knight's mouth by 50 units per frame on each axis. + cLib_addCalc2(&swallowedActor->current.pos.x, mouthPos.x, 1.0f, 50.0f); + if (alwaysMoveY || mouthPos.y - 10.0f < swallowedActor->current.pos.y) { + cLib_addCalc2(&swallowedActor->current.pos.y, mouthPos.y, 1.0f, 50.0f); + } + cLib_addCalc2(&swallowedActor->current.pos.z, mouthPos.z, 1.0f, 50.0f); + + swallowedActor->mGravity = 0.0f; + swallowedActor->speedF = 0.0f; + swallowedActor->speed.setAll(0.0f); + swallowedActor->current.angle.setall(0); + swallowedActor->shape_angle.setall(0); + swallowedActor->current.angle.y = i_this->shape_angle.y; + swallowedActor->shape_angle.y = i_this->shape_angle.y; + + if (fpcM_GetName(swallowedActor) == PROC_BOMB) { + daBomb_c* bomb = (daBomb_c*)swallowedActor; + if (i_this->mCountDownTimers[1] == 1) { + bomb->mScale.setAll(0.0f); + bomb->setBombNoEff(); + } else if (i_this->mCountDownTimers[1] > 1) { + bomb->mScale.setAll(1.0f); + } + bomb->setBombRestTime(100); + } else if (fpcM_GetName(swallowedActor) == PROC_Bomb2) { + daBomb2::Act_c* bomb2 = (daBomb2::Act_c*)swallowedActor; + if (i_this->mCountDownTimers[1] == 1) { + bomb2->mScale.setAll(0.0f); + bomb2->remove_fuse_effect(); + } else if (i_this->mCountDownTimers[1] > 1) { + bomb2->mScale.setAll(1.0f); + } + bomb2->set_time(100); + } } /* 00000F04-00001138 .text bomb_nomi_check__FP8am_class */ -void bomb_nomi_check(am_class* i_this) { - /* Nonmatching */ +static BOOL bomb_nomi_check(am_class* i_this) { + fopAc_ac_c* actor = i_this; + i_this->mStts.Move(); + + if (i_this->mCurrBckIdx != AM_BCK_OPEN && i_this->mCurrBckIdx != AM_BCK_OPEN_LOOP && + i_this->mCurrBckIdx != AM_BCK_DAMAGE && i_this->mCurrBckIdx != AM_BCK_DAMAGE_LOOP) + { + return FALSE; + } + + s16 angleToPlayer = fopAcM_searchPlayerAngleY(actor); + s16 angleDiff = cLib_distanceAngleS(actor->shape_angle.y, angleToPlayer); + if (angleDiff > 0x2000) { + return FALSE; + } + + if (i_this->mMouthSph.ChkCoHit()) { + cCcD_Obj* hitObj = i_this->mMouthSph.GetCoHitObj(); + if (hitObj) { + cCcD_Stts* hitStts = hitObj->GetStts(); + if (hitStts == NULL) { + actor = NULL; + } else { + actor = hitStts->GetAc(); + } + if (actor) { + if (fpcM_GetName(actor) == PROC_BOMB) { + daBomb_c* bomb = (daBomb_c*)actor; + if (!bomb->getBombCheck_Flag() && bomb->getBombRestTime() > 1) { + f32 offsetY = 20.0f + g_regHIO.mChild[8].mFloatRegs[1]; + if (i_this->mMouthPos.y - offsetY < bomb->current.pos.y) { + // Swallow the bomb. + bomb->setBombCheck_Flag(); + bomb->change_state((daBomb_c::State_e)2); + i_this->mSwallowedActorProcID = fopAcM_GetID(bomb); + bomb->setBombNoHit(); + bomb_move_set(i_this, 0); + i_this->mAction = ACTION_ITAI_MOVE; + i_this->mState = 0x2C; + return TRUE; + } + } + } else if (fpcM_GetName(actor) == PROC_Bomb2) { + daBomb2::Act_c* bomb2 = (daBomb2::Act_c*)actor; + if (!bomb2->chk_eat() && bomb2->get_time() > 1) { + f32 offsetY = 20.0f + g_regHIO.mChild[8].mFloatRegs[1]; + if (i_this->mMouthPos.y - offsetY < bomb2->current.pos.y) { + // Swallow the bomb. + bomb2->set_eat(); + i_this->mSwallowedActorProcID = fopAcM_GetID(bomb2); + bomb2->set_no_hit(); + bomb_move_set(i_this, 0); + i_this->mAction = ACTION_ITAI_MOVE; + i_this->mState = 0x2C; + return TRUE; + } + } + } + } + } + } + + return FALSE; } /* 00001138-000011E4 .text BG_check__FP8am_class */ -void BG_check(am_class* i_this) { +static void BG_check(am_class* i_this) { f32 halfHeight = g_regHIO.mChild[12].mFloatRegs[3] + 30.0f; f32 radius = g_regHIO.mChild[12].mFloatRegs[4] + 150.0f; i_this->mAcchCir.SetWall(halfHeight, radius); @@ -259,37 +507,554 @@ void BG_check(am_class* i_this) { } /* 000011E4-00001504 .text Line_check__FP8am_class4cXyz */ -void Line_check(am_class* i_this, cXyz) { - /* Nonmatching */ +static BOOL Line_check(am_class* i_this, cXyz destPos) { + fopAc_ac_c* actor = i_this; + dBgS_LinChk linChk; + cXyz centerPos = actor->current.pos; + centerPos.y += 100.0f; + destPos.y += 100.0f; + linChk.Set(¢erPos, &destPos, actor); + if (!dComIfG_Bgsp()->LineCross(&linChk)) { + return TRUE; + } + return FALSE; } /* 0000193C-00001B00 .text medama_move__FP8am_class */ -void medama_move(am_class* i_this) { - /* Nonmatching */ +static void medama_move(am_class* i_this) { + daPy_py_c* player = daPy_getPlayerActorClass(); + if (i_this->mCurrBckIdx == AM_BCK_SLEEP || i_this->mCurrBckIdx == AM_BCK_SLEEP_LOOP) { + i_this->mEyeRot.setall(0); + return; + } + + f32 diffX = i_this->current.pos.x - player->current.pos.x; + f32 diffY = i_this->mEyePos.y - player->current.pos.y; + f32 diffZ = i_this->current.pos.z - player->current.pos.z; + + i_this->mDesiredEyeRot.y = cM_atan2s(diffX, diffZ); + if (i_this->mDesiredEyeRot.y < -0x71C) { + i_this->mDesiredEyeRot.y = -0x71C; + } else if (i_this->mDesiredEyeRot.y > 0x71C) { + i_this->mDesiredEyeRot.y = 0x71C; + } + + i_this->mDesiredEyeRot.x = cM_atan2s(diffY, sqrtf(diffX*diffX + diffZ*diffZ)); + if (i_this->mDesiredEyeRot.x < -0x38E) { + i_this->mDesiredEyeRot.x = -0x38E; + } else if (i_this->mDesiredEyeRot.x > 0x38E) { + i_this->mDesiredEyeRot.x = 0x38E; + } + + cLib_addCalcAngleS2(&i_this->mEyeRot.x, i_this->mDesiredEyeRot.x, 1, 0x500); + cLib_addCalcAngleS2(&i_this->mEyeRot.y, i_this->mDesiredEyeRot.y, 1, 0x500); } /* 00001B00-00002564 .text action_dousa__FP8am_class */ -void action_dousa(am_class* i_this) { - /* Nonmatching */ +static void action_dousa(am_class* i_this) { + daPy_py_c* player = (daPy_py_c*)dComIfGp_getPlayer(0); + switch (i_this->mState) { + case 0: + for (int i = 0; i < ARRAY_SIZE(i_this->mCountUpTimers); i++) { + i_this->mCountUpTimers[i] = 0; + } + anm_init(i_this, AM_BCK_SLEEP_LOOP, 1.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f, -1); + i_this->mState += 1; + // Fall-through + case 1: + if (i_this->mStartsInactive == 1 && i_this->mSwitch != 0xFF && !dComIfGs_isSwitch(i_this->mSwitch, dComIfGp_roomControl_getStayNo())) { + break; + } + fopAcM_OnStatus(i_this, fopAcStts_SHOWMAP_e); + if (fopAcM_searchPlayerDistance(i_this) < 1000.0f) { + f32 yDist = player->current.pos.y - i_this->current.pos.y; + yDist = sqrtf(yDist*yDist); // ??? + if (yDist > 300.0f) { + break; + } + if (Line_check(i_this, player->current.pos)) { + anm_init(i_this, AM_BCK_OKIRU, 1.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f, -1); + fopAcM_monsSeStart(i_this, JA_SE_CV_AM_AWAKE, 0); + i_this->mAttentionInfo.mFlags = 0x4; + i_this->mNeedleCyl.OnAtSetBit(); + i_this->mNeedleCyl.OnAtHitBit(); + i_this->mState += 1; + } + } + break; + case 2: + // Using the mDoExt_McaMorf::isStop inline causes regswap. + // if (!i_this->mpMorf->isStop()) { + mDoExt_McaMorf* morf = i_this->mpMorf; + bool stopped = true; + if (!morf->mFrameCtrl.checkState(1) && morf->mFrameCtrl.getRate() != 0.0f) { stopped = false; } + if (!stopped) { + break; + } + i_this->mState += 1; + // Fall-through + case 3: + if (i_this->mCurrBckIdx != AM_BCK_CLOSE && i_this->mCurrBckIdx != AM_BCK_CLOSE_LOOP) { + if (i_this->mCurrBckIdx != AM_BCK_DAMAGE_END) { + // Using the fopAcM_seStart inline multiple times in a single case makes the codegen not match. + // fopAcM_seStart(i_this, JA_SE_CM_AM_NEEDLE_OUT, 0); + // fopAcM_seStart(i_this, JA_SE_CM_AM_MOUTH_CLOSE, 0); + mDoAud_seStart(JA_SE_CM_AM_NEEDLE_OUT, &i_this->mEyePos, 0, dComIfGp_getReverb(fopAcM_GetRoomNo(i_this))); + mDoAud_seStart(JA_SE_CM_AM_MOUTH_CLOSE, &i_this->mEyePos, 0, dComIfGp_getReverb(fopAcM_GetRoomNo(i_this))); + } + anm_init(i_this, AM_BCK_CLOSE, 1.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f, -1); + i_this->mCountDownTimers[2] = 6; + } + i_this->mDesiredRotY = fopAcM_searchPlayerAngleY(i_this); + i_this->mState += 1; + // Fall-through + case 4: + if (i_this->mCountDownTimers[2] == 1) { + i_this->mNeedleCyl.OnAtSPrmBit(1); + i_this->mNeedleCyl.OnAtHitBit(); + } + if (i_this->mCountDownTimers[2] != 0) { + break; + } + if (i_this->mType & 1) { + f32 xDist = i_this->current.pos.x - i_this->mSpawnPos.x; + f32 zDist = i_this->current.pos.z - i_this->mSpawnPos.z; + f32 xzDist = sqrtf(xDist*xDist + zDist*zDist); + if (xzDist > i_this->mAreaRadius) { + i_this->mAction = ACTION_MODORU_MOVE; + i_this->mState = 0x14; + return; + } + } else { + if (fopAcM_searchPlayerDistance(i_this) > 2000.0f) { + i_this->mState = 9; + break; + } + f32 yDist = player->current.pos.y - i_this->current.pos.y; + yDist = sqrtf(yDist*yDist); // ??? + if (yDist > 300.0f) { + i_this->mState = 9; + break; + } + } + s16 yRotDiff = cLib_distanceAngleS(i_this->shape_angle.y, i_this->mDesiredRotY); + if (yRotDiff < 0x100) { + i_this->mState += 1; + } + break; + case 5: + i_this->speedF = 30.0f; + i_this->mGravity = -11.0f; + i_this->speed.y = 40.0f; + fopAcM_monsSeStart(i_this, JA_SE_CV_AM_JUMP, 0); + if (!Line_check(i_this, player->current.pos) || player->getDamageWaitTimer()) { + i_this->speedF = 0.0f; + } + i_this->mState += 1; + break; + case 6: + if (i_this->mCurrBckIdx == AM_BCK_CLOSE) { + // Using the mDoExt_McaMorf::isStop inline causes regswap. + // if (i_this->mpMorf->isStop()) { + mDoExt_McaMorf* morf = i_this->mpMorf; + bool stopped = true; + if (!morf->mFrameCtrl.checkState(1) && morf->mFrameCtrl.getRate() != 0.0f) { stopped = false; } + if (stopped) { + anm_init(i_this, AM_BCK_CLOSE_LOOP, 1.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f, -1); + } + } + if (!i_this->mAcch.ChkGroundHit()) { + break; + } + fopAcM_seStart(i_this, JA_SE_CM_AM_JUMP, 0); + i_this->mSmokeCbs[0].end(); + dComIfGp_particle_setToon( + 0xA125, &i_this->mWaistPos, &i_this->shape_angle, NULL, + 0xB9, &i_this->mSmokeCbs[0], fopAcM_GetRoomNo(i_this), NULL, NULL, NULL + ); + dComIfGp_getVibration().StartShock(3, -0x21, cXyz(0.0f, 1.0f, 0.0f)); + i_this->speedF = 0.0f; + i_this->mCountDownTimers[0] = 0; + if (i_this->mCountUpTimers[0] < 2) { + i_this->mCountDownTimers[0] = 10; + } + i_this->mState += 1; + // Fall-through + case 7: + if (i_this->mCountDownTimers[0] != 0) { + break; + } + i_this->mCountUpTimers[0]++; + if (i_this->mCountUpTimers[0] > 2) { + i_this->mCountDownTimers[0] = 100; + i_this->mCountUpTimers[0] = 0; + anm_init(i_this, AM_BCK_DAMAGE, 0.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f, -1); + // Using the fopAcM_seStart inline multiple times in a single case makes the codegen not match. + // fopAcM_seStart(i_this, JA_SE_CM_AM_NEEDLE_IN, 0); + // fopAcM_seStart(i_this, JA_SE_CM_AM_MOUTH_OPEN, 0); + mDoAud_seStart(JA_SE_CM_AM_NEEDLE_IN, &i_this->mEyePos, 0, dComIfGp_getReverb(fopAcM_GetRoomNo(i_this))); + mDoAud_seStart(JA_SE_CM_AM_MOUTH_OPEN, &i_this->mEyePos, 0, dComIfGp_getReverb(fopAcM_GetRoomNo(i_this))); + fopAcM_monsSeStart(i_this, JA_SE_CV_AM_OPEN_MOUTH, 0); + i_this->mNeedleCyl.OffAtSetBit(); + i_this->mNeedleCyl.OffAtSetBit(); + if (i_this->mSmokeCbs[2].getEmitter() == NULL) { + dComIfGp_particle_setToon( + 0xA154, &i_this->mWaistPos, &i_this->shape_angle, NULL, + 0xB9, &i_this->mSmokeCbs[2], fopAcM_GetRoomNo(i_this), NULL, NULL, NULL + ); + } + i_this->mState = 8; + } else { + i_this->mState = 3; + } + break; + case 8: + if (i_this->mAcch.ChkGroundHit()) { + i_this->mGravity = -6.0f; + i_this->speed.y = 15.0f; + fopAcM_seStart(i_this, JA_SE_CM_AM_JUMP_S, 0); + i_this->mDesiredRotY = fopAcM_searchPlayerAngleY(i_this); + } + if (i_this->mCountDownTimers[0] == 0) { + i_this->mSmokeCbs[2].end(); + i_this->mState = 3; + } + break; + case 9: + anm_init(i_this, AM_BCK_SLEEP, 1.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f, -1); + fopAcM_seStart(i_this, JA_SE_CM_AM_NEEDLE_IN, 0); + i_this->mNeedleCyl.OffAtSetBit(); + i_this->mNeedleCyl.OffAtSetBit(); + i_this->mAttentionInfo.mFlags = 0; + i_this->mState += 1; + break; + case 10: + // Using the mDoExt_McaMorf::isStop inline causes regswap. + // if (i_this->mpMorf->isStop()) { + morf = i_this->mpMorf; + stopped = true; + if (!morf->mFrameCtrl.checkState(1) && morf->mFrameCtrl.getRate() != 0.0f) { stopped = false; } + if (stopped) { + i_this->mState = 0; + } + break; + } + + medama_move(i_this); + + if (i_this->mState != 2 && medama_atari_check(i_this)) { + i_this->mSmokeCbs[2].end(); + } else if (bomb_nomi_check(i_this)) { + i_this->mSmokeCbs[2].end(); + } } /* 00002564-000028C4 .text action_modoru_move__FP8am_class */ -void action_modoru_move(am_class* i_this) { - /* Nonmatching */ +static void action_modoru_move(am_class* i_this) { + switch (i_this->mState) { + case 0x14: + anm_init(i_this, AM_BCK_CLOSE_LOOP, 1.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f, -1); + i_this->mNeedleCyl.OnAtSetBit(); + i_this->mNeedleCyl.OnAtHitBit(); + i_this->mGravity = -11.0f; + i_this->speed.y = 40.0f; + i_this->speedF = 15.0f; + fopAcM_monsSeStart(i_this, JA_SE_CV_AM_JUMP, 0x42); + + f32 xDistToSpawn = i_this->mSpawnPos.x - i_this->current.pos.x; + f32 zDistToSpawn = i_this->mSpawnPos.z - i_this->current.pos.z; + i_this->mDesiredRotY = cM_atan2s(xDistToSpawn, zDistToSpawn); + i_this->mState += 1; + break; + case 0x15: + xDistToSpawn = i_this->mSpawnPos.x - i_this->current.pos.x; + zDistToSpawn = i_this->mSpawnPos.z - i_this->current.pos.z; + if (i_this->mAcch.ChkGroundHit()) { + i_this->mSmokeCbs[0].end(); + dComIfGp_particle_setToon( + 0xA125, &i_this->mWaistPos, &i_this->shape_angle, NULL, + 0xB9, &i_this->mSmokeCbs[0], fopAcM_GetRoomNo(i_this), NULL, NULL, NULL + ); + + dComIfGp_getVibration().StartShock(1, -0x21, cXyz(0.0f, 1.0f, 0.0f)); + // The fopAcM_seStart inline makes the codegen not match. + // fopAcM_seStart(i_this, JA_SE_CM_AM_JUMP, 0); + mDoAud_seStart(JA_SE_CM_AM_JUMP, &i_this->mEyePos, 0, dComIfGp_getReverb(fopAcM_GetRoomNo(i_this))); + fopAcM_monsSeStart(i_this, JA_SE_CV_AM_JUMP, 0x42); + + i_this->speed.y = 40.0f; + i_this->speedF = 15.0f; + i_this->mDesiredRotY = cM_atan2s(xDistToSpawn, zDistToSpawn); + } + + f32 xzDist = sqrtf(xDistToSpawn*xDistToSpawn + zDistToSpawn*zDistToSpawn); + if (xzDist < 20.0f) { + i_this->mDesiredRotY = i_this->mSpawnRotY; + i_this->speedF = 0.0f; + i_this->mState += 1; + } + break; + case 0x16: + s16 angleDiff = cLib_distanceAngleS(i_this->shape_angle.y, i_this->mDesiredRotY); + if (angleDiff < 0x100) { + i_this->mNeedleCyl.OffAtSetBit(); + i_this->mNeedleCyl.OffAtSetBit(); + i_this->mAttentionInfo.mFlags = 0; + i_this->mAction = ACTION_DOUSA; + i_this->mState = 0; + } + break; + } } /* 000028C4-00002A6C .text action_handou_move__FP8am_class */ -void action_handou_move(am_class* i_this) { +static void action_handou_move(am_class* i_this) { /* Nonmatching */ + daPy_py_c* player = daPy_getPlayerActorClass(); + switch (i_this->mState) { + case 0x1E: + i_this->speedF = 20.0f; + s16 angleToPlayer = fopAcM_searchPlayerAngleY(i_this); + i_this->current.angle.y = angleToPlayer + 0x8000; + if (i_this->mHugeKnockback == 1) { + i_this->current.angle.y = player->shape_angle.y - 0x4000; + i_this->speedF = 40.0f; + } + i_this->mDesiredRotY = i_this->current.angle.y; + if (i_this->mCurrBckIdx != AM_BCK_CLOSE && i_this->mCurrBckIdx != AM_BCK_CLOSE_LOOP) { + // Using the fopAcM_seStart inline multiple times makes the codegen not match. + // fopAcM_seStart(i_this, JA_SE_CM_AM_NEEDLE_OUT, 0); + // fopAcM_seStart(i_this, JA_SE_CM_AM_MOUTH_CLOSE, 0); + mDoAud_seStart(JA_SE_CM_AM_NEEDLE_OUT, &i_this->mEyePos, 0, dComIfGp_getReverb(fopAcM_GetRoomNo(i_this))); + mDoAud_seStart(JA_SE_CM_AM_MOUTH_CLOSE, &i_this->mEyePos, 0, dComIfGp_getReverb(fopAcM_GetRoomNo(i_this))); + anm_init(i_this, AM_BCK_CLOSE, 1.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f, -1); + } + i_this->mState += 1; + case 0x1F: + cLib_addCalc0(&i_this->speedF, 0.8f, 2.0f); + if (i_this->speedF < 0.1f) { + i_this->speedF = 0.0f; + i_this->mCountDownTimers[2] = 6; + i_this->current.angle.y = i_this->shape_angle.y; + i_this->mAction = ACTION_DOUSA; + i_this->mState = 3; + } + } } /* 00002A6C-000034F4 .text action_itai_move__FP8am_class */ -void action_itai_move(am_class* i_this) { - /* Nonmatching */ +static void action_itai_move(am_class* i_this) { + switch (i_this->mState) { + case 0x28: + i_this->mEyeRot.setall(0); + i_this->mNeedleCyl.OffAtSetBit(); + i_this->mNeedleCyl.OffAtSetBit(); + i_this->speedF = -20.0f; + i_this->current.angle.y = fopAcM_searchPlayerAngleY(i_this); + i_this->mDesiredRotY = i_this->current.angle.y; + fopAcM_seStart(i_this, JA_SE_CM_AM_NEEDLE_IN, 0); + anm_init(i_this, AM_BCK_DAMAGE, 1.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f, -1); + i_this->mState += 1; + // Fall-through + case 0x29: + cLib_addCalc0(&i_this->speedF, 0.8f, 2.0f); + // Using the mDoExt_McaMorf::isStop inline causes regswap. + // if (!i_this->mpMorf->isStop()) { + mDoExt_McaMorf* morf = i_this->mpMorf; + bool stopped = true; + if (!morf->mFrameCtrl.checkState(1) && morf->mFrameCtrl.getRate() != 0.0f) { stopped = false; } + if (!stopped) { + break; + } + i_this->mCountDownTimers[0] = 100; + i_this->speedF = 0.0f; + anm_init(i_this, AM_BCK_DAMAGE_LOOP, 1.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f, -1); + i_this->mState += 1; + break; + case 0x2A: + if (i_this->mCountDownTimers[0] != 0) { + break; + } + anm_init(i_this, AM_BCK_DAMAGE_END, 1.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f, -1); + // Using the fopAcM_seStart inline multiple times in a single case makes the codegen not match. + // fopAcM_seStart(i_this, JA_SE_CM_AM_NEEDLE_OUT, 0); + // fopAcM_seStart(i_this, JA_SE_CM_AM_MOUTH_CLOSE, 0); + mDoAud_seStart(JA_SE_CM_AM_NEEDLE_OUT, &i_this->mEyePos, 0, dComIfGp_getReverb(fopAcM_GetRoomNo(i_this))); + mDoAud_seStart(JA_SE_CM_AM_MOUTH_CLOSE, &i_this->mEyePos, 0, dComIfGp_getReverb(fopAcM_GetRoomNo(i_this))); + i_this->mState += 1; + break; + case 0x2B: + // Using the mDoExt_McaMorf::isStop inline causes regswap. + // if (!i_this->mpMorf->isStop()) { + morf = i_this->mpMorf; + stopped = true; + if (!morf->mFrameCtrl.checkState(1) && morf->mFrameCtrl.getRate() != 0.0f) { stopped = false; } + if (!stopped) { + break; + } + i_this->mNeedleCyl.OnAtSetBit(); + i_this->mNeedleCyl.OnAtHitBit(); + i_this->mCountUpTimers[0] = 0; + i_this->mAction = ACTION_DOUSA; + i_this->mState = 3; + break; + case 0x2C: + i_this->mSmokeCbs[3].end(); + i_this->mStts.SetWeight(0xFF); + dComIfGp_particle_setToon( + 0xA155, &i_this->mJawPos, &i_this->shape_angle, NULL, + 0xB9, &i_this->mSmokeCbs[3], fopAcM_GetRoomNo(i_this), NULL, NULL, NULL + ); + fopAcM_seStart(i_this, JA_SE_CM_AM_MOUTH_CLOSE, 0); + anm_init(i_this, AM_BCK_BOM_NOMI, 1.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f, -1); + mDoAud_onEnemyDamage(); + i_this->mEyeRot.setall(0); + i_this->mNeedleCyl.OffAtSetBit(); + i_this->mNeedleCyl.OffAtSetBit(); + i_this->mCountDownTimers[1] = 10; + i_this->mState += 1; + // Fall-through + case 0x2D: + bomb_move_set(i_this, 0); + if (i_this->mpMorf->checkFrame(3.0f)) { + // The fopAcM_seStart inline makes the codegen not match. + // fopAcM_seStart(i_this, JA_SE_CM_AM_EAT_BOMB, 0); + mDoAud_seStart(JA_SE_CM_AM_EAT_BOMB, &i_this->mEyePos, 0, dComIfGp_getReverb(fopAcM_GetRoomNo(i_this))); + fopAcM_monsSeStart(i_this, JA_SE_CV_AM_EAT_BOMB, 0); + } + if (i_this->mpMorf->checkFrame(6.0f)) { + i_this->mSmokeCbs[1].end(); + i_this->mNeedleCyl.OnAtSetBit(); + i_this->mNeedleCyl.OnAtHitBit(); + dComIfGp_particle_setToon( + 0xA126, &i_this->mJawPos, &i_this->shape_angle, NULL, + 0xB9, &i_this->mSmokeCbs[1], fopAcM_GetRoomNo(i_this), NULL, NULL, NULL + ); + i_this->m033C = dComIfGp_particle_set( + 0x8157, &i_this->mJawPos, NULL, NULL, + 0xFF, NULL, -1, NULL, NULL, NULL + ); + i_this->m0340 = dComIfGp_particle_set( + 0x8156, &i_this->mJawPos, NULL, NULL, + 0xFF, NULL, -1, NULL, NULL, NULL + ); + } + + // Using the mDoExt_McaMorf::isStop inline causes regswap. + // if (!i_this->mpMorf->isStop()) { + morf = i_this->mpMorf; + stopped = true; + if (!morf->mFrameCtrl.checkState(1) && morf->mFrameCtrl.getRate() != 0.0f) { stopped = false; } + if (!stopped) { + break; + } + i_this->mCountDownTimers[0] = 100; + i_this->mDesiredRotY = fopAcM_searchPlayerAngleY(i_this); + i_this->mState += 1; + break; + case 0x2E: + bomb_move_set(i_this, 1); + i_this->shape_angle.y += 0x1000; + if (i_this->mAcch.ChkGroundHit()) { + i_this->mSmokeCbs[0].end(); + // The fopAcM_seStart inline makes the codegen not match. + // fopAcM_seStart(i_this, JA_SE_CM_AM_JUMP, 0); + mDoAud_seStart(JA_SE_CM_AM_JUMP, &i_this->mEyePos, 0, dComIfGp_getReverb(fopAcM_GetRoomNo(i_this))); + dComIfGp_particle_setToon( + 0xA125, &i_this->mWaistPos, &i_this->shape_angle, NULL, + 0xB9, &i_this->mSmokeCbs[0], fopAcM_GetRoomNo(i_this), NULL, NULL, NULL + ); + dComIfGp_getVibration().StartShock(1, -0x21, cXyz(0.0f, 1.0f, 0.0f)); + // The fopAcM_seStart inline makes the codegen not match. + // fopAcM_seStart(i_this, JA_SE_CM_AM_JUMP_L, 0); + mDoAud_seStart(JA_SE_CM_AM_JUMP_L, &i_this->mEyePos, 0, dComIfGp_getReverb(fopAcM_GetRoomNo(i_this))); + fopAcM_monsSeStart(i_this, JA_SE_CV_AM_JITABATA, 0); + i_this->speed.y = 25.0f; + i_this->mGravity = -10.0f; + i_this->speedF = 10.0f; + } + + if (i_this->mCountDownTimers[0] != 0) { + break; + } + anm_init(i_this, AM_BCK_DEAD, 1.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f, -1); + dComIfGp_particle_set( + 0x8127, &i_this->mWaistPos, NULL, NULL, + 0xFF, NULL, -1, NULL, NULL, NULL + ); + dComIfGp_particle_set( + 0x8128, &i_this->mWaistPos, NULL, NULL, + 0xFF, NULL, -1, NULL, NULL, NULL + ); + + // The fopAcM_seStart inline makes the codegen not match. + // fopAcM_seStart(i_this, JA_SE_CM_AM_BEF_EXPLODE, 0); + mDoAud_seStart(JA_SE_CM_AM_BEF_EXPLODE, &i_this->mEyePos, 0, dComIfGp_getReverb(fopAcM_GetRoomNo(i_this))); + i_this->mDesiredRotY = i_this->current.angle.y; + + if (i_this->m033C) { + i_this->m033C->becomeInvalidEmitter(); + i_this->m033C = NULL; + } + if (i_this->m0340) { + i_this->m0340->becomeInvalidEmitter(); + i_this->m0340 = NULL; + } + i_this->speedF = 0.0f; + i_this->mState += 1; + break; + case 0x2F: + bomb_move_set(i_this, 1); + // Using the mDoExt_McaMorf::isStop inline causes regswap. + // if (!i_this->mpMorf->isStop()) { + morf = i_this->mpMorf; + stopped = true; + if (!morf->mFrameCtrl.checkState(1) && morf->mFrameCtrl.getRate() != 0.0f) { stopped = false; } + if (!stopped) { + break; + } + cXyz centerPos = i_this->current.pos; + centerPos.y += 150.0f; + if (i_this->mSwallowedActorProcID != -1) { + fopAc_ac_c* swallowedActor = fopAcM_SearchByID(i_this->mSwallowedActorProcID); + if (swallowedActor) { + swallowedActor->mScale.setAll(1.0f); + if (fpcM_GetName(swallowedActor) == PROC_BOMB) { + daBomb_c* bomb = (daBomb_c*)swallowedActor; + bomb->setBombRestTime(1); + } else if (fpcM_GetName(swallowedActor) == PROC_Bomb2) { + daBomb2::Act_c* bomb2 = (daBomb2::Act_c*)swallowedActor; + bomb2->set_time(1); + } + } + } + + // Using the fopAcM_seStart inline multiple times in a single case makes the codegen not match. + // fopAcM_seStart(i_this, JA_SE_CM_AM_EXPLODE, 0); + // fopAcM_seStart(i_this, JA_SE_LK_LAST_HIT, 0); + mDoAud_seStart(JA_SE_CM_AM_EXPLODE, &i_this->mEyePos, 0, dComIfGp_getReverb(fopAcM_GetRoomNo(i_this))); + mDoAud_seStart(JA_SE_LK_LAST_HIT, &i_this->mEyePos, 0, dComIfGp_getReverb(fopAcM_GetRoomNo(i_this))); + + fopAcM_createDisappear(i_this, ¢erPos, 5, 0, 0xFF); + fopAcM_onActor(i_this); + fopAcM_delete(i_this); + break; + } + + if (i_this->m033C) { + i_this->m033C->setGlobalRTMatrix(i_this->mpMorf->getModel()->getAnmMtx(2)); + } + if (i_this->m0340) { + i_this->m0340->setGlobalRTMatrix(i_this->mpMorf->getModel()->getAnmMtx(2)); + } + + if (i_this->mState == 0x29 || i_this->mState == 0x2A) { + bomb_nomi_check(i_this); + } } /* 000034F4-000039A4 .text daAM_Execute__FP8am_class */ -BOOL daAM_Execute(am_class* i_this) { +static BOOL daAM_Execute(am_class* i_this) { fopAcM_setGbaName(i_this, BOW, 0xC, 0x2A); if (enemy_ice(&i_this->mEnemyIce)) { @@ -298,36 +1063,36 @@ BOOL daAM_Execute(am_class* i_this) { return TRUE; } - for (int i = 0; i < ARRAY_SIZE(i_this->m02C8); i++) { - if (i_this->m02C8[i] != 0) { - i_this->m02C8[i]--; + for (int i = 0; i < ARRAY_SIZE(i_this->mCountDownTimers); i++) { + if (i_this->mCountDownTimers[i] != 0) { + i_this->mCountDownTimers[i]--; } } switch (i_this->mAction) { - case am_class::ACTION_DOUSA: + case ACTION_DOUSA: action_dousa(i_this); break; - case am_class::ACTION_MODORU_MOVE: + case ACTION_MODORU_MOVE: action_modoru_move(i_this); break; - case am_class::ACTION_HANDOU_MOVE: + case ACTION_HANDOU_MOVE: action_handou_move(i_this); break; - case am_class::ACTION_ITAI_MOVE: + case ACTION_ITAI_MOVE: action_itai_move(i_this); break; } - if (i_this->mAction != am_class::ACTION_ITAI_MOVE && i_this->m02F0 - 1500.0f > i_this->current.pos.y) { - anm_init(i_this, 0x1A, 0.0f, 0, 0.0f, -1); + if (i_this->mAction != ACTION_ITAI_MOVE && i_this->mSpawnPosY - 1500.0f > i_this->current.pos.y) { + anm_init(i_this, AM_BCK_DEAD, 1.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f, -1); - dComIfGp_particle_set(0x8127, &i_this->m030C, NULL, NULL); - dComIfGp_particle_set(0x8128, &i_this->m030C, NULL, NULL); + dComIfGp_particle_set(0x8127, &i_this->mWaistPos, NULL, NULL); + dComIfGp_particle_set(0x8128, &i_this->mWaistPos, NULL, NULL); fopAcM_seStart(i_this, JA_SE_CM_AM_BEF_EXPLODE, 0); - i_this->m02DA = i_this->current.angle.y; + i_this->mDesiredRotY = i_this->current.angle.y; if (i_this->m033C) { i_this->m033C->becomeInvalidEmitter(); @@ -339,16 +1104,16 @@ BOOL daAM_Execute(am_class* i_this) { } i_this->speedF = 0.0f; - i_this->mAction = am_class::ACTION_ITAI_MOVE; - i_this->m02C5 = 0x2F; + i_this->mAction = ACTION_ITAI_MOVE; + i_this->mState = 0x2F; } - cLib_addCalcAngleS2(&i_this->current.angle.y, i_this->m02DA, 1, 0x500); - if (i_this->m02C5 != 0x2E && i_this->m02C5 != 0x2F && i_this->m02C5 != 0x1F) { + cLib_addCalcAngleS2(&i_this->current.angle.y, i_this->mDesiredRotY, 1, 0x500); + if (i_this->mState != 0x2E && i_this->mState != 0x2F && i_this->mState != 0x1F) { cLib_addCalcAngleS2(&i_this->shape_angle.y, i_this->current.angle.y, 1, 0x500); } - if (i_this->m02C8[1] == 0) { + if (i_this->mCountDownTimers[1] == 0) { i_this->mpMorf->play(NULL, 0, 0); } @@ -374,13 +1139,13 @@ BOOL daAM_Execute(am_class* i_this) { i_this->mEyePos = i_this->current.pos; i_this->mEyePos.y += 250.0f; - cXyz swordPos = i_this->current.pos; + cXyz needlePos = i_this->current.pos; - i_this->mEyeSph.SetC(i_this->m02F4); + i_this->mEyeSph.SetC(i_this->mEyeballPos); i_this->mEyeSph.SetR(60.0f); dComIfG_Ccsp()->Set(&i_this->mEyeSph); - i_this->mMouthSph.SetC(i_this->m0300); + i_this->mMouthSph.SetC(i_this->mMouthPos); i_this->mMouthSph.SetR(100.0f); dComIfG_Ccsp()->Set(&i_this->mMouthSph); @@ -389,11 +1154,11 @@ BOOL daAM_Execute(am_class* i_this) { i_this->mBodyCyl.SetR(80.0f); dComIfG_Ccsp()->Set(&i_this->mBodyCyl); - swordPos.y += 40.0f; - i_this->mSwordCyl.SetC(swordPos); - i_this->mSwordCyl.SetH(30.0f); - i_this->mSwordCyl.SetR(130.0f); - dComIfG_Ccsp()->Set(&i_this->mSwordCyl); + needlePos.y += 40.0f; + i_this->mNeedleCyl.SetC(needlePos); + i_this->mNeedleCyl.SetH(30.0f); + i_this->mNeedleCyl.SetR(130.0f); + dComIfG_Ccsp()->Set(&i_this->mNeedleCyl); fopAcM_posMove(i_this, i_this->mStts.GetCCMoveP()); BG_check(i_this); @@ -403,12 +1168,12 @@ BOOL daAM_Execute(am_class* i_this) { } /* 000039A4-000039AC .text daAM_IsDelete__FP8am_class */ -BOOL daAM_IsDelete(am_class* i_this) { +static BOOL daAM_IsDelete(am_class* i_this) { return TRUE; } /* 000039AC-00003A84 .text daAM_Delete__FP8am_class */ -BOOL daAM_Delete(am_class* i_this) { +static BOOL daAM_Delete(am_class* i_this) { dComIfG_resDelete(&i_this->mPhs, "AM"); for (int i = 0; i < 4; i++) { @@ -429,14 +1194,14 @@ BOOL daAM_Delete(am_class* i_this) { } /* 00003A84-00003C00 .text useHeapInit__FP10fopAc_ac_c */ -BOOL useHeapInit(fopAc_ac_c* i_actor) { +static BOOL useHeapInit(fopAc_ac_c* i_actor) { am_class* i_this = (am_class*)i_actor; i_this->mpMorf = new mDoExt_McaMorf( - (J3DModelData*)dComIfG_getObjectRes("AM", 0x22), // am.bdl + (J3DModelData*)dComIfG_getObjectRes("AM", AM_BDL_AM), NULL, NULL, - (J3DAnmTransformKey*)dComIfG_getObjectRes("AM", 0x1F), // sleep_loop.bck - J3DFrameCtrl::LOOP_REPEAT_e, 0.0f, 0, -1, 1, + (J3DAnmTransformKey*)dComIfG_getObjectRes("AM", AM_BCK_SLEEP_LOOP), + J3DFrameCtrl::LOOP_REPEAT_e, 1.0f, 0, -1, 1, NULL, 0x00000000, 0x11020203 @@ -462,9 +1227,9 @@ BOOL useHeapInit(fopAc_ac_c* i_actor) { /* field_0x8 */ (cXyz*)&cyl2_eye_offset, }, }; - i_this->m02B4 = JntHit_create(i_this->mpMorf->getModel(), search_data, ARRAY_SIZE(search_data)); - if (i_this->m02B4) { - i_this->mJntHit = i_this->m02B4; + i_this->mEyeJntHit = JntHit_create(i_this->mpMorf->getModel(), search_data, ARRAY_SIZE(search_data)); + if (i_this->mEyeJntHit) { + i_this->mJntHit = i_this->mEyeJntHit; } else { return FALSE; } @@ -473,7 +1238,7 @@ BOOL useHeapInit(fopAc_ac_c* i_actor) { } /* 00003C00-00003F5C .text daAM_Create__FP10fopAc_ac_c */ -s32 daAM_Create(fopAc_ac_c* i_actor) { +static s32 daAM_Create(fopAc_ac_c* i_actor) { fopAcM_SetupActor(i_actor, am_class); am_class* i_this = (am_class*)i_actor; @@ -509,8 +1274,8 @@ s32 daAM_Create(fopAc_ac_c* i_actor) { } else { i_this->mAreaRadius = i_this->mPrmAreaRadius * 100.0f; } - i_this->m02F0 = i_this->current.pos.y; - i_this->m02E4 = -1; + i_this->mSpawnPosY = i_this->current.pos.y; + i_this->mSwallowedActorProcID = -1; if (i_this->mStartsInactive == 0 && i_this->mSwitch != 0xFF && dComIfGs_isSwitch(i_this->mSwitch, dComIfGp_roomControl_getStayNo())) { // When mStartsInactive is 0, the Armos Knight starts active and attacking the player. @@ -668,15 +1433,15 @@ s32 daAM_Create(fopAc_ac_c* i_actor) { /* Height */ 0.0f, }, }; - i_this->mSwordCyl.Set(sword_co_cyl_src); - i_this->mSwordCyl.SetStts(&i_this->mStts); + i_this->mNeedleCyl.Set(sword_co_cyl_src); + i_this->mNeedleCyl.SetStts(&i_this->mStts); - i_this->mSwordCyl.OffAtSetBit(); - i_this->mSwordCyl.OffAtSetBit(); + i_this->mNeedleCyl.OffAtSetBit(); + i_this->mNeedleCyl.OffAtSetBit(); - i_this->m02DA = i_this->current.angle.y; - i_this->m0324 = i_this->current.pos; - i_this->m02DC = i_this->current.angle.y; + i_this->mDesiredRotY = i_this->current.angle.y; + i_this->mSpawnPos = i_this->current.pos; + i_this->mSpawnRotY = i_this->current.angle.y; draw_SUB(i_this); } diff --git a/src/d/actor/d_a_arrow.cpp b/src/d/actor/d_a_arrow.cpp index e603211e0..576dd6fa1 100644 --- a/src/d/actor/d_a_arrow.cpp +++ b/src/d/actor/d_a_arrow.cpp @@ -318,6 +318,8 @@ void daArrow_c::arrowUseMp() { } // This is a fake inline (not present in debug maps) which is required for ShieldReflect to match. +// It's possible that an inline similar to this was added to the final game even though it didn't exist in the demo, +// as this section of code was missing from the demo's version of ShieldReflect. inline void setSphereCoordsFromXYAngles(cXyz& xyz, f32 mag, s16 targetAngleX, s16 targetAngleY) { f32 normZ; f32 normY; diff --git a/src/d/actor/d_a_bomb.cpp b/src/d/actor/d_a_bomb.cpp index 662923009..048999042 100644 --- a/src/d/actor/d_a_bomb.cpp +++ b/src/d/actor/d_a_bomb.cpp @@ -3,12 +3,19 @@ // Translation Unit: d_a_bomb.cpp // -#include "d_a_bomb.h" +#include "d/actor/d_a_bomb.h" #include "dolphin/types.h" +#include "m_Do/m_Do_ext.h" -/* 800D9318-800D9364 .text chk_attrState__22@unnamed@d_a_bomb_cpp@FPC8daBomb_cQ222@unnamed@d_a_bomb_cpp@8AttrSt_e */ -void @unnamed@d_a_bomb_cpp@::chk_attrState(const daBomb_c*, @unnamed@d_a_bomb_cpp@::AttrSt_e) { - /* Nonmatching */ +namespace { + enum AttrSt_e { + + }; + + /* 800D9318-800D9364 .text chk_attrState__22@unnamed@d_a_bomb_cpp@FPC8daBomb_cQ222@unnamed@d_a_bomb_cpp@8AttrSt_e */ + void chk_attrState(const daBomb_c*, AttrSt_e) { + /* Nonmatching */ + } } /* 800D9364-800D977C .text executeAfter__25daBomb_fuseSmokeEcallBackFP14JPABaseEmitter */ @@ -311,11 +318,6 @@ daBomb_c::daBomb_c() { /* Nonmatching */ } -/* 800DCEBC-800DCEF8 .text __dt__15LIGHT_INFLUENCEFv */ -LIGHT_INFLUENCE::~LIGHT_INFLUENCE() { - /* Nonmatching */ -} - /* 800DCEF8-800DCF18 .text daBomb_Create__FP10fopAc_ac_c */ void daBomb_Create(fopAc_ac_c*) { /* Nonmatching */ @@ -326,26 +328,6 @@ void daBomb_c::create_init() { /* Nonmatching */ } -/* 800DD1A4-800DD210 .text __dt__26daBomb_fuseSparksEcallBackFv */ -daBomb_fuseSparksEcallBack::~daBomb_fuseSparksEcallBack() { - /* Nonmatching */ -} - -/* 800DD210-800DD27C .text __dt__25daBomb_fuseSmokeEcallBackFv */ -daBomb_fuseSmokeEcallBack::~daBomb_fuseSmokeEcallBack() { - /* Nonmatching */ -} - -/* 800DD27C-800DD2EC .text __dt__13dBgS_BombAcchFv */ -dBgS_BombAcch::~dBgS_BombAcch() { - /* Nonmatching */ -} - -/* 800DD2EC-800DD348 .text __dt__13mDoExt_bckAnmFv */ -mDoExt_bckAnm::~mDoExt_bckAnm() { - /* Nonmatching */ -} - /* 800DD348-800DD34C .text draw__26daBomb_fuseSparksEcallBackFP14JPABaseEmitter */ void daBomb_fuseSparksEcallBack::draw(JPABaseEmitter*) { /* Nonmatching */ @@ -370,14 +352,3 @@ void daBomb_fuseSmokeEcallBack::draw(JPABaseEmitter*) { void daBomb_fuseSmokeEcallBack::setup(JPABaseEmitter*, const cXyz*, const csXyz*, signed char) { /* Nonmatching */ } - -/* 800DD36C-800DD374 .text @32@__dt__13dBgS_BombAcchFv */ -void @32@__dt__13dBgS_BombAcchFv { - /* Nonmatching */ -} - -/* 800DD374-800DD37C .text @20@__dt__13dBgS_BombAcchFv */ -void @20@__dt__13dBgS_BombAcchFv { - /* Nonmatching */ -} - diff --git a/src/d/actor/d_a_bomb2.cpp b/src/d/actor/d_a_bomb2.cpp index 66c3be87a..5d7a7109b 100644 --- a/src/d/actor/d_a_bomb2.cpp +++ b/src/d/actor/d_a_bomb2.cpp @@ -3,7 +3,7 @@ // Translation Unit: d_a_bomb2.cpp // -#include "d_a_bomb2.h" +#include "d/actor/d_a_bomb2.h" #include "dolphin/types.h" /* 800DD37C-800DD454 .text set__Q27daBomb25Env_cFRC4cXyz */ @@ -476,30 +476,34 @@ void daBomb2::Act_c::_draw() { /* Nonmatching */ } -/* 800E0A80-800E0AA0 .text Mthd_Create__Q27daBomb223@unnamed@d_a_bomb2_cpp@FPv */ -void daBomb2::@unnamed@d_a_bomb2_cpp@::Mthd_Create(void*) { - /* Nonmatching */ -} +namespace daBomb2 { + namespace { + /* 800E0A80-800E0AA0 .text Mthd_Create__Q27daBomb223@unnamed@d_a_bomb2_cpp@FPv */ + void Mthd_Create(void*) { + /* Nonmatching */ + } -/* 800E0AA0-800E0AC4 .text Mthd_Delete__Q27daBomb223@unnamed@d_a_bomb2_cpp@FPv */ -void daBomb2::@unnamed@d_a_bomb2_cpp@::Mthd_Delete(void*) { - /* Nonmatching */ -} + /* 800E0AA0-800E0AC4 .text Mthd_Delete__Q27daBomb223@unnamed@d_a_bomb2_cpp@FPv */ + void Mthd_Delete(void*) { + /* Nonmatching */ + } -/* 800E0AC4-800E0AE8 .text Mthd_Execute__Q27daBomb223@unnamed@d_a_bomb2_cpp@FPv */ -void daBomb2::@unnamed@d_a_bomb2_cpp@::Mthd_Execute(void*) { - /* Nonmatching */ -} + /* 800E0AC4-800E0AE8 .text Mthd_Execute__Q27daBomb223@unnamed@d_a_bomb2_cpp@FPv */ + void Mthd_Execute(void*) { + /* Nonmatching */ + } -/* 800E0AE8-800E0B0C .text Mthd_Draw__Q27daBomb223@unnamed@d_a_bomb2_cpp@FPv */ -void daBomb2::@unnamed@d_a_bomb2_cpp@::Mthd_Draw(void*) { - /* Nonmatching */ -} + /* 800E0AE8-800E0B0C .text Mthd_Draw__Q27daBomb223@unnamed@d_a_bomb2_cpp@FPv */ + void Mthd_Draw(void*) { + /* Nonmatching */ + } -/* 800E0B0C-800E0B14 .text Mthd_IsDelete__Q27daBomb223@unnamed@d_a_bomb2_cpp@FPv */ -void daBomb2::@unnamed@d_a_bomb2_cpp@::Mthd_IsDelete(void*) { - /* Nonmatching */ -} + /* 800E0B0C-800E0B14 .text Mthd_IsDelete__Q27daBomb223@unnamed@d_a_bomb2_cpp@FPv */ + void Mthd_IsDelete(void*) { + /* Nonmatching */ + } + }; +}; /* 800E0B14-800E0B80 .text __dt__Q27daBomb214FuseSparksCB_cFv */ daBomb2::FuseSparksCB_c::~FuseSparksCB_c() { @@ -510,9 +514,3 @@ daBomb2::FuseSparksCB_c::~FuseSparksCB_c() { daBomb2::FuseSmokeCB_c::~FuseSmokeCB_c() { /* Nonmatching */ } - -/* 800E0BEC-800E0C08 .text PrmAbstract__5daObjFPC10fopAc_ac_cQ37daBomb25Act_c5Prm_eQ37daBomb25Act_c5Prm_e */ -void daObj::PrmAbstract(const fopAc_ac_c*, daBomb2::Act_c::Prm_e, daBomb2::Act_c::Prm_e) { - /* Nonmatching */ -} - diff --git a/src/d/actor/d_a_obj_barrier.cpp b/src/d/actor/d_a_obj_barrier.cpp index 69d80200e..702dd7e88 100644 --- a/src/d/actor/d_a_obj_barrier.cpp +++ b/src/d/actor/d_a_obj_barrier.cpp @@ -540,7 +540,7 @@ void daObjBarrier_ef_c::execute() { if (((active_flags >> i) & 1)) { mBtk[i].play(); - if ((int)mBtk[i].isStop() == true) { + if (mBtk[i].isStop() == true) { active_flags ^= 1 << i; mHitActor[i] = NULL; } diff --git a/src/d/actor/d_a_obj_toripost.cpp b/src/d/actor/d_a_obj_toripost.cpp index 3ef8ce3b8..bcaa03409 100644 --- a/src/d/actor/d_a_obj_toripost.cpp +++ b/src/d/actor/d_a_obj_toripost.cpp @@ -50,7 +50,6 @@ public: int getMsgNormal(); u32 getMsg(); u16 next_msgStatus(u32* msgId); - void anmAtr(u16); bool checkTalk(); void eventOrder(); void checkOrder(); @@ -151,7 +150,7 @@ const dCcD_SrcCyl daObjTpost_c::m_cyl_src = { 0.0, // Radius 0.0, // Height }; -static const s32 daObjTpost_c::m_send_price[] = { +const s32 daObjTpost_c::m_send_price[] = { 0x05, 0x0A, 0x14 @@ -305,7 +304,12 @@ void daObjTpost_c::cutSetAnmStart(int staffIdx) { } void daObjTpost_c::cutSetAnmProc(int staffIdx) { - if(mMorf->isStop()) { //probably regswap in isStop() + // Using the mDoExt_McaMorf::isStop inline causes regswap. + // if(mMorf->isStop()) { // + mDoExt_McaMorf* morf = mMorf; + bool stopped = true; + if (!morf->mFrameCtrl.checkState(1) && morf->mFrameCtrl.getRate() != 0.0f) { stopped = false; } + if (stopped) { dComIfGp_evmng_cutEnd(staffIdx); } } @@ -835,7 +839,12 @@ void daObjTpost_c::modeTalkXY() { } if(field_0x6C9 == 2 || field_0x6C9 == 3) { - if(mMorf->isStop()) { //probably regswap in isStop() + // Using the mDoExt_McaMorf::isStop inline causes regswap. + // if(mMorf->isStop()) { + mDoExt_McaMorf* morf = mMorf; + bool stopped = true; + if (!morf->mFrameCtrl.checkState(1) && morf->mFrameCtrl.getRate() != 0.0f) { stopped = false; } + if (stopped) { if(cLib_calcTimer(&field_0x8DC) == 0 && talk(1) == dNpcMsgStts_BOX_CLOSED_e) { modeProc(PROC_INIT, 0); dComIfGp_event_onEventFlag(8); diff --git a/src/d/d_a_bomb_static.cpp b/src/d/d_a_bomb_static.cpp index 16672aad3..716453dc2 100644 --- a/src/d/d_a_bomb_static.cpp +++ b/src/d/d_a_bomb_static.cpp @@ -3,16 +3,17 @@ // Translation Unit: d_a_bomb_static.cpp // -#include "d_a_bomb_static.h" +#include "d/actor/d_a_bomb.h" +#include "d/actor/d_a_bomb2.h" #include "dolphin/types.h" /* 80067FA0-80067FD0 .text getBombRestTime__8daBomb_cFv */ -void daBomb_c::getBombRestTime() { +s16 daBomb_c::getBombRestTime() { /* Nonmatching */ } /* 80067FD0-80068000 .text getBombCheck_Flag__8daBomb_cFv */ -void daBomb_c::getBombCheck_Flag() { +s16 daBomb_c::getBombCheck_Flag() { /* Nonmatching */ } @@ -112,12 +113,12 @@ void daBomb2::Act_c::set_time(int) { } /* 80068490-80068498 .text get_time__Q27daBomb25Act_cCFv */ -void daBomb2::Act_c::get_time() const { +s32 daBomb2::Act_c::get_time() const { /* Nonmatching */ } /* 80068498-800684A0 .text chk_eat__Q27daBomb25Act_cCFv */ -void daBomb2::Act_c::chk_eat() const { +bool daBomb2::Act_c::chk_eat() const { /* Nonmatching */ } @@ -135,9 +136,3 @@ void daBomb2::Act_c::set_no_hit() { void daBomb2::Act_c::chk_explode() { /* Nonmatching */ } - -/* 800684F4-80068510 .text PrmAbstract__5daObjFPC10fopAc_ac_cQ28daBomb_c5Prm_eQ28daBomb_c5Prm_e */ -void daObj::PrmAbstract(const fopAc_ac_c*, daBomb_c::Prm_e, daBomb_c::Prm_e) { - /* Nonmatching */ -} - diff --git a/src/d/d_cc_uty.cpp b/src/d/d_cc_uty.cpp index 1600eea92..ff04bff18 100644 --- a/src/d/d_cc_uty.cpp +++ b/src/d/d_cc_uty.cpp @@ -3,7 +3,7 @@ // Translation Unit: d_cc_uty.cpp // -#include "d_cc_uty.h" +#include "d/d_cc_uty.h" #include "dolphin/types.h" /* 800AE938-800AE9E8 .text cc_pl_cut_bit_get__Fv */ @@ -40,9 +40,3 @@ void at_power_check(CcAtInfo*) { void cc_at_check(fopAc_ac_c*, CcAtInfo*) { /* Nonmatching */ } - -/* 800AF368-800AF384 .text PrmAbstract__5daObjFPC10fopAc_ac_cQ37daTsubo5Act_c5Prm_eQ37daTsubo5Act_c5Prm_e */ -void daObj::PrmAbstract(const fopAc_ac_c*, daTsubo::Act_c::Prm_e, daTsubo::Act_c::Prm_e) { - /* Nonmatching */ -} - diff --git a/src/d/d_particle.cpp b/src/d/d_particle.cpp index 747015b63..4653a81ed 100644 --- a/src/d/d_particle.cpp +++ b/src/d/d_particle.cpp @@ -16,11 +16,6 @@ dPa_J3DmodelEmitter_c::dPa_J3DmodelEmitter_c(JPABaseEmitter*, J3DModelData*, dKy /* Nonmatching */ } -// /* 8007A804-8007A84C .text __dt__18dPa_modelEmitter_cFv */ -// dPa_modelEmitter_c::~dPa_modelEmitter_c() { -// /* Nonmatching */ -// } - /* 8007A84C-8007A8C8 .text __dt__21dPa_J3DmodelEmitter_cFv */ dPa_J3DmodelEmitter_c::~dPa_J3DmodelEmitter_c() { if (mpHeap) { @@ -45,6 +40,7 @@ dPa_J3Dmodel_c::dPa_J3Dmodel_c() { /* 8007AED8-8007AF64 .text __dt__18dPa_modelControl_cFv */ dPa_modelControl_c::~dPa_modelControl_c() { + /* Nonmatching (node_class has no virtual destructor) */ node_class* node = parent.mpHead; while (node) { node_class* nextNode = node->mpNextNode; @@ -94,11 +90,6 @@ dPa_smokeEcallBack::dPa_smokeEcallBack(unsigned char) { /* Nonmatching */ } -// /* 8007B444-8007B4B0 .text __dt__19dPa_followEcallBackFv */ -// dPa_followEcallBack::~dPa_followEcallBack() { -// /* Nonmatching */ -// } - /* 8007B4B0-8007B558 .text __ct__18dPa_smokeEcallBackFUcUcUcUc */ dPa_smokeEcallBack::dPa_smokeEcallBack(unsigned char, unsigned char, unsigned char, unsigned char) { /* Nonmatching */ @@ -114,16 +105,6 @@ void dPa_smokeEcallBack::setup(JPABaseEmitter*, const cXyz*, const csXyz*, signe /* Nonmatching */ } -// /* 8007B698-8007B6F4 .text __dt__18dPa_smokePcallBackFv */ -// dPa_smokePcallBack::~dPa_smokePcallBack() { -// /* Nonmatching */ -// } - -// /* 8007B6F4-8007B73C .text __dt__54JPACallBackBase2Fv */ -// JPACallBackBase2::~JPACallBackBase2() { -// /* Nonmatching */ -// } - /* 8007B73C-8007B804 .text initiateLighting__FR11_GXColorS10R8_GXColorR8_GXColor */ void initiateLighting(_GXColorS10&, _GXColor&, _GXColor&) { /* Nonmatching */ @@ -170,11 +151,6 @@ dPa_simpleEcallBack::dPa_simpleEcallBack() { mCount = 0; } -// /* 8007C420-8007C45C .text __dt__16dPa_simpleData_cFv */ -// dPa_simpleData_c::~dPa_simpleData_c() { -// /* Nonmatching */ -// } - /* 8007C45C-8007C460 .text __ct__16dPa_simpleData_cFv */ dPa_simpleData_c::dPa_simpleData_c() { /* Nonmatching */ @@ -185,11 +161,6 @@ void dPa_simpleEcallBack::executeAfter(JPABaseEmitter*) { /* Nonmatching */ } -// /* 8007C618-8007C674 .text __dt__17dPa_windPcallBackFv */ -// dPa_windPcallBack::~dPa_windPcallBack() { -// /* Nonmatching */ -// } - /* 8007C674-8007C6EC .text draw__19dPa_simpleEcallBackFP14JPABaseEmitter */ void dPa_simpleEcallBack::draw(JPABaseEmitter*) { /* Nonmatching */ @@ -220,11 +191,6 @@ dPa_control_c::dPa_control_c() { /* Nonmatching */ } -// /* 8007C9A4-8007CA28 .text __dt__19dPa_simpleEcallBackFv */ -// dPa_simpleEcallBack::~dPa_simpleEcallBack() { -// /* Nonmatching */ -// } - /* 8007CA28-8007CA30 .text getRM_ID__13dPa_control_cFUs */ void dPa_control_c::getRM_ID(unsigned short) { /* Nonmatching */ @@ -465,91 +431,21 @@ void dPa_trackEcallBack::draw(JPABaseEmitter*) { /* Nonmatching */ } -// /* 8007F62C-8007F698 .text __dt__18dPa_trackEcallBackFv */ -// dPa_trackEcallBack::~dPa_trackEcallBack() { -// /* Nonmatching */ -// } - -// /* 8007F698-8007F704 .text __dt__22dPa_bombSmokeEcallBackFv */ -// dPa_bombSmokeEcallBack::~dPa_bombSmokeEcallBack() { -// /* Nonmatching */ -// } - /* 8007F704-8007F708 .text setup__22dPa_bombSmokeEcallBackFP14JPABaseEmitterPC4cXyzPC5csXyzSc */ void dPa_bombSmokeEcallBack::setup(JPABaseEmitter*, const cXyz*, const csXyz*, signed char) { /* Nonmatching */ } -// /* 8007F708-8007F764 .text __dt__19dPa_kageroEcallBackFv */ -// dPa_kageroEcallBack::~dPa_kageroEcallBack() { -// /* Nonmatching */ -// } - -// /* 8007F764-8007F7D0 .text __dt__20dPa_stripesEcallBackFv */ -// dPa_stripesEcallBack::~dPa_stripesEcallBack() { -// /* Nonmatching */ -// } - /* 8007F7D0-8007F7D4 .text setup__20dPa_stripesEcallBackFP14JPABaseEmitterPC4cXyzPC5csXyzSc */ void dPa_stripesEcallBack::setup(JPABaseEmitter*, const cXyz*, const csXyz*, signed char) { /* Nonmatching */ } -// /* 8007F7D4-8007F840 .text __dt__22dPa_cutTurnEcallBack_cFv */ -// dPa_cutTurnEcallBack_c::~dPa_cutTurnEcallBack_c() { -// /* Nonmatching */ -// } - -// /* 8007F840-8007F8AC .text __dt__19dPa_splashEcallBackFv */ -// dPa_splashEcallBack::~dPa_splashEcallBack() { -// /* Nonmatching */ -// } - -// /* 8007F8AC-8007F940 .text __dt__17dPa_waveEcallBackFv */ -// dPa_waveEcallBack::~dPa_waveEcallBack() { -// /* Nonmatching */ -// } - -// /* 8007F940-8007F99C .text __dt__19dPa_ripplePcallBackFv */ -// dPa_ripplePcallBack::~dPa_ripplePcallBack() { -// /* Nonmatching */ -// } - -/* 8007F99C-8007F9A0 .text init__54JPACallBackBase2FP14JPABaseEmitterP15JPABaseParticle */ -void JPACallBackBase2::init(JPABaseEmitter*, JPABaseParticle*) { - /* Nonmatching */ -} - -// /* 8007F9A0-8007FA0C .text __dt__25dPa_singleRippleEcallBackFv */ -// dPa_singleRippleEcallBack::~dPa_singleRippleEcallBack() { -// /* Nonmatching */ -// } - -// /* 8007FA0C-8007FA78 .text __dt__19dPa_rippleEcallBackFv */ -// dPa_rippleEcallBack::~dPa_rippleEcallBack() { -// /* Nonmatching */ -// } - -/* 8007FA78-8007FA7C .text draw__54JPACallBackBase2FP14JPABaseEmitterP15JPABaseParticle */ -void JPACallBackBase2::draw(JPABaseEmitter*, JPABaseParticle*) { - /* Nonmatching */ -} - -// /* 8007FA7C-8007FAE8 .text __dt__22dPa_selectTexEcallBackFv */ -// dPa_selectTexEcallBack::~dPa_selectTexEcallBack() { -// /* Nonmatching */ -// } - /* 8007FAE8-8007FAEC .text setup__22dPa_selectTexEcallBackFP14JPABaseEmitterPC4cXyzPC5csXyzSc */ void dPa_selectTexEcallBack::setup(JPABaseEmitter*, const cXyz*, const csXyz*, signed char) { /* Nonmatching */ } -/* 8007FAEC-8007FAF0 .text execute__54JPACallBackBase2FP14JPABaseEmitterP15JPABaseParticle */ -void JPACallBackBase2::execute(JPABaseEmitter*, JPABaseParticle*) { - /* Nonmatching */ -} - /* 8007FF78-8007FFA8 .text draw__21dPa_setColorEcallBackFP14JPABaseEmitter */ void dPa_setColorEcallBack::draw(JPABaseEmitter*) { /* Nonmatching */ @@ -559,8 +455,3 @@ void dPa_setColorEcallBack::draw(JPABaseEmitter*) { void dPa_setColorEcallBack::setup(JPABaseEmitter*, const cXyz*, const csXyz*, signed char) { /* Nonmatching */ } - -// /* 8007FFAC-80080018 .text __dt__21dPa_setColorEcallBackFv */ -// dPa_setColorEcallBack::~dPa_setColorEcallBack() { -// /* Nonmatching */ -// }