mirror of
https://github.com/PrimeDecomp/prime.git
synced 2025-12-08 15:04:54 +00:00
Migrate s32->int, u32->uint; fix dolphin/types.h
This commit is contained in:
@@ -19,44 +19,44 @@ public:
|
||||
enum EType { kTP_Unk0 };
|
||||
|
||||
struct SMetrics {
|
||||
u32 x0_heapSize;
|
||||
u32 x4_;
|
||||
u32 x8_;
|
||||
u32 xc_;
|
||||
u32 x10_;
|
||||
u32 x14_heapSize2; // Remaining heap size?
|
||||
u32 x18_;
|
||||
u32 x1c_;
|
||||
u32 x20_;
|
||||
u32 x24_;
|
||||
u32 x28_;
|
||||
u32 x2c_smallNumAllocs;
|
||||
u32 x30_smallAllocatedSize;
|
||||
u32 x34_smallRemainingSize;
|
||||
u32 x38_mediumNumAllocs;
|
||||
u32 x3c_mediumAllocatedSize;
|
||||
u32 x40_mediumBlocksAvailable;
|
||||
u32 x44_;
|
||||
u32 x48_;
|
||||
u32 x4c_;
|
||||
u32 x50_mediumTotalAllocated;
|
||||
u32 x54_fakeStatics;
|
||||
SMetrics(u32 heapSize, u32 unk1, u32 unk2, u32 unk3, u32 unk4, u32 heapSize2, u32 unk5, u32 unk6, u32 unk7, u32 unk8, u32 unk9,
|
||||
u32 smallAllocNumAllocs, u32 smallAllocAllocatedSize, u32 smallAllocRemainingSize, u32 mediumAllocNumAllocs,
|
||||
u32 mediumAllocAllocatedSize, u32 mediumAllocBlocksAvailable, u32 unk10, u32 unk11, u32 unk12, u32 mediumAllocTotalAllocated,
|
||||
u32 fakeStatics);
|
||||
uint x0_heapSize;
|
||||
uint x4_;
|
||||
uint x8_;
|
||||
uint xc_;
|
||||
uint x10_;
|
||||
uint x14_heapSize2; // Remaining heap size?
|
||||
uint x18_;
|
||||
uint x1c_;
|
||||
uint x20_;
|
||||
uint x24_;
|
||||
uint x28_;
|
||||
uint x2c_smallNumAllocs;
|
||||
uint x30_smallAllocatedSize;
|
||||
uint x34_smallRemainingSize;
|
||||
uint x38_mediumNumAllocs;
|
||||
uint x3c_mediumAllocatedSize;
|
||||
uint x40_mediumBlocksAvailable;
|
||||
uint x44_;
|
||||
uint x48_;
|
||||
uint x4c_;
|
||||
uint x50_mediumTotalAllocated;
|
||||
uint x54_fakeStatics;
|
||||
SMetrics(uint heapSize, uint unk1, uint unk2, uint unk3, uint unk4, uint heapSize2, uint unk5, uint unk6, uint unk7, uint unk8, uint unk9,
|
||||
uint smallAllocNumAllocs, uint smallAllocAllocatedSize, uint smallAllocRemainingSize, uint mediumAllocNumAllocs,
|
||||
uint mediumAllocAllocatedSize, uint mediumAllocBlocksAvailable, uint unk10, uint unk11, uint unk12, uint mediumAllocTotalAllocated,
|
||||
uint fakeStatics);
|
||||
};
|
||||
|
||||
struct SAllocInfo {
|
||||
void* x0_infoPtr;
|
||||
u32 x4_len;
|
||||
uint x4_len;
|
||||
bool x8_hasPrevious;
|
||||
bool x9_;
|
||||
const char* xc_fileAndLne;
|
||||
const char* x10_type;
|
||||
};
|
||||
|
||||
typedef const bool (*FOutOfMemoryCb)(void*, u32);
|
||||
typedef const bool (*FOutOfMemoryCb)(void*, uint);
|
||||
typedef const bool (*FEnumAllocationsCb)(const SAllocInfo& info, const void* ptr);
|
||||
virtual ~IAllocator();
|
||||
|
||||
@@ -71,7 +71,7 @@ public:
|
||||
virtual void SetOutOfMemoryCallback(FOutOfMemoryCb cb, const void* data) = 0;
|
||||
virtual void EnumAllocations(FEnumAllocationsCb func, const void* ptr, bool b) const = 0;
|
||||
virtual SAllocInfo GetAllocInfo(const void* ptr) const = 0;
|
||||
virtual void OffsetFakeStatics(s32 offset) = 0;
|
||||
virtual void OffsetFakeStatics(int offset) = 0;
|
||||
virtual SMetrics GetMetrics() const = 0;
|
||||
};
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
class CSfxHandle {
|
||||
public:
|
||||
CSfxHandle() : value(0) {}
|
||||
CSfxHandle(u32 value) : value(value) {}
|
||||
CSfxHandle(uint value) : value(value) {}
|
||||
|
||||
// GetIndex__10CSfxHandleCFv
|
||||
// NullHandle__10CSfxHandleFv
|
||||
@@ -16,7 +16,7 @@ public:
|
||||
operator bool() const { return value != 0; }
|
||||
|
||||
private:
|
||||
u32 value;
|
||||
uint value;
|
||||
};
|
||||
CHECK_SIZEOF(CSfxHandle, 0x4)
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
class CCRC32 {
|
||||
public:
|
||||
static u32 Calculate(const void* data, u32 length);
|
||||
static uint Calculate(const void* data, uint length);
|
||||
};
|
||||
|
||||
#endif // __CCRC32_HPP__
|
||||
|
||||
@@ -26,13 +26,13 @@ private:
|
||||
int x2c_asyncLoadPhase; // EAsyncPhase
|
||||
rstl::auto_ptr< void > x30_dvdReq; // IDvdRequest
|
||||
rstl::vector< u8 > x38_headerData;
|
||||
u32 x48_resTableOffset;
|
||||
u32 x4c_resTableCount;
|
||||
s32 x50_aramBase;
|
||||
uint x48_resTableOffset;
|
||||
uint x4c_resTableCount;
|
||||
int x50_aramBase;
|
||||
rstl::vector< rstl::pair< rstl::string, SObjectTag > > x54_nameList;
|
||||
rstl::vector< CAssetId > x64_depList;
|
||||
rstl::vector< SResInfo > x74_resList;
|
||||
mutable s32 x84_currentSeek;
|
||||
mutable int x84_currentSeek;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -21,14 +21,14 @@ class CRandom16 {
|
||||
static void _SetRandomNumber(CRandom16* rnd);
|
||||
public:
|
||||
static CRandom16* GetRandomNumber();
|
||||
CRandom16(u32 seed = 99);
|
||||
void SetSeed(u32 seed);
|
||||
s32 Range(s32 min, s32 max);
|
||||
CRandom16(uint seed = 99);
|
||||
void SetSeed(uint seed);
|
||||
int Range(int min, int max);
|
||||
float Range(float min, float max);
|
||||
s32 Next();
|
||||
int Next();
|
||||
float Float();
|
||||
private:
|
||||
u32 mSeed;
|
||||
uint mSeed;
|
||||
};
|
||||
|
||||
#endif // __CRANDOM16_HPP__
|
||||
|
||||
@@ -12,20 +12,20 @@ class CResFactory {
|
||||
public:
|
||||
virtual ~CResFactory() {}
|
||||
|
||||
void AsyncIdle(u32 time);
|
||||
void AsyncIdle(uint time);
|
||||
|
||||
CResLoader& GetResLoader() { return x4_resLoader; }
|
||||
|
||||
private:
|
||||
CResLoader x4_resLoader;
|
||||
CFactoryMgr x5c_factoryMgr;
|
||||
u32 x94_;
|
||||
u32 x98_;
|
||||
u32 x9c_;
|
||||
u32 xa0_;
|
||||
u32 xa4_;
|
||||
u32 xa8_;
|
||||
u32 xac_;
|
||||
uint x94_;
|
||||
uint x98_;
|
||||
uint x9c_;
|
||||
uint xa0_;
|
||||
uint xa4_;
|
||||
uint xa8_;
|
||||
uint xac_;
|
||||
rstl::list< void > xb0_;
|
||||
};
|
||||
|
||||
|
||||
@@ -14,13 +14,13 @@ struct SResInfo {
|
||||
CAssetId x0_id;
|
||||
bool x4_compressed : 1;
|
||||
int x4_typeIdx; // CFactoryMgr::ETypeTable
|
||||
u32 x5_offsetDiv32 : 27;
|
||||
u32 x7_sizeDiv32 : 27;
|
||||
uint x5_offsetDiv32 : 27;
|
||||
uint x7_sizeDiv32 : 27;
|
||||
};
|
||||
|
||||
class CResLoader {
|
||||
public:
|
||||
s32 GetPakCount() const;
|
||||
int GetPakCount() const;
|
||||
CPakFile& GetPakFile(int idx) const;
|
||||
void AddPakFileAsync(const rstl::string&, bool, bool);
|
||||
void AsyncIdlePakLoading();
|
||||
|
||||
@@ -15,7 +15,7 @@ class CInputStream;
|
||||
class CColor {
|
||||
public:
|
||||
CColor() {}
|
||||
CColor(u32 col) : mRgba(col) {}
|
||||
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) {
|
||||
@@ -29,7 +29,7 @@ public:
|
||||
void Get(float& r, float& g, float& b, float& a) const;
|
||||
void Get(float& r, float& g, float& b) const;
|
||||
static CColor Lerp(const CColor& a, const CColor& b, float t);
|
||||
static u32 Lerp(u32 a, u32 b, float t);
|
||||
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); }
|
||||
@@ -41,7 +41,7 @@ public:
|
||||
u8 GetBlueu8() const { return mB; }
|
||||
u8 GetAlphau8() const { return mA; }
|
||||
u16 ToRGB5A3() const;
|
||||
GXColor ToGX(u32);
|
||||
GXColor ToGX(uint);
|
||||
|
||||
static const CColor& Black();
|
||||
static const CColor& White();
|
||||
@@ -61,7 +61,7 @@ private:
|
||||
u8 mB;
|
||||
u8 mA;
|
||||
};
|
||||
u32 mRgba;
|
||||
uint mRgba;
|
||||
};
|
||||
|
||||
static const CColor sBlackColor;
|
||||
|
||||
@@ -11,7 +11,7 @@ extern CVector3f sPlayerPosition;
|
||||
class CCubeMaterial {
|
||||
public:
|
||||
private:
|
||||
static void SetupBlendMode(u32 blendFactors, const CModelFlags& flags, bool alphaTest);
|
||||
static void SetupBlendMode(uint blendFactors, const CModelFlags& flags, bool alphaTest);
|
||||
|
||||
static CVector3f sViewingFrom;
|
||||
};
|
||||
|
||||
@@ -11,12 +11,12 @@
|
||||
class CGX {
|
||||
public:
|
||||
struct STevState {
|
||||
u32 x0_colorInArgs;
|
||||
u32 x4_alphaInArgs;
|
||||
u32 x8_colorOps;
|
||||
u32 xc_alphaOps;
|
||||
u32 x10_indFlags;
|
||||
u32 x14_tevOrderFlags;
|
||||
uint x0_colorInArgs;
|
||||
uint x4_alphaInArgs;
|
||||
uint x8_colorOps;
|
||||
uint xc_alphaOps;
|
||||
uint x10_indFlags;
|
||||
uint x14_tevOrderFlags;
|
||||
u8 x18_kColorSel;
|
||||
u8 x19_kAlphaSel;
|
||||
|
||||
@@ -24,7 +24,7 @@ public:
|
||||
};
|
||||
|
||||
struct STexState {
|
||||
u32 x0_coordGen;
|
||||
uint x0_coordGen;
|
||||
|
||||
STexState();
|
||||
};
|
||||
@@ -50,7 +50,7 @@ public:
|
||||
u16 x34_chanCtrls[2];
|
||||
GXColor x38_chanAmbColors[2];
|
||||
GXColor x40_chanMatColors[2];
|
||||
u32 x48_descList;
|
||||
uint x48_descList;
|
||||
union {
|
||||
u8 x4c_chanFlags;
|
||||
struct {
|
||||
@@ -71,7 +71,7 @@ public:
|
||||
GXColor x58_kColors[4];
|
||||
STevState x68_tevStates[16];
|
||||
STexState x228_texStates[8];
|
||||
u32 x248_alphaCompare;
|
||||
uint x248_alphaCompare;
|
||||
SFogParams x24c_fogParams;
|
||||
|
||||
SGXState();
|
||||
@@ -94,9 +94,9 @@ public:
|
||||
static void SetTevColorIn(GXTevStageID stageId, GXTevColorArg a, GXTevColorArg b, GXTevColorArg c, GXTevColorArg d);
|
||||
static void SetTevAlphaIn(GXTevStageID stageId, GXTevAlphaArg a, GXTevAlphaArg b, GXTevAlphaArg c, GXTevAlphaArg d);
|
||||
static void SetTevColorOp(GXTevStageID stageId, GXTevOp op, GXTevBias bias, GXTevScale scale, GXBool clamp, GXTevRegID outReg);
|
||||
static void SetTevColorOp_Compressed(GXTevStageID stageId, u32 flags);
|
||||
static void SetTevColorOp_Compressed(GXTevStageID stageId, uint flags);
|
||||
static void SetTevAlphaOp(GXTevStageID stageId, GXTevOp op, GXTevBias bias, GXTevScale scale, GXBool clamp, GXTevRegID outReg);
|
||||
static void SetTevAlphaOp_Compressed(GXTevStageID stageId, u32 flags);
|
||||
static void SetTevAlphaOp_Compressed(GXTevStageID stageId, uint flags);
|
||||
static void SetTevKColorSel(GXTevStageID stageId, GXTevKColorSel sel);
|
||||
static void SetTevKAlphaSel(GXTevStageID stageId, GXTevKAlphaSel sel);
|
||||
static void SetTevOrder(GXTevStageID stageId, GXTexCoordID texCoord, GXTexMapID texMap, GXChannelID color);
|
||||
@@ -112,11 +112,11 @@ public:
|
||||
static void SetFog(GXFogType type, f32 startZ, f32 endZ, f32 nearZ, f32 farZ, const GXColor& color);
|
||||
static void SetLineWidth(u8 width, GXTexOffset offset);
|
||||
static void SetIndTexMtxSTPointFive(GXIndTexMtxID id, s8 scaleExp);
|
||||
static void SetVtxDescv_Compressed(u32 flags);
|
||||
static void SetVtxDescv_Compressed(uint flags);
|
||||
static void SetVtxDesc(GXAttr attr, GXAttrType type); // name?
|
||||
static void ResetVtxDescv(); // name?
|
||||
static void SetVtxDescv(const GXVtxDescList* list);
|
||||
static void SetStandardDirectTev_Compressed(GXTevStageID stageId, u32 colorArgs, u32 alphaArgs, u32 colorOps, u32 alphaOps);
|
||||
static void SetStandardDirectTev_Compressed(GXTevStageID stageId, uint colorArgs, uint alphaArgs, uint colorOps, uint alphaOps);
|
||||
static void SetStandardTevColorAlphaOp(GXTevStageID stageId);
|
||||
|
||||
static void CallDisplayList(const void* ptr, size_t size);
|
||||
@@ -133,17 +133,17 @@ public:
|
||||
static void GetFog(GXFogType* fogType, f32* fogStartZ, f32* fogEndZ, f32* fogNearZ, f32* fogFarZ, GXColor* fogColor);
|
||||
|
||||
static inline bool CompareGXColors(const GXColor& lhs, const GXColor& rhs) {
|
||||
return *reinterpret_cast< const u32* >(&lhs) == *reinterpret_cast< const u32* >(&rhs);
|
||||
return *reinterpret_cast< const uint* >(&lhs) == *reinterpret_cast< const uint* >(&rhs);
|
||||
}
|
||||
static inline void CopyGXColor(GXColor& dst, const GXColor& src) {
|
||||
*reinterpret_cast< u32* >(&dst) = *reinterpret_cast< const u32* >(&src);
|
||||
*reinterpret_cast< uint* >(&dst) = *reinterpret_cast< const uint* >(&src);
|
||||
}
|
||||
static inline u32 MaskAndShiftLeft(u32 v, u32 m, u32 s) { return (v & m) << s; }
|
||||
static inline u32 ShiftRightAndMask(u32 v, u32 m, u32 s) { return (v >> s) & m; }
|
||||
static inline uint MaskAndShiftLeft(uint v, uint m, uint s) { return (v & m) << s; }
|
||||
static inline uint ShiftRightAndMask(uint v, uint m, uint s) { return (v >> s) & m; }
|
||||
|
||||
private:
|
||||
static void FlushState();
|
||||
static void update_fog(u32 flags);
|
||||
static void update_fog(uint flags);
|
||||
static void apply_fog() {
|
||||
static const GXColor black = {0, 0, 0, 0};
|
||||
GXSetFog(static_cast< GXFogType >(sGXState.x53_fogType), sGXState.x24c_fogParams.x0_fogStartZ, sGXState.x24c_fogParams.x4_fogEndZ,
|
||||
|
||||
@@ -8,7 +8,7 @@ public:
|
||||
~CGraphicsSys();
|
||||
|
||||
private:
|
||||
u32 pad;
|
||||
uint pad;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -26,15 +26,15 @@ public:
|
||||
: x0_blendMode(trans), x1_matSetIdx(0), x2_flags(kF_DepthCompare | kF_DepthUpdate), x4_color(rgba, rgba, rgba, rgba) {}
|
||||
CModelFlags(ETrans trans, CColor color)
|
||||
: x0_blendMode(trans), x1_matSetIdx(0), x2_flags(kF_DepthCompare | kF_DepthUpdate), x4_color(color) {}
|
||||
CModelFlags(const CModelFlags& flags, u32 otherFlags)
|
||||
CModelFlags(const CModelFlags& flags, uint otherFlags)
|
||||
: x0_blendMode(flags.x0_blendMode), x1_matSetIdx(flags.x1_matSetIdx), x2_flags(otherFlags), x4_color(flags.x4_color) {}
|
||||
CModelFlags(const CModelFlags& flags, bool b /* TODO what's this? */, s32 shaderSet)
|
||||
CModelFlags(const CModelFlags& flags, bool b /* TODO what's this? */, int shaderSet)
|
||||
: x0_blendMode(flags.x0_blendMode), x1_matSetIdx(shaderSet), x2_flags(flags.x2_flags), x4_color(flags.x4_color) {}
|
||||
|
||||
CModelFlags UseShaderSet(s32 matSet) { return CModelFlags(*this, false, matSet); }
|
||||
CModelFlags UseShaderSet(int matSet) { return CModelFlags(*this, false, matSet); }
|
||||
CModelFlags DontLoadTextures() { return CModelFlags(*this, GetOtherFlags() | kF_NoTextureLock); }
|
||||
CModelFlags DepthCompareUpdate(bool compare, bool update) {
|
||||
u32 flags = GetOtherFlags();
|
||||
uint flags = GetOtherFlags();
|
||||
if (compare) {
|
||||
flags |= kF_DepthCompare;
|
||||
} else {
|
||||
@@ -50,8 +50,8 @@ public:
|
||||
CModelFlags DepthBackwards() { return CModelFlags(*this, GetOtherFlags() | kF_DepthGreater); }
|
||||
|
||||
ETrans GetTrans() const { return static_cast< ETrans >(x0_blendMode); }
|
||||
s32 GetShaderSet() const { return x1_matSetIdx; }
|
||||
u32 GetOtherFlags() const { return x2_flags; }
|
||||
int GetShaderSet() const { return x1_matSetIdx; }
|
||||
uint GetOtherFlags() const { return x2_flags; }
|
||||
CColor GetColor() const { return x4_color; }
|
||||
|
||||
static CModelFlags Normal() { return CModelFlags(kT_Opaque, 1.f); }
|
||||
|
||||
@@ -87,7 +87,7 @@ public:
|
||||
|
||||
class CTevPass {
|
||||
public:
|
||||
u32 x0_id;
|
||||
uint x0_id;
|
||||
ColorPass x4_colorPass;
|
||||
AlphaPass x14_alphaPass;
|
||||
CTevOp x24_colorOp;
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
|
||||
#define kInvalidAssetId 0xFFFFFFFFu
|
||||
|
||||
typedef u32 CAssetId;
|
||||
typedef u32 FourCC;
|
||||
typedef uint CAssetId;
|
||||
typedef uint FourCC;
|
||||
|
||||
struct SObjectTag {
|
||||
FourCC type;
|
||||
|
||||
@@ -8,7 +8,7 @@ public:
|
||||
static f32 FastCosR(f32 v);
|
||||
static f32 FastSinR(f32 v);
|
||||
static inline f32 FastFmod(f32 x, f32 y) {
|
||||
s32 v = static_cast<s32>(x * (1.f / y));
|
||||
int v = static_cast<int>(x * (1.f / y));
|
||||
return x - v * y;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
class CVector2i {
|
||||
private:
|
||||
s32 x;
|
||||
s32 y;
|
||||
int x;
|
||||
int y;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -48,8 +48,8 @@ public:
|
||||
f32 operator[](EDimY) const { return mY; }
|
||||
f32 operator[](EDimZ) const { return mZ; }
|
||||
|
||||
f32& operator[](s32 i) { return *(&mX + i); }
|
||||
// f32 operator[](s32 i) const { return *(&mX + i); }
|
||||
f32& operator[](int i) { return *(&mX + i); }
|
||||
// f32 operator[](int i) const { return *(&mX + i); }
|
||||
bool IsNonZero() const { return mX != 0.f || mY != 0.f || mZ != 0.f; }
|
||||
|
||||
void DropZ() { mZ = 0.f; }
|
||||
|
||||
@@ -32,12 +32,12 @@ public:
|
||||
virtual float GetGeneratorRate() const { return 1.f; }
|
||||
virtual bool IsSystemDeletable() const = 0;
|
||||
virtual CAABox GetBounds() const = 0;
|
||||
virtual s32 GetParticleCOunt() const = 0;
|
||||
virtual int GetParticleCOunt() const = 0;
|
||||
virtual bool SystemHasLight() const = 0;
|
||||
virtual CLight GetLight() = 0;
|
||||
virtual void DestroyParticles() = 0;
|
||||
virtual void AddModifier(CWarp*) = 0;
|
||||
virtual u32 Get4CharId() const = 0;
|
||||
virtual uint Get4CharId() const = 0;
|
||||
};
|
||||
|
||||
#endif // _CPARTICLEGEN_HPP
|
||||
|
||||
@@ -11,19 +11,19 @@ inline T cinput_stream_helper(const TType< T >& type, CInputStream& in);
|
||||
|
||||
class CInputStream {
|
||||
public:
|
||||
CInputStream(s32 len);
|
||||
CInputStream(const void* ptr, s32 len, bool owned);
|
||||
CInputStream(int len);
|
||||
CInputStream(const void* ptr, int len, bool owned);
|
||||
virtual ~CInputStream();
|
||||
virtual u32 Read(void* dest, u32 len) = 0;
|
||||
virtual uint Read(void* dest, uint len) = 0;
|
||||
|
||||
f32 ReadFloat();
|
||||
u64 ReadLongLong();
|
||||
u32 ReadLong();
|
||||
uint ReadLong();
|
||||
u16 ReadShort();
|
||||
bool ReadBool();
|
||||
u8 ReadChar();
|
||||
u32 ReadBits(u32 len);
|
||||
u32 ReadBytes(void* dest, unsigned long len);
|
||||
uint ReadBits(uint len);
|
||||
uint ReadBytes(void* dest, unsigned long len);
|
||||
void Get(void* dest, unsigned long len);
|
||||
|
||||
template < typename T >
|
||||
@@ -35,26 +35,26 @@ private:
|
||||
bool GrabAnotherBlock();
|
||||
bool InternalReadNext();
|
||||
|
||||
u32 x4_blockOffset;
|
||||
u32 x8_blockLen;
|
||||
u32 xc_len;
|
||||
uint x4_blockOffset;
|
||||
uint x8_blockLen;
|
||||
uint xc_len;
|
||||
u8* x10_ptr;
|
||||
bool x14_owned;
|
||||
u32 x18_readPosition;
|
||||
u32 x1c_bitWord;
|
||||
u32 x20_bitOffset;
|
||||
uint x18_readPosition;
|
||||
uint x1c_bitWord;
|
||||
uint x20_bitOffset;
|
||||
};
|
||||
|
||||
template <>
|
||||
inline s32 cinput_stream_helper(const TType< s32 >& type, CInputStream& in) {
|
||||
inline int cinput_stream_helper(const TType< int >& type, CInputStream& in) {
|
||||
return in.ReadLong();
|
||||
}
|
||||
template <>
|
||||
inline u32 cinput_stream_helper(const TType< u32 >& type, CInputStream& in) {
|
||||
inline uint cinput_stream_helper(const TType< uint >& type, CInputStream& in) {
|
||||
return in.ReadLong();
|
||||
}
|
||||
template <>
|
||||
inline unsigned int cinput_stream_helper(const TType< unsigned int >& type, CInputStream& in) {
|
||||
inline unsigned long cinput_stream_helper(const TType< unsigned long >& type, CInputStream& in) {
|
||||
return in.ReadLong();
|
||||
}
|
||||
template <>
|
||||
|
||||
@@ -13,7 +13,7 @@ public:
|
||||
CMemoryInStream(const void* ptr, unsigned long len);
|
||||
CMemoryInStream(const void* ptr, unsigned long len, EOwnerShip ownership);
|
||||
virtual ~CMemoryInStream() override {}
|
||||
virtual u32 Read(void* dest, u32 len) override;
|
||||
virtual uint Read(void* dest, uint len) override;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -18,8 +18,8 @@ private:
|
||||
static u8 sAllocSpace[sizeof(T)];
|
||||
return &sAllocSpace;
|
||||
}
|
||||
static u32& ReferenceCount() {
|
||||
static u32 sReferenceCount = 0;
|
||||
static uint& ReferenceCount() {
|
||||
static uint sReferenceCount = 0;
|
||||
return sReferenceCount;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "rstl/optional_object.hpp"
|
||||
#include "rstl/reserved_vector.hpp"
|
||||
|
||||
template < typename T, s32 N >
|
||||
template < typename T, int N >
|
||||
class TReservedAverage : rstl::reserved_vector< T, N > {
|
||||
public:
|
||||
TReservedAverage(const T& value) {
|
||||
@@ -14,7 +14,7 @@ public:
|
||||
}
|
||||
void AddValue(const T& value) {
|
||||
push_back(value);
|
||||
for (s32 i = size() - 1; i > 0; --i) {
|
||||
for (int i = size() - 1; i > 0; --i) {
|
||||
operator[](i) = operator[](i - 1);
|
||||
}
|
||||
operator[](0) = value;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "Kyoto/Streams/CInputStream.hpp"
|
||||
|
||||
class CStringTable {
|
||||
s32 x0_stringCount;
|
||||
int x0_stringCount;
|
||||
rstl::single_ptr< u8 > x4_data;
|
||||
|
||||
public:
|
||||
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
virtual void AddParticleGen1();
|
||||
virtual void AddParticleGen2();
|
||||
virtual void AddPlaneObject();
|
||||
virtual void AddDrawable(const void* obj, const CVector3f& pos, const CAABox& bounds, s32 mode, IRenderer::EDrawableSorting sorting);
|
||||
virtual void AddDrawable(const void* obj, const CVector3f& pos, const CAABox& bounds, int mode, IRenderer::EDrawableSorting sorting);
|
||||
virtual void SetDrawableCallback();
|
||||
virtual void SetWorldViewpoint();
|
||||
virtual void SetPerspective1();
|
||||
|
||||
@@ -234,13 +234,13 @@ public:
|
||||
|
||||
SAdvancementDeltas UpdateAnimation(float dt, CStateManager& mgr, bool advTree);
|
||||
|
||||
void ProcessSoundEvent(s32 sfxId, f32 weight, s32 flags, f32 fallOff, f32 maxDist, u8 minVol, u8 maxVol, const CVector3f& toListener,
|
||||
const CVector3f& position, s32 aid, CStateManager& mgr, bool translateId);
|
||||
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 UpdateSfxEmitters();
|
||||
void RemoveEmitter();
|
||||
void SetModelData(const CModelData& modelData);
|
||||
f32 GetAverageAnimVelocity(s32 anim);
|
||||
f32 GetAverageAnimVelocity(int anim);
|
||||
void EnsureRendered(const CStateManager& mgr) const;
|
||||
void EnsureRendered(const CStateManager& mgr, const CVector3f& pos, const CAABox& bounds) const;
|
||||
void DrawTouchBounds() const;
|
||||
@@ -315,38 +315,38 @@ protected:
|
||||
CAABox x9c_renderBounds;
|
||||
CModelFlags xb4_drawFlags;
|
||||
f32 xbc_time;
|
||||
u32 xc0_pitchBend;
|
||||
uint xc0_pitchBend;
|
||||
TUniqueId xc4_fluidId;
|
||||
TUniqueId xc6_nextDrawNode;
|
||||
s32 xc8_drawnToken;
|
||||
s32 xcc_addedToken;
|
||||
int xc8_drawnToken;
|
||||
int xcc_addedToken;
|
||||
f32 xd0_damageMag;
|
||||
u8 xd4_maxVol;
|
||||
rstl::reserved_vector< CSfxHandle, 2 > xd8_nonLoopingSfxHandles;
|
||||
u32 xe4_24_nextNonLoopingSfxHandle : 3;
|
||||
u32 xe4_27_notInSortedLists : 1;
|
||||
u32 xe4_28_transformDirty : 1;
|
||||
u32 xe4_29_actorLightsDirty : 1;
|
||||
u32 xe4_30_outOfFrustum : 1;
|
||||
u32 xe4_31_calculateLighting : 1;
|
||||
u32 xe5_24_shadowEnabled : 1;
|
||||
u32 xe5_25_shadowDirty : 1;
|
||||
u32 xe5_26_muted : 1;
|
||||
u32 xe5_27_useInSortedLists : 1;
|
||||
u32 xe5_28_callTouch : 1;
|
||||
u32 xe5_29_globalTimeProvider : 1;
|
||||
u32 xe5_30_renderUnsorted : 1;
|
||||
u32 xe5_31_pointGeneratorParticles : 1;
|
||||
u32 xe6_24_fluidCounter : 3;
|
||||
uint xe4_24_nextNonLoopingSfxHandle : 3;
|
||||
uint xe4_27_notInSortedLists : 1;
|
||||
uint xe4_28_transformDirty : 1;
|
||||
uint xe4_29_actorLightsDirty : 1;
|
||||
uint xe4_30_outOfFrustum : 1;
|
||||
uint xe4_31_calculateLighting : 1;
|
||||
uint xe5_24_shadowEnabled : 1;
|
||||
uint xe5_25_shadowDirty : 1;
|
||||
uint xe5_26_muted : 1;
|
||||
uint xe5_27_useInSortedLists : 1;
|
||||
uint xe5_28_callTouch : 1;
|
||||
uint xe5_29_globalTimeProvider : 1;
|
||||
uint xe5_30_renderUnsorted : 1;
|
||||
uint xe5_31_pointGeneratorParticles : 1;
|
||||
uint xe6_24_fluidCounter : 3;
|
||||
EThermalFlags xe6_27_thermalVisorFlags : 2;
|
||||
u32 xe6_29_renderParticleDBInside : 1;
|
||||
u32 xe6_30_enablePitchBend : 1;
|
||||
u32 xe6_31_targetableVisorFlags : 4;
|
||||
u32 xe7_27_enableRender : 1;
|
||||
u32 xe7_28_worldLightingDirty : 1;
|
||||
u32 xe7_29_drawEnabled : 1;
|
||||
u32 xe7_30_doTargetDistanceTest : 1;
|
||||
u32 xe7_31_targetable : 1;
|
||||
uint xe6_29_renderParticleDBInside : 1;
|
||||
uint xe6_30_enablePitchBend : 1;
|
||||
uint xe6_31_targetableVisorFlags : 4;
|
||||
uint xe7_27_enableRender : 1;
|
||||
uint xe7_28_worldLightingDirty : 1;
|
||||
uint xe7_29_drawEnabled : 1;
|
||||
uint xe7_30_doTargetDistanceTest : 1;
|
||||
uint xe7_31_targetable : 1;
|
||||
};
|
||||
CHECK_SIZEOF(CActor, 0xe8)
|
||||
|
||||
|
||||
@@ -31,8 +31,8 @@ private:
|
||||
f32 x30_angleC;
|
||||
f32 x34_angleL;
|
||||
f32 x38_angleQ;
|
||||
u32 x3c_priority;
|
||||
u32 x40_lightId;
|
||||
uint x3c_priority;
|
||||
uint x40_lightId;
|
||||
mutable f32 x44_cachedRadius;
|
||||
mutable f32 x48_cachedIntensity;
|
||||
mutable bool x4c_24_intensityDirty : 1;
|
||||
@@ -69,19 +69,19 @@ private:
|
||||
bool x299_25_useBrightLightLag : 1;
|
||||
bool x299_26_ambientOnly : 1;
|
||||
bool x29a_findNearestDynamicLights;
|
||||
s32 x29c_shadowLightArrIdx;
|
||||
s32 x2a0_shadowLightIdx;
|
||||
u32 x2a4_lastUpdateFrame;
|
||||
u32 x2a8_areaUpdateFramePeriod;
|
||||
int x29c_shadowLightArrIdx;
|
||||
int x2a0_shadowLightIdx;
|
||||
uint x2a4_lastUpdateFrame;
|
||||
uint x2a8_areaUpdateFramePeriod;
|
||||
CVector3f x2ac_actorPosBias;
|
||||
s32 x2b8_maxAreaLights;
|
||||
s32 x2bc_maxDynamicLights;
|
||||
int x2b8_maxAreaLights;
|
||||
int x2bc_maxDynamicLights;
|
||||
CVector3f x2c0_lastActorPos;
|
||||
f32 x2cc_actorPositionDeltaUpdateThreshold;
|
||||
f32 x2d0_shadowDynamicRangeThreshold;
|
||||
f32 x2d4_worldLightingLevel;
|
||||
s32 x2d8_brightLightIdx;
|
||||
u32 x2dc_brightLightLag;
|
||||
int x2d8_brightLightIdx;
|
||||
uint x2dc_brightLightLag;
|
||||
};
|
||||
CHECK_SIZEOF(CActorLights, 0x2e0)
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ public:
|
||||
|
||||
const CColor& GetAmbientColor() const { return x18_noLightsAmbient; }
|
||||
bool ShouldMakeLights() const { return x1c_makeLights; }
|
||||
s32 GetMaxAreaLights() const { return x3c_maxAreaLights; }
|
||||
int GetMaxAreaLights() const { return x3c_maxAreaLights; }
|
||||
|
||||
rstl::auto_ptr< CActorLights > MakeActorLights() const;
|
||||
|
||||
@@ -56,10 +56,10 @@ private:
|
||||
bool x1d_ambientChannelOverflow;
|
||||
EWorldLightingOptions x20_worldLightingOptions;
|
||||
ELightRecalculationOptions x24_lightRecalcOpts;
|
||||
s32 x28_layerIdx;
|
||||
int x28_layerIdx;
|
||||
CVector3f x2c_actorPosBias;
|
||||
s32 x38_maxDynamicLights;
|
||||
s32 x3c_maxAreaLights;
|
||||
int x38_maxDynamicLights;
|
||||
int x3c_maxAreaLights;
|
||||
};
|
||||
CHECK_SIZEOF(CLightParameters, 0x40)
|
||||
|
||||
@@ -90,9 +90,9 @@ public:
|
||||
static CVisorParameters None();
|
||||
|
||||
private:
|
||||
u32 x0_mask : 4;
|
||||
u32 x0_4_b1 : 1;
|
||||
u32 x0_5_scanPassthrough : 1;
|
||||
uint x0_mask : 4;
|
||||
uint x0_4_b1 : 1;
|
||||
uint x0_5_scanPassthrough : 1;
|
||||
};
|
||||
CHECK_SIZEOF(CVisorParameters, 0x4)
|
||||
|
||||
|
||||
@@ -36,22 +36,22 @@ public:
|
||||
x120_particleDB.SetParticleEffectState(name, active, mgr);
|
||||
}
|
||||
|
||||
s32 GetCharacterIndex() const { return x204_charIdx; }
|
||||
f32 GetAverageVelocity(s32 idx) const;
|
||||
int GetCharacterIndex() const { return x204_charIdx; }
|
||||
f32 GetAverageVelocity(int idx) const;
|
||||
|
||||
const CBoolPOINode* GetBoolPOIList(s32& count) const {
|
||||
const CBoolPOINode* GetBoolPOIList(int& count) const {
|
||||
count = x20c_passedBoolCount;
|
||||
return mBoolPOINodes.data();
|
||||
}
|
||||
const CInt32POINode* GetInt32POIList(s32& count) const {
|
||||
const CInt32POINode* GetInt32POIList(int& count) const {
|
||||
count = x210_passedIntCount;
|
||||
return mInt32POINodes.data();
|
||||
}
|
||||
const CParticlePOINode* GetParticlePOIList(s32& count) const {
|
||||
const CParticlePOINode* GetParticlePOIList(int& count) const {
|
||||
count = x214_passedParticleCount;
|
||||
return mParticlePOINodes.data();
|
||||
}
|
||||
const CSoundPOINode* GetSoundPOIList(s32& count) const {
|
||||
const CSoundPOINode* GetSoundPOIList(int& count) const {
|
||||
count = x218_passedSoundCount;
|
||||
return mSoundPOINodes.data();
|
||||
}
|
||||
@@ -171,13 +171,13 @@ private:
|
||||
rstl::rc_ptr< CAnimTreeNode > x1f8_animRoot;
|
||||
rstl::rc_ptr< CTransitionManager > x1fc_transMgr;
|
||||
f32 x200_speedScale;
|
||||
s32 x204_charIdx;
|
||||
s32 x208_defaultAnim;
|
||||
s32 x20c_passedBoolCount;
|
||||
s32 x210_passedIntCount;
|
||||
s32 x214_passedParticleCount;
|
||||
s32 x218_passedSoundCount;
|
||||
s32 x21c_particleLightIdx;
|
||||
int x204_charIdx;
|
||||
int x208_defaultAnim;
|
||||
int x20c_passedBoolCount;
|
||||
int x210_passedIntCount;
|
||||
int x214_passedParticleCount;
|
||||
int x218_passedSoundCount;
|
||||
int x21c_particleLightIdx;
|
||||
bool x220_24_animating : 1;
|
||||
bool x220_25_loop : 1;
|
||||
bool x220_26_aligningPos : 1;
|
||||
@@ -189,7 +189,7 @@ private:
|
||||
CPoseAsTransforms x224_pose;
|
||||
CHierarchyPoseBuilder x2fc_poseBuilder;
|
||||
CAnimPlaybackParms x40c_playbackParms;
|
||||
rstl::reserved_vector< rstl::pair< s32, CAdditiveAnimPlayback >, 8 > x434_additiveAnims;
|
||||
rstl::reserved_vector< rstl::pair< int, CAdditiveAnimPlayback >, 8 > x434_additiveAnims;
|
||||
|
||||
static rstl::reserved_vector< CBoolPOINode, 8 > mBoolPOINodes;
|
||||
static rstl::reserved_vector< CInt32POINode, 16 > mInt32POINodes;
|
||||
|
||||
@@ -9,11 +9,11 @@ class CVector3f;
|
||||
|
||||
class CAnimPlaybackParms {
|
||||
private:
|
||||
s32 x0_animA;
|
||||
s32 x4_animB;
|
||||
int x0_animA;
|
||||
int x4_animB;
|
||||
f32 x8_blendWeight;
|
||||
bool xc_animating;
|
||||
s32 x10_;
|
||||
int x10_;
|
||||
CVector3f* x14_targetPos;
|
||||
bool x18_useLocator;
|
||||
CQuaternion* x1c_deltaOrient;
|
||||
|
||||
@@ -29,15 +29,15 @@ private:
|
||||
CAssetId x14_cmdl;
|
||||
CAssetId x18_cksr;
|
||||
CAssetId x1c_cinf;
|
||||
rstl::vector< rstl::pair< s32, rstl::pair< rstl::string, rstl::string > > > x20_animInfo;
|
||||
rstl::vector< rstl::pair< int, rstl::pair< rstl::string, rstl::string > > > x20_animInfo;
|
||||
CPASDatabase x30_pasDatabase;
|
||||
CParticleResData x44_partRes;
|
||||
u32 x84_unk;
|
||||
uint x84_unk;
|
||||
rstl::vector< rstl::pair< rstl::string, CAABox > > x88_aabbs;
|
||||
rstl::vector< rstl::pair< rstl::string, rstl::vector< CEffectComponent > > > x98_effects;
|
||||
u32 xa8_cmdlOverlay;
|
||||
u32 xac_cksrOverlay;
|
||||
rstl::vector< s32 > xb0_animIdxs;
|
||||
uint xa8_cmdlOverlay;
|
||||
uint xac_cksrOverlay;
|
||||
rstl::vector< int > xb0_animIdxs;
|
||||
};
|
||||
CHECK_SIZEOF(CCharacterInfo, 0xc0)
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ private:
|
||||
rstl::string x18_boneName;
|
||||
f32 x28_scale;
|
||||
CParticleData::EParentedMode x2c_parentedMode;
|
||||
u32 x30_flags;
|
||||
uint x30_flags;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -40,7 +40,7 @@ private:
|
||||
CVector3f x18_focusCellPosition;
|
||||
bool x24_enableSplash;
|
||||
f32 x28_firstSnowForce;
|
||||
s32 x2c_lastBlockedGridIdx;
|
||||
int x2c_lastBlockedGridIdx;
|
||||
f32 x30_fxDensity;
|
||||
f32 x34_targetFxDensity;
|
||||
f32 x38_maxDensityDeltaSpeed;
|
||||
|
||||
@@ -20,12 +20,12 @@ public:
|
||||
virtual ~IGameArea();
|
||||
virtual const CTransform4f& IGetTM() const = 0;
|
||||
virtual CAssetId IGetStringTableAssetId() const = 0;
|
||||
virtual u32 IGetNumAttachedAreas() const = 0;
|
||||
virtual uint IGetNumAttachedAreas() const = 0;
|
||||
virtual TAreaId IGetAttachedAreaId(int) const = 0;
|
||||
virtual bool IIsActive() const = 0;
|
||||
virtual CAssetId IGetAreaAssetId() const = 0;
|
||||
virtual s32 IGetAreaSaveId() const = 0;
|
||||
virtual rstl::pair< rstl::auto_ptr< u8 >, s32 > IGetScriptingMemoryAlways() const = 0;
|
||||
virtual int IGetAreaSaveId() const = 0;
|
||||
virtual rstl::pair< rstl::auto_ptr< u8 >, int > IGetScriptingMemoryAlways() const = 0;
|
||||
};
|
||||
|
||||
class Dock;
|
||||
@@ -37,12 +37,12 @@ public:
|
||||
~CGameArea();
|
||||
const CTransform4f& IGetTM() const override;
|
||||
CAssetId IGetStringTableAssetId() const override;
|
||||
u32 IGetNumAttachedAreas() const override;
|
||||
uint IGetNumAttachedAreas() const override;
|
||||
TAreaId IGetAttachedAreaId(int) const override;
|
||||
bool IIsActive() const override;
|
||||
CAssetId IGetAreaAssetId() const override;
|
||||
s32 IGetAreaSaveId() const override;
|
||||
rstl::pair< rstl::auto_ptr< u8 >, s32 > IGetScriptingMemoryAlways() const override;
|
||||
int IGetAreaSaveId() const override;
|
||||
rstl::pair< rstl::auto_ptr< u8 >, int > IGetScriptingMemoryAlways() const override;
|
||||
|
||||
bool IsLoaded() const { return xf0_24_postConstructed; }
|
||||
bool IsActive() const { return xf0_25_active; }
|
||||
@@ -61,14 +61,14 @@ private:
|
||||
CTransform4f x3c_invTransform;
|
||||
CAABox x6c_aabb;
|
||||
CAssetId x84_mrea;
|
||||
s32 x88_areaId;
|
||||
int x88_areaId;
|
||||
rstl::vector< u16 > x8c_attachedAreaIndices;
|
||||
rstl::vector< SObjectTag > x9c_deps1;
|
||||
rstl::vector< SObjectTag > xac_deps2;
|
||||
rstl::vector< u32 > xbc_layerDepOffsets;
|
||||
rstl::vector< uint > xbc_layerDepOffsets;
|
||||
rstl::vector< Dock > xcc_docks;
|
||||
rstl::vector< CToken > xdc_tokens;
|
||||
u32 xec_totalResourcesSize;
|
||||
uint xec_totalResourcesSize;
|
||||
bool xf0_24_postConstructed : 1;
|
||||
bool xf0_25_active : 1;
|
||||
bool xf0_26_tokensReady : 1;
|
||||
|
||||
@@ -36,9 +36,9 @@ private:
|
||||
CAiFuncMap x110_aiFuncMap;
|
||||
CGraphicsSys x130_graphicsSys;
|
||||
rstl::single_ptr< CGameState > x134_gameState;
|
||||
u32 x138_;
|
||||
uint x138_;
|
||||
rstl::optional_object< TCachedToken< unkptr > > x13c_;
|
||||
u32 x14c_;
|
||||
uint x14c_;
|
||||
rstl::single_ptr< CInGameTweakManager > x150_inGameTweakManager;
|
||||
TToken< CRasterFont > x154_defaultFont;
|
||||
};
|
||||
|
||||
@@ -19,7 +19,7 @@ class TSegIdMap {
|
||||
private:
|
||||
CSegId x0_boneCount;
|
||||
CSegId x1_capacity;
|
||||
u32 x4_maxCapacity;
|
||||
uint x4_maxCapacity;
|
||||
CSegId x8_indirectionMap[200];
|
||||
T* xd0_nodes;
|
||||
CSegId xd4_curPrevBone;
|
||||
|
||||
@@ -12,8 +12,8 @@ public:
|
||||
inline bool IsEmpty() const { return x4_ == 0 && x0_ == 0; }
|
||||
|
||||
private:
|
||||
u32 x0_;
|
||||
u32 x4_;
|
||||
uint x0_;
|
||||
uint x4_;
|
||||
rstl::list< unkptr > x8_;
|
||||
};
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ public:
|
||||
void StreamNewGameState(CInputStream& in, int saveIdx);
|
||||
void RefreshGameState();
|
||||
void AddWorldPaks();
|
||||
void AsyncIdle(u32 time);
|
||||
void AsyncIdle(uint time);
|
||||
int RsMain(int argc, const char* const* argv);
|
||||
void InitializeSubsystems();
|
||||
void FillInAssetIDs();
|
||||
@@ -50,9 +50,9 @@ private:
|
||||
f32 x120_;
|
||||
f32 x124_;
|
||||
CGameGlobalObjects* x128_gameGlobalObjects;
|
||||
u32 x12c_flowState; // EFlowState
|
||||
rstl::reserved_vector< u32, 10 > x130_frameTimes;
|
||||
s32 x15c_frameTimeIdx;
|
||||
uint x12c_flowState; // EFlowState
|
||||
rstl::reserved_vector< uint, 10 > x130_frameTimes;
|
||||
int x15c_frameTimeIdx;
|
||||
bool x160_24_finished : 1;
|
||||
bool x160_25_mfGameBuilt : 1;
|
||||
bool x160_26_screenFading : 1;
|
||||
|
||||
@@ -37,10 +37,10 @@ public:
|
||||
const CEntity* GetObjectById() const;
|
||||
CEntity* GetValidObjectById(TUniqueId uid);
|
||||
const CEntity* GetValidObjectById(TUniqueId uid) const;
|
||||
CEntity* operator[](s32 idx);
|
||||
const CEntity* operator[](s32 idx) const;
|
||||
const CEntity* GetValidObjectByIndex(s32 idx) const;
|
||||
s32 size() const { return mCount; }
|
||||
CEntity* operator[](int idx);
|
||||
const CEntity* operator[](int idx) const;
|
||||
const CEntity* GetValidObjectByIndex(int idx) const;
|
||||
int size() const { return mCount; }
|
||||
|
||||
private:
|
||||
SObjectListEntry mObjects[1024];
|
||||
|
||||
@@ -47,8 +47,8 @@ public:
|
||||
kPT_Enum = 4,
|
||||
};
|
||||
union UParmValue {
|
||||
s32 m_int;
|
||||
u32 m_uint;
|
||||
int m_int;
|
||||
uint m_uint;
|
||||
f32 m_float;
|
||||
bool m_bool;
|
||||
};
|
||||
@@ -77,7 +77,7 @@ private:
|
||||
|
||||
class CPASAnimInfo {
|
||||
private:
|
||||
u32 x0_id;
|
||||
uint x0_id;
|
||||
rstl::reserved_vector< CPASAnimParm::UParmValue, 8 > x4_parms;
|
||||
};
|
||||
|
||||
@@ -86,7 +86,7 @@ private:
|
||||
pas::EAnimationState x0_id;
|
||||
rstl::vector< CPASParmInfo > x4_parms;
|
||||
rstl::vector< CPASAnimInfo > x14_anims;
|
||||
rstl::vector< s32 > x24_selectionCache;
|
||||
rstl::vector< int > x24_selectionCache;
|
||||
};
|
||||
CHECK_SIZEOF(CPASAnimState, 0x34)
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
class CPASDatabase {
|
||||
private:
|
||||
rstl::vector< CPASAnimState > x0_states;
|
||||
s32 x10_defaultState;
|
||||
int x10_defaultState;
|
||||
};
|
||||
CHECK_SIZEOF(CPASDatabase, 0x14)
|
||||
|
||||
|
||||
@@ -27,19 +27,19 @@ public:
|
||||
EPOIType GetPoiType() const { return static_cast< EPOIType >(x18_type); }
|
||||
const CCharAnimTime& GetTime() const { return x1c_time; }
|
||||
f32 GetWeight() const { return x2c_weight; }
|
||||
s32 GetCharacterIndex() const { return x30_charIdx; }
|
||||
s32 GetFlags() const { return x34_flags; }
|
||||
int GetCharacterIndex() const { return x30_charIdx; }
|
||||
int GetFlags() const { return x34_flags; }
|
||||
|
||||
protected:
|
||||
u16 x4_;
|
||||
rstl::string x8_name;
|
||||
u16 x18_type;
|
||||
CCharAnimTime x1c_time;
|
||||
s32 x24_index;
|
||||
int x24_index;
|
||||
bool x28_unique;
|
||||
f32 x2c_weight;
|
||||
s32 x30_charIdx;
|
||||
s32 x34_flags;
|
||||
int x30_charIdx;
|
||||
int x34_flags;
|
||||
};
|
||||
CHECK_SIZEOF(CPOINode, 0x38)
|
||||
|
||||
@@ -60,11 +60,11 @@ public:
|
||||
// __ct__13CInt32POINodeFQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>UsRC13CCharAnimTimeibfiiiRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>
|
||||
// CopyNodeMinusStartTime__13CInt32POINodeFRC13CInt32POINodeRC13CCharAnimTime
|
||||
|
||||
s32 GetValue() const { return x38_val; }
|
||||
int GetValue() const { return x38_val; }
|
||||
const rstl::string& GetLocatorName() const { return x3c_lctrName; }
|
||||
|
||||
private:
|
||||
s32 x38_val;
|
||||
int x38_val;
|
||||
rstl::string x3c_lctrName;
|
||||
};
|
||||
|
||||
@@ -75,12 +75,12 @@ private:
|
||||
|
||||
class CSoundPOINode : public CPOINode {
|
||||
public:
|
||||
u32 GetSoundId() const { return x38_sfxId; }
|
||||
uint GetSoundId() const { return x38_sfxId; }
|
||||
f32 GetFallOff() const { return x3c_falloff; }
|
||||
f32 GetMaxDistance() const { return x40_maxDist; }
|
||||
|
||||
private:
|
||||
u32 x38_sfxId;
|
||||
uint x38_sfxId;
|
||||
f32 x3c_falloff;
|
||||
f32 x40_maxDist;
|
||||
};
|
||||
|
||||
@@ -17,7 +17,7 @@ public:
|
||||
};
|
||||
|
||||
private:
|
||||
u32 x0_duration;
|
||||
uint x0_duration;
|
||||
SObjectTag x4_particle;
|
||||
rstl::string xc_boneName;
|
||||
f32 x1c_scale;
|
||||
@@ -26,7 +26,7 @@ private:
|
||||
|
||||
class CAuxiliaryParticleData {
|
||||
private:
|
||||
u32 x0_duration;
|
||||
uint x0_duration;
|
||||
SObjectTag x4_particle;
|
||||
CVector3f xc_translation;
|
||||
f32 x18_scale;
|
||||
|
||||
@@ -21,7 +21,7 @@ CHECK_SIZEOF(SNode, 0x2c);
|
||||
|
||||
struct SSortedList {
|
||||
s16 x0_ids[kMaxObjects];
|
||||
u32 x800_size;
|
||||
uint x800_size;
|
||||
};
|
||||
CHECK_SIZEOF(SSortedList, 0x804);
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
class CWeaponMgr {
|
||||
private:
|
||||
rstl::map< TUniqueId, rstl::reserved_vector< s32, 15 > > x0_weapons;
|
||||
rstl::map< TUniqueId, rstl::reserved_vector< int, 15 > > x0_weapons;
|
||||
};
|
||||
CHECK_SIZEOF(CWeaponMgr, 0x14);
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ public:
|
||||
virtual TAreaId IGetAreaId(CAssetId id) const = 0;
|
||||
virtual bool ICheckWorldComplete() = 0;
|
||||
virtual rstl::string IGetDefaultAudioTrack() const = 0;
|
||||
virtual s32 IGetAreaCount() const = 0;
|
||||
virtual int IGetAreaCount() const = 0;
|
||||
};
|
||||
|
||||
class CGameArea;
|
||||
@@ -55,7 +55,7 @@ public:
|
||||
TAreaId IGetAreaId(CAssetId id) const override;
|
||||
bool ICheckWorldComplete() override;
|
||||
rstl::string IGetDefaultAudioTrack() const override;
|
||||
s32 IGetAreaCount() const override;
|
||||
int IGetAreaCount() const override;
|
||||
|
||||
const CGameArea& GetAreaAlways(TAreaId id) const {
|
||||
return *x18_areas[id.Value()];
|
||||
@@ -87,13 +87,13 @@ private:
|
||||
rstl::vector< CRelay > x2c_relays;
|
||||
rstl::rc_ptr< IDvdRequest > x3c_loadToken;
|
||||
rstl::single_ptr< u8 > x40_loadBuf;
|
||||
u32 x44_bufSz;
|
||||
u32 x48_chainCount;
|
||||
uint x44_bufSz;
|
||||
uint x48_chainCount;
|
||||
CGameArea* x4c_chainHeads[5];
|
||||
IObjectStore* x60_objectStore;
|
||||
IFactory* x64_resFactory;
|
||||
TAreaId x68_curAreaId;
|
||||
u32 x6c_loadedAudioGrpCount;
|
||||
uint x6c_loadedAudioGrpCount;
|
||||
bool x70_24_currentAreaNeedsAllocation : 1;
|
||||
bool x70_25_loadPaused : 1;
|
||||
bool x70_26_skyboxActive : 1;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
class CCameraHint {
|
||||
public:
|
||||
CCameraHint(u32 overrideFlags, CBallCamera::EBallCameraBehaviour behaviour, f32 minDist, f32 maxDist,
|
||||
CCameraHint(uint overrideFlags, CBallCamera::EBallCameraBehaviour behaviour, f32 minDist, f32 maxDist,
|
||||
f32 backwardsDist, const CVector3f& lookAtOffset, const CVector3f& chaseLookAtOffset,
|
||||
const CVector3f& ballToCam, f32 fov, f32 attitudeRange, f32 azimuthRange,
|
||||
f32 anglePerSecond, f32 clampVelRange, f32 clampRotRange, f32 elevation, f32 interpolateTime,
|
||||
@@ -15,7 +15,7 @@ public:
|
||||
virtual ~CCameraHint();
|
||||
|
||||
private:
|
||||
u32 mOverrideFlags;
|
||||
uint mOverrideFlags;
|
||||
CBallCamera::EBallCameraBehaviour mBehaviour;
|
||||
f32 mMinDist;
|
||||
f32 mMaxDist;
|
||||
|
||||
@@ -28,14 +28,14 @@ private:
|
||||
TUniqueId x0_curCameraId;
|
||||
rstl::vector< TUniqueId > x4_cineCameras;
|
||||
rstl::list< CCameraShakeData > x14_shakers;
|
||||
u32 x2c_lastShakeId;
|
||||
uint x2c_lastShakeId;
|
||||
CVector3f x30_shakeOffset;
|
||||
CAreaFog x3c_fog;
|
||||
s32 x74_fluidCounter;
|
||||
int x74_fluidCounter;
|
||||
TUniqueId x78_fluidId;
|
||||
CFirstPersonCamera* x7c_fpCamera;
|
||||
CBallCamera* x80_ballCamera;
|
||||
s32 x84_rumbleId;
|
||||
int x84_rumbleId;
|
||||
CInterpolationCamera* x88_interpCamera;
|
||||
s16 x8c_;
|
||||
f32 x90_rumbleCooldown;
|
||||
@@ -48,8 +48,8 @@ private:
|
||||
TUniqueId xa2_spindleCamId;
|
||||
TUniqueId xa4_pathCamId;
|
||||
TUniqueId xa6_camHintId;
|
||||
s32 xa8_hintPriority;
|
||||
rstl::reserved_vector< rstl::pair< s32, TUniqueId >, 64 > xac_cameraHints;
|
||||
int xa8_hintPriority;
|
||||
rstl::reserved_vector< rstl::pair< int, TUniqueId >, 64 > xac_cameraHints;
|
||||
rstl::reserved_vector< TUniqueId, 64 > x2b0_inactiveCameraHints;
|
||||
rstl::reserved_vector< TUniqueId, 64 > x334_activeCameraHints;
|
||||
bool x3b8_24_ : 1;
|
||||
|
||||
@@ -34,8 +34,8 @@ private:
|
||||
CCameraShakerComponent x8_shakerX;
|
||||
CCameraShakerComponent x44_shakerY;
|
||||
CCameraShakerComponent x80_shakerZ;
|
||||
u32 xbc_shakerId;
|
||||
u32 xc0_flags;
|
||||
uint xbc_shakerId;
|
||||
uint xc0_flags;
|
||||
CVector3f xc4_sfxPos;
|
||||
f32 xd0_sfxDist;
|
||||
};
|
||||
|
||||
@@ -22,7 +22,7 @@ private:
|
||||
f32 x160_znear;
|
||||
f32 x164_zfar;
|
||||
f32 x168_aspect;
|
||||
u32 x16c_controllerIdx;
|
||||
uint x16c_controllerIdx;
|
||||
mutable bool x170_24_perspDirty : 1;
|
||||
bool x170_25_disablesInput : 1;
|
||||
f32 x174_delayTime;
|
||||
|
||||
@@ -19,15 +19,15 @@ public:
|
||||
|
||||
private:
|
||||
rstl::reserved_vector< bool, 64 > x0_;
|
||||
s32 x44_soundMode; // CAudioSys::ESurroundModes
|
||||
u32 x48_screenBrightness;
|
||||
s32 x4c_screenXOffset;
|
||||
s32 x50_screenYOffset;
|
||||
s32 x54_screenStretch;
|
||||
u32 x58_sfxVol;
|
||||
u32 x5c_musicVol;
|
||||
u32 x60_hudAlpha;
|
||||
u32 x64_helmetAlpha;
|
||||
int x44_soundMode; // CAudioSys::ESurroundModes
|
||||
uint x48_screenBrightness;
|
||||
int x4c_screenXOffset;
|
||||
int x50_screenYOffset;
|
||||
int x54_screenStretch;
|
||||
uint x58_sfxVol;
|
||||
uint x5c_musicVol;
|
||||
uint x60_hudAlpha;
|
||||
uint x64_helmetAlpha;
|
||||
bool x68_24_hudLag : 1;
|
||||
bool x68_25_invertY : 1;
|
||||
bool x68_26_rumble : 1;
|
||||
|
||||
@@ -26,7 +26,7 @@ public:
|
||||
CSystemOptions& SystemOptions() { return xa8_systemOptions; }
|
||||
CGameOptions& GameOptions() { return x17c_gameOptions; }
|
||||
CHintOptions& HintOptions() { return x1f8_hintOptions; }
|
||||
u32& SaveIdx() { return x20c_saveIdx; }
|
||||
uint& SaveIdx() { return x20c_saveIdx; }
|
||||
u64& CardSerial() { return x210_cardSerial; }
|
||||
rstl::vector< u8 >& BackupBuf() { return x218_backupBuf; }
|
||||
|
||||
@@ -40,7 +40,7 @@ private:
|
||||
CSystemOptions xa8_systemOptions;
|
||||
CGameOptions x17c_gameOptions;
|
||||
CHintOptions x1f8_hintOptions;
|
||||
u32 x20c_saveIdx;
|
||||
uint x20c_saveIdx;
|
||||
u64 x210_cardSerial;
|
||||
rstl::vector< u8 > x218_backupBuf;
|
||||
bool x228_24_hardMode : 1;
|
||||
|
||||
@@ -12,11 +12,11 @@ extern TEditorId kInvalidEditorId;
|
||||
extern TUniqueId kInvalidUniqueId;
|
||||
|
||||
struct TAreaId {
|
||||
s32 value;
|
||||
int value;
|
||||
|
||||
TAreaId() : value(-1) {}
|
||||
TAreaId(s32 value) : value(value) {}
|
||||
s32 Value() const { return value; }
|
||||
TAreaId(int value) : value(value) {}
|
||||
int Value() const { return value; }
|
||||
|
||||
bool operator==(const TAreaId& other) const { return value == other.value; }
|
||||
bool operator!=(const TAreaId& other) const { return value != other.value; }
|
||||
@@ -24,11 +24,11 @@ struct TAreaId {
|
||||
CHECK_SIZEOF(TAreaId, 0x4)
|
||||
|
||||
struct TEditorId {
|
||||
u32 value;
|
||||
uint value;
|
||||
|
||||
TEditorId() : value(-1) {}
|
||||
TEditorId(u32 value) : value(value) {}
|
||||
u32 Value() const { return value; }
|
||||
TEditorId(uint value) : value(value) {}
|
||||
uint Value() const { return value; }
|
||||
|
||||
bool operator==(const TEditorId& other) const { return value == other.value; }
|
||||
bool operator!=(const TEditorId& other) const { return value != other.value; }
|
||||
|
||||
@@ -10,7 +10,7 @@ public:
|
||||
const rstl::string& GetWorldPrefix() { return x4_worldPrefix; }
|
||||
|
||||
private:
|
||||
u32 x0_;
|
||||
uint x0_;
|
||||
rstl::string x4_worldPrefix;
|
||||
};
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ public:
|
||||
void RegisterTweaks();
|
||||
|
||||
private:
|
||||
u32 x0_unk;
|
||||
uint x0_unk;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -14,11 +14,11 @@ typedef uint64_t u64;
|
||||
#else
|
||||
typedef signed char s8;
|
||||
typedef signed short int s16;
|
||||
typedef signed int s32;
|
||||
typedef signed long s32;
|
||||
typedef signed long long int s64;
|
||||
typedef unsigned char u8;
|
||||
typedef unsigned short int u16;
|
||||
typedef unsigned int u32;
|
||||
typedef unsigned long u32;
|
||||
typedef unsigned long long int u64;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
#include "rstl/pointer_iterator.hpp"
|
||||
|
||||
namespace rstl {
|
||||
template < typename T, s32 N >
|
||||
template < typename T, int N >
|
||||
class reserved_vector {
|
||||
s32 x0_count;
|
||||
int x0_count;
|
||||
u8 x4_data[N * sizeof(T)];
|
||||
|
||||
public:
|
||||
@@ -36,7 +36,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
void clear() {
|
||||
for (s32 i = 0; i < x0_count; ++i) {
|
||||
for (int i = 0; i < x0_count; ++i) {
|
||||
rstl::destroy(&data()[i]);
|
||||
}
|
||||
x0_count = 0;
|
||||
@@ -54,14 +54,14 @@ public:
|
||||
|
||||
inline T* data() { return reinterpret_cast< T* >(x4_data); }
|
||||
inline const T* data() const { return reinterpret_cast< const T* >(x4_data); }
|
||||
inline s32 size() const { return x0_count; }
|
||||
inline s32 capacity() const { return N; }
|
||||
inline int size() const { return x0_count; }
|
||||
inline int capacity() const { return N; }
|
||||
inline T& front() { return data()[0]; }
|
||||
inline const T& front() const { return data()[0]; }
|
||||
inline T& back() { return data()[x0_count - 1]; }
|
||||
inline const T& back() const { return data()[x0_count - 1]; }
|
||||
inline T& operator[](s32 idx) { return data()[idx]; }
|
||||
inline const T& operator[](s32 idx) const { return data()[idx]; }
|
||||
inline T& operator[](int idx) { return data()[idx]; }
|
||||
inline const T& operator[](int idx) const { return data()[idx]; }
|
||||
};
|
||||
} // namespace rstl
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
namespace rstl {
|
||||
struct rmemory_allocator {
|
||||
template < typename T >
|
||||
static void allocate(T*& out, s32 sz) {
|
||||
static void allocate(T*& out, int sz) {
|
||||
out = reinterpret_cast< T* >(new u8[sz]);
|
||||
}
|
||||
template < typename T >
|
||||
|
||||
@@ -10,8 +10,8 @@ namespace rstl {
|
||||
template < typename T, typename Alloc = rmemory_allocator >
|
||||
class vector {
|
||||
Alloc x0_allocator;
|
||||
s32 x4_count;
|
||||
s32 x8_capacity;
|
||||
int x4_count;
|
||||
int x8_capacity;
|
||||
T* xc_items;
|
||||
|
||||
public:
|
||||
@@ -23,14 +23,14 @@ public:
|
||||
inline iterator end() { return iterator(xc_items + x4_count); }
|
||||
inline const_iterator end() const { return const_iterator(xc_items + x4_count); }
|
||||
inline vector() : x4_count(0), x8_capacity(0), xc_items(NULL) {}
|
||||
inline vector(s32 count) : x4_count(0), x8_capacity(0), xc_items(0) { reserve(count); }
|
||||
inline vector(int count) : x4_count(0), x8_capacity(0), xc_items(0) { reserve(count); }
|
||||
vector(const vector& other) {
|
||||
x4_count = other.x4_count;
|
||||
x8_capacity = other.x8_capacity;
|
||||
if (other.x4_count == 0 && other.x8_capacity == 0) {
|
||||
xc_items = NULL;
|
||||
} else {
|
||||
s32 sz = x8_capacity * sizeof(T);
|
||||
int sz = x8_capacity * sizeof(T);
|
||||
if (sz == 0) {
|
||||
xc_items = NULL;
|
||||
} else {
|
||||
@@ -44,7 +44,7 @@ public:
|
||||
x0_allocator.deallocate(xc_items);
|
||||
}
|
||||
|
||||
void reserve(s32 size);
|
||||
void reserve(int size);
|
||||
|
||||
void push_back(const T& in) {
|
||||
if (x4_count >= x8_capacity) {
|
||||
@@ -79,21 +79,21 @@ public:
|
||||
|
||||
inline T* data() { return xc_items; }
|
||||
inline const T* data() const { return xc_items; }
|
||||
inline s32 size() const { return x4_count; }
|
||||
inline s32 capacity() const { return x8_capacity; }
|
||||
inline int size() const { return x4_count; }
|
||||
inline int capacity() const { return x8_capacity; }
|
||||
inline T& front() { return xc_items[0]; }
|
||||
inline const T& front() const { return xc_items[0]; }
|
||||
inline T& back() { return xc_items[x4_count - 1]; }
|
||||
inline const T& back() const { return xc_items[x4_count - 1]; }
|
||||
inline T& operator[](s32 idx) { return xc_items[idx]; }
|
||||
inline const T& operator[](s32 idx) const { return xc_items[idx]; }
|
||||
inline T& operator[](int idx) { return xc_items[idx]; }
|
||||
inline const T& operator[](int idx) const { return xc_items[idx]; }
|
||||
};
|
||||
|
||||
template < typename T, typename Alloc >
|
||||
void vector< T, Alloc >::reserve(s32 size) {
|
||||
void vector< T, Alloc >::reserve(int size) {
|
||||
if (size <= x8_capacity)
|
||||
return;
|
||||
s32 sz = size * sizeof(T);
|
||||
int sz = size * sizeof(T);
|
||||
T* newData;
|
||||
if (sz == 0) {
|
||||
newData = nullptr;
|
||||
|
||||
@@ -9,6 +9,9 @@ extern "C" {
|
||||
|
||||
#include <dolphin/types.h>
|
||||
|
||||
// Dolphin u32 is unsigned long
|
||||
typedef unsigned int uint;
|
||||
|
||||
// Pointer to unknown, to be determined at a later date.
|
||||
typedef void* unkptr;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user