mirror of
https://github.com/zeldaret/tp
synced 2026-07-07 14:13:27 -04:00
Fix more nonmatchings (#2850)
* Fix GetPolyIndex and GetBgIndex, fixing a couple regallocs * Match daNpcCd2_c::checkFearSituation and daNpcCd2_c::getAnmP * Match daAlink_c::jointControll * Clean up float class checks * Move float constants to global.h
This commit is contained in:
@@ -23,8 +23,8 @@ public:
|
||||
|
||||
virtual ~cBgS_PolyInfo();
|
||||
|
||||
u16 GetPolyIndex() const { return mPolyIndex; }
|
||||
u16 GetBgIndex() const { return mBgIndex; }
|
||||
int GetPolyIndex() const { return mPolyIndex; }
|
||||
int GetBgIndex() const { return mBgIndex; }
|
||||
}; // Size: 0x10
|
||||
|
||||
#endif /* C_BG_S_POLY_INFO_H */
|
||||
|
||||
@@ -228,35 +228,4 @@ private:
|
||||
|
||||
STATIC_ASSERT(sizeof(daKago_c) == 0xBA4);
|
||||
|
||||
class daKago_HIO_c : public JORReflexible {
|
||||
public:
|
||||
/* 808495AC */ daKago_HIO_c();
|
||||
/* 80854A4C */ virtual ~daKago_HIO_c() {}
|
||||
|
||||
void genMessage(JORMContext* ctx);
|
||||
|
||||
/* 0x04 */ s8 mChild;
|
||||
/* 0x08 */ f32 mRevoconUpDown;
|
||||
/* 0x0C */ f32 mRevoconUpDownMax;
|
||||
/* 0x10 */ f32 mRevoconLeftRight;
|
||||
/* 0x14 */ f32 mRevoconLeftRightMax;
|
||||
/* 0x18 */ f32 mBasicSize;
|
||||
/* 0x1C */ f32 mFlightSpeed;
|
||||
/* 0x20 */ f32 mFlightGroundAltitude;
|
||||
/* 0x24 */ f32 mFlightCeilingAltitude;
|
||||
/* 0x28 */ f32 mShadowDensity;
|
||||
/* 0x2C */ f32 mDescentRateIncrement;
|
||||
/* 0x30 */ f32 mAscentRateDecel;
|
||||
/* 0x34 */ f32 mDashTime;
|
||||
/* 0x38 */ f32 mDashTimeMultiplier;
|
||||
/* 0x3C */ f32 mWallHitInvulnTime;
|
||||
/* 0x40 */ f32 mDashCooldownTime;
|
||||
/* 0x44 */ f32 mZOffset;
|
||||
/* 0x48 */ f32 mZOffsetHori;
|
||||
/* 0x4C */ u8 mAngleTrackingMode;
|
||||
/* 0x50 */ f32 mYOffsetFromWaterSurface;
|
||||
/* 0x54 */ f32 mWaterSplashTime;
|
||||
/* 0x58 */ f32 mSplashGenTimeDuringDash;
|
||||
};
|
||||
|
||||
#endif /* D_A_KAGO_H */
|
||||
|
||||
+2
-2
@@ -30,13 +30,13 @@ public:
|
||||
u32 getHSStick() const { return BGPC_CHECK_BIT(m_code.code0, 18); }
|
||||
u32 getBoomerangThrough() const { return BGPC_CHECK_BIT(m_code.code0, 19); }
|
||||
u32 getRopeThrough() const { return BGPC_CHECK_BIT(m_code.code0, 20); }
|
||||
u32 getHorseNoEntry() const { return BGPC_CHECK_BIT(m_code.code0, 21) != 0; }
|
||||
u32 getHorseNoEntry() const { return BGPC_CHECK_BIT(m_code.code0, 21); }
|
||||
u32 getShdwThrough() const { return BGPC_CHECK_BIT(m_code.code0, 22); }
|
||||
u32 getBombThrough() const { return BGPC_CHECK_BIT(m_code.code0, 23); }
|
||||
s32 getSpl() const { return BGPC_GET_BITS(m_code.code0, 24, 4); }
|
||||
u32 getMagnet() const { return BGPC_GET_BITS(m_code.code0, 28, 2); }
|
||||
u32 getUnderwaterRoof() const { return BGPC_CHECK_BIT(m_code.code0, 30); }
|
||||
u32 getMonkeyBars() const { return BGPC_CHECK_BIT(m_code.code0, 31) != 0; }
|
||||
u32 getMonkeyBars() const { return (m_code.code0 >> 31) & 1; }
|
||||
|
||||
s32 getLinkNo() const { return BGPC_GET_BITS(m_code.code1, 0, 8); }
|
||||
s32 getWallCode() const { return BGPC_GET_BITS(m_code.code1, 8, 4); }
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define D_BG_D_BG_S_CAPT_POLY_H
|
||||
|
||||
#include "d/d_bg_s_chk.h"
|
||||
#include "SSystem/SComponent/c_m3d_g_aab.h"
|
||||
|
||||
struct dBgS_CaptPoly;
|
||||
|
||||
@@ -15,4 +16,4 @@ public:
|
||||
/* 0x48 */ CaptPolyCallback m_callback;
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -72,15 +72,6 @@
|
||||
#define nofralloc
|
||||
#endif
|
||||
|
||||
// floating-point constants
|
||||
// TODO: move to different header
|
||||
#define _HUGE_ENUF 1e+300
|
||||
#define INFINITY ((float)(_HUGE_ENUF * _HUGE_ENUF))
|
||||
#define HUGE_VAL ((double)INFINITY)
|
||||
#define HUGE_VALL ((long double)INFINITY)
|
||||
|
||||
#define DOUBLE_INF HUGE_VAL
|
||||
|
||||
#pragma section ".dead"
|
||||
#pragma section ".ctors$10"
|
||||
#pragma section ".ctors$15"
|
||||
|
||||
@@ -75,6 +75,14 @@ void* __memcpy(void*, const void*, int);
|
||||
|
||||
#define SQUARE(x) ((x) * (x))
|
||||
|
||||
// floating-point constants
|
||||
#define _HUGE_ENUF 1e+300
|
||||
#define INFINITY ((float)(_HUGE_ENUF * _HUGE_ENUF))
|
||||
#define HUGE_VAL ((double)INFINITY)
|
||||
#define HUGE_VALL ((long double)INFINITY)
|
||||
#define DOUBLE_INF HUGE_VAL
|
||||
static const float INF = 2000000000.0f;
|
||||
|
||||
// hack to make strings with no references compile properly
|
||||
#define DEAD_STRING(s) OSReport(s)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user