Skip to content

Commit

Permalink
d_a_horse mostly done (#2284)
Browse files Browse the repository at this point in the history
* checkpoint

* d_a_horse mostly done

* some horse doc
  • Loading branch information
TakaRikka authored Jan 9, 2025
1 parent 0cdacf4 commit 36daa25
Show file tree
Hide file tree
Showing 37 changed files with 4,867 additions and 2,794 deletions.
3 changes: 3 additions & 0 deletions include/JSystem/JParticle/JPAEmitter.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ class JPABaseEmitter {
JPASetRMtxSTVecfromMtx(matrix, mGlobalRot, &mGlobalScl, &mGlobalTrs);
mGlobalPScl.set(mGlobalScl.x, mGlobalScl.y);
}
void setDirection(const JGeometry::TVec3<f32>& direction) {
mLocalDir.set(direction);
}

void setLocalScale(const JGeometry::TVec3<f32>& scale) {
mLocalScl.set(scale);
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 @@ -496,6 +496,7 @@ class cCcD_ObjHitInf {
u32 ChkCoNoCrr() const { return mObjCo.ChkNoCrr(); }
void OnCoNoCrrBit() { mObjCo.OnNoCrrBit(); }
u32 ChkCoSph3DCrr() const { return mObjCo.ChkSph3DCrr(); }
void OnCoNoCoHitInfSet() { mObjCo.OnSPrmBit(0x200); }
void OnAtSPrmBit(u32 flag) { mObjAt.OnSPrmBit(flag); }
void OffAtSPrmBit(u32 flag) { mObjAt.OffSPrmBit(flag); }
void OffTgSPrmBit(u32 flag) { mObjTg.OffSPrmBit(flag); }
Expand All @@ -518,6 +519,7 @@ class cCcD_ObjHitInf {
void OnCoSPrmBit(u32 flag) { mObjCo.OnSPrmBit(flag); }
void SetCoVsGrp(u32 grp) { mObjCo.SetVsGrp(grp); }
void SetCoIGrp(u32 grp) { mObjCo.SetIGrp(grp); }
void SetTgGrp(u32 grp) { mObjTg.SetGrp(grp); }
void SetAtSPrm(u32 prm) { mObjAt.SetSPrm(prm); }
void SetTgSPrm(u32 prm) { mObjTg.SetSPrm(prm); }
void SetCoSPrm(u32 prm) { mObjCo.SetSPrm(prm); }
Expand Down
31 changes: 29 additions & 2 deletions include/d/actor/d_a_alink.h
Original file line number Diff line number Diff line change
Expand Up @@ -3244,7 +3244,7 @@ class daAlink_c : public daPy_py_c {
bool checkHorseTiredAnime() const { return checkUpperAnime(0x263); }
bool checkHorseSwordUpAnime() const { return checkUpperAnime(0xCC); }
bool checkHorseUnderItemAnime() const { return checkUnderAnime(0x19); }
bool checkHorseWalkStartAnm() const { return checkUnderMove0BckNoArc(ANM_WSTARTH); }
BOOL checkHorseWalkStartAnm() const { return checkUnderMove0BckNoArc(ANM_WSTARTH); }
bool checkIronBallPreSwingAnime() const { return checkUpperAnime(0x19A); }
bool checkIronBallSwingAnime() const { return checkUpperAnime(0x19B); }
bool checkDashDamageAnime() const { return checkUpperAnime(0xAD); }
Expand Down Expand Up @@ -3382,6 +3382,18 @@ class daAlink_c : public daPy_py_c {
return var_r4;
}

BOOL checkSlideMode() {
return mProcID == PROC_SLIDE ||
mProcID == PROC_SLIDE_LAND ||
mProcID == PROC_WOLF_SLIDE_READY ||
mProcID == PROC_WOLF_SLIDE_LAND ||
mProcID == PROC_WOLF_SLIDE;
}

BOOL checkHorseGetItem() const {
return (mProcID == PROC_GET_ITEM && checkHorseRide()) || mProcID == PROC_HORSE_GET_KEY;
}

bool checkFisingRodJewl() const {
return (mEquipItem == 0x5C || mEquipItem == 0x5F) || mEquipItem == 0x5E;
}
Expand Down Expand Up @@ -3418,7 +3430,10 @@ class daAlink_c : public daPy_py_c {

bool checkCopyRodRevive() const { return mProcID == PROC_COPY_ROD_REVIVE; }
bool checkHorseGetOffMode() const { return mProcID == PROC_HORSE_GETOFF; }
bool checkHorseHangMode() const { return mProcID == PROC_HORSE_HANG; }
bool checkHorseBackInput() const { return mProcID == PROC_HORSE_WAIT; }
bool checkHorseRideOn() const { return mProcID == PROC_HORSE_RIDE; }
bool checkHorseTurnMode() const { return mProcID == PROC_HORSE_TURN; }
bool checkGrabUp() const { return mProcID == PROC_GRAB_UP; }
bool checkSpinnerRideWait() const {
return mProcID == PROC_SPINNER_WAIT && mProcVar2.field_0x300c == 0;
Expand Down Expand Up @@ -3519,6 +3534,8 @@ class daAlink_c : public daPy_py_c {
int getIronBallHandChainNum() const { return mItemMode; }
const cXyz& getIronBallChainHandRootPos() const { return mHookshotTopPos; }

fopAc_ac_c* getAtnActor() { return mTargetedActor; }

void itemHitSE(u32 param_1, u32 param_2, Z2SoundObjBase* param_3) { mZ2Link.startHitItemSE(param_1, param_2, param_3, -1.0f); }

BOOL checkStartFall() { return getStartMode() == 3; }
Expand All @@ -3528,6 +3545,16 @@ class daAlink_c : public daPy_py_c {

BOOL checkWindSpeedMoveXZ() const { return mWindSpeed.abs2XZ() > 1.0f; }

BOOL checkHorseRideReady() const { return checkHorseRideOn() || checkHorseGetOffMode(); }

void getHorseReinCenterLeftPos(cXyz* o_pos) {
mDoMtx_multVec(getLeftHandMatrix(), &m_handLeftInSidePos, o_pos);
}

void getHorseReinCenterRightPos(cXyz* o_pos) {
mDoMtx_multVec(getRightHandMatrix(), &m_handRightInSidePos, o_pos);
}

inline bool checkWindSpeedOnXZ() const;
inline void startRestartRoomFromOut(int, u32, int);
inline u16 getReadyItem();
Expand Down Expand Up @@ -4199,7 +4226,7 @@ struct daAlinkHIO_anm_c {
/* 0x04 */ f32 mSpeed;
/* 0x08 */ f32 mStartFrame;
/* 0x0C */ f32 mInterpolation;
/* 0x10 */ f32 mCheckFrame; // name maybe wrong
/* 0x10 */ f32 mCancelFrame;
}; // size: 0x14

struct daAlinkHIO_basic_c1 {
Expand Down
2 changes: 1 addition & 1 deletion include/d/actor/d_a_cow.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class daCow_c : public fopAc_ac_c {
/* 8065C508 */ void setCowInCage();
/* 8065C680 */ void setEnterCount();
/* 8065C70C */ void action_enter();
/* 8065CFBC */ void isAngry();
/* 8065CFBC */ bool isAngry();
/* 8065D03C */ void isGuardFad();
/* 8065D0B8 */ void setAngryHit();
/* 8065D17C */ void checkBeforeBgAngry(s16);
Expand Down
Loading

0 comments on commit 36daa25

Please sign in to comment.