mirror of https://github.com/PrimeDecomp/prime.git
clang-format pass
This commit is contained in:
parent
135d63412c
commit
6a979e343f
|
@ -21,4 +21,4 @@ private:
|
||||||
};
|
};
|
||||||
CHECK_SIZEOF(CCollidableAABox, 0x28)
|
CHECK_SIZEOF(CCollidableAABox, 0x28)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -33,4 +33,4 @@ CHECK_SIZEOF(CCollisionPrimitive, 0x10)
|
||||||
|
|
||||||
inline CCollisionPrimitive::~CCollisionPrimitive() {}
|
inline CCollisionPrimitive::~CCollisionPrimitive() {}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -18,7 +18,8 @@ public:
|
||||||
CMaterialFilter(const CMaterialList& include, const CMaterialList& exclude, EFilterType type)
|
CMaterialFilter(const CMaterialList& include, const CMaterialList& exclude, EFilterType type)
|
||||||
: include(include), exclude(exclude), type(type) {}
|
: include(include), exclude(exclude), type(type) {}
|
||||||
|
|
||||||
static CMaterialFilter MakeIncludeExclude(const CMaterialList& include, const CMaterialList& exclude) {
|
static CMaterialFilter MakeIncludeExclude(const CMaterialList& include,
|
||||||
|
const CMaterialList& exclude) {
|
||||||
return CMaterialFilter(include, exclude, kFT_IncludeExclude);
|
return CMaterialFilter(include, exclude, kFT_IncludeExclude);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,4 +30,4 @@ private:
|
||||||
};
|
};
|
||||||
CHECK_SIZEOF(CMaterialFilter, 0x18)
|
CHECK_SIZEOF(CMaterialFilter, 0x18)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -113,4 +113,4 @@ private:
|
||||||
};
|
};
|
||||||
CHECK_SIZEOF(CMaterialList, 0x8)
|
CHECK_SIZEOF(CMaterialList, 0x8)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -24,4 +24,4 @@ private:
|
||||||
};
|
};
|
||||||
CHECK_SIZEOF(CRayCastResult, 0x30)
|
CHECK_SIZEOF(CRayCastResult, 0x30)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -20,4 +20,4 @@ private:
|
||||||
u8 pad[0x14];
|
u8 pad[0x14];
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,27 +1,24 @@
|
||||||
#ifndef __CCIRCULARBUFFER_HPP__
|
#ifndef __CCIRCULARBUFFER_HPP__
|
||||||
#define __CCIRCULARBUFFER_HPP__
|
#define __CCIRCULARBUFFER_HPP__
|
||||||
|
|
||||||
|
|
||||||
#include <types.h>
|
#include <types.h>
|
||||||
|
|
||||||
class CCircularBuffer {
|
class CCircularBuffer {
|
||||||
public:
|
public:
|
||||||
enum EOwnership {
|
enum EOwnership { kOS_Owned, kOS_NotOwned };
|
||||||
kOS_Owned,
|
|
||||||
kOS_NotOwned
|
CCircularBuffer(void* buf, int len, EOwnership owned = kOS_NotOwned);
|
||||||
};
|
bool IsWrappedMemory(int offset, int len);
|
||||||
|
void* Alloc(int len);
|
||||||
|
void Free(void* ptr, int len);
|
||||||
|
int GetAllocatedAmount() const;
|
||||||
|
|
||||||
CCircularBuffer(void* buf, int len, EOwnership owned = kOS_NotOwned);
|
|
||||||
bool IsWrappedMemory(int offset, int len);
|
|
||||||
void* Alloc(int len);
|
|
||||||
void Free(void* ptr, int len);
|
|
||||||
int GetAllocatedAmount() const;
|
|
||||||
private:
|
private:
|
||||||
u8 x0_owned;
|
u8 x0_owned;
|
||||||
void* x4_ptr;
|
void* x4_ptr;
|
||||||
s32 x8_bufferLen;
|
s32 x8_bufferLen;
|
||||||
s32 xc_;
|
s32 xc_;
|
||||||
s32 x10_nextFreeAddr;
|
s32 x10_nextFreeAddr;
|
||||||
s32 x14_;
|
s32 x14_;
|
||||||
};
|
};
|
||||||
#endif // __CCIRCULARBUFFER_HPP__
|
#endif // __CCIRCULARBUFFER_HPP__
|
||||||
|
|
|
@ -10,12 +10,8 @@ void Free(const void* ptr);
|
||||||
|
|
||||||
void* operator new(unsigned long sz, const char*, const char*);
|
void* operator new(unsigned long sz, const char*, const char*);
|
||||||
void* operator new[](unsigned long sz, const char*, const char*);
|
void* operator new[](unsigned long sz, const char*, const char*);
|
||||||
inline void* operator new(unsigned long sz) {
|
inline void* operator new(unsigned long sz) { return operator new(sz, "??(??)", nullptr); }
|
||||||
return operator new(sz, "??(??)", nullptr);
|
inline void* operator new[](unsigned long sz) { return operator new[](sz, "??(??)", nullptr); }
|
||||||
}
|
|
||||||
inline void* operator new[](unsigned long sz) {
|
|
||||||
return operator new[](sz, "??(??)", nullptr);
|
|
||||||
}
|
|
||||||
// placement new
|
// placement new
|
||||||
inline void* operator new(unsigned long n, void* ptr) { return ptr; };
|
inline void* operator new(unsigned long n, void* ptr) { return ptr; };
|
||||||
|
|
||||||
|
|
|
@ -6,14 +6,19 @@
|
||||||
static const int kPointerSize = sizeof(void*);
|
static const int kPointerSize = sizeof(void*);
|
||||||
class CSmallAllocPool {
|
class CSmallAllocPool {
|
||||||
public:
|
public:
|
||||||
CSmallAllocPool(uint len, void* mainData, void* bookKeeping);
|
CSmallAllocPool(uint len, void* mainData, void* bookKeeping);
|
||||||
void* FindFree(int len);
|
void* FindFree(int len);
|
||||||
void* Alloc(uint size);
|
void* Alloc(uint size);
|
||||||
bool Free(const void* ptr);
|
bool Free(const void* ptr);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
uint GetIndexFromPtr(const void* ptr) const { return ((const u8*)ptr - x0_mainData) / kPointerSize; }
|
uint GetIndexFromPtr(const void* ptr) const {
|
||||||
|
return ((const u8*)ptr - x0_mainData) / kPointerSize;
|
||||||
|
}
|
||||||
long GetEntryValue(uint idx) const { return (long)*((u8*)x4_bookKeeping + idx); }
|
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); }
|
u8* GetPtrFromIndex(unsigned int idx) const {
|
||||||
|
return static_cast< u8* >(x0_mainData) + (idx << 3);
|
||||||
|
}
|
||||||
void* x0_mainData;
|
void* x0_mainData;
|
||||||
void* x4_bookKeeping;
|
void* x4_bookKeeping;
|
||||||
int x8_numBlocks;
|
int x8_numBlocks;
|
||||||
|
|
|
@ -41,10 +41,11 @@ public:
|
||||||
uint x4c_;
|
uint x4c_;
|
||||||
uint x50_mediumTotalAllocated;
|
uint x50_mediumTotalAllocated;
|
||||||
uint x54_fakeStatics;
|
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,
|
SMetrics(uint heapSize, uint unk1, uint unk2, uint unk3, uint unk4, uint heapSize2, uint unk5,
|
||||||
uint smallAllocNumAllocs, uint smallAllocAllocatedSize, uint smallAllocRemainingSize, uint mediumAllocNumAllocs,
|
uint unk6, uint unk7, uint unk8, uint unk9, uint smallAllocNumAllocs,
|
||||||
uint mediumAllocAllocatedSize, uint mediumAllocBlocksAvailable, uint unk10, uint unk11, uint unk12, uint mediumAllocTotalAllocated,
|
uint smallAllocAllocatedSize, uint smallAllocRemainingSize, uint mediumAllocNumAllocs,
|
||||||
uint fakeStatics);
|
uint mediumAllocAllocatedSize, uint mediumAllocBlocksAvailable, uint unk10, uint unk11,
|
||||||
|
uint unk12, uint mediumAllocTotalAllocated, uint fakeStatics);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SAllocInfo {
|
struct SAllocInfo {
|
||||||
|
@ -62,10 +63,12 @@ public:
|
||||||
|
|
||||||
virtual bool Initialize(COsContext& ctx) = 0;
|
virtual bool Initialize(COsContext& ctx) = 0;
|
||||||
virtual void Shutdown() = 0;
|
virtual void Shutdown() = 0;
|
||||||
virtual void* Alloc(unsigned long size, EHint hint, EScope scope, EType type, const CCallStack& cs) = 0;
|
virtual void* Alloc(unsigned long size, EHint hint, EScope scope, EType type,
|
||||||
|
const CCallStack& cs) = 0;
|
||||||
virtual void Free(const void* ptr) = 0;
|
virtual void Free(const void* ptr) = 0;
|
||||||
virtual void ReleaseAll() = 0;
|
virtual void ReleaseAll() = 0;
|
||||||
virtual void* AllocSecondary(unsigned long size, EHint hint, EScope scope, EType type, const CCallStack& cs) = 0;
|
virtual void* AllocSecondary(unsigned long size, EHint hint, EScope scope, EType type,
|
||||||
|
const CCallStack& cs) = 0;
|
||||||
virtual void FreeSecondary(const void* ptr) = 0;
|
virtual void FreeSecondary(const void* ptr) = 0;
|
||||||
virtual void ReleaseAllSecondary() = 0;
|
virtual void ReleaseAllSecondary() = 0;
|
||||||
virtual void SetOutOfMemoryCallback(FOutOfMemoryCb cb, const void* data) = 0;
|
virtual void SetOutOfMemoryCallback(FOutOfMemoryCb cb, const void* data) = 0;
|
||||||
|
|
|
@ -11,4 +11,4 @@ private:
|
||||||
// TODO
|
// TODO
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -27,4 +27,4 @@ public:
|
||||||
static const u8 kMaxVolume;
|
static const u8 kMaxVolume;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -8,4 +8,4 @@ public:
|
||||||
static void Initialize();
|
static void Initialize();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -2,36 +2,33 @@
|
||||||
#define _g721_h
|
#define _g721_h
|
||||||
|
|
||||||
struct g72x_state {
|
struct g72x_state {
|
||||||
long yl; /* Locked or steady state step size multiplier. */
|
long yl; /* Locked or steady state step size multiplier. */
|
||||||
short yu; /* Unlocked or non-steady state step size multiplier. */
|
short yu; /* Unlocked or non-steady state step size multiplier. */
|
||||||
short dms; /* Short term energy estimate. */
|
short dms; /* Short term energy estimate. */
|
||||||
short dml; /* Long term energy estimate. */
|
short dml; /* Long term energy estimate. */
|
||||||
short ap; /* Linear weighting coefficient of 'yl' and 'yu'. */
|
short ap; /* Linear weighting coefficient of 'yl' and 'yu'. */
|
||||||
|
|
||||||
short a[2]; /* Coefficients of pole portion of prediction filter. */
|
short a[2]; /* Coefficients of pole portion of prediction filter. */
|
||||||
short b[6]; /* Coefficients of zero portion of prediction filter. */
|
short b[6]; /* Coefficients of zero portion of prediction filter. */
|
||||||
short pk[2]; /*
|
short pk[2]; /*
|
||||||
* Signs of previous two samples of a partially
|
* Signs of previous two samples of a partially
|
||||||
* reconstructed signal.
|
* reconstructed signal.
|
||||||
*/
|
*/
|
||||||
short dq[6]; /*
|
short dq[6]; /*
|
||||||
* Previous 6 samples of the quantized difference
|
* Previous 6 samples of the quantized difference
|
||||||
* signal represented in an internal floating point
|
* signal represented in an internal floating point
|
||||||
* format.
|
* format.
|
||||||
*/
|
*/
|
||||||
short sr[2]; /*
|
short sr[2]; /*
|
||||||
* Previous 2 samples of the quantized difference
|
* Previous 2 samples of the quantized difference
|
||||||
* signal represented in an internal floating point
|
* signal represented in an internal floating point
|
||||||
* format.
|
* format.
|
||||||
*/
|
*/
|
||||||
char td; /* delayed tone detect, new in 1988 version */
|
char td; /* delayed tone detect, new in 1988 version */
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
void g72x_init_state(struct g72x_state* state_ptr);
|
||||||
g72x_init_state(struct g72x_state *state_ptr);
|
|
||||||
|
|
||||||
int
|
int g721_decoder(int i, struct g72x_state* state_ptr);
|
||||||
g721_decoder(int i,
|
|
||||||
struct g72x_state *state_ptr);
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -37,15 +37,9 @@ inline s16 FtoS(register f32 in) {
|
||||||
return *ptr;
|
return *ptr;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
inline u8 ToUint8(f32 in) {
|
inline u8 ToUint8(f32 in) { return static_cast< u8 >(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 f32 ToReal32(u8 in) {
|
|
||||||
return static_cast<f32>(in);
|
|
||||||
}
|
|
||||||
inline s16 FtoS(f32 in) {
|
|
||||||
return static_cast<s16>(in);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
} // namespace CCast
|
} // namespace CCast
|
||||||
|
|
||||||
|
|
|
@ -32,8 +32,12 @@ public:
|
||||||
}
|
}
|
||||||
x0_startTime = mData.GetCPUCycles();
|
x0_startTime = mData.GetCPUCycles();
|
||||||
}
|
}
|
||||||
inline f32 GetElapsedTime() const { return (mData.GetCPUCycles() - x0_startTime) * mData.GetTimerPeriod(); }
|
inline f32 GetElapsedTime() const {
|
||||||
inline s64 GetElapsedMicros() const { return (mData.GetCPUCycles() - x0_startTime) / mData.GetTimerFreqO1M(); }
|
return (mData.GetCPUCycles() - x0_startTime) * mData.GetTimerPeriod();
|
||||||
|
}
|
||||||
|
inline s64 GetElapsedMicros() const {
|
||||||
|
return (mData.GetCPUCycles() - x0_startTime) / mData.GetTimerFreqO1M();
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static CSWData mData;
|
static CSWData mData;
|
||||||
|
|
|
@ -7,9 +7,7 @@ class CARAMManager {
|
||||||
public:
|
public:
|
||||||
static void Shutdown();
|
static void Shutdown();
|
||||||
static void CollectGarbage();
|
static void CollectGarbage();
|
||||||
static void PreInitializeAlloc(uint size) {
|
static void PreInitializeAlloc(uint size) { mPreInitializeAlloc += size; }
|
||||||
mPreInitializeAlloc += size;
|
|
||||||
}
|
|
||||||
static void Initialize(uint);
|
static void Initialize(uint);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
class CCRC32 {
|
class CCRC32 {
|
||||||
public:
|
public:
|
||||||
static uint Calculate(const void* data, uint length);
|
static uint Calculate(const void* data, uint length);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __CCRC32_HPP__
|
#endif // __CCRC32_HPP__
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
#include "Kyoto/TToken.hpp"
|
|
||||||
#include "Kyoto/IObjectStore.hpp"
|
#include "Kyoto/IObjectStore.hpp"
|
||||||
#include "Kyoto/Streams/CInputStream.hpp"
|
#include "Kyoto/Streams/CInputStream.hpp"
|
||||||
|
#include "Kyoto/TToken.hpp"
|
||||||
|
|
||||||
class CFactoryMgr {
|
class CFactoryMgr {
|
||||||
public:
|
public:
|
||||||
|
@ -24,6 +24,7 @@ private:
|
||||||
rstl::auto_ptr< CObjOwnerDerivedFromIObjUntyped > obj;
|
rstl::auto_ptr< CObjOwnerDerivedFromIObjUntyped > obj;
|
||||||
};
|
};
|
||||||
|
|
||||||
CFactoryFnReturn FStringTableFactory(const SObjectTag& tag, CInputStream& in, const CVParamTransfer& xfer);
|
CFactoryFnReturn FStringTableFactory(const SObjectTag& tag, CInputStream& in,
|
||||||
|
const CVParamTransfer& xfer);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -9,4 +9,4 @@ public:
|
||||||
static void ShutDown();
|
static void ShutDown();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -12,7 +12,8 @@ class IFactory {
|
||||||
public:
|
public:
|
||||||
virtual ~IFactory() {}
|
virtual ~IFactory() {}
|
||||||
virtual CFactoryFnReturn Build(const SObjectTag&, const CVParamTransfer&, CObjectReference*) = 0;
|
virtual CFactoryFnReturn Build(const SObjectTag&, const CVParamTransfer&, CObjectReference*) = 0;
|
||||||
virtual void BuildAsync(const SObjectTag&, const CVParamTransfer&, rstl::auto_ptr< IObj >*, CObjectReference*) = 0;
|
virtual void BuildAsync(const SObjectTag&, const CVParamTransfer&, rstl::auto_ptr< IObj >*,
|
||||||
|
CObjectReference*) = 0;
|
||||||
virtual void CancelBuild(const SObjectTag&) = 0;
|
virtual void CancelBuild(const SObjectTag&) = 0;
|
||||||
virtual bool CanBuild(const SObjectTag&) = 0;
|
virtual bool CanBuild(const SObjectTag&) = 0;
|
||||||
virtual const SObjectTag* GetResourceIdByName(const char* name) const = 0;
|
virtual const SObjectTag* GetResourceIdByName(const char* name) const = 0;
|
||||||
|
|
|
@ -10,6 +10,7 @@ public:
|
||||||
CTimeProvider(const float& time);
|
CTimeProvider(const float& time);
|
||||||
~CTimeProvider();
|
~CTimeProvider();
|
||||||
float GetSecondsMod900() const { return x0_currentTime; }
|
float GetSecondsMod900() const { return x0_currentTime; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const float& x0_currentTime; // in seconds
|
const float& x0_currentTime; // in seconds
|
||||||
bool x4_first;
|
bool x4_first;
|
||||||
|
|
|
@ -16,4 +16,4 @@ private:
|
||||||
static CVector3f sViewingFrom;
|
static CVector3f sViewingFrom;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -88,35 +88,45 @@ public:
|
||||||
static void SetNumIndStages(u8 num);
|
static void SetNumIndStages(u8 num);
|
||||||
static void SetChanAmbColor(EChannelId channel, const GXColor& color);
|
static void SetChanAmbColor(EChannelId channel, const GXColor& color);
|
||||||
static void SetChanMatColor(EChannelId channel, const GXColor& color);
|
static void SetChanMatColor(EChannelId channel, const GXColor& color);
|
||||||
static void SetChanCtrl(EChannelId channel, GXBool enable, GXColorSrc ambSrc, GXColorSrc matSrc, GXLightID lights, GXDiffuseFn diffFn,
|
static void SetChanCtrl(EChannelId channel, GXBool enable, GXColorSrc ambSrc, GXColorSrc matSrc,
|
||||||
GXAttnFn attnFn);
|
GXLightID lights, GXDiffuseFn diffFn, GXAttnFn attnFn);
|
||||||
static void SetTevKColor(GXTevKColorID id, const GXColor& color);
|
static void SetTevKColor(GXTevKColorID id, const GXColor& color);
|
||||||
static void SetTevColorIn(GXTevStageID stageId, GXTevColorArg a, GXTevColorArg b, GXTevColorArg c, GXTevColorArg d);
|
static void SetTevColorIn(GXTevStageID stageId, GXTevColorArg a, GXTevColorArg b, GXTevColorArg c,
|
||||||
static void SetTevAlphaIn(GXTevStageID stageId, GXTevAlphaArg a, GXTevAlphaArg b, GXTevAlphaArg c, GXTevAlphaArg d);
|
GXTevColorArg d);
|
||||||
static void SetTevColorOp(GXTevStageID stageId, GXTevOp op, GXTevBias bias, GXTevScale scale, GXBool clamp, GXTevRegID outReg);
|
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, uint 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(GXTevStageID stageId, GXTevOp op, GXTevBias bias, GXTevScale scale,
|
||||||
|
GXBool clamp, GXTevRegID outReg);
|
||||||
static void SetTevAlphaOp_Compressed(GXTevStageID stageId, uint flags);
|
static void SetTevAlphaOp_Compressed(GXTevStageID stageId, uint flags);
|
||||||
static void SetTevKColorSel(GXTevStageID stageId, GXTevKColorSel sel);
|
static void SetTevKColorSel(GXTevStageID stageId, GXTevKColorSel sel);
|
||||||
static void SetTevKAlphaSel(GXTevStageID stageId, GXTevKAlphaSel sel);
|
static void SetTevKAlphaSel(GXTevStageID stageId, GXTevKAlphaSel sel);
|
||||||
static void SetTevOrder(GXTevStageID stageId, GXTexCoordID texCoord, GXTexMapID texMap, GXChannelID color);
|
static void SetTevOrder(GXTevStageID stageId, GXTexCoordID texCoord, GXTexMapID texMap,
|
||||||
static void SetBlendMode(GXBlendMode mode, GXBlendFactor srcFac, GXBlendFactor dstFac, GXLogicOp op);
|
GXChannelID color);
|
||||||
|
static void SetBlendMode(GXBlendMode mode, GXBlendFactor srcFac, GXBlendFactor dstFac,
|
||||||
|
GXLogicOp op);
|
||||||
static void SetZMode(bool compareEnable, GXCompare func, bool updateEnable);
|
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, u8 ref0, GXAlphaOp op, GXCompare comp1, u8 ref1);
|
||||||
static void SetTevIndirect(GXTevStageID stageId, GXIndTexStageID indStage, GXIndTexFormat fmt, GXIndTexBiasSel biasSel,
|
static void SetTevIndirect(GXTevStageID stageId, GXIndTexStageID indStage, GXIndTexFormat fmt,
|
||||||
GXIndTexMtxID mtxSel, GXIndTexWrap wrapS, GXIndTexWrap wrapT, GXBool addPrev, GXBool indLod,
|
GXIndTexBiasSel biasSel, GXIndTexMtxID mtxSel, GXIndTexWrap wrapS,
|
||||||
|
GXIndTexWrap wrapT, GXBool addPrev, GXBool indLod,
|
||||||
GXIndTexAlphaSel alphaSel);
|
GXIndTexAlphaSel alphaSel);
|
||||||
static void SetTevDirect(GXTevStageID stageId);
|
static void SetTevDirect(GXTevStageID stageId);
|
||||||
static void SetTexCoordGen(GXTexCoordID dstCoord, GXTexGenType fn, GXTexGenSrc src, GXTexMtx mtx, GXBool normalize, GXPTTexMtx postMtx);
|
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 SetArray(GXAttr attr, const void* data, u8 stride);
|
||||||
static void SetFog(GXFogType type, f32 startZ, f32 endZ, f32 nearZ, f32 farZ, const GXColor& color);
|
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 SetLineWidth(u8 width, GXTexOffset offset);
|
||||||
static void SetIndTexMtxSTPointFive(GXIndTexMtxID id, s8 scaleExp);
|
static void SetIndTexMtxSTPointFive(GXIndTexMtxID id, s8 scaleExp);
|
||||||
static void SetVtxDescv_Compressed(uint flags);
|
static void SetVtxDescv_Compressed(uint flags);
|
||||||
static void SetVtxDesc(GXAttr attr, GXAttrType type); // name?
|
static void SetVtxDesc(GXAttr attr, GXAttrType type); // name?
|
||||||
static void ResetVtxDescv(); // name?
|
static void ResetVtxDescv(); // name?
|
||||||
static void SetVtxDescv(const GXVtxDescList* list);
|
static void SetVtxDescv(const GXVtxDescList* list);
|
||||||
static void SetStandardDirectTev_Compressed(GXTevStageID stageId, uint colorArgs, uint alphaArgs, uint colorOps, uint alphaOps);
|
static void SetStandardDirectTev_Compressed(GXTevStageID stageId, uint colorArgs, uint alphaArgs,
|
||||||
|
uint colorOps, uint alphaOps);
|
||||||
static void SetStandardTevColorAlphaOp(GXTevStageID stageId);
|
static void SetStandardTevColorAlphaOp(GXTevStageID stageId);
|
||||||
|
|
||||||
static void CallDisplayList(const void* ptr, size_t size);
|
static void CallDisplayList(const void* ptr, size_t size);
|
||||||
|
@ -126,11 +136,12 @@ public:
|
||||||
static void ResetGXStatesFull(); // name?
|
static void ResetGXStatesFull(); // name?
|
||||||
|
|
||||||
static inline void LoadTexMtxImm(const f32 mtx[][4], unsigned long id, GXTexMtxType type) {
|
static inline void LoadTexMtxImm(const f32 mtx[][4], unsigned long id, GXTexMtxType type) {
|
||||||
GXLoadTexMtxImm(const_cast<MtxPtr>(mtx), id, type);
|
GXLoadTexMtxImm(const_cast< MtxPtr >(mtx), id, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
static GXColor GetChanAmbColor(EChannelId channel);
|
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, f32* fogStartZ, f32* fogEndZ, f32* fogNearZ, f32* fogFarZ,
|
||||||
|
GXColor* fogColor);
|
||||||
|
|
||||||
static inline bool CompareGXColors(const GXColor& lhs, const GXColor& rhs) {
|
static inline bool CompareGXColors(const GXColor& lhs, const GXColor& rhs) {
|
||||||
return *reinterpret_cast< const uint* >(&lhs) == *reinterpret_cast< const uint* >(&rhs);
|
return *reinterpret_cast< const uint* >(&lhs) == *reinterpret_cast< const uint* >(&rhs);
|
||||||
|
@ -146,12 +157,15 @@ private:
|
||||||
static void update_fog(uint flags);
|
static void update_fog(uint flags);
|
||||||
static void apply_fog() {
|
static void apply_fog() {
|
||||||
static const GXColor black = {0, 0, 0, 0};
|
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,
|
GXSetFog(static_cast< GXFogType >(sGXState.x53_fogType), sGXState.x24c_fogParams.x0_fogStartZ,
|
||||||
sGXState.x24c_fogParams.x8_fogNearZ, sGXState.x24c_fogParams.xc_fogFarZ,
|
sGXState.x24c_fogParams.x4_fogEndZ, sGXState.x24c_fogParams.x8_fogNearZ,
|
||||||
(sGXState.x56_blendMode & (7 << 5)) == (GX_BL_ONE << 5) ? black : sGXState.x24c_fogParams.x10_fogColor);
|
sGXState.x24c_fogParams.xc_fogFarZ,
|
||||||
|
(sGXState.x56_blendMode & (7 << 5)) == (GX_BL_ONE << 5)
|
||||||
|
? black
|
||||||
|
: sGXState.x24c_fogParams.x10_fogColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
static SGXState sGXState;
|
static SGXState sGXState;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
#include "Kyoto/Graphics/CColor.hpp"
|
#include "Kyoto/Graphics/CColor.hpp"
|
||||||
#include "Kyoto/Math/CVector3f.hpp"
|
|
||||||
#include "Kyoto/Math/CTransform4f.hpp"
|
#include "Kyoto/Math/CTransform4f.hpp"
|
||||||
|
#include "Kyoto/Math/CVector3f.hpp"
|
||||||
|
|
||||||
#include "Kyoto/Graphics/CTevCombiners.hpp"
|
#include "Kyoto/Graphics/CTevCombiners.hpp"
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
#ifndef __CLIGHT_HPP__
|
#ifndef __CLIGHT_HPP__
|
||||||
#define __CLIGHT_HPP__
|
#define __CLIGHT_HPP__
|
||||||
|
|
||||||
|
class CLight {};
|
||||||
class CLight {
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // __CLIGHT_HPP__
|
#endif // __CLIGHT_HPP__
|
||||||
|
|
|
@ -24,17 +24,32 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
CModelFlags(ETrans trans, f32 rgba)
|
CModelFlags(ETrans trans, f32 rgba)
|
||||||
: x0_blendMode(trans), x1_matSetIdx(0), x2_flags(kF_DepthCompare | kF_DepthUpdate), x4_color(rgba, rgba, rgba, rgba) {}
|
: x0_blendMode(trans)
|
||||||
|
, x1_matSetIdx(0)
|
||||||
|
, x2_flags(kF_DepthCompare | kF_DepthUpdate)
|
||||||
|
, x4_color(rgba, rgba, rgba, rgba) {}
|
||||||
CModelFlags(ETrans trans, CColor color)
|
CModelFlags(ETrans trans, CColor color)
|
||||||
: x0_blendMode(trans), x1_matSetIdx(0), x2_flags(kF_DepthCompare | kF_DepthUpdate), x4_color(color) {}
|
: x0_blendMode(trans)
|
||||||
|
, x1_matSetIdx(0)
|
||||||
|
, x2_flags(kF_DepthCompare | kF_DepthUpdate)
|
||||||
|
, x4_color(color) {}
|
||||||
CModelFlags(const CModelFlags& flags, uint 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) {}
|
: 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? */, int 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) {}
|
: x0_blendMode(flags.x0_blendMode)
|
||||||
|
, x1_matSetIdx(shaderSet)
|
||||||
|
, x2_flags(flags.x2_flags)
|
||||||
|
, x4_color(flags.x4_color) {}
|
||||||
|
|
||||||
// ?
|
// ?
|
||||||
CModelFlags(const CModelFlags& flags, ETrans trans, CColor color)
|
CModelFlags(const CModelFlags& flags, ETrans trans, CColor color)
|
||||||
: x0_blendMode(trans), x1_matSetIdx(flags.x1_matSetIdx), x2_flags(flags.x2_flags), x4_color(color) {}
|
: x0_blendMode(trans)
|
||||||
|
, x1_matSetIdx(flags.x1_matSetIdx)
|
||||||
|
, x2_flags(flags.x2_flags)
|
||||||
|
, x4_color(color) {}
|
||||||
|
|
||||||
CModelFlags UseShaderSet(int matSet) { return CModelFlags(*this, false, matSet); }
|
CModelFlags UseShaderSet(int matSet) { return CModelFlags(*this, false, matSet); }
|
||||||
CModelFlags DontLoadTextures() { return CModelFlags(*this, GetOtherFlags() | kF_NoTextureLock); }
|
CModelFlags DontLoadTextures() { return CModelFlags(*this, GetOtherFlags() | kF_NoTextureLock); }
|
||||||
|
@ -75,4 +90,4 @@ private:
|
||||||
};
|
};
|
||||||
CHECK_SIZEOF(CModelFlags, 0x8)
|
CHECK_SIZEOF(CModelFlags, 0x8)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -99,4 +99,4 @@ extern CTevCombiners::CTevPass CTevPass_805a5ebc;
|
||||||
// TODO move to CGraphics
|
// TODO move to CGraphics
|
||||||
extern CTevCombiners::CTevPass* PTR_skPassThru_805a8828;
|
extern CTevCombiners::CTevPass* PTR_skPassThru_805a8828;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -31,4 +31,4 @@ private:
|
||||||
u8 pad[0x68];
|
u8 pad[0x68];
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -32,7 +32,8 @@ public:
|
||||||
static inline rstl::auto_ptr< TObjOwnerDerivedFromIObj< T > > GetNewDerivedObject(T* obj) {
|
static inline rstl::auto_ptr< TObjOwnerDerivedFromIObj< T > > GetNewDerivedObject(T* obj) {
|
||||||
return new TObjOwnerDerivedFromIObj< T >(obj);
|
return new TObjOwnerDerivedFromIObj< T >(obj);
|
||||||
}
|
}
|
||||||
static inline rstl::auto_ptr< TObjOwnerDerivedFromIObj< T > > GetNewDerivedObject(const rstl::auto_ptr< T >& obj) {
|
static inline rstl::auto_ptr< TObjOwnerDerivedFromIObj< T > >
|
||||||
|
GetNewDerivedObject(const rstl::auto_ptr< T >& obj) {
|
||||||
return new TObjOwnerDerivedFromIObj< T >(obj);
|
return new TObjOwnerDerivedFromIObj< T >(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,4 +42,4 @@ private:
|
||||||
TObjOwnerDerivedFromIObj(const rstl::auto_ptr< T >& obj) : CObjOwnerDerivedFromIObjUntyped(obj) {}
|
TObjOwnerDerivedFromIObj(const rstl::auto_ptr< T >& obj) : CObjOwnerDerivedFromIObjUntyped(obj) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -39,7 +39,8 @@ public:
|
||||||
// , x10_object(obj.release())
|
// , x10_object(obj.release())
|
||||||
// , x14_params(CVParamTransfer::Null()) {}
|
// , x14_params(CVParamTransfer::Null()) {}
|
||||||
|
|
||||||
CObjectReference(IObjectStore* store, const rstl::auto_ptr< IObj >& obj, SObjectTag tag, CVParamTransfer xfer);
|
CObjectReference(IObjectStore* store, const rstl::auto_ptr< IObj >& obj, SObjectTag tag,
|
||||||
|
CVParamTransfer xfer);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
u16 x0_refCount;
|
u16 x0_refCount;
|
||||||
|
@ -51,6 +52,8 @@ private:
|
||||||
CVParamTransfer x14_params;
|
CVParamTransfer x14_params;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class CToken;
|
||||||
|
|
||||||
class IObjectStore {
|
class IObjectStore {
|
||||||
public:
|
public:
|
||||||
virtual CToken GetObj(const SObjectTag& tag, CVParamTransfer xfer) = 0;
|
virtual CToken GetObj(const SObjectTag& tag, CVParamTransfer xfer) = 0;
|
||||||
|
|
|
@ -8,6 +8,7 @@ public:
|
||||||
float GetRelativeValue() const { return x0_relative; }
|
float GetRelativeValue() const { return x0_relative; }
|
||||||
void SetAbsoluteValue(float val) { x4_absolute = val; }
|
void SetAbsoluteValue(float val) { x4_absolute = val; }
|
||||||
float GetAbsoluteValue() const { return x4_absolute; }
|
float GetAbsoluteValue() const { return x4_absolute; }
|
||||||
|
|
||||||
public:
|
public:
|
||||||
float x0_relative;
|
float x0_relative;
|
||||||
float x4_absolute;
|
float x4_absolute;
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
#include "Kyoto/Input/CControllerAxis.hpp"
|
#include "Kyoto/Input/CControllerAxis.hpp"
|
||||||
#include "Kyoto/Input/CControllerButton.hpp"
|
#include "Kyoto/Input/CControllerButton.hpp"
|
||||||
|
#include "Kyoto/Input/InputTypes.hpp"
|
||||||
|
|
||||||
class CControllerGamepadData {
|
class CControllerGamepadData {
|
||||||
public:
|
public:
|
||||||
|
@ -15,7 +16,9 @@ public:
|
||||||
const CControllerButton& GetButton(EButton button) const { return x34_buttons[button]; }
|
const CControllerButton& GetButton(EButton button) const { return x34_buttons[button]; }
|
||||||
CControllerButton& GetButton(EButton button) { return x34_buttons[button]; }
|
CControllerButton& GetButton(EButton button) { return x34_buttons[button]; }
|
||||||
|
|
||||||
const CControllerAxis& GetAnalogButton(EAnalogButton button) const { return x24_triggers[button]; }
|
const CControllerAxis& GetAnalogButton(EAnalogButton button) const {
|
||||||
|
return x24_triggers[button];
|
||||||
|
}
|
||||||
CControllerAxis& GetAnalogButton(EAnalogButton button) { return x24_triggers[button]; }
|
CControllerAxis& GetAnalogButton(EAnalogButton button) { return x24_triggers[button]; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -10,16 +10,16 @@ class CDolphinController : public IController {
|
||||||
static const uint skTypeWavebird;
|
static const uint skTypeWavebird;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CDolphinController();
|
CDolphinController();
|
||||||
virtual ~CDolphinController();
|
virtual ~CDolphinController();
|
||||||
void Poll();
|
void Poll();
|
||||||
uint GetDeviceCount() const;
|
uint GetDeviceCount() const;
|
||||||
CControllerGamepadData& GetGamepadData(int controller);
|
CControllerGamepadData& GetGamepadData(int controller);
|
||||||
uint GetControllerType(int) const;
|
uint GetControllerType(int) const;
|
||||||
void SetMotorState(EIOPort port, EMotorState state);
|
void SetMotorState(EIOPort port, EMotorState state);
|
||||||
bool Initialize();
|
bool Initialize();
|
||||||
|
|
||||||
float GetAnalogStickMaxValue(EJoyAxis axis) const;
|
float GetAnalogStickMaxValue(EJoyAxis axis) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void ReadDevices();
|
void ReadDevices();
|
||||||
|
|
|
@ -20,4 +20,4 @@ private:
|
||||||
bool xf0_24_disabled : 1;
|
bool xf0_24_disabled : 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -54,4 +54,4 @@ private:
|
||||||
u8 x2e_lastId;
|
u8 x2e_lastId;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -3,28 +3,27 @@
|
||||||
|
|
||||||
#include <types.h>
|
#include <types.h>
|
||||||
|
|
||||||
#include "Kyoto/Input/InputTypes.hpp"
|
|
||||||
#include "Kyoto/Input/CControllerGamepadData.hpp"
|
#include "Kyoto/Input/CControllerGamepadData.hpp"
|
||||||
|
#include "Kyoto/Input/InputTypes.hpp"
|
||||||
|
|
||||||
class COsContext;
|
class COsContext;
|
||||||
class IController {
|
class IController {
|
||||||
protected:
|
protected:
|
||||||
static const float kAbsoluteMinimum;
|
static const float kAbsoluteMinimum;
|
||||||
static const float kAbsoluteMaximum;
|
static const float kAbsoluteMaximum;
|
||||||
static const float kRelativeMinimum;
|
static const float kRelativeMinimum;
|
||||||
static const float kRelativeMaximum;
|
static const float kRelativeMaximum;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
IController();
|
IController();
|
||||||
virtual ~IController();
|
virtual ~IController();
|
||||||
virtual void Poll()=0;
|
virtual void Poll() = 0;
|
||||||
virtual uint GetDeviceCount() const = 0;
|
virtual uint GetDeviceCount() const = 0;
|
||||||
virtual CControllerGamepadData& GetGamepadData(int controller) = 0;
|
virtual CControllerGamepadData& GetGamepadData(int controller) = 0;
|
||||||
virtual uint GetControllerType(int) const = 0;
|
virtual uint GetControllerType(int) const = 0;
|
||||||
virtual void SetMotorState(EIOPort port, EMotorState state) = 0;
|
virtual void SetMotorState(EIOPort port, EMotorState state) = 0;
|
||||||
|
|
||||||
static IController* Create(const COsContext& ctx);
|
static IController* Create(const COsContext& ctx);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __ICONTROLLER_HPP__
|
#endif // __ICONTROLLER_HPP__
|
||||||
|
|
|
@ -16,13 +16,7 @@ enum EMotorState {
|
||||||
kMS_StopHard = PAD_MOTOR_STOP_HARD,
|
kMS_StopHard = PAD_MOTOR_STOP_HARD,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum EJoyAxis {
|
enum EJoyAxis { kJA_LeftX, kJA_LeftY, kJA_RightX, kJA_RightY, kJA_MAX };
|
||||||
kJA_LeftX,
|
|
||||||
kJA_LeftY,
|
|
||||||
kJA_RightX,
|
|
||||||
kJA_RightY,
|
|
||||||
kJA_MAX
|
|
||||||
};
|
|
||||||
|
|
||||||
enum EButton {
|
enum EButton {
|
||||||
kBU_A,
|
kBU_A,
|
||||||
|
@ -40,10 +34,6 @@ enum EButton {
|
||||||
kBU_MAX,
|
kBU_MAX,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum EAnalogButton {
|
enum EAnalogButton { kBA_Left, kBA_Right, kBA_MAX };
|
||||||
kBA_Left,
|
|
||||||
kBA_Right,
|
|
||||||
kBA_MAX
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // __INPUTTYPES_HPP__
|
#endif // __INPUTTYPES_HPP__
|
||||||
|
|
|
@ -8,7 +8,7 @@ public:
|
||||||
CAABox() {
|
CAABox() {
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
CAABox(const CVector3f& min, const CVector3f& max);// : min(min), max(max) {}
|
CAABox(const CVector3f& min, const CVector3f& max); // : min(min), max(max) {}
|
||||||
CAABox(const CAABox& other) : min(other.min), max(other.max) {}
|
CAABox(const CAABox& other) : min(other.min), max(other.max) {}
|
||||||
|
|
||||||
CVector3f ClosestPointAlongVector(const CVector3f& vec) const;
|
CVector3f ClosestPointAlongVector(const CVector3f& vec) const;
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
|
|
||||||
#include "Kyoto/Math/CVector3f.hpp"
|
#include "Kyoto/Math/CVector3f.hpp"
|
||||||
|
|
||||||
#include "rstl/reserved_vector.hpp"
|
|
||||||
#include "rstl/optional_object.hpp"
|
#include "rstl/optional_object.hpp"
|
||||||
|
#include "rstl/reserved_vector.hpp"
|
||||||
|
|
||||||
class CAABox;
|
class CAABox;
|
||||||
class CSphere;
|
class CSphere;
|
||||||
|
@ -30,4 +30,4 @@ private:
|
||||||
rstl::reserved_vector< CPlane, 6 > x0_planes;
|
rstl::reserved_vector< CPlane, 6 > x0_planes;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -17,4 +17,4 @@ private:
|
||||||
};
|
};
|
||||||
CHECK_SIZEOF(CMatrix3f, 0x24);
|
CHECK_SIZEOF(CMatrix3f, 0x24);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -24,4 +24,4 @@ private:
|
||||||
};
|
};
|
||||||
CHECK_SIZEOF(CMatrix4f, 0x40);
|
CHECK_SIZEOF(CMatrix4f, 0x40);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -14,4 +14,4 @@ private:
|
||||||
f32 z;
|
f32 z;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -15,4 +15,4 @@ private:
|
||||||
};
|
};
|
||||||
CHECK_SIZEOF(CPlane, 0x10)
|
CHECK_SIZEOF(CPlane, 0x10)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -23,4 +23,4 @@ private:
|
||||||
static const CQuaternion sNoRotation;
|
static const CQuaternion sNoRotation;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -27,7 +27,7 @@ public:
|
||||||
CVector3f GetRight() const { return CVector3f(m0.GetX(), m1.GetX(), m2.GetX()); }
|
CVector3f GetRight() const { return CVector3f(m0.GetX(), m1.GetX(), m2.GetX()); }
|
||||||
CVector3f GetForward() const { return CVector3f(m0.GetY(), m1.GetY(), m2.GetY()); }
|
CVector3f GetForward() const { return CVector3f(m0.GetY(), m1.GetY(), m2.GetY()); }
|
||||||
CVector3f GetUp() const { return CVector3f(m0.GetZ(), m1.GetZ(), m2.GetZ()); }
|
CVector3f GetUp() const { return CVector3f(m0.GetZ(), m1.GetZ(), m2.GetZ()); }
|
||||||
ConstMtxPtr GetCStyleMatrix() const { return reinterpret_cast<ConstMtxPtr>(this); }
|
ConstMtxPtr GetCStyleMatrix() const { return reinterpret_cast< ConstMtxPtr >(this); }
|
||||||
|
|
||||||
CMatrix3f BuildMatrix3f() const;
|
CMatrix3f BuildMatrix3f() const;
|
||||||
f32 Get00() const { return m0.GetX(); }
|
f32 Get00() const { return m0.GetX(); }
|
||||||
|
@ -93,7 +93,8 @@ public:
|
||||||
CTransform4f operator*(const CTransform4f& vec) const;
|
CTransform4f operator*(const CTransform4f& vec) const;
|
||||||
CTransform4f operator*(const CVector3f& vec) const;
|
CTransform4f operator*(const CVector3f& vec) const;
|
||||||
|
|
||||||
static CTransform4f FromColumns(const CVector3f&, const CVector3f&, const CVector3f&, const CVector3f&);
|
static CTransform4f FromColumns(const CVector3f&, const CVector3f&, const CVector3f&,
|
||||||
|
const CVector3f&);
|
||||||
static const CTransform4f& Identity() { return sIdentity; }
|
static const CTransform4f& Identity() { return sIdentity; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -10,7 +10,7 @@ public:
|
||||||
f32 GetX() const { return mX; }
|
f32 GetX() const { return mX; }
|
||||||
f32 GetY() const { return mY; }
|
f32 GetY() const { return mY; }
|
||||||
|
|
||||||
// private:
|
// private:
|
||||||
f32 mX;
|
f32 mX;
|
||||||
f32 mY;
|
f32 mY;
|
||||||
};
|
};
|
||||||
|
|
|
@ -9,4 +9,4 @@ private:
|
||||||
int y;
|
int y;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -9,4 +9,4 @@ public:
|
||||||
static void ShutDown();
|
static void ShutDown();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -10,34 +10,34 @@
|
||||||
class CWarp;
|
class CWarp;
|
||||||
class CParticleGen {
|
class CParticleGen {
|
||||||
public:
|
public:
|
||||||
virtual ~CParticleGen() = 0;
|
virtual ~CParticleGen() = 0;
|
||||||
virtual void Update(double) = 0;
|
virtual void Update(double) = 0;
|
||||||
virtual void Render() const = 0;
|
virtual void Render() const = 0;
|
||||||
virtual void SetOrientation(const CTransform4f& orientation) = 0;
|
virtual void SetOrientation(const CTransform4f& orientation) = 0;
|
||||||
virtual void SetTranslation(const CVector3f& translation) = 0;
|
virtual void SetTranslation(const CVector3f& translation) = 0;
|
||||||
virtual void SetGlobalOrientation(const CTransform4f& orientation) = 0;
|
virtual void SetGlobalOrientation(const CTransform4f& orientation) = 0;
|
||||||
virtual void SetGlobalTranslation(const CVector3f& translation) = 0;
|
virtual void SetGlobalTranslation(const CVector3f& translation) = 0;
|
||||||
virtual void SetGlobalScale(const CVector3f& scale) = 0;
|
virtual void SetGlobalScale(const CVector3f& scale) = 0;
|
||||||
virtual void SetLocalScale(const CVector3f& scale) = 0;
|
virtual void SetLocalScale(const CVector3f& scale) = 0;
|
||||||
virtual void SetParticleEmission(bool emission) = 0;
|
virtual void SetParticleEmission(bool emission) = 0;
|
||||||
virtual void SetModulationColor(const CColor& col) = 0;
|
virtual void SetModulationColor(const CColor& col) = 0;
|
||||||
virtual void SetGeneratorRate(float rate) {}
|
virtual void SetGeneratorRate(float rate) {}
|
||||||
virtual CTransform4f GetOrientation() const = 0;
|
virtual CTransform4f GetOrientation() const = 0;
|
||||||
virtual CVector3f GetTranslation() const = 0;
|
virtual CVector3f GetTranslation() const = 0;
|
||||||
virtual CTransform4f GetGlobalOrientation() const = 0;
|
virtual CTransform4f GetGlobalOrientation() const = 0;
|
||||||
virtual CVector3f GetGlobalTranslation() const = 0;
|
virtual CVector3f GetGlobalTranslation() const = 0;
|
||||||
virtual CVector3f GetGlobalScale() const = 0;
|
virtual CVector3f GetGlobalScale() const = 0;
|
||||||
virtual bool GetParticleEmission() const = 0;
|
virtual bool GetParticleEmission() const = 0;
|
||||||
virtual CColor GetModulationColor() const = 0;
|
virtual CColor GetModulationColor() const = 0;
|
||||||
virtual float GetGeneratorRate() const { return 1.f; }
|
virtual float GetGeneratorRate() const { return 1.f; }
|
||||||
virtual bool IsSystemDeletable() const = 0;
|
virtual bool IsSystemDeletable() const = 0;
|
||||||
virtual CAABox GetBounds() const = 0;
|
virtual CAABox GetBounds() const = 0;
|
||||||
virtual int GetParticleCOunt() const = 0;
|
virtual int GetParticleCOunt() const = 0;
|
||||||
virtual bool SystemHasLight() const = 0;
|
virtual bool SystemHasLight() const = 0;
|
||||||
virtual CLight GetLight() = 0;
|
virtual CLight GetLight() = 0;
|
||||||
virtual void DestroyParticles() = 0;
|
virtual void DestroyParticles() = 0;
|
||||||
virtual void AddModifier(CWarp*) = 0;
|
virtual void AddModifier(CWarp*) = 0;
|
||||||
virtual uint Get4CharId() const = 0;
|
virtual uint Get4CharId() const = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // _CPARTICLEGEN_HPP
|
#endif // _CPARTICLEGEN_HPP
|
||||||
|
|
|
@ -27,7 +27,7 @@ public:
|
||||||
void Get(void* dest, unsigned long len);
|
void Get(void* dest, unsigned long len);
|
||||||
|
|
||||||
template < typename T >
|
template < typename T >
|
||||||
inline T Get(const TType<T>& type) {
|
inline T Get(const TType< T >& type) {
|
||||||
return cinput_stream_helper(type, *this);
|
return cinput_stream_helper(type, *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,7 +65,8 @@ inline float cinput_stream_helper(const TType< float >& type, CInputStream& in)
|
||||||
// rstl
|
// rstl
|
||||||
#include "rstl/pair.hpp"
|
#include "rstl/pair.hpp"
|
||||||
template < typename L, typename R >
|
template < typename L, typename R >
|
||||||
inline rstl::pair< L, R > cinput_stream_helper(const TType< rstl::pair< L, R > >& type, CInputStream& in) {
|
inline rstl::pair< L, R > cinput_stream_helper(const TType< rstl::pair< L, R > >& type,
|
||||||
|
CInputStream& in) {
|
||||||
rstl::pair< L, R > result;
|
rstl::pair< L, R > result;
|
||||||
result.first = in.Get(TType< L >());
|
result.first = in.Get(TType< L >());
|
||||||
result.second = in.Get(TType< R >());
|
result.second = in.Get(TType< R >());
|
||||||
|
|
|
@ -19,4 +19,4 @@ private:
|
||||||
unkptr x30_zstream;
|
unkptr x30_zstream;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -23,7 +23,8 @@ public:
|
||||||
static inline rstl::auto_ptr< TObjOwnerDerivedFromIObj< T > > GetIObjObjectFor(T* obj) {
|
static inline rstl::auto_ptr< TObjOwnerDerivedFromIObj< T > > GetIObjObjectFor(T* obj) {
|
||||||
return TObjOwnerDerivedFromIObj< T >::GetNewDerivedObject(obj);
|
return TObjOwnerDerivedFromIObj< T >::GetNewDerivedObject(obj);
|
||||||
}
|
}
|
||||||
static inline rstl::auto_ptr< TObjOwnerDerivedFromIObj< T > > GetIObjObjectFor(const rstl::auto_ptr< T >& obj) {
|
static inline rstl::auto_ptr< TObjOwnerDerivedFromIObj< T > >
|
||||||
|
GetIObjObjectFor(const rstl::auto_ptr< T >& obj) {
|
||||||
return TObjOwnerDerivedFromIObj< T >::GetNewDerivedObject(obj);
|
return TObjOwnerDerivedFromIObj< T >::GetNewDerivedObject(obj);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -45,7 +46,9 @@ class TLockedToken {
|
||||||
public:
|
public:
|
||||||
TLockedToken() {}
|
TLockedToken() {}
|
||||||
TLockedToken(const CToken& token) : x0_token(token), x8_item(*x0_token) {}
|
TLockedToken(const CToken& token) : x0_token(token), x8_item(*x0_token) {}
|
||||||
TLockedToken(const TLockedToken< T >& token) : x0_token(token), x8_item(*token) { x0_token.Lock(); }
|
TLockedToken(const TLockedToken< T >& token) : x0_token(token), x8_item(*token) {
|
||||||
|
x0_token.Lock();
|
||||||
|
}
|
||||||
|
|
||||||
TLockedToken& operator=(const TLockedToken< T >& token) {
|
TLockedToken& operator=(const TLockedToken< T >& token) {
|
||||||
x0_token = token;
|
x0_token = token;
|
||||||
|
@ -61,4 +64,4 @@ private:
|
||||||
T* x8_item;
|
T* x8_item;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -24,9 +24,7 @@ public:
|
||||||
CRasterFont(CInputStream&, IObjectStore*);
|
CRasterFont(CInputStream&, IObjectStore*);
|
||||||
~CRasterFont();
|
~CRasterFont();
|
||||||
|
|
||||||
void SetTexture(TToken<CTexture> token) {
|
void SetTexture(TToken< CTexture > token) { x7c_texture = token; }
|
||||||
x7c_texture = token;
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool x0_initialized;
|
bool x0_initialized;
|
||||||
|
|
|
@ -30,7 +30,8 @@ public:
|
||||||
virtual void AddParticleGen1();
|
virtual void AddParticleGen1();
|
||||||
virtual void AddParticleGen2();
|
virtual void AddParticleGen2();
|
||||||
virtual void AddPlaneObject();
|
virtual void AddPlaneObject();
|
||||||
virtual void AddDrawable(const void* obj, const CVector3f& pos, const CAABox& bounds, int 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 SetDrawableCallback();
|
||||||
virtual void SetWorldViewpoint();
|
virtual void SetWorldViewpoint();
|
||||||
virtual void SetPerspective1();
|
virtual void SetPerspective1();
|
||||||
|
|
|
@ -22,4 +22,4 @@ namespace Renderer {
|
||||||
IRenderer* AllocateRenderer(IObjectStore&, COsContext&, CMemorySys&, CResFactory&);
|
IRenderer* AllocateRenderer(IObjectStore&, COsContext&, CMemorySys&, CResFactory&);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -10,5 +10,4 @@ void EnableMetroTRKInterrupts(void);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#endif /* #ifndef __TRKINIT_H__ */
|
#endif /* #ifndef __TRKINIT_H__ */
|
||||||
|
|
|
@ -207,8 +207,9 @@ public:
|
||||||
kSS_Done,
|
kSS_Done,
|
||||||
};
|
};
|
||||||
|
|
||||||
CActor(TUniqueId uid, bool active, const rstl::string& name, const CEntityInfo& info, const CTransform4f& xf, const CModelData& mData,
|
CActor(TUniqueId uid, bool active, const rstl::string& name, const CEntityInfo& info,
|
||||||
const CMaterialList& list, const CActorParameters& params, TUniqueId nextDrawNode);
|
const CTransform4f& xf, const CModelData& mData, const CMaterialList& list,
|
||||||
|
const CActorParameters& params, TUniqueId nextDrawNode);
|
||||||
~CActor() override;
|
~CActor() override;
|
||||||
|
|
||||||
void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr) override;
|
void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr) override;
|
||||||
|
@ -221,24 +222,28 @@ public:
|
||||||
virtual void CalculateRenderBounds();
|
virtual void CalculateRenderBounds();
|
||||||
virtual CHealthInfo* HealthInfo(CStateManager&);
|
virtual CHealthInfo* HealthInfo(CStateManager&);
|
||||||
virtual const CDamageVulnerability* GetDamageVulnerability() const;
|
virtual const CDamageVulnerability* GetDamageVulnerability() const;
|
||||||
virtual const CDamageVulnerability* GetDamageVulnerability(const CVector3f&, const CVector3f&, const CDamageInfo&) const;
|
virtual const CDamageVulnerability* GetDamageVulnerability(const CVector3f&, const CVector3f&,
|
||||||
|
const CDamageInfo&) const;
|
||||||
virtual rstl::optional_object< CAABox > GetTouchBounds() const;
|
virtual rstl::optional_object< CAABox > GetTouchBounds() const;
|
||||||
virtual void Touch(CActor&, CStateManager&);
|
virtual void Touch(CActor&, CStateManager&);
|
||||||
virtual CVector3f GetOrbitPosition(const CStateManager&) const;
|
virtual CVector3f GetOrbitPosition(const CStateManager&) const;
|
||||||
virtual CVector3f GetAimPosition(const CStateManager&, float) const;
|
virtual CVector3f GetAimPosition(const CStateManager&, float) const;
|
||||||
virtual CVector3f GetHomingPosition(const CStateManager&, float) const;
|
virtual CVector3f GetHomingPosition(const CStateManager&, float) const;
|
||||||
virtual CVector3f GetScanObjectIndicatorPosition(const CStateManager&) const;
|
virtual CVector3f GetScanObjectIndicatorPosition(const CStateManager&) const;
|
||||||
virtual EWeaponCollisionResponseTypes GetCollisionResponseType(const CVector3f&, const CVector3f&, const CWeaponMode&,
|
virtual EWeaponCollisionResponseTypes GetCollisionResponseType(const CVector3f&, const CVector3f&,
|
||||||
|
const CWeaponMode&,
|
||||||
int /*EProjectileAttrib?*/) const;
|
int /*EProjectileAttrib?*/) const;
|
||||||
virtual void FluidFXThink(EFluidState, CScriptWater&, CStateManager&);
|
virtual void FluidFXThink(EFluidState, CScriptWater&, CStateManager&);
|
||||||
virtual void OnScanStateChange(EScanState, CStateManager&);
|
virtual void OnScanStateChange(EScanState, CStateManager&);
|
||||||
virtual CAABox GetSortingBounds(const CTransform4f&) const;
|
virtual CAABox GetSortingBounds(const CTransform4f&) const;
|
||||||
virtual void DoUserAnimEvent(CStateManager& mgr, const CInt32POINode& node, EUserEventType type, float dt);
|
virtual void DoUserAnimEvent(CStateManager& mgr, const CInt32POINode& node, EUserEventType type,
|
||||||
|
float dt);
|
||||||
|
|
||||||
SAdvancementDeltas UpdateAnimation(float dt, CStateManager& mgr, bool advTree);
|
SAdvancementDeltas 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,
|
void ProcessSoundEvent(int sfxId, f32 weight, int flags, f32 fallOff, f32 maxDist, u8 minVol,
|
||||||
const CVector3f& position, int aid, CStateManager& mgr, bool translateId);
|
u8 maxVol, const CVector3f& toListener, const CVector3f& position, int aid,
|
||||||
|
CStateManager& mgr, bool translateId);
|
||||||
|
|
||||||
void UpdateSfxEmitters();
|
void UpdateSfxEmitters();
|
||||||
void RemoveEmitter();
|
void RemoveEmitter();
|
||||||
|
@ -264,7 +269,9 @@ public:
|
||||||
/// ????
|
/// ????
|
||||||
bool NullModel() const { return !GetAnimationData() && !GetModelData()->HasNormalModel(); }
|
bool NullModel() const { return !GetAnimationData() && !GetModelData()->HasNormalModel(); }
|
||||||
|
|
||||||
bool HasModelData() const { return GetModelData() && (GetModelData()->HasAnimation() || GetModelData()->HasNormalModel()); }
|
bool HasModelData() const {
|
||||||
|
return GetModelData() && (GetModelData()->HasAnimation() || GetModelData()->HasNormalModel());
|
||||||
|
}
|
||||||
CModelData* ModelData() { return x64_modelData.get(); }
|
CModelData* ModelData() { return x64_modelData.get(); }
|
||||||
const CModelData* GetModelData() const { return x64_modelData.get(); }
|
const CModelData* GetModelData() const { return x64_modelData.get(); }
|
||||||
|
|
||||||
|
|
|
@ -85,4 +85,4 @@ private:
|
||||||
};
|
};
|
||||||
CHECK_SIZEOF(CActorLights, 0x2e0)
|
CHECK_SIZEOF(CActorLights, 0x2e0)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -14,4 +14,4 @@ private:
|
||||||
// TODO
|
// TODO
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -80,7 +80,8 @@ public:
|
||||||
CVisorParameters() {
|
CVisorParameters() {
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
CVisorParameters(u8 mask, bool b1, bool scanPassthrough) : x0_mask(mask), x0_4_b1(b1), x0_5_scanPassthrough(scanPassthrough) {}
|
CVisorParameters(u8 mask, bool b1, bool scanPassthrough)
|
||||||
|
: x0_mask(mask), x0_4_b1(b1), x0_5_scanPassthrough(scanPassthrough) {}
|
||||||
|
|
||||||
u8 GetMask() const { return x0_mask; }
|
u8 GetMask() const { return x0_mask; }
|
||||||
// TODO: GetIsBlockXRay__16CVisorParametersCFv?
|
// TODO: GetIsBlockXRay__16CVisorParametersCFv?
|
||||||
|
@ -133,4 +134,4 @@ private:
|
||||||
};
|
};
|
||||||
CHECK_SIZEOF(CActorParameters, 0x68)
|
CHECK_SIZEOF(CActorParameters, 0x68)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -35,4 +35,4 @@ private:
|
||||||
};
|
};
|
||||||
CHECK_SIZEOF(CAdditiveAnimPlayback, 0x24)
|
CHECK_SIZEOF(CAdditiveAnimPlayback, 0x24)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -11,8 +11,8 @@
|
||||||
#include "MetroidPrime/CParticleDatabase.hpp"
|
#include "MetroidPrime/CParticleDatabase.hpp"
|
||||||
#include "MetroidPrime/CPoseAsTransforms.hpp"
|
#include "MetroidPrime/CPoseAsTransforms.hpp"
|
||||||
|
|
||||||
#include "Kyoto/TToken.hpp"
|
|
||||||
#include "Kyoto/Animation/CSkinnedModel.hpp"
|
#include "Kyoto/Animation/CSkinnedModel.hpp"
|
||||||
|
#include "Kyoto/TToken.hpp"
|
||||||
|
|
||||||
#include "rstl/reserved_vector.hpp"
|
#include "rstl/reserved_vector.hpp"
|
||||||
|
|
||||||
|
@ -37,9 +37,7 @@ public:
|
||||||
x220_25_loop = v;
|
x220_25_loop = v;
|
||||||
x220_24_animating = true;
|
x220_24_animating = true;
|
||||||
}
|
}
|
||||||
void SetIsAnimating(bool v) {
|
void SetIsAnimating(bool v) { x220_24_animating = v; }
|
||||||
x220_24_animating = v;
|
|
||||||
}
|
|
||||||
void SetParticleEffectState(const rstl::string& name, bool active, CStateManager& mgr) {
|
void SetParticleEffectState(const rstl::string& name, bool active, CStateManager& mgr) {
|
||||||
x120_particleDB.SetParticleEffectState(name, active, mgr);
|
x120_particleDB.SetParticleEffectState(name, active, mgr);
|
||||||
}
|
}
|
||||||
|
@ -210,4 +208,4 @@ private:
|
||||||
};
|
};
|
||||||
CHECK_SIZEOF(CAnimData, 0x434 + 0x144)
|
CHECK_SIZEOF(CAnimData, 0x434 + 0x144)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -22,4 +22,4 @@ private:
|
||||||
};
|
};
|
||||||
CHECK_SIZEOF(CAnimPlaybackParms, 0x28)
|
CHECK_SIZEOF(CAnimPlaybackParms, 0x28)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -26,4 +26,4 @@ private:
|
||||||
};
|
};
|
||||||
CHECK_SIZEOF(CAreaFog, 0x38)
|
CHECK_SIZEOF(CAreaFog, 0x38)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -18,4 +18,4 @@ private:
|
||||||
};
|
};
|
||||||
CHECK_SIZEOF(CAxisAngle, 0xc)
|
CHECK_SIZEOF(CAxisAngle, 0xc)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -19,4 +19,4 @@ private:
|
||||||
};
|
};
|
||||||
CHECK_SIZEOF(CCharAnimTime, 0x8)
|
CHECK_SIZEOF(CCharAnimTime, 0x8)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -41,4 +41,4 @@ private:
|
||||||
};
|
};
|
||||||
CHECK_SIZEOF(CCharacterInfo, 0xc0)
|
CHECK_SIZEOF(CCharacterInfo, 0xc0)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -43,4 +43,4 @@ private:
|
||||||
};
|
};
|
||||||
CHECK_SIZEOF(CDamageVulnerability, 0x68)
|
CHECK_SIZEOF(CDamageVulnerability, 0x68)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -9,4 +9,4 @@ public:
|
||||||
static void ShutDown();
|
static void ShutDown();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -15,4 +15,4 @@ private:
|
||||||
uint x30_flags;
|
uint x30_flags;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -23,7 +23,8 @@ public:
|
||||||
CEntity(TUniqueId id, const CEntityInfo& info, bool active, const rstl::string& name);
|
CEntity(TUniqueId id, const CEntityInfo& info, bool active, const rstl::string& name);
|
||||||
|
|
||||||
void SendScriptMsgs(EScriptObjectState state, CStateManager& mgr, EScriptObjectMessage msg);
|
void SendScriptMsgs(EScriptObjectState state, CStateManager& mgr, EScriptObjectMessage msg);
|
||||||
static inline void SendScriptMsg(CStateManager& mgr, CEntity* to, TUniqueId sender, EScriptObjectMessage msg) {
|
static inline void SendScriptMsg(CStateManager& mgr, CEntity* to, TUniqueId sender,
|
||||||
|
EScriptObjectMessage msg) {
|
||||||
mgr.SendScriptMsg(to, sender, msg);
|
mgr.SendScriptMsg(to, sender, msg);
|
||||||
}
|
}
|
||||||
TUniqueId GetUniqueId() const { return x8_uid; }
|
TUniqueId GetUniqueId() const { return x8_uid; }
|
||||||
|
|
|
@ -236,13 +236,14 @@ struct SConnection {
|
||||||
|
|
||||||
class CEntityInfo {
|
class CEntityInfo {
|
||||||
TAreaId x0_areaId;
|
TAreaId x0_areaId;
|
||||||
rstl::vector<SConnection> x4_conns;
|
rstl::vector< SConnection > x4_conns;
|
||||||
TEditorId x14_editorId;
|
TEditorId x14_editorId;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CEntityInfo(TAreaId aid, const rstl::vector< SConnection >& conns, TEditorId eid = kInvalidEditorId);
|
CEntityInfo(TAreaId aid, const rstl::vector< SConnection >& conns,
|
||||||
|
TEditorId eid = kInvalidEditorId);
|
||||||
TAreaId GetAreaId() const { return x0_areaId; }
|
TAreaId GetAreaId() const { return x0_areaId; }
|
||||||
const rstl::vector<SConnection>& GetConnectionList() const { return x4_conns; }
|
const rstl::vector< SConnection >& GetConnectionList() const { return x4_conns; }
|
||||||
TEditorId GetEditorId() const { return x14_editorId; }
|
TEditorId GetEditorId() const { return x14_editorId; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -64,4 +64,4 @@ private:
|
||||||
bool xc54_;
|
bool xc54_;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -22,4 +22,4 @@ private:
|
||||||
bool x121_;
|
bool x121_;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -78,4 +78,4 @@ private:
|
||||||
rstl::list< rstl::rc_ptr< IDvdRequest > > xf8_loadTransactions;
|
rstl::list< rstl::rc_ptr< IDvdRequest > > xf8_loadTransactions;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -14,4 +14,4 @@ private:
|
||||||
};
|
};
|
||||||
CHECK_SIZEOF(CHealthInfo, 0x8)
|
CHECK_SIZEOF(CHealthInfo, 0x8)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -59,4 +59,4 @@ private:
|
||||||
};
|
};
|
||||||
CHECK_SIZEOF(CHierarchyPoseBuilder, 0x110)
|
CHECK_SIZEOF(CHierarchyPoseBuilder, 0x110)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -27,4 +27,4 @@ private:
|
||||||
rstl::string x4_name;
|
rstl::string x4_name;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -13,4 +13,4 @@ private:
|
||||||
u8 pad[0x14];
|
u8 pad[0x14];
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -9,4 +9,4 @@ class CMemoryCard {
|
||||||
|
|
||||||
extern CMemoryCard* gpMemoryCard;
|
extern CMemoryCard* gpMemoryCard;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -50,10 +50,14 @@ public:
|
||||||
SAdvancementDeltas AdvanceAnimation(float dt, CStateManager& mgr, TAreaId aid, bool advTree);
|
SAdvancementDeltas AdvanceAnimation(float dt, CStateManager& mgr, TAreaId aid, bool advTree);
|
||||||
void AdvanceParticles(const CTransform4f& xf, float dt, CStateManager& mgr);
|
void AdvanceParticles(const CTransform4f& xf, float dt, CStateManager& mgr);
|
||||||
void RenderParticles(const CFrustumPlanes& planes) const;
|
void RenderParticles(const CFrustumPlanes& planes) const;
|
||||||
void RenderUnsortedParts(EWhichModel which, const CTransform4f& xf, const CActorLights* lights, const CModelFlags& flags) const;
|
void RenderUnsortedParts(EWhichModel which, const CTransform4f& xf, const CActorLights* lights,
|
||||||
void RenderThermal(const CTransform4f& xf, const CColor& mulColor, const CColor& addColor, const CModelFlags& flags) const;
|
const CModelFlags& flags) const;
|
||||||
void Render(const CStateManager&, const CTransform4f&, const CActorLights*, const CModelFlags&) const;
|
void RenderThermal(const CTransform4f& xf, const CColor& mulColor, const CColor& addColor,
|
||||||
void Render(CModelData::EWhichModel, const CTransform4f&, const CActorLights*, const CModelFlags&) const;
|
const CModelFlags& flags) const;
|
||||||
|
void Render(const CStateManager&, const CTransform4f&, const CActorLights*,
|
||||||
|
const CModelFlags&) const;
|
||||||
|
void Render(CModelData::EWhichModel, const CTransform4f&, const CActorLights*,
|
||||||
|
const CModelFlags&) const;
|
||||||
|
|
||||||
const CAnimData* GetAnimationData() const { return xc_animData.get(); }
|
const CAnimData* GetAnimationData() const { return xc_animData.get(); }
|
||||||
CAnimData* AnimationData() { return xc_animData.get(); }
|
CAnimData* AnimationData() { return xc_animData.get(); }
|
||||||
|
|
|
@ -90,4 +90,4 @@ private:
|
||||||
};
|
};
|
||||||
CHECK_SIZEOF(CPASAnimState, 0x34)
|
CHECK_SIZEOF(CPASAnimState, 0x34)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -14,4 +14,4 @@ private:
|
||||||
};
|
};
|
||||||
CHECK_SIZEOF(CPASDatabase, 0x14)
|
CHECK_SIZEOF(CPASDatabase, 0x14)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -85,4 +85,4 @@ private:
|
||||||
f32 x40_maxDist;
|
f32 x40_maxDist;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -32,4 +32,4 @@ private:
|
||||||
f32 x18_scale;
|
f32 x18_scale;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -42,4 +42,4 @@ private:
|
||||||
};
|
};
|
||||||
CHECK_SIZEOF(CParticleDatabase, 0xb5)
|
CHECK_SIZEOF(CParticleDatabase, 0xb5)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -105,4 +105,4 @@ private:
|
||||||
};
|
};
|
||||||
CHECK_SIZEOF(CPhysicsActor, 0x258)
|
CHECK_SIZEOF(CPhysicsActor, 0x258)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -21,4 +21,4 @@ private:
|
||||||
};
|
};
|
||||||
CHECK_SIZEOF(CPoseAsTransforms, 0xd8)
|
CHECK_SIZEOF(CPoseAsTransforms, 0xd8)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -14,4 +14,4 @@ private:
|
||||||
f32 x14_alpha;
|
f32 x14_alpha;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -10,4 +10,4 @@ private:
|
||||||
CRumbleGenerator x0_rumbleGenerator;
|
CRumbleGenerator x0_rumbleGenerator;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -19,4 +19,4 @@ private:
|
||||||
// TODO
|
// TODO
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -32,4 +32,4 @@ class CSortedListManager {
|
||||||
CHECK_SIZEOF(CSortedListManager, 0xe018);
|
CHECK_SIZEOF(CSortedListManager, 0xe018);
|
||||||
} // namespace SL
|
} // namespace SL
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -20,4 +20,4 @@ public:
|
||||||
virtual void Draw();
|
virtual void Draw();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -41,7 +41,8 @@ class CSortedListManager;
|
||||||
|
|
||||||
class CStateManager {
|
class CStateManager {
|
||||||
public:
|
public:
|
||||||
void SendScriptMsg(TUniqueId uid, TEditorId target, EScriptObjectMessage msg, EScriptObjectState state);
|
void SendScriptMsg(TUniqueId uid, TEditorId target, EScriptObjectMessage msg,
|
||||||
|
EScriptObjectState state);
|
||||||
void SendScriptMsg(CEntity* ent, TUniqueId target, EScriptObjectMessage msg);
|
void SendScriptMsg(CEntity* ent, TUniqueId target, EScriptObjectMessage msg);
|
||||||
bool AddDrawableActor(const CActor& actor, const CVector3f& pos, const CAABox& bounds) const;
|
bool AddDrawableActor(const CActor& actor, const CVector3f& pos, const CAABox& bounds) const;
|
||||||
void SetupParticleHook(const CActor& actor) const;
|
void SetupParticleHook(const CActor& actor) const;
|
||||||
|
@ -54,7 +55,7 @@ public:
|
||||||
|
|
||||||
CMazeState* CurrentMaze();
|
CMazeState* CurrentMaze();
|
||||||
const CMazeState* GetCurrentMaze() const;
|
const CMazeState* GetCurrentMaze() const;
|
||||||
void SetCurrentMaze(const rstl::single_ptr<CMazeState>& maze);
|
void SetCurrentMaze(const rstl::single_ptr< CMazeState >& maze);
|
||||||
|
|
||||||
CCameraManager* CameraManager() { return x870_cameraManager; }
|
CCameraManager* CameraManager() { return x870_cameraManager; }
|
||||||
const CCameraManager* GetCameraManager() const { return x870_cameraManager; }
|
const CCameraManager* GetCameraManager() const { return x870_cameraManager; }
|
||||||
|
@ -63,7 +64,9 @@ public:
|
||||||
CWorld* World() { return x850_world.get(); }
|
CWorld* World() { return x850_world.get(); }
|
||||||
const CWorld* GetWorld() const { return x850_world.get(); }
|
const CWorld* GetWorld() const { return x850_world.get(); }
|
||||||
CActorModelParticles* ActorModelParticles() { return x884_actorModelParticles.get(); }
|
CActorModelParticles* ActorModelParticles() { return x884_actorModelParticles.get(); }
|
||||||
const CActorModelParticles* GetActorModelParticles() const { return x884_actorModelParticles.get(); }
|
const CActorModelParticles* GetActorModelParticles() const {
|
||||||
|
return x884_actorModelParticles.get();
|
||||||
|
}
|
||||||
CRandom16* GetActiveRandom() const { return x900_random; }
|
CRandom16* GetActiveRandom() const { return x900_random; }
|
||||||
|
|
||||||
CObjectList& GetObjectListById(EGameObjectList id) { return *x808_objectLists[id]; }
|
CObjectList& GetObjectListById(EGameObjectList id) { return *x808_objectLists[id]; }
|
||||||
|
|
|
@ -27,4 +27,4 @@ class CStateManagerContainer {
|
||||||
rstl::reserved_vector< TUniqueId, 20 > xf39c_renderLast;
|
rstl::reserved_vector< TUniqueId, 20 > xf39c_renderLast;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -14,4 +14,4 @@ private:
|
||||||
};
|
};
|
||||||
CHECK_SIZEOF(CWeaponMgr, 0x14);
|
CHECK_SIZEOF(CWeaponMgr, 0x14);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -57,15 +57,9 @@ public:
|
||||||
rstl::string IGetDefaultAudioTrack() const override;
|
rstl::string IGetDefaultAudioTrack() const override;
|
||||||
int IGetAreaCount() const override;
|
int IGetAreaCount() const override;
|
||||||
|
|
||||||
const CGameArea& GetAreaAlways(TAreaId id) const {
|
const CGameArea& GetAreaAlways(TAreaId id) const { return *x18_areas[id.Value()]; }
|
||||||
return *x18_areas[id.Value()];
|
const CGameArea* GetArea(TAreaId id) const { return x18_areas[id.Value()].get(); }
|
||||||
}
|
bool IsAreaValid(TAreaId id) const { return x18_areas[id.Value()]->IsLoaded(); }
|
||||||
const CGameArea* GetArea(TAreaId id) const {
|
|
||||||
return x18_areas[id.Value()].get();
|
|
||||||
}
|
|
||||||
bool IsAreaValid(TAreaId id) const {
|
|
||||||
return x18_areas[id.Value()]->IsLoaded();
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum Phase {
|
enum Phase {
|
||||||
|
@ -108,4 +102,4 @@ private:
|
||||||
};
|
};
|
||||||
CHECK_SIZEOF(CWorld, 0xf4)
|
CHECK_SIZEOF(CWorld, 0xf4)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,19 +1,20 @@
|
||||||
#ifndef __CCAMERAHINT_HPP__
|
#ifndef __CCAMERAHINT_HPP__
|
||||||
#define __CCAMERAHINT_HPP__
|
#define __CCAMERAHINT_HPP__
|
||||||
|
|
||||||
#include "types.h"
|
|
||||||
#include "MetroidPrime/Cameras/CBallCamera.hpp"
|
|
||||||
#include "Kyoto/Math/CVector3f.hpp"
|
#include "Kyoto/Math/CVector3f.hpp"
|
||||||
|
#include "MetroidPrime/Cameras/CBallCamera.hpp"
|
||||||
|
#include "types.h"
|
||||||
|
|
||||||
class CCameraHint {
|
class CCameraHint {
|
||||||
public:
|
public:
|
||||||
CCameraHint(uint overrideFlags, CBallCamera::EBallCameraBehaviour behaviour, f32 minDist, f32 maxDist,
|
CCameraHint(uint overrideFlags, CBallCamera::EBallCameraBehaviour behaviour, f32 minDist,
|
||||||
f32 backwardsDist, const CVector3f& lookAtOffset, const CVector3f& chaseLookAtOffset,
|
f32 maxDist, f32 backwardsDist, const CVector3f& lookAtOffset,
|
||||||
const CVector3f& ballToCam, f32 fov, f32 attitudeRange, f32 azimuthRange,
|
const CVector3f& chaseLookAtOffset, const CVector3f& ballToCam, f32 fov,
|
||||||
f32 anglePerSecond, f32 clampVelRange, f32 clampRotRange, f32 elevation, f32 interpolateTime,
|
f32 attitudeRange, f32 azimuthRange, f32 anglePerSecond, f32 clampVelRange,
|
||||||
f32 clampVelTime, f32 controlInterpDur);
|
f32 clampRotRange, f32 elevation, f32 interpolateTime, f32 clampVelTime,
|
||||||
|
f32 controlInterpDur);
|
||||||
virtual ~CCameraHint();
|
virtual ~CCameraHint();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
uint mOverrideFlags;
|
uint mOverrideFlags;
|
||||||
CBallCamera::EBallCameraBehaviour mBehaviour;
|
CBallCamera::EBallCameraBehaviour mBehaviour;
|
||||||
|
|
|
@ -58,4 +58,4 @@ private:
|
||||||
};
|
};
|
||||||
CHECK_SIZEOF(CCameraManager, 0x3c0)
|
CHECK_SIZEOF(CCameraManager, 0x3c0)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue