mirror of
https://github.com/zeldaret/tp
synced 2026-06-22 00:46:46 -04:00
d_a_obj_pumpkin OK (#2715)
* Initial obj_pumpkin work * pumpkin execute done * d_a_obj_pumpkin OK * Remove NONMATCHING in obj_pumpkin * obj_pumpkin PR comments
This commit is contained in:
@@ -12,58 +12,37 @@
|
||||
*
|
||||
*/
|
||||
|
||||
struct daNpc_Jagar_HIOParam {
|
||||
/* 0x00 */ daNpcT_HIOParam common;
|
||||
/* 0x8C */ f32 pumpkin_watch_range;
|
||||
/* 0x90 */ f32 pumpkin_watch_Ymax;
|
||||
/* 0x94 */ f32 pumpkin_watch_Ymin;
|
||||
/* 0x98 */ f32 running_speed;
|
||||
/* 0x9C */ f32 hidden_state_release_dist;
|
||||
};
|
||||
|
||||
class daNpc_Jagar_Param_c {
|
||||
public:
|
||||
/* 80A1A2C4 */ virtual ~daNpc_Jagar_Param_c() {}
|
||||
|
||||
struct Data {
|
||||
/* 0x00 */ f32 field_0x00; // 170.0f
|
||||
/* 0x04 */ f32 field_0x04; // -3.0f
|
||||
/* 0x08 */ f32 field_0x08; // 1.0f
|
||||
/* 0x0C */ f32 field_0x0c; // 400.0f
|
||||
/* 0x10 */ f32 field_0x10; // 255.0f
|
||||
/* 0x14 */ f32 field_0x14; // 160.0f
|
||||
/* 0x18 */ f32 field_0x18; // 35.0f
|
||||
/* 0x1C */ f32 field_0x1c; // 30.0f
|
||||
/* 0x20 */ f32 field_0x20; // 0.0f
|
||||
/* 0x24 */ f32 field_0x24; // 0.0f
|
||||
/* 0x28 */ f32 field_0x28; // 10.0f
|
||||
/* 0x2C */ f32 field_0x2c; // -10.0f
|
||||
/* 0x30 */ f32 field_0x30; // 30.0f
|
||||
/* 0x34 */ f32 field_0x34; // -10.0f
|
||||
/* 0x38 */ f32 field_0x38; // 45.0f
|
||||
/* 0x3C */ f32 field_0x3c; // -45.0f
|
||||
/* 0x40 */ f32 field_0x40; // 0.6f
|
||||
/* 0x44 */ f32 field_0x44; // 12.0f
|
||||
/* 0x48 */ s16 field_0x48;
|
||||
/* 0x4A */ s16 field_0x4a;
|
||||
/* 0x4C */ s16 field_0x4c;
|
||||
/* 0x4E */ s16 field_0x4e;
|
||||
/* 0x50 */ f32 field_0x50; // 110.0f
|
||||
/* 0x54 */ f32 field_0x54; // 500.0f
|
||||
/* 0x58 */ f32 field_0x58; // 300.0f
|
||||
/* 0x5C */ f32 field_0x5c; // -300.0f
|
||||
/* 0x60 */ s16 field_0x60; // 60
|
||||
/* 0x62 */ s16 field_0x62; // 8
|
||||
/* 0x64 */ f32 field_0x64; // 0.0f
|
||||
/* 0x68 */ f32 field_0x68; // 0.0f
|
||||
/* 0x6C */ f32 field_0x6c; // 4.0f
|
||||
/* 0x70 */ f32 field_0x70; // 0.0f
|
||||
/* 0x74 */ f32 field_0x74; // 0.0f
|
||||
/* 0x78 */ f32 field_0x78; // 0.0f
|
||||
/* 0x7C */ f32 field_0x7c; // 0.0f
|
||||
/* 0x80 */ f32 field_0x80; // 0.0f
|
||||
/* 0x84 */ f32 field_0x84; // 0.0f
|
||||
/* 0x88 */ f32 field_0x88; // 0.0f
|
||||
/* 0x8C */ f32 field_0x8c; // 1400.0f
|
||||
/* 0x90 */ f32 field_0x90; // 200.0f
|
||||
/* 0x94 */ f32 field_0x94; // -800.0f
|
||||
/* 0x98 */ f32 field_0x98; // 16.0f
|
||||
/* 0x9C */ f32 field_0x9c; // 1800.0f
|
||||
};
|
||||
|
||||
static const Data m;
|
||||
};
|
||||
public:
|
||||
/* 80A1A2C4 */ virtual ~daNpc_Jagar_Param_c() {}
|
||||
|
||||
static const daNpc_Jagar_HIOParam m;
|
||||
};
|
||||
|
||||
#if DEBUG
|
||||
class daNpc_Jagar_HIO_c : public mDoHIO_entry_c {
|
||||
public:
|
||||
daNpc_Jagar_HIO_c();
|
||||
|
||||
void listenPropertyEvent(const JORPropertyEvent*);
|
||||
void genMessage(JORMContext*);
|
||||
|
||||
daNpc_Jagar_HIOParam m;
|
||||
};
|
||||
|
||||
#define NPC_JAGAR_HIO_CLASS daNpc_Jagar_HIO_c
|
||||
#else
|
||||
#define NPC_JAGAR_HIO_CLASS daNpc_Jagar_Param_c
|
||||
#endif
|
||||
|
||||
class daNpc_Jagar_c : public daNpcT_c {
|
||||
public:
|
||||
@@ -181,9 +160,9 @@ public:
|
||||
|
||||
BOOL chkFindWolf() {
|
||||
int uVar3 = (int)daNpcT_getDistTableIdx(field_0xff0, field_0xff4);
|
||||
return daNpcT_c::chkFindWolf(mCurAngle.y, uVar3, field_0xfec, daNpc_Jagar_Param_c::m.field_0x54,
|
||||
daNpc_Jagar_Param_c::m.field_0x50, daNpc_Jagar_Param_c::m.field_0x58,
|
||||
daNpc_Jagar_Param_c::m.field_0x5c, 1);
|
||||
return daNpcT_c::chkFindWolf(mCurAngle.y, uVar3, field_0xfec, mpHIO->m.common.search_distance,
|
||||
mpHIO->m.common.fov, mpHIO->m.common.search_height,
|
||||
mpHIO->m.common.search_depth, 1);
|
||||
}
|
||||
|
||||
int chkCondition(int i_val) {
|
||||
@@ -225,10 +204,29 @@ public:
|
||||
|
||||
u8 getPathID() { return (fopAcM_GetParam(this) & 0xff00) >> 8; }
|
||||
|
||||
int crashPumpkin(fopAc_ac_c* pumpkin_p) {
|
||||
int reg_r30;
|
||||
if (mType == 0 && fopAcM_GetName(pumpkin_p) == PROC_OBJ_PUMPKIN && !daNpcT_chkEvtBit(0xAE)
|
||||
&& daNpcT_chkEvtBit(0x25B) && !daNpcT_chkEvtBit(0x235)) {
|
||||
++field_0xffc;
|
||||
reg_r30 = chkPointInArea(pumpkin_p->current.pos, current.pos, mpHIO->m.pumpkin_watch_range,
|
||||
mpHIO->m.pumpkin_watch_Ymax, mpHIO->m.pumpkin_watch_Ymin, 0);
|
||||
if (reg_r30) {
|
||||
if (field_0xffc >= 4) {
|
||||
daNpcT_onTmpBit(0x1B);
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static char* mCutNameList[7];
|
||||
static cutFunc mCutList[7];
|
||||
private:
|
||||
/* 0x0E40 */ int field_0xe40;
|
||||
/* 0x0E40 */ NPC_JAGAR_HIO_CLASS* mpHIO;
|
||||
/* 0x0E44 */ dCcD_Cyl mCyl1;
|
||||
/* 0x0F80 */ u8 mType;
|
||||
/* 0x0F84 */ daNpcT_ActorMngr_c mActorMngr[5];
|
||||
@@ -239,7 +237,7 @@ private:
|
||||
/* 0x0FF0 */ int field_0xff0;
|
||||
/* 0x0FF4 */ int field_0xff4;
|
||||
/* 0x0FF8 */ int field_0xff8;
|
||||
/* 0x0FFC */ u8 field_0xffc[0x1000 - 0xffc];
|
||||
/* 0x0FFC */ int field_0xffc;
|
||||
/* 0x1000 */ u8 field_0x1000;
|
||||
/* 0x1001 */ u8 field_0x1001;
|
||||
/* 0x1002 */ u8 field_0x1002;
|
||||
|
||||
@@ -2,6 +2,50 @@
|
||||
#define D_A_OBJ_PUMPKIN_H
|
||||
|
||||
#include "f_op/f_op_actor_mng.h"
|
||||
#include "d/d_bg_s_acch.h"
|
||||
#include "d/d_cc_d.h"
|
||||
#include "d/actor/d_a_player.h"
|
||||
|
||||
struct daObj_Pumpkin_HIOParam {
|
||||
/* 0x00 */ f32 featured_offset;
|
||||
/* 0x04 */ f32 gravity;
|
||||
/* 0x08 */ f32 scale;
|
||||
/* 0x0C */ f32 real_shadow_size;
|
||||
/* 0x10 */ f32 weight;
|
||||
/* 0x14 */ f32 height;
|
||||
/* 0x18 */ f32 knee_length;
|
||||
/* 0x1C */ f32 width;
|
||||
/* 0x20 */ f32 fire_rate;
|
||||
/* 0x24 */ f32 launch_angle;
|
||||
/* 0x28 */ f32 floating_offset;
|
||||
/* 0x2C */ s16 hold_on;
|
||||
/* 0x2E */ s16 pull_sound_delay;
|
||||
/* 0x30 */ s16 growth_time_1;
|
||||
/* 0x32 */ s16 growth_time_2;
|
||||
};
|
||||
|
||||
class daObj_Pumpkin_Param_c {
|
||||
public:
|
||||
/* 80CB8304 */ virtual ~daObj_Pumpkin_Param_c() {}
|
||||
|
||||
static const daObj_Pumpkin_HIOParam m;
|
||||
};
|
||||
|
||||
#if DEBUG
|
||||
class daObj_Pumpkin_HIO_c : public mDoHIO_entry_c {
|
||||
public:
|
||||
daObj_Pumpkin_HIO_c();
|
||||
|
||||
void listenPropertyEvent(const JORPropertyEvent*);
|
||||
void genMessage(JORMContext*);
|
||||
|
||||
daObj_Pumpkin_HIOParam m;
|
||||
};
|
||||
|
||||
#define OBJ_PUMPKIN_HIO_CLASS daObj_Pumpkin_HIO_c
|
||||
#else
|
||||
#define OBJ_PUMPKIN_HIO_CLASS daObj_Pumpkin_Param_c
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @ingroup actors-objects
|
||||
@@ -12,21 +56,78 @@
|
||||
*
|
||||
*/
|
||||
class daObj_Pumpkin_c : public fopAc_ac_c {
|
||||
private:
|
||||
/* 0x568 */ OBJ_PUMPKIN_HIO_CLASS* mpHIO;
|
||||
/* 0x56C */ request_of_phase_process_class mPhaseReq;
|
||||
/* 0x574 */ J3DModel* mpModel;
|
||||
/* 0x578 */ dBgS_ObjAcch mObjAcch;
|
||||
/* 0x750 */ dCcD_Stts mStts;
|
||||
/* 0x78C */ dBgS_AcchCir mAcchCir;
|
||||
/* 0x7CC */ cBgS_GndChk mGndChk;
|
||||
/* 0x808 */ dCcD_Cyl mCyl0;
|
||||
/* 0x944 */ dCcD_Cyl mCyl1;
|
||||
/* 0xA80 */ daPy_boomerangMove_c mBoomerangMove;
|
||||
/* 0xA8C */ cM3dGLin mLin;
|
||||
/* 0xAA8 */ dBgS_LinChk mLinChk;
|
||||
/* 0xB18 */ f32 mPumpkinScale;
|
||||
/* 0xB1C */ u8 mType;
|
||||
/* 0xB20 */ cXyz field_0xB20;
|
||||
/* 0xB2C */ cXyz field_0xB2C;
|
||||
/* 0xB38 */ csXyz field_0xB38;
|
||||
/* 0xB40 */ fpc_ProcID mItemProcId;
|
||||
/* 0xB44 */ int field_0xB44;
|
||||
/* 0xB48 */ int field_0xB48;
|
||||
/* 0xB4C */ int field_0xB4C;
|
||||
/* 0xB50 */ int field_0xB50;
|
||||
/* 0xB54 */ int field_0xB54;
|
||||
/* 0xB58 */ int field_0xB58;
|
||||
/* 0xB5C */ f32 field_0xB5C;
|
||||
/* 0xB60 */ f32 field_0xB60;
|
||||
/* 0xB64 */ f32 mWaterY;
|
||||
/* 0xB68 */ f32 field_0xB68;
|
||||
/* 0xB6C */ u8 field_0xB6C[0xB70 - 0xB6C];
|
||||
/* 0xB70 */ f32 field_0xB70;
|
||||
/* 0xB74 */ f32 field_0xB74;
|
||||
/* 0xB78 */ s16 field_0xB78;
|
||||
/* 0xB7A */ s16 field_0xB7A;
|
||||
/* 0xB7C */ s16 field_0xB7C;
|
||||
/* 0xB7E */ s16 field_0xB7E;
|
||||
/* 0xB80 */ s16 field_0xB80;
|
||||
/* 0xB82 */ u8 field_0xB82[0xB88 - 0xB82];
|
||||
/* 0xB88 */ u32 mWaterPrtcls[4];
|
||||
/* 0xB98 */ u32 mHamonPrtcl;
|
||||
/* 0xB9C */ u8 field_0xB9C[0xBA0 - 0xB9C];
|
||||
/* 0xBA0 */ u32 mSmokePrtcl1;
|
||||
/* 0xBA4 */ u32 mSmokePrtcl2;
|
||||
/* 0xBA8 */ u8 field_0xBA8;
|
||||
/* 0xBA9 */ u8 field_0xBA9;
|
||||
/* 0xBAA */ u8 field_0xBAA;
|
||||
/* 0xBAB */ u8 field_0xBAB;
|
||||
/* 0xBAC */ u8 field_0xBAC;
|
||||
/* 0xBAD */ u8 field_0xBAD;
|
||||
/* 0xBAE */ u8 field_0xBAE;
|
||||
/* 0xBAF */ u8 field_0xBAF;
|
||||
/* 0xBB0 */ u8 field_0xBB0;
|
||||
/* 0xBB1 */ u8 field_0xBB1;
|
||||
/* 0xBB2 */ u8 field_0xBB2;
|
||||
/* 0xBB3 */ u8 field_0xbb3;
|
||||
/* 0xBB4 */ u8 field_0xbb4;
|
||||
|
||||
public:
|
||||
/* 80CB578C */ ~daObj_Pumpkin_c();
|
||||
/* 80CB5A04 */ void create();
|
||||
/* 80CB5F88 */ void CreateHeap();
|
||||
/* 80CB6018 */ void Delete();
|
||||
/* 80CB604C */ void Execute();
|
||||
/* 80CB7638 */ void Draw();
|
||||
/* 80CB7824 */ void createHeapCallBack(fopAc_ac_c*);
|
||||
/* 80CB7844 */ void isDelete();
|
||||
/* 80CB578C */ virtual ~daObj_Pumpkin_c();
|
||||
/* 80CB5A04 */ int create();
|
||||
/* 80CB5F88 */ int CreateHeap();
|
||||
/* 80CB6018 */ int Delete();
|
||||
/* 80CB604C */ int Execute();
|
||||
/* 80CB7638 */ int Draw();
|
||||
/* 80CB7824 */ static int createHeapCallBack(fopAc_ac_c*);
|
||||
/* 80CB7844 */ int isDelete();
|
||||
/* 80CB78C8 */ void setEnvTevColor();
|
||||
/* 80CB7924 */ void setRoomNo();
|
||||
/* 80CB7968 */ void reset();
|
||||
/* 80CB79DC */ void setMtx();
|
||||
/* 80CB7AE4 */ void calcRollAngle(s16, int);
|
||||
/* 80CB7B84 */ void getWallAngle(s16, s16*);
|
||||
/* 80CB7AE4 */ s16 calcRollAngle(s16, int);
|
||||
/* 80CB7B84 */ int getWallAngle(s16, s16*);
|
||||
/* 80CB7D14 */ void setSmokePrtcl();
|
||||
/* 80CB7D98 */ void setWaterPrtcl();
|
||||
/* 80CB7E98 */ void setHamonPrtcl();
|
||||
@@ -42,22 +143,58 @@ public:
|
||||
mpModel->setBaseTRMtx(mtx);
|
||||
}
|
||||
|
||||
private:
|
||||
/* 0x568 */ u8 field_0x568[0x574 - 0x568];
|
||||
/* 0x574 */ J3DModel* mpModel;
|
||||
/* 0x578 */ u8 field_0x578[0xbb3 - 0x578];
|
||||
/* 0xB7C */ u8 field_0xbb3;
|
||||
/* 0xB7E */ u8 field_0xbb4[0xbbc - 0xbb4];
|
||||
int getItemTableNo() {
|
||||
u8 prm = fopAcM_GetParam(this) & 0xFF;
|
||||
if (prm == 0xFF) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
return prm;
|
||||
}
|
||||
|
||||
u8 getType() {
|
||||
u8 prm = (fopAcM_GetParam(this) & 0xFF00) >> 8;
|
||||
switch (prm) {
|
||||
case 0:
|
||||
return 0;
|
||||
case 1:
|
||||
return 1;
|
||||
case 2:
|
||||
return 2;
|
||||
case 3:
|
||||
return 3;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
u8 getProcType() {
|
||||
u8 prm = (fopAcM_GetParam(this) & 0xF0000000) >> 0x1C;
|
||||
if (prm == 0xF) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return prm;
|
||||
}
|
||||
|
||||
void popup(f32 i_f0, f32 i_deg, cXyz* ip_vec) {
|
||||
if (ip_vec != NULL) {
|
||||
current.pos = *ip_vec;
|
||||
old.pos = current.pos;
|
||||
}
|
||||
|
||||
s16 temp_r30 = cM_deg2s(i_deg);
|
||||
speed.setall(0.0f);
|
||||
speed.y = i_f0 * cM_ssin(temp_r30);
|
||||
speedF = i_f0 * cM_scos(temp_r30);
|
||||
field_0xB50 = 6;
|
||||
field_0xB7C = 0x4000;
|
||||
field_0xBAD = 1;
|
||||
field_0xB74 = 0.0f;
|
||||
}
|
||||
};
|
||||
|
||||
STATIC_ASSERT(sizeof(daObj_Pumpkin_c) == 0xbbc);
|
||||
|
||||
class daObj_Pumpkin_Param_c {
|
||||
public:
|
||||
/* 80CB8304 */ ~daObj_Pumpkin_Param_c();
|
||||
|
||||
static u8 const m[52];
|
||||
};
|
||||
|
||||
|
||||
#endif /* D_A_OBJ_PUMPKIN_H */
|
||||
|
||||
Reference in New Issue
Block a user