Skip to content

Commit

Permalink
d_a_b_yo and d_a_b_yo_ice mostly OK (#2219)
Browse files Browse the repository at this point in the history
  • Loading branch information
randomsalience authored Oct 19, 2024
1 parent 0652b2c commit 69dc7cb
Show file tree
Hide file tree
Showing 16 changed files with 4,670 additions and 3,034 deletions.
4 changes: 2 additions & 2 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1501,8 +1501,8 @@ def JSystemLib(lib_name, objects, progress_category="third_party"):
ActorRel(NonMatching, "d_a_b_oh"),
ActorRel(Matching, "d_a_b_oh2"),
ActorRel(NonMatching, "d_a_b_tn"),
ActorRel(NonMatching, "d_a_b_yo"),
ActorRel(NonMatching, "d_a_b_yo_ice"),
ActorRel(Equivalent, "d_a_b_yo"),
ActorRel(Equivalent, "d_a_b_yo_ice"),
ActorRel(NonMatching, "d_a_b_zant"),
ActorRel(NonMatching, "d_a_b_zant_magic"),
ActorRel(NonMatching, "d_a_b_zant_mobile"),
Expand Down
5 changes: 5 additions & 0 deletions include/JSystem/J3DGraphBase/J3DMatBlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,10 @@ struct J3DZMode {
mZModeID = calcZModeID(i_compare, j3dZModeTable[mZModeID * 3 + 1], j3dZModeTable[mZModeID * 3 + 2]);
}

void setFunc(u8 i_func) {
mZModeID = calcZModeID(j3dZModeTable[mZModeID * 3], i_func, j3dZModeTable[mZModeID * 3 + 2]);
}

void setUpdateEnable(u8 i_enable) {
mZModeID = calcZModeID(j3dZModeTable[mZModeID * 3], j3dZModeTable[mZModeID * 3 + 1], i_enable);
}
Expand Down Expand Up @@ -693,6 +697,7 @@ struct J3DBlend : public J3DBlendInfo {
J3DBlend() : J3DBlendInfo(j3dDefaultBlendInfo) {}
J3DBlend(J3DBlendInfo const& info) : J3DBlendInfo(info) {}

void setType(u8 i_type) { mType = i_type; }
void setDstFactor(u8 i_factor) { mDstFactor = i_factor; }

GXBlendMode getBlendMode() const { return (GXBlendMode)mType; }
Expand Down
3 changes: 2 additions & 1 deletion include/SSystem/SComponent/c_bg_s_chk.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class cBgS_Chk {
/* 0x0 */ cBgS_PolyPassChk* mPolyPassChk;
/* 0x4 */ cBgS_GrpPassChk* mGrpPassChk;
/* 0x8 */ fpc_ProcID mActorPid;
/* 0xC */ u8 unk_0x0C;
/* 0xC */ bool mSameActorChk;
/* 0x10 */ // __vtable__

public:
Expand All @@ -32,6 +32,7 @@ class cBgS_Chk {
void SetGrpPassChk(cBgS_GrpPassChk* p_chk) { mGrpPassChk = p_chk; }
cBgS_PolyPassChk* GetPolyPassChk() const { return mPolyPassChk; }
cBgS_GrpPassChk* GetGrpPassChk() const { return mGrpPassChk; }
void OffSameActorChk() { mSameActorChk = false; }

virtual ~cBgS_Chk(void);
}; // Size: 0x14
Expand Down
2 changes: 2 additions & 0 deletions include/SSystem/SComponent/c_cc_d.h
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,8 @@ class cCcD_ObjHitInf {
void OffCoSPrmBit(u32 flag) { mObjCo.OffSPrmBit(flag); }
void SetAtType(u32 type) { mObjAt.SetType(type); }
void OnAtSetBit() { mObjAt.OnSPrmBit(1); }
void OnAtNoTgHitInfSet() { mObjAt.OnSPrmBit(0x20); }
void OffAtNoTgHitInfSet() { mObjAt.OffSPrmBit(0x20); }
u32 MskTgSPrm(u32 mask) const { return mObjTg.MskSPrm(mask); }
void SetAtAtp(int atp) { mObjAt.SetAtp(atp); }
void OffCoSetBit() { mObjCo.ClrSet(); }
Expand Down
233 changes: 195 additions & 38 deletions include/d/actor/d_a_b_yo.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
#ifndef D_A_B_YO_H
#define D_A_B_YO_H

#include "f_op/f_op_actor_mng.h"
#include "Z2AudioLib/Z2Creature.h"
#include "f_op/f_op_actor.h"
#include "d/d_cc_d.h"
#include "d/d_cc_uty.h"
#include "d/d_bg_s_acch.h"

class dBgW;
class msg_class;

/**
* @ingroup actors-enemies
Expand All @@ -13,7 +20,7 @@
*/
class daB_YO_c : public fopEn_enemy_c {
public:
/* 8062F51C */ s32 draw();
/* 8062F51C */ int draw();
/* 8062FBEC */ void onIceBreak(u16);
/* 8062FC08 */ void setBck(int, u8, f32, f32);
/* 8062FE0C */ void setActionMode(int, int);
Expand All @@ -30,16 +37,16 @@ class daB_YO_c : public fopEn_enemy_c {
/* 80630BF0 */ void setApperEffect();
/* 80630CA0 */ void setApperEffect2();
/* 80630DD8 */ void demo_skip(int);
/* 80630E3C */ void DemoSkipCallBack(void*, int);
/* 80630E3C */ static int DemoSkipCallBack(void*, int);
/* 80630E70 */ void setYoMessage(int);
/* 80630EAC */ void doYoMessage();
/* 80630EAC */ int doYoMessage();
/* 80630F28 */ void executeOpening();
/* 80632598 */ void reflectFreeMove();
/* 80632660 */ void calcFreeMove(f32);
/* 8063290C */ void setReflectAngle();
/* 806329CC */ void executeChase();
/* 806331CC */ void executeSeriousDemo();
/* 80633EDC */ void checkIcecleRevival();
/* 80633EDC */ u8 checkIcecleRevival();
/* 80633F50 */ void createIcecleRevival(u8);
/* 80634040 */ void executeJump();
/* 80634548 */ void executeAttackIce();
Expand All @@ -54,48 +61,198 @@ class daB_YO_c : public fopEn_enemy_c {
/* 806374BC */ void action();
/* 80637990 */ void mtx_set();
/* 80637B30 */ void cc_set();
/* 80637E10 */ void execute();
/* 80637FC8 */ void _delete();
/* 806380F8 */ void CreateHeap();
/* 806388A0 */ void CreateHeap2();
/* 806389C0 */ void create();
/* 80637E10 */ int execute();
/* 80637FC8 */ int _delete();
/* 806380F8 */ int CreateHeap();
/* 806388A0 */ int CreateHeap2();
/* 806389C0 */ cPhs__Step create();

u8 getModelNo() { return mModelNo;}
s16 getFrizadRollAngle() { return mFrizadRollAngle;}
f32 getModeRarius() { return mModeRarius;}
u8 getFrizadAttack() { return mFrizadAttack;}
u8 getModelNo() { return mModelNo; }
s16 getFrizadRollAngle() { return mIceAngle; }
f32 getModeRarius() { return mFreezardRadius; }
u8 getFrizadAttack() { return mFreezardAttack; }
cXyz getIceCenterPos() { return mIceCenterPos; }
f32 getIceRange() { return mIceRange; }
s16 getIceAngle() { return mIceAngle; }
f32 getPlayerXBuf(int param_0) { return mPlayerXBuf[param_0]; }
f32 getPlayerZBuf(int param_0) { return mPlayerZBuf[param_0]; }
void onIceStatus(u16 i_no) { mIceStatus |= (1 << i_no); }

private:
/* 0x5AC */ u8 field_0x5ac[0x5D8 - 0x5AC];
/* 0x5D8 */ mDoExt_btkAnm* mBtk;
/* 0x5DC */ mDoExt_btpAnm* mBtp;
/* 0x5E0 */ mDoExt_brkAnm* mBrk;
/* 0x5E4 */ mDoExt_bckAnm* mBck;
/* 0x5E8 */ mDoExt_McaMorfSO* mpMorf;
/* 0x5EC */ u8 field_0x5f8[0xF54 - 0x5EC];
/* 0xF54 */ f32 mModeRarius;
/* 0xF58 */ u8 field_0xf58[0xF5C - 0xF58];
/* 0xF5C */ s16 mFrizadRollAngle;
/* 0xF5E */ u8 field_0xf5e[0xF6E - 0xF5E];
/* 0xF6E */ u16 mIceBreak;
/* 0xF70 */ u8 field_0xf70[0xFA8 - 0xF70];
/* 0xFA8 */ u8 mModelNo;
/* 0xFA9 */ u8 field_0xfa9[0xFAD - 0xFA9];
/* 0xFAD */ u8 mFrizadAttack;
/* 0xFAE */ u8 field_0xfae[0xFCC - 0xFAE];
/* 0xFCC */ u8 field_0xfcc;
/* 0xFCD */ u8 field_0xfcd[0x1B88 - 0xFCD];
/* 0x05AC */ request_of_phase_process_class mPhase1;
/* 0x05B4 */ request_of_phase_process_class mPhase2;
/* 0x05BC */ request_of_phase_process_class mPhase3;
/* 0x05C4 */ request_of_phase_process_class mPhase4;
/* 0x05CC */ request_of_phase_process_class mPhase5;
/* 0x05D4 */ mDoExt_btkAnm* mpBtkAnm;
/* 0x05D8 */ mDoExt_btkAnm* mpYetaBtkAnm;
/* 0x05DC */ mDoExt_btpAnm* mpYetaBtpAnm;
/* 0x05E0 */ mDoExt_brkAnm* mpYetaBrkAnm;
/* 0x05E4 */ mDoExt_brkAnm* mpYetaWhiteBrkAnm;
/* 0x05E8 */ J3DModel* mpModel[3];
/* 0x05F4 */ mDoExt_McaMorfSO* mpYetaMorf;
/* 0x05F8 */ mDoExt_McaMorfSO* mpYetaRevertedMorf;
/* 0x05FC */ J3DModel* mpRoomModel[2];
/* 0x0604 */ J3DModel* mpFurnitureModel;
/* 0x0608 */ u32 mIcicleID[10];
/* 0x0630 */ u32 mYstoneID;
/* 0x0634 */ Z2CreatureEnemy mCreatureSound;
/* 0x06D8 */ cXyz unk_6D8[5];
/* 0x0714 */ f32 mHensinScale;
/* 0x0718 */ cXyz mCamEye;
/* 0x0724 */ cXyz mCamCenter;
/* 0x0730 */ f32 mCamFovY;
/* 0x0734 */ f32 mCamEyeRange;
/* 0x0738 */ f32 mCamEyeSpeed;
/* 0x073C */ f32 mCamCenterSpeed;
/* 0x0740 */ s16 mCamEyeAngle;
/* 0x0744 */ f32 mScale;
/* 0x0748 */ f32 mPlayerXBuf[200];
/* 0x0A68 */ f32 mPlayerZBuf[200];
/* 0x0D88 */ s16 unk_D88[200];
/* 0x0F18 */ s16 mPlayerAngle;
/* 0x0F1C */ cXyz mOldPlayerPos;
/* 0x0F28 */ cXyz mYstonePos;
/* 0x0F34 */ cXyz mIceCenterPos;
/* 0x0F40 */ u8 unk_F40[0xF4C - 0xF40];
/* 0x0F4C */ f32 mIceRange;
/* 0x0F50 */ f32 mIceCenterSpeed;
/* 0x0F54 */ f32 mFreezardRadius;
/* 0x0F58 */ f32 unk_F58;
/* 0x0F5C */ s16 mIceAngle;
/* 0x0F5E */ s16 mIceAngleSpeed;
/* 0x0F60 */ f32 mYstoneScale;
/* 0x0F64 */ f32 field_0xf64;
/* 0x0F68 */ s16 field_0xf68;
/* 0x0F6A */ s16 field_0xf6a;
/* 0x0F6C */ u16 mIceStatus;
/* 0x0F6E */ u16 mIceBreak;
/* 0x0F70 */ int mAction;
/* 0x0F74 */ int mMode;
/* 0x0F78 */ u32 mShadowKey;
/* 0x0F7C */ u8 unk_F7C[0xF80 - 0xF7C];
/* 0x0F80 */ s16 field_0xf80;
/* 0x0F82 */ s16 mAngleSpeed;
/* 0x0F84 */ s16 mWallAngle;
/* 0x0F86 */ u16 mIFrameTimer;
/* 0x0F88 */ u16 mIFrameIronTimer;
/* 0x0F8C */ int mActionTimer;
/* 0x0F90 */ int mActionTimer2;
/* 0x0F94 */ int mDamageTimer;
/* 0x0F98 */ int mFreezardTimer;
/* 0x0F9C */ int mQuakeTimer;
/* 0x0FA0 */ int mAttentionTimer;
/* 0x0FA4 */ int mCamLockOnTimer;
/* 0x0FA8 */ u8 mModelNo;
/* 0x0FA9 */ u8 mSwNo;
/* 0x0FAA */ u8 mSwNo2;
/* 0x0FAB */ u8 mLastPhaseDamage;
/* 0x0FAC */ bool field_0xfac;
/* 0x0FAD */ u8 mFreezardAttack;
/* 0x0FAE */ u8 field_0xfae;
/* 0x0FAF */ u8 mFreeMoveMode;
/* 0x0FB0 */ u8 field_0xfb0;
/* 0x0FB1 */ u8 field_0xfb1;
/* 0x0FB2 */ u8 field_0xfb2;
/* 0x0FB3 */ u8 field_0xfb3;
/* 0x0FB4 */ u8 field_0xfb4;
/* 0x0FB5 */ u8 field_0xfb5;
/* 0x0FB6 */ u8 mFreezardNo;
/* 0x0FB7 */ u8 mRoomType;
/* 0x0FB8 */ f32 mRoomAlpha[2];
/* 0x0FC0 */ u8 mColorMode;
/* 0x0FC4 */ f32 mColBlend;
/* 0x0FC8 */ f32 mBlureRate;
/* 0x0FCC */ bool field_0xfcc;
/* 0x0FCD */ bool field_0xfcd;
/* 0x0FCE */ u8 mIsInactive;
/* 0x0FCF */ u8 mIsInactive2;
/* 0x0FD0 */ bool mReverted;
/* 0x0FD1 */ bool field_0xfd1;
/* 0x0FD2 */ bool unk_FD2;
/* 0x0FD4 */ s32 mWarpHoleID;
/* 0x0FD8 */ int mMsgIdx;
/* 0x0FDC */ u32 mMsgPcID;
/* 0x0FE0 */ msg_class* mpMsg;
/* 0x0FE4 */ Mtx mBgMtx;
/* 0x1014 */ dBgW* mpRoomNormalBgW;
/* 0x1018 */ dBgW* mpRoomArenaBgW;
/* 0x101C */ dBgS_AcchCir mAcchCir;
/* 0x105C */ dBgS_ObjAcch mAcch;
/* 0x1234 */ dCcD_Stts mCcStts;
/* 0x1270 */ dCcD_Stts mCcIronStts;
/* 0x12AC */ dCcD_Cyl mAtCyl;
/* 0x13E8 */ dCcD_Sph mTgSph[3];
/* 0x1790 */ dCcD_Sph mTgIronSph[3];
/* 0x1B38 */ dCcU_AtInfo mAtInfo;
/* 0x1B5C */ u8 unk_1B5C[0x1B64 - 0x1B5C];
/* 0x1B64 */ u32 mChillKey;
/* 0x1B68 */ u32 mHensinKey[4];
/* 0x1B78 */ u8 unk_1B78[0x1B7C - 0x1B78];
/* 0x1B7C */ u32 mParticleKey;
/* 0x1B80 */ u32 mAppearKey;
/* 0x1B84 */ bool mHIOInit;

enum Action {
/* 0 */ ACT_OPENING,
/* 1 */ ACT_CHASE,
/* 2 */ ACT_SERIOUS_DEMO,
/* 3 */ ACT_JUMP,
/* 4 */ ACT_ATTACK_ICE,
/* 5 */ ACT_ATTACK_YOSE,
/* 6 */ ACT_ATTACK_BODY,
/* 7 */ ACT_DEMO_REVIVAL,
/* 8 */ ACT_DAMAGE,
/* 9 */ ACT_DEATH,
};

enum Animation {
/* 0x00 */ ANM_ANGRY,
/* 0x01 */ ANM_ANGRY_WAIT,
/* 0x02 */ ANM_FLOAT,
/* 0x03 */ ANM_TALK_A,
/* 0x04 */ ANM_TALK_B,
/* 0x05 */ ANM_TO_TALK_B,
/* 0x06 */ ANM_WAIT_A,
/* 0x07 */ ANM_WAIT_B,
/* 0x08 */ ANM_WALK,
/* 0x09 */ ANM_SCREAM,
/* 0x0A */ ANM_SCREAM_WAIT,
/* 0x0B */ ANM_WAIT_C2,
/* 0x0C */ ANM_WAIT_C,
/* 0x0D */ ANM_FLOAT_B,
/* 0x0E */ ANM_WAIT_D,
/* 0x0F */ ANM_DOWN_A,
/* 0x10 */ ANM_DOWN_B,
/* 0x11 */ ANM_DOWN_C,
/* 0x12 */ ANM_DOWN,
};
};

STATIC_ASSERT(sizeof(daB_YO_c) == 0x1B88);

struct daB_YO_HIO_c {
class daB_YO_HIO_c {
public:
/* 8062F46C */ daB_YO_HIO_c();
/* 806395E4 */ ~daB_YO_HIO_c();
};
/* 806395E4 */ virtual ~daB_YO_HIO_c() {}

struct daB_YOI_c {
/* 8063A480 */ void setOperate(int);
/* 0x04 */ s8 field_0x4;
/* 0x08 */ f32 mScale[8];
/* 0x28 */ f32 mFreezardNum;
/* 0x2C */ f32 mMaxFallSpeed;
/* 0x30 */ f32 mReboundSpeedRatio;
/* 0x34 */ f32 mChaseSpeed;
/* 0x38 */ f32 mReboundSpeedMax;
/* 0x3C */ bool field_0x3c;
/* 0x40 */ f32 mGatherTimer;
/* 0x44 */ f32 mAttackTimer;
/* 0x48 */ f32 mFreezardRadius;
/* 0x4C */ f32 field_0x4c;
/* 0x50 */ f32 field_0x50;
/* 0x54 */ bool field_0x54;
/* 0x58 */ f32 field_0x58;
};

STATIC_ASSERT(sizeof(daB_YO_HIO_c) == 0x5C);

#endif /* D_A_B_YO_H */
Loading

0 comments on commit 69dc7cb

Please sign in to comment.