Skip to content

Commit

Permalink
d_a_alink_effect mostly done (#2227)
Browse files Browse the repository at this point in the history
* d_a_alink_effect work

* more d_a_alink_effect work

* some d_a_alink data cleanup

* d_a_alink_effect mostly done
  • Loading branch information
TakaRikka authored Oct 28, 2024
1 parent f5e80cf commit b1d7bc9
Show file tree
Hide file tree
Showing 19 changed files with 2,359 additions and 834 deletions.
7 changes: 7 additions & 0 deletions include/JSystem/JParticle/JPAEmitter.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ class JPABaseEmitter {
void setGlobalRotation(const JGeometry::TVec3<s16>& rot) {
JPAGetXYZRotateMtx(rot.x, rot.y, rot.z, mGlobalRot);
}
void getGlobalTranslation(JGeometry::TVec3<f32>* out) const { out->set(mGlobalTrs); }
void setGlobalDynamicsScale(const JGeometry::TVec3<f32>& i_scale) { mGlobalScl.set(i_scale); }
void setGlobalAlpha(u8 alpha) { mGlobalPrmClr.a = alpha; }
u8 getGlobalAlpha() { return mGlobalPrmClr.a; }
Expand All @@ -140,6 +141,12 @@ class JPABaseEmitter {
void setGlobalEnvColor(u8 r, u8 g, u8 b) { mGlobalEnvClr.r = r; mGlobalEnvClr.g = g; mGlobalEnvClr.b = b; }
void setVolumeSize(u16 size) { mVolumeSize = size; }
void setLifeTime(s16 lifetime) { mLifeTime = lifetime; }
void setAwayFromCenterSpeed(f32 i_speed) { mAwayFromCenterSpeed = i_speed; }
void setAwayFromAxisSpeed(f32 i_speed) { mAwayFromAxisSpeed = i_speed; }
void setSpread(f32 i_spread) { mSpread = i_spread; }
void setLocalTranslation(const JGeometry::TVec3<f32>& i_trans) { mLocalTrs.set(i_trans); }
void setLocalRotation(const JGeometry::TVec3<s16>& i_rot) { mLocalRot.set(i_rot.x * 0.005493248f, i_rot.y * 0.005493248f, i_rot.z * 0.005493248f); }
void setRateStep(u8 i_step) { mRateStep = i_step; }

void setGlobalParticleHeightScale(f32 height) {
mGlobalPScl.y = height;
Expand Down
5 changes: 5 additions & 0 deletions include/JSystem/JStudio/JStudio/stb.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ struct TParseData : public data::TParse_TParagraph_data::TData {
set(data);
}

TParseData() {
set(NULL);
}

void set(const data::TParse_TParagraph_data& data) {
data.getData(this);
}
Expand All @@ -183,6 +187,7 @@ struct TParseData : public data::TParse_TParagraph_data::TData {
template <int T, class Iterator=JGadget::binary::TValueIterator_raw<u8> >
struct TParseData_fixed : public TParseData<T> {
TParseData_fixed(const void* pContent) : TParseData<T>(pContent) {}
TParseData_fixed() : TParseData<T>() {}

const void* getNext() const {
return fileCount;
Expand Down
87 changes: 58 additions & 29 deletions include/d/actor/d_a_alink.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,18 @@ class daAlink_lockCursor_c : public dDlst_base_c {
/* 800CFE68 */ virtual ~daAlink_lockCursor_c() {}

void initFrame() {
field_0x4 = false;
field_0x4 = 0;
field_0x2c = 4.0f;
field_0x30 = 0.0f;
}

void setPos(f32 i_posX, f32 i_posY) {
mPosX = i_posX;
mPosY = i_posY;
}

private:
/* 0x04 */ bool field_0x4;
/* 0x04 */ u8 field_0x4;
/* 0x05 */ u8 field_0x5[3];
/* 0x08 */ J2DScreen* mScrn;
/* 0x0C */ J2DPane* field_0xc;
Expand All @@ -54,8 +59,8 @@ class daAlink_lockCursor_c : public dDlst_base_c {
/* 0x28 */ J2DAnmTransformKey* field_0x28;
/* 0x2C */ f32 field_0x2c;
/* 0x30 */ f32 field_0x30;
/* 0x34 */ f32 field_0x34;
/* 0x38 */ f32 field_0x38;
/* 0x34 */ f32 mPosX;
/* 0x38 */ f32 mPosY;
};

class daAlink_sight_c : public daPy_sightPacket_c {
Expand Down Expand Up @@ -86,16 +91,16 @@ class daAlink_blur_c : public J3DPacket {
/* 800CFD58 */ virtual ~daAlink_blur_c() {}

// private:
/* 0x010 */ void* m_blurTex;
/* 0x010 */ ResTIMG* m_blurTex;
/* 0x014 */ int field_0x14;
/* 0x018 */ u8 field_0x18[4];
/* 0x01C */ int field_0x1c;
/* 0x020 */ u8 field_0x20[4];
/* 0x020 */ int field_0x20;
/* 0x024 */ f32 field_0x24;
/* 0x028 */ u8 field_0x28[4];
/* 0x02C */ cXyz field_0x2c;
/* 0x038 */ cXyz field_0x38[0x3C];
/* 0x308 */ cXyz field_0x308[0x3C];
/* 0x038 */ cXyz field_0x38[60];
/* 0x308 */ cXyz field_0x308[60];
}; // Size = 0x5D8

class dAlink_bottleWaterPcallBack_c : public JPAParticleCallBack {
Expand All @@ -110,6 +115,12 @@ class dAlink_bottleWaterPcallBack_c : public JPAParticleCallBack {
mKeepMinY = minY;
}

s16 getAppearFlg() const { return mAppearFlg; }
s16 getHitFlg() const { return mHitFlg; }
cXyz& getHitPos() { return mHitPos; }

void onAppearFlg() { mAppearFlg = true; }

private:
/* 0x04 */ s16 mHitFlg;
/* 0x06 */ s16 mAppearFlg;
Expand Down Expand Up @@ -218,6 +229,7 @@ class daAlinkHIO_c {

class daAlink_c;
typedef int (daAlink_c::*daAlink_procFunc)();
typedef void (daAlink_c::*EffParamProc)();

struct daAlink_procInitTable {
/* 0x0 */ daAlink_procFunc m_procFunc;
Expand Down Expand Up @@ -1257,11 +1269,22 @@ class daAlink_c : public daPy_py_c {
/* 0x4 */ DIR_NONE,
};

enum daAlink_EFFPROC {
EFFPROC_FRONT_ROLL,
EFFPROC_SLIP,
EFFPROC_SMALL_LAND,
EFFPROC_RUN,
EFFPROC_LAND,
EFFPROC_SUMOU,
EFFPROC_NONE,
};

class firePointEff_c {
public:
/* 800CFC3C */ ~firePointEff_c();
/* 800CFC78 */ firePointEff_c();
/* 0x00 */ u8 field_0x0;
/* 0x02 */ u16 field_0x2;
/* 0x04 */ u32 field_0x4;
/* 0x08 */ u32 field_0x8;
/* 0x0C */ cXyz field_0xc;
Expand All @@ -1277,7 +1300,7 @@ class daAlink_c : public daPy_py_c {
}; // Size: 0x10

/* 8009D87C */ bool getE3Zhint();
/* 8009D884 */ static char* getAlinkArcName();
/* 8009D884 */ static const char* getAlinkArcName();
/* 8009DA60 */ static bool checkStageName(char const*);
/* 8009DA98 */ void tgHitCallback(fopAc_ac_c*, dCcD_GObjInf*, dCcD_GObjInf*);
/* 8009DB64 */ void coHitCallback(fopAc_ac_c*, dCcD_GObjInf*);
Expand Down Expand Up @@ -3442,22 +3465,21 @@ class daAlink_c : public daPy_py_c {
static daAlink_AnmData const m_anmDataTable[414];
static daAlink_WlAnmData const m_wlAnmDataTable[147];
static daAlink_FaceTexData const m_faceTexDataTable[];
static u8 const m_handLeftOutSidePos[12];
static u8 const m_handRightOutSidePos[12];
static u8 const m_handLeftInSidePos[12];
static u8 const m_handRightInSidePos[12];
static Vec const m_handLeftOutSidePos;
static Vec const m_handRightOutSidePos;
static Vec const m_handLeftInSidePos;
static Vec const m_handRightInSidePos;


static daAlink_procInitTable m_procInitTable[];
static daAlink_procFunc m_demoInitTable[];

static u8 m_fEffParamProc[72];
static EffParamProc m_fEffParamProc[];

/* 0x0062C */ request_of_phase_process_class mPhaseReq;
/* 0x00634 */ char* mArcName;
/* 0x00634 */ const char* mArcName;
/* 0x00638 */ JKRExpHeap* mpArcHeap;
/* 0x0063C */ request_of_phase_process_class mShieldPhaseReq;
/* 0x00644 */ char* mShieldArcName;
/* 0x00644 */ const char* mShieldArcName;
/* 0x00648 */ JKRExpHeap* mpShieldArcHeap;
/* 0x0064C */ J3DModelData* field_0x064C;
/* 0x00650 */ J3DModel* mpLinkModel;
Expand Down Expand Up @@ -3666,7 +3688,7 @@ class daAlink_c : public daPy_py_c {
/* 0x02F9B */ u8 field_0x2f9b;
/* 0x02F9C */ u8 mSelectItemId;
/* 0x02F9D */ u8 field_0x2f9d;
/* 0x02F9E */ u8 field_0x2f9e;
/* 0x02F9E */ u8 mEffProc;
/* 0x02F9F */ u8 field_0x2f9f;
/* 0x02FA0 */ u8 field_0x2fa0;
/* 0x02FA1 */ u8 mRunCutComboCount;
Expand Down Expand Up @@ -3905,24 +3927,21 @@ class daAlink_c : public daPy_py_c {
/* 0x031A0 */ u32 mModeFlg;
/* 0x031A4 */ int field_0x31a4;
/* 0x031A8 */ u8 field_0x31a8[8];
/* 0x031B0 */ int field_0x31b0;
/* 0x031B4 */ u8 field_0x31b4[8];
/* 0x031B0 */ u32 field_0x31b0[3];
/* 0x031BC */ u32 field_0x31bc;
/* 0x031C0 */ u32 field_0x31c0;
/* 0x031C4 */ u32 field_0x31c4;
/* 0x031C8 */ u32 field_0x31c8;
/* 0x031CC */ u32 field_0x31cc;
/* 0x031D0 */ u32 field_0x31d0;
/* 0x031D4 */ u32 field_0x31d4;
/* 0x031D8 */ u8 field_0x31d8[12];
/* 0x031D8 */ u32 field_0x31d8[3];
/* 0x031E4 */ u32 field_0x31e4;
/* 0x031E8 */ u8 field_0x31e8[16];
/* 0x031E8 */ u32 field_0x31e8[4];
/* 0x031F8 */ u32 field_0x31f8;
/* 0x031FC */ u32 field_0x31fc;
/* 0x03200 */ u32 field_0x3200;
/* 0x03204 */ u32 field_0x3204;
/* 0x03208 */ u32 field_0x3208;
/* 0x0320C */ u8 field_0x320c[16];
/* 0x03204 */ u32 field_0x3204[6];
/* 0x0321C */ u32 field_0x321c;
/* 0x03220 */ u32 field_0x3220;
/* 0x03224 */ u32 field_0x3224;
Expand All @@ -3931,17 +3950,18 @@ class daAlink_c : public daPy_py_c {
/* 0x03258 */ u32 field_0x3258;
/* 0x0325C */ u32 field_0x325c;
/* 0x03260 */ u32 field_0x3260[2];
/* 0x03268 */ u8 field_0x3268[0x3288 - 0x3268];
/* 0x03268 */ u32 field_0x3268;
/* 0x0326C */ u32 field_0x326c[4];
/* 0x0327C */ u32 field_0x327c[3];
/* 0x03288 */ u32 field_0x3288;
/* 0x0328C */ u32 field_0x328c;
/* 0x03290 */ u32 field_0x3290;
/* 0x03294 */ u32 field_0x3294;
/* 0x03298 */ u8 field_0x3298[8];
/* 0x03298 */ u32 field_0x3298[2];
/* 0x032A0 */ J3DGXColorS10 field_0x32a0[2];
/* 0x032B0 */ J3DGXColorS10 field_0x32b0[2];
/* 0x032C0 */ s16 field_0x32c0[2];
/* 0x032C4 */ u16 field_0x32c4;
/* 0x032C6 */ u16 field_0x32c6;
/* 0x032C4 */ u16 field_0x32c4[2];
/* 0x032C8 */ u32 field_0x32c8;
/* 0x032CC */ u32 field_0x32cc;
/* 0x032D0 */ u32 field_0x32d0;
Expand Down Expand Up @@ -4094,6 +4114,15 @@ struct daAlink_cutParamTbl {
/* 0xC */ f32 m_morf;
}; // Size: 0x10

struct daAlink_cutHorseParamTbl {
/* 0x0 */ int field_0x0;
/* 0x4 */ u16 field_0x4;
/* 0x6 */ u16 field_0x6;
/* 0x8 */ u8 field_0x8;
/* 0x9 */ u8 field_0x9;
/* 0xA */ u8 field_0xa;
}; // Size: 0xC

struct daAlinkHIO_anm_c {
/* 0x00 */ s16 mEndFrame;
/* 0x04 */ f32 mSpeed;
Expand Down
6 changes: 5 additions & 1 deletion include/d/actor/d_a_npc_tkc.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,14 @@ class daNpcTkc_c : public fopAc_ac_c {
/* 80B0FDE4 */ void setAttnPos();
/* 80B0FFD4 */ bool drawDbgInfo();

void setStart() { field_0xd7a = 1; }

static u8 mEvtSeqList[48];

private:
/* 0x568 */ u8 field_0x568[0xd7c - 0x568];
/* 0x568 */ u8 field_0x568[0xd7a - 0x568];
/* 0xD7A */ u8 field_0xd7a;
/* 0xD7B */ u8 field_0xd7b[0xd7c - 0xd7b];
};

STATIC_ASSERT(sizeof(daNpcTkc_c) == 0xd7c);
Expand Down
2 changes: 2 additions & 0 deletions include/d/actor/d_a_npc_zra.h
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,11 @@ class daNpc_zrA_c : public daNpcF_c {
/* 80B8B530 */ BOOL ECut_searchPrince1(int);
/* 80B8BCE8 */ BOOL ECut_searchPrince2(int);
/* 80B8C3E8 */ void adjustShapeAngle() {}

int getType() { return mType; }
u32 getAngleNoFromParam() { return (u8)(fopAcM_GetParam(this) >> 8); }
void setBlastFlag(u8 i_flag) { mBlastFlag = i_flag; }
MtxP getHeadMtx() { return mpMorf->getModel()->getAnmMtx(4); }

/* 0x0B48 */ Z2Creature mCreatureSound;
/* 0x0BD8 */ J3DModel* mpObjectModel[3];
Expand Down
6 changes: 5 additions & 1 deletion include/d/actor/d_a_obj_tks.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,12 @@ class daObjTks_c : public fopAc_ac_c {
/* 80D11E94 */ bool drawDbgInfo();
/* 80D11E9C */ void drawOtherMdls();

void setStart() { field_0xde0 = 1; }

private:
/* 0x568 */ u8 field_0x568[0xDE4 - 0x568];
/* 0x568 */ u8 field_0x568[0xDE0 - 0x568];
/* 0xDE0 */ u8 field_0xde0;
/* 0xDE1 */ u8 field_0xde1[0xDE4 - 0xDE1];
};

STATIC_ASSERT(sizeof(daObjTks_c) == 0xDE4);
Expand Down
14 changes: 13 additions & 1 deletion include/d/actor/d_a_player.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ class daPy_sightPacket_c : public dDlst_base_c {
void offDrawFlg() { mDrawFlag = false; }
void setPos(const cXyz* i_pos) { mPos = *i_pos; }

private:
/* 0x04 */ bool mDrawFlag;
/* 0x05 */ u8 field_0x5[3];
/* 0x08 */ cXyz mPos;
Expand Down Expand Up @@ -289,7 +288,9 @@ class daPy_py_c : public fopAc_ac_c {
FLG2_UNK_20000000 = 0x20000000,
FLG2_UNK_10000000 = 0x10000000,
FLG2_UNK_4080000 = 0x4080000,
FLG2_UNK_4000000 = 0x4000000,
FLG2_UNK_2080000 = 0x2080000,
FLG2_UNK_2000000 = 0x2000000,
FLG2_BOAR_SINGLE_BATTLE = 0x1800000,
FLG2_UNK_8000000 = 0x8000000,
FLG2_UNK_1000000 = 0x1000000,
Expand Down Expand Up @@ -341,6 +342,7 @@ class daPy_py_c : public fopAc_ac_c {
FLG3_UNK_4000 = 0x4000,
FLG3_UNK_2000 = 0x2000,
FLG3_UNK_1000 = 0x1000,
FLG3_UNK_800 = 0x800,
FLG3_UNK_400 = 0x400,
FLG3_UNK_200 = 0x200,
FLG3_UNK_100 = 0x100,
Expand All @@ -350,6 +352,7 @@ class daPy_py_c : public fopAc_ac_c {
FLG3_UNK_10 = 0x10,
FLG3_UNK_8 = 8,
FLG3_UNK_4 = 4,
FLG3_UNK_1 = 1,
};

enum daPy_ERFLG0 {
Expand Down Expand Up @@ -391,9 +394,12 @@ class daPy_py_c : public fopAc_ac_c {
ERFLG1_UNK_4000000 = 0x4000000,
ERFLG1_UNK_2000000 = 0x2000000,
ERFLG1_UNK_1000000 = 0x1000000,
ERFLG1_UNK_400000 = 0x400000,
ERFLG1_UNK_200000 = 0x200000,
ERFLG1_UNK_100000 = 0x100000,
ERFLG1_UNK_80000 = 0x80000,
ERFLG1_UNK_40000 = 0x40000,
ERFLG1_UNK_20000 = 0x20000,
ERFLG1_UNK_10000 = 0x10000,
ERFLG1_UNK_8000 = 0x8000,
ERFLG1_UNK_4000 = 0x4000,
Expand Down Expand Up @@ -459,6 +465,10 @@ class daPy_py_c : public fopAc_ac_c {
RFLG1_UNK_80 = 0x80,
RFLG1_UNK_40 = 0x40,
RFLG1_UNK_30 = 0x30,
RFLG1_UNK_20 = 0x20,
RFLG1_UNK_10 = 0x10,
RFLG1_UNK_8 = 0x8,
RFLG1_UNK_4 = 0x4,
RFLG1_UNK_2 = 0x2,
RFLG1_WOLF_ATTACK_REVERSE = 0x1,

Expand Down Expand Up @@ -802,6 +812,7 @@ class daPy_py_c : public fopAc_ac_c {
void onWolfEyeKeep() { onEndResetFlg1(ERFLG1_WOLF_EYE_KEEP); }
void onFogFade() { onNoResetFlg2(FLG2_UNK_4000); }
BOOL checkStickArrowReset() const { return checkResetFlg0(RFLG0_UNK_1); }
u32 getCutAtFlg() const { return checkNoResetFlg0(FLG0_UNK_40); }

void offWolfEnemyHangBite() { offNoResetFlg2(FLG2_WOLF_ENEMY_HANG_BITE); }
bool onWolfEnemyHangBite(fopAc_ac_c* param_0) { return onWolfEnemyBiteAll(param_0, FLG2_WOLF_ENEMY_HANG_BITE); }
Expand Down Expand Up @@ -870,6 +881,7 @@ class daPy_py_c : public fopAc_ac_c {

cXyz* getLeftHandPosP() { return &mLeftHandPos; }
cXyz* getRightHandPosP() { return &mRightHandPos; }
cXyz* getHeadTopPosP() { return &mHeadTopPos; }

u32 checkWolf() const { return checkNoResetFlg1(FLG1_IS_WOLF); }
u32 checkEquipHeavyBoots() const { return checkNoResetFlg0(FLG0_EQUIP_HVY_BOOTS); }
Expand Down
1 change: 1 addition & 0 deletions include/d/d_jnt_col.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class dJntCol_c {
bool checkShieldType(int i) { return getType(i) == 3; }

s8 getType(int i) { return mData[i].mType; }
int getJntNum(int i) { return mData[i].mJntNum; }

/* 0x00 */ const dJntColData_c* mData;
/* 0x04 */ J3DModel* mModel;
Expand Down
Loading

0 comments on commit b1d7bc9

Please sign in to comment.