mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-07 20:11:46 -04:00
Merge decomp/main into dusk
Merges 44 upstream commits from zeldaret/tp decomp/main. Conflict resolutions: - .github/workflows/build.yml: keep deleted (not needed for PC port) - README.md: keep PC port README - J3DAnimation.h: keep OFFSET_PTR macro + add upstream forward decl - J3DModelLoader.h: keep BE(u32) mBlockNum + add field_0x1c - d_com_inf_game.h: keep PC port inlines + add upstream declarations - global.h: keep MULTI_CHAR macro + add FABSF macro - JUTConsole.cpp: keep uintptr_t cast for 64-bit - JUTDbPrint.cpp: keep PC enter_() helper + add cstring include - JUTResFont.cpp: take upstream loop/struct improvements with BE types - JUTCacheFont.cpp: take upstream decomp fix - float.h: use upstream !PLATFORM_GCN guard - d_a_npc_bouS/theB.cpp: keep MULTI_CHAR() for PC portability - d_a_npc_henna.cpp: keep uintptr_t + use upstream var name - d_demo.cpp: keep near_/far_ field renames for PC - d_resorce.cpp: keep uintptr_t + fix var name to res - d_s_room.cpp, m_Do_graphic.cpp: keep dusk includes + add cstring - m_Do_main.cpp: keep JHIComPortManager + use JAS_GLOBAL_INSTANCE_INIT - angle_utils.h: remove redundant types.h include
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)
|
||||
|
||||
@@ -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