mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-09-04 17:21:31 -04:00
Merge with upstream
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;
|
||||
}
|
||||
|
||||
|
||||
@@ -3278,6 +3278,10 @@ public:
|
||||
return getDirectionFromAngle(field_0x2fe2 - current.angle.y);
|
||||
}
|
||||
|
||||
static int getBallModelIdx() { return 0x25; }
|
||||
static int getBallBtkIdx() { return 0x49; }
|
||||
static int getBallBrkIdx() { return 0x41; }
|
||||
|
||||
bool checkRootTransClearMode() { return field_0x2f99 & 7; }
|
||||
bool checkRootTransZClearMode() { return field_0x2f99 & 4; }
|
||||
bool checkRootTransXClearMode() { return field_0x2f99 & 1; }
|
||||
|
||||
@@ -1013,6 +1013,10 @@ inline u8 dComIfGs_checkBottle(u8 i_itemNo) {
|
||||
return g_dComIfG_gameInfo.info.getPlayer().getItem().checkBottle(i_itemNo);
|
||||
}
|
||||
|
||||
inline u8 dComIfGs_checkOptVibration() {
|
||||
return g_dComIfG_gameInfo.info.getPlayer().getConfig().checkVibration();
|
||||
}
|
||||
|
||||
inline BOOL dComIfGs_isLightDropGetFlag(u8 i_nowLevel) {
|
||||
return g_dComIfG_gameInfo.info.getPlayer().getLightDrop().isLightDropGetFlag(i_nowLevel);
|
||||
}
|
||||
@@ -2583,6 +2587,10 @@ inline u32 dComIfGp_particle_set(u32 param_0, u16 param_1, const cXyz* param_2,
|
||||
param_9, param_10, 1.0f);
|
||||
}
|
||||
|
||||
inline u32 dComIfGp_particle_set(u32 param_0, u16 param_1, const cXyz* param_2, const dKy_tevstr_c* param_3) {
|
||||
return dComIfGp_particle_set(param_0,param_1,param_2,param_3,0,0,0xFF,0,0xFFFFFFFF,0,0,0);
|
||||
}
|
||||
|
||||
inline JPABaseEmitter* dComIfGp_particle_set(u16 param_1, const cXyz* param_2, const dKy_tevstr_c* param_3,
|
||||
const csXyz* param_4, const cXyz* param_5, u8 param_6,
|
||||
dPa_levelEcallBack* param_7, s8 param_8, const GXColor* param_9,
|
||||
@@ -2765,6 +2773,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 */
|
||||
|
||||
@@ -8,12 +8,10 @@
|
||||
|
||||
class dJntColData_c {};
|
||||
|
||||
class fopAc_ac_c;
|
||||
|
||||
class dJntCol_c {
|
||||
public:
|
||||
/* 80035C8C */ dJntCol_c();
|
||||
/* 80035CA0 */ void init(fopAc_ac_c*, dJntColData_c const*, J3DModel*, int);
|
||||
/* 80035CA0 */ int init(fopAc_ac_c*, dJntColData_c const*, J3DModel*, int);
|
||||
/* 80035CC8 */ void setNowLine(cM3dGLin*, cXyz const*, csXyz const*, cXyz*);
|
||||
/* 80035DC8 */ void searchNearPos(cM3dGLin const*, cXyz const*, cXyz*, int) const;
|
||||
/* 80036AEC */ void getArrowOffsetPosAndAngle(cXyz const*, csXyz const*, cXyz*, cXyz*) const;
|
||||
|
||||
@@ -2,5 +2,37 @@
|
||||
#define D_D_KY_THUNDER_H
|
||||
|
||||
#include "dolphin/types.h"
|
||||
#include "JSystem/JKernel/JKRSolidHeap.h"
|
||||
#include "m_Do/m_Do_ext.h"
|
||||
|
||||
class dThunder_c {
|
||||
private:
|
||||
/* 0x00 */ u8 field_0x00[0xf8];
|
||||
/* 0xF8 */ JKRSolidHeap* mpHeap;
|
||||
public:
|
||||
/* 801ADF58 */ int createHeap();
|
||||
/* 801ADFB4 */ void adjustHeap();
|
||||
/* 801AE458 */ int create();
|
||||
|
||||
~dThunder_c() {
|
||||
mDoExt_destroySolidHeap(mpHeap);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
inline int draw() {
|
||||
// finish
|
||||
};
|
||||
|
||||
inline int execute() {
|
||||
// finish
|
||||
};
|
||||
|
||||
inline int thunder_delete(dThunder_c* i_dthunderP) {
|
||||
if (i_dthunderP) {
|
||||
delete i_dthunderP;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif /* D_D_KY_THUNDER_H */
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
#include "d/d_drawlist.h"
|
||||
#include "d/d_select_icon.h"
|
||||
#include "dolphin/types.h"
|
||||
#include "JSystem/J2DGraph/J2DScreen.h"
|
||||
#include "JSystem/J2DGraph/J2DPane.h"
|
||||
|
||||
class dSelect_cursorHIO_c {
|
||||
public:
|
||||
@@ -31,8 +33,8 @@ public:
|
||||
/* 801951B0 */ void setParam(f32, f32, f32, f32, f32);
|
||||
/* 801951C8 */ void setScale(f32);
|
||||
/* 801952A0 */ void setAlphaRate(f32);
|
||||
/* 80195330 */ void addAlpha();
|
||||
/* 801953CC */ void decAlpha();
|
||||
/* 80195330 */ int addAlpha();
|
||||
/* 801953CC */ int decAlpha();
|
||||
/* 80195460 */ void setBpkAnimation(J2DAnmColor*);
|
||||
/* 801955F0 */ void setBtk0Animation(J2DAnmTextureSRTKey*);
|
||||
/* 80195724 */ void setCursorAnimation();
|
||||
@@ -43,15 +45,32 @@ public:
|
||||
/* 801949EC */ virtual ~dSelect_cursor_c();
|
||||
|
||||
void setPos(f32 x, f32 y) {
|
||||
field_0x58 = x;
|
||||
field_0x5c = y;
|
||||
mPositionX = x;
|
||||
mPositionY = y;
|
||||
}
|
||||
|
||||
private:
|
||||
u8 field_0x4[0x54];
|
||||
f32 field_0x58;
|
||||
f32 field_0x5c;
|
||||
u8 field_0x60[0x58];
|
||||
/* 0x04 */ J2DScreen* mpScreen;
|
||||
/* 0x08 */ J2DPane* mpPane;
|
||||
/* 0x0C */ dSelect_icon_c* mpSelectIcon;
|
||||
/* 0x10 */ CPaneMgr* mpPaneMgr;
|
||||
/* 0x14 */ u8 field_0x14[40];
|
||||
/* 0x3C */ dSelect_cursorHIO_c* mpCursorHIO;
|
||||
/* 0x40 */ u8 field_0x40[16];
|
||||
/* 0x50 */ f32 field_0x50;
|
||||
/* 0x54 */ f32 field_0x54;
|
||||
/* 0x58 */ f32 mPositionX;
|
||||
/* 0x5C */ f32 mPositionY;
|
||||
/* 0x60 */ f32 mParam1;
|
||||
/* 0x64 */ f32 mParam2;
|
||||
/* 0x68 */ f32 mParam3;
|
||||
/* 0x6C */ f32 mParam4;
|
||||
/* 0x70 */ f32 mParam5;
|
||||
/* 0x74 */ u8 field_0x74[32];
|
||||
/* 0x94 */ f32 field_0x94[4];
|
||||
/* 0xA4 */ f32 field_0xa4[4];
|
||||
/* 0xB4 */ u8 field_0xb4;
|
||||
/* 0xB5 */ s8 mNameIdx;
|
||||
};
|
||||
|
||||
#endif /* D_D_SELECT_CURSOR_H */
|
||||
|
||||
@@ -3,4 +3,11 @@
|
||||
|
||||
#include "dolphin/types.h"
|
||||
|
||||
class dVibration_pattern {
|
||||
public:
|
||||
u16 field_0x00;
|
||||
u16 field_0x02;
|
||||
u32 field_0x04;
|
||||
};
|
||||
|
||||
#endif /* D_D_VIB_PATTERN_H */
|
||||
|
||||
+16
-15
@@ -2,26 +2,27 @@
|
||||
#define D_D_VIBRATION_H
|
||||
|
||||
#include "d/save/d_save.h"
|
||||
#include "d/d_vib_pattern.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
class dVibration_c {
|
||||
public:
|
||||
/* 8006F268 */ void Run();
|
||||
/* 8006FA24 */ void StartShock(int, int, cXyz);
|
||||
/* 8006FA24 */ bool StartShock(int, int, cXyz);
|
||||
/* 8006FC0C */ void StartQuake(u8 const*, int, int, cXyz);
|
||||
/* 8006FB10 */ void StartQuake(int, int, cXyz);
|
||||
/* 8006FD94 */ void StopQuake(int);
|
||||
/* 8006FB10 */ bool StartQuake(int, int, cXyz);
|
||||
/* 8006FD94 */ int StopQuake(int);
|
||||
/* 8006FE00 */ void Kill();
|
||||
/* 8006FE5C */ void CheckQuake();
|
||||
/* 8006FE5C */ int CheckQuake();
|
||||
/* 8006FE84 */ void setDefault();
|
||||
/* 8006FF04 */ void Init();
|
||||
/* 8006FF38 */ void Pause();
|
||||
/* 8006FFF8 */ void Remove();
|
||||
|
||||
static u8 const MS_patt[88];
|
||||
static u8 const CS_patt[88];
|
||||
static u8 const MQ_patt[80];
|
||||
static u8 const CQ_patt[80];
|
||||
static dVibration_pattern const MS_patt[11];
|
||||
static dVibration_pattern const CS_patt[11];
|
||||
static dVibration_pattern const MQ_patt[10];
|
||||
static dVibration_pattern const CQ_patt[10];
|
||||
|
||||
private:
|
||||
class {
|
||||
@@ -29,13 +30,13 @@ private:
|
||||
class {
|
||||
public:
|
||||
/* 0x00 */ u32 field_0x0;
|
||||
/* 0x04 */ int field_0x4;
|
||||
/* 0x04 */ s32 field_0x4;
|
||||
/* 0x08 */ s32 field_0x8;
|
||||
/* 0x0C */ s32 field_0xc;
|
||||
/* 0x10 */ s32 field_0x10;
|
||||
/* 0x14 */ int field_0x14;
|
||||
/* 0x14 */ s32 field_0x14;
|
||||
/* 0x18 */ cXyz field_0x18;
|
||||
/* 0x24 */ u32 field_0x24;
|
||||
/* 0x24 */ s32 field_0x24;
|
||||
} mShock, mQuake;
|
||||
} /* 0x00 */ field_0x0;
|
||||
/* 0x50 */ u32 field_0x50;
|
||||
@@ -43,17 +44,17 @@ private:
|
||||
/* 0x58 */ s32 field_0x58;
|
||||
/* 0x5C */ s32 field_0x5c;
|
||||
/* 0x60 */ u32 field_0x60;
|
||||
/* 0x64 */ u32 field_0x64;
|
||||
/* 0x64 */ s32 field_0x64;
|
||||
/* 0x68 */ u32 field_0x68;
|
||||
/* 0x6C */ u32 field_0x6c;
|
||||
/* 0x70 */ u32 field_0x70;
|
||||
/* 0x70 */ s32 field_0x70;
|
||||
/* 0x74 */ u32 field_0x74;
|
||||
/* 0x78 */ u32 field_0x78;
|
||||
/* 0x7C */ u32 field_0x7c;
|
||||
/* 0x80 */ u32 field_0x80;
|
||||
/* 0x80 */ s32 field_0x80;
|
||||
/* 0x84 */ u32 field_0x84;
|
||||
/* 0x88 */ s32 field_0x88;
|
||||
/* 0x8C */ u32 field_0x8c;
|
||||
/* 0x8C */ s32 field_0x8c;
|
||||
}; // Size: 0x90
|
||||
|
||||
#endif /* D_D_VIBRATION_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();
|
||||
|
||||
@@ -36,4 +36,7 @@ typedef unsigned long size_t;
|
||||
#define INT32_MAX (0x7fffffff)
|
||||
#define UINT32_MAX (0xffffffff)
|
||||
|
||||
#define FLOAT_MIN (-1e31f)
|
||||
#define FLOAT_MAX (3.40282346638528860e+38f)
|
||||
|
||||
#endif
|
||||
@@ -136,10 +136,12 @@ 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();
|
||||
/* 800194FC */ void checkBallModelDraw();
|
||||
/* 80019404 */ bool initBallModel();
|
||||
/* 800194FC */ int checkBallModelDraw();
|
||||
/* 80019520 */ void setBallModelEffect(dKy_tevstr_c*);
|
||||
/* 800196A0 */ void drawBallModel(dKy_tevstr_c*);
|
||||
|
||||
|
||||
@@ -154,6 +154,10 @@ inline void fopAcM_SetParam(void* p_actor, u32 param) {
|
||||
fpcM_SetParam(p_actor, param);
|
||||
}
|
||||
|
||||
inline void fopAcM_SetJntCol(fopAc_ac_c* i_actorP, dJntCol_c* i_jntColP) {
|
||||
i_actorP->mJntCol = i_jntColP;
|
||||
}
|
||||
|
||||
inline s16 fopAcM_GetProfName(const void* pActor) {
|
||||
return fpcM_GetProfName(pActor);
|
||||
}
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
#define F_F_OP_CAMERA_H_
|
||||
|
||||
#include "f_op/f_op_camera_mng.h"
|
||||
|
||||
static s32 fopCam_Draw(camera_class* param_1);
|
||||
static void fopCam_Execute(camera_class* pCamera);
|
||||
static int fopCam_Execute(camera_class* pCamera);
|
||||
int fopCam_IsDelete(camera_class* pCamera);
|
||||
|
||||
#endif
|
||||
@@ -25,6 +25,9 @@ typedef struct leaf_process_profile_definition {
|
||||
/* 0x28 */ int field_0x28;
|
||||
/* 0x2C */ u8 field_0x2c;
|
||||
/* 0x2D */ u8 field_0x2d;
|
||||
/* 0x2E */ u8 field_0x2e[0x2]; // extended from here to end to make fopCam_Create match. might be wrong
|
||||
/* 0x30 */ u8 field_0x30[0xc];
|
||||
/* 0x3C */ leafdraw_method_class* mMethods;
|
||||
} leaf_process_profile_definition;
|
||||
|
||||
s32 fpcLf_GetPriority(const leafdraw_class* pLeaf);
|
||||
|
||||
@@ -60,6 +60,7 @@ public:
|
||||
static f32 getAnalogR(u32 pad) { return getCpadInfo(pad).mTriggerRight; }
|
||||
static f32 getAnalogL(u32 pad) { return getCpadInfo(pad).mTriggerLeft; }
|
||||
static BOOL isConnect(u32 pad) { return JUTGamePad::getPortStatus(pad) == 0; }
|
||||
static void stopMotorHard(u32 pad) { return m_gamePad[pad]->stopMotorHard(); }
|
||||
static void stopMotorWaveHard(u32 pad) { return m_gamePad[pad]->stopMotorWaveHard(); }
|
||||
|
||||
static JUTGamePad* m_gamePad[4];
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -33,6 +33,10 @@ inline void mDoMtx_copy(const Mtx src, Mtx dst) {
|
||||
PSMTXCopy(src, dst);
|
||||
}
|
||||
|
||||
inline void mDoMtx_trans(Mtx m, f32 x, f32 y, f32 z) {
|
||||
PSMTXTrans(m,x,y,z);
|
||||
}
|
||||
|
||||
class mDoMtx_stack_c {
|
||||
public:
|
||||
/* 8000CCC8 */ static bool push();
|
||||
|
||||
Reference in New Issue
Block a user