d_a_e_rd work (#2506)

* Work on create function

* More create work

* Work on useHeapInit

* anm_init work

* got to some of the action functions

* got to damage function

* Got to damage_check

* got through about half of demo_camera

* work on execute function

* Finished functions. Added animation enum (still needs work)

* Finished functions. Added animation enum (still needs work)

* variable name cleanup

* Took out comment that i forgot to remove

* More cleanup

* PR cleanup and enum work

* Even more enum work

* Ever so slight more enum work

* Took out padding that could removed

* forgot to remove ;
This commit is contained in:
Carco_21 2025-06-29 16:04:49 -04:00 committed by GitHub
parent 751df9d8f8
commit aff8180fce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 7781 additions and 3700 deletions

View File

@ -1,5 +1,11 @@
#ifndef D_A_E_RD_H
#define D_A_E_RD_H
#include "d/d_bg_s_acch.h"
#include "d/d_cc_d.h"
#include "d/d_cc_uty.h"
#include "d/d_jnt_col.h"
#include "d/d_msg_flow.h"
#include "d/d_path.h"
#include "f_op/f_op_actor_mng.h"
/**
@ -10,17 +16,226 @@
* @details
*
*/
class e_rd_class : public fopEn_enemy_c {
class e_rd_class {
public:
/* 80517AE0 */ e_rd_class();
private:
/* 0x5ac */ u8 field_0x5ac[0x1368 - 0x5ac];
/* 0x0000 */ fopEn_enemy_c actor;
/* 0x05AC */ request_of_phase_process_class mPhase;
/* 0x05B4 */ s16 mMode;
/* 0x05B6 */ u8 field_0x5b6;
/* 0x05B7 */ u8 field_0x5b7;
/* 0x05B8 */ u8 field_0x5b8;
/* 0x05B9 */ u8 field_0x5b9;
/* 0x05BA */ u8 field_0x5ba;
/* 0x05BB */ u8 field_0x5bb;
/* 0x05BC */ u8 field_0x5bc;
/* 0x05BD */ s8 field_0x5bd;
/* 0x05C0 */ cXyz field_0x5c0;
/* 0x05CC */ s16 field_0x5cc;
/* 0x05D0 */ mDoExt_McaMorfSO* mpModelMorf;
/* 0x05D4 */ Z2CreatureEnemy mSound;
/* 0x0678 */ char* mResName;
/* 0x067C */ int mAnmID;
/* 0x0680 */ int field_0x680;
/* 0x0684 */ dJntCol_c mJntCol;
/* 0x0694 */ J3DModel* field_0x694;
/* 0x0698 */ mDoExt_McaMorfSO* mpMorfBowAnm;
/* 0x069C */ mDoExt_McaMorf* mpMorfHornAnm;
/* 0x06A0 */ s8 field_0x6a0;
/* 0x06A4 */ cXyz field_0x6a4;
/* 0x06B0 */ cXyz field_0x6b0;
/* 0x06BC */ u8 field_0x6bc[0x6be - 0x6bc];
/* 0x06BE */ s16 field_0x6be;
/* 0x06C0 */ s16 field_0x6c0;
/* 0x06C2 */ s8 field_0x6c2;
/* 0x06C3 */ u8 field_0x6c3;
/* 0x06C4 */ J3DModel* mpEyeModels[2];
/* 0x06CC */ f32 field_0x6cc;
/* 0x06D0 */ f32 field_0x6d0;
/* 0x06D4 */ J3DModel* mpBossArmorParts[14];
/* 0x070C */ s8 field_0x70c[14];
/* 0x071C */ cXyz field_0x71c[14];
/* 0x07C4 */ cXyz field_0x7c4[14];
/* 0x086C */ csXyz field_0x86c[14];
/* 0x08C0 */ u32 field_0x8c0[3];
/* 0x08CC */ u8 field_0x8cc[0x968 - 0x8cc];
/* 0x0968 */ s8 field_0x968;
/* 0x096C */ f32 field_0x96c;
/* 0x0970 */ s16 field_0x970;
/* 0x0972 */ s16 mAction;
/* 0x0974 */ s16 field_0x974;
/* 0x0978 */ f32 mPlayerDistance;
/* 0x097C */ s16 mPlayerAngleY;
/* 0x0980 */ f32 field_0x980;
/* 0x0984 */ f32 field_0x984;
/* 0x0988 */ u32 mShadowKey;
/* 0x098C */ fpc_ProcID mWbActorID;
/* 0x0990 */ s16 field_0x990[4];
/* 0x0998 */ s16 field_0x998;
/* 0x099A */ s16 field_0x99a;
/* 0x099C */ s16 field_0x99c;
/* 0x099E */ s16 field_0x99e;
/* 0x09A0 */ s8 field_0x9a0;
/* 0x09A1 */ s8 field_0x9a1;
/* 0x09A2 */ s8 field_0x9a2;
/* 0x09A3 */ s8 field_0x9a3;
/* 0x09A4 */ s8 field_0x9a4;
/* 0x09A5 */ u8 field_0x9a5;
/* 0x09A6 */ s16 field_0x9a6;
/* 0x09A8 */ s16 field_0x9a8;
/* 0x09AA */ u8 field_0x9aa;
/* 0x09AB */ s8 field_0x9ab;
/* 0x09AC */ s8 field_0x9ac;
/* 0x09AD */ s8 field_0x9ad;
/* 0x09B0 */ cXyz field_0x9b0;
/* 0x09BC */ s8 field_0x9bc;
/* 0x09BD */ s8 field_0x9bd;
/* 0x09BE */ s8 field_0x9be;
/* 0x09BF */ u8 field_0x9bf;
/* 0x09C0 */ f32 field_0x9c0;
/* 0x09C4 */ f32 field_0x9c4;
/* 0x09C8 */ s8 field_0x9c8;
/* 0x09C9 */ u8 field_0x9c9;
/* 0x09CA */ s16 field_0x9ca;
/* 0x09CC */ s16 field_0x9cc;
/* 0x09CE */ s16 field_0x9ce;
/* 0x09D0 */ s16 field_0x9d0;
/* 0x09D4 */ cXyz field_0x9d4;
/* 0x09E0 */ u8 field_0x9e0[0x9ec - 0x9e0];
/* 0x09EC */ f32 field_0x9ec;
/* 0x09F0 */ f32 field_0x9f0;
/* 0x09F4 */ s16 field_0x9f4;
/* 0x09F6 */ s16 field_0x9f6;
/* 0x09F8 */ s8 field_0x9f8;
/* 0x09F9 */ u8 field_0x9f9[0xa0c - 0x9f9];
/* 0x0A0C */ s16 field_0xa0c;
/* 0x0A0E */ s16 field_0xa0e;
/* 0x0A10 */ u8 field_0xa10[0xa12 - 0xa10];
/* 0x0A12 */ s16 field_0xa12;
/* 0x0A14 */ u8 field_0xa14[0xa16 - 0xa14];
/* 0x0A16 */ s16 field_0xa16;
/* 0x0A18 */ s16 field_0xa18;
/* 0x0A1A */ u8 field_0xa1a[0xa1c - 0xa1a];
/* 0x0A1C */ s16 field_0xa1c;
/* 0x0A1E */ s8 field_0xa1e;
/* 0x0A1F */ s8 field_0xa1f;
/* 0x0A20 */ u32 field_0xa20;
/* 0x0A24 */ f32 field_0xa24;
/* 0x0A28 */ s16 field_0xa28;
/* 0x0A2C */ f32 field_0xa2c;
/* 0x0A30 */ s16 field_0xa30;
/* 0x0A32 */ csXyz field_0xa32[11];
/* 0x0A74 */ csXyz field_0xa74[11];
/* 0x0AB8 */ f32 field_0xab8;
/* 0x0ABC */ s16 field_0xabc[4];
/* 0x0AC4 */ s16 field_0xac4;
/* 0x0AC6 */ s16 field_0xac6;
/* 0x0AC8 */ s16 field_0xac8;
/* 0x0ACA */ s16 field_0xaca;
/* 0x0ACC */ s16 field_0xacc[3];
/* 0x0AD2 */ s16 field_0xad2[4];
/* 0x0ADA */ s16 field_0xada;
/* 0x0ADC */ s16 field_0xadc;
/* 0x0ADE */ s16 field_0xade;
/* 0x0AE0 */ s16 field_0xae0;
/* 0x0AE2 */ u8 field_0xae2[0xae4 - 0xae2];
/* 0x0AE4 */ s16 field_0xae4;
/* 0x0AE6 */ s16 field_0xae6;
/* 0x0AE8 */ u8 field_0xae8[0xaec - 0xae8];
/* 0x0AEC */ f32 field_0xaec;
/* 0x0AF0 */ s16 field_0xaf0;
/* 0x0AF2 */ s16 field_0xaf2;
/* 0x0AF4 */ u8 field_0xaf4[0xaf8 - 0xaf4];
/* 0x0AF8 */ s16 field_0xaf8;
/* 0x0AFA */ s8 field_0xafa;
/* 0x0AFB */ s8 field_0xafb;
/* 0x0AFC */ dPath* mPath;
/* 0x0B00 */ s8 field_0xb00;
/* 0x0B01 */ s8 field_0xb01;
/* 0x0B04 */ dBgS_AcchCir mAcchCir;
/* 0x0B44 */ dBgS_ObjAcch mObjAcch;
/* 0x0D1C */ dCcD_Stts mStts;
/* 0x0D58 */ dCcD_Sph field_0xd58[3];
/* 0x1100 */ dCcD_Sph field_0x1100;
/* 0x1238 */ dCcU_AtInfo mAtInfo;
/* 0x125C */ u8 field_0x125c;
/* 0x125D */ s8 field_0x125d;
/* 0x1260 */ u32 field_0x1260;
/* 0x1264 */ u32 field_0x1264;
/* 0x1268 */ u32 field_0x1268[3];
/* 0x1274 */ u32 field_0x1274[2];
/* 0x127C */ cXyz field_0x127c;
/* 0x1288 */ cXyz field_0x1288;
/* 0x1294 */ s8 field_0x1294;
/* 0x1295 */ s8 field_0x1295;
/* 0x1296 */ s8 field_0x1296;
/* 0x1297 */ s8 field_0x1297;
/* 0x1298 */ s8 field_0x1298;
/* 0x1299 */ u8 field_0x1299;
/* 0x129A */ s8 field_0x129a;
/* 0x129B */ u8 field_0x129b;
/* 0x129C */ s8 field_0x129c;
/* 0x12A0 */ int field_0x12a0;
/* 0x12A4 */ s16 mDemoMode;
/* 0x12A6 */ s16 field_0x12a6;
/* 0x12A8 */ cXyz mDemoCamEye;
/* 0x12B4 */ cXyz mDemoCamCenter;
/* 0x12C0 */ cXyz field_0x12c0;
/* 0x12CC */ cXyz field_0x12cc;
/* 0x12D8 */ cXyz field_0x12d8;
/* 0x12E4 */ cXyz field_0x12e4;
/* 0x12F0 */ cXyz field_0x12f0;
/* 0x12FC */ u8 field_0x12fc[0x1300 - 0x12fc];
/* 0x1300 */ f32 field_0x1300;
/* 0x1304 */ u8 mBlureRate;
/* 0x1308 */ f32 mDemoCamFovy;
/* 0x130C */ f32 field_0x130c;
/* 0x1310 */ u8 field_0x1310[0x131c - 0x1310];
/* 0x131C */ dMsgFlow_c mMsgFlow;
};
STATIC_ASSERT(sizeof(e_rd_class) == 0x1368);
class daE_RD_HIO_c {
class daE_RD_HIO_c : public JORReflexible {
public:
/* 80504A6C */ daE_RD_HIO_c();
/* 8051801C */ ~daE_RD_HIO_c();
/* 8051801C */ virtual ~daE_RD_HIO_c() {}
void genMessage(JORMContext*);
/* 0x00 */ s8 field_0x4;
/* ライダー (Rider) */
/* 0x08 */ f32 model_size; // 基本サイズ (Basic size)
/* 0x0C */ f32 field_0xc; // リーダーサイズ比 (Leader size ratio)
/* 0x10 */ f32 movement_speed; // 移動速度 (Movement speed)
/* 〜〜 こん棒兵の場合 〜〜 (In the case of the club soldier) */
/* 0x14 */ f32 dash_speed; // 突進速度 (Rush speed)
/* 0x18 */ f32 battle_init_range; // 戦闘開始範囲 (Battle starting range)
/* 0x1C */ f32 attack_init_range; // 攻撃開始範囲 (Attack starting range)
/* 0x20 */ f32 swing_speed; // 振り速さ (Swing speed)
/* 〜〜 矢兵の場合 〜〜 (In the case of arrow soldiers) */
/* 0x24 */ s16 field_0x24; // 号令→構えの間 (Command → Preparation)
/* 0x26 */ u8 padding[2];
/* 0x28 */ f32 attack_range; // 攻撃範囲 (Attack range)
/* 0x2C */ f32 mounted_launch_distance; // 騎乗発射距離 (Mounted launch distance)
/* 0x30 */ f32 wolf_falling_power_y; // 狼倒れ力Y (Wolf falling power Y)
/* 0x34 */ f32 wolf_falling_power_z; // 狼倒れ力Z (Wolf falling power Z)
/* 0x38 */ u8 field_0x38;
/* 0x39 */ u8 invulnerable; // 不死身 (Invulnerability)
/* 0x3A */ u8 eye_polygon; // 目ポリゴン (Eye polygon)
/* 0x3B */ u8 one_hit_kill; // 一撃必殺 (One hit kill)
/* 0x3C */ f32 field_0x3c; // 一騎(ダ)サイズ (One-man army (Da) size)
/* 0x40 */ f32 jump_g; // 飛びG (Jump G)
/* 0x44 */ f32 jump_z; // 飛びZ (Jump Z)
/* 0x48 */ f32 field_0x48; // 飛びZ(騎乗停止) (Jump Z (Stop riding))
/* 0x4C */ f32 jump_y; // 飛びY (Jump Y)
};

View File

@ -18,6 +18,98 @@
*/
class e_rdb_class {
public:
enum E_RDB_RES_FILE_ID {
/* BCK */
/* 0x04 */ BCK_HORN_RPLAY_RUN = 4,
/* 0x05 */ BCK_HORN_RPLAY_STOP,
/* 0x06 */ BCK_HORN_RPLAY_STOP2,
/* 0x07 */ BCK_RB_ATTACK01,
/* 0x08 */ BCK_RB_ATTACK02,
/* 0x09 */ BCK_RB_ATTACK03_END,
/* 0x0A */ BCK_RB_ATTACK03_SPIN,
/* 0x0B */ BCK_RB_ATTACK03_START,
/* 0x0C */ BCK_RB_DAMAGEBL,
/* 0x0D */ BCK_RB_DAMAGEBR,
/* 0x0E */ BCK_RB_DAMAGEF,
/* 0x0F */ BCK_RB_DAMAGEFL,
/* 0x10 */ BCK_RB_DAMAGEFR,
/* 0x11 */ BCK_RB_DOWN,
/* 0x12 */ BCK_RB_DOWN_RETURN,
/* 0x13 */ BCK_RB_DOWN_WAIT,
/* 0x14 */ BCK_RB_ED_DEMO_DOWN,
/* 0x15 */ BCK_RB_ED_DEMO_DOWNUP,
/* 0x16 */ BCK_RB_ED_DEMO_DOWNWAIT,
/* 0x17 */ BCK_RB_ED_DEMO_DOWNWALK,
/* 0x18 */ BCK_RB_FALL,
/* 0x19 */ BCK_RB_GUARD,
/* 0x1A */ BCK_RB_LV9_END01,
/* 0x1B */ BCK_RB_LV9_END02,
/* 0x1C */ BCK_RB_LV9_END03,
/* 0x1D */ BCK_RB_LV9_OP01,
/* 0x1E */ BCK_RB_LV9_OP02,
/* 0x1F */ BCK_RB_OP_DEMO_SWING,
/* 0x20 */ BCK_RB_PUSH,
/* 0x21 */ BCK_RB_RCOMEON,
/* 0x22 */ BCK_RB_RDAMAGE01,
/* 0x23 */ BCK_RB_RDAMAGE02,
/* 0x24 */ BCK_RB_RDAMAGEB,
/* 0x25 */ BCK_RB_RDAMAGEL,
/* 0x26 */ BCK_RB_RDAMAGER,
/* 0x27 */ BCK_RB_RDEAD,
/* 0x28 */ BCK_RB_RDEAD2_DAMAGE,
/* 0x29 */ BCK_RB_RDEAD2_FALL,
/* 0x2A */ BCK_RB_RDEAD2_RUN,
/* 0x2B */ BCK_RB_RDOWNB,
/* 0x2C */ BCK_RB_RDOWNB_RUN,
/* 0x2D */ BCK_RB_RDOWNB_UP,
/* 0x2E */ BCK_RB_RGUARD_F,
/* 0x2F */ BCK_RB_RGUARD_L,
/* 0x30 */ BCK_RB_RGUARD_R,
/* 0x31 */ BCK_RB_RJUMP_A,
/* 0x32 */ BCK_RB_RJUMP_B,
/* 0x33 */ BCK_RB_RJUMP_C,
/* 0x34 */ BCK_RB_RNEIGH,
/* 0x35 */ BCK_RB_ROP_DEMO2_EXCITE,
/* 0x36 */ BCK_RB_ROP_DEMO2_WAIT,
/* 0x37 */ BCK_RB_RPLAY_RUNL,
/* 0x38 */ BCK_RB_RPLAY_RUNR,
/* 0x39 */ BCK_RB_RPLAY_STOP,
/* 0x3A */ BCK_RB_RPLAY_STOP2,
/* 0x3B */ BCK_RB_RRUN,
/* 0x3C */ BCK_RB_RSLIP,
/* 0x3D */ BCK_RB_RSTART,
/* 0x3E */ BCK_RB_RSTARTLOOP,
/* 0x3F */ BCK_RB_RSTEP,
/* 0x40 */ BCK_RB_RUN,
/* 0x41 */ BCK_RB_RWAIT,
/* 0x42 */ BCK_RB_RWAIT02,
/* 0x43 */ BCK_RB_RWALK,
/* 0x44 */ BCK_RB_STEP,
/* 0x45 */ BCK_RB_WAIT01,
/* 0x46 */ BCK_RB_WALK,
/* BMDR */
/* 0x49 */ BMDR_ARML2_ARMOR = 0x49,
/* 0x4A */ BMDR_ARML_ARMOR,
/* 0x4B */ BMDR_ARMR2_ARMOR,
/* 0x4C */ BMDR_ARMR_ARMOR,
/* 0x4D */ BMDR_FACE_ARMOR,
/* 0x4E */ BMDR_HEAD_ARMOR,
/* 0x4F */ BMDR_LEGL_ARMOR,
/* 0x50 */ BMDR_LEGR_ARMOR,
/* 0x51 */ BMDR_MUNE2_ARMOR,
/* 0x52 */ BMDR_MUNE_ARMOR,
/* 0x53 */ BMDR_RB,
/* 0x54 */ BMDR_RB_HORN,
/* 0x55 */ BMDR_RB_ONO,
/* 0x56 */ BMDR_RB_SHIELDL,
/* 0x57 */ BMDR_RB_SHIELDR,
/* 0x58 */ BMDR_SENA2_ARMOR,
/* 0x59 */ BMDR_SENA_ARMOR,
/* 0x5A */ BMDR_SHOULDERL_ARMOR,
/* 0x5B */ BMDR_SHOULDERR_ARMOR,
};
/* 8076AA0C */ e_rdb_class() {};
/* 0x0000 */ fopEn_enemy_c enemy;
@ -29,7 +121,7 @@ public:
/* 0x05CC */ f32 field_0x5cc;
/* 0x05D0 */ Z2CreatureEnemy mSound;
/* 0x0674 */ int mAnm;
/* 0x0678 */ J3DModel* field_0x678;
/* 0x0678 */ J3DModel* mpAxeModel;
/* 0x067C */ s16 field_0x67c;
/* 0x067E */ s16 mAction;
/* 0x0680 */ s8 field_0x680;

View File

@ -31,17 +31,17 @@ public:
BOOL checkNormalRideMode() const;
void setRunRideMode();
MtxP getRideMtx() { return field_0x5e0->getModel()->getAnmMtx(15); }
f32 nowAnimeFrame() const { return field_0x5e0->getFrame(); }
MtxP getRideMtx() { return mpModelMorf->getModel()->getAnmMtx(15); }
f32 nowAnimeFrame() const { return mpModelMorf->getFrame(); }
s16 getWaitRollAngle() const { return mWaitRollAngle; }
bool checkGetOff() const { return speedF < 3.0f; }
f32 rideSpeedRate() const { return speedF / mSpeedRate; }
f32 getAnimeFrameRate() { return field_0x5e0->getFrame() / field_0x5e0->getEndFrame(); }
BOOL checkAnmLoopFrame() { return field_0x5e0->checkFrame(0.0f); }
f32 getAnimeFrameRate() { return mpModelMorf->getFrame() / mpModelMorf->getEndFrame(); }
BOOL checkAnmLoopFrame() { return mpModelMorf->checkFrame(0.0f); }
J3DModel* getModel() {
if (field_0x5e0 != NULL) {
return field_0x5e0->getModel();
if (mpModelMorf != NULL) {
return mpModelMorf->getModel();
}
return NULL;
@ -60,11 +60,11 @@ public:
/* 0x05D0 */ cXyz field_0x5d0;
/* 0x05DC */ s16 field_0x5dc;
/* 0x05DE */ s16 field_0x5de;
/* 0x05E0 */ mDoExt_McaMorfSO* field_0x5e0;
/* 0x05E0 */ mDoExt_McaMorfSO* mpModelMorf;
/* 0x05E4 */ f32 field_0x5e4;
/* 0x05E8 */ int mAnmID;
/* 0x05EC */ Z2CreatureRide mZ2Ride;
/* 0x0688 */ u8 field_0x688[4];
/* 0x0688 */ int field_0x688;
/* 0x068C */ s8 field_0x68c;
/* 0x068E */ s16 field_0x68e;
/* 0x0690 */ s16 mActionID;
@ -134,7 +134,7 @@ public:
/* 0x142F */ s8 field_0x142f;
/* 0x1430 */ s8 field_0x1430;
/* 0x1432 */ s16 field_0x1432;
/* 0x1434 */ u32 field_0x1434; // Some actor ID
/* 0x1434 */ fpc_ProcID field_0x1434; // Some actor ID
/* 0x1438 */ cXyz field_0x1438;
/* 0x1444 */ cXyz field_0x1444;
/* 0x1450 */ u8 field_0x1450[0x15d0 - 0x1450];

View File

@ -98,7 +98,8 @@ public:
void setQuickHanjoHand() { mFlags |= 0x200; }
BOOL isHanjoHand() { return mIsHanjoHand != 0; }
private:
void setResistanceDemo() { mFlags |= 0x100; }
/* 0x568 */ request_of_phase_process_class mPhase;
/* 0x570 */ mDoExt_McaMorfSO* mpMorf;
/* 0x574 */ Z2Creature mSound;

View File

@ -24,8 +24,9 @@ public:
/* 80C16340 */ void Draw();
/* 80C1641C */ void Delete();
private:
/* 0x568 */ u8 field_0x568[0x850 - 0x568];
/* 0x568 */ u8 field_0x568[0x5e0 - 0x568];
/* 0x5E0 */ cXyz field_0x5e0;
/* 0x5EC */ u8 field_0x5ec[0x850 - 0x5ec];
};
STATIC_ASSERT(sizeof(daObjH_Saku_c) == 0x850);

File diff suppressed because it is too large Load Diff

View File

@ -16,14 +16,14 @@ UNK_REL_DATA;
#include "f_op/f_op_actor_enemy.h"
enum Action {
ACTION_START,
ACTION_WAIT,
ACTION_FIGHT,
ACTION_ATTACK,
ACTION_SPIN_ATTACK,
ACTION_DEFENCE,
ACTION_DAMAGE,
ACTION_END,
/* 0x00 */ ACTION_START,
/* 0x01 */ ACTION_WAIT,
/* 0x02 */ ACTION_FIGHT,
/* 0x03 */ ACTION_ATTACK,
/* 0x04 */ ACTION_SPIN_ATTACK,
/* 0x05 */ ACTION_DEFENCE,
/* 0x06 */ ACTION_DAMAGE,
/* 0x07 */ ACTION_END,
};
/* 807650CC-807650F0 0000EC 0024+00 1/1 0/0 0/0 .text __ct__13daE_RDB_HIO_cFv */
@ -100,13 +100,13 @@ static int daE_RDB_Draw(e_rdb_class* i_this) {
}
if (i_this->field_0xfcf != 1 && i_this->field_0x680 != 0) {
g_env_light.setLightTevColorType_MAJI(i_this->field_0x678, &i_this->enemy.tevStr);
g_env_light.setLightTevColorType_MAJI(i_this->mpAxeModel, &i_this->enemy.tevStr);
material = i_this->field_0x678->getModelData()->getMaterialNodePointer(0);
material = i_this->mpAxeModel->getModelData()->getMaterialNodePointer(0);
material->getTevColor(0)->r = i_this->field_0x6e0;
material->getTevColor(0)->g = i_this->field_0x6e0;
material->getTevColor(0)->b = i_this->field_0x6e0;
mDoExt_modelUpdateDL(i_this->field_0x678);
mDoExt_modelUpdateDL(i_this->mpAxeModel);
}
if (i_this->field_0xfcf == 0) {
@ -123,8 +123,8 @@ static int daE_RDB_Draw(e_rdb_class* i_this) {
i_this->mShadowKey, 1, model, &shadow_pos, fVar1, 0.0f, i_this->enemy.current.pos.y,
i_this->mAcch.GetGroundH(), i_this->mAcch.m_gnd, &i_this->enemy.tevStr, 0, 1.0f,
dDlst_shadowControl_c::getSimpleTex());
if (i_this->field_0x678 != NULL) {
dComIfGd_addRealShadow(i_this->mShadowKey, i_this->field_0x678);
if (i_this->mpAxeModel != NULL) {
dComIfGd_addRealShadow(i_this->mShadowKey, i_this->mpAxeModel);
}
}
@ -155,22 +155,22 @@ static void e_rdb_wait(e_rdb_class* i_this) {
switch (i_this->mMode) {
case 0:
anm_init(i_this, 69, 10.0f, 2, 1.0f);
anm_init(i_this, e_rdb_class::BCK_RB_WAIT01, 10.0f, 2, 1.0f);
i_this->mMode = 1;
i_this->field_0x6b8[0] = cM_rndF(10.0f) + 20.0f;
// [[fallthrough]]
case 1:
if (i_this->mAnm == 68) {
if (i_this->mAnm == e_rdb_class::BCK_RB_STEP) {
if (sVar1 < 512 && sVar1 > -512) {
anm_init(i_this, 69, 5.0f, 2, 1.0f);
anm_init(i_this, e_rdb_class::BCK_RB_WAIT01, 5.0f, 2, 1.0f);
}
} else if (sVar1 > 512 || sVar1 < -512) {
anm_init(i_this, 68, 5.0f, 2, 1.0f);
anm_init(i_this, e_rdb_class::BCK_RB_STEP, 5.0f, 2, 1.0f);
}
if (i_this->mDistToPlayer < 350.0f) {
if (i_this->mAnm != 68) {
anm_init(i_this, 68, 5.0f, 2, 1.0f);
if (i_this->mAnm != e_rdb_class::BCK_RB_STEP) {
anm_init(i_this, e_rdb_class::BCK_RB_STEP, 5.0f, 2, 1.0f);
}
i_this->mMode = 2;
}
@ -211,21 +211,21 @@ static void e_rdb_fight(e_rdb_class* i_this) {
switch (i_this->mMode) {
case 0:
anm_init(i_this, 70, 10.0f, 2, 1.0f);
anm_init(i_this, e_rdb_class::BCK_RB_WALK, 10.0f, 2, 1.0f);
i_this->mMode = 1;
i_this->field_0x5cc = 1.0f;
// [[fallthrough]]
case 1:
if (i_this->mAnm == 70) {
if (i_this->mAnm == e_rdb_class::BCK_RB_WALK) {
fVar1 = 3.0f;
if (i_this->mDistToPlayer > 700.0f) {
anm_init(i_this, 64, 10.0f, 2, 1.0f);
anm_init(i_this, e_rdb_class::BCK_RB_RUN, 10.0f, 2, 1.0f);
}
} else {
fVar1 = 10.0f;
if (i_this->mDistToPlayer < 600.0f) {
i_this->field_0x5cc = 3.0f;
anm_init(i_this, 70, 10.0f, 2, i_this->field_0x5cc);
anm_init(i_this, e_rdb_class::BCK_RB_WALK, 10.0f, 2, i_this->field_0x5cc);
fVar1 = 3.0f;
}
}
@ -287,10 +287,10 @@ static void e_rdb_attack(e_rdb_class* i_this) {
switch (i_this->mMode) {
case 0:
if (cM_rndF(1.0f) < 0.5f) {
anm_init(i_this, 7, 5.0f, 0, 1.0f);
anm_init(i_this, e_rdb_class::BCK_RB_ATTACK01, 5.0f, 0, 1.0f);
i_this->mMode = 1;
} else {
anm_init(i_this, 8, 5.0f, 0, 1.0f);
anm_init(i_this, e_rdb_class::BCK_RB_ATTACK02, 5.0f, 0, 1.0f);
i_this->mMode = 2;
}
break;
@ -361,7 +361,7 @@ static void e_rdb_spin_attack(e_rdb_class* i_this) {
switch (i_this->mMode) {
case 0:
anm_init(i_this, 11, 5.0f, 0, 1.0f);
anm_init(i_this, e_rdb_class::BCK_RB_ATTACK03_START, 5.0f, 0, 1.0f);
i_this->mSound.startCreatureVoice(Z2SE_EN_RDB_V_ATTACK, -1);
i_this->mMode = 1;
break;
@ -370,7 +370,7 @@ static void e_rdb_spin_attack(e_rdb_class* i_this) {
if (!p_modelMorf->isStop())
break;
anm_init(i_this, 10, 0.0f, 2, 1.0f);
anm_init(i_this, e_rdb_class::BCK_RB_ATTACK03_SPIN, 0.0f, 2, 1.0f);
i_this->mMode = 2;
i_this->field_0x6b8[0] = 102;
// [[fallthrough]]
@ -383,7 +383,7 @@ static void e_rdb_spin_attack(e_rdb_class* i_this) {
i_this->field_0x6e8 = i_this->mAngleToPlayer + (u16)-0x8000;
iVar1 = 1;
if (i_this->field_0x6b8[0] == 0) {
anm_init(i_this, 9, 0.0f, 0, 1.0f);
anm_init(i_this, e_rdb_class::BCK_RB_ATTACK03_END, 0.0f, 0, 1.0f);
i_this->mMode = 3;
}
break;
@ -427,8 +427,8 @@ static int e_rdb_defence(e_rdb_class* i_this) {
int frame = i_this->mpModelMorf->getFrame();
switch (i_this->mMode) {
case 0:
if (i_this->mAnm != 25) {
anm_init(i_this, 25, 3.0f, 0, 1.0f);
if (i_this->mAnm != e_rdb_class::BCK_RB_GUARD) {
anm_init(i_this, e_rdb_class::BCK_RB_GUARD, 3.0f, 0, 1.0f);
} else {
if (frame > 15) {
i_this->mpModelMorf->setFrame(0.0f);
@ -460,15 +460,15 @@ static void e_rdb_damage(e_rdb_class* i_this) {
case 0:
iVar1 = cM_rndF(4.99f);
if (iVar1 == 0) {
anm_init(i_this, 14, 2.0f, 0, 1.0f);
anm_init(i_this, e_rdb_class::BCK_RB_DAMAGEF, 2.0f, 0, 1.0f);
} else if (iVar1 == 1) {
anm_init(i_this, 15, 2.0f, 0, 1.0f);
anm_init(i_this, e_rdb_class::BCK_RB_DAMAGEFL, 2.0f, 0, 1.0f);
} else if (iVar1 == 2) {
anm_init(i_this, 16, 2.0f, 0, 1.0f);
anm_init(i_this, e_rdb_class::BCK_RB_DAMAGEFR, 2.0f, 0, 1.0f);
} else if (iVar1 == 3) {
anm_init(i_this, 12, 2.0f, 0, 1.0f);
anm_init(i_this, e_rdb_class::BCK_RB_DAMAGEBL, 2.0f, 0, 1.0f);
} else if (iVar1 == 4) {
anm_init(i_this, 13, 2.0f, 0, 1.0f);
anm_init(i_this, e_rdb_class::BCK_RB_DAMAGEBR, 2.0f, 0, 1.0f);
}
i_this->mMode = 1;
@ -488,7 +488,7 @@ static void e_rdb_damage(e_rdb_class* i_this) {
case 10:
if (i_this->mpModelMorf->isStop()) {
anm_init(i_this, 19, 5.0f, 2, 1.0f);
anm_init(i_this, e_rdb_class::BCK_RB_DOWN_WAIT, 5.0f, 2, 1.0f);
i_this->field_0x6b8[0] = 60;
i_this->mMode = 11;
}
@ -501,7 +501,7 @@ static void e_rdb_damage(e_rdb_class* i_this) {
i_this->mAction = 4;
i_this->mMode = 0;
} else {
anm_init(i_this, 18, 5.0f, 0, 1.0f);
anm_init(i_this, e_rdb_class::BCK_RB_DOWN_RETURN, 5.0f, 0, 1.0f);
i_this->mMode = 12;
}
}
@ -536,7 +536,7 @@ static void e_rdb_end(e_rdb_class* i_this) {
switch (i_this->mMode) {
case 0:
anm_init(i_this, 20, 2.0f, 0, 1.0f);
anm_init(i_this, e_rdb_class::BCK_RB_ED_DEMO_DOWN, 2.0f, 0, 1.0f);
i_this->mMode = 1;
if (actor != NULL) {
actor->field_0x169e = 60;
@ -566,19 +566,19 @@ static void e_rdb_end(e_rdb_class* i_this) {
}
if (i_this->mpModelMorf->isStop()) {
anm_init(i_this, 22, 2.0f, 2, 1.0f);
anm_init(i_this, e_rdb_class::BCK_RB_ED_DEMO_DOWNWAIT, 2.0f, 2, 1.0f);
i_this->mMode = 2;
}
break;
case 3:
anm_init(i_this, 21, 5.0f, 0, 1.0f);
anm_init(i_this, e_rdb_class::BCK_RB_ED_DEMO_DOWNUP, 5.0f, 0, 1.0f);
i_this->mMode = 4;
break;
case 4:
if (i_this->mpModelMorf->isStop()) {
anm_init(i_this, 23, 3.0f, 2, 1.0f);
anm_init(i_this, e_rdb_class::BCK_RB_ED_DEMO_DOWNWALK, 3.0f, 2, 1.0f);
i_this->mMode = 5;
}
break;
@ -606,7 +606,7 @@ static void e_rdb_end(e_rdb_class* i_this) {
break;
case 20:
anm_init(i_this, 26, 2.0f, 0, 1.0f);
anm_init(i_this, e_rdb_class::BCK_RB_LV9_END01, 2.0f, 0, 1.0f);
i_this->mSound.startCreatureVoice(Z2SE_EN_RDB_V_LV9_END01, -1);
i_this->mMode = 21;
i_this->mDemoMode = 10;
@ -618,7 +618,7 @@ static void e_rdb_end(e_rdb_class* i_this) {
}
if (i_this->mpModelMorf->isStop()) {
anm_init(i_this, 27, 3.0f, 0, 1.0f);
anm_init(i_this, e_rdb_class::BCK_RB_LV9_END02, 3.0f, 0, 1.0f);
i_this->mSound.startCreatureVoice(Z2SE_EN_RDB_V_LV9_END02, -1);
i_this->mMode = 22;
}
@ -641,14 +641,14 @@ static void e_rdb_start(e_rdb_class* i_this) {
switch (i_this->mMode) {
case 0:
anm_init(i_this, 69, 10.0f, 2, 1.0f);
anm_init(i_this, e_rdb_class::BCK_RB_WAIT01, 10.0f, 2, 1.0f);
i_this->mMode = 1;
break;
case 2:
i_this->field_0xfcf = 0;
if (i_this->field_0x6b8[0] == 0) {
anm_init(i_this, 70, 10.0f, 2, 1.0f);
anm_init(i_this, e_rdb_class::BCK_RB_WALK, 10.0f, 2, 1.0f);
i_this->mMode = 3;
}
break;
@ -658,7 +658,7 @@ static void e_rdb_start(e_rdb_class* i_this) {
break;
case 4:
anm_init(i_this, 31, 10.0f, 0, 1.0f);
anm_init(i_this, e_rdb_class::BCK_RB_OP_DEMO_SWING, 10.0f, 0, 1.0f);
i_this->mMode = 5;
i_this->field_0x6d8 = 3;
break;
@ -669,7 +669,7 @@ static void e_rdb_start(e_rdb_class* i_this) {
}
if (i_this->mpModelMorf->isStop()) {
anm_init(i_this, 69, 10.0f, 2, 1.0f);
anm_init(i_this, e_rdb_class::BCK_RB_WAIT01, 10.0f, 2, 1.0f);
i_this->mMode = 6;
}
break;
@ -689,7 +689,7 @@ static void e_rdb_start(e_rdb_class* i_this) {
if (fopAcM_searchPlayerDistanceXZ(&i_this->enemy) < 500.0f) {
i_this->mMode = 12;
anm_init(i_this, 29, fVar1, 0, 1.0f);
anm_init(i_this, e_rdb_class::BCK_RB_LV9_OP01, fVar1, 0, 1.0f);
i_this->mSound.startCreatureSound(Z2SE_EN_RDB_LV9_OP, 0, -1);
i_this->mDemoMode = 1;
i_this->enemy.current.pos.y = i_this->enemy.home.pos.y + 2000.0f;
@ -698,7 +698,7 @@ static void e_rdb_start(e_rdb_class* i_this) {
case 12:
if (i_this->mAcch.ChkGroundHit()) {
anm_init(i_this, 30, 0.0f, 0, 1.0f);
anm_init(i_this, e_rdb_class::BCK_RB_LV9_OP02, 0.0f, 0, 1.0f);
i_this->mSound.startCreatureVoice(Z2SE_EN_RDB_V_LV9_OP, -1);
i_this->mMode = 13;
dComIfGp_getVibration().StartShock(8, 79, cXyz(0.0f, 1.0f, 0.0f));
@ -713,7 +713,7 @@ static void e_rdb_start(e_rdb_class* i_this) {
case 13:
if (i_this->mpModelMorf->isStop()) {
anm_init(i_this, 69, 5.0f, 2, 1.0f);
anm_init(i_this, e_rdb_class::BCK_RB_WAIT01, 5.0f, 2, 1.0f);
}
}
@ -756,7 +756,7 @@ static void damage_check(e_rdb_class* i_this) {
cXyz sp38, sp44;
cMtx_YrotS(*calc_mtx, i_this->mAngleToPlayer);
if (i_this->mAnm == 17 || i_this->mAnm == 19) {
if (i_this->mAnm == e_rdb_class::BCK_RB_DOWN || i_this->mAnm == e_rdb_class::BCK_RB_DOWN_WAIT) {
sp44.x = 0.0f + YREG_F(7);
sp44.y = 120.0f + YREG_F(8);
sp44.z = 190.0f + YREG_F(9);
@ -810,7 +810,7 @@ static void damage_check(e_rdb_class* i_this) {
if (i_this->field_0xfcc >= iVar1) {
bVar2 = 1;
} else {
anm_init(i_this, 17, 5.0f, 0, 1.0f);
anm_init(i_this, e_rdb_class::BCK_RB_DOWN, 5.0f, 0, 1.0f);
i_this->mAction = 6;
i_this->mMode = 10;
i_this->field_0x6c0 = 20;
@ -1316,8 +1316,8 @@ static void demo_camera(e_rdb_class* i_this) {
if (i_this->field_0x10aa >= 40) {
e_rd_class* bulblin_p = (e_rd_class*)fopAcM_SearchByName(PROC_E_RD);
if (bulblin_p != NULL) {
a_this->current.pos = bulblin_p->current.pos;
a_this->eyePos = bulblin_p->eyePos;
a_this->current.pos = bulblin_p->actor.current.pos;
a_this->eyePos = bulblin_p->actor.eyePos;
}
}
@ -1403,25 +1403,25 @@ static void demo_camera(e_rdb_class* i_this) {
/* 80768B90-80769324 003BB0 0794+00 1/1 0/0 0/0 .text anm_se_set__FP11e_rdb_class */
static void anm_se_set(e_rdb_class* i_this) {
if (i_this->mAnm == 70) {
if (i_this->mAnm == e_rdb_class::BCK_RB_WALK) {
if (i_this->mpModelMorf->checkFrame(29.0f) || i_this->mpModelMorf->checkFrame(59.0f)) {
i_this->mSound.startCreatureSound(Z2SE_EN_RDB_FOOTNOTE, 0, -1);
}
} else if (i_this->mAnm == 64) {
} else if (i_this->mAnm == e_rdb_class::BCK_RB_RUN) {
if (i_this->mpModelMorf->checkFrame(2.0f) || i_this->mpModelMorf->checkFrame(17.0f)) {
i_this->mSound.startCreatureSound(Z2SE_EN_RDB_FOOTNOTE, 0, -1);
}
} else if (i_this->mAnm == 68) {
} else if (i_this->mAnm == e_rdb_class::BCK_RB_STEP) {
if (i_this->mpModelMorf->checkFrame(15.0f) || i_this->mpModelMorf->checkFrame(35.0f)) {
i_this->mSound.startCreatureSound(Z2SE_EN_RDB_FOOTNOTE, 0, -1);
}
} else if (i_this->mAnm == 7) {
} else if (i_this->mAnm == e_rdb_class::BCK_RB_ATTACK01) {
if (i_this->mpModelMorf->checkFrame(0.0f)) {
i_this->mSound.startCreatureVoice(Z2SE_EN_RDB_V_ATTACK, -1);
} else if (i_this->mpModelMorf->checkFrame(58.0f)) {
i_this->mSound.startCreatureExtraSound(Z2SE_EN_RDB_ATTACK01, 0, -1);
}
} else if (i_this->mAnm == 8) {
} else if (i_this->mAnm == e_rdb_class::BCK_RB_ATTACK02) {
if (i_this->mpModelMorf->checkFrame(0.0f)) {
i_this->mSound.startCreatureVoice(Z2SE_EN_RDB_V_ATTACK, -1);
} else if (i_this->mpModelMorf->checkFrame(61.0f)) {
@ -1429,17 +1429,17 @@ static void anm_se_set(e_rdb_class* i_this) {
} else if (i_this->mpModelMorf->checkFrame(110.0f)) {
i_this->mSound.startCreatureExtraSound(Z2SE_EN_RDB_ATTACK02B, 0, -1);
}
} else if (i_this->mAnm == 9) {
} else if (i_this->mAnm == e_rdb_class::BCK_RB_ATTACK03_END) {
if (i_this->mpModelMorf->checkFrame(4.0f) || i_this->mpModelMorf->checkFrame(50.5f)) {
i_this->mSound.startCreatureSound(Z2SE_EN_RDB_FOOTNOTE, 0, -1);
}
} else if (i_this->mAnm == 17) {
} else if (i_this->mAnm == e_rdb_class::BCK_RB_DOWN) {
if (i_this->mpModelMorf->checkFrame(0.0f)) {
i_this->mSound.startCreatureVoice(Z2SE_EN_RDB_V_DAMAGE, -1);
} else if (i_this->mpModelMorf->checkFrame(31.0f)) {
i_this->mSound.startCreatureSound(Z2SE_CM_BODYFALL_M, 0, -1);
}
} else if (i_this->mAnm == 18) {
} else if (i_this->mAnm == e_rdb_class::BCK_RB_DOWN_RETURN) {
if (i_this->mpModelMorf->checkFrame(0.0f)) {
i_this->mSound.startCreatureVoice(Z2SE_EN_RDB_V_ED_DEMO_DOWNUP, -1);
} else if (i_this->mpModelMorf->checkFrame(35.0f)) {
@ -1449,11 +1449,11 @@ static void anm_se_set(e_rdb_class* i_this) {
} else if (i_this->mpModelMorf->checkFrame(77.0f)) {
i_this->mSound.startCreatureSound(Z2SE_CM_BODYFALL_M, 0, -1);
}
} else if (i_this->mAnm == 32) {
} else if (i_this->mAnm == e_rdb_class::BCK_RB_PUSH) {
if (i_this->mpModelMorf->checkFrame(11.0f)) {
i_this->mSound.startCreatureVoice(Z2SE_EN_RDB_V_PUSH, -1);
}
} else if (i_this->mAnm == 31) {
} else if (i_this->mAnm == e_rdb_class::BCK_RB_OP_DEMO_SWING) {
if (i_this->mpModelMorf->checkFrame(0.0f)) {
i_this->mSound.startCreatureVoice(Z2SE_EN_RDB_V_OP_DEMO_SWING, -1);
i_this->mSound.startCreatureExtraSound(Z2SE_EN_RDB_OP_DEMO_SWING, 0, -1);
@ -1464,11 +1464,11 @@ static void anm_se_set(e_rdb_class* i_this) {
{
i_this->mSound.startCreatureSound(Z2SE_EN_RDB_FOOTNOTE, 0, -1);
}
} else if (i_this->mAnm == 21) {
} else if (i_this->mAnm == e_rdb_class::BCK_RB_ED_DEMO_DOWNUP) {
if (i_this->mpModelMorf->checkFrame(11.0f)) {
i_this->mSound.startCreatureVoice(Z2SE_EN_RDB_V_ED_DEMO_DOWNUP, -1);
}
} else if (i_this->mAnm == 23) {
} else if (i_this->mAnm == e_rdb_class::BCK_RB_ED_DEMO_DOWNWALK) {
if (i_this->mpModelMorf->checkFrame(13.0f) || i_this->mpModelMorf->checkFrame(39.0f)) {
i_this->mSound.startCreatureVoice(Z2SE_EN_RDB_V_ED_DEMO_WALK, -1);
} else if (i_this->mpModelMorf->checkFrame(12.0f) ||
@ -1569,7 +1569,7 @@ static int daE_RDB_Execute(e_rdb_class* i_this) {
if (i_this->field_0x680 == 1) {
MTXCopy(model->getAnmMtx(15), *calc_mtx);
i_this->field_0x678->setBaseTRMtx(*calc_mtx);
i_this->mpAxeModel->setBaseTRMtx(*calc_mtx);
} else if (i_this->field_0x680 >= 2) {
i_this->field_0x684 += i_this->field_0x690;
i_this->field_0x690.y -= 5.0f;
@ -1632,7 +1632,7 @@ static int daE_RDB_Execute(e_rdb_class* i_this) {
mDoMtx_stack_c::YrotM(sVar1);
mDoMtx_stack_c::scaleM(fVar1, fVar1, fVar1);
i_this->field_0x678->setBaseTRMtx(mDoMtx_stack_c::get());
i_this->mpAxeModel->setBaseTRMtx(mDoMtx_stack_c::get());
}
if (i_this->field_0x6c4 != 0) {
@ -1778,8 +1778,8 @@ static int daE_RDB_Delete(e_rdb_class* i_this) {
static int useHeapInit(fopAc_ac_c* actor) {
e_rdb_class* i_this = (e_rdb_class*)actor;
i_this->mpModelMorf =
new mDoExt_McaMorfSO((J3DModelData*)dComIfG_getObjectRes("E_rdb", 83), NULL, NULL,
(J3DAnmTransform*)dComIfG_getObjectRes("E_rdb", 69), 2, 1.0f, 0, -1,
new mDoExt_McaMorfSO((J3DModelData*)dComIfG_getObjectRes("E_rdb", e_rdb_class::BMDR_RB), NULL, NULL,
(J3DAnmTransform*)dComIfG_getObjectRes("E_rdb", e_rdb_class::BCK_RB_WAIT01), 2, 1.0f, 0, -1,
&i_this->mSound, 0x80000, 0x11000084);
if (i_this->mpModelMorf == NULL || i_this->mpModelMorf->getModel() == NULL) {
return 0;
@ -1791,10 +1791,10 @@ static int useHeapInit(fopAc_ac_c* actor) {
model->getModelData()->getJointNodePointer(i_idx)->setCallBack(nodeCallBack);
}
J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes("E_rdb", 85);
J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes("E_rdb", e_rdb_class::BMDR_RB_ONO);
JUT_ASSERT(2827, modelData != 0);
i_this->field_0x678 = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084);
if (i_this->field_0x678 != NULL) {
i_this->mpAxeModel = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084);
if (i_this->mpAxeModel != NULL) {
return 1;
}