mirror of https://github.com/zeldaret/tp.git
make nbomb inherit instead of creating a fopAc_ac_c object (#1937)
* make nbomb inherit instead of creating an object * add newline at the end of the cpp
This commit is contained in:
parent
f123de29e6
commit
febfd40837
|
|
@ -7,14 +7,13 @@
|
|||
#include "f_op/f_op_actor_mng.h"
|
||||
#include "d/d_procname.h"
|
||||
|
||||
class daNbomb_c {
|
||||
class daNbomb_c : public fopAc_ac_c {
|
||||
public:
|
||||
enum daNbomb_FLG0 { WATER_BOMB = 16 };
|
||||
|
||||
u32 checkStateFlg0(daNbomb_FLG0 flag) const { return mStateFlg0 & flag; }
|
||||
u32 checkWaterBomb() const { return checkStateFlg0(WATER_BOMB); }
|
||||
|
||||
/* 0x000 */ fopAc_ac_c mActor;
|
||||
/* 0x568 */ u8 field_0x568[0x10];
|
||||
/* 0x578 */ dBgS_Acch mAcch;
|
||||
/* 0x750 */ dBgS_AcchCir mAcchCir;
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@
|
|||
#include "d/d_procname.h"
|
||||
|
||||
bool dBomb_c::checkStateCarry() {
|
||||
return (fopAcM_checkCarryNow(&mActor) || fopAcM_checkHookCarryNow(&mActor) ||
|
||||
fopAcM_GetParam(&mActor) == 2 || fopAcM_GetParam(&mActor) == 1);
|
||||
return (fopAcM_checkCarryNow(this) || fopAcM_checkHookCarryNow(this) ||
|
||||
fopAcM_GetParam(this) == 2 || fopAcM_GetParam(this) == 1);
|
||||
}
|
||||
|
||||
bool dBomb_c::checkFlowerBombWait(fopAc_ac_c* param_1) {
|
||||
|
|
@ -16,9 +16,9 @@ bool dBomb_c::checkFlowerBombWait(fopAc_ac_c* param_1) {
|
|||
}
|
||||
|
||||
bool dBomb_c::checkWaterBomb(fopAc_ac_c* param_1) {
|
||||
return (fopAcM_GetName(&mActor) == PROC_NBOMB && daNbomb_c::checkWaterBomb());
|
||||
return (fopAcM_GetName(this) == PROC_NBOMB && daNbomb_c::checkWaterBomb());
|
||||
}
|
||||
|
||||
bool dBomb_c::checkInsectBombMove(fopAc_ac_c* param_1) {
|
||||
return (fopAcM_GetName(&mActor) == PROC_NBOMB && fopAcM_GetParam(&mActor) == 7);
|
||||
}
|
||||
return (fopAcM_GetName(this) == PROC_NBOMB && fopAcM_GetParam(this) == 7);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue