mirror of
https://github.com/zeldaret/tp
synced 2026-08-06 01:48:59 -04:00
d_insect first pass (#219)
* dInsect_c::dInsect_c * dInsect_c::Insect_GetDemoMain attempt * dInsect_c::CalcZBuffer attempt * remove asm * convert clib inlines to template functions
This commit is contained in:
@@ -36,13 +36,18 @@ s16 cLib_targetAngleX(const cXyz*, const cXyz*);
|
||||
void cLib_offsetPos(cXyz* pDest, cXyz const* pSrc, s16 angle, cXyz const* vec);
|
||||
s32 cLib_distanceAngleS(s16 x, s16 y);
|
||||
|
||||
inline void cLib_offBit(u8& value, u8 bit) {
|
||||
template <typename T>
|
||||
inline void cLib_offBit(T& value, u8 bit) {
|
||||
value &= ~bit;
|
||||
}
|
||||
inline void cLib_onBit(u8& value, u8 bit) {
|
||||
|
||||
template <typename T>
|
||||
inline void cLib_onBit(T& value, u8 bit) {
|
||||
value |= bit;
|
||||
}
|
||||
inline u8 cLib_checkBit(u8& value, u8 bit) {
|
||||
|
||||
template <typename T>
|
||||
inline T cLib_checkBit(T& value, u8 bit) {
|
||||
return value & bit;
|
||||
}
|
||||
|
||||
|
||||
@@ -2769,6 +2769,10 @@ inline void dComIfGd_init() {
|
||||
g_dComIfG_gameInfo.drawlist.init();
|
||||
}
|
||||
|
||||
inline void dComIfGd_peekZ(s16 param_0, s16 param_1, u32* param_2) {
|
||||
g_dComIfG_gameInfo.drawlist.newPeekZdata(param_0, param_1, param_2);
|
||||
}
|
||||
|
||||
inline void dComIfGd_peekZdata() {
|
||||
g_dComIfG_gameInfo.drawlist.peekZdata();
|
||||
}
|
||||
|
||||
@@ -515,7 +515,9 @@ public:
|
||||
/* 0x920 */ f32 mTrimHeight;
|
||||
/* 0x924 */ int mTrimSize;
|
||||
/* 0x928 */ int mTrimTypeForce;
|
||||
/* 0x92C */ u8 field_0x92c[0x970 - 0x92c];
|
||||
/* 0x92C */ u8 field_0x92c[0x93C - 0x92c];
|
||||
/* 0x93C */ f32 field_0x93c;
|
||||
/* 0x940 */ u8 field_0x940[0x970 - 0x940];
|
||||
/* 0x970 */ dCamSetup_c mCamSetup;
|
||||
/* 0xAEC */ dCamParam_c mCamParam;
|
||||
/* 0xB0C */
|
||||
|
||||
@@ -326,6 +326,10 @@ public:
|
||||
param_6);
|
||||
}
|
||||
|
||||
void newPeekZdata(s16 param_0, s16 param_1, u32* param_2) {
|
||||
mPeekZ.newData(param_0, param_1, param_2);
|
||||
}
|
||||
|
||||
static void offWipe() { mWipe = 0; }
|
||||
static f32 getWipeRate() { return mWipeRate; }
|
||||
|
||||
|
||||
@@ -2,5 +2,29 @@
|
||||
#define D_D_INSECT_H
|
||||
|
||||
#include "dolphin/types.h"
|
||||
#include "f_op/f_op_actor.h"
|
||||
|
||||
class dInsect_c : public fopAc_ac_c {
|
||||
public:
|
||||
/* 80110648 */ virtual void Insect_Release();
|
||||
/* 8015E010 */ dInsect_c();
|
||||
/* 8015E078 */ virtual void Insect_GetDemoMain();
|
||||
/* 8015E26C */ virtual void CalcZBuffer(f32);
|
||||
private:
|
||||
/* 0x56C */ u8 field_0x56C;
|
||||
/* 0x56D */ u8 field_0x56D;
|
||||
/* 0x56E */ u8 field_0x56E[10];
|
||||
/* 0x578 */ u32 field_0x578;
|
||||
/* 0x57C */ f32 field_0x57C;
|
||||
/* 0x580 */ u8 field_0x580;
|
||||
/* 0x581 */ u8 field_0x581;
|
||||
/* 0x582 */ s16 field_0x582;
|
||||
/* 0x584 */ u8 field_0x584;
|
||||
/* 0x585 */ u8 field_0x585;
|
||||
/* 0x586 */ u8 field_0x586[2];
|
||||
/* 0x588 */ u32 field_0x588;
|
||||
/* 0x58C */ int field_0x58C;
|
||||
|
||||
};
|
||||
|
||||
#endif /* D_D_INSECT_H */
|
||||
|
||||
@@ -38,7 +38,7 @@ public:
|
||||
/* 801D9E20 */ void isGiveInsect(int, int);
|
||||
/* 801D9ED4 */ void isGiveInsect(u8);
|
||||
/* 801D9E7C */ void isCatchInsect(u8);
|
||||
/* 801D9F3C */ void isCatchNotGiveInsect(u8);
|
||||
/* 801D9F3C */ static u8 isCatchNotGiveInsect(u8);
|
||||
/* 801D9F8C */ void cursorMove();
|
||||
/* 801DA1EC */ void setCursorPos();
|
||||
/* 801DA2FC */ bool dpdMove();
|
||||
|
||||
@@ -136,6 +136,8 @@ public:
|
||||
s8 getRoomNo() const { return current.mRoomNo; }
|
||||
}; // Size: 0x568
|
||||
|
||||
STATIC_ASSERT(sizeof(fopAc_ac_c) == 0x568);
|
||||
|
||||
class fopEn_enemy_c : public fopAc_ac_c {
|
||||
public:
|
||||
/* 80019404 */ void initBallModel();
|
||||
|
||||
@@ -16,5 +16,6 @@ struct mDoLib_clipper {
|
||||
void mDoLib_project(Vec* param_0, Vec* param_1);
|
||||
bool mDoLib_setResTimgObj(ResTIMG const* res, GXTexObj* o_texObj, u32 param_2,
|
||||
GXTlutObj* o_tlutObj);
|
||||
void mDoLib_pos2camera(Vec* param_0, Vec* param_1);
|
||||
|
||||
#endif /* M_DO_M_DO_LIB_H */
|
||||
|
||||
Reference in New Issue
Block a user