Work on c_damagereaction and f_ap_game debug (#3033)

This commit is contained in:
hatal175
2026-01-11 19:22:57 -08:00
committed by GitHub
parent decb0c5437
commit db8ae465ac
14 changed files with 119 additions and 97 deletions
+12 -9
View File
@@ -130,19 +130,16 @@ struct TVec3<s16> {
}
};
inline void setTVec3f(const f32* vec_a, f32* vec_b) {
inline void setTVec3f(const __REGISTER f32* vec_a, __REGISTER f32* vec_b) {
#ifdef __MWERKS__
const __REGISTER f32* v_a = vec_a;
__REGISTER f32* v_b = vec_b;
__REGISTER f32 a_x;
__REGISTER f32 b_x;
asm {
psq_l a_x, 0(v_a), 0, 0
lfs b_x, 8(v_a)
psq_st a_x, 0(v_b), 0, 0
stfs b_x, 8(v_b)
psq_l a_x, 0(vec_a), 0, 0
lfs b_x, 8(vec_a)
psq_st a_x, 0(vec_b), 0, 0
stfs b_x, 8(vec_b)
};
#endif
}
@@ -247,7 +244,7 @@ struct TVec3<f32> : public Vec {
return *this;
}
inline TVec3<f32> operator+(const TVec3<f32>& b) {
inline TVec3<f32> operator+(const TVec3<f32>& b) const {
TVec3<f32> a = *this;
a += b;
return a;
@@ -289,6 +286,11 @@ struct TVec3<f32> : public Vec {
}
void scale(__REGISTER f32 sc) {
#if DEBUG
x *= sc;
y *= sc;
z *= sc;
#else
#ifdef __MWERKS__
__REGISTER f32 z;
__REGISTER f32 x_y;
@@ -303,6 +305,7 @@ struct TVec3<f32> : public Vec {
ps_muls0 zres, z, sc
psq_st zres, 8(dst), 1, 0
};
#endif
#endif
}
+7 -3
View File
@@ -66,9 +66,13 @@ public:
void setNExtensionName(u16 length) { mNExtensionName = length; }
void setStatus(s32 status) { mStatus = status; }
virtual ~JORFile() {}
virtual int open(const char* path, u32 flags, const char* extMask, const char* defaultExt, const char*, const char* fileSuffix);
virtual int open(u32 flags, const char* extMask, const char* defaultExt, const char*, const char* fileSuffix);
virtual ~JORFile() {
close();
}
virtual int open(const char* path, u32 flags, const char* extMask, const char* defaultExt, const char* param_4, const char* fileSuffix);
virtual int open(u32 flags, const char* extMask, const char* defaultExt, const char* param_4, const char* fileSuffix) {
return open(NULL, flags, extMask, defaultExt, param_4, fileSuffix);
}
virtual void close();
virtual s32 readData(void* buffer, s32 length);
virtual s32 writeData(const void* buffer, s32 length);
+4 -3
View File
@@ -197,14 +197,15 @@ namespace JMathInlineVEC {
#ifdef __MWERKS__
__REGISTER f32 axy;
__REGISTER f32 bxy;
__REGISTER f32 sumab;
__REGISTER f32 az;
__REGISTER f32 sumz;
__REGISTER f32 bz;
__REGISTER f32 sumz;
asm {
psq_l axy, 0(a), 0, 0
psq_l bxy, 0(b), 0, 0
ps_add bxy, axy, bxy
psq_st bxy, 0(ab), 0, 0
ps_add sumab, axy, bxy
psq_st sumab, 0(ab), 0, 0
psq_l az, 8(a), 1, 0
psq_l bz, 8(b), 1, 0
ps_add sumz, az, bz
+7 -3
View File
@@ -55,9 +55,13 @@ public:
}
void* getDisplayingXfb() const {
if (mDisplayingXfbIndex >= 0)
return mBuffer[mDisplayingXfbIndex];
return NULL;
void* xfb;
if (mDisplayingXfbIndex >= 0) {
xfb = mBuffer[mDisplayingXfbIndex];
} else {
xfb = NULL;
}
return xfb;
}
void setDisplayingXfbIndex(s16 index) { mDisplayingXfbIndex = index; }
+5 -1
View File
@@ -20,7 +20,7 @@ public:
virtual void listenPropertyEvent(const JORPropertyEvent*);
virtual void genMessage(JORMContext*);
#endif
virtual ~fapGm_HIO_c();
virtual ~fapGm_HIO_c() {}
static void startCpuTimer();
static void stopCpuTimer(const char*);
@@ -71,9 +71,13 @@ public:
static u8 mParticle254Fix;
static u8 mCaptureMagnification;
static u8 mCaptureScreenDivH;
static u8 mCaptureScreenDivV;
static u8 mPackArchiveMode;
/* 0x04 */ s8 field_0x04;
/* 0x05 */ u8 field_0x03[3];
/* 0x08 */ JUtility::TColor mColor;