Replace int types in Retro code

Retro seemingly avoided using the Dolphin
typedefs in most places, opting to use int/uint
instead. This likely means they didn't use
u8/s8/u16/s16/etc either.
This commit is contained in:
Luke Street 2022-10-09 01:37:23 -04:00
parent 39700ad779
commit 133326ae40
172 changed files with 1525 additions and 1514 deletions

View File

@ -42,6 +42,10 @@ Metaforce is a non-matching decompilation, and often uses modern C++ features th
### Converting types
Metaforce -> decomp
- `s8` -> `char`
- `u8` -> `uchar`
- `s16` -> `short`
- `u16` -> `ushort`
- `s32` -> `int`
- `u32` -> `uint`
- `zeus::CTransform` -> `CTransform4f`

View File

@ -12,7 +12,7 @@ public:
: CCollisionPrimitive(matList), x10_aabb(box) {}
// TODO
u32 GetTableIndex() const override;
uint GetTableIndex() const override;
CAABox CalculateAABox(const CTransform4f&) const override;
CAABox CalculateLocalAABox() const override;
FourCC GetPrimType() const override;

View File

@ -12,7 +12,7 @@ public:
CCollidableSphere(const CSphere& sphere, const CMaterialList& material)
: CCollisionPrimitive(material), x10_sphere(sphere) {}
u32 GetTableIndex() const override;
uint GetTableIndex() const override;
CAABox CalculateAABox(const CTransform4f&) const override;
CAABox CalculateLocalAABox() const override;
FourCC GetPrimType() const override;

View File

@ -16,7 +16,7 @@ class CCollisionPrimitive {
public:
CCollisionPrimitive(const CMaterialList& list);
virtual u32 GetTableIndex() const = 0;
virtual uint GetTableIndex() const = 0;
virtual void SetMaterial(const CMaterialList&);
virtual const CMaterialList& GetMaterial() const;
virtual CAABox CalculateAABox(const CTransform4f&) const = 0;

View File

@ -116,7 +116,7 @@ public:
// HasMaterials__13CMaterialListCFv weak
// GetField__13CMaterialListCFUxUx weak
// Intersection__13CMaterialListCFRC13CMaterialList weak
static s32 BitPosition(u64 flags);
static int BitPosition(u64 flags);
// GetMaterialString__13CMaterialListCFv weak
bool SharesMaterials(const CMaterialList& other) const {
return (other.value & value) ? true : false;

View File

@ -15,7 +15,7 @@ public:
kI_Valid,
};
f32 GetTime() const { return x0_t; }
float GetTime() const { return x0_t; }
bool IsValid() const { return x20_valid; }
// GetPlane__14CRayCastResultCFv
// GetPoint__14CRayCastResultCFv
@ -25,7 +25,7 @@ public:
// MakeInvalid__14CRayCastResultFv
private:
f32 x0_t;
float x0_t;
CVector3f x4_point;
CPlane x10_plane;
bool x20_valid;

View File

@ -26,7 +26,7 @@ public:
}
private:
u8 pad[0x14];
uchar pad[0x14];
static CGuiSys* spGuiSys;
};

View File

@ -14,12 +14,12 @@ public:
int GetAllocatedAmount() const;
private:
u8 x0_owned;
uchar x0_owned;
void* x4_ptr;
s32 x8_bufferLen;
s32 xc_;
s32 x10_nextFreeAddr;
s32 x14_;
int x8_bufferLen;
int xc_;
int x10_nextFreeAddr;
int x14_;
};
#endif // _CCIRCULARBUFFER

View File

@ -37,8 +37,8 @@ public:
x14_next = next;
x14_next = (SGameMemInfo*)(((size_t)ptr & 31) | ((size_t)x14_next & ~31));
}
u32 GetPrevMaskedFlags();
u32 GetNextMaskedFlags();
uint GetPrevMaskedFlags();
uint GetNextMaskedFlags();
void SetTopOfHeapAllocated(bool topOfHeap);
size_t GetLength() const { return x4_len; }
SGameMemInfo* GetNextFree() const { return (SGameMemInfo*)((size_t)x18_nextFree & ~31); }
@ -95,16 +95,16 @@ public:
size_t GetLargestFreeChunk() const;
private:
SGameMemInfo** GetBinPtr(u32 bin) { return &x14_bins[bin]; }
u8 x4_;
u8 x5_;
u8 x6_;
u8 x7_;
u32 x8_heapSize;
SGameMemInfo** GetBinPtr(uint bin) { return &x14_bins[bin]; }
uchar x4_;
uchar x5_;
uchar x6_;
uchar x7_;
uint x8_heapSize;
SGameMemInfo* xc_first;
SGameMemInfo* x10_last;
SGameMemInfo* x14_bins[16];
u32 x54_;
uint x54_;
FOutOfMemoryCb x58_oomCallback;
const void* x5c_oomTarget;
CSmallAllocPool* x60_smallAllocPool;

View File

@ -6,7 +6,7 @@
class CMediumAllocPool {
public:
struct SMediumAllocPuddle {
u8 unk;
uchar unk;
void* x4_mainData;
void* x8_bookKeeping;
void* xc_cachedBookKeepingOffset;
@ -24,7 +24,7 @@ public:
void AddPuddle(uint, void*, int);
void ClearPuddles();
s32 Free(const void* ptr);
int Free(const void* ptr);
uint GetTotalEntries();
uint GetNumBlocksAvailable();

View File

@ -13,16 +13,16 @@ public:
bool Free(const void* ptr);
bool PtrWithinPool(const void* ptr) const {
return u32((reinterpret_cast< const u8* >(ptr) - reinterpret_cast< u8* >(x0_mainData)) / 4) <
x8_numBlocks;
return uint((reinterpret_cast< const uchar* >(ptr) - reinterpret_cast< uchar* >(x0_mainData)) /
4) < x8_numBlocks;
}
uint GetIndexFromPtr(const void* ptr) const {
return ((const u8*)ptr - x0_mainData) / kPointerSize;
return ((const uchar*)ptr - x0_mainData) / kPointerSize;
}
long GetEntryValue(uint idx) const { return (long)*((u8*)x4_bookKeeping + idx); }
u8* GetPtrFromIndex(unsigned int idx) const {
return static_cast< u8* >(x0_mainData) + (idx << 3);
long GetEntryValue(uint idx) const { return (long)*((uchar*)x4_bookKeeping + idx); }
uchar* GetPtrFromIndex(unsigned int idx) const {
return static_cast< uchar* >(x0_mainData) + (idx << 3);
}
uint GetNumBlocksAvailable() const { return x18_numBlocksAvailable; }

View File

@ -50,16 +50,16 @@ public:
union UParmValue {
int m_int;
uint m_uint;
f32 m_float;
float m_float;
bool m_bool;
};
CPASAnimParm(const CPASAnimParm& other) : x0_value(other.x0_value), x4_type(other.x4_type) {}
static CPASAnimParm FromEnum(s32 val);
static CPASAnimParm FromEnum(int val);
static CPASAnimParm FromBool(bool val);
static CPASAnimParm FromReal32(float val);
static CPASAnimParm FromUint32(u32 val);
static CPASAnimParm FromInt32(s32 val);
static CPASAnimParm FromUint32(uint val);
static CPASAnimParm FromInt32(int val);
static CPASAnimParm NoParameter();
int GetInt32Value() const;

View File

@ -15,17 +15,17 @@ enum ETRKRepeatMode {
class CAudioSys {
public:
CAudioSys(u8, u8, u8, u8, uint);
CAudioSys(uchar, uchar, uchar, uchar, uint);
~CAudioSys();
static void SysSetVolume(u8, uint, u8);
static void SetDefaultVolumeScale(s16);
static void SetVolumeScale(s16);
static void SysSetVolume(uchar, uint, uchar);
static void SetDefaultVolumeScale(short);
static void SetVolumeScale(short);
static void TrkSetSampleRate(ETRKSampleRate);
static s16 GetDefaultVolumeScale();
static short GetDefaultVolumeScale();
static const u8 kMaxVolume;
static const uchar kMaxVolume;
};
#endif // _CAUDIOSYS

View File

@ -8,28 +8,28 @@
class CVector3f;
class CSfxManager {
public:
static void Update(f32 dt);
static void Update(float dt);
static void RemoveEmitter(CSfxHandle handle);
static void UpdateEmitter(CSfxHandle handle, const CVector3f& pos, const CVector3f& dir,
uchar maxVol);
static const s16 kMaxPriority; // 0xFF
static const s16 kMedPriority; // 0x7F
static const u16 kInternalInvalidSfxId; // 0xFFFF
static const int kAllAreas; // 0xFFFFFFFF
static CSfxHandle AddEmitter(u16 id, const CVector3f& pos, const CVector3f& dir,
bool useAcoustics, bool looped, s16 prio = kMedPriority,
static const short kMaxPriority; // 0xFF
static const short kMedPriority; // 0x7F
static const ushort kInternalInvalidSfxId; // 0xFFFF
static const int kAllAreas; // 0xFFFFFFFF
static CSfxHandle AddEmitter(ushort id, const CVector3f& pos, const CVector3f& dir,
bool useAcoustics, bool looped, short prio = kMedPriority,
int areaId = kAllAreas);
static CSfxHandle AddEmitter(u16 id, const CVector3f& pos, const CVector3f& dir, uchar vol,
bool useAcoustics, bool looped, s16 prio = kMedPriority,
static CSfxHandle AddEmitter(ushort id, const CVector3f& pos, const CVector3f& dir, uchar vol,
bool useAcoustics, bool looped, short prio = kMedPriority,
int areaId = kAllAreas);
static void Shutdown();
static u16 TranslateSFXID(u16);
static ushort TranslateSFXID(ushort);
static void PitchBend(CSfxHandle handle, int pitch);
static CSfxHandle SfxStart(u16 id, u8 vol, u8 pan, bool useAcoustics, s16 prio, bool looped,
s32 areaId);
static CSfxHandle SfxStart(ushort id, uchar vol, uchar pan, bool useAcoustics, short prio,
bool looped, int areaId);
static bool IsPlaying(const CSfxHandle& handle);
};

View File

@ -5,9 +5,9 @@
class CStreamAudioManager {
public:
static void Update(f32 dt);
static void Update(float dt);
static void StopAll();
static void SetMusicVolume(u8);
static void SetMusicVolume(uchar);
private:
};

View File

@ -7,10 +7,10 @@
namespace CCast {
#ifdef __MWERKS__
inline u8 ToUint8(register f32 in) {
u8 a;
register u8* ptr = &a;
register u8 r;
inline uchar ToUint8(register float in) {
uchar a;
register uchar* ptr = &a;
register uchar r;
asm {
psq_st in, 0(ptr), 1, OS_FASTCAST_U8
@ -19,17 +19,17 @@ inline u8 ToUint8(register f32 in) {
return r;
}
inline f32 ToReal32(register const u8& in) {
register f32 r;
inline float ToReal32(register const uchar& in) {
register float r;
asm {
psq_l r, 0(in), 1, 2
}
return r;
}
inline s16 FtoS(register f32 in) {
s16 a;
register s16* ptr = &a;
inline short FtoS(register float in) {
short a;
register short* ptr = &a;
asm {
psq_st in, 0(ptr), 1, OS_FASTCAST_S16
@ -37,9 +37,9 @@ inline s16 FtoS(register f32 in) {
return *ptr;
}
#else
inline u8 ToUint8(f32 in) { return static_cast< u8 >(in); }
inline f32 ToReal32(u8 in) { return static_cast< f32 >(in); }
inline s16 FtoS(f32 in) { return static_cast< s16 >(in); }
inline uchar ToUint8(float in) { return static_cast< uchar >(in); }
inline float ToReal32(uchar in) { return static_cast< float >(in); }
inline short FtoS(float in) { return static_cast< short >(in); }
#endif
} // namespace CCast

View File

@ -12,17 +12,17 @@ public:
CSWData() : x0_timerFreq(0), x8_timerFreqO1M(0), x10_timerPeriod(0.f) {}
bool Initialize();
void Wait(f32) const;
void Wait(float) const;
s64 GetTimerFreq() const { return x0_timerFreq; }
s64 GetTimerFreqO1M() const { return x8_timerFreqO1M; }
f32 GetTimerPeriod() const { return x10_timerPeriod; }
float GetTimerPeriod() const { return x10_timerPeriod; }
s64 GetCPUCycles() const { return OSGetTime(); }
private:
s64 x0_timerFreq;
s64 x8_timerFreqO1M;
f32 x10_timerPeriod;
float x10_timerPeriod;
};
CStopwatch() : x0_startTime(mData.GetCPUCycles()) {}
@ -34,14 +34,14 @@ public:
}
x0_startTime = mData.GetCPUCycles();
}
inline f32 GetElapsedTime() const {
inline float GetElapsedTime() const {
return (mData.GetCPUCycles() - x0_startTime) * mData.GetTimerPeriod();
}
inline s64 GetElapsedMicros() const {
return (mData.GetCPUCycles() - x0_startTime) / mData.GetTimerFreqO1M();
}
static void Wait(f32);
static void Wait(float);
private:
static CSWData mData;

View File

@ -11,7 +11,7 @@ public:
static void Initialize(uint);
private:
static u32 mPreInitializeAlloc;
static uint mPreInitializeAlloc;
};
#endif // _CARAMMANAGER

View File

@ -8,7 +8,7 @@ public:
static bool FileExists(const char*);
private:
u8 pad[0x28];
uchar pad[0x28];
};
#endif // _CDVDFILE

View File

@ -10,7 +10,7 @@
class CFactoryMgr {
public:
private:
u8 pad[0x38];
uchar pad[0x38];
};
class CFactoryFnReturn {

View File

@ -14,7 +14,7 @@ public:
static IAllocator& GetGameAllocator();
private:
u8 x0_unk;
uchar x0_unk;
};
#endif // _CMEMORYSYS

View File

@ -23,9 +23,9 @@ public:
bool IsLoaded() const { return x10_object != nullptr; }
private:
u16 x0_refCount;
ushort x0_refCount;
bool x2_locked : 1;
u16 x2_lockCount : 15;
ushort x2_lockCount : 15;
SObjectTag x4_objTag;
IObjectStore* xc_objectStore;
IObj* x10_object;

View File

@ -25,7 +25,7 @@ private:
bool x28_27_stashedInARAM : 1;
int x2c_asyncLoadPhase; // EAsyncPhase
rstl::auto_ptr< void > x30_dvdReq; // IDvdRequest
rstl::vector< u8 > x38_headerData;
rstl::vector< uchar > x38_headerData;
uint x48_resTableOffset;
uint x4c_resTableCount;
int x50_aramBase;

View File

@ -27,8 +27,8 @@ public:
virtual void ObjectUnreferenced(const SObjectTag& tag);
private:
u8 x4_;
u8 x5_;
uchar x4_;
uchar x5_;
rstl::hash_map< unkptr, unkptr, void, void > x8_resources;
unkptr x18_factory;
rstl::rc_ptr< CVParamTransfer > x1c_paramXfr;

View File

@ -17,8 +17,8 @@ public:
CColor() {}
CColor(uint col) : mRgba(col) {}
CColor(CInputStream& in);
CColor(f32 r, f32 g, f32 b, f32 a = 1.f);
CColor(u8 r, u8 g, u8 b, u8 a = 255) {
CColor(float r, float g, float b, float a = 1.f);
CColor(uchar r, uchar g, uchar b, uchar a = 255) {
mR = r;
mG = g;
mB = b;
@ -32,15 +32,15 @@ public:
static uint Lerp(uint a, uint b, float t);
static CColor Modulate(const CColor& a, const CColor& b);
static CColor Add(const CColor& a, const CColor& b);
f32 GetRed() const { return CCast::ToReal32(mR) * (1 / 255.f); }
f32 GetGreen() const { return CCast::ToReal32(mG) * (1 / 255.f); }
f32 GetBlue() const { return CCast::ToReal32(mB) * (1 / 255.f); }
f32 GetAlpha() const { return CCast::ToReal32(mA) * (1 / 255.f); }
u8 GetRedu8() const { return mR; }
u8 GetGreenu8() const { return mG; }
u8 GetBlueu8() const { return mB; }
u8 GetAlphau8() const { return mA; }
u16 ToRGB5A3() const;
float GetRed() const { return CCast::ToReal32(mR) * (1 / 255.f); }
float GetGreen() const { return CCast::ToReal32(mG) * (1 / 255.f); }
float GetBlue() const { return CCast::ToReal32(mB) * (1 / 255.f); }
float GetAlpha() const { return CCast::ToReal32(mA) * (1 / 255.f); }
uchar GetReduchar() const { return mR; }
uchar GetGreenuchar() const { return mG; }
uchar GetBlueuchar() const { return mB; }
uchar GetAlphauchar() const { return mA; }
ushort ToRGB5A3() const;
GXColor ToGX(uint);
static const CColor& Black();
@ -56,10 +56,10 @@ public:
private:
union {
struct {
u8 mR;
u8 mG;
u8 mB;
u8 mA;
uchar mR;
uchar mG;
uchar mB;
uchar mA;
};
uint mRgba;
};

View File

@ -17,8 +17,8 @@ public:
uint xc_alphaOps;
uint x10_indFlags;
uint x14_tevOrderFlags;
u8 x18_kColorSel;
u8 x19_kAlphaSel;
uchar x18_kColorSel;
uchar x19_kAlphaSel;
STevState();
};
@ -30,10 +30,10 @@ public:
};
struct SFogParams {
f32 x0_fogStartZ;
f32 x4_fogEndZ;
f32 x8_fogNearZ;
f32 xc_fogFarZ;
float x0_fogStartZ;
float x4_fogEndZ;
float x8_fogNearZ;
float xc_fogFarZ;
GXColor x10_fogColor;
SFogParams() : x0_fogStartZ(0.f), x4_fogEndZ(1.f), x8_fogNearZ(0.1f), xc_fogFarZ(1.f) {
@ -46,28 +46,28 @@ public:
struct SGXState {
const void* x0_arrayPtrs[12];
u16 x30_prevChanCtrls[2];
u16 x34_chanCtrls[2];
ushort x30_prevChanCtrls[2];
ushort x34_chanCtrls[2];
GXColor x38_chanAmbColors[2];
GXColor x40_chanMatColors[2];
uint x48_descList;
union {
u8 x4c_chanFlags;
uchar x4c_chanFlags;
struct {
u8 unused : 5;
u8 chansDirty : 2;
u8 numDirty : 1;
uchar unused : 5;
uchar chansDirty : 2;
uchar numDirty : 1;
} x4c_flags;
};
u8 x4d_prevNumChans;
u8 x4e_numChans;
u8 x4f_numTexGens;
u8 x50_numTevStages;
u8 x51_numIndStages;
u8 x52_zmode;
u8 x53_fogType;
u16 x54_lineWidthAndOffset;
u16 x56_blendMode;
uchar x4d_prevNumChans;
uchar x4e_numChans;
uchar x4f_numTexGens;
uchar x50_numTevStages;
uchar x51_numIndStages;
uchar x52_zmode;
uchar x53_fogType;
ushort x54_lineWidthAndOffset;
ushort x56_blendMode;
GXColor x58_kColors[4];
STevState x68_tevStates[16];
STexState x228_texStates[8];
@ -82,10 +82,10 @@ public:
Channel1, // GX_COLOR1
};
static void SetNumChans(u8 num);
static void SetNumTexGens(u8 num);
static void SetNumTevStages(u8 num);
static void SetNumIndStages(u8 num);
static void SetNumChans(uchar num);
static void SetNumTexGens(uchar num);
static void SetNumTevStages(uchar num);
static void SetNumIndStages(uchar num);
static void SetChanAmbColor(EChannelId channel, const GXColor& color);
static void SetChanMatColor(EChannelId channel, const GXColor& color);
static void SetChanCtrl(EChannelId channel, GXBool enable, GXColorSrc ambSrc, GXColorSrc matSrc,
@ -108,7 +108,8 @@ public:
static void SetBlendMode(GXBlendMode mode, GXBlendFactor srcFac, GXBlendFactor dstFac,
GXLogicOp op);
static void SetZMode(bool compareEnable, GXCompare func, bool updateEnable);
static void SetAlphaCompare(GXCompare comp0, u8 ref0, GXAlphaOp op, GXCompare comp1, u8 ref1);
static void SetAlphaCompare(GXCompare comp0, uchar ref0, GXAlphaOp op, GXCompare comp1,
uchar ref1);
static void SetTevIndirect(GXTevStageID stageId, GXIndTexStageID indStage, GXIndTexFormat fmt,
GXIndTexBiasSel biasSel, GXIndTexMtxID mtxSel, GXIndTexWrap wrapS,
GXIndTexWrap wrapT, GXBool addPrev, GXBool indLod,
@ -116,10 +117,10 @@ public:
static void SetTevDirect(GXTevStageID stageId);
static void SetTexCoordGen(GXTexCoordID dstCoord, GXTexGenType fn, GXTexGenSrc src, GXTexMtx mtx,
GXBool normalize, GXPTTexMtx postMtx);
static void SetArray(GXAttr attr, const void* data, u8 stride);
static void SetFog(GXFogType type, f32 startZ, f32 endZ, f32 nearZ, f32 farZ,
static void SetArray(GXAttr attr, const void* data, uchar stride);
static void SetFog(GXFogType type, float startZ, float endZ, float nearZ, float farZ,
const GXColor& color);
static void SetLineWidth(u8 width, GXTexOffset offset);
static void SetLineWidth(uchar width, GXTexOffset offset);
static void SetIndTexMtxSTPointFive(GXIndTexMtxID id, s8 scaleExp);
static void SetVtxDescv_Compressed(uint flags);
static void SetVtxDesc(GXAttr attr, GXAttrType type); // name?
@ -130,18 +131,18 @@ public:
static void SetStandardTevColorAlphaOp(GXTevStageID stageId);
static void CallDisplayList(const void* ptr, size_t size);
static void Begin(GXPrimitive prim, GXVtxFmt fmt, u16 numVtx);
static void Begin(GXPrimitive prim, GXVtxFmt fmt, ushort numVtx);
static void End();
static void ResetGXStates();
static void ResetGXStatesFull(); // name?
static inline void LoadTexMtxImm(const f32 mtx[][4], unsigned long id, GXTexMtxType type) {
static inline void LoadTexMtxImm(const float mtx[][4], unsigned long id, GXTexMtxType type) {
GXLoadTexMtxImm(const_cast< MtxPtr >(mtx), id, type);
}
static GXColor GetChanAmbColor(EChannelId channel);
static void GetFog(GXFogType* fogType, f32* fogStartZ, f32* fogEndZ, f32* fogNearZ, f32* fogFarZ,
GXColor* fogColor);
static void GetFog(GXFogType* fogType, float* fogStartZ, float* fogEndZ, float* fogNearZ,
float* fogFarZ, GXColor* fogColor);
static inline bool CompareGXColors(const GXColor& lhs, const GXColor& rhs) {
return *reinterpret_cast< const uint* >(&lhs) == *reinterpret_cast< const uint* >(&rhs);

View File

@ -49,7 +49,7 @@ public:
static void SetTevOp(ERglTevStage stage, const CTevCombiners::CTevPass& pass);
static void StreamBegin(ERglPrimitive primitive);
static void StreamColor(const CColor& color);
static void StreamTexcoord(f32 u, f32 v);
static void StreamTexcoord(float u, float v);
static void StreamVertex(const CVector3f& vtx);
static void StreamEnd();

View File

@ -43,7 +43,7 @@ public:
float GetAngleAttenuationQuadratic() const { return x38_angleQ; }
ELightType GetType() const { return x1c_type; }
u32 GetId() const { return x40_lightId; }
uint GetId() const { return x40_lightId; }
float GetIntensity() const;
float GetRadius() const;
const CColor& GetColor() const { return x18_color; }
@ -64,17 +64,17 @@ private:
CVector3f xc_dir;
CColor x18_color;
ELightType x1c_type;
f32 x20_spotCutoff;
f32 x24_distC;
f32 x28_distL;
f32 x2c_distQ;
f32 x30_angleC;
f32 x34_angleL;
f32 x38_angleQ;
float x20_spotCutoff;
float x24_distC;
float x28_distL;
float x2c_distQ;
float x30_angleC;
float x34_angleL;
float x38_angleQ;
uint x3c_priority;
uint x40_lightId;
mutable f32 x44_cachedRadius;
mutable f32 x48_cachedIntensity;
mutable float x44_cachedRadius;
mutable float x48_cachedIntensity;
mutable bool x4c_24_intensityDirty : 1;
mutable bool x4c_25_radiusDirty : 1;
};

View File

@ -23,7 +23,7 @@ public:
kF_ThermalUnsortedOnly = 0x40,
};
CModelFlags(ETrans trans, f32 rgba)
CModelFlags(ETrans trans, float rgba)
: x0_blendMode(trans)
, x1_matSetIdx(0)
, x2_flags(kF_DepthCompare | kF_DepthUpdate)
@ -34,7 +34,7 @@ public:
, x2_flags(kF_DepthCompare | kF_DepthUpdate)
, x4_color(color) {}
CModelFlags(ETrans blendMode, u8 shadIdx, EFlags flags, const CColor& col)
CModelFlags(ETrans blendMode, uchar shadIdx, EFlags flags, const CColor& col)
: x0_blendMode(blendMode), x1_matSetIdx(shadIdx), x2_flags(flags), x4_color(col) {}
CModelFlags(const CModelFlags& flags, uint otherFlags)
@ -89,17 +89,17 @@ public:
CColor GetColor() const { return x4_color; }
static CModelFlags Normal() { return CModelFlags(kT_Opaque, 1.f); }
static CModelFlags AlphaBlended(f32 alpha) { return CModelFlags(kT_Blend, alpha); }
static CModelFlags AlphaBlended(float alpha) { return CModelFlags(kT_Blend, alpha); }
static CModelFlags AlphaBlended(const CColor& color);
static CModelFlags Additive(f32 f);
static CModelFlags Additive(float f);
static CModelFlags Additive(const CColor& color);
static CModelFlags AdditiveRGB(const CColor& color);
static CModelFlags ColorModulate(const CColor& color);
private:
u8 x0_blendMode;
u8 x1_matSetIdx;
u16 x2_flags;
uchar x0_blendMode;
uchar x1_matSetIdx;
ushort x2_flags;
CColor x4_color;
};
CHECK_SIZEOF(CModelFlags, 0x8)

View File

@ -27,14 +27,14 @@ public:
static void InvalidateTexmap(GXTexMapID id);
s16 GetWidth() const { return mWidth; }
s16 GetHeight() const { return mHeight; }
short GetWidth() const { return mWidth; }
short GetHeight() const { return mHeight; }
private:
u32 mTexelFormat; // TODO: Enum
s16 mWidth;
s16 mHeight;
u8 pad[0x60];
uint mTexelFormat; // TODO: Enum
short mWidth;
short mHeight;
uchar pad[0x60];
};
#endif // _CTEXTURE

View File

@ -26,16 +26,16 @@ private:
void ProcessInputData();
void ProcessAxis(int controller, EJoyAxis axis);
void ProcessButtons(int controller);
void ProcessDigitalButton(int value, CControllerButton& button, u16 mapping);
void ProcessDigitalButton(int value, CControllerButton& button, ushort mapping);
void ProcessAnalogButton(float value, CControllerAxis& axis);
PADStatus x4_status[4];
CControllerGamepadData x34_gamepadStates[4];
EMotorState x194_motorStates[4];
uint x1a4_controllerTypes[4];
u32 x1b4_controllerTypePollTime[4];
u32 x1c4_;
u32 x1c8_invalidControllers;
u32 x1cc_;
uint x1b4_controllerTypePollTime[4];
uint x1c4_;
uint x1c8_invalidControllers;
uint x1cc_;
};
#endif // _CDOLPHINCONTROLLER

View File

@ -9,8 +9,8 @@
class CRumbleGenerator {
private:
CRumbleVoice x0_voices[4];
f32 xc0_periodTime[4];
f32 xd0_onTime[4];
float xc0_periodTime[4];
float xd0_onTime[4];
EMotorState xe0_commandArray[4];
bool xf0_24_disabled : 1;
};

View File

@ -36,12 +36,12 @@ struct SAdsrData {
SAdsrData(float attackGain, float autoReleaseDur, float attackDur, float decayDur,
float sustainGain, float releaseDur, bool hasSustain, bool autoRelease);
f32 x0_attackGain;
f32 x4_autoReleaseDur;
f32 x8_attackDur;
f32 xc_decayDur;
f32 x10_sustainGain;
f32 x14_releaseDur;
float x0_attackGain;
float x4_autoReleaseDur;
float x8_attackDur;
float xc_decayDur;
float x10_sustainGain;
float x14_releaseDur;
bool x18_24_hasSustain : 1;
bool x18_25_autoRelease : 1;
};
@ -61,13 +61,13 @@ struct SAdsrDelta {
static SAdsrDelta Stopped();
static SAdsrDelta Start(ERumblePriority priority, bool prePulse);
f32 x0_curIntensity;
f32 x4_attackTime;
f32 x8_decayTime;
f32 xc_releaseTime;
f32 x10_autoReleaseTime;
f32 x14_attackIntensity;
f32 x18_sustainIntensity;
float x0_curIntensity;
float x4_attackTime;
float x8_decayTime;
float xc_releaseTime;
float x10_autoReleaseTime;
float x14_attackIntensity;
float x18_sustainIntensity;
ERumblePriority x1c_priority;
EPhase x20_phase;
};
@ -76,21 +76,21 @@ class CRumbleVoice {
private:
rstl::vector< SAdsrData > x0_datas;
rstl::vector< SAdsrDelta > x10_deltas;
rstl::reserved_vector< u16, 4 > x20_handleIds;
u16 x2c_usedChannels;
u8 x2e_lastId;
rstl::reserved_vector< ushort, 4 > x20_handleIds;
ushort x2c_usedChannels;
uchar x2e_lastId;
CRumbleVoice();
s16 Activate(const SAdsrData& data, u16 idx, float gain, ERumblePriority prio);
void Deactivate(s16 id, bool b1);
short Activate(const SAdsrData& data, ushort idx, float gain, ERumblePriority prio);
void Deactivate(short id, bool b1);
void HardReset();
bool UpdateChannel(SAdsrDelta& delta, const SAdsrData& data, float dt);
bool Update(float dt);
uint GetFreeChannel() const;
float GetIntensity() const;
bool OwnsSustained(s16 id) const;
s16 CreateRumbleHandle(u16 idx);
bool OwnsSustained(short id) const;
short CreateRumbleHandle(ushort idx);
};
#endif // _CRUMBLEVOICE

View File

@ -35,7 +35,7 @@ public:
};
CAABox(const CVector3f& min, const CVector3f& max);
CAABox(f32 minX, f32 minY, f32 minZ, f32 maxX, f32 maxY, f32 maxZ)
CAABox(float minX, float minY, float minZ, float maxX, float maxY, float maxZ)
: min(minX, minY, minZ), max(maxX, maxY, maxZ) {}
CAABox(CInputStream& in);
// CAABox(const CAABox& other)
@ -60,7 +60,7 @@ public:
bool Invalid() const;
bool PointInside(const CVector3f& vec) const;
bool DoBoundsOverlap(const CAABox&) const;
f32 GetVolume() const;
float GetVolume() const;
CAABox GetBooleanIntersection(const CAABox& other) const;
bool Inside(const CAABox& other) const;
bool InsidePlane(const CPlane& plane) const;
@ -93,7 +93,7 @@ public:
static const CAABox& Identity() { return mskNullBox; }
static const CAABox& MakeMaxInvertedBox() { return mskInvertedBox; }
// MakeNullBox__6CAABoxFv ??
static f32 DistanceBetween(const CAABox& a, const CAABox& b);
static float DistanceBetween(const CAABox& a, const CAABox& b);
private:
CVector3f min;

View File

@ -7,8 +7,8 @@
class CAbsAngle {
public:
f32 AsDegrees() const { return x0_angle * (180.f / M_PIF); }
f32 AsRadians() const { return x0_angle; }
float AsDegrees() const { return x0_angle * (180.f / M_PIF); }
float AsRadians() const { return x0_angle; }
// ArcCosine__9CAbsAngleFf weak
// -> calls ArcCosineR__5CMathFf
@ -20,11 +20,11 @@ public:
x0_angle -= v.x0_angle;
return *this;
}
CAbsAngle& operator*=(f32 v) {
CAbsAngle& operator*=(float v) {
x0_angle *= v;
return *this;
}
CAbsAngle& operator/=(f32 v) {
CAbsAngle& operator/=(float v) {
x0_angle /= v;
return *this;
}
@ -32,13 +32,13 @@ public:
// __apl__9CAbsAngleFRC9CRelAngle
// __ami__9CAbsAngleFRC9CRelAngle
static CAbsAngle FromDegrees(f32 deg) {
static CAbsAngle FromDegrees(float deg) {
return CAbsAngle(CMath::ClampRadians(deg * (M_PIF / 180.f)));
}
static CAbsAngle FromRadians(f32 rad) { return CAbsAngle(CMath::ClampRadians(rad)); }
static CAbsAngle FromRadians(float rad) { return CAbsAngle(CMath::ClampRadians(rad)); }
private:
CAbsAngle(f32 rad) : x0_angle(rad) {}
CAbsAngle(float rad) : x0_angle(rad) {}
float x0_angle;
};
@ -46,6 +46,6 @@ CHECK_SIZEOF(CAbsAngle, 0x4)
// __mi__FRC9CAbsAngleRC9CAbsAngle
static inline f32 cosine(const CAbsAngle& angle) { return cos(angle.AsRadians()); }
static inline float cosine(const CAbsAngle& angle) { return cos(angle.AsRadians()); }
#endif // _CABSANGLE

View File

@ -13,10 +13,10 @@ class CSphere;
class CPlane {
private:
f32 x;
f32 y;
f32 z;
f32 d;
float x;
float y;
float z;
float d;
};
class CFrustumPlanes {

View File

@ -10,26 +10,26 @@
class CMath {
public:
static f32 FastCosR(f32 v);
static f32 FastSinR(f32 v);
static inline f32 FastFmod(f32 x, f32 y) {
static float FastCosR(float v);
static float FastSinR(float v);
static inline float FastFmod(float x, float y) {
int v = static_cast< int >(x * (1.f / y));
return x - v * y;
}
template < typename T >
static const T& Clamp(const T& min, const T& val, const T& max); // TODO: weak
static f32 SqrtF(f32 v);
static inline f32 Limit(f32 v, f32 h) { return fabs(v) > h ? h * Sign(v) : v; }
static inline f32 Sign(f32 v) { return FastFSel(v, 1.f, -1.f); }
static inline f32 FastFSel(register f32 v, register f32 h, register f32 l) {
register f32 out;
static float SqrtF(float v);
static inline float Limit(float v, float h) { return fabs(v) > h ? h * Sign(v) : v; }
static inline float Sign(float v) { return FastFSel(v, 1.f, -1.f); }
static inline float FastFSel(register float v, register float h, register float l) {
register float out;
asm {
fsel out, v, h, l
}
return out;
}
static inline f32 AbsF(f32 v) { return fabs(v); }
static inline f64 AbsD(f64 v) { return fabs(v); }
static inline float AbsF(float v) { return fabs(v); }
static inline double AbsD(double v) { return fabs(v); }
static inline int AbsI(int v) { return abs(v); }
// WrapPi__5CMathFf weak
// WrapTwoPi__5CMathFf weak
@ -43,17 +43,17 @@ public:
// SlowSineR__5CMathFf global
// FastCosR__5CMathFf global
// GetBezierPoint__5CMathFRC9CVector3fRC9CVector3fRC9CVector3fRC9CVector3ff global
static f32 ClampRadians(f32 rad) {
f32 value = FastFmod(rad, M_2PIF);
static float ClampRadians(float rad) {
float value = FastFmod(rad, M_2PIF);
if (value < 0.f) {
value += M_2PIF;
}
return value;
}
// ModF__5CMathFff weak
static f32 Deg2Rad(f32 deg) { return Deg2Rev(deg) * M_2PIF; }
static f32 Deg2Rev(f32 deg) { return deg * (1.f / 360.f); }
static f32 ArcCosineR(f32 v);
static float Deg2Rad(float deg) { return Deg2Rev(deg) * M_2PIF; }
static float Deg2Rev(float deg) { return deg * (1.f / 360.f); }
static float ArcCosineR(float v);
// FloorF__5CMathFf global
// BaryToWorld__5CMathFRC9CVector3fRC9CVector3fRC9CVector3fRC9CVector3f global
// GetCatmullRomSplinePoint__5CMathFRC9CVector3fRC9CVector3fRC9CVector3fRC9CVector3ff global
@ -66,8 +66,8 @@ public:
// Rev2Deg__5CMathFf weak
// GetCatmullRomSplinePoint__5CMathFfffff global
// SlowTangentR__5CMathFf global
static f32 Rad2Deg(f32 rad) { return rad * (180.f / M_PIF); }
static f32 Rad2Rev(f32 rad) { return rad * (1.f / M_2PIF); }
static float Rad2Deg(float rad) { return rad * (180.f / M_PIF); }
static float Rad2Rev(float rad) { return rad * (1.f / M_2PIF); }
// CeilingF__5CMathFf global
// ArcTangentR__5CMathFf global
// Swap<f>__5CMathFRfRf weak

View File

@ -15,7 +15,7 @@ public:
static const CMatrix3f& Identity() { return sIdentity; }
private:
// TODO maybe individual f32s
// TODO maybe individual floats
CVector3f m0;
CVector3f m1;
CVector3f m2;

View File

@ -5,22 +5,22 @@
class CMatrix4f {
private:
f32 m00;
f32 m01;
f32 m02;
f32 m03;
f32 m10;
f32 m11;
f32 m12;
f32 m13;
f32 m20;
f32 m21;
f32 m22;
f32 m23;
f32 m30;
f32 m31;
f32 m32;
f32 m33;
float m00;
float m01;
float m02;
float m03;
float m10;
float m11;
float m12;
float m13;
float m20;
float m21;
float m22;
float m23;
float m30;
float m31;
float m32;
float m33;
};
CHECK_SIZEOF(CMatrix4f, 0x40);

View File

@ -6,16 +6,16 @@
class CMatrix3f;
class CNUQuaternion {
public:
CNUQuaternion(f32 w, f32 x, f32 y, f32 z) : w(w), x(x), y(y), z(z) {}
CNUQuaternion(float w, float x, float y, float z) : w(w), x(x), y(y), z(z) {}
static CNUQuaternion BuildFromMatrix3f(const CMatrix3f& matrix);
static CNUQuaternion BuildFromQuaternion(const CQuaternion& quat);
private:
f32 w;
f32 x;
f32 y;
f32 z;
float w;
float x;
float y;
float z;
};
#endif // _CNUQUATERNION

View File

@ -14,14 +14,14 @@ public:
// TODO
const CUnitVector3f& GetNormal() const { return x0_normal; }
f32 GetConstant() const { return xc_constant; }
float GetConstant() const { return xc_constant; }
// GetHeight__6CPlaneCFRC9CVector3f
// IsFacing__6CPlaneCFRC9CVector3f
float ClipLineSegment(const CVector3f& start, const CVector3f& end) const;
private:
CUnitVector3f x0_normal;
f32 xc_constant;
float xc_constant;
};
CHECK_SIZEOF(CPlane, 0x10)

View File

@ -11,7 +11,7 @@ class CUnitVector3f;
class CQuaternion {
public:
CQuaternion(f32 w, f32 x, f32 y, f32 z) : w(w), x(x), y(y), z(z) {}
CQuaternion(float w, float x, float y, float z) : w(w), x(x), y(y), z(z) {}
// __ct__11CQuaternionFfRC9CVector3f
// CQuaternion(const CQuaternion& other)
@ -47,10 +47,10 @@ public:
CTransform4f BuildTransform4f() const;
CTransform4f BuildTransform4f(const CVector3f&) const;
CQuaternion BuildInverted() const {
// f64 w = this->w;
// f64 x = -this->x;
// f64 y = -this->y;
// f64 z = -this->z;
// double w = this->w;
// double x = -this->x;
// double y = -this->y;
// double z = -this->z;
return CQuaternion(w, -x, -y, -z);
}
@ -61,10 +61,10 @@ public:
static const CQuaternion& NoRotation() { return sNoRotation; }
private:
f32 w;
f32 x;
f32 y;
f32 z;
float w;
float x;
float y;
float z;
static const CQuaternion sNoRotation;
};

View File

@ -7,8 +7,8 @@
class CRelAngle {
public:
f32 AsDegrees() const { return x0_angle * (180.f / M_PIF); }
f32 AsRadians() const { return x0_angle; }
float AsDegrees() const { return x0_angle * (180.f / M_PIF); }
float AsRadians() const { return x0_angle; }
// ArcCosine__9CRelAngleFf weak
CRelAngle& operator+=(const CRelAngle& v) {
@ -19,22 +19,22 @@ public:
x0_angle -= v.x0_angle;
return *this;
}
CRelAngle& operator*=(f32 v) {
CRelAngle& operator*=(float v) {
x0_angle *= v;
return *this;
}
CRelAngle& operator/=(f32 v) {
CRelAngle& operator/=(float v) {
x0_angle /= v;
return *this;
}
// __lt__9CRelAngleCFRC9CRelAngle
static CRelAngle FromDegrees(f32 deg) { return CRelAngle(deg * (M_PIF / 180.f)); }
static CRelAngle FromRadians(f32 rad) { return CRelAngle(rad); }
static CRelAngle FromDegrees(float deg) { return CRelAngle(deg * (M_PIF / 180.f)); }
static CRelAngle FromRadians(float rad) { return CRelAngle(rad); }
private:
CRelAngle(f32 rad) : x0_angle(rad) {}
CRelAngle(float rad) : x0_angle(rad) {}
float x0_angle;
};

View File

@ -8,13 +8,13 @@
class CSphere {
public:
CSphere(const CVector3f& pos, f32 radius) : x0_pos(pos), xc_radius(radius) {}
CSphere(const CVector3f& pos, float radius) : x0_pos(pos), xc_radius(radius) {}
CUnitVector3f GetSurfaceNormal(const CVector3f& v) const;
private:
CVector3f x0_pos;
f32 xc_radius;
float xc_radius;
};
CHECK_SIZEOF(CSphere, 0x10)

View File

@ -5,7 +5,7 @@
#include "Kyoto/Math/CVector3f.hpp"
typedef const f32 (*ConstMtxPtr)[4];
typedef const float (*ConstMtxPtr)[4];
class CInputStream;
class CMatrix3f;
@ -18,7 +18,7 @@ public:
// }
CTransform4f(const CVector3f& m0, const CVector3f& m1, const CVector3f& m2, const CVector3f& pos)
: m0(m0), posX(pos.GetX()), m1(m1), posY(pos.GetY()), m2(m2), posZ(pos.GetZ()) {}
CTransform4f(f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32);
CTransform4f(float, float, float, float, float, float, float, float, float, float, float, float);
CTransform4f(CInputStream& in);
CTransform4f(const CMatrix3f& rotation, const CVector3f& translation);
CTransform4f(const CTransform4f& other);
@ -31,18 +31,18 @@ public:
ConstMtxPtr GetCStyleMatrix() const { return reinterpret_cast< ConstMtxPtr >(this); }
CMatrix3f BuildMatrix3f() const;
f32 Get00() const { return m0.GetX(); }
f32 Get01() const { return m0.GetY(); }
f32 Get02() const { return m0.GetZ(); }
f32 Get03() const { return posX; }
f32 Get10() const { return m1.GetX(); }
f32 Get11() const { return m1.GetY(); }
f32 Get12() const { return m1.GetZ(); }
f32 Get13() const { return posY; }
f32 Get20() const { return m2.GetX(); }
f32 Get21() const { return m2.GetY(); }
f32 Get22() const { return m2.GetZ(); }
f32 Get23() const { return posZ; }
float Get00() const { return m0.GetX(); }
float Get01() const { return m0.GetY(); }
float Get02() const { return m0.GetZ(); }
float Get03() const { return posX; }
float Get10() const { return m1.GetX(); }
float Get11() const { return m1.GetY(); }
float Get12() const { return m1.GetZ(); }
float Get13() const { return posY; }
float Get20() const { return m2.GetX(); }
float Get21() const { return m2.GetY(); }
float Get22() const { return m2.GetZ(); }
float Get23() const { return posZ; }
CVector3f GetColumn(EDimX dim) const { return CVector3f(m0[dim], m1[dim], m2[dim]); }
CVector3f GetColumn(EDimY dim) const { return CVector3f(m0[dim], m1[dim], m2[dim]); }
CVector3f GetColumn(EDimZ dim) const { return CVector3f(m0[dim], m1[dim], m2[dim]); }
@ -87,7 +87,7 @@ public:
posY += vec.GetY();
posZ += vec.GetZ();
}
void AddTranslationZ(f32 z) { posZ += z; }
void AddTranslationZ(float z) { posZ += z; }
CTransform4f& operator*=(const CTransform4f& other);
CTransform4f operator*(const CTransform4f& vec) const;
@ -95,18 +95,18 @@ public:
static CTransform4f FromColumns(const CVector3f&, const CVector3f&, const CVector3f&,
const CVector3f&);
static CTransform4f Translate(f32 x, f32 y, f32 z);
static CTransform4f Translate(float x, float y, float z);
static CTransform4f Translate(const CVector3f& vec);
static const CTransform4f& Identity() { return sIdentity; }
private:
CVector3f m0;
f32 posX;
float posX;
CVector3f m1;
f32 posY;
float posY;
CVector3f m2;
f32 posZ;
float posZ;
static CTransform4f sIdentity;
};

View File

@ -7,7 +7,7 @@
class CUnitVector3f : public CVector3f {
public:
CUnitVector3f(f32 x, f32 y, f32 z) : CVector3f(x, y, z) { Normalize(); }
CUnitVector3f(float x, float y, float z) : CVector3f(x, y, z) { Normalize(); }
CUnitVector3f(const CVector3f& vec); // : CVector3f(vec) { Normalize(); }
// TODO
};

View File

@ -7,9 +7,9 @@ class CVector2f {
static const CVector2f skZeroVector;
public:
CVector2f(f32 x, f32 y);
f32 GetX() const { return mX; }
f32 GetY() const { return mY; }
CVector2f(float x, float y);
float GetX() const { return mX; }
float GetY() const { return mY; }
CVector2f& operator+=(const CVector2f& rhs);
CVector2f& operator-=(const CVector2f& rhs);
@ -18,16 +18,16 @@ public:
CVector2f& Normalize();
f32 Magnitude() const;
f32 MagSquared() const;
float Magnitude() const;
float MagSquared() const;
CVector2f AsNormalized() const;
static float GetAngleDiff(const CVector2f& a, const CVector2f& b);
static float Dot(const CVector2f& a, const CVector2f& b);
private:
f32 mX;
f32 mY;
float mX;
float mY;
};
CVector2f operator+(const CVector2f& lhs, const CVector2f& rhs);

View File

@ -17,30 +17,30 @@ enum EDimZ { kDZ };
class CVector3f {
public:
explicit CVector3f(f32 x, f32 y, f32 z) : mX(x), mY(y), mZ(z) {}
CVector3f(const CVector2f& v, f32 z) : mX(v.GetX()), mY(v.GetY()), mZ(z) {}
explicit CVector3f(float x, float y, float z) : mX(x), mY(y), mZ(z) {}
CVector3f(const CVector2f& v, float z) : mX(v.GetX()), mY(v.GetY()), mZ(z) {}
CVector3f(CInputStream& in);
void PutTo(COutputStream& out) const;
f32 GetX() const { return mX; }
f32 GetY() const { return mY; }
f32 GetZ() const { return mZ; }
float GetX() const { return mX; }
float GetY() const { return mY; }
float GetZ() const { return mZ; }
void SetX(f32 x) { mX = x; }
void SetY(f32 y) { mY = y; }
void SetZ(f32 z) { mZ = z; }
void SetX(float x) { mX = x; }
void SetY(float y) { mY = y; }
void SetZ(float z) { mZ = z; }
// ByElementMultiply__9CVector3fFRC9CVector3fRC9CVector3f
static CVector3f Slerp(const CVector3f& a, const CVector3f& b, const CRelAngle& angle);
CVector3f& Normalize();
f32 Magnitude() const;
float Magnitude() const;
CVector3f AsNormalized() const;
bool IsNotInf() const;
bool IsMagnitudeSafe() const;
bool CanBeNormalized() const;
static float GetAngleDiff(const CVector3f& a, const CVector3f& b);
bool IsEqu(const CVector3f& other, f32 epsilon = FLT_EPSILON) const;
bool IsEqu(const CVector3f& other, float epsilon = FLT_EPSILON) const;
// Lerp__9CVector3fFRC9CVector3fRC9CVector3ff
inline float MagSquared() const { return GetX() * GetX() + GetY() * GetY() + GetZ() * GetZ(); }
static CVector3f Cross(const CVector3f& lhs, const CVector3f& rhs) {
@ -50,15 +50,15 @@ public:
return CVector3f(x, y, z);
}
f32& operator[](EDimX dim) { return mX; }
f32& operator[](EDimY dim) { return mY; }
f32& operator[](EDimZ dim) { return mZ; }
const f32& operator[](EDimX) const { return mX; }
const f32& operator[](EDimY) const { return mY; }
const f32& operator[](EDimZ) const { return mZ; }
float& operator[](EDimX dim) { return mX; }
float& operator[](EDimY dim) { return mY; }
float& operator[](EDimZ dim) { return mZ; }
const float& operator[](EDimX) const { return mX; }
const float& operator[](EDimY) const { return mY; }
const float& operator[](EDimZ) const { return mZ; }
f32& operator[](int i) { return (&mX)[i]; }
f32 operator[](int i) const { return (&mX)[i]; }
float& operator[](int i) { return (&mX)[i]; }
float operator[](int i) const { return (&mX)[i]; }
bool IsNonZero() const { return mX != 0.f || mY != 0.f || mZ != 0.f; }
CVector3f DropZ() const { return CVector3f(mX, mY, 0.f); }
@ -75,20 +75,20 @@ public:
mZ -= other.mZ;
return *this;
}
CVector3f& operator*=(f32 v) {
CVector3f& operator*=(float v) {
mX *= v;
mY *= v;
mZ *= v;
return *this;
}
CVector3f& operator/=(f32 v) {
CVector3f& operator/=(float v) {
mX /= v;
mY /= v;
mZ /= v;
return *this;
}
static f32 Dot(const CVector3f& a, const CVector3f& b) {
static float Dot(const CVector3f& a, const CVector3f& b) {
return (a.GetX() * b.GetX()) + (a.GetY() * b.GetY()) + (a.GetZ() * b.GetZ());
}
@ -101,9 +101,9 @@ public:
static const CVector3f& Back() { return sBackVector; }
protected:
f32 mX;
f32 mY;
f32 mZ;
float mX;
float mY;
float mZ;
static CVector3f sZeroVector;
static int sUnkData[18];
@ -127,35 +127,35 @@ inline bool operator!=(const CVector3f& lhs, const CVector3f& rhs) {
return lhs.GetX() != rhs.GetX() || lhs.GetY() != rhs.GetY() || lhs.GetZ() != rhs.GetZ();
}
inline CVector3f operator-(const CVector3f& lhs, const CVector3f& rhs) {
f32 x = lhs.GetX() - rhs.GetX();
f32 y = lhs.GetY() - rhs.GetY();
f32 z = lhs.GetZ() - rhs.GetZ();
float x = lhs.GetX() - rhs.GetX();
float y = lhs.GetY() - rhs.GetY();
float z = lhs.GetZ() - rhs.GetZ();
return CVector3f(x, y, z);
}
inline CVector3f operator+(const CVector3f& lhs, const CVector3f& rhs) {
f32 x = lhs.GetX() + rhs.GetX();
f32 y = lhs.GetY() + rhs.GetY();
f32 z = lhs.GetZ() + rhs.GetZ();
float x = lhs.GetX() + rhs.GetX();
float y = lhs.GetY() + rhs.GetY();
float z = lhs.GetZ() + rhs.GetZ();
return CVector3f(x, y, z);
}
inline CVector3f operator*(const CVector3f& vec, f32 f) {
f32 x = vec.GetX() * f;
f32 y = vec.GetY() * f;
f32 z = vec.GetZ() * f;
inline CVector3f operator*(const CVector3f& vec, float f) {
float x = vec.GetX() * f;
float y = vec.GetY() * f;
float z = vec.GetZ() * f;
return CVector3f(x, y, z);
}
inline CVector3f operator*(f32 f, const CVector3f& vec) {
f32 x = f * vec.GetX();
f32 y = f * vec.GetY();
f32 z = f * vec.GetZ();
inline CVector3f operator*(float f, const CVector3f& vec) {
float x = f * vec.GetX();
float y = f * vec.GetY();
float z = f * vec.GetZ();
return CVector3f(x, y, z);
}
inline CVector3f operator/(const CVector3f& vec, f32 f) {
f32 x = vec.GetX() / f;
f32 y = vec.GetY() / f;
f32 z = vec.GetZ() / f;
inline CVector3f operator/(const CVector3f& vec, float f) {
float x = vec.GetX() / f;
float y = vec.GetY() / f;
float z = vec.GetZ() / f;
return CVector3f(x, y, z);
}
inline CVector3f operator-(const CVector3f& vec) {

View File

@ -49,7 +49,7 @@ public:
static void ShutDown();
private:
u8 x4_pad[0x33C];
uchar x4_pad[0x33C];
};
CHECK_SIZEOF(CElementGen, 0x340)

View File

@ -16,12 +16,12 @@ public:
virtual ~CInputStream();
virtual uint Read(void* dest, uint len) = 0;
f32 ReadFloat();
float ReadFloat();
u64 ReadLongLong();
uint ReadLong();
u16 ReadShort();
ushort ReadShort();
bool ReadBool();
u8 ReadChar();
uchar ReadChar();
uint ReadBits(uint len);
uint ReadBytes(void* dest, unsigned long len);
void Get(void* dest, unsigned long len);
@ -40,7 +40,7 @@ private:
uint x4_blockOffset;
uint x8_blockLen;
uint xc_len;
u8* x10_ptr;
uchar* x10_ptr;
bool x14_owned;
uint x18_readPosition;
uint x1c_bitWord;

View File

@ -14,7 +14,7 @@ public:
uint Read(void* dest, uint len) override;
private:
u8* x24_compBuf;
uchar* x24_compBuf;
rstl::auto_ptr< CInputStream > x28_stream;
unkptr x30_zstream;
};

View File

@ -15,7 +15,7 @@ public:
private:
static void* GetAllocSpace() {
static u8 sAllocSpace[sizeof(T)];
static uchar sAllocSpace[sizeof(T)];
return &sAllocSpace;
}
static uint& ReferenceCount() {

View File

@ -9,7 +9,7 @@
class CStringTable {
int x0_stringCount;
rstl::single_ptr< u8 > x4_data;
rstl::single_ptr< uchar > x4_data;
public:
CStringTable(CInputStream& in);

View File

@ -43,7 +43,8 @@ public:
virtual void SetWorldViewpoint();
virtual void SetPerspective1();
virtual void SetPerspective2();
virtual rstl::pair< CVector2f, CVector2f > SetViewportOrtho(bool centered, f32 znear, f32 zfar);
virtual rstl::pair< CVector2f, CVector2f > SetViewportOrtho(bool centered, float znear,
float zfar);
virtual void SetClippingPlanes();
virtual void SetViewport();
virtual void SetDepthReadWrite(bool read, bool update);
@ -65,7 +66,7 @@ public:
virtual void BeginTriangleFan(int nverts);
virtual void PrimVertex(const CVector3f& vtx);
virtual void PrimNormal(const CVector3f& nrm);
virtual void PrimColor(f32 r, f32 g, f32 b, f32 a);
virtual void PrimColor(float r, float g, float b, float a);
virtual void PrimColor(const CColor& color);
virtual void EndPrimitive();
virtual void SetAmbientColor(const CColor& color);

View File

@ -241,14 +241,14 @@ public:
CAdvancementDeltas UpdateAnimation(float dt, CStateManager& mgr, bool advTree);
void ProcessSoundEvent(int sfxId, f32 weight, int flags, f32 fallOff, f32 maxDist, u8 minVol,
u8 maxVol, const CVector3f& toListener, const CVector3f& position, int aid,
CStateManager& mgr, bool translateId);
void ProcessSoundEvent(int sfxId, float weight, int flags, float fallOff, float maxDist,
uchar minVol, uchar maxVol, const CVector3f& toListener,
const CVector3f& position, int aid, CStateManager& mgr, bool translateId);
void UpdateSfxEmitters();
void RemoveEmitter();
void SetModelData(const CModelData& modelData);
f32 GetAverageAnimVelocity(int anim);
float GetAverageAnimVelocity(int anim);
void EnsureRendered(const CStateManager& mgr) const;
void EnsureRendered(const CStateManager& mgr, const CVector3f& pos, const CAABox& bounds) const;
void DrawTouchBounds() const;
@ -359,14 +359,14 @@ protected:
rstl::single_ptr< TCachedToken< CScannableObjectInfo > > x98_scanObjectInfo;
CAABox x9c_renderBounds;
CModelFlags xb4_drawFlags;
f32 xbc_time;
float xbc_time;
uint xc0_pitchBend;
TUniqueId xc4_fluidId;
TUniqueId xc6_nextDrawNode;
int xc8_drawnToken;
int xcc_addedToken;
f32 xd0_damageMag;
u8 xd4_maxVol;
float xd0_damageMag;
uchar xd4_maxVol;
rstl::reserved_vector< CSfxHandle, 2 > xd8_nonLoopingSfxHandles;
uint xe4_24_nextNonLoopingSfxHandle : 3;
uint xe4_27_notInSortedLists : 1;

View File

@ -29,7 +29,7 @@ public:
bool GetNeedsRelight() const { return x298_24_dirty == TRUE; }
bool HasShadowLight() const { return x29c_shadowLightArrIdx != -1; }
s32 GetShadowLightIndex() const { return x2a0_shadowLightIdx; }
int GetShadowLightIndex() const { return x2a0_shadowLightIdx; }
void SetFindShadowLight(bool v) { x298_27_findShadowLight = v; }
void SetShadowDynamicRangeThreshold(float t) { x2d0_shadowDynamicRangeThreshold = t; }
@ -59,9 +59,9 @@ private:
int x2b8_maxAreaLights;
int x2bc_maxDynamicLights;
CVector3f x2c0_lastActorPos;
f32 x2cc_actorPositionDeltaUpdateThreshold;
f32 x2d0_shadowDynamicRangeThreshold;
f32 x2d4_worldLightingLevel;
float x2cc_actorPositionDeltaUpdateThreshold;
float x2d0_shadowDynamicRangeThreshold;
float x2d4_worldLightingLevel;
int x2d8_brightLightIdx;
uint x2dc_brightLightLag;
};

View File

@ -47,10 +47,10 @@ public:
private:
bool x4_castShadow;
f32 x8_shadowScale;
float x8_shadowScale;
EShadowTesselation xc_shadowTesselation;
f32 x10_shadowAlpha;
f32 x14_maxShadowHeight;
float x10_shadowAlpha;
float x14_maxShadowHeight;
CColor x18_noLightsAmbient;
bool x1c_makeLights;
bool x1d_ambientChannelOverflow;
@ -80,10 +80,10 @@ public:
CVisorParameters() {
// TODO
}
CVisorParameters(u8 mask, bool b1, bool scanPassthrough)
CVisorParameters(uchar mask, bool b1, bool scanPassthrough)
: x0_mask(mask), x0_4_b1(b1), x0_5_scanPassthrough(scanPassthrough) {}
u8 GetMask() const { return x0_mask; }
uchar GetMask() const { return x0_mask; }
// TODO: GetIsBlockXRay__16CVisorParametersCFv?
bool GetBool1() const { return x0_4_b1; }
bool GetScanPassthrough() const { return x0_5_scanPassthrough; }
@ -108,13 +108,13 @@ public:
const rstl::pair< CAssetId, CAssetId >& GetXRay() const { return x44_xrayAssets; }
const rstl::pair< CAssetId, CAssetId >& GetInfra() const { return x4c_thermalAssets; }
const CVisorParameters& GetVisorParameters() const { return x54_visorParams; }
f32 GetThermalMag() const { return x64_thermalMag; }
float GetThermalMag() const { return x64_thermalMag; }
bool GetUseGlobalRenderTime() const { return x58_24_globalTimeProvider; }
bool IsHotInThermal() const { return x58_25_thermalHeat; }
bool ForceRenderUnsorted() const { return x58_26_renderUnsorted; }
bool NoSortThermal() const { return x58_27_noSortThermal; }
f32 GetFadeInTime() const { return x5c_fadeInTime; }
f32 GetFadeOutTime() const { return x60_fadeOutTime; }
float GetFadeInTime() const { return x5c_fadeInTime; }
float GetFadeOutTime() const { return x60_fadeOutTime; }
static CActorParameters None();
@ -128,9 +128,9 @@ private:
bool x58_25_thermalHeat : 1;
bool x58_26_renderUnsorted : 1;
bool x58_27_noSortThermal : 1;
f32 x5c_fadeInTime;
f32 x60_fadeOutTime;
f32 x64_thermalMag;
float x5c_fadeInTime;
float x60_fadeOutTime;
float x64_thermalMag;
};
CHECK_SIZEOF(CActorParameters, 0x68)

View File

@ -9,8 +9,8 @@ class CAnimTreeNode;
class CAdditiveAnimationInfo {
private:
f32 x0_fadeInDur;
f32 x4_fadeOutDur;
float x0_fadeInDur;
float x4_fadeOutDur;
};
class CAdditiveAnimPlayback {
@ -26,10 +26,10 @@ public:
private:
CAdditiveAnimationInfo x0_info;
rstl::ncrc_ptr< CAnimTreeNode > x8_anim;
f32 xc_targetWeight;
f32 x10_curWeight;
float xc_targetWeight;
float x10_curWeight;
bool x14_active;
f32 x18_weightTimer;
float x18_weightTimer;
EPlaybackPhase x1c_phase;
bool x20_needsFadeOut;
};

View File

@ -43,7 +43,7 @@ public:
}
int GetCharacterIndex() const { return x204_charIdx; }
f32 GetAverageVelocity(int idx) const;
float GetAverageVelocity(int idx) const;
const CBoolPOINode* GetBoolPOIList(int& count) const {
count = x20c_passedBoolCount;
@ -121,7 +121,7 @@ public:
// GetAnimationManager__9CAnimDataFv
// SetPoseValid__9CAnimDataFb
s16 GetDefaultAnimation() const { return x208_defaultAnim; }
short GetDefaultAnimation() const { return x208_defaultAnim; }
const CCharacterInfo& GetCharacterInfo() const { return xc_charInfo; }
// GetCharLayoutInfo__9CAnimDataCFv
// GetDeltaRotation__9CAnimDataCFv
@ -182,23 +182,23 @@ private:
CQuaternion x1e8_alignRot;
rstl::rc_ptr< CAnimTreeNode > x1f8_animRoot;
rstl::rc_ptr< CTransitionManager > x1fc_transMgr;
f32 x200_speedScale;
float x200_speedScale;
int x204_charIdx;
s16 x208_defaultAnim;
s16 x20a_padding;
short x208_defaultAnim;
short x20a_padding;
int x20c_passedBoolCount;
int x210_passedIntCount;
int x214_passedParticleCount;
int x218_passedSoundCount;
int x21c_particleLightIdx;
u8 x220_24_animating : 1;
u8 x220_25_loop : 1;
u8 x220_26_aligningPos : 1;
u8 x220_27_ : 1;
u8 x220_28_ : 1;
u8 x220_29_animationJustStarted : 1;
u8 x220_30_poseBuilt : 1;
u8 x220_31_poseCached : 1;
uchar x220_24_animating : 1;
uchar x220_25_loop : 1;
uchar x220_26_aligningPos : 1;
uchar x220_27_ : 1;
uchar x220_28_ : 1;
uchar x220_29_animationJustStarted : 1;
uchar x220_30_poseBuilt : 1;
uchar x220_31_poseCached : 1;
CPoseAsTransforms x224_pose;
CHierarchyPoseBuilder x2fc_poseBuilder;
CAnimPlaybackParms x40c_playbackParms;

View File

@ -11,7 +11,7 @@ class CAnimPlaybackParms {
private:
int x0_animA;
int x4_animB;
f32 x8_blendWeight;
float x8_blendWeight;
bool xc_animating;
int x10_;
CVector3f* x14_targetPos;

View File

@ -22,7 +22,7 @@ private:
CColor x28_colorTarget;
unkptr x2c_;
unkptr x30_;
f32 x34_colorDelta;
float x34_colorDelta;
};
CHECK_SIZEOF(CAreaFog, 0x38)

View File

@ -18,7 +18,7 @@ public:
CAxisAngle() : mVector(CVector3f::Zero()) {}
explicit CAxisAngle(const CVector3f& vec);
explicit CAxisAngle(const CUnitVector3f& vec, float);
CAxisAngle(f32 x, f32 y, f32 z) : mVector(x, y, z) {}
CAxisAngle(float x, float y, float z) : mVector(x, y, z) {}
void FromVector(const CVector3f& angle);
static const CAxisAngle& Identity();

View File

@ -14,7 +14,7 @@ public:
};
private:
f32 x0_time;
float x0_time;
EType x4_type;
};
CHECK_SIZEOF(CCharAnimTime, 0x8)

View File

@ -26,7 +26,7 @@ public:
const CPASDatabase& GetPASDatabase() const { return x30_pasDatabase; }
private:
u16 x0_tableCount;
ushort x0_tableCount;
rstl::string x4_name;
CAssetId x14_cmdl;
CAssetId x18_cksr;

View File

@ -7,7 +7,7 @@
class CConsoleOutputWindow : public CIOWin {
public:
CConsoleOutputWindow(int, f32, f32);
CConsoleOutputWindow(int, float, float);
~CConsoleOutputWindow() override;
EMessageReturn OnMessage(const CArchitectureMessage&, CArchitectureQueue&) override;

View File

@ -10,7 +10,7 @@ private:
rstl::string x0_name;
SObjectTag x10_tag;
rstl::string x18_boneName;
f32 x28_scale;
float x28_scale;
CParticleData::EParentedMode x2c_parentedMode;
uint x30_flags;
};

View File

@ -15,8 +15,8 @@ class CEntity {
public:
virtual ~CEntity();
virtual void Accept(IVisitor& visitor) = 0;
virtual void PreThink(f32 dt, CStateManager& mgr);
virtual void Think(f32 dt, CStateManager& mgr);
virtual void PreThink(float dt, CStateManager& mgr);
virtual void Think(float dt, CStateManager& mgr);
virtual void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr);
virtual void SetActive(bool active);

View File

@ -20,38 +20,38 @@ class CTexture;
class CVectorFixed8_8 {
private:
s16 x;
s16 y;
s16 z;
short x;
short y;
short z;
};
class CEnvFxManagerGrid {
private:
bool x0_24_blockDirty;
CVector2i x4_position; /* 8.8 fixed point */
CVector2i xc_extent; /* 8.8 fixed point */
rstl::pair< bool, f32 > x14_block; /* Blocked-bool, Z-coordinate */
CVector2i x4_position; /* 8.8 fixed point */
CVector2i xc_extent; /* 8.8 fixed point */
rstl::pair< bool, float > x14_block; /* Blocked-bool, Z-coordinate */
rstl::vector< CVectorFixed8_8 > x1c_particles;
};
class CEnvFxManager {
public:
static void Initialize();
void SetFxDensity(s32, float);
void SetFxDensity(int, float);
private:
CAABox x0_particleBounds;
CVector3f x18_focusCellPosition;
bool x24_enableSplash;
f32 x28_firstSnowForce;
float x28_firstSnowForce;
int x2c_lastBlockedGridIdx;
f32 x30_fxDensity;
f32 x34_targetFxDensity;
f32 x38_maxDensityDeltaSpeed;
float x30_fxDensity;
float x34_targetFxDensity;
float x38_maxDensityDeltaSpeed;
bool x3c_snowflakeTextureMipBlanked;
TLockedToken< CTexture > x40_txtrEnvGradient;
rstl::reserved_vector< CEnvFxManagerGrid, 64 > x50_grids;
f32 xb54_baseSplashRate;
float xb54_baseSplashRate;
TLockedToken< CGenDescription > xb58_envRainSplash;
bool xb64_;
TUniqueId xb68_envRainSplashId;

View File

@ -20,7 +20,7 @@ public:
// CEntity
~CExplosion();
void Accept(IVisitor& visitor) override;
void Think(f32 dt, CStateManager& mgr) override;
void Think(float dt, CStateManager& mgr) override;
void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr) override;
// CActor

View File

@ -11,7 +11,7 @@
class CFluidPlaneManager {
private:
class CSplashRecord {
f32 x0_time;
float x0_time;
TUniqueId x4_id;
};

View File

@ -42,9 +42,9 @@ private:
CGuiSys x44_guiSys;
CIOWinManager x58_ioWinMgr;
int x78_gameFrameCount;
f32 x7c_;
f32 x80_;
f32 x84_;
float x7c_;
float x80_;
float x84_;
uint x88_;
rstl::vector< CToken > x90_;
OSAlarm xa0_infiniteLoopAlarm;

View File

@ -25,7 +25,7 @@ public:
virtual bool IIsActive() const = 0;
virtual CAssetId IGetAreaAssetId() const = 0;
virtual int IGetAreaSaveId() const = 0;
virtual rstl::pair< rstl::auto_ptr< u8 >, int > IGetScriptingMemoryAlways() const = 0;
virtual rstl::pair< rstl::auto_ptr< uchar >, int > IGetScriptingMemoryAlways() const = 0;
};
class Dock;
@ -42,7 +42,7 @@ public:
bool IIsActive() const override;
CAssetId IGetAreaAssetId() const override;
int IGetAreaSaveId() const override;
rstl::pair< rstl::auto_ptr< u8 >, int > IGetScriptingMemoryAlways() const override;
rstl::pair< rstl::auto_ptr< uchar >, int > IGetScriptingMemoryAlways() const override;
bool IsLoaded() const { return xf0_24_postConstructed; }
bool IsActive() const { return xf0_25_active; }
@ -62,7 +62,7 @@ private:
CAABox x6c_aabb;
CAssetId x84_mrea;
int x88_areaId;
rstl::vector< u16 > x8c_attachedAreaIndices;
rstl::vector< ushort > x8c_attachedAreaIndices;
rstl::vector< SObjectTag > x9c_deps1;
rstl::vector< SObjectTag > xac_deps2;
rstl::vector< uint > xbc_layerDepOffsets;

View File

@ -24,7 +24,7 @@ public:
static bool DetectCollision_Cached_Moving(const CStateManager&, CAreaCollisionCache&,
const CCollisionPrimitive&, const CTransform4f&,
const CMaterialFilter&, const TEntityList&, CVector3f,
TUniqueId&, CCollisionInfo&, f64&);
TUniqueId&, CCollisionInfo&, double&);
};
#endif // _CGAMECOLLISION

View File

@ -5,14 +5,14 @@
class CHealthInfo {
public:
CHealthInfo(f32 hp, f32 resist) : x0_health(hp), x4_knockbackResistance(resist) {}
CHealthInfo(float hp, float resist) : x0_health(hp), x4_knockbackResistance(resist) {}
void SetHP(float hp) { x0_health = hp; }
void SetKnockbackResistance(float resist) { x4_knockbackResistance = resist; }
float GetHP() const { return x0_health; }
private:
f32 x0_health;
f32 x4_knockbackResistance;
float x0_health;
float x4_knockbackResistance;
};
CHECK_SIZEOF(CHealthInfo, 0x8)

View File

@ -32,7 +32,7 @@ public:
class CScaledLayoutDescription {
private:
TCachedToken< CCharLayoutInfo > x0_layoutToken;
f32 xc_scale;
float xc_scale;
rstl::optional_object< CVector3f > x10_scaleVec;
};

View File

@ -10,24 +10,24 @@ class CTweakValue {
public:
struct Audio {
public:
Audio(f32 fadeIn, f32 fadeOut, f32 vol, const rstl::string& fileName, u32 handle)
Audio(float fadeIn, float fadeOut, float vol, const rstl::string& fileName, uint handle)
: x0_fadeIn(fadeIn)
, x4_fadeOut(fadeOut)
, x8_volume(vol)
, xc_fileName(fileName)
, x1c_res(handle) {}
f32 GetFadeIn() const { return x0_fadeIn; }
f32 GetFadeOut() const { return x4_fadeOut; }
f32 GetVolume() const { return x8_volume; }
float GetFadeIn() const { return x0_fadeIn; }
float GetFadeOut() const { return x4_fadeOut; }
float GetVolume() const { return x8_volume; }
const rstl::string& GetFileName() const { return xc_fileName; }
CAssetId GetResId() const { return x1c_res; }
// static Audio None() { return Audio(0.f, 0.f, 0.f, "", 0); }
private:
f32 x0_fadeIn;
f32 x4_fadeOut;
f32 x8_volume;
float x0_fadeIn;
float x4_fadeOut;
float x8_volume;
rstl::string xc_fileName;
CAssetId x1c_res;
};
@ -49,8 +49,8 @@ private:
rstl::string x14_str;
Audio x24_audio;
union {
u32 x44_int;
f32 x44_flt;
uint x44_int;
float x44_flt;
};
};

View File

@ -12,7 +12,7 @@ class IController;
class CInputGenerator {
public:
CInputGenerator(COsContext*, f32, f32);
CInputGenerator(COsContext*, float, float);
IController* GetController() const { return x4_controller.get(); }
@ -20,8 +20,8 @@ private:
COsContext* x0_context;
rstl::single_ptr< IController > x4_controller;
bool x8_connectedControllers[4];
f32 xc_leftDiv;
f32 x10_rightDiv;
float xc_leftDiv;
float x10_rightDiv;
};
CHECK_SIZEOF(CInputGenerator, 0x14)

View File

@ -99,14 +99,14 @@ private:
CMemorySys x6d_memorySys;
CDvdRequestSys x6e_dvdRequestSys;
CTweaks x70_tweaks;
u8 pad[0x14];
f64 xe8_;
TReservedAverage< f32, 4 > xf0_;
TReservedAverage< f32, 4 > x104_;
f32 x118_;
f32 x11c_;
f32 x120_;
f32 x124_;
uchar pad[0x14];
double xe8_;
TReservedAverage< float, 4 > xf0_;
TReservedAverage< float, 4 > x104_;
float x118_;
float x11c_;
float x120_;
float x124_;
CGameGlobalObjects* x128_gameGlobalObjects;
ERestartMode x12c_restartMode;
rstl::reserved_vector< uint, 10 > x130_frameTimes;

View File

@ -17,13 +17,13 @@ public:
~CMemoryCard();
// TODO
rstl::pair< CAssetId, TAreaId > GetAreaAndWorldIdForSaveId(s32 saveId) const;
rstl::pair< CAssetId, TAreaId > GetAreaAndWorldIdForSaveId(int saveId) const;
typedef rstl::pair< CAssetId, CWorldSaveGameInfo::EScanCategory > ScanState;
const rstl::vector< ScanState >& GetScanStates() const { return x20_scanStates; }
private:
u8 x0_pad[0x20];
uchar x0_pad[0x20];
rstl::vector< ScanState > x20_scanStates;
};

View File

@ -23,8 +23,8 @@ class CEntity;
class CObjectList {
struct SObjectListEntry {
CEntity* mEnt;
s16 mNext;
s16 mPrev;
short mNext;
short mPrev;
SObjectListEntry();
};
@ -56,8 +56,8 @@ public:
private:
SObjectListEntry mObjects[1024];
EGameObjectList mListType;
s16 mFirstId;
s16 mCount;
short mFirstId;
short mCount;
};
CHECK_SIZEOF(CObjectList, 0x200c)

View File

@ -26,18 +26,18 @@ public:
const rstl::string& GetString() const { return x8_name; }
EPOIType GetPoiType() const { return static_cast< EPOIType >(x18_type); }
const CCharAnimTime& GetTime() const { return x1c_time; }
f32 GetWeight() const { return x2c_weight; }
float GetWeight() const { return x2c_weight; }
int GetCharacterIndex() const { return x30_charIdx; }
int GetFlags() const { return x34_flags; }
protected:
u16 x4_;
ushort x4_;
rstl::string x8_name;
u16 x18_type;
ushort x18_type;
CCharAnimTime x1c_time;
int x24_index;
bool x28_unique;
f32 x2c_weight;
float x2c_weight;
int x30_charIdx;
int x34_flags;
};
@ -76,13 +76,13 @@ private:
class CSoundPOINode : public CPOINode {
public:
uint GetSoundId() const { return x38_sfxId; }
f32 GetFallOff() const { return x3c_falloff; }
f32 GetMaxDistance() const { return x40_maxDist; }
float GetFallOff() const { return x3c_falloff; }
float GetMaxDistance() const { return x40_maxDist; }
private:
uint x38_sfxId;
f32 x3c_falloff;
f32 x40_maxDist;
float x3c_falloff;
float x40_maxDist;
};
#endif // _CPOINODE

View File

@ -20,7 +20,7 @@ private:
uint x0_duration;
SObjectTag x4_particle;
rstl::string xc_boneName;
f32 x1c_scale;
float x1c_scale;
EParentedMode x20_parentMode;
};
@ -29,7 +29,7 @@ private:
uint x0_duration;
SObjectTag x4_particle;
CVector3f xc_translation;
f32 x18_scale;
float x18_scale;
};
#endif // _CPARTICLEDATA

View File

@ -21,9 +21,9 @@ struct SMoverData {
CAxisAngle xc_angularVelocity;
CVector3f x18_momentum;
CAxisAngle x24_;
f32 x30_mass;
float x30_mass;
SMoverData(f32 mass, const CVector3f& velocity, const CAxisAngle& angularVelocity,
SMoverData(float mass, const CVector3f& velocity, const CAxisAngle& angularVelocity,
const CVector3f& momentum, const CAxisAngle& unk)
: x0_velocity(velocity)
, xc_angularVelocity(angularVelocity)
@ -58,22 +58,22 @@ public:
CPhysicsActor(TUniqueId uid, bool active, const rstl::string& name, const CEntityInfo& info,
const CTransform4f& xf, const CModelData& mData, const CMaterialList& matList,
const CAABox& aabb, const SMoverData& moverData, const CActorParameters& actParams,
f32 stepUp, f32 stepDown);
float stepUp, float stepDown);
// CActor
~CPhysicsActor() override;
void Render(const CStateManager&) const override;
CVector3f GetOrbitPosition(const CStateManager& mgr) const override;
CVector3f GetAimPosition(const CStateManager& mgr, f32 val) const override;
CVector3f GetAimPosition(const CStateManager& mgr, float val) const override;
// CPhysicsActor
virtual const CCollisionPrimitive* GetCollisionPrimitive() const;
virtual CTransform4f GetPrimitiveTransform() const;
virtual void CollidedWith(const TUniqueId& id, const CCollisionInfoList& list,
CStateManager& mgr);
virtual f32 GetStepDownHeight() const;
virtual f32 GetStepUpHeight() const;
virtual f32 GetWeight() const;
virtual float GetStepDownHeight() const;
virtual float GetStepUpHeight() const;
virtual float GetWeight() const;
float GetMass() const { return xe8_mass; }
void SetMass(float mass);
@ -145,10 +145,10 @@ public:
static float GetGravityConstant() { return skGravityConstant; }
private:
f32 xe8_mass;
f32 xec_massRecip;
f32 xf0_inertiaTensor;
f32 xf4_inertiaTensorRecip;
float xe8_mass;
float xec_massRecip;
float xf0_inertiaTensor;
float xf4_inertiaTensorRecip;
bool xf8_24_movable : 1;
bool xf8_25_angularEnabled : 1;
bool xf9_standardCollider;
@ -169,11 +169,11 @@ private:
CVector3f x1e8_primitiveOffset;
CMotionState x1f4_lastNonCollidingState;
rstl::optional_object< CVector3f > x228_lastFloorPlaneNormal;
f32 x238_maximumCollisionVelocity;
f32 x23c_stepUpHeight;
f32 x240_stepDownHeight;
f32 x244_restitutionCoefModifier;
f32 x248_collisionAccuracyModifier;
float x238_maximumCollisionVelocity;
float x23c_stepUpHeight;
float x240_stepDownHeight;
float x244_restitutionCoefModifier;
float x248_collisionAccuracyModifier;
uint x24c_numTicksStuck;
uint x250_numTicksPartialUpdate;
uint x254_;

View File

@ -14,8 +14,8 @@ class CRainSplashGenerator {
float x8_yEnd;
float xc_speed;
float x10_zParabolaHeight;
u8 x14_;
u8 x15_length;
uchar x14_;
uchar x15_length;
bool x16_active : 1;
SSplashLine();
void Update(float dt, CStateManager& mgr);
@ -43,7 +43,7 @@ private:
rstl::vector< SRainSplash > x0_rainSplashes;
CRandom16 x10_random;
CVector3f x14_scale;
u8 x0_pad[0x2c];
uchar x0_pad[0x2c];
};
CHECK_SIZEOF(CRainSplashGenerator, 0x4c)

View File

@ -9,9 +9,9 @@ class CRipple;
class CRippleManager {
private:
f32 x0_maxTimeFalloff;
float x0_maxTimeFalloff;
rstl::vector< CRipple > x4_ripples;
f32 x14_alpha;
float x14_alpha;
};
#endif // _CRIPPLEMANAGER

View File

@ -13,14 +13,14 @@ namespace SL {
struct SNode {
CActor* x0_actor;
CAABox x4_box;
s16 x1c_selfIdxs[6];
s16 x28_next;
short x1c_selfIdxs[6];
short x28_next;
bool x2a_populated;
};
CHECK_SIZEOF(SNode, 0x2c);
struct SSortedList {
s16 x0_ids[kMaxObjects];
short x0_ids[kMaxObjects];
uint x800_size;
};
CHECK_SIZEOF(SSortedList, 0x804);

View File

@ -114,7 +114,7 @@ public:
bool RayCollideWorld(const CVector3f& start, const CVector3f& end, const TEntityList& nearList,
const CMaterialFilter& filter, const CActor* damagee) const;
CRayCastResult RayWorldIntersection(TUniqueId& idOut, const CVector3f& pos, const CVector3f& dir,
f32 length, const CMaterialFilter& filter,
float length, const CMaterialFilter& filter,
const TEntityList& list) const;
void BuildColliderList(TEntityList& out, const CActor& actor, const CAABox& aabb) const;
@ -159,8 +159,8 @@ public:
return xb84_camFilterPasses[size_t(stage)];
}
f32 GetThermalColdScale1() const { return xf24_thermColdScale1; }
f32 GetThermalColdScale2() const { return xf28_thermColdScale2; }
float GetThermalColdScale1() const { return xf24_thermColdScale1; }
float GetThermalColdScale2() const { return xf28_thermColdScale2; }
bool IsGeneratingObject() const { return xf94_26_generatingObject; }
void SetIsGeneratingObject(bool gen) { xf94_26_generatingObject = gen; }
@ -190,7 +190,7 @@ public:
return xf90_deferredTransition == kSMT_MessageScreen;
}
void SetEnergyBarActorInfo(TUniqueId bossId, float maxEnergy, u32 stringIdx);
void SetEnergyBarActorInfo(TUniqueId bossId, float maxEnergy, uint stringIdx);
void SetPendingOnScreenTex(CAssetId texId, const CVector2i& origin, const CVector2i& extent); /* {
xef4_pendingScreenTex.x0_id = texId;
xef4_pendingScreenTex.x4_origin = origin;
@ -205,11 +205,11 @@ public:
void SetInSaveUI(bool b) { xf94_28_inSaveUI = b; }
bool GetInSaveUI() const { return xf94_28_inSaveUI; }
void SetIsFullThreat(bool v) { xf94_30_fullThreat = v; }
u32 GetInputFrameIdx() const { return x8d4_inputFrameIdx; }
uint GetInputFrameIdx() const { return x8d4_inputFrameIdx; }
private:
u16 x0_nextFreeIndex;
rstl::reserved_vector< u16, 1024 > x8_objectIndexArray;
ushort x0_nextFreeIndex;
rstl::reserved_vector< ushort, 1024 > x8_objectIndexArray;
rstl::reserved_vector< rstl::auto_ptr< CObjectList >, 8 > x808_objectLists;
CPlayer* x84c_player;
rstl::single_ptr< CWorld > x850_world;
@ -226,7 +226,7 @@ private:
// TODO
// rstl::multimap< TEditorId, TUniqueId > x890_scriptIdMap;
// rstl::map< TEditorId, SScriptObjectStream > x8a4_loadedScriptObjects;
u8 pad[0x28];
uchar pad[0x28];
rstl::rc_ptr< CPlayerState > x8b8_playerState;
rstl::rc_ptr< CScriptMailbox > x8bc_mailbox;
rstl::rc_ptr< CMapWorldInfo > x8c0_mapWorldInfo;
@ -235,9 +235,9 @@ private:
TAreaId x8cc_nextAreaId;
TAreaId x8d0_prevAreaId;
u32 x8d4_inputFrameIdx;
u32 x8d8_updateFrameIdx;
u32 x8dc_objectDrawToken;
uint x8d4_inputFrameIdx;
uint x8d8_updateFrameIdx;
uint x8dc_objectDrawToken;
rstl::vector< CLight > x8e0_dynamicLights;
@ -245,7 +245,7 @@ private:
CRandom16 x8fc_random;
CRandom16* x900_random;
u8 x904_pad[0x280];
uchar x904_pad[0x280];
rstl::reserved_vector< CCameraFilterPass, kCFS_Max > xb84_camFilterPasses;
rstl::reserved_vector< CCameraBlurPass, kCFS_Max > xd14_camBlurPasses;
@ -253,14 +253,14 @@ private:
uint xef0_hintPeriods;
SOnScreenTex xef4_pendingScreenTex;
CAssetId xf08_pauseHudMessage;
f32 xf0c_escapeTimer;
f32 xf10_escapeTotalTime;
f32 xf14_curTimeMod900;
float xf0c_escapeTimer;
float xf10_escapeTotalTime;
float xf14_curTimeMod900;
TUniqueId xf18_bossId;
f32 xf1c_totalBossEnergy;
float xf1c_totalBossEnergy;
uint xf20_bossStringIdx;
f32 xf24_thermColdScale1;
f32 xf28_thermColdScale2;
float xf24_thermColdScale1;
float xf28_thermColdScale2;
CVector2f xf2c_viewportScale;
EThermalDrawFlag xf34_thermalFlag;
TUniqueId xf38_skipCineSpecialFunc;
@ -270,12 +270,12 @@ private:
rstl::single_ptr< CMazeState > xf70_currentMaze;
TUniqueId xf74_lastTrigger;
TUniqueId xf76_lastRelay;
f32 xf78_hudMessageTime;
float xf78_hudMessageTime;
unkptr xf7c_projectedShadow;
uint xf80_hudMessageFrameCount;
CAssetId xf84_;
CAssetId xf88_;
f32 xf8c_;
float xf8c_;
EStateManagerTransition xf90_deferredTransition;
bool xf94_24_readyToRender : 1;
bool xf94_25_quitGame : 1;

View File

@ -62,7 +62,7 @@ public:
const CGameArea* GetArea(TAreaId id) const { return x18_areas[id.Value()].get(); }
bool IsAreaValid(TAreaId id) const { return x18_areas[id.Value()]->IsLoaded(); }
CAssetId GetWorldAssetId() const { return x8_mlvlId; }
TAreaId GetAreaIdForSaveId(s32 saveId) const;
TAreaId GetAreaIdForSaveId(int saveId) const;
private:
enum Phase {
@ -83,7 +83,7 @@ private:
CMapWorld* x28_mapWorld;
rstl::vector< CRelay > x2c_relays;
rstl::rc_ptr< IDvdRequest > x3c_loadToken;
rstl::single_ptr< u8 > x40_loadBuf;
rstl::single_ptr< uchar > x40_loadBuf;
uint x44_bufSz;
uint x48_chainCount;
CGameArea* x4c_chainHeads[5];

View File

@ -18,7 +18,7 @@ class CWorldShadow {
CVector3f x68_objPos;
CVector3f x74_lightPos;
TAreaId x80_aid;
s32 x84_lightIdx;
int x84_lightIdx;
bool x88_blurReset;
public:

View File

@ -10,23 +10,23 @@
class CCameraSpring {
public:
CCameraSpring(f32 k, f32 max, f32 tardis)
CCameraSpring(float k, float max, float tardis)
: x0_k(k), x4_k2Sqrt(CMath::SqrtF(k) * 2.f), x8_max(max), xc_tardis(tardis), x10_dx(0.f) {}
void Reset();
f32 ApplyDistanceSpringNoMax(f32 targetX, f32 curX, f32 dt);
f32 ApplyDistanceSpring(f32 targetX, f32 curX, f32 dt);
float ApplyDistanceSpringNoMax(float targetX, float curX, float dt);
float ApplyDistanceSpring(float targetX, float curX, float dt);
private:
f32 x0_k;
f32 x4_k2Sqrt;
f32 x8_max;
f32 xc_tardis;
f32 x10_dx;
float x0_k;
float x4_k2Sqrt;
float x8_max;
float xc_tardis;
float x10_dx;
};
class CCameraCollider {
public:
CCameraCollider(f32 radius, CVector3f vec, const CCameraSpring& spring, f32 scale)
CCameraCollider(float radius, CVector3f vec, const CCameraSpring& spring, float scale)
: x4_radius(radius)
, x8_lastLocalPos(vec)
, x14_localPos(vec)
@ -37,7 +37,7 @@ public:
, x50_scale(scale) {}
virtual ~CCameraCollider() {}
f32 GetRadius() const { return x4_radius; }
float GetRadius() const { return x4_radius; }
// TODO
const CVector3f& GetRealPosition() const { return x2c_lastWorldPos; }
const CVector3f& GetDesiredPosition() const { return x14_localPos; }
@ -45,9 +45,9 @@ public:
const CVector3f& GetLineOfSight() const;
const CVector3f& GetPosition() const { return x8_lastLocalPos; }
int GetOcclusionCount() const { return x4c_occlusionCount; }
f32 GetScale() const { return x50_scale; }
float GetScale() const { return x50_scale; }
void SetRadius(f32 radius) { this->x4_radius = radius; }
void SetRadius(float radius) { this->x4_radius = radius; }
// TODO
void SetPosition(CVector3f vec) { x8_lastLocalPos = vec; }
void SetRealPosition(CVector3f vec) { x2c_lastWorldPos = vec; }
@ -55,17 +55,17 @@ public:
void SetLookAtPosition(CVector3f vec) { x20_scaledWorldPos = vec; }
void SetLineOfSight();
void SetOcclusionCount(int val) { x4c_occlusionCount = val; }
void SetScale(f32 val) { x50_scale = val; }
void SetScale(float val) { x50_scale = val; }
private:
f32 x4_radius;
float x4_radius;
CVector3f x8_lastLocalPos; // position
CVector3f x14_localPos; // desired position
CVector3f x20_scaledWorldPos; // look at position
CVector3f x2c_lastWorldPos; // real position
CCameraSpring x38_spring;
int x4c_occlusionCount;
f32 x50_scale;
float x50_scale;
};
class CBallCamera : public CGameCamera {
@ -95,13 +95,13 @@ public:
kBSS_Arc,
};
CBallCamera(TUniqueId uid, TUniqueId watchedId, const CTransform4f& xf, f32 fovY, f32 nearZ,
f32 farZ, f32 aspect);
CBallCamera(TUniqueId uid, TUniqueId watchedId, const CTransform4f& xf, float fovY, float nearZ,
float farZ, float aspect);
// CEntity
~CBallCamera() override;
void Accept(IVisitor& visitor) override;
void Think(f32 dt, CStateManager& mgr) override;
void Think(float dt, CStateManager& mgr) override;
void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr) override;
// CActor
@ -112,19 +112,19 @@ public:
void Reset(const CTransform4f&, CStateManager& mgr) override;
// CBallCamera
void SetupColliders(rstl::vector< CCameraCollider >& out, f32 xMag, f32 zMag, f32 radius,
int count, f32 k, f32 max, f32 startAngle);
void SetupColliders(rstl::vector< CCameraCollider >& out, float xMag, float zMag, float radius,
int count, float k, float max, float startAngle);
void TeleportColliders(rstl::vector< CCameraCollider >& colliderList, CVector3f pos);
void TeleportCamera(const CVector3f& pos, CStateManager& mgr);
void TeleportCamera(const CTransform4f& xf, CStateManager& mgr);
void ResetPosition(CStateManager& mgr);
void ResetToTweaks(CStateManager& mgr);
CVector3f FindDesiredPosition(f32 distance, f32 elevation, CVector3f dir, CStateManager& mgr,
CVector3f FindDesiredPosition(float distance, float elevation, CVector3f dir, CStateManager& mgr,
bool fullTest);
void UpdateCollidersDistances(rstl::vector< CCameraCollider >& colliderList, f32 xMag, f32 zMag,
f32 angOffset);
void UpdateCollidersDistances(rstl::vector< CCameraCollider >& colliderList, float xMag,
float zMag, float angOffset);
void UpdateColliders(const CTransform4f& xf, rstl::vector< CCameraCollider >& colliderList,
int& idx, int count, float tolerance, const TEntityList& nearList, f32 dt,
int& idx, int count, float tolerance, const TEntityList& nearList, float dt,
CStateManager& mgr);
CVector3f CalculateCollidersCentroid(const rstl::vector< CCameraCollider >& colliderList,
int numObscured) const;
@ -132,30 +132,30 @@ public:
int CountObscuredColliders(const rstl::vector< CCameraCollider >& colliderList) const;
CAABox CalculateCollidersBoundingBox(const rstl::vector< CCameraCollider >& colliderList,
const CStateManager&) const;
CVector3f AvoidGeometryFull(const CTransform4f& xf, const TEntityList& nearList, f32 dt,
CVector3f AvoidGeometryFull(const CTransform4f& xf, const TEntityList& nearList, float dt,
CStateManager& mgr);
CVector3f AvoidGeometry(const CTransform4f& xf, const TEntityList& nearList, f32 dt,
CVector3f AvoidGeometry(const CTransform4f& xf, const TEntityList& nearList, float dt,
CStateManager& mgr);
bool DetectCollision(const CVector3f& from, const CVector3f& to, f32 radius, f32& d,
bool DetectCollision(const CVector3f& from, const CVector3f& to, float radius, float& d,
CStateManager& mgr);
const CVector3f& GetLookAtPosition() const { return x1d8_lookPos; }
f32 GetDistance() const { return x190_curMinDistance; }
f32 GetElevation() const { return x1a0_elevation; }
float GetDistance() const { return x190_curMinDistance; }
float GetElevation() const { return x1a0_elevation; }
void SetBehaviourType(EBallCameraBehaviour type) { x188_behaviour = type; }
void SetAllowChaseCamera(bool v) { x18c_25_chaseAllowed = v; }
void SetAllowBoostCamera(bool v) { x18c_26_boostAllowed = v; }
// void SetLineOfSightCheck(bool v);
void SetGeometryAvoidance(bool v) { x18c_27_obscureAvoidance = true; }
void SetMinDistance(f32 v) { x194_targetMinDistance = v; }
void SetMaxDistance(f32 v) { x198_maxDistance = v; }
void SetBackwardsDistance(f32 v) { x19c_backwardsDistance = v; }
void SetMinDistance(float v) { x194_targetMinDistance = v; }
void SetMaxDistance(float v) { x198_maxDistance = v; }
void SetBackwardsDistance(float v) { x19c_backwardsDistance = v; }
void SetDistanceSpring(const CCameraSpring& spring) { x214_ballCameraSpring = spring; }
void SetCentroidDistanceSpring(const CCameraSpring& spring) {
x250_ballCameraCentroidDistanceSpring = spring;
}
void SetElevation(f32 v) { x1a0_elevation = v; }
void SetElevation(float v) { x1a0_elevation = v; }
void SetLookAtOffset(CVector3f vec) { x1b4_lookAtOffset = vec; }
void SetChaseLookAtOffset(CVector3f vec) { x410_chaseLookAtOffset = vec; }
void SetWorldOffset(CVector3f vec); // TODO
@ -198,15 +198,15 @@ private:
bool x18e_26_ : 1;
bool x18e_27_nearbyDoorClosed : 1;
bool x18e_28_nearbyDoorClosing : 1;
f32 x190_curMinDistance;
f32 x194_targetMinDistance;
f32 x198_maxDistance;
f32 x19c_backwardsDistance;
f32 x1a0_elevation;
f32 x1a4_curAnglePerSecond;
f32 x1a8_targetAnglePerSecond;
f32 x1ac_attitudeRange;
f32 x1b0_azimuthRange;
float x190_curMinDistance;
float x194_targetMinDistance;
float x198_maxDistance;
float x19c_backwardsDistance;
float x1a0_elevation;
float x1a4_curAnglePerSecond;
float x1a8_targetAnglePerSecond;
float x1ac_attitudeRange;
float x1b0_azimuthRange;
CVector3f x1b4_lookAtOffset;
CVector3f x1c0_lookPosAhead;
CVector3f x1cc_fixedLookPos;
@ -230,57 +230,57 @@ private:
int x2d4_mediumColliderIt;
int x2d8_largeColliderIt;
CVector3f x2dc_prevBallPos;
f32 x2e8_ballVelFlat;
f32 x2ec_maxBallVel;
float x2e8_ballVelFlat;
float x2ec_maxBallVel;
CVector3f x2f0_ballDelta;
CVector3f x2fc_ballDeltaFlat;
f32 x308_speedFactor;
f32 x30c_speedingTime;
float x308_speedFactor;
float x30c_speedingTime;
CVector3f x310_idealLookVec;
CVector3f x31c_predictedLookPos;
int x328_avoidGeomCycle;
f32 x32c_colliderMag;
f32 x330_clearColliderThreshold;
float x32c_colliderMag;
float x330_clearColliderThreshold;
CAABox x334_collidersAABB;
f32 x34c_obscuredTime;
float x34c_obscuredTime;
CMaterialList x350_obscuringMaterial;
f32 x358_unobscureMag;
float x358_unobscureMag;
CVector3f x35c_splineIntermediatePos;
TUniqueId x368_obscuringObjectId;
ESplineState x36c_splineState;
bool x370_24_reevalSplineEnd : 1;
f32 x374_splineCtrl;
f32 x378_splineCtrlRange;
float x374_splineCtrl;
float x378_splineCtrlRange;
CCameraSpline x37c_camSpline;
CMaterialList x3c8_collisionExcludeList;
bool x3d0_24_camBehindFloorOrWall : 1;
f32 x3d4_elevInterpTimer;
f32 x3d8_elevInterpStart;
float x3d4_elevInterpTimer;
float x3d8_elevInterpStart;
TUniqueId x3dc_tooCloseActorId;
f32 x3e0_tooCloseActorDist;
float x3e0_tooCloseActorDist;
bool x3e4_pendingFailsafe;
f32 x3e8_;
f32 x3ec_;
f32 x3f0_;
f32 x3f4_;
f32 x3f8_;
f32 x3fc_;
float x3e8_;
float x3ec_;
float x3f0_;
float x3f4_;
float x3f8_;
float x3fc_;
EBallCameraState x400_state;
f32 x404_chaseElevation;
f32 x408_chaseDistance;
f32 x40c_chaseAnglePerSecond;
float x404_chaseElevation;
float x408_chaseDistance;
float x40c_chaseAnglePerSecond;
CVector3f x410_chaseLookAtOffset;
CCameraSpring x41c_ballCameraChaseSpring;
f32 x430_boostElevation;
f32 x434_boostDistance;
f32 x438_boostAnglePerSecond;
float x430_boostElevation;
float x434_boostDistance;
float x438_boostAnglePerSecond;
CVector3f x43c_boostLookAtOffset;
CCameraSpring x448_ballCameraBoostSpring;
CVector3f x45c_overrideBallToCam;
f32 x468_conservativeDoorCamDistance;
float x468_conservativeDoorCamDistance;
TUniqueId x46c_collisionActorId;
f32 x470_clampVelTimer;
f32 x474_clampVelRange;
float x470_clampVelTimer;
float x474_clampVelRange;
uint x478_shortMoveCount;
rstl::single_ptr< SFailsafeState > x47c_failsafeState;
rstl::single_ptr< SUnknown > x480_;

View File

@ -22,7 +22,7 @@ public:
kBT_XRay,
};
static void DrawWideScreen(const CColor& color, const CTexture* tex, f32 v);
static void DrawWideScreen(const CColor& color, const CTexture* tex, float v);
private:
rstl::optional_object< TLockedToken< CTexture > > x0_paletteTex;

View File

@ -42,7 +42,7 @@ public:
CAssetId txtr);
void DisableFilter(float time);
static void DrawWideScreen(const CColor& color, const CTexture* tex, f32 v);
static void DrawWideScreen(const CColor& color, const CTexture* tex, float v);
private:
EFilterType x0_curType;

View File

@ -30,7 +30,7 @@ public:
void SetFogDensity(float fogDensityTarget, float fogDensitySpeed);
bool IsInCinematicCamera() const;
static f32 DefaultThirdPersonFov();
static float DefaultThirdPersonFov();
private:
TUniqueId x0_curCameraId;
@ -45,11 +45,11 @@ private:
CBallCamera* x80_ballCamera;
int x84_rumbleId;
CInterpolationCamera* x88_interpCamera;
s16 x8c_;
f32 x90_rumbleCooldown;
f32 x94_fogDensityFactor;
f32 x98_fogDensitySpeed;
f32 x9c_fogDensityFactorTarget;
short x8c_;
float x90_rumbleCooldown;
float x94_fogDensityFactor;
float x98_fogDensitySpeed;
float x9c_fogDensityFactorTarget;
bool xa0_24_pendingRumble : 1;
bool xa0_25_rumbling : 1;
bool xa0_26_inWater : 1;
@ -62,7 +62,7 @@ private:
rstl::reserved_vector< TUniqueId, 64 > x334_activeCameraHints;
bool x3b8_24_ : 1;
bool x3b8_25_ : 1;
f32 x3bc_curFov;
float x3bc_curFov;
};
CHECK_SIZEOF(CCameraManager, 0x3c0)

View File

@ -7,11 +7,11 @@
struct SCameraShakePoint {
bool x0_useEnvelope;
f32 x4_value;
f32 x8_magnitude;
f32 xc_attackTime;
f32 x10_sustainTime;
f32 x14_duration;
float x4_value;
float x8_magnitude;
float xc_attackTime;
float x10_sustainTime;
float x14_duration;
};
CHECK_SIZEOF(SCameraShakePoint, 0x18)
@ -23,21 +23,21 @@ private:
bool x4_useModulation;
SCameraShakePoint x8_am;
SCameraShakePoint x20_fm;
f32 x38_value;
float x38_value;
};
CHECK_SIZEOF(CCameraShakerComponent, 0x3c)
class CCameraShakeData {
private:
f32 x0_duration;
f32 x4_curTime;
float x0_duration;
float x4_curTime;
CCameraShakerComponent x8_shakerX;
CCameraShakerComponent x44_shakerY;
CCameraShakerComponent x80_shakerZ;
uint xbc_shakerId;
uint xc0_flags;
CVector3f xc4_sfxPos;
f32 xd0_sfxDist;
float xd0_sfxDist;
};
CHECK_SIZEOF(CCameraShakeData, 0xd4)

View File

@ -19,9 +19,9 @@ public:
private:
rstl::vector< CVector3f > x4_positions;
rstl::vector< TUniqueId > x14_wpTracker;
rstl::vector< f32 > x24_t;
rstl::vector< float > x24_t;
rstl::vector< CVector3f > x34_directions;
f32 x44_length;
float x44_length;
bool x48_closedLoop;
};
CHECK_SIZEOF(CCameraSpline, 0x4c)

View File

@ -27,26 +27,26 @@ public:
virtual void Reset(const CTransform4f&, CStateManager& mgr) = 0;
TUniqueId GetWatchedObject() const { return xe8_watchedObject; }
f32 GetFov() const { return x15c_currentFov; }
void SetFov(f32 fov) { x15c_currentFov = fov; }
void SetFovInterpolation(f32 start, f32 fov, f32 time, f32 delayTime);
float GetFov() const { return x15c_currentFov; }
void SetFov(float fov) { x15c_currentFov = fov; }
void SetFovInterpolation(float start, float fov, float time, float delayTime);
private:
TUniqueId xe8_watchedObject;
mutable CMatrix4f xec_perspectiveMatrix;
CTransform4f x12c_origXf;
f32 x15c_currentFov;
f32 x160_znear;
f32 x164_zfar;
f32 x168_aspect;
float x15c_currentFov;
float x160_znear;
float x164_zfar;
float x168_aspect;
uint x16c_controllerIdx;
mutable bool x170_24_perspDirty : 1;
bool x170_25_disablesInput : 1;
f32 x174_delayTime;
f32 x178_perspInterpRemTime;
f32 x17c_perspInterpDur;
f32 x180_perspInterpStartFov;
f32 x184_perspInterpEndFov;
float x174_delayTime;
float x178_perspInterpRemTime;
float x17c_perspInterpDur;
float x180_perspInterpStartFov;
float x184_perspInterpEndFov;
};
CHECK_SIZEOF(CGameCamera, 0x188)

View File

@ -9,7 +9,7 @@ public:
~CAiFuncMap();
private:
u8 pad[0x20];
uchar pad[0x20];
};
#endif // _CAIFUNCMAP

View File

@ -9,7 +9,7 @@ public:
~CCharacterFactoryBuilder();
private:
u8 pad[0x24];
uchar pad[0x24];
};
extern CCharacterFactoryBuilder* gpCharacterFactoryBuilder;

View File

@ -28,7 +28,7 @@ public:
CHintOptions& HintOptions() { return x1f8_hintOptions; }
uint& SaveIdx() { return x20c_saveIdx; }
u64& CardSerial() { return x210_cardSerial; }
rstl::vector< u8 >& BackupBuf() { return x218_backupBuf; }
rstl::vector< uchar >& BackupBuf() { return x218_backupBuf; }
private:
rstl::reserved_vector< bool, 128 > x0_;
@ -36,13 +36,13 @@ private:
rstl::vector< CWorldState > x88_worldStates;
rstl::rc_ptr< CPlayerState > x98_playerState;
rstl::rc_ptr< CWorldTransManager > x9c_transManager;
f64 xa0_playTime;
double xa0_playTime;
CSystemOptions xa8_systemOptions;
CGameOptions x17c_gameOptions;
CHintOptions x1f8_hintOptions;
uint x20c_saveIdx;
u64 x210_cardSerial;
rstl::vector< u8 > x218_backupBuf;
rstl::vector< uchar > x218_backupBuf;
bool x228_24_hardMode : 1;
bool x228_25_initPowerupsAtFirstSpawn : 1;
};

View File

@ -21,8 +21,8 @@ public:
bool IsSuitLoading() const { return x3b2_29_suitLoading; }
private:
u8 x0_pad[0x3b0];
s16 x3b0_rumbleHandle;
uchar x0_pad[0x3b0];
short x3b0_rumbleHandle;
bool x3b2_24_active : 1;
bool x3b2_25_beamActive : 1;
bool x3b2_26_grappleHit : 1;

Some files were not shown because too many files have changed in this diff Show More