mirror of
https://github.com/zeldaret/tp
synced 2026-05-23 06:54:28 -04:00
Misc matches and fixes (#2703)
* Match mDoExt_morf_c::getPlayMode * Misc cleanup * Fix actor cull spheres * Match daPy_py_c::getLastSceneSwordAtUpTime, JUTGamePad::testTrigger * Fix improper demangling of dBgS_SphChk::SetCallback * Fix d_camera rangef weak func order * Match more alink_wolf funcs
This commit is contained in:
@@ -11,6 +11,7 @@ inline f32 J3DCalcZValue(register MtxP m, register Vec v) {
|
||||
register f32 temp_f2;
|
||||
register f32 temp_f1 = 1.0f;
|
||||
|
||||
#ifdef __MWERKS__
|
||||
// clang-format off
|
||||
asm {
|
||||
psq_l temp_f0, 0(v), 0, 0 /* qr0 */
|
||||
@@ -23,6 +24,7 @@ inline f32 J3DCalcZValue(register MtxP m, register Vec v) {
|
||||
ps_sum0 out, out, out, out
|
||||
}
|
||||
// clang-format on
|
||||
#endif
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
@@ -241,8 +241,8 @@ struct TLinkList_factory : public TLinkList<T, I> {
|
||||
}
|
||||
}
|
||||
|
||||
TLinkList<T, I>::iterator Erase_destroy(T* param_0) {
|
||||
TLinkList<T, I>::iterator spC(Erase(param_0));
|
||||
typename TLinkList<T, I>::iterator Erase_destroy(T* param_0) {
|
||||
typename TLinkList<T, I>::iterator spC(Erase(param_0));
|
||||
Do_destroy(param_0);
|
||||
return spC;
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ struct JPABaseShapeData {
|
||||
/* 0x2E */ u8 mAnmRndm;
|
||||
/* 0x2F */ u8 mClrAnmRndmMask;
|
||||
/* 0x30 */ u8 mTexAnmRndmMask;
|
||||
};
|
||||
}; // Size: 0x34
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-jparticle
|
||||
|
||||
@@ -34,7 +34,7 @@ struct JPAChildShapeData {
|
||||
/* 0x44 */ u8 mStep;
|
||||
/* 0x45 */ u8 mTexIdx;
|
||||
/* 0x46 */ s16 mRotSpeed;
|
||||
};
|
||||
}; // Size: 0x48
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-jparticle
|
||||
|
||||
@@ -41,8 +41,7 @@ struct JPADynamicsBlockData {
|
||||
/* 0x74 */ u16 mVolumeSize;
|
||||
/* 0x76 */ u16 mDivNumber;
|
||||
/* 0x78 */ u8 mRateStep;
|
||||
/* 0x7C */ u32 field_0x7c;
|
||||
};
|
||||
}; // Size: 0x7C
|
||||
|
||||
typedef void (*JPADynamicsCalcVolumeFunc)(JPAEmitterWorkData*);
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ struct JPAExTexShapeData {
|
||||
/* 0x24 */ s8 mExpScale;
|
||||
/* 0x25 */ s8 mIndTexIdx;
|
||||
/* 0x26 */ s8 mSecTexIdx;
|
||||
};
|
||||
}; // Size: 0x28
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-jparticle
|
||||
|
||||
@@ -38,7 +38,7 @@ struct JPAExtraShapeData {
|
||||
/* 0x54 */ f32 mRotateSpeed;
|
||||
/* 0x58 */ f32 mRotateSpeedRandom;
|
||||
/* 0x5C */ f32 mRotateDirection;
|
||||
};
|
||||
}; // Size: 0x60
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-jparticle
|
||||
|
||||
@@ -100,7 +100,7 @@ public:
|
||||
JUTGamePadRecordBase* getPadReplay() const { return mPadReplay; }
|
||||
JUTGamePadRecordBase* getPadRecord() const { return mPadRecord; }
|
||||
|
||||
u32 testTrigger(u32 button) const { return mButton.mTrigger & button; }
|
||||
bool testTrigger(u32 button) const { return mButton.mTrigger & button; }
|
||||
|
||||
bool isPushing3ButtonReset() const {
|
||||
return mPortNum != EPortInvalid && mButtonReset.mReset != false;
|
||||
|
||||
@@ -1131,7 +1131,7 @@ public:
|
||||
static bool checkWolfCargoCarrySceneChange() { return getLastSceneMode() == 10; }
|
||||
|
||||
static int getLastSceneDamage() { return (dComIfGs_getLastSceneMode() >> 4) & 0x7F; }
|
||||
static u8 getLastSceneSwordAtUpTime() { return (dComIfGs_getLastSceneMode() >> 11) & 0xFF; }
|
||||
static u32 getLastSceneSwordAtUpTime() { return (dComIfGs_getLastSceneMode() >> 11) & 0xFF; }
|
||||
|
||||
static BOOL checkNormalSwordEquip() { return dComIfGs_getSelectEquipSword() == fpcNm_ITEM_SWORD; }
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
struct cBgD_Vtx_t;
|
||||
|
||||
class dBgS_SphChk;
|
||||
typedef void* (*SphChk_Callback)(dBgS_SphChk*, cBgD_Vtx_t*, int, int, int, cM3dGPla*, void*);
|
||||
typedef void (*SphChk_Callback)(dBgS_SphChk*, cBgD_Vtx_t*, int, int, int, cM3dGPla*, void*);
|
||||
|
||||
class dBgS_SphChk : public cM3dGSph, public cBgS_PolyInfo, public cBgS_Chk, public dBgS_Chk {
|
||||
public:
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include <dolphin/gx/GXEnum.h>
|
||||
#include <dolphin/gx/GXStruct.h>
|
||||
#include "global.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
@@ -76,14 +76,8 @@ enum fopAc_Cull_e {
|
||||
fopAc_CULLSPHERE_5_e,
|
||||
fopAc_CULLSPHERE_6_e,
|
||||
fopAc_CULLSPHERE_7_e,
|
||||
fopAc_CULLSPHERE_8_e,
|
||||
fopAc_CULLSPHERE_9_e,
|
||||
fopAc_CULLSPHERE_10_e,
|
||||
fopAc_CULLSPHERE_11_e,
|
||||
fopAc_CULLSPHERE_12_e,
|
||||
fopAc_CULLSPHERE_13_e,
|
||||
#ifdef DEBUG
|
||||
fopAc_CULLSPHERE_14_e,
|
||||
fopAc_CULLSPHERE_8_e,
|
||||
#endif
|
||||
fopAc_CULLSPHERE_CUSTOM_e,
|
||||
};
|
||||
|
||||
@@ -402,6 +402,14 @@ inline int fopAcM_GetCullSize(const fopAc_ac_c* i_actor) {
|
||||
return i_actor->cullType;
|
||||
}
|
||||
|
||||
inline int fopAcM_CULLSIZE_IDX(int i_culltype) {
|
||||
return i_culltype - fopAc_CULLBOX_0_e;
|
||||
}
|
||||
|
||||
inline int fopAcM_CULLSIZE_Q_IDX(int i_culltype) {
|
||||
return i_culltype - fopAc_CULLSPHERE_0_e;
|
||||
}
|
||||
|
||||
inline BOOL fopAcM_CULLSIZE_IS_BOX(int i_culltype) {
|
||||
return (i_culltype >= 0 && i_culltype < fopAc_CULLBOX_CUSTOM_e) ||
|
||||
i_culltype == fopAc_CULLBOX_CUSTOM_e;
|
||||
|
||||
+5
-4
@@ -58,11 +58,12 @@
|
||||
#define STATIC_ASSERT(...)
|
||||
#endif
|
||||
|
||||
// hack to make functions that return comparisons as int match
|
||||
// Intrinsics
|
||||
extern int __cntlzw(unsigned int);
|
||||
inline BOOL checkEqual(s32 a, s32 b) {
|
||||
return (u32)__cntlzw(a - b) >> 5;
|
||||
}
|
||||
extern int __rlwimi(int, int, int, int, int);
|
||||
extern void __dcbz(void*, int);
|
||||
extern void __sync();
|
||||
extern int __abs(int);
|
||||
|
||||
#ifndef __MWERKS__
|
||||
void* __memcpy(void*, const void*, int);
|
||||
|
||||
@@ -290,7 +290,7 @@ public:
|
||||
|
||||
J3DAnmTransform* getAnm() { return mpAnm; }
|
||||
void changeAnm(J3DAnmTransform* anm) { mpAnm = anm; }
|
||||
u8 getPlayMode() { return mFrameCtrl.getAttribute(); }
|
||||
int getPlayMode() { return mFrameCtrl.getAttribute(); }
|
||||
void setPlayMode(int mode) { mFrameCtrl.setAttribute(mode); }
|
||||
BOOL isStop() { return mFrameCtrl.checkState(1) || mFrameCtrl.getRate() == 0.0f; }
|
||||
bool isLoop() { return mFrameCtrl.checkState(2); }
|
||||
|
||||
Reference in New Issue
Block a user