Standardize include guards, clang-format headers

This commit is contained in:
Luke Street 2022-10-09 01:13:17 -04:00
parent ad450211a5
commit 261ee48bba
341 changed files with 1373 additions and 1256 deletions

View File

@ -1,6 +1,7 @@
{ {
"recommendations": [ "recommendations": [
"ms-vscode.cpptools", "ms-vscode.cpptools",
"xaver.clang-format" "xaver.clang-format",
"akiramiyakoda.cppincludeguard"
] ]
} }

21
.vscode/settings.json vendored
View File

@ -14,4 +14,25 @@
"files.autoSave": "onFocusChange", "files.autoSave": "onFocusChange",
"files.insertFinalNewline": true, "files.insertFinalNewline": true,
"files.trimFinalNewlines": true, "files.trimFinalNewlines": true,
"C/C++ Include Guard.Macro Type": "Filename",
"C/C++ Include Guard.Prefix": "_",
"C/C++ Include Guard.Suffix": "",
"C/C++ Include Guard.Comment Style": "Line",
"C/C++ Include Guard.Subfolder Prefixes": [
{
"folderPath": "include/dolphin",
"prefix": "DOLPHIN_"
},
{
"folderPath": "include/musyx",
"prefix": "MUSYX_"
},
{
"folderPath": "include/rstl",
"prefix": "RSTL_"
}
],
"C/C++ Include Guard.Auto Update Path Allowlist": [
"include"
],
} }

View File

@ -1,5 +1,5 @@
#ifndef _CCOLLIDABLEAABOX_HPP #ifndef _CCOLLIDABLEAABOX
#define _CCOLLIDABLEAABOX_HPP #define _CCOLLIDABLEAABOX
#include "types.h" #include "types.h"
@ -24,4 +24,4 @@ private:
}; };
CHECK_SIZEOF(CCollidableAABox, 0x28) CHECK_SIZEOF(CCollidableAABox, 0x28)
#endif #endif // _CCOLLIDABLEAABOX

View File

@ -1,5 +1,5 @@
#ifndef _CCOLLIDABLESPHERE_HPP #ifndef _CCOLLIDABLESPHERE
#define _CCOLLIDABLESPHERE_HPP #define _CCOLLIDABLESPHERE
#include "types.h" #include "types.h"
@ -24,4 +24,4 @@ private:
}; };
CHECK_SIZEOF(CCollidableSphere, 0x20) CHECK_SIZEOF(CCollidableSphere, 0x20)
#endif #endif // _CCOLLIDABLESPHERE

View File

@ -1,5 +1,5 @@
#ifndef _CCOLLISIONINFO_HPP #ifndef _CCOLLISIONINFO
#define _CCOLLISIONINFO_HPP #define _CCOLLISIONINFO
#include "types.h" #include "types.h"
@ -15,16 +15,16 @@ public:
kI_Invalid, kI_Invalid,
kI_Valid, kI_Valid,
}; };
enum ESwapMaterials { enum ESwapMaterials { kSM_Swap };
kSM_Swap
};
CCollisionInfo(EInvalid valid = kI_Invalid); CCollisionInfo(EInvalid valid = kI_Invalid);
CCollisionInfo(const CVector3f& point, const CMaterialList& leftMat, const CMaterialList& rightMat, const CVector3f& normal); CCollisionInfo(const CVector3f& point, const CMaterialList& leftMat,
CCollisionInfo(const CVector3f& point, const CMaterialList& leftMat, const CMaterialList& rightMat, const CVector3f& leftNormal, const CMaterialList& rightMat, const CVector3f& normal);
const CVector3f& rightNormal); CCollisionInfo(const CVector3f& point, const CMaterialList& leftMat,
CCollisionInfo(const CAABox& aabox, const CMaterialList& leftMat, const CMaterialList& rightMat, const CVector3f& leftNormal, const CMaterialList& rightMat, const CVector3f& leftNormal,
const CVector3f& rightNormal); const CVector3f& rightNormal);
CCollisionInfo(const CAABox& aabox, const CMaterialList& leftMat, const CMaterialList& rightMat,
const CVector3f& leftNormal, const CVector3f& rightNormal);
CCollisionInfo(const CCollisionInfo& other, ESwapMaterials swap) CCollisionInfo(const CCollisionInfo& other, ESwapMaterials swap)
: x0_point(other.x0_point) : x0_point(other.x0_point)
, xc_extentX(other.xc_extentX) , xc_extentX(other.xc_extentX)
@ -61,4 +61,4 @@ private:
}; };
CHECK_SIZEOF(CCollisionInfo, 0x60) CHECK_SIZEOF(CCollisionInfo, 0x60)
#endif #endif // _CCOLLISIONINFO

View File

@ -1,5 +1,5 @@
#ifndef _CCOLLISIONPRIMITIVE_HPP #ifndef _CCOLLISIONPRIMITIVE
#define _CCOLLISIONPRIMITIVE_HPP #define _CCOLLISIONPRIMITIVE
#include "types.h" #include "types.h"
@ -33,4 +33,4 @@ CHECK_SIZEOF(CCollisionPrimitive, 0x10)
inline CCollisionPrimitive::~CCollisionPrimitive() {} inline CCollisionPrimitive::~CCollisionPrimitive() {}
#endif #endif // _CCOLLISIONPRIMITIVE

View File

@ -1,5 +1,5 @@
#ifndef __CMRAY_HPP__ #ifndef _CMRAY
#define __CMRAY_HPP__ #define _CMRAY
#include "Kyoto/Math/CVector3f.hpp" #include "Kyoto/Math/CVector3f.hpp"
@ -19,4 +19,4 @@ private:
CVector3f mDir; CVector3f mDir;
}; };
#endif // __CMRAY_HPP__ #endif // _CMRAY

View File

@ -1,5 +1,5 @@
#ifndef _CMATERIALFILTER_HPP #ifndef _CMATERIALFILTER
#define _CMATERIALFILTER_HPP #define _CMATERIALFILTER
#include "types.h" #include "types.h"
@ -7,6 +7,7 @@
class CMaterialFilter { class CMaterialFilter {
static const CMaterialFilter skPassEverything; static const CMaterialFilter skPassEverything;
public: public:
enum EFilterType { enum EFilterType {
kFT_Always, kFT_Always,
@ -39,4 +40,4 @@ private:
}; };
CHECK_SIZEOF(CMaterialFilter, 0x18) CHECK_SIZEOF(CMaterialFilter, 0x18)
#endif #endif // _CMATERIALFILTER

View File

@ -1,5 +1,5 @@
#ifndef _CMATERIALLIST_HPP #ifndef _CMATERIALLIST
#define _CMATERIALLIST_HPP #define _CMATERIALLIST
#include "types.h" #include "types.h"
@ -129,4 +129,4 @@ private:
}; };
CHECK_SIZEOF(CMaterialList, 0x8) CHECK_SIZEOF(CMaterialList, 0x8)
#endif #endif // _CMATERIALLIST

View File

@ -1,5 +1,5 @@
#ifndef __COBBOX_HPP__ #ifndef _COBBOX
#define __COBBOX_HPP__ #define _COBBOX
#include "Kyoto/Math/CAABox.hpp" #include "Kyoto/Math/CAABox.hpp"
#include "Kyoto/Math/CTransform4f.hpp" #include "Kyoto/Math/CTransform4f.hpp"
@ -19,9 +19,10 @@ public:
bool LineIntersectsBox(const CMRay& ray, float& penetration) const; bool LineIntersectsBox(const CMRay& ray, float& penetration) const;
bool AABoxIntersectsBox(const CAABox& box) const; bool AABoxIntersectsBox(const CAABox& box) const;
bool OBBIntersectsBox(const COBBox& box) const; bool OBBIntersectsBox(const COBBox& box) const;
private: private:
CTransform4f mTransform; CTransform4f mTransform;
CVector3f mExtents; CVector3f mExtents;
}; };
#endif // __COBBOX_HPP__ #endif // _COBBOX

View File

@ -1,5 +1,5 @@
#ifndef _CRAYCASTRESULT_HPP #ifndef _CRAYCASTRESULT
#define _CRAYCASTRESULT_HPP #define _CRAYCASTRESULT
#include "types.h" #include "types.h"
@ -33,4 +33,4 @@ private:
}; };
CHECK_SIZEOF(CRayCastResult, 0x30) CHECK_SIZEOF(CRayCastResult, 0x30)
#endif #endif // _CRAYCASTRESULT

View File

@ -1,5 +1,5 @@
#ifndef _CGUISYS_HPP #ifndef _CGUISYS
#define _CGUISYS_HPP #define _CGUISYS
#include "types.h" #include "types.h"
@ -31,4 +31,4 @@ private:
static CGuiSys* spGuiSys; static CGuiSys* spGuiSys;
}; };
#endif #endif // _CGUISYS

View File

@ -1,8 +1,7 @@
#ifndef __ALLOCATORCOMMON_HPP__ #ifndef _ALLOCATORCOMMON
#define __ALLOCATORCOMMON_HPP__ #define _ALLOCATORCOMMON
static const int kPointerSize = sizeof(void*); static const int kPointerSize = sizeof(void*);
static const int kPointerBits = kPointerSize * 8; static const int kPointerBits = kPointerSize * 8;
#endif // __ALLOCATORCOMMON_HPP__ #endif // _ALLOCATORCOMMON

View File

@ -1,5 +1,5 @@
#ifndef __CCALLSTACK_HPP__ #ifndef _CCALLSTACK
#define __CCALLSTACK_HPP__ #define _CCALLSTACK
class CCallStack { class CCallStack {
public: public:
@ -7,9 +7,10 @@ public:
const char* GetFileAndLineText() const; const char* GetFileAndLineText() const;
const char* GetTypeText() const; const char* GetTypeText() const;
private: private:
const char* x0_line; const char* x0_line;
const char* x4_type; const char* x4_type;
}; };
#endif // __CCALLSTACK_HPP__ #endif // _CCALLSTACK

View File

@ -1,5 +1,5 @@
#ifndef __CCIRCULARBUFFER_HPP__ #ifndef _CCIRCULARBUFFER
#define __CCIRCULARBUFFER_HPP__ #define _CCIRCULARBUFFER
#include <types.h> #include <types.h>
@ -21,4 +21,5 @@ private:
s32 x10_nextFreeAddr; s32 x10_nextFreeAddr;
s32 x14_; s32 x14_;
}; };
#endif // __CCIRCULARBUFFER_HPP__
#endif // _CCIRCULARBUFFER

View File

@ -1,5 +1,5 @@
#ifndef __CGAMEALLOCATOR_HPP__ #ifndef _CGAMEALLOCATOR
#define __CGAMEALLOCATOR_HPP__ #define _CGAMEALLOCATOR
#include <Kyoto/Alloc/CMediumAllocPool.hpp> #include <Kyoto/Alloc/CMediumAllocPool.hpp>
#include <Kyoto/Alloc/IAllocator.hpp> #include <Kyoto/Alloc/IAllocator.hpp>
@ -133,4 +133,4 @@ private:
uint xbc_; uint xbc_;
}; };
#endif // __CGAMEALLOCATOR_HPP__ #endif // _CGAMEALLOCATOR

View File

@ -1,5 +1,5 @@
#ifndef __CMEDIUMALLOCPOOL_HPP__ #ifndef _CMEDIUMALLOCPOOL
#define __CMEDIUMALLOCPOOL_HPP__ #define _CMEDIUMALLOCPOOL
#include <rstl/list.hpp> #include <rstl/list.hpp>
@ -31,4 +31,4 @@ public:
uint GetNumAllocs(); uint GetNumAllocs();
}; };
#endif // __CMEDIUMALLOCPOOL_HPP__ #endif // _CMEDIUMALLOCPOOL

View File

@ -1,5 +1,5 @@
#ifndef _CMEMORY_HPP #ifndef _CMEMORY
#define _CMEMORY_HPP #define _CMEMORY
#include "types.h" #include "types.h"
@ -18,4 +18,4 @@ inline void* operator new(size_t n, void* ptr) { return ptr; };
inline void operator delete(void* ptr) { CMemory::Free(ptr); } inline void operator delete(void* ptr) { CMemory::Free(ptr); }
inline void operator delete[](void* ptr) { CMemory::Free(ptr); } inline void operator delete[](void* ptr) { CMemory::Free(ptr); }
#endif #endif // _CMEMORY

View File

@ -1,5 +1,5 @@
#ifndef __CSMALLALLOCPOOL_HPP__ #ifndef _CSMALLALLOCPOOL
#define __CSMALLALLOCPOOL_HPP__ #define _CSMALLALLOCPOOL
#include <types.h> #include <types.h>
@ -13,12 +13,17 @@ public:
bool Free(const void* ptr); bool Free(const void* ptr);
bool PtrWithinPool(const void* ptr) const { bool PtrWithinPool(const void* ptr) const {
return u32((reinterpret_cast< const u8* >(ptr) - reinterpret_cast< u8* >(x0_mainData)) / 4) < x8_numBlocks; return u32((reinterpret_cast< const u8* >(ptr) - reinterpret_cast< u8* >(x0_mainData)) / 4) <
x8_numBlocks;
} }
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);
}
uint GetNumBlocksAvailable() const { return x18_numBlocksAvailable; } uint GetNumBlocksAvailable() const { return x18_numBlocksAvailable; }
uint GetTotalEntries() const { return x8_numBlocks; } uint GetTotalEntries() const { return x8_numBlocks; }
@ -26,7 +31,6 @@ public:
uint GetNumAllocs() const { return x1c_numAllocs; } uint GetNumAllocs() const { return x1c_numAllocs; }
private: private:
void* x0_mainData; void* x0_mainData;
void* x4_bookKeeping; void* x4_bookKeeping;
int x8_numBlocks; int x8_numBlocks;
@ -36,4 +40,5 @@ private:
uint x18_numBlocksAvailable; uint x18_numBlocksAvailable;
uint x1c_numAllocs; uint x1c_numAllocs;
}; };
#endif // __CSMALLALLOCPOOL_HPP__
#endif // _CSMALLALLOCPOOL

View File

@ -1,5 +1,5 @@
#ifndef _IALLOCATOR_HPP #ifndef _IALLOCATOR
#define _IALLOCATOR_HPP #define _IALLOCATOR
#include "Kyoto/Alloc/CMemory.hpp" #include "Kyoto/Alloc/CMemory.hpp"
#include "types.h" #include "types.h"
@ -95,4 +95,4 @@ public:
virtual SMetrics GetMetrics() const = 0; virtual SMetrics GetMetrics() const = 0;
}; };
#endif #endif // _IALLOCATOR

View File

@ -1,5 +1,5 @@
#ifndef _CPASANIMPARMDATA_HPP #ifndef _CPASANIMPARMDATA
#define _CPASANIMPARMDATA_HPP #define _CPASANIMPARMDATA
#include "Kyoto/Animation/CPASAnimState.hpp" #include "Kyoto/Animation/CPASAnimState.hpp"
@ -36,4 +36,4 @@ public:
} }
}; };
#endif // _CPASANIMPARMDATA_HPP #endif // _CPASANIMPARMDATA

View File

@ -1,10 +1,10 @@
#ifndef _CPASANIMSTATE_HPP #ifndef _CPASANIMSTATE
#define _CPASANIMSTATE_HPP #define _CPASANIMSTATE
#include "types.h" #include "types.h"
#include "rstl/vector.hpp"
#include "rstl/reserved_vector.hpp" #include "rstl/reserved_vector.hpp"
#include "rstl/vector.hpp"
namespace pas { namespace pas {
enum EAnimationState { enum EAnimationState {
@ -53,8 +53,7 @@ public:
f32 m_float; f32 m_float;
bool m_bool; bool m_bool;
}; };
CPASAnimParm(const CPASAnimParm& other) CPASAnimParm(const CPASAnimParm& other) : x0_value(other.x0_value), x4_type(other.x4_type) {}
: x0_value(other.x0_value), x4_type(other.x4_type) {}
static CPASAnimParm FromEnum(s32 val); static CPASAnimParm FromEnum(s32 val);
static CPASAnimParm FromBool(bool val); static CPASAnimParm FromBool(bool val);
@ -96,6 +95,7 @@ private:
class CPASAnimState { class CPASAnimState {
public: public:
CPASAnimParm GetAnimParmData(int, unsigned int) const; CPASAnimParm GetAnimParmData(int, unsigned int) const;
private: private:
pas::EAnimationState x0_id; pas::EAnimationState x0_id;
rstl::vector< CPASParmInfo > x4_parms; rstl::vector< CPASParmInfo > x4_parms;
@ -104,4 +104,4 @@ private:
}; };
CHECK_SIZEOF(CPASAnimState, 0x34) CHECK_SIZEOF(CPASAnimState, 0x34)
#endif #endif // _CPASANIMSTATE

View File

@ -1,12 +1,12 @@
#ifndef _CPASDATABASE_HPP #ifndef _CPASDATABASE
#define _CPASDATABASE_HPP #define _CPASDATABASE
#include "types.h" #include "types.h"
#include "Kyoto/Animation/CPASAnimState.hpp" #include "Kyoto/Animation/CPASAnimState.hpp"
#include "rstl/vector.hpp"
#include "rstl/pair.hpp" #include "rstl/pair.hpp"
#include "rstl/vector.hpp"
class CPASAnimParmData; class CPASAnimParmData;
class CRandom16; class CRandom16;
@ -22,4 +22,4 @@ public:
}; };
CHECK_SIZEOF(CPASDatabase, 0x14) CHECK_SIZEOF(CPASDatabase, 0x14)
#endif #endif // _CPASDATABASE

View File

@ -1,5 +1,5 @@
#ifndef _CSKINNEDMODEL_HPP #ifndef _CSKINNEDMODEL
#define _CSKINNEDMODEL_HPP #define _CSKINNEDMODEL
#include "types.h" #include "types.h"
@ -11,4 +11,4 @@ private:
// TODO // TODO
}; };
#endif #endif // _CSKINNEDMODEL

View File

@ -1,5 +1,5 @@
#ifndef _CAUDIOSYS_HPP #ifndef _CAUDIOSYS
#define _CAUDIOSYS_HPP #define _CAUDIOSYS
#include "types.h" #include "types.h"
@ -28,4 +28,4 @@ public:
static const u8 kMaxVolume; static const u8 kMaxVolume;
}; };
#endif #endif // _CAUDIOSYS

View File

@ -1,5 +1,5 @@
#ifndef _CDSPSTREAMMANAGER_HPP #ifndef _CDSPSTREAMMANAGER
#define _CDSPSTREAMMANAGER_HPP #define _CDSPSTREAMMANAGER
#include "types.h" #include "types.h"
@ -9,4 +9,4 @@ public:
static void Shutdown(); static void Shutdown();
}; };
#endif #endif // _CDSPSTREAMMANAGER

View File

@ -1,5 +1,5 @@
#ifndef _CSFXHANDLE_HPP #ifndef _CSFXHANDLE
#define _CSFXHANDLE_HPP #define _CSFXHANDLE
#include "types.h" #include "types.h"
@ -22,4 +22,4 @@ private:
}; };
CHECK_SIZEOF(CSfxHandle, 0x4) CHECK_SIZEOF(CSfxHandle, 0x4)
#endif #endif // _CSFXHANDLE

View File

@ -1,5 +1,5 @@
#ifndef _CSFXMANAGER_HPP #ifndef _CSFXMANAGER
#define _CSFXMANAGER_HPP #define _CSFXMANAGER
#include "types.h" #include "types.h"
@ -28,8 +28,9 @@ public:
static void PitchBend(CSfxHandle handle, int pitch); static void PitchBend(CSfxHandle handle, int pitch);
static CSfxHandle SfxStart(u16 id, u8 vol, u8 pan, bool useAcoustics, s16 prio, bool looped, s32 areaId); static CSfxHandle SfxStart(u16 id, u8 vol, u8 pan, bool useAcoustics, s16 prio, bool looped,
s32 areaId);
static bool IsPlaying(const CSfxHandle& handle); static bool IsPlaying(const CSfxHandle& handle);
}; };
#endif #endif // _CSFXMANAGER

View File

@ -1,5 +1,5 @@
#ifndef _CSTREAMAUDIOMANAGER_HPP #ifndef _CSTREAMAUDIOMANAGER
#define _CSTREAMAUDIOMANAGER_HPP #define _CSTREAMAUDIOMANAGER
#include "types.h" #include "types.h"
@ -12,4 +12,4 @@ public:
private: private:
}; };
#endif #endif // _CSTREAMAUDIOMANAGER

View File

@ -1,5 +1,5 @@
#ifndef _g721_h #ifndef _G721
#define _g721_h #define _G721
struct g72x_state { struct g72x_state {
long yl; /* Locked or steady state step size multiplier. */ long yl; /* Locked or steady state step size multiplier. */
@ -31,4 +31,4 @@ void g72x_init_state(struct g72x_state* state_ptr);
int g721_decoder(int i, struct g72x_state* state_ptr); int g721_decoder(int i, struct g72x_state* state_ptr);
#endif #endif // _G721

View File

@ -1,11 +1,11 @@
#ifndef _CBASICS_HPP #ifndef _CBASICS
#define _CBASICS_HPP #define _CBASICS
#include "types.h" #include "types.h"
namespace CBasics { namespace CBasics {
void Init(); void Init();
char* Stringize(const char* fmt, ...); char* Stringize(const char* fmt, ...);
}; }; // namespace CBasics
#endif #endif // _CBASICS

View File

@ -1,5 +1,5 @@
#ifndef __CCAST_HPP__ #ifndef _CCAST
#define __CCAST_HPP__ #define _CCAST
#include "types.h" #include "types.h"
@ -43,4 +43,4 @@ inline s16 FtoS(f32 in) { return static_cast< s16 >(in); }
#endif #endif
} // namespace CCast } // namespace CCast
#endif #endif // _CCAST

View File

@ -1,5 +1,5 @@
#ifndef _COSCONTEXT_HPP #ifndef _COSCONTEXT
#define _COSCONTEXT_HPP #define _COSCONTEXT
#include <stddef.h> #include <stddef.h>
@ -21,6 +21,7 @@ public:
bool IsPressed() const { return x4_down; } bool IsPressed() const { return x4_down; }
bool JustPressed() const { return x4_unk && x4_down; } bool JustPressed() const { return x4_unk && x4_down; }
private: private:
int x0_key; int x0_key;
short x4_down : 1; short x4_down : 1;
@ -51,6 +52,7 @@ public:
static void SetProgressiveMode(bool progressive) { mProgressiveMode = progressive; } static void SetProgressiveMode(bool progressive) { mProgressiveMode = progressive; }
static bool GetProgressiveMode() { return mProgressiveMode; } static bool GetProgressiveMode() { return mProgressiveMode; }
private: private:
int x0_right; int x0_right;
int x4_bottom; int x4_bottom;
@ -68,4 +70,4 @@ private:
}; };
CHECK_SIZEOF(COsContext, 0x6c) CHECK_SIZEOF(COsContext, 0x6c)
#endif #endif // _COSCONTEXT

View File

@ -1,5 +1,5 @@
#ifndef _CSTOPWATCH_HPP #ifndef _CSTOPWATCH
#define _CSTOPWATCH_HPP #define _CSTOPWATCH
#include "types.h" #include "types.h"
@ -9,10 +9,7 @@ class CStopwatch {
public: public:
class CSWData { class CSWData {
public: public:
CSWData() CSWData() : x0_timerFreq(0), x8_timerFreqO1M(0), x10_timerPeriod(0.f) {}
: x0_timerFreq(0)
, x8_timerFreqO1M(0)
, x10_timerPeriod(0.f) {}
bool Initialize(); bool Initialize();
void Wait(f32) const; void Wait(f32) const;
@ -45,6 +42,7 @@ public:
} }
static void Wait(f32); static void Wait(f32);
private: private:
static CSWData mData; static CSWData mData;
static CStopwatch mGlobalTimer; static CStopwatch mGlobalTimer;
@ -52,4 +50,4 @@ private:
s64 x0_startTime; s64 x0_startTime;
}; };
#endif #endif // _CSTOPWATCH

View File

@ -1,5 +1,5 @@
#ifndef _RASSERTDOLPHIN_HPP #ifndef _RASSERTDOLPHIN
#define _RASSERTDOLPHIN_HPP #define _RASSERTDOLPHIN
#include "types.h" #include "types.h"
@ -9,4 +9,4 @@ void rs_debugger_printf(const char* format, ...);
void ErrorHandler(OSError code, OSContext* context, int, int); void ErrorHandler(OSError code, OSContext* context, int, int);
void SetErrorHandlers(); void SetErrorHandlers();
#endif #endif // _RASSERTDOLPHIN

View File

@ -1,5 +1,5 @@
#ifndef _CARAMMANAGER_HPP #ifndef _CARAMMANAGER
#define _CARAMMANAGER_HPP #define _CARAMMANAGER
#include "types.h" #include "types.h"
@ -14,4 +14,4 @@ private:
static u32 mPreInitializeAlloc; static u32 mPreInitializeAlloc;
}; };
#endif #endif // _CARAMMANAGER

View File

@ -1,5 +1,5 @@
#ifndef _CARAMTOKEN_HPP #ifndef _CARAMTOKEN
#define _CARAMTOKEN_HPP #define _CARAMTOKEN
#include "types.h" #include "types.h"
@ -8,4 +8,4 @@ public:
static void UpdateAllDMAs(); static void UpdateAllDMAs();
}; };
#endif #endif // _CARAMTOKEN

View File

@ -1,5 +1,5 @@
#ifndef __CCRC32_HPP__ #ifndef _CCRC32
#define __CCRC32_HPP__ #define _CCRC32
#include "types.h" #include "types.h"
class CCRC32 { class CCRC32 {
@ -7,4 +7,4 @@ public:
static uint Calculate(const void* data, uint length); static uint Calculate(const void* data, uint length);
}; };
#endif // __CCRC32_HPP__ #endif // _CCRC32

View File

@ -1,5 +1,5 @@
#ifndef _CDVDFILE_HPP #ifndef _CDVDFILE
#define _CDVDFILE_HPP #define _CDVDFILE
#include "types.h" #include "types.h"
@ -11,4 +11,4 @@ private:
u8 pad[0x28]; u8 pad[0x28];
}; };
#endif #endif // _CDVDFILE

View File

@ -1,5 +1,5 @@
#ifndef _CFACTORYMGR_HPP #ifndef _CFACTORYMGR
#define _CFACTORYMGR_HPP #define _CFACTORYMGR
#include "types.h" #include "types.h"
@ -27,4 +27,4 @@ private:
CFactoryFnReturn FStringTableFactory(const SObjectTag& tag, CInputStream& in, CFactoryFnReturn FStringTableFactory(const SObjectTag& tag, CInputStream& in,
const CVParamTransfer& xfer); const CVParamTransfer& xfer);
#endif #endif // _CFACTORYMGR

View File

@ -1,5 +1,5 @@
#ifndef _CFRAMEDELAYEDKILLER_HPP #ifndef _CFRAMEDELAYEDKILLER
#define _CFRAMEDELAYEDKILLER_HPP #define _CFRAMEDELAYEDKILLER
#include "types.h" #include "types.h"
@ -9,4 +9,4 @@ public:
static void ShutDown(); static void ShutDown();
}; };
#endif #endif // _CFRAMEDELAYEDKILLER

View File

@ -1,5 +1,5 @@
#ifndef _CMEMORYCARDSYS_HPP #ifndef _CMEMORYCARDSYS
#define _CMEMORYCARDSYS_HPP #define _CMEMORYCARDSYS
#include "types.h" #include "types.h"
@ -14,4 +14,4 @@ private:
// TODO // TODO
}; };
#endif #endif // _CMEMORYCARDSYS

View File

@ -1,5 +1,5 @@
#ifndef _CMEMORY_SYS_HPP #ifndef _CMEMORYSYS
#define _CMEMORY_SYS_HPP #define _CMEMORYSYS
#include "types.h" #include "types.h"
@ -17,4 +17,4 @@ private:
u8 x0_unk; u8 x0_unk;
}; };
#endif #endif // _CMEMORYSYS

View File

@ -1,5 +1,5 @@
#ifndef __COBJECTREFERENCE_HPP__ #ifndef _COBJECTREFERENCE
#define __COBJECTREFERENCE_HPP__ #define _COBJECTREFERENCE
#include <Kyoto/CVParamTransfer.hpp> #include <Kyoto/CVParamTransfer.hpp>
#include <Kyoto/SObjectTag.hpp> #include <Kyoto/SObjectTag.hpp>
@ -21,6 +21,7 @@ public:
CVParamTransfer xfer); CVParamTransfer xfer);
bool IsLoaded() const { return x10_object != nullptr; } bool IsLoaded() const { return x10_object != nullptr; }
private: private:
u16 x0_refCount; u16 x0_refCount;
bool x2_locked : 1; bool x2_locked : 1;
@ -30,4 +31,4 @@ private:
IObj* x10_object; IObj* x10_object;
CVParamTransfer x14_params; CVParamTransfer x14_params;
}; };
#endif // __COBJECTREFERENCE_HPP__ #endif // _COBJECTREFERENCE

View File

@ -1,5 +1,5 @@
#ifndef _CPAKFILE_HPP #ifndef _CPAKFILE
#define _CPAKFILE_HPP #define _CPAKFILE
#include "types.h" #include "types.h"
@ -35,4 +35,4 @@ private:
mutable int x84_currentSeek; mutable int x84_currentSeek;
}; };
#endif #endif // _CPAKFILE

View File

@ -1,5 +1,5 @@
#ifndef __CRANDOM16_HPP__ #ifndef _CRANDOM16
#define __CRANDOM16_HPP__ #define _CRANDOM16
#include "types.h" #include "types.h"
@ -36,4 +36,4 @@ private:
uint mSeed; uint mSeed;
}; };
#endif // __CRANDOM16_HPP__ #endif // _CRANDOM16

View File

@ -1,5 +1,5 @@
#ifndef _CRESFACTORY_HPP #ifndef _CRESFACTORY
#define _CRESFACTORY_HPP #define _CRESFACTORY
#include "types.h" #include "types.h"
@ -52,4 +52,4 @@ CHECK_SIZEOF(CResFactory, 0xc8);
extern CResFactory* gpResourceFactory; extern CResFactory* gpResourceFactory;
#endif #endif // _CRESFACTORY

View File

@ -1,5 +1,5 @@
#ifndef _CRESLOADER_HPP #ifndef _CRESLOADER
#define _CRESLOADER_HPP #define _CRESLOADER
#include "types.h" #include "types.h"
@ -37,4 +37,4 @@ private:
bool x54_forwardSeek; bool x54_forwardSeek;
}; };
#endif #endif // _CRESLOADER

View File

@ -1,5 +1,5 @@
#ifndef _CSIMPLEPOOL_HPP #ifndef _CSIMPLEPOOL
#define _CSIMPLEPOOL_HPP #define _CSIMPLEPOOL
#include "types.h" #include "types.h"
@ -37,4 +37,4 @@ CHECK_SIZEOF(CSimplePool, 0x20)
extern CSimplePool* gpSimplePool; extern CSimplePool* gpSimplePool;
#endif #endif // _CSIMPLEPOOL

View File

@ -1,5 +1,5 @@
#ifndef __CTIMEPROVIDER_HPP__ #ifndef _CTIMEPROVIDER
#define __CTIMEPROVIDER_HPP__ #define _CTIMEPROVIDER
#include <types.h> #include <types.h>
@ -17,4 +17,4 @@ private:
CTimeProvider* x8_lastProvider; CTimeProvider* x8_lastProvider;
}; };
#endif // __CTIMEPROVIDER_HPP__ #endif // _CTIMEPROVIDER

View File

@ -1,10 +1,10 @@
#ifndef _CTOKEN_HPP #ifndef _CTOKEN
#define _CTOKEN_HPP #define _CTOKEN
#include "types.h" #include "types.h"
#include "Kyoto/IObj.hpp"
#include "Kyoto/CObjectReference.hpp" #include "Kyoto/CObjectReference.hpp"
#include "Kyoto/IObj.hpp"
class CObjectReference; class CObjectReference;
@ -20,9 +20,10 @@ public:
CObjOwnerDerivedFromIObjUntyped* GetObj(); CObjOwnerDerivedFromIObjUntyped* GetObj();
void Lock(); void Lock();
bool IsLoaded() const { return x0_objRef->IsLoaded(); } bool IsLoaded() const { return x0_objRef->IsLoaded(); }
private: private:
CObjectReference* x0_objRef; CObjectReference* x0_objRef;
bool x4_lockHeld; bool x4_lockHeld;
}; };
#endif #endif // _CTOKEN

View File

@ -1,9 +1,10 @@
#ifndef __CVPARAMTRANSFER_HPP__ #ifndef _CVPARAMTRANSFER
#define __CVPARAMTRANSFER_HPP__ #define _CVPARAMTRANSFER
#include <rstl/rc_ptr.hpp> #include <rstl/rc_ptr.hpp>
class IObj; class IObj;
class CVParamTransfer { class CVParamTransfer {
public: public:
static CVParamTransfer Null(); static CVParamTransfer Null();
@ -12,4 +13,4 @@ private:
rstl::rc_ptr< unkptr > x0_; rstl::rc_ptr< unkptr > x0_;
}; };
#endif // __CVPARAMTRANSFER_HPP__ #endif // _CVPARAMTRANSFER

View File

@ -1,5 +1,5 @@
#ifndef __CCOLOR_HPP__ #ifndef _CCOLOR
#define __CCOLOR_HPP__ #define _CCOLOR
#include "types.h" #include "types.h"
@ -80,4 +80,4 @@ CHECK_SIZEOF(CColor, 0x4)
#pragma cpp_extensions off #pragma cpp_extensions off
#endif #endif
#endif // __CCOLOR_HPP__ #endif // _CCOLOR

View File

@ -1,5 +1,5 @@
#ifndef _CCUBEMATERIAL_HPP #ifndef _CCUBEMATERIAL
#define _CCUBEMATERIAL_HPP #define _CCUBEMATERIAL
#include "types.h" #include "types.h"
@ -16,4 +16,4 @@ private:
static CVector3f sViewingFrom; static CVector3f sViewingFrom;
}; };
#endif #endif // _CCUBEMATERIAL

View File

@ -1,5 +1,5 @@
#ifndef _CGX_HPP #ifndef _CGX
#define _CGX_HPP #define _CGX
#include "types.h" #include "types.h"
@ -168,4 +168,4 @@ private:
static SGXState sGXState; static SGXState sGXState;
}; };
#endif #endif // _CGX

View File

@ -1,5 +1,5 @@
#ifndef _CGRAPHICS_HPP #ifndef _CGRAPHICS
#define _CGRAPHICS_HPP #define _CGRAPHICS
#include "types.h" #include "types.h"
@ -65,4 +65,4 @@ private:
static CTransform4f mModelMatrix; static CTransform4f mModelMatrix;
}; };
#endif #endif // _CGRAPHICS

View File

@ -1,5 +1,5 @@
#ifndef _CGRAPHICSSYS_HPP #ifndef _CGRAPHICSSYS
#define _CGRAPHICSSYS_HPP #define _CGRAPHICSSYS
#include "types.h" #include "types.h"
@ -12,4 +12,4 @@ private:
uint pad; uint pad;
}; };
#endif #endif // _CGRAPHICSSYS

View File

@ -1,5 +1,5 @@
#ifndef __CLIGHT_HPP__ #ifndef _CLIGHT
#define __CLIGHT_HPP__ #define _CLIGHT
#include "Kyoto/Graphics/CColor.hpp" #include "Kyoto/Graphics/CColor.hpp"
#include "Kyoto/Math/CVector3f.hpp" #include "Kyoto/Math/CVector3f.hpp"
@ -19,6 +19,7 @@ class CLight {
static const CVector3f kDefaultDirection; static const CVector3f kDefaultDirection;
float CalculateLightRadius() const; float CalculateLightRadius() const;
public: public:
CLight(ELightType type, const CVector3f& position, const CVector3f& direction, CLight(ELightType type, const CVector3f& position, const CVector3f& direction,
const CColor& color, float cutoff); const CColor& color, float cutoff);
@ -79,4 +80,4 @@ private:
}; };
CHECK_SIZEOF(CLight, 0x50) CHECK_SIZEOF(CLight, 0x50)
#endif // __CLIGHT_HPP__ #endif // _CLIGHT

View File

@ -1,5 +1,5 @@
#ifndef _CMODELFLAGS_HPP #ifndef _CMODELFLAGS
#define _CMODELFLAGS_HPP #define _CMODELFLAGS
#include "types.h" #include "types.h"
@ -104,4 +104,4 @@ private:
}; };
CHECK_SIZEOF(CModelFlags, 0x8) CHECK_SIZEOF(CModelFlags, 0x8)
#endif #endif // _CMODELFLAGS

View File

@ -1,5 +1,5 @@
#ifndef _CTEVCOMBINERS_HPP #ifndef _CTEVCOMBINERS
#define _CTEVCOMBINERS_HPP #define _CTEVCOMBINERS
#include "types.h" #include "types.h"
@ -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 // _CTEVCOMBINERS

View File

@ -1,5 +1,5 @@
#ifndef _CTEXTURE_HPP #ifndef _CTEXTURE
#define _CTEXTURE_HPP #define _CTEXTURE
#include "types.h" #include "types.h"
@ -29,6 +29,7 @@ public:
s16 GetWidth() const { return mWidth; } s16 GetWidth() const { return mWidth; }
s16 GetHeight() const { return mHeight; } s16 GetHeight() const { return mHeight; }
private: private:
u32 mTexelFormat; // TODO: Enum u32 mTexelFormat; // TODO: Enum
s16 mWidth; s16 mWidth;
@ -36,4 +37,4 @@ private:
u8 pad[0x60]; u8 pad[0x60];
}; };
#endif #endif // _CTEXTURE

View File

@ -1,5 +1,5 @@
#ifndef _IOBJ_HPP #ifndef _IOBJ
#define _IOBJ_HPP #define _IOBJ
#include "types.h" #include "types.h"
@ -45,4 +45,4 @@ private:
TObjOwnerDerivedFromIObj(const rstl::auto_ptr< T >& obj) : CObjOwnerDerivedFromIObjUntyped(obj) {} TObjOwnerDerivedFromIObj(const rstl::auto_ptr< T >& obj) : CObjOwnerDerivedFromIObjUntyped(obj) {}
}; };
#endif #endif // _IOBJ

View File

@ -1,7 +1,8 @@
#ifndef _IOBJECTSTORE_HPP #ifndef _IOBJECTSTORE
#define _IOBJECTSTORE_HPP #define _IOBJECTSTORE
#include "types.h" #include "types.h"
#include "Kyoto/CToken.hpp" #include "Kyoto/CToken.hpp"
#include "rstl/auto_ptr.hpp" #include "rstl/auto_ptr.hpp"
@ -20,4 +21,4 @@ public:
virtual void ObjectUnreferenced(const SObjectTag& tag) = 0; virtual void ObjectUnreferenced(const SObjectTag& tag) = 0;
}; };
#endif #endif // _IOBJECTSTORE

View File

@ -1,5 +1,5 @@
#ifndef __CCONTROLLERAXIS_HPP__ #ifndef _CCONTROLLERAXIS
#define __CCONTROLLERAXIS_HPP__ #define _CCONTROLLERAXIS
class CControllerAxis { class CControllerAxis {
public: public:
@ -14,4 +14,4 @@ public:
float x4_absolute; float x4_absolute;
}; };
#endif // __CCONTROLLERAXIS_HPP__ #endif // _CCONTROLLERAXIS

View File

@ -1,5 +1,5 @@
#ifndef __CCONTROLLERBUTTON_HPP__ #ifndef _CCONTROLLERBUTTON
#define __CCONTROLLERBUTTON_HPP__ #define _CCONTROLLERBUTTON
class CControllerButton { class CControllerButton {
public: public:
@ -17,4 +17,4 @@ private:
uchar x2_releaseEvent; uchar x2_releaseEvent;
}; };
#endif // __CCONTROLLERBUTTON_HPP__ #endif // _CCONTROLLERBUTTON

View File

@ -1,5 +1,5 @@
#ifndef __CCONTROLLERGAMEPADDATA_HPP__ #ifndef _CCONTROLLERGAMEPADDATA
#define __CCONTROLLERGAMEPADDATA_HPP__ #define _CCONTROLLERGAMEPADDATA
#include "Kyoto/Input/CControllerAxis.hpp" #include "Kyoto/Input/CControllerAxis.hpp"
#include "Kyoto/Input/CControllerButton.hpp" #include "Kyoto/Input/CControllerButton.hpp"
@ -28,4 +28,4 @@ private:
CControllerButton x34_buttons[12]; CControllerButton x34_buttons[12];
}; };
#endif // __CCONTROLLERGAMEPADDATA_HPP__ #endif // _CCONTROLLERGAMEPADDATA

View File

@ -1,5 +1,5 @@
#ifndef __CDOLPHINCONTROLLER_HPP__ #ifndef _CDOLPHINCONTROLLER
#define __CDOLPHINCONTROLLER_HPP__ #define _CDOLPHINCONTROLLER
#include "Kyoto/Input/IController.hpp" #include "Kyoto/Input/IController.hpp"
@ -38,4 +38,4 @@ private:
u32 x1cc_; u32 x1cc_;
}; };
#endif // __CDOLPHINCONTROLLER_HPP__ #endif // _CDOLPHINCONTROLLER

View File

@ -1,17 +1,19 @@
#ifndef __CFINALINPUT_HPP__ #ifndef _CFINALINPUT
#define __CFINALINPUT_HPP__ #define _CFINALINPUT
#include <types.h> #include <types.h>
#ifdef __MWERKS__ #ifdef __MWERKS__
#pragma cpp_extensions on #pragma cpp_extensions on
#endif #endif
class CControllerGamepadData; class CControllerGamepadData;
class COsContext; class COsContext;
class CFinalInput {
class CFinalInput {
static const float kInput_AnalogOnThreshhold; static const float kInput_AnalogOnThreshhold;
static const float kInput_AnalogTriggerOnThreshhold; static const float kInput_AnalogTriggerOnThreshhold;
public: public:
CFinalInput(); CFinalInput();
CFinalInput(int channel, float dt, const CControllerGamepadData& data, float leftDif, CFinalInput(int channel, float dt, const CControllerGamepadData& data, float leftDif,
@ -103,4 +105,4 @@ private:
#pragma cpp_extensions reset #pragma cpp_extensions reset
#endif #endif
#endif // __CFINALINPUT_HPP__ #endif // _CFINALINPUT

View File

@ -1,5 +1,5 @@
#ifndef _CRUMBLEGENERATOR_HPP #ifndef _CRUMBLEGENERATOR
#define _CRUMBLEGENERATOR_HPP #define _CRUMBLEGENERATOR
#include "types.h" #include "types.h"
@ -15,4 +15,4 @@ private:
bool xf0_24_disabled : 1; bool xf0_24_disabled : 1;
}; };
#endif #endif // _CRUMBLEGENERATOR

View File

@ -1,5 +1,5 @@
#ifndef _CRUMBLEVOICE_HPP #ifndef _CRUMBLEVOICE
#define _CRUMBLEVOICE_HPP #define _CRUMBLEVOICE
#include "types.h" #include "types.h"
@ -93,4 +93,4 @@ private:
s16 CreateRumbleHandle(u16 idx); s16 CreateRumbleHandle(u16 idx);
}; };
#endif #endif // _CRUMBLEVOICE

View File

@ -1,5 +1,5 @@
#ifndef __ICONTROLLER_HPP__ #ifndef _ICONTROLLER
#define __ICONTROLLER_HPP__ #define _ICONTROLLER
#include <types.h> #include <types.h>
@ -26,4 +26,4 @@ public:
static IController* Create(const COsContext& ctx); static IController* Create(const COsContext& ctx);
}; };
#endif // __ICONTROLLER_HPP__ #endif // _ICONTROLLER

View File

@ -1,5 +1,5 @@
#ifndef __INPUTTYPES_HPP__ #ifndef _INPUTTYPES
#define __INPUTTYPES_HPP__ #define _INPUTTYPES
#include <dolphin/pad.h> #include <dolphin/pad.h>
@ -36,4 +36,4 @@ enum EButton {
enum EAnalogButton { kBA_Left, kBA_Right, kBA_MAX }; enum EAnalogButton { kBA_Left, kBA_Right, kBA_MAX };
#endif // __INPUTTYPES_HPP__ #endif // _INPUTTYPES

View File

@ -1,5 +1,5 @@
#ifndef __CAABOX_HPP__ #ifndef _CAABOX
#define __CAABOX_HPP__ #define _CAABOX
#include "Kyoto/Math/CVector3f.hpp" #include "Kyoto/Math/CVector3f.hpp"
@ -104,4 +104,4 @@ private:
}; };
CHECK_SIZEOF(CAABox, 0x18) CHECK_SIZEOF(CAABox, 0x18)
#endif // __CAABOX_HPP__ #endif // _CAABOX

View File

@ -1,5 +1,5 @@
#ifndef _CABSANGLE_HPP #ifndef _CABSANGLE
#define _CABSANGLE_HPP #define _CABSANGLE
#include "types.h" #include "types.h"
@ -48,4 +48,4 @@ CHECK_SIZEOF(CAbsAngle, 0x4)
static inline f32 cosine(const CAbsAngle& angle) { return cos(angle.AsRadians()); } static inline f32 cosine(const CAbsAngle& angle) { return cos(angle.AsRadians()); }
#endif #endif // _CABSANGLE

View File

@ -1,5 +1,5 @@
#ifndef _CFRUSTUMPLANES_HPP #ifndef _CFRUSTUMPLANES
#define _CFRUSTUMPLANES_HPP #define _CFRUSTUMPLANES
#include "types.h" #include "types.h"
@ -30,4 +30,4 @@ private:
rstl::reserved_vector< CPlane, 6 > x0_planes; rstl::reserved_vector< CPlane, 6 > x0_planes;
}; };
#endif #endif // _CFRUSTUMPLANES

View File

@ -1,5 +1,5 @@
#ifndef _CLINE_HPP #ifndef _CLINE
#define _CLINE_HPP #define _CLINE
#include "types.h" #include "types.h"
@ -18,4 +18,4 @@ private:
CUnitVector3f xc_dir; CUnitVector3f xc_dir;
}; };
#endif #endif // _CLINE

View File

@ -1,17 +1,16 @@
#ifndef _CLINESEG_HPP #ifndef _CLINESEG
#define _CLINESEG_HPP #define _CLINESEG
#include "types.h" #include "types.h"
#include "Kyoto/Math/CLine.hpp"
#include "Kyoto/Math/CUnitVector3f.hpp" #include "Kyoto/Math/CUnitVector3f.hpp"
#include "Kyoto/Math/CVector3f.hpp" #include "Kyoto/Math/CVector3f.hpp"
#include "Kyoto/Math/CLine.hpp"
class CLineSeg : public CLine { class CLineSeg : public CLine {
public: public:
CLineSeg(const CVector3f& start, const CVector3f& end) CLineSeg(const CVector3f& start, const CVector3f& end)
: CLine(start, (end - start).AsNormalized()) : CLine(start, (end - start).AsNormalized()), x18_end(end) {}
, x18_end(end) {}
const CVector3f& GetEndPoint() const { return x18_end; } const CVector3f& GetEndPoint() const { return x18_end; }
@ -20,4 +19,4 @@ private:
}; };
CHECK_SIZEOF(CLineSeg, 0x24) CHECK_SIZEOF(CLineSeg, 0x24)
#endif #endif // _CLINESEG

View File

@ -1,5 +1,5 @@
#ifndef _CMATH_HPP #ifndef _CMATH
#define _CMATH_HPP #define _CMATH
#include "types.h" #include "types.h"
@ -73,4 +73,4 @@ public:
// Swap<f>__5CMathFRfRf weak // Swap<f>__5CMathFRfRf weak
}; };
#endif #endif // _CMATH

View File

@ -1,5 +1,5 @@
#ifndef _CMATRIX3F_HPP #ifndef _CMATRIX3F
#define _CMATRIX3F_HPP #define _CMATRIX3F
#include "types.h" #include "types.h"
@ -7,11 +7,13 @@
class CMatrix3f { class CMatrix3f {
static const CMatrix3f sIdentity; static const CMatrix3f sIdentity;
public: public:
CMatrix3f(const CMatrix3f&); CMatrix3f(const CMatrix3f&);
const CMatrix3f& operator=(const CMatrix3f& other); const CMatrix3f& operator=(const CMatrix3f& other);
static const CMatrix3f& Identity() { return sIdentity; } static const CMatrix3f& Identity() { return sIdentity; }
private: private:
// TODO maybe individual f32s // TODO maybe individual f32s
CVector3f m0; CVector3f m0;
@ -20,4 +22,4 @@ private:
}; };
CHECK_SIZEOF(CMatrix3f, 0x24); CHECK_SIZEOF(CMatrix3f, 0x24);
#endif #endif // _CMATRIX3F

View File

@ -1,5 +1,5 @@
#ifndef _CMATRIX4F_HPP #ifndef _CMATRIX4F
#define _CMATRIX4F_HPP #define _CMATRIX4F
#include "types.h" #include "types.h"
@ -24,4 +24,4 @@ private:
}; };
CHECK_SIZEOF(CMatrix4f, 0x40); CHECK_SIZEOF(CMatrix4f, 0x40);
#endif #endif // _CMATRIX4F

View File

@ -1,5 +1,5 @@
#ifndef _CNUQUATERNION_HPP #ifndef _CNUQUATERNION
#define _CNUQUATERNION_HPP #define _CNUQUATERNION
#include "types.h" #include "types.h"
@ -10,6 +10,7 @@ public:
static CNUQuaternion BuildFromMatrix3f(const CMatrix3f& matrix); static CNUQuaternion BuildFromMatrix3f(const CMatrix3f& matrix);
static CNUQuaternion BuildFromQuaternion(const CQuaternion& quat); static CNUQuaternion BuildFromQuaternion(const CQuaternion& quat);
private: private:
f32 w; f32 w;
f32 x; f32 x;
@ -17,4 +18,4 @@ private:
f32 z; f32 z;
}; };
#endif #endif // _CNUQUATERNION

View File

@ -1,5 +1,5 @@
#ifndef _CPLANE_HPP #ifndef _CPLANE
#define _CPLANE_HPP #define _CPLANE
#include "types.h" #include "types.h"
@ -25,4 +25,4 @@ private:
}; };
CHECK_SIZEOF(CPlane, 0x10) CHECK_SIZEOF(CPlane, 0x10)
#endif #endif // _CPLANE

View File

@ -1,5 +1,5 @@
#ifndef _CQUATERNION_HPP #ifndef _CQUATERNION
#define _CQUATERNION_HPP #define _CQUATERNION
#include "types.h" #include "types.h"
@ -69,4 +69,4 @@ private:
static const CQuaternion sNoRotation; static const CQuaternion sNoRotation;
}; };
#endif #endif // _CQUATERNION

View File

@ -1,5 +1,5 @@
#ifndef _CRELANGLE_HPP #ifndef _CRELANGLE
#define _CRELANGLE_HPP #define _CRELANGLE
#include "types.h" #include "types.h"
@ -45,4 +45,4 @@ CHECK_SIZEOF(CRelAngle, 0x4)
// __dv__FRC9CRelAnglef // __dv__FRC9CRelAnglef
// sine__FRC9CRelAngle // sine__FRC9CRelAngle
#endif #endif // _CRELANGLE

View File

@ -1,10 +1,10 @@
#ifndef _CSPHERE_HPP #ifndef _CSPHERE
#define _CSPHERE_HPP #define _CSPHERE
#include "types.h" #include "types.h"
#include "Kyoto/Math/CVector3f.hpp"
#include "Kyoto/Math/CUnitVector3f.hpp" #include "Kyoto/Math/CUnitVector3f.hpp"
#include "Kyoto/Math/CVector3f.hpp"
class CSphere { class CSphere {
public: public:
@ -18,4 +18,4 @@ private:
}; };
CHECK_SIZEOF(CSphere, 0x10) CHECK_SIZEOF(CSphere, 0x10)
#endif #endif // _CSPHERE

View File

@ -1,5 +1,5 @@
#ifndef __CTRANSFORM4F_HPP__ #ifndef _CTRANSFORM4F
#define __CTRANSFORM4F_HPP__ #define _CTRANSFORM4F
#include "types.h" #include "types.h"
@ -115,4 +115,4 @@ inline bool operator==(const CTransform4f& lhs, const CTransform4f& rhs);
CHECK_SIZEOF(CTransform4f, 0x30) CHECK_SIZEOF(CTransform4f, 0x30)
#endif // __CTRANSFORM4F_HPP__ #endif // _CTRANSFORM4F

View File

@ -1,5 +1,5 @@
#ifndef _CTRI_HPP #ifndef _CTRI
#define _CTRI_HPP #define _CTRI
#include "types.h" #include "types.h"
@ -24,4 +24,4 @@ private:
}; };
CHECK_SIZEOF(CTri, 0x34) CHECK_SIZEOF(CTri, 0x34)
#endif #endif // _CTRI

View File

@ -1,5 +1,5 @@
#ifndef _CUNITVECTOR3F_HPP #ifndef _CUNITVECTOR3F
#define _CUNITVECTOR3F_HPP #define _CUNITVECTOR3F
#include "types.h" #include "types.h"
@ -13,4 +13,4 @@ public:
}; };
CHECK_SIZEOF(CUnitVector3f, 0xc) CHECK_SIZEOF(CUnitVector3f, 0xc)
#endif #endif // _CUNITVECTOR3F

View File

@ -1,10 +1,11 @@
#ifndef __CVECTOR2F_HPP__ #ifndef _CVECTOR2F
#define __CVECTOR2F_HPP__ #define _CVECTOR2F
#include "types.h" #include "types.h"
class CVector2f { class CVector2f {
static const CVector2f skZeroVector; static const CVector2f skZeroVector;
public: public:
CVector2f(f32 x, f32 y); CVector2f(f32 x, f32 y);
f32 GetX() const { return mX; } f32 GetX() const { return mX; }
@ -23,6 +24,7 @@ public:
static float GetAngleDiff(const CVector2f& a, const CVector2f& b); static float GetAngleDiff(const CVector2f& a, const CVector2f& b);
static float Dot(const CVector2f& a, const CVector2f& b); static float Dot(const CVector2f& a, const CVector2f& b);
private: private:
f32 mX; f32 mX;
f32 mY; f32 mY;
@ -35,4 +37,4 @@ CVector2f operator*(const CVector2f& lhs, const float& rhs);
CVector2f operator*(const float& lhs, const CVector2f& rhs); CVector2f operator*(const float& lhs, const CVector2f& rhs);
CVector2f operator/(const CVector2f& lhs, const float& rhs); CVector2f operator/(const CVector2f& lhs, const float& rhs);
#endif // __CVECTOR3F_HPP__ #endif // _CVECTOR2F

View File

@ -1,5 +1,5 @@
#ifndef _CVECTOR2I_HPP #ifndef _CVECTOR2I
#define _CVECTOR2I_HPP #define _CVECTOR2I
#include "types.h" #include "types.h"
@ -9,6 +9,7 @@ public:
int GetX() const { return mX; } int GetX() const { return mX; }
int GetY() const { return mY; } int GetY() const { return mY; }
private: private:
int mX; int mX;
int mY; int mY;
@ -19,4 +20,5 @@ CVector2i operator+(const CVector2i& lhs, const CVector2i& rhs);
bool operator==(const CVector2i& lhs, const CVector2i& rhs); bool operator==(const CVector2i& lhs, const CVector2i& rhs);
CVector2i operator*(const CVector2i& lhs, int rhs); CVector2i operator*(const CVector2i& lhs, int rhs);
CVector2i operator/(const CVector2i& lhs, int rhs); CVector2i operator/(const CVector2i& lhs, int rhs);
#endif
#endif // _CVECTOR2I

View File

@ -1,6 +1,5 @@
#ifndef __CVECTOR3D_HPP__ #ifndef _CVECTOR3D
#define __CVECTOR3D_HPP__ #define _CVECTOR3D
#include "Kyoto/Math/CVector3f.hpp" #include "Kyoto/Math/CVector3f.hpp"
@ -21,7 +20,6 @@ public:
static double Dot(const CVector3d& a, const CVector3d& b); static double Dot(const CVector3d& a, const CVector3d& b);
static CVector3d Cross(const CVector3d& a, const CVector3d& b); static CVector3d Cross(const CVector3d& a, const CVector3d& b);
private: private:
double mX; double mX;
double mY; double mY;
@ -30,4 +28,4 @@ private:
CVector3d operator+(const CVector3d& other); CVector3d operator+(const CVector3d& other);
#endif // __CVECTOR3D_HPP__ #endif // _CVECTOR3D

View File

@ -1,5 +1,5 @@
#ifndef __CVECTOR3F_HPP__ #ifndef _CVECTOR3F
#define __CVECTOR3F_HPP__ #define _CVECTOR3F
#include "types.h" #include "types.h"
@ -162,4 +162,4 @@ inline CVector3f operator-(const CVector3f& vec) {
return CVector3f(-vec.GetX(), -vec.GetY(), -vec.GetZ()); return CVector3f(-vec.GetX(), -vec.GetY(), -vec.GetZ());
} }
#endif // __CVECTOR3F_HPP__ #endif // _CVECTOR3F

View File

@ -1,5 +1,5 @@
#ifndef __CVECTOR3I_HPP__ #ifndef _CVECTOR3I
#define __CVECTOR3I_HPP__ #define _CVECTOR3I
class CVector3i { class CVector3i {
public: public:
@ -11,4 +11,4 @@ private:
int mZ; int mZ;
}; };
#endif // __CVECTOR3I_HPP__ #endif // _CVECTOR3I

View File

@ -1,5 +1,5 @@
#ifndef __CLOSEENOUGH_HPP__ #ifndef _CLOSEENOUGH
#define __CLOSEENOUGH_HPP__ #define _CLOSEENOUGH
#include "types.h" #include "types.h"
@ -26,4 +26,4 @@ inline bool close_enough(double a, double b, double epsilon = Double::Epsilon())
return fabs(a - b) < epsilon; return fabs(a - b) < epsilon;
} }
#endif // __CLOSEENOUGH_HPP__ #endif // _CLOSEENOUGH

View File

@ -1,10 +1,10 @@
#ifndef _CELEMENTGEN_HPP #ifndef _CELEMENTGEN
#define _CELEMENTGEN_HPP #define _CELEMENTGEN
#include "types.h" #include "types.h"
#include "Kyoto/TToken.hpp"
#include "Kyoto/Particles/CParticleGen.hpp" #include "Kyoto/Particles/CParticleGen.hpp"
#include "Kyoto/TToken.hpp"
class CGenDescription; class CGenDescription;
@ -14,7 +14,8 @@ public:
enum EOptionalSystemFlags { kOSF_None, kOSF_One, kOSF_Two }; enum EOptionalSystemFlags { kOSF_None, kOSF_One, kOSF_Two };
enum LightType { kLT_None = 0, kLT_Custom = 1, kLT_Directional = 2, kLT_Spot = 3 }; enum LightType { kLT_None = 0, kLT_Custom = 1, kLT_Directional = 2, kLT_Spot = 3 };
CElementGen(TToken<CGenDescription>, EModelOrientationType = kMOT_Normal, EOptionalSystemFlags = kOSF_One); CElementGen(TToken< CGenDescription >, EModelOrientationType = kMOT_Normal,
EOptionalSystemFlags = kOSF_One);
~CElementGen(); ~CElementGen();
virtual void Update(double); virtual void Update(double);
@ -52,4 +53,4 @@ private:
}; };
CHECK_SIZEOF(CElementGen, 0x340) CHECK_SIZEOF(CElementGen, 0x340)
#endif #endif // _CELEMENTGEN

View File

@ -1,12 +1,13 @@
#ifndef __CGENDESCRIPTION_HPP__ #ifndef _CGENDESCRIPTION
#define __CGENDESCRIPTION_HPP__ #define _CGENDESCRIPTION
class CGenDescription { class CGenDescription {
public: public:
CGenDescription(); CGenDescription();
~CGenDescription(); ~CGenDescription();
private: private:
char data[0x12c]; char data[0x12c];
}; };
#endif // __CGENDESCRIPTION_HPP__ #endif // _CGENDESCRIPTION

View File

@ -1,5 +1,5 @@
#ifndef _CPARTICLEGEN_HPP #ifndef _CPARTICLEGEN
#define _CPARTICLEGEN_HPP #define _CPARTICLEGEN
#include "Kyoto/Graphics/CColor.hpp" #include "Kyoto/Graphics/CColor.hpp"
#include "Kyoto/Graphics/CLight.hpp" #include "Kyoto/Graphics/CLight.hpp"
@ -40,4 +40,4 @@ public:
virtual uint Get4CharId() const = 0; virtual uint Get4CharId() const = 0;
}; };
#endif // _CPARTICLEGEN_HPP #endif // _CPARTICLEGEN

View File

@ -1,5 +1,5 @@
#ifndef __CPARTICLEGLOBALS_HPP__ #ifndef _CPARTICLEGLOBALS
#define __CPARTICLEGLOBALS_HPP__ #define _CPARTICLEGLOBALS
class CParticleGlobals { class CParticleGlobals {
public: public:
@ -8,4 +8,4 @@ public:
static void UpdateParticleLifetimeTweenValues(int time); static void UpdateParticleLifetimeTweenValues(int time);
}; };
#endif // __CPARTICLEGLOBALS_HPP__ #endif // _CPARTICLEGLOBALS

View File

@ -1,8 +1,10 @@
#ifndef __CWARP_HPP__ #ifndef _CWARP
#define __CWARP_HPP__ #define _CWARP
#include "rstl/vector.hpp" #include "rstl/vector.hpp"
class CParticle; class CParticle;
class CWarp { class CWarp {
public: public:
virtual ~CWarp(); virtual ~CWarp();
@ -13,4 +15,4 @@ public:
virtual int Get4CharID() = 0; virtual int Get4CharID() = 0;
}; };
#endif // __CWARP_HPP__ #endif // _CWARP

View File

@ -1,5 +1,5 @@
#ifndef __SOBJECTTAG_HPP__ #ifndef _SOBJECTTAG
#define __SOBJECTTAG_HPP__ #define _SOBJECTTAG
#define kInvalidAssetId 0xFFFFFFFFu #define kInvalidAssetId 0xFFFFFFFFu
@ -17,4 +17,4 @@ struct SObjectTag {
static const char* Type2Text(FourCC type); static const char* Type2Text(FourCC type);
}; };
#endif #endif // _SOBJECTTAG

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