Skip to content

Commit

Permalink
Merge pull request #513 from Sage-of-Mirrors/obj_hole
Browse files Browse the repository at this point in the history
Match daObj_Hole
  • Loading branch information
magcius authored Oct 9, 2023
2 parents 3ae5513 + 5c3ce2a commit 387a9bf
Show file tree
Hide file tree
Showing 7 changed files with 319 additions and 160 deletions.
2 changes: 1 addition & 1 deletion configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1262,7 +1262,7 @@ def DolphinLib(lib_name, objects):
ActorRel(NonMatching, "d_a_obj_doguu_demo"),
ActorRel(NonMatching, "d_a_obj_gryw00"),
ActorRel(NonMatching, "d_a_obj_hfuck1"),
ActorRel(NonMatching, "d_a_obj_hole"),
ActorRel(Matching, "d_a_obj_hole", extra_cflags=["-sym off"]),
ActorRel(NonMatching, "d_a_obj_ice"),
ActorRel(NonMatching, "d_a_obj_ikada"),
ActorRel(NonMatching, "d_a_obj_kanat"),
Expand Down
10 changes: 10 additions & 0 deletions include/SSystem/SComponent/c_m3d_g_pla.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#define C_M3D_G_PLA_H_

#include "SSystem/SComponent/c_xyz.h"
#include "SSystem/SComponent/c_m3d.h"
#include "dolphin/mtx/vec.h"

// Plane with a normal
Expand All @@ -14,10 +15,19 @@ class cM3dGPla {
cM3dGPla() {}
void CalcAngleXz(short* pAngleX, short* pAngleY) const;
void SetupNP0(const Vec&, const Vec&);

f32 getPlaneFunc(const Vec *p) const {
return mD + VECDotProduct(&mNormal, p);
}

const cXyz * GetNP() const { return &mNormal; }
f32 getCrossY(const cXyz& i_axis, float* i_value) const {
if (!cM3d_IsZero(mNormal.y)) {
*i_value = (-mNormal.x * i_axis.x -
mNormal.z * i_axis.z -
mD) / mNormal.y;
}
}

virtual ~cM3dGPla() {}
};
Expand Down
3 changes: 2 additions & 1 deletion include/d/d_bg_s_acch.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ class dBgS_Acch : public cBgS_Chk, public dBgS_Chk {
void ClrGroundLanding() { m_flags &= ~GROUND_LANDING; }
void ClrGroundAway() { m_flags &= ~GROUND_AWAY; }
void ClrWallHit() { m_flags &= ~WALL_HIT; }
void SetWallNone() { m_flags |= WALL_NONE; }
void SetRoofNone() { m_flags |= ROOF_NONE; }
void SetRoofHit() { m_flags |= ROOF_HIT; }
void SetWaterNone() { m_flags |= WATER_NONE; }
Expand Down Expand Up @@ -209,4 +210,4 @@ class dBgS_ObjAcch : public dBgS_Acch {
virtual ~dBgS_ObjAcch() {}
}; // Size: 0x1C4

#endif /* D_BG_D_BG_S_ACCH_H */
#endif /* D_BG_D_BG_S_ACCH_H */
6 changes: 3 additions & 3 deletions include/d/d_bg_s_lin_chk.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ class dBgS_ArrowLinChk : public dBgS_LinChk {

class dBgS_ObjLinChk : public dBgS_LinChk {
public:
dBgS_ObjLinChk();
dBgS_ObjLinChk() { SetObj(); }

virtual ~dBgS_ObjLinChk();
virtual ~dBgS_ObjLinChk() {}
};

class dBgS_BombLinChk : public dBgS_LinChk {
Expand Down Expand Up @@ -87,4 +87,4 @@ class dBgS_MirLightLinChk : public dBgS_LinChk {
virtual ~dBgS_MirLightLinChk();
};

#endif /* D_BG_D_BG_S_LIN_CHK_H */
#endif /* D_BG_D_BG_S_LIN_CHK_H */
2 changes: 1 addition & 1 deletion include/d/d_bg_s_poly_pass_chk.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ class dBgS_PolyPassChk : public cBgS_PolyPassChk {

STATIC_ASSERT(sizeof(dBgS_PolyPassChk) == 0xC);

#endif /* D_BG_D_BG_S_POLY_PASS_CHK_H */
#endif /* D_BG_D_BG_S_POLY_PASS_CHK_H */
3 changes: 3 additions & 0 deletions include/d/d_lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,8 @@ class dLib_anm_prm_c {
};

void dLib_bcks_setAnm(const char*, mDoExt_McaMorf*, s8*, s8*, s8*, const int*, const dLib_anm_prm_c*, bool);
bool dLib_checkPlayerInCircle(cXyz, f32, f32);

void dLib_setNextStageBySclsNum(u8, s8);

#endif /* D_LIB_H */
Loading

0 comments on commit 387a9bf

Please sign in to comment.