mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-09 04:30:49 -04:00
Merge remote-tracking branch 'origin/main' into 26-02-27-pjb-dev-2
This commit is contained in:
@@ -2,33 +2,8 @@
|
||||
#define C_ANGLE_H
|
||||
|
||||
#include "SSystem/SComponent/c_xyz.h"
|
||||
#include "angle_utils.h"
|
||||
|
||||
#define ADD_VAR(x, y) ((x) += (y))
|
||||
#define SUB_VAR(x, y) ((x) -= (y))
|
||||
#define MULT_VAR(x, y) ((x) *= (y))
|
||||
|
||||
#define ADD_VAR_CAST(x, y, t) ((x) += (t)(y))
|
||||
#define SUB_VAR_CAST(x, y, t) ((x) -= (t)(y))
|
||||
#define MULT_VAR_CAST(x, y, t) ((x) *= (t)(y))
|
||||
|
||||
#define ADD_ANGLE(x, y) ADD_VAR_CAST(x, y, s16)
|
||||
#define SUB_ANGLE(x, y) SUB_VAR_CAST(x, y, s16)
|
||||
#define MULT_ANGLE(x, y) MULT_VAR_CAST(x, y, s16)
|
||||
|
||||
// There are some angles that weren't sign-extended until the shield version
|
||||
#if !PLATFORM_SHIELD
|
||||
#define ADD_ANGLE_2 ADD_VAR
|
||||
#define SUB_ANGLE_2 SUB_VAR
|
||||
#define MULT_ANGLE_2 MULT_VAR
|
||||
|
||||
#define ADD_S8_2 ADD_VAR
|
||||
#else
|
||||
#define ADD_ANGLE_2 ADD_ANGLE
|
||||
#define SUB_ANGLE_2 SUB_ANGLE
|
||||
#define MULT_ANGLE_2 MULT_ANGLE
|
||||
|
||||
#define ADD_S8_2(x, y) ADD_VAR_CAST(x, y, s8)
|
||||
#endif
|
||||
|
||||
#define DEG2S_CONSTANT (0x8000 / 180.0f)
|
||||
#define S2DEG_CONSTANT (180.0f / 0x8000)
|
||||
|
||||
@@ -62,8 +62,8 @@ enum cCcD_ObjAtType {
|
||||
/* 0x10000000 */ AT_TYPE_10000000 = (1 << 28),
|
||||
/* 0x10000000 */ AT_TYPE_20000000 = (1 << 29),
|
||||
/* 0x40000000 */ AT_TYPE_WOLF_CUT_TURN = (1 << 30),
|
||||
/* 0x80000000 */ AT_TYPE_WOLF_ATTACK = (1 << 31),
|
||||
/* 0xD8000000 */ AT_TYPE_UNK = 0xD8000000
|
||||
/* 0x80000000 */ AT_TYPE_WOLF_ATTACK = (1u << 31),
|
||||
/* 0xD8000000 */ AT_TYPE_UNK = 0xD8000000u
|
||||
};
|
||||
|
||||
struct cCcD_SrcTriAttr {
|
||||
@@ -120,16 +120,16 @@ public:
|
||||
STATIC_ASSERT(0x40 == sizeof(cCcD_DivideArea));
|
||||
|
||||
struct cCcD_SrcObjCommonBase {
|
||||
/* 0x0 */ s32 mSPrm;
|
||||
/* 0x0 */ u32 mSPrm;
|
||||
};
|
||||
|
||||
struct cCcD_SrcObjTg {
|
||||
/* 0x0 */ s32 mType;
|
||||
/* 0x0 */ u32 mType;
|
||||
/* 0x4 */ cCcD_SrcObjCommonBase mBase;
|
||||
}; // Size: 0x8
|
||||
|
||||
struct cCcD_SrcObjAt {
|
||||
/* 0x0 */ s32 mType;
|
||||
/* 0x0 */ u32 mType;
|
||||
/* 0x4 */ u8 mAtp;
|
||||
/* 0x8 */ cCcD_SrcObjCommonBase mBase;
|
||||
}; // Size: 0xC
|
||||
|
||||
@@ -59,15 +59,13 @@ inline T cLib_minMaxLimit(T val, T min, T max) {
|
||||
template <typename T>
|
||||
inline T cLib_maxLimit(T val, T max) {
|
||||
T ret;
|
||||
T var_r30;
|
||||
|
||||
if (val > max) {
|
||||
var_r30 = max;
|
||||
ret = max;
|
||||
} else {
|
||||
var_r30 = val;
|
||||
ret = val;
|
||||
}
|
||||
|
||||
ret = var_r30;
|
||||
return (T)ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define C_M2D_H
|
||||
|
||||
|
||||
struct cM2dGCir;
|
||||
class cM2dGCir;
|
||||
|
||||
void cM2d_CrossCirLin(cM2dGCir&, float, float, float, float, float*, float*);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user