mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-04 18:28:45 -04:00
wip debug / pal building, b_gm mostly done (#2285)
* b_gm mostly done * wip debug / pal building * fix configure.py * fix some debug macros / flags
This commit is contained in:
@@ -119,6 +119,8 @@ private:
|
||||
/* 0x6D4 */ JAISoundParamsMove mParams;
|
||||
}; // Size: 0x724
|
||||
|
||||
#if VERSION != VERSION_SHIELD_DEBUG
|
||||
STATIC_ASSERT(sizeof(JAISeMgr) == 0x724);
|
||||
#endif
|
||||
|
||||
#endif /* JAISEMGR_H */
|
||||
|
||||
@@ -277,7 +277,7 @@ public:
|
||||
}
|
||||
|
||||
void data_setInterval(f64 f) {
|
||||
ASSERT(f > TValue(0));
|
||||
// ASSERT(f > TValue(0));
|
||||
_50 = f;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,18 +4,8 @@
|
||||
#include "dolphin/os.h"
|
||||
|
||||
#ifdef DEBUG
|
||||
#define JUT_ASSERT(LINE, COND) \
|
||||
if ((COND) == 0) { \
|
||||
JUTAssertion::showAssert(JUTAssertion::getSDevice(), __FILE__, LINE, #COND); \
|
||||
OSPanic(__FILE__, LINE, "Halt"); \
|
||||
}
|
||||
|
||||
#define JUT_ASSERT_REPORT(LINE, COND) \
|
||||
if ((COND) == 0) { \
|
||||
JUTAssertion::showAssert(JUTAssertion::getSDevice(), __FILE__, LINE, #COND); \
|
||||
OSPanic(__FILE__, LINE, "Halt"); \
|
||||
OSReport("[%s] %d\n", __FILE__, __LINE__); \
|
||||
}
|
||||
#define JUT_ASSERT(LINE, COND) \
|
||||
(COND) ? (void)0 : (JUTAssertion::showAssert(JUTAssertion::getSDevice(), __FILE__, LINE, #COND), OSPanic(__FILE__, LINE, "Halt"));
|
||||
|
||||
#define JUT_PANIC(LINE, TEXT) \
|
||||
JUTAssertion::showAssert(JUTAssertion::getSDevice(), __FILE__, LINE, TEXT); \
|
||||
@@ -32,7 +22,6 @@
|
||||
|
||||
#else
|
||||
#define JUT_ASSERT(...)
|
||||
#define JUT_ASSERT_REPORT(...)
|
||||
#define JUT_PANIC(...)
|
||||
#define JUT_WARN(...)
|
||||
#define JUT_LOG(...)
|
||||
|
||||
@@ -46,7 +46,9 @@ public:
|
||||
/* 0x1370 */ Z2FxLineMgr mFxLineMgr;
|
||||
}; // Size: 0x138C
|
||||
|
||||
#if VERSION != VERSION_SHIELD_DEBUG
|
||||
STATIC_ASSERT(sizeof(Z2AudioMgr) == 0x138C);
|
||||
#endif
|
||||
|
||||
inline Z2AudioMgr* Z2GetAudioMgr() {
|
||||
return Z2AudioMgr::getInterface();
|
||||
|
||||
@@ -40,7 +40,9 @@ private:
|
||||
/* 0x80C */ JAISoundID mSoundID;
|
||||
}; // Size: 0x810
|
||||
|
||||
#if VERSION != VERSION_SHIELD_DEBUG
|
||||
STATIC_ASSERT(sizeof(Z2SoundMgr) == 0x810);
|
||||
#endif
|
||||
|
||||
inline Z2SoundMgr* Z2GetSoundMgr() {
|
||||
return JASGlobalInstance<Z2SoundMgr>::getInstance();
|
||||
|
||||
+121
-10
@@ -2,6 +2,19 @@
|
||||
#define D_A_B_GM_H
|
||||
|
||||
#include "f_op/f_op_actor_mng.h"
|
||||
#include "d/d_bg_s_acch.h"
|
||||
#include "d/d_cc_d.h"
|
||||
#include "d/d_cc_uty.h"
|
||||
|
||||
struct b_gm_foot {
|
||||
/* 0x00 */ f32 field_0x0;
|
||||
/* 0x04 */ f32 field_0x4;
|
||||
/* 0x08 */ s16 field_0x8[1];
|
||||
/* 0x0A */ s16 field_0xa;
|
||||
/* 0x0C */ s16 field_0xc;
|
||||
/* 0x10 */ cXyz field_0x10;
|
||||
/* 0x1C */ cXyz field_0x1c;
|
||||
};
|
||||
|
||||
/**
|
||||
* @ingroup actors-enemies
|
||||
@@ -13,10 +26,90 @@
|
||||
*/
|
||||
class b_gm_class : public fopEn_enemy_c {
|
||||
public:
|
||||
/* 805F38E4 */ b_gm_class();
|
||||
|
||||
private:
|
||||
/* 0x5ac */ u8 field_0x5ac[0x1d08 - 0x5ac];
|
||||
/* 0x05AC */ request_of_phase_process_class mPhase;
|
||||
/* 0x05B4 */ u8 field_0x5B4[0x05B6 - 0x05B4];
|
||||
/* 0x05B6 */ u8 field_0x5b6;
|
||||
/* 0x05B8 */ cXyz mTargetMovePos;
|
||||
/* 0x05C4 */ s16 mAngleToPlayer;
|
||||
/* 0x05C8 */ f32 mPlayerDistance;
|
||||
/* 0x05CC */ s16 unk_0x5cc;
|
||||
/* 0x05CE */ s16 field_0x5ce;
|
||||
/* 0x05D0 */ u8 field_0x5D0[0x05D4 - 0x05D0];
|
||||
/* 0x05D4 */ f32 field_0x5d4;
|
||||
/* 0x05D8 */ f32 field_0x5d8;
|
||||
/* 0x05DC */ mDoExt_McaMorfSO* mpModelMorf;
|
||||
/* 0x05E0 */ Z2CreatureEnemy mCreatureSound;
|
||||
/* 0x0684 */ Z2SoundObjSimple mBeamSound;
|
||||
/* 0x06A4 */ int mAnmID;
|
||||
/* 0x06A8 */ mDoExt_btkAnm* mpZoomBtk;
|
||||
/* 0x06AC */ f32 mZoomBtkFrame;
|
||||
/* 0x06B0 */ u32 mShadowID;
|
||||
/* 0x06B4 */ u8 mIsDisappear;
|
||||
/* 0x06B8 */ mDoExt_McaMorf* mpBeamModelMorf;
|
||||
/* 0x06BC */ mDoExt_btkAnm* mpBeamBtk;
|
||||
/* 0x06C0 */ f32 field_0x6c0;
|
||||
/* 0x06C4 */ f32 field_0x6c4;
|
||||
/* 0x06C8 */ s16 field_0x6c8;
|
||||
/* 0x06CC */ cXyz field_0x6cc;
|
||||
/* 0x06D8 */ cXyz field_0x6d8;
|
||||
/* 0x06E4 */ u32 mBeamEmitterIDs[4];
|
||||
/* 0x06F4 */ u8 field_0x6f4;
|
||||
/* 0x06F5 */ s8 field_0x6f5;
|
||||
/* 0x06F8 */ J3DModel* mpSpotLightModel[4];
|
||||
/* 0x0708 */ mDoExt_btkAnm* mpSpotLightBtk;
|
||||
/* 0x070C */ f32 mSpotLightSize[4];
|
||||
/* 0x071C */ s16 mCounter;
|
||||
/* 0x071E */ s16 mAction;
|
||||
/* 0x0720 */ s16 mMode;
|
||||
/* 0x0722 */ s16 mTimers[4];
|
||||
/* 0x072A */ s16 mInvincibilityTimer;
|
||||
/* 0x072C */ u8 field_0x72C[0x0730 - 0x072C];
|
||||
/* 0x0730 */ cXyz field_0x730;
|
||||
/* 0x073C */ cXyz field_0x73c;
|
||||
/* 0x0748 */ dBgS_AcchCir mAcchCir;
|
||||
/* 0x0788 */ dBgS_ObjAcch mAcch;
|
||||
/* 0x0960 */ dCcD_Stts mCcStts;
|
||||
/* 0x099C */ dCcD_Sph mCoreSph;
|
||||
/* 0x0AD4 */ dCcD_Sph mBodySph[2];
|
||||
/* 0x0D44 */ dCcD_Sph mHandSph[2];
|
||||
/* 0x0FB4 */ dCcD_Sph mFootSph[8];
|
||||
/* 0x1974 */ dCcD_Sph mBeamSph;
|
||||
/* 0x1AAC */ s8 field_0x1aac;
|
||||
/* 0x1AB0 */ dCcU_AtInfo mAtInfo;
|
||||
/* 0x1AD4 */ s8 mHitCount;
|
||||
/* 0x1AD5 */ s8 field_0x1ad5;
|
||||
/* 0x1AD6 */ s8 field_0x1ad6;
|
||||
/* 0x1AD8 */ s16 field_0x1ad8;
|
||||
/* 0x1ADA */ s16 field_0x1ada;
|
||||
/* 0x1ADC */ s16 field_0x1adc;
|
||||
/* 0x1ADE */ s16 field_0x1ade;
|
||||
/* 0x1AE0 */ f32 field_0x1ae0;
|
||||
/* 0x1AE4 */ f32 mBodyColorIntensity;
|
||||
/* 0x1AE8 */ b_gm_foot mFoot[10];
|
||||
/* 0x1C78 */ u8 field_0x1C78[0x1C84 - 0x1C78];
|
||||
/* 0x1C84 */ u32 field_0x1c84;
|
||||
/* 0x1C88 */ u32 field_0x1c88;
|
||||
/* 0x1C8C */ s16 mDemoMode;
|
||||
/* 0x1C8E */ s16 mDemoModeTimer;
|
||||
/* 0x1C90 */ cXyz mDemoCamEye;
|
||||
/* 0x1C9C */ cXyz mDemoCamCenter;
|
||||
/* 0x1CA8 */ cXyz mDemoCamEyeTarget;
|
||||
/* 0x1CB4 */ cXyz mDemoCamCenterTarget;
|
||||
/* 0x1CC0 */ cXyz mDemoCamEyeSpeed;
|
||||
/* 0x1CCC */ cXyz mDemoCamCenterSpeed;
|
||||
/* 0x1CD8 */ f32 mDemoCamFovy;
|
||||
/* 0x1CDC */ f32 field_0x1cdc;
|
||||
/* 0x1CE0 */ f32 field_0x1ce0;
|
||||
/* 0x1CE4 */ s16 field_0x1ce4;
|
||||
/* 0x1CE6 */ s16 field_0x1ce6;
|
||||
/* 0x1CE8 */ s16 field_0x1ce8;
|
||||
/* 0x1CEC */ cXyz field_0x1cec;
|
||||
/* 0x1CF8 */ u8 field_0x1cf8;
|
||||
/* 0x1CF9 */ u8 field_0x1cf9;
|
||||
/* 0x1CFA */ u8 field_0x1cfa;
|
||||
/* 0x1CFC */ int field_0x1cfc;
|
||||
/* 0x1D00 */ f32 mKankyoBlend;
|
||||
/* 0x1D04 */ u8 mInitHIO;
|
||||
};
|
||||
|
||||
STATIC_ASSERT(sizeof(b_gm_class) == 0x1d08);
|
||||
@@ -24,13 +117,31 @@ STATIC_ASSERT(sizeof(b_gm_class) == 0x1d08);
|
||||
class daB_GM_HIO_c {
|
||||
public:
|
||||
/* 805ED94C */ daB_GM_HIO_c();
|
||||
/* 805F3E64 */ ~daB_GM_HIO_c();
|
||||
};
|
||||
/* 805F3E64 */ virtual ~daB_GM_HIO_c() {}
|
||||
|
||||
struct b_gm_foot {
|
||||
public:
|
||||
/* 805F3AC0 */ ~b_gm_foot();
|
||||
/* 805F3AFC */ b_gm_foot();
|
||||
/* 0x04 */ s8 field_0x4;
|
||||
/* 0x08 */ f32 model_size;
|
||||
/* 0x0C */ f32 check_size;
|
||||
/* 0x10 */ f32 dash_speed;
|
||||
/* 0x14 */ f32 dash_anm_speed;
|
||||
/* 0x18 */ f32 move_speed;
|
||||
/* 0x1C */ f32 move_anm_speed;
|
||||
/* 0x20 */ f32 wait_anm_speed;
|
||||
/* 0x24 */ f32 range;
|
||||
/* 0x28 */ s16 smoke_prim_R;
|
||||
/* 0x2A */ s16 smoke_prim_G;
|
||||
/* 0x2C */ s16 smoke_prim_B;
|
||||
/* 0x2E */ s16 smoke_env_R;
|
||||
/* 0x30 */ s16 smoke_env_G;
|
||||
/* 0x32 */ s16 smoke_env_B;
|
||||
/* 0x34 */ s16 smoke_alpha;
|
||||
/* 0x36 */ s16 field_0x36;
|
||||
/* 0x38 */ f32 smoke_blend;
|
||||
/* 0x3C */ f32 bend_degree_1;
|
||||
/* 0x40 */ f32 bend_degree_2;
|
||||
/* 0x44 */ f32 bend_degree_3;
|
||||
/* 0x48 */ u8 foot_pos_check;
|
||||
/* 0x49 */ u8 eye_check;
|
||||
};
|
||||
|
||||
#endif /* D_A_B_GM_H */
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
*
|
||||
*/
|
||||
class daE_GM_c : public fopEn_enemy_c {
|
||||
public:
|
||||
/* 806D12C8 */ void setAction(void (daE_GM_c::*)());
|
||||
/* 806D136C */ void action();
|
||||
/* 806D1580 */ void egg_wait();
|
||||
@@ -45,8 +46,25 @@ class daE_GM_c : public fopEn_enemy_c {
|
||||
/* 806D6980 */ void _delete();
|
||||
/* 806D6AC8 */ void CreateHeap();
|
||||
/* 806D6CF0 */ void create();
|
||||
|
||||
void InstantKill() { field_0xa76 = 1; }
|
||||
u8 CheckDeath() { return field_0xa68; }
|
||||
|
||||
void MoveStart(u8 param_0) {
|
||||
field_0xa71 = 1;
|
||||
field_0xa5e = param_0;
|
||||
}
|
||||
|
||||
private:
|
||||
/* 0x5ac */ u8 field_0x5ac[0xa78 - 0x5ac];
|
||||
/* 0x5AC */ u8 field_0x5ac[0xa5e - 0x5ac];
|
||||
/* 0xA5E */ u16 field_0xa5e;
|
||||
/* 0xA60 */ u8 field_0xa60[0xa68 - 0xa60];
|
||||
/* 0xA68 */ u8 field_0xa68;
|
||||
/* 0xA69 */ u8 field_0xa69[0xa71 - 0xa69];
|
||||
/* 0xA71 */ u8 field_0xa71;
|
||||
/* 0xA72 */ u8 field_0xa72[0xa76 - 0xA72];
|
||||
/* 0xA76 */ u8 field_0xa76;
|
||||
/* 0xA77 */ u8 field_0xa77[0xa78 - 0xA77];
|
||||
};
|
||||
|
||||
STATIC_ASSERT(sizeof(daE_GM_c) == 0xa78);
|
||||
|
||||
@@ -1027,6 +1027,7 @@ public:
|
||||
void onDoPutEmphasys() { onEndResetFlg1(ERFLG1_UNK_10000000); }
|
||||
void onNsScream() { onEndResetFlg1(ERFLG1_UNK_1); }
|
||||
void onNsScreamAnm() { onEndResetFlg1(daPy_ERFLG1(ERFLG1_UNK_1 | ERFLG1_UNK_2)); }
|
||||
void onNeckSearchWide() { onEndResetFlg0(ERFLG0_UNK_400); }
|
||||
|
||||
u32 checkBoarSingleBattle() const { return checkNoResetFlg2(daPy_FLG2(FLG2_UNK_1000000 | FLG2_BOAR_SINGLE_BATTLE)); }
|
||||
u32 checkWolfDashAutoJump() const { return checkNoResetFlg2(FLG2_WOLF_DASH_AUTO_JUMP); }
|
||||
@@ -1043,6 +1044,10 @@ public:
|
||||
mDemo.setParam2(i_param2);
|
||||
}
|
||||
|
||||
void changeDemoParam1(s16 i_param1) {
|
||||
mDemo.setParam1(i_param1);
|
||||
}
|
||||
|
||||
void i_changeDemoParam2(s16 i_param2) {
|
||||
mDemo.setParam2(i_param2);
|
||||
}
|
||||
|
||||
@@ -176,7 +176,7 @@ public:
|
||||
fopAc_ac_c* getMyAc() { return m_my_ac; }
|
||||
|
||||
cM3dGCir* GetWallCirP(int index) {
|
||||
JUT_ASSERT(index <= m_tbl_size);
|
||||
JUT_ASSERT(0, index <= m_tbl_size);
|
||||
return pm_acch_cir[index].GetCirP();
|
||||
}
|
||||
|
||||
|
||||
@@ -98,6 +98,8 @@ void OSVReport(const char* format, va_list list);
|
||||
|
||||
#ifdef DEBUG
|
||||
#define OS_REPORT(...) OSReport(__VA_ARGS__)
|
||||
#define OS_WARNING(...) OSReport_Warning(__VA_ARGS__)
|
||||
#define OS_REPORT_ERROR(...) OSReport_Error(__VA_ARGS__)
|
||||
#define OS_PANIC(msg) OSPanic(__FILE__, __LINE__, msg)
|
||||
#define ASSERTMSG(exp, msg) (void)((exp) || (OSPanic(__FILE__, __LINE__, (msg)), 0))
|
||||
#else
|
||||
|
||||
@@ -175,6 +175,11 @@ struct actor_place {
|
||||
|
||||
struct actor_attention_types {
|
||||
/* 0x00 */ u8 distances[9];
|
||||
|
||||
#if VERSION > VERSION_GCN_JPN
|
||||
u8 unk_0x9[4];
|
||||
#endif
|
||||
|
||||
/* 0x0A */ s16 field_0xa;
|
||||
/* 0x0C */ cXyz position;
|
||||
/* 0x18 */ u32 flags;
|
||||
@@ -233,7 +238,7 @@ public:
|
||||
/* 0x562 */ s16 health;
|
||||
/* 0x564 */ u8 field_0x564;
|
||||
/* 0x565 */ u8 field_0x565;
|
||||
/* 0x566 */ u8 field_0x566;
|
||||
/* 0x566 */ s8 field_0x566;
|
||||
/* 0x567 */ s8 field_0x567;
|
||||
|
||||
fopAc_ac_c();
|
||||
|
||||
@@ -721,14 +721,14 @@ inline void fopAcM_effSmokeSet2(u32* param_0, u32* param_1, cXyz const* param_2,
|
||||
|
||||
inline void fopAcM_setWarningMessage_f(const fopAc_ac_c* i_actor, const char* i_filename, int i_line, const char* i_msg, ...) {
|
||||
#ifdef DEBUG
|
||||
va_list args;
|
||||
/* va_list args;
|
||||
va_start(args, i_msg);
|
||||
|
||||
char buf[64];
|
||||
snprintf(buf, sizeof(buf), "<%s> %s", dStage_getName(fopAcM_GetProfName(i_actor), i_actor->subtype), i_msg);
|
||||
setWarningMessage_f_va(JUTAssertion::getSDevice(), i_filename, i_line, buf, args);
|
||||
|
||||
va_end(args);
|
||||
va_end(args); */
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#define F_PC_DELETE_TAG_H_
|
||||
|
||||
#include "SSystem/SComponent/c_tag.h"
|
||||
#include "global.h"
|
||||
|
||||
typedef struct layer_class layer_class;
|
||||
|
||||
@@ -12,6 +13,10 @@ typedef struct delete_tag_class {
|
||||
/* 0x00 */ create_tag_class base;
|
||||
/* 0x14 */ layer_class* layer;
|
||||
/* 0x18 */ s16 timer;
|
||||
|
||||
#if VERSION == VERSION_SHIELD_DEBUG
|
||||
/* 0x1C */ int unk_0x1c;
|
||||
#endif
|
||||
} delete_tag_class;
|
||||
|
||||
BOOL fpcDtTg_IsEmpty();
|
||||
|
||||
@@ -3,6 +3,11 @@
|
||||
|
||||
#include "dolphin/types.h"
|
||||
|
||||
#define VERSION_GCN_USA 0
|
||||
#define VERSION_GCN_PAL 1
|
||||
#define VERSION_GCN_JPN 2
|
||||
#define VERSION_SHIELD_DEBUG 3
|
||||
|
||||
#define ARRAY_SIZE(o) (sizeof((o)) / sizeof(*(o)))
|
||||
|
||||
// Align X to the previous N bytes (N must be power of two)
|
||||
@@ -27,10 +32,15 @@
|
||||
#ifdef __MWERKS__
|
||||
#define GLUE(a, b) a##b
|
||||
#define GLUE2(a, b) GLUE(a, b)
|
||||
|
||||
#if VERSION != VERSION_SHIELD_DEBUG
|
||||
#define STATIC_ASSERT(cond) typedef char GLUE2(static_assertion_failed, __LINE__)[(cond) ? 1 : -1]
|
||||
#else
|
||||
#define STATIC_ASSERT(...)
|
||||
#endif
|
||||
#else
|
||||
#define STATIC_ASSERT(...)
|
||||
#endif
|
||||
|
||||
// hack to make functions that return comparisons as int match
|
||||
extern int __cntlzw(unsigned int);
|
||||
|
||||
Reference in New Issue
Block a user