Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

d_a_midna mostly done #2237

Merged
merged 1 commit into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/JSystem/J3DGraphBase/J3DMatBlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ struct J3DGXColor : public GXColor {
/* 8000E538 */ J3DGXColor() {}
J3DGXColor(J3DGXColor const& other) { __memcpy(this, &other, sizeof(J3DGXColor)); }
J3DGXColor(GXColor const& color) : GXColor(color) {}
J3DGXColor& operator=(GXColor color) {
J3DGXColor& operator=(const GXColor& color) {
*(GXColor*)this = color;
return *this;
}
Expand Down
67 changes: 65 additions & 2 deletions include/Z2AudioLib/Z2SoundObjMgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,72 @@ struct Z2EnemyArea {
};

enum Z2EnemyID {
Z2_ENEMY_ID_0,
/* 0x00 */ Z2_ENEMY_NULL,
/* 0x01 */ Z2_ENEMY_S1,
/* 0x02 */ Z2_ENEMY_YK,
/* 0x03 */ Z2_ENEMY_YR,
/* 0x04 */ Z2_ENEMY_YG,
/* 0x05 */ Z2_ENEMY_YC,
/* 0x06 */ Z2_ENEMY_YD,
/* 0x07 */ Z2_ENEMY_RDY,
/* 0x08 */ Z2_ENEMY_YMB,
/* 0x09 */ Z2_ENEMY_UNK,
/* 0x0A */ Z2_ENEMY_WB,
/* 0x0B */ Z2_ENEMY_RD,
/* 0x0C */ Z2_ENEMY_DN,
/* 0x0D */ Z2_ENEMY_KR,
/* 0x0E */ Z2_ENEMY_ST,
/* 0x0F */ Z2_ENEMY_TK,
/* 0x10 */ Z2_ENEMY_TK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0x3D */ Z2_ENEMY_MF,
/* 0x3E */ Z2_ENEMY_ZM,
/* 0x3F */ Z2_ENEMY_TN,
};

class Z2SoundObjMgr : public JASGlobalInstance<Z2SoundObjMgr>, protected JSUList<Z2CreatureEnemy> {
public:
Z2SoundObjMgr();
Expand Down
53 changes: 48 additions & 5 deletions include/d/actor/d_a_alink.h
Original file line number Diff line number Diff line change
Expand Up @@ -3284,6 +3284,46 @@ class daAlink_c : public daPy_py_c {
u32 getStartEvent() { return fopAcM_GetParam(this) >> 0x18; }
BOOL checkClimbFall() { return checkLadderFall(); }

bool checkMidnaWolfDashAnime() { return checkNoResetFlg1(FLG1_DASH_MODE); }
bool checkMidnaClingAnime() { return mMidnaAnm == 1; }
bool checkMidnaLowClingAnime() { return mMidnaAnm == 2; }
bool checkMidnaLookAroundAnime() { return mMidnaAnm == 3; }
bool checkMidnaPanicAnime() { return mMidnaAnm == 5; }
bool checkMidnaWolfDeadAnime() { return mMidnaAnm == 6; }
bool checkMidnaWolfSwimDeadAnime() { return mMidnaAnm == 7; }
bool checkMidnaRopeWaitStaggerAnime() { return mMidnaAnm == 8; }
bool checkMidnaRopeMoveStaggerAnime() { return mMidnaAnm == 9; }
bool checkMidnaGanonCatchAnm() { return mMidnaAnm == 10; }
bool checkMidnaGanonThrowLeftAnm() { return mMidnaAnm == 11; }
bool checkMidnaGanonThrowRightAnm() { return mMidnaAnm == 12; }
bool checkMidnaDigInAnime() { return mMidnaAnm == 13; }

void clearMidnaMsgNum() {
mMidnaMsgNum = 0xffff;
mMidnaMsg = NULL;
}

void setEndGanonThrow() { mProcVar3.field_0x300e = 1; }

s16 getProcNeckX() { return field_0x30a0; }
s16 getMidnaProcNeckY() { return field_0x30d4; }
f32 getEyeMoveRateY() { return field_0x33f4; }
f32 getMidnaEyeMoveRateX() { return field_0x33f8; }

J3DModel* getMidnaModel() {
if (mClothesChangeWaitTimer != 0) {
return NULL;
} else {
return mpWlMidnaModel;
}
}

J3DModel* getMidnaMaskModel() { return mpWlMidnaMaskModel; }
J3DModel* getMidnaHandModel() { return mpWlMidnaHandModel; }
J3DModel* getMidnaHairHandModel() { return mpWlMidnaHairModel; }

cXyz* getMidnaHairAtnPos() { return &mMidnaHairAtnPos; }

const daAlink_AnmData* getAnmData(daAlink_ANM anmID) const { return &m_anmDataTable[anmID]; }
const daAlink_FaceTexData* getFaceTexData(daAlink_FTANM i_anmID) const { return &m_faceTexDataTable[i_anmID]; }

Expand Down Expand Up @@ -3428,6 +3468,9 @@ class daAlink_c : public daPy_py_c {

BOOL checkCrawlWaterIn() { return mWaterY > current.pos.y + 15.5f; }

MtxP getWolfMidnaMatrix() { return mpLinkModel->getAnmMtx(0x19); }
s16 getIceDamageWaitTimer() const { return mIceDamageWaitTimer; }
const cXyz& getWindSpeed() const { return mWindSpeed; }
const cXyz& getHsChainTopPos() const { return mHookshotTopPos; }
const cXyz& getHsChainRootPos() const { return mHeldItemRootPos; }

Expand Down Expand Up @@ -3693,7 +3736,7 @@ class daAlink_c : public daPy_py_c {
/* 0x02F98 */ u8 field_0x2f98;
/* 0x02F99 */ u8 field_0x2f99;
/* 0x02F9A */ s8 mVoiceReverbIntensity;
/* 0x02F9B */ u8 field_0x2f9b;
/* 0x02F9B */ u8 mMidnaAnm;
/* 0x02F9C */ u8 mSelectItemId;
/* 0x02F9D */ u8 field_0x2f9d;
/* 0x02F9E */ u8 mEffProc;
Expand Down Expand Up @@ -3777,7 +3820,7 @@ class daAlink_c : public daPy_py_c {
/* 0x03000 */ s16 field_0x3000;
/* 0x03002 */ s16 field_0x3002;
/* 0x03004 */ s16 field_0x3004;
/* 0x03006 */ s16 field_0x3006;
/* 0x03006 */ s16 mIceDamageWaitTimer;
// `mProcVar`'s are variables that are context dependent for each `PROC` action.
// (The exact setup may need to be simplified later)
union {
Expand Down Expand Up @@ -3879,7 +3922,7 @@ class daAlink_c : public daPy_py_c {
/* 0x030CE */ u16 mKeepItem;
/* 0x030D0 */ s16 field_0x30d0;
/* 0x030D2 */ s16 field_0x30d2;
/* 0x030D4 */ u16 field_0x30d4;
/* 0x030D4 */ s16 field_0x30d4;
/* 0x030D6 */ s16 field_0x30d6;
/* 0x030D8 */ u8 field_0x30d8[0x14];
/* 0x030EC */ s16 field_0x30ec;
Expand Down Expand Up @@ -4059,14 +4102,14 @@ class daAlink_c : public daPy_py_c {
/* 0x03588 */ cXyz field_0x3588;
/* 0x03594 */ cXyz field_0x3594;
/* 0x035A0 */ cXyz field_0x35a0;
/* 0x035AC */ cXyz field_0x35ac;
/* 0x035AC */ cXyz mWindSpeed;
/* 0x035B8 */ cXyz field_0x35b8;
/* 0x035C4 */ cXyz field_0x35c4;
/* 0x035D0 */ cXyz field_0x35d0;
/* 0x035DC */ cXyz field_0x35dc;
/* 0x035E8 */ cXyz field_0x35e8;
/* 0x035F4 */ cXyz mMidnaAtnPos;
/* 0x03600 */ cXyz field_0x3600;
/* 0x03600 */ cXyz mMidnaHairAtnPos;
/* 0x0360C */ cXyz mKandelaarFlamePos;
/* 0x03618 */ cXyz field_0x3618;
/* 0x03624 */ cXyz field_0x3624;
Expand Down
5 changes: 4 additions & 1 deletion include/d/actor/d_a_kago.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,12 @@ class daKago_c : public fopAc_ac_c {
}

MtxP getLegR3Mtx() { return mLegR3Mtx; }
MtxP getMidnaLocaterMtx() { return mpMorf->getModel()->getAnmMtx(4); }

private:
/* 0x568 */ u8 field_0x568[0x620 - 0x568];
/* 0x568 */ u8 field_0x568[8];
/* 0x570 */ mDoExt_McaMorfSO* mpMorf;
/* 0x574 */ u8 field_0x574[0x620 - 0x574];
/* 0x620 */ Mtx mLegR3Mtx;
/* 0x650 */ u8 field_0x650[0x6E1 - 0x650];
/* 0x6E1 */ u8 field_0x6e1;
Expand Down
Loading