From 7f83e1fa03147a57e4fcd336c9bb30fbc5c2a679 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Sun, 9 Oct 2022 01:13:17 -0400 Subject: [PATCH] Standardize include guards, clang-format headers Former-commit-id: 261ee48bba0546f4620447040b7c3d3034686796 --- .vscode/extensions.json | 3 +- .vscode/settings.json | 21 +++++++ include/Collision/CCollidableAABox.hpp | 8 +-- include/Collision/CCollidableSphere.hpp | 6 +- include/Collision/CCollisionInfo.hpp | 20 +++--- include/Collision/CCollisionPrimitive.hpp | 6 +- include/Collision/CMRay.hpp | 6 +- include/Collision/CMaterialFilter.hpp | 7 ++- include/Collision/CMaterialList.hpp | 6 +- include/Collision/COBBox.hpp | 7 ++- include/Collision/CRayCastResult.hpp | 6 +- include/GuiSys/CGuiSys.hpp | 6 +- include/Kyoto/Alloc/AllocatorCommon.hpp | 7 +-- include/Kyoto/Alloc/CCallStack.hpp | 7 ++- include/Kyoto/Alloc/CCircularBuffer.hpp | 7 ++- include/Kyoto/Alloc/CGameAllocator.hpp | 6 +- include/Kyoto/Alloc/CMediumAllocPool.hpp | 48 +++++++-------- include/Kyoto/Alloc/CMemory.hpp | 6 +- include/Kyoto/Alloc/CSmallAllocPool.hpp | 19 +++--- include/Kyoto/Alloc/IAllocator.hpp | 6 +- include/Kyoto/Animation/CPASAnimParmData.hpp | 6 +- include/Kyoto/Animation/CPASAnimState.hpp | 12 ++-- include/Kyoto/Animation/CPASDatabase.hpp | 10 +-- include/Kyoto/Animation/CSkinnedModel.hpp | 6 +- include/Kyoto/Audio/CAudioSys.hpp | 6 +- include/Kyoto/Audio/CDSPStreamManager.hpp | 6 +- include/Kyoto/Audio/CSfxHandle.hpp | 6 +- include/Kyoto/Audio/CSfxManager.hpp | 9 +-- include/Kyoto/Audio/CStreamAudioManager.hpp | 6 +- include/Kyoto/Audio/g721.h | 6 +- include/Kyoto/Basics/CBasics.hpp | 8 +-- include/Kyoto/Basics/CCast.hpp | 6 +- include/Kyoto/Basics/COsContext.hpp | 8 ++- include/Kyoto/Basics/CStopwatch.hpp | 12 ++-- include/Kyoto/Basics/RAssertDolphin.hpp | 6 +- include/Kyoto/CARAMManager.hpp | 6 +- include/Kyoto/CARAMToken.hpp | 6 +- include/Kyoto/CCrc32.hpp | 6 +- include/Kyoto/CDvdFile.hpp | 6 +- include/Kyoto/CFactoryMgr.hpp | 6 +- include/Kyoto/CFrameDelayedKiller.hpp | 6 +- include/Kyoto/CMemoryCardSys.hpp | 6 +- include/Kyoto/CMemorySys.hpp | 6 +- include/Kyoto/CObjectReference.hpp | 7 ++- include/Kyoto/CPakFile.hpp | 6 +- include/Kyoto/CRandom16.hpp | 6 +- include/Kyoto/CResFactory.hpp | 6 +- include/Kyoto/CResLoader.hpp | 6 +- include/Kyoto/CSimplePool.hpp | 6 +- include/Kyoto/CTimeProvider.hpp | 6 +- include/Kyoto/CToken.hpp | 9 +-- include/Kyoto/CVParamTransfer.hpp | 7 ++- include/Kyoto/Graphics/CColor.hpp | 6 +- include/Kyoto/Graphics/CCubeMaterial.hpp | 6 +- include/Kyoto/Graphics/CGX.hpp | 6 +- include/Kyoto/Graphics/CGraphics.hpp | 6 +- include/Kyoto/Graphics/CGraphicsSys.hpp | 6 +- include/Kyoto/Graphics/CLight.hpp | 7 ++- include/Kyoto/Graphics/CModelFlags.hpp | 6 +- include/Kyoto/Graphics/CTevCombiners.hpp | 6 +- include/Kyoto/Graphics/CTexture.hpp | 7 ++- include/Kyoto/IObj.hpp | 6 +- include/Kyoto/IObjectStore.hpp | 7 ++- include/Kyoto/Input/CControllerAxis.hpp | 6 +- include/Kyoto/Input/CControllerButton.hpp | 6 +- .../Kyoto/Input/CControllerGamepadData.hpp | 6 +- include/Kyoto/Input/CDolphinController.hpp | 6 +- include/Kyoto/Input/CFinalInput.hpp | 10 +-- include/Kyoto/Input/CRumbleGenerator.hpp | 6 +- include/Kyoto/Input/CRumbleVoice.hpp | 6 +- include/Kyoto/Input/IController.hpp | 6 +- include/Kyoto/Input/InputTypes.hpp | 6 +- include/Kyoto/Math/CAABox.hpp | 6 +- include/Kyoto/Math/CAbsAngle.hpp | 6 +- include/Kyoto/Math/CFrustumPlanes.hpp | 6 +- include/Kyoto/Math/CLine.hpp | 6 +- include/Kyoto/Math/CLineSeg.hpp | 11 ++-- include/Kyoto/Math/CMath.hpp | 6 +- include/Kyoto/Math/CMatrix3f.hpp | 8 ++- include/Kyoto/Math/CMatrix4f.hpp | 6 +- include/Kyoto/Math/CNUQuaternion.hpp | 7 ++- include/Kyoto/Math/CPlane.hpp | 6 +- include/Kyoto/Math/CQuaternion.hpp | 6 +- include/Kyoto/Math/CRelAngle.hpp | 6 +- include/Kyoto/Math/CSphere.hpp | 8 +-- include/Kyoto/Math/CTransform4f.hpp | 6 +- include/Kyoto/Math/CTri.hpp | 6 +- include/Kyoto/Math/CUnitVector3f.hpp | 8 +-- include/Kyoto/Math/CVector2f.hpp | 8 ++- include/Kyoto/Math/CVector2i.hpp | 8 ++- include/Kyoto/Math/CVector3d.hpp | 8 +-- include/Kyoto/Math/CVector3f.hpp | 6 +- include/Kyoto/Math/CVector3i.hpp | 6 +- include/Kyoto/Math/CloseEnough.hpp | 6 +- include/Kyoto/Particles/CElementGen.hpp | 11 ++-- include/Kyoto/Particles/CGenDescription.hpp | 7 ++- include/Kyoto/Particles/CParticleGen.hpp | 6 +- include/Kyoto/Particles/CParticleGlobals.hpp | 6 +- include/Kyoto/Particles/CWarp.hpp | 12 ++-- include/Kyoto/SObjectTag.hpp | 6 +- include/Kyoto/Streams/CInputStream.hpp | 10 ++- include/Kyoto/Streams/CMemoryInStream.hpp | 6 +- include/Kyoto/Streams/COutputStream.hpp | 32 ++++------ include/Kyoto/Streams/CZipInputStream.hpp | 6 +- include/Kyoto/TAverage.hpp | 6 +- include/Kyoto/TOneStatic.hpp | 6 +- include/Kyoto/TReservedAverage.hpp | 6 +- include/Kyoto/TToken.hpp | 6 +- include/Kyoto/Text/CFontImageDef.hpp | 6 +- include/Kyoto/Text/CRasterFont.hpp | 6 +- include/Kyoto/Text/CStringTable.hpp | 6 +- include/Kyoto/Text/CTextColor.hpp | 18 +++--- include/Kyoto/Text/CTextExecuteBuffer.hpp | 10 ++- include/Kyoto/Text/CTextParser.hpp | 38 ++++++------ include/MetaRender/CCubeRenderer.hpp | 7 +-- include/MetaRender/IRenderer.hpp | 8 +-- include/MetroTRK/TrkInit.h | 6 +- include/MetroidPrime/CActor.hpp | 14 ++--- include/MetroidPrime/CActorLights.hpp | 11 ++-- include/MetroidPrime/CActorModelParticles.hpp | 6 +- include/MetroidPrime/CActorParameters.hpp | 6 +- .../MetroidPrime/CAdditiveAnimPlayback.hpp | 6 +- include/MetroidPrime/CAnimData.hpp | 6 +- include/MetroidPrime/CAnimPlaybackParms.hpp | 6 +- include/MetroidPrime/CAnimRes.hpp | 12 ++-- .../CArchMsgParmControllerStatus.hpp | 8 ++- include/MetroidPrime/CArchMsgParmInt32.hpp | 9 ++- .../CArchMsgParmInt32Int32VoidPtr.hpp | 8 ++- include/MetroidPrime/CArchMsgParmNull.hpp | 8 ++- include/MetroidPrime/CArchMsgParmReal32.hpp | 9 ++- .../MetroidPrime/CArchMsgParmUserInput.hpp | 7 ++- include/MetroidPrime/CArchitectureMessage.hpp | 6 +- include/MetroidPrime/CArchitectureQueue.hpp | 6 +- include/MetroidPrime/CArtifactDoll.hpp | 10 +-- include/MetroidPrime/CAudioStateWin.hpp | 6 +- include/MetroidPrime/CAxisAngle.hpp | 15 +++-- include/MetroidPrime/CCharAnimTime.hpp | 6 +- include/MetroidPrime/CCharacterInfo.hpp | 10 +-- include/MetroidPrime/CCollisionActor.hpp | 6 +- include/MetroidPrime/CConsoleOutputWindow.hpp | 6 +- include/MetroidPrime/CDamageInfo.hpp | 8 ++- include/MetroidPrime/CDamageVulnerability.hpp | 9 +-- include/MetroidPrime/CDecalManager.hpp | 6 +- include/MetroidPrime/CEffect.hpp | 6 +- include/MetroidPrime/CEffectComponent.hpp | 6 +- include/MetroidPrime/CEntity.hpp | 6 +- include/MetroidPrime/CEntityInfo.hpp | 6 +- include/MetroidPrime/CEnvFxManager.hpp | 6 +- include/MetroidPrime/CErrorOutputWindow.hpp | 6 +- include/MetroidPrime/CExplosion.hpp | 6 +- include/MetroidPrime/CFluidPlaneManager.hpp | 6 +- .../MetroidPrime/CGameArchitectureSupport.hpp | 6 +- include/MetroidPrime/CGameArea.hpp | 6 +- include/MetroidPrime/CGameCollision.hpp | 6 +- include/MetroidPrime/CGameGlobalObjects.hpp | 6 +- include/MetroidPrime/CHealthInfo.hpp | 6 +- .../MetroidPrime/CHierarchyPoseBuilder.hpp | 6 +- include/MetroidPrime/CIOWin.hpp | 6 +- include/MetroidPrime/CIOWinManager.hpp | 6 +- include/MetroidPrime/CInGameTweakManager.hpp | 6 +- include/MetroidPrime/CInputGenerator.hpp | 6 +- include/MetroidPrime/CMain.hpp | 6 +- include/MetroidPrime/CMainFlow.hpp | 6 +- include/MetroidPrime/CMemoryCard.hpp | 6 +- include/MetroidPrime/CMemoryDrawEnum.hpp | 6 +- include/MetroidPrime/CModelData.hpp | 6 +- include/MetroidPrime/CObjectList.hpp | 6 +- include/MetroidPrime/CPOINode.hpp | 6 +- include/MetroidPrime/CParticleData.hpp | 6 +- include/MetroidPrime/CParticleDatabase.hpp | 6 +- include/MetroidPrime/CPhysicsActor.hpp | 6 +- include/MetroidPrime/CPhysicsState.hpp | 6 +- include/MetroidPrime/CPoseAsTransforms.hpp | 6 +- include/MetroidPrime/CRainSplashGenerator.hpp | 6 +- include/MetroidPrime/CRippleManager.hpp | 6 +- include/MetroidPrime/CRumbleManager.hpp | 6 +- include/MetroidPrime/CSimpleShadow.hpp | 6 +- include/MetroidPrime/CSortedLists.hpp | 6 +- include/MetroidPrime/CSplashScreen.hpp | 6 +- include/MetroidPrime/CStateManager.hpp | 20 +++--- .../MetroidPrime/CStateManagerContainer.hpp | 6 +- include/MetroidPrime/CWeaponMgr.hpp | 6 +- include/MetroidPrime/CWorld.hpp | 6 +- include/MetroidPrime/CWorldShadow.hpp | 15 +++-- include/MetroidPrime/Cameras/CBallCamera.hpp | 6 +- .../MetroidPrime/Cameras/CCameraBlurPass.hpp | 6 +- .../Cameras/CCameraFilterPass.hpp | 6 +- include/MetroidPrime/Cameras/CCameraHint.hpp | 6 +- .../MetroidPrime/Cameras/CCameraManager.hpp | 6 +- .../MetroidPrime/Cameras/CCameraShakeData.hpp | 6 +- .../MetroidPrime/Cameras/CCameraSpline.hpp | 6 +- .../Cameras/CFirstPersonCamera.hpp | 7 +-- include/MetroidPrime/Cameras/CGameCamera.hpp | 6 +- include/MetroidPrime/Enemies/CAiFuncMap.hpp | 6 +- .../Factories/CCharacterFactoryBuilder.hpp | 6 +- include/MetroidPrime/HUD/CHUDMemoParms.hpp | 9 ++- include/MetroidPrime/HUD/CSamusHud.hpp | 8 ++- include/MetroidPrime/Player/CFidget.hpp | 5 +- include/MetroidPrime/Player/CGameOptions.hpp | 6 +- include/MetroidPrime/Player/CGameState.hpp | 14 ++--- include/MetroidPrime/Player/CGrappleArm.hpp | 10 +-- include/MetroidPrime/Player/CHintOptions.hpp | 6 +- include/MetroidPrime/Player/CPlayer.hpp | 6 +- .../MetroidPrime/Player/CPlayerCameraBob.hpp | 5 +- .../Player/CPlayerEnergyDrain.hpp | 6 +- include/MetroidPrime/Player/CPlayerGun.hpp | 8 +-- include/MetroidPrime/Player/CPlayerState.hpp | 14 +++-- .../Player/CStaticInterference.hpp | 7 ++- .../MetroidPrime/Player/CSystemOptions.hpp | 10 +-- include/MetroidPrime/Player/CWorldState.hpp | 6 +- .../Player/CWorldTransManager.hpp | 6 +- include/MetroidPrime/SFX/SFX.h | 6 +- include/MetroidPrime/ScriptObjects/CFire.hpp | 9 +-- .../CScriptDebugCameraWaypoint.hpp | 6 +- .../ScriptObjects/CScriptMazeNode.hpp | 6 +- .../ScriptObjects/CScriptPickup.hpp | 6 +- .../ScriptObjects/CScriptPlatform.hpp | 6 +- .../ScriptObjects/CScriptSpecialFunction.hpp | 7 ++- .../ScriptObjects/CScriptSwitch.hpp | 8 ++- .../ScriptObjects/CScriptWaypoint.hpp | 6 +- include/MetroidPrime/TCastTo.hpp | 6 +- include/MetroidPrime/TGameTypes.hpp | 7 ++- include/MetroidPrime/Tweaks/CTweakBall.hpp | 6 +- include/MetroidPrime/Tweaks/CTweakGame.hpp | 6 +- include/MetroidPrime/Tweaks/CTweakGunRes.hpp | 8 ++- include/MetroidPrime/Tweaks/CTweakPlayer.hpp | 6 +- .../MetroidPrime/Tweaks/CTweakPlayerGun.hpp | 22 +++---- include/MetroidPrime/Tweaks/CTweaks.hpp | 6 +- include/MetroidPrime/Tweaks/ITweakObject.hpp | 6 +- include/MetroidPrime/UserNames.hpp | 6 +- include/MetroidPrime/Weapons/CAuxWeapon.hpp | 8 ++- .../Weapons/CEnergyProjectile.hpp | 6 +- .../MetroidPrime/Weapons/CGameProjectile.hpp | 6 +- include/MetroidPrime/Weapons/CGunWeapon.hpp | 18 +++--- include/MetroidPrime/Weapons/CIceBeam.hpp | 11 ++-- include/MetroidPrime/Weapons/CPhazonBeam.hpp | 11 ++-- include/MetroidPrime/Weapons/CPlasmaBeam.hpp | 11 ++-- include/MetroidPrime/Weapons/CPowerBeam.hpp | 8 ++- include/MetroidPrime/Weapons/CPowerBomb.hpp | 10 +-- .../Weapons/CProjectileWeapon.hpp | 6 +- include/MetroidPrime/Weapons/CWaveBeam.hpp | 11 ++-- include/MetroidPrime/Weapons/CWeapon.hpp | 6 +- .../Weapons/GunController/CGSFreeLook.hpp | 9 +-- .../Weapons/GunController/CGunController.hpp | 9 ++- .../Weapons/GunController/CGunMotion.hpp | 15 +++-- include/MetroidPrime/Weapons/WeaponCommon.hpp | 9 ++- include/MetroidPrime/Weapons/WeaponTypes.hpp | 6 +- include/Weapons/CDecal.hpp | 23 +++---- include/Weapons/CDecalDescription.hpp | 10 ++- include/Weapons/IWeaponRenderer.hpp | 6 +- include/WorldFormat/CAreaOctTree.hpp | 6 +- .../WorldFormat/CCollidableOBBTreeGroup.hpp | 6 +- include/WorldFormat/CCollisionSurface.hpp | 6 +- include/WorldFormat/CMetroidAreaCollider.hpp | 6 +- include/dolphin/CARDPriv.h | 6 +- include/dolphin/DVDPriv.h | 6 +- include/dolphin/OSRtcPriv.h | 7 ++- include/dolphin/PPCArch.h | 6 +- include/dolphin/__ppc_eabi_init.h | 5 ++ include/dolphin/__start.h | 5 ++ include/dolphin/ai.h | 6 +- include/dolphin/ar.h | 6 +- include/dolphin/arq.h | 6 +- include/dolphin/card.h | 6 +- include/dolphin/db.h | 6 +- include/dolphin/dsp.h | 6 +- include/dolphin/dsp_regs.h | 6 +- include/dolphin/dtk.h | 9 ++- include/dolphin/dvd.h | 27 ++++---- include/dolphin/dvd_regs.h | 6 +- include/dolphin/gba.h | 6 +- include/dolphin/gx.h | 6 +- include/dolphin/gx/GXBump.h | 6 +- include/dolphin/gx/GXCommandList.h | 6 +- include/dolphin/gx/GXCull.h | 6 +- include/dolphin/gx/GXDispList.h | 6 +- include/dolphin/gx/GXDraw.h | 6 +- include/dolphin/gx/GXEnum.h | 6 +- include/dolphin/gx/GXExtra.h | 10 +-- include/dolphin/gx/GXFifo.h | 6 +- include/dolphin/gx/GXFrameBuffer.h | 61 +++++++++---------- include/dolphin/gx/GXGeometry.h | 6 +- include/dolphin/gx/GXGet.h | 6 +- include/dolphin/gx/GXLighting.h | 6 +- include/dolphin/gx/GXManage.h | 6 +- include/dolphin/gx/GXPerf.h | 6 +- include/dolphin/gx/GXPixel.h | 6 +- include/dolphin/gx/GXStruct.h | 6 +- include/dolphin/gx/GXTev.h | 6 +- include/dolphin/gx/GXTexture.h | 6 +- include/dolphin/gx/GXTransform.h | 6 +- include/dolphin/gx/GXVert.h | 6 +- include/dolphin/mtx.h | 6 +- include/dolphin/os.h | 6 +- include/dolphin/os/OSAlarm.h | 6 +- include/dolphin/os/OSArena.h | 5 +- include/dolphin/os/OSBootInfo.h | 6 +- include/dolphin/os/OSCache.h | 2 +- include/dolphin/os/OSContext.h | 6 +- include/dolphin/os/OSError.h | 6 +- include/dolphin/os/OSException.h | 6 +- include/dolphin/os/OSFastCast.h | 6 +- include/dolphin/os/OSFont.h | 6 +- include/dolphin/os/OSInterrupt.h | 7 +-- include/dolphin/os/OSMemory.h | 6 +- include/dolphin/os/OSMutex.h | 6 +- include/dolphin/os/OSReset.h | 6 +- include/dolphin/os/OSSerial.h | 6 +- include/dolphin/os/OSThread.h | 6 +- include/dolphin/pad.h | 6 +- include/dolphin/sipriv.h | 8 +-- include/dolphin/types.h | 6 +- include/dolphin/vi.h | 7 +-- include/dolphin/vifuncs.h | 6 +- include/math_ppc.h | 6 +- include/musyx/dsp_import.h | 6 +- include/musyx/musyx.h | 6 +- include/musyx/musyx_priv.h | 6 +- include/musyx/seq.h | 5 ++ include/musyx/synth.h | 6 +- include/musyx/synth_dbtab.h | 7 ++- include/rstl/algorithm.hpp | 6 +- include/rstl/auto_ptr.hpp | 8 +-- include/rstl/construct.hpp | 8 +-- include/rstl/construction_deferred.hpp | 6 +- include/rstl/hash_map.hpp | 6 +- include/rstl/list.hpp | 6 +- include/rstl/map.hpp | 6 +- include/rstl/math.hpp | 6 +- include/rstl/optional_object.hpp | 6 +- include/rstl/pair.hpp | 6 +- include/rstl/pointer_iterator.hpp | 12 ++-- include/rstl/rc_ptr.hpp | 6 +- include/rstl/red_black_tree.hpp | 7 ++- include/rstl/reserved_vector.hpp | 6 +- include/rstl/rmemory_allocator.hpp | 6 +- include/rstl/single_ptr.hpp | 10 ++- include/rstl/string.hpp | 6 +- include/rstl/vector.hpp | 22 +++---- include/types.h | 6 +- libc/math.h | 31 +++++----- 341 files changed, 1373 insertions(+), 1256 deletions(-) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index cf8979be..5a65e648 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,6 +1,7 @@ { "recommendations": [ "ms-vscode.cpptools", - "xaver.clang-format" + "xaver.clang-format", + "akiramiyakoda.cppincludeguard" ] } diff --git a/.vscode/settings.json b/.vscode/settings.json index dbda1e96..97ba01ec 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -14,4 +14,25 @@ "files.autoSave": "onFocusChange", "files.insertFinalNewline": 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" + ], } diff --git a/include/Collision/CCollidableAABox.hpp b/include/Collision/CCollidableAABox.hpp index c5cdf0bc..e454d426 100644 --- a/include/Collision/CCollidableAABox.hpp +++ b/include/Collision/CCollidableAABox.hpp @@ -1,5 +1,5 @@ -#ifndef _CCOLLIDABLEAABOX_HPP -#define _CCOLLIDABLEAABOX_HPP +#ifndef _CCOLLIDABLEAABOX +#define _CCOLLIDABLEAABOX #include "types.h" @@ -16,7 +16,7 @@ public: CAABox CalculateAABox(const CTransform4f&) const override; CAABox CalculateLocalAABox() const override; FourCC GetPrimType() const override; - ~CCollidableAABox() override {}; + ~CCollidableAABox() override{}; CRayCastResult CastRayInternal(const CInternalRayCastStructure&) const; private: @@ -24,4 +24,4 @@ private: }; CHECK_SIZEOF(CCollidableAABox, 0x28) -#endif +#endif // _CCOLLIDABLEAABOX diff --git a/include/Collision/CCollidableSphere.hpp b/include/Collision/CCollidableSphere.hpp index 9ca1532a..1fd7859b 100644 --- a/include/Collision/CCollidableSphere.hpp +++ b/include/Collision/CCollidableSphere.hpp @@ -1,5 +1,5 @@ -#ifndef _CCOLLIDABLESPHERE_HPP -#define _CCOLLIDABLESPHERE_HPP +#ifndef _CCOLLIDABLESPHERE +#define _CCOLLIDABLESPHERE #include "types.h" @@ -24,4 +24,4 @@ private: }; CHECK_SIZEOF(CCollidableSphere, 0x20) -#endif +#endif // _CCOLLIDABLESPHERE diff --git a/include/Collision/CCollisionInfo.hpp b/include/Collision/CCollisionInfo.hpp index 8042ad25..0a735ad2 100644 --- a/include/Collision/CCollisionInfo.hpp +++ b/include/Collision/CCollisionInfo.hpp @@ -1,5 +1,5 @@ -#ifndef _CCOLLISIONINFO_HPP -#define _CCOLLISIONINFO_HPP +#ifndef _CCOLLISIONINFO +#define _CCOLLISIONINFO #include "types.h" @@ -15,16 +15,16 @@ public: kI_Invalid, kI_Valid, }; - enum ESwapMaterials { - kSM_Swap - }; + enum ESwapMaterials { kSM_Swap }; 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, const CMaterialList& rightMat, const CVector3f& leftNormal, - const CVector3f& rightNormal); - CCollisionInfo(const CAABox& aabox, const CMaterialList& leftMat, const CMaterialList& rightMat, const CVector3f& leftNormal, + CCollisionInfo(const CVector3f& point, const CMaterialList& leftMat, + const CMaterialList& rightMat, const CVector3f& normal); + CCollisionInfo(const CVector3f& point, const CMaterialList& leftMat, + const CMaterialList& rightMat, const CVector3f& leftNormal, 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) : x0_point(other.x0_point) , xc_extentX(other.xc_extentX) @@ -61,4 +61,4 @@ private: }; CHECK_SIZEOF(CCollisionInfo, 0x60) -#endif +#endif // _CCOLLISIONINFO diff --git a/include/Collision/CCollisionPrimitive.hpp b/include/Collision/CCollisionPrimitive.hpp index 2bf4b76c..790e4218 100644 --- a/include/Collision/CCollisionPrimitive.hpp +++ b/include/Collision/CCollisionPrimitive.hpp @@ -1,5 +1,5 @@ -#ifndef _CCOLLISIONPRIMITIVE_HPP -#define _CCOLLISIONPRIMITIVE_HPP +#ifndef _CCOLLISIONPRIMITIVE +#define _CCOLLISIONPRIMITIVE #include "types.h" @@ -33,4 +33,4 @@ CHECK_SIZEOF(CCollisionPrimitive, 0x10) inline CCollisionPrimitive::~CCollisionPrimitive() {} -#endif +#endif // _CCOLLISIONPRIMITIVE diff --git a/include/Collision/CMRay.hpp b/include/Collision/CMRay.hpp index cf252c7b..f16de1f6 100644 --- a/include/Collision/CMRay.hpp +++ b/include/Collision/CMRay.hpp @@ -1,5 +1,5 @@ -#ifndef __CMRAY_HPP__ -#define __CMRAY_HPP__ +#ifndef _CMRAY +#define _CMRAY #include "Kyoto/Math/CVector3f.hpp" @@ -19,4 +19,4 @@ private: CVector3f mDir; }; -#endif // __CMRAY_HPP__ +#endif // _CMRAY diff --git a/include/Collision/CMaterialFilter.hpp b/include/Collision/CMaterialFilter.hpp index 6880396d..f3f337dc 100644 --- a/include/Collision/CMaterialFilter.hpp +++ b/include/Collision/CMaterialFilter.hpp @@ -1,5 +1,5 @@ -#ifndef _CMATERIALFILTER_HPP -#define _CMATERIALFILTER_HPP +#ifndef _CMATERIALFILTER +#define _CMATERIALFILTER #include "types.h" @@ -7,6 +7,7 @@ class CMaterialFilter { static const CMaterialFilter skPassEverything; + public: enum EFilterType { kFT_Always, @@ -39,4 +40,4 @@ private: }; CHECK_SIZEOF(CMaterialFilter, 0x18) -#endif +#endif // _CMATERIALFILTER diff --git a/include/Collision/CMaterialList.hpp b/include/Collision/CMaterialList.hpp index cc647591..31be0e95 100644 --- a/include/Collision/CMaterialList.hpp +++ b/include/Collision/CMaterialList.hpp @@ -1,5 +1,5 @@ -#ifndef _CMATERIALLIST_HPP -#define _CMATERIALLIST_HPP +#ifndef _CMATERIALLIST +#define _CMATERIALLIST #include "types.h" @@ -129,4 +129,4 @@ private: }; CHECK_SIZEOF(CMaterialList, 0x8) -#endif +#endif // _CMATERIALLIST diff --git a/include/Collision/COBBox.hpp b/include/Collision/COBBox.hpp index 68f31859..868113dc 100644 --- a/include/Collision/COBBox.hpp +++ b/include/Collision/COBBox.hpp @@ -1,5 +1,5 @@ -#ifndef __COBBOX_HPP__ -#define __COBBOX_HPP__ +#ifndef _COBBOX +#define _COBBOX #include "Kyoto/Math/CAABox.hpp" #include "Kyoto/Math/CTransform4f.hpp" @@ -19,9 +19,10 @@ public: bool LineIntersectsBox(const CMRay& ray, float& penetration) const; bool AABoxIntersectsBox(const CAABox& box) const; bool OBBIntersectsBox(const COBBox& box) const; + private: CTransform4f mTransform; CVector3f mExtents; }; -#endif // __COBBOX_HPP__ +#endif // _COBBOX diff --git a/include/Collision/CRayCastResult.hpp b/include/Collision/CRayCastResult.hpp index d0ebcfb6..ac4f07dc 100644 --- a/include/Collision/CRayCastResult.hpp +++ b/include/Collision/CRayCastResult.hpp @@ -1,5 +1,5 @@ -#ifndef _CRAYCASTRESULT_HPP -#define _CRAYCASTRESULT_HPP +#ifndef _CRAYCASTRESULT +#define _CRAYCASTRESULT #include "types.h" @@ -33,4 +33,4 @@ private: }; CHECK_SIZEOF(CRayCastResult, 0x30) -#endif +#endif // _CRAYCASTRESULT diff --git a/include/GuiSys/CGuiSys.hpp b/include/GuiSys/CGuiSys.hpp index 7acecc86..e0d07f92 100644 --- a/include/GuiSys/CGuiSys.hpp +++ b/include/GuiSys/CGuiSys.hpp @@ -1,5 +1,5 @@ -#ifndef _CGUISYS_HPP -#define _CGUISYS_HPP +#ifndef _CGUISYS +#define _CGUISYS #include "types.h" @@ -31,4 +31,4 @@ private: static CGuiSys* spGuiSys; }; -#endif +#endif // _CGUISYS diff --git a/include/Kyoto/Alloc/AllocatorCommon.hpp b/include/Kyoto/Alloc/AllocatorCommon.hpp index abc095dd..7c13095c 100644 --- a/include/Kyoto/Alloc/AllocatorCommon.hpp +++ b/include/Kyoto/Alloc/AllocatorCommon.hpp @@ -1,8 +1,7 @@ -#ifndef __ALLOCATORCOMMON_HPP__ -#define __ALLOCATORCOMMON_HPP__ - +#ifndef _ALLOCATORCOMMON +#define _ALLOCATORCOMMON static const int kPointerSize = sizeof(void*); static const int kPointerBits = kPointerSize * 8; -#endif // __ALLOCATORCOMMON_HPP__ +#endif // _ALLOCATORCOMMON diff --git a/include/Kyoto/Alloc/CCallStack.hpp b/include/Kyoto/Alloc/CCallStack.hpp index ed7aa49e..edf61f1d 100644 --- a/include/Kyoto/Alloc/CCallStack.hpp +++ b/include/Kyoto/Alloc/CCallStack.hpp @@ -1,5 +1,5 @@ -#ifndef __CCALLSTACK_HPP__ -#define __CCALLSTACK_HPP__ +#ifndef _CCALLSTACK +#define _CCALLSTACK class CCallStack { public: @@ -7,9 +7,10 @@ public: const char* GetFileAndLineText() const; const char* GetTypeText() const; + private: const char* x0_line; const char* x4_type; }; -#endif // __CCALLSTACK_HPP__ +#endif // _CCALLSTACK diff --git a/include/Kyoto/Alloc/CCircularBuffer.hpp b/include/Kyoto/Alloc/CCircularBuffer.hpp index e7d1cdc8..220dd361 100644 --- a/include/Kyoto/Alloc/CCircularBuffer.hpp +++ b/include/Kyoto/Alloc/CCircularBuffer.hpp @@ -1,5 +1,5 @@ -#ifndef __CCIRCULARBUFFER_HPP__ -#define __CCIRCULARBUFFER_HPP__ +#ifndef _CCIRCULARBUFFER +#define _CCIRCULARBUFFER #include @@ -21,4 +21,5 @@ private: s32 x10_nextFreeAddr; s32 x14_; }; -#endif // __CCIRCULARBUFFER_HPP__ + +#endif // _CCIRCULARBUFFER diff --git a/include/Kyoto/Alloc/CGameAllocator.hpp b/include/Kyoto/Alloc/CGameAllocator.hpp index ff5f79bd..996ca90d 100644 --- a/include/Kyoto/Alloc/CGameAllocator.hpp +++ b/include/Kyoto/Alloc/CGameAllocator.hpp @@ -1,5 +1,5 @@ -#ifndef __CGAMEALLOCATOR_HPP__ -#define __CGAMEALLOCATOR_HPP__ +#ifndef _CGAMEALLOCATOR +#define _CGAMEALLOCATOR #include #include @@ -133,4 +133,4 @@ private: uint xbc_; }; -#endif // __CGAMEALLOCATOR_HPP__ +#endif // _CGAMEALLOCATOR diff --git a/include/Kyoto/Alloc/CMediumAllocPool.hpp b/include/Kyoto/Alloc/CMediumAllocPool.hpp index bf0b7223..f86e4c89 100644 --- a/include/Kyoto/Alloc/CMediumAllocPool.hpp +++ b/include/Kyoto/Alloc/CMediumAllocPool.hpp @@ -1,34 +1,34 @@ -#ifndef __CMEDIUMALLOCPOOL_HPP__ -#define __CMEDIUMALLOCPOOL_HPP__ +#ifndef _CMEDIUMALLOCPOOL +#define _CMEDIUMALLOCPOOL #include class CMediumAllocPool { public: - struct SMediumAllocPuddle { - u8 unk; - void* x4_mainData; - void* x8_bookKeeping; - void* xc_cachedBookKeepingOffset; - int x10_; - int x14_numBlocks; - int x18_numAllocs; - int x1c_numEntries; - }; + struct SMediumAllocPuddle { + u8 unk; + void* x4_mainData; + void* x8_bookKeeping; + void* xc_cachedBookKeepingOffset; + int x10_; + int x14_numBlocks; + int x18_numAllocs; + int x1c_numEntries; + }; - rstl::list x0_list; - /*rstl::list_node* x18_lastNodePrev; */ - void* x18_lastNodePrev; - void* Alloc(uint size); - bool HasPuddles() const; - void AddPuddle(uint, void*, int); - void ClearPuddles(); + rstl::list< SMediumAllocPuddle > x0_list; + /*rstl::list_node* x18_lastNodePrev; */ + void* x18_lastNodePrev; + void* Alloc(uint size); + bool HasPuddles() const; + void AddPuddle(uint, void*, int); + void ClearPuddles(); - s32 Free(const void* ptr); + s32 Free(const void* ptr); - uint GetTotalEntries(); - uint GetNumBlocksAvailable(); - uint GetNumAllocs(); + uint GetTotalEntries(); + uint GetNumBlocksAvailable(); + uint GetNumAllocs(); }; -#endif // __CMEDIUMALLOCPOOL_HPP__ +#endif // _CMEDIUMALLOCPOOL diff --git a/include/Kyoto/Alloc/CMemory.hpp b/include/Kyoto/Alloc/CMemory.hpp index de9a07d7..e068ae92 100644 --- a/include/Kyoto/Alloc/CMemory.hpp +++ b/include/Kyoto/Alloc/CMemory.hpp @@ -1,5 +1,5 @@ -#ifndef _CMEMORY_HPP -#define _CMEMORY_HPP +#ifndef _CMEMORY +#define _CMEMORY #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); } -#endif +#endif // _CMEMORY diff --git a/include/Kyoto/Alloc/CSmallAllocPool.hpp b/include/Kyoto/Alloc/CSmallAllocPool.hpp index f0326e6d..1c8c4486 100644 --- a/include/Kyoto/Alloc/CSmallAllocPool.hpp +++ b/include/Kyoto/Alloc/CSmallAllocPool.hpp @@ -1,5 +1,5 @@ -#ifndef __CSMALLALLOCPOOL_HPP__ -#define __CSMALLALLOCPOOL_HPP__ +#ifndef _CSMALLALLOCPOOL +#define _CSMALLALLOCPOOL #include @@ -13,12 +13,17 @@ public: bool Free(const void* ptr); bool PtrWithinPool(const void* ptr) const { - return u32((reinterpret_cast< const u8* >(ptr) - reinterpret_cast< u8* >(x0_mainData)) / 4) < x8_numBlocks; + return 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); } - 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 GetTotalEntries() const { return x8_numBlocks; } @@ -26,7 +31,6 @@ public: uint GetNumAllocs() const { return x1c_numAllocs; } private: - void* x0_mainData; void* x4_bookKeeping; int x8_numBlocks; @@ -36,4 +40,5 @@ private: uint x18_numBlocksAvailable; uint x1c_numAllocs; }; -#endif // __CSMALLALLOCPOOL_HPP__ + +#endif // _CSMALLALLOCPOOL diff --git a/include/Kyoto/Alloc/IAllocator.hpp b/include/Kyoto/Alloc/IAllocator.hpp index fec7c14a..4904c3be 100644 --- a/include/Kyoto/Alloc/IAllocator.hpp +++ b/include/Kyoto/Alloc/IAllocator.hpp @@ -1,5 +1,5 @@ -#ifndef _IALLOCATOR_HPP -#define _IALLOCATOR_HPP +#ifndef _IALLOCATOR +#define _IALLOCATOR #include "Kyoto/Alloc/CMemory.hpp" #include "types.h" @@ -95,4 +95,4 @@ public: virtual SMetrics GetMetrics() const = 0; }; -#endif +#endif // _IALLOCATOR diff --git a/include/Kyoto/Animation/CPASAnimParmData.hpp b/include/Kyoto/Animation/CPASAnimParmData.hpp index 5f26e571..6b27ccd2 100644 --- a/include/Kyoto/Animation/CPASAnimParmData.hpp +++ b/include/Kyoto/Animation/CPASAnimParmData.hpp @@ -1,5 +1,5 @@ -#ifndef _CPASANIMPARMDATA_HPP -#define _CPASANIMPARMDATA_HPP +#ifndef _CPASANIMPARMDATA +#define _CPASANIMPARMDATA #include "Kyoto/Animation/CPASAnimState.hpp" @@ -36,4 +36,4 @@ public: } }; -#endif // _CPASANIMPARMDATA_HPP +#endif // _CPASANIMPARMDATA diff --git a/include/Kyoto/Animation/CPASAnimState.hpp b/include/Kyoto/Animation/CPASAnimState.hpp index ee01b010..437284c4 100644 --- a/include/Kyoto/Animation/CPASAnimState.hpp +++ b/include/Kyoto/Animation/CPASAnimState.hpp @@ -1,10 +1,10 @@ -#ifndef _CPASANIMSTATE_HPP -#define _CPASANIMSTATE_HPP +#ifndef _CPASANIMSTATE +#define _CPASANIMSTATE #include "types.h" -#include "rstl/vector.hpp" #include "rstl/reserved_vector.hpp" +#include "rstl/vector.hpp" namespace pas { enum EAnimationState { @@ -53,8 +53,7 @@ public: f32 m_float; bool m_bool; }; - CPASAnimParm(const CPASAnimParm& other) - : x0_value(other.x0_value), x4_type(other.x4_type) {} + CPASAnimParm(const CPASAnimParm& other) : x0_value(other.x0_value), x4_type(other.x4_type) {} static CPASAnimParm FromEnum(s32 val); static CPASAnimParm FromBool(bool val); @@ -96,6 +95,7 @@ private: class CPASAnimState { public: CPASAnimParm GetAnimParmData(int, unsigned int) const; + private: pas::EAnimationState x0_id; rstl::vector< CPASParmInfo > x4_parms; @@ -104,4 +104,4 @@ private: }; CHECK_SIZEOF(CPASAnimState, 0x34) -#endif +#endif // _CPASANIMSTATE diff --git a/include/Kyoto/Animation/CPASDatabase.hpp b/include/Kyoto/Animation/CPASDatabase.hpp index baebead5..ce9db817 100644 --- a/include/Kyoto/Animation/CPASDatabase.hpp +++ b/include/Kyoto/Animation/CPASDatabase.hpp @@ -1,12 +1,12 @@ -#ifndef _CPASDATABASE_HPP -#define _CPASDATABASE_HPP +#ifndef _CPASDATABASE +#define _CPASDATABASE #include "types.h" #include "Kyoto/Animation/CPASAnimState.hpp" -#include "rstl/vector.hpp" #include "rstl/pair.hpp" +#include "rstl/vector.hpp" class CPASAnimParmData; class CRandom16; @@ -18,8 +18,8 @@ private: public: const CPASAnimState* GetAnimState(int) const; - rstl::pair FindBestAnimation(const CPASAnimParmData&, CRandom16&, int) const; + rstl::pair< float, int > FindBestAnimation(const CPASAnimParmData&, CRandom16&, int) const; }; CHECK_SIZEOF(CPASDatabase, 0x14) -#endif +#endif // _CPASDATABASE diff --git a/include/Kyoto/Animation/CSkinnedModel.hpp b/include/Kyoto/Animation/CSkinnedModel.hpp index b5b8009c..a6aa7786 100644 --- a/include/Kyoto/Animation/CSkinnedModel.hpp +++ b/include/Kyoto/Animation/CSkinnedModel.hpp @@ -1,5 +1,5 @@ -#ifndef _CSKINNEDMODEL_HPP -#define _CSKINNEDMODEL_HPP +#ifndef _CSKINNEDMODEL +#define _CSKINNEDMODEL #include "types.h" @@ -11,4 +11,4 @@ private: // TODO }; -#endif +#endif // _CSKINNEDMODEL diff --git a/include/Kyoto/Audio/CAudioSys.hpp b/include/Kyoto/Audio/CAudioSys.hpp index 7622029a..bc95eaed 100644 --- a/include/Kyoto/Audio/CAudioSys.hpp +++ b/include/Kyoto/Audio/CAudioSys.hpp @@ -1,5 +1,5 @@ -#ifndef _CAUDIOSYS_HPP -#define _CAUDIOSYS_HPP +#ifndef _CAUDIOSYS +#define _CAUDIOSYS #include "types.h" @@ -28,4 +28,4 @@ public: static const u8 kMaxVolume; }; -#endif +#endif // _CAUDIOSYS diff --git a/include/Kyoto/Audio/CDSPStreamManager.hpp b/include/Kyoto/Audio/CDSPStreamManager.hpp index 39f91631..227ac70a 100644 --- a/include/Kyoto/Audio/CDSPStreamManager.hpp +++ b/include/Kyoto/Audio/CDSPStreamManager.hpp @@ -1,5 +1,5 @@ -#ifndef _CDSPSTREAMMANAGER_HPP -#define _CDSPSTREAMMANAGER_HPP +#ifndef _CDSPSTREAMMANAGER +#define _CDSPSTREAMMANAGER #include "types.h" @@ -9,4 +9,4 @@ public: static void Shutdown(); }; -#endif +#endif // _CDSPSTREAMMANAGER diff --git a/include/Kyoto/Audio/CSfxHandle.hpp b/include/Kyoto/Audio/CSfxHandle.hpp index e1b387b3..772a3790 100644 --- a/include/Kyoto/Audio/CSfxHandle.hpp +++ b/include/Kyoto/Audio/CSfxHandle.hpp @@ -1,5 +1,5 @@ -#ifndef _CSFXHANDLE_HPP -#define _CSFXHANDLE_HPP +#ifndef _CSFXHANDLE +#define _CSFXHANDLE #include "types.h" @@ -22,4 +22,4 @@ private: }; CHECK_SIZEOF(CSfxHandle, 0x4) -#endif +#endif // _CSFXHANDLE diff --git a/include/Kyoto/Audio/CSfxManager.hpp b/include/Kyoto/Audio/CSfxManager.hpp index 74a46d20..6327de82 100644 --- a/include/Kyoto/Audio/CSfxManager.hpp +++ b/include/Kyoto/Audio/CSfxManager.hpp @@ -1,5 +1,5 @@ -#ifndef _CSFXMANAGER_HPP -#define _CSFXMANAGER_HPP +#ifndef _CSFXMANAGER +#define _CSFXMANAGER #include "types.h" @@ -28,8 +28,9 @@ public: 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); }; -#endif +#endif // _CSFXMANAGER diff --git a/include/Kyoto/Audio/CStreamAudioManager.hpp b/include/Kyoto/Audio/CStreamAudioManager.hpp index 5d6d2def..279ee6bf 100644 --- a/include/Kyoto/Audio/CStreamAudioManager.hpp +++ b/include/Kyoto/Audio/CStreamAudioManager.hpp @@ -1,5 +1,5 @@ -#ifndef _CSTREAMAUDIOMANAGER_HPP -#define _CSTREAMAUDIOMANAGER_HPP +#ifndef _CSTREAMAUDIOMANAGER +#define _CSTREAMAUDIOMANAGER #include "types.h" @@ -12,4 +12,4 @@ public: private: }; -#endif +#endif // _CSTREAMAUDIOMANAGER diff --git a/include/Kyoto/Audio/g721.h b/include/Kyoto/Audio/g721.h index cc56a1e8..a0a06ace 100644 --- a/include/Kyoto/Audio/g721.h +++ b/include/Kyoto/Audio/g721.h @@ -1,5 +1,5 @@ -#ifndef _g721_h -#define _g721_h +#ifndef _G721 +#define _G721 struct g72x_state { 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); -#endif +#endif // _G721 diff --git a/include/Kyoto/Basics/CBasics.hpp b/include/Kyoto/Basics/CBasics.hpp index 1124a095..8b6740ff 100644 --- a/include/Kyoto/Basics/CBasics.hpp +++ b/include/Kyoto/Basics/CBasics.hpp @@ -1,11 +1,11 @@ -#ifndef _CBASICS_HPP -#define _CBASICS_HPP +#ifndef _CBASICS +#define _CBASICS #include "types.h" namespace CBasics { void Init(); char* Stringize(const char* fmt, ...); -}; +}; // namespace CBasics -#endif +#endif // _CBASICS diff --git a/include/Kyoto/Basics/CCast.hpp b/include/Kyoto/Basics/CCast.hpp index a07ea82f..c60ade6f 100644 --- a/include/Kyoto/Basics/CCast.hpp +++ b/include/Kyoto/Basics/CCast.hpp @@ -1,5 +1,5 @@ -#ifndef __CCAST_HPP__ -#define __CCAST_HPP__ +#ifndef _CCAST +#define _CCAST #include "types.h" @@ -43,4 +43,4 @@ inline s16 FtoS(f32 in) { return static_cast< s16 >(in); } #endif } // namespace CCast -#endif +#endif // _CCAST diff --git a/include/Kyoto/Basics/COsContext.hpp b/include/Kyoto/Basics/COsContext.hpp index 9a913b87..3c3c0435 100644 --- a/include/Kyoto/Basics/COsContext.hpp +++ b/include/Kyoto/Basics/COsContext.hpp @@ -1,5 +1,5 @@ -#ifndef _COSCONTEXT_HPP -#define _COSCONTEXT_HPP +#ifndef _COSCONTEXT +#define _COSCONTEXT #include @@ -21,6 +21,7 @@ public: bool IsPressed() const { return x4_down; } bool JustPressed() const { return x4_unk && x4_down; } + private: int x0_key; short x4_down : 1; @@ -51,6 +52,7 @@ public: static void SetProgressiveMode(bool progressive) { mProgressiveMode = progressive; } static bool GetProgressiveMode() { return mProgressiveMode; } + private: int x0_right; int x4_bottom; @@ -68,4 +70,4 @@ private: }; CHECK_SIZEOF(COsContext, 0x6c) -#endif +#endif // _COSCONTEXT diff --git a/include/Kyoto/Basics/CStopwatch.hpp b/include/Kyoto/Basics/CStopwatch.hpp index f5a41605..ab0a875b 100644 --- a/include/Kyoto/Basics/CStopwatch.hpp +++ b/include/Kyoto/Basics/CStopwatch.hpp @@ -1,5 +1,5 @@ -#ifndef _CSTOPWATCH_HPP -#define _CSTOPWATCH_HPP +#ifndef _CSTOPWATCH +#define _CSTOPWATCH #include "types.h" @@ -9,10 +9,7 @@ class CStopwatch { public: class CSWData { public: - CSWData() - : x0_timerFreq(0) - , x8_timerFreqO1M(0) - , x10_timerPeriod(0.f) {} + CSWData() : x0_timerFreq(0), x8_timerFreqO1M(0), x10_timerPeriod(0.f) {} bool Initialize(); void Wait(f32) const; @@ -45,6 +42,7 @@ public: } static void Wait(f32); + private: static CSWData mData; static CStopwatch mGlobalTimer; @@ -52,4 +50,4 @@ private: s64 x0_startTime; }; -#endif +#endif // _CSTOPWATCH diff --git a/include/Kyoto/Basics/RAssertDolphin.hpp b/include/Kyoto/Basics/RAssertDolphin.hpp index b50d6d0d..27c54d0d 100644 --- a/include/Kyoto/Basics/RAssertDolphin.hpp +++ b/include/Kyoto/Basics/RAssertDolphin.hpp @@ -1,5 +1,5 @@ -#ifndef _RASSERTDOLPHIN_HPP -#define _RASSERTDOLPHIN_HPP +#ifndef _RASSERTDOLPHIN +#define _RASSERTDOLPHIN #include "types.h" @@ -9,4 +9,4 @@ void rs_debugger_printf(const char* format, ...); void ErrorHandler(OSError code, OSContext* context, int, int); void SetErrorHandlers(); -#endif +#endif // _RASSERTDOLPHIN diff --git a/include/Kyoto/CARAMManager.hpp b/include/Kyoto/CARAMManager.hpp index dda14883..163f2420 100644 --- a/include/Kyoto/CARAMManager.hpp +++ b/include/Kyoto/CARAMManager.hpp @@ -1,5 +1,5 @@ -#ifndef _CARAMMANAGER_HPP -#define _CARAMMANAGER_HPP +#ifndef _CARAMMANAGER +#define _CARAMMANAGER #include "types.h" @@ -14,4 +14,4 @@ private: static u32 mPreInitializeAlloc; }; -#endif +#endif // _CARAMMANAGER diff --git a/include/Kyoto/CARAMToken.hpp b/include/Kyoto/CARAMToken.hpp index 270660d4..9c6b42e9 100644 --- a/include/Kyoto/CARAMToken.hpp +++ b/include/Kyoto/CARAMToken.hpp @@ -1,5 +1,5 @@ -#ifndef _CARAMTOKEN_HPP -#define _CARAMTOKEN_HPP +#ifndef _CARAMTOKEN +#define _CARAMTOKEN #include "types.h" @@ -8,4 +8,4 @@ public: static void UpdateAllDMAs(); }; -#endif +#endif // _CARAMTOKEN diff --git a/include/Kyoto/CCrc32.hpp b/include/Kyoto/CCrc32.hpp index 4f2f1039..33638928 100644 --- a/include/Kyoto/CCrc32.hpp +++ b/include/Kyoto/CCrc32.hpp @@ -1,5 +1,5 @@ -#ifndef __CCRC32_HPP__ -#define __CCRC32_HPP__ +#ifndef _CCRC32 +#define _CCRC32 #include "types.h" class CCRC32 { @@ -7,4 +7,4 @@ public: static uint Calculate(const void* data, uint length); }; -#endif // __CCRC32_HPP__ +#endif // _CCRC32 diff --git a/include/Kyoto/CDvdFile.hpp b/include/Kyoto/CDvdFile.hpp index 0c6f3c86..43b2073d 100644 --- a/include/Kyoto/CDvdFile.hpp +++ b/include/Kyoto/CDvdFile.hpp @@ -1,5 +1,5 @@ -#ifndef _CDVDFILE_HPP -#define _CDVDFILE_HPP +#ifndef _CDVDFILE +#define _CDVDFILE #include "types.h" @@ -11,4 +11,4 @@ private: u8 pad[0x28]; }; -#endif +#endif // _CDVDFILE diff --git a/include/Kyoto/CFactoryMgr.hpp b/include/Kyoto/CFactoryMgr.hpp index 187e7025..f2609c3b 100644 --- a/include/Kyoto/CFactoryMgr.hpp +++ b/include/Kyoto/CFactoryMgr.hpp @@ -1,5 +1,5 @@ -#ifndef _CFACTORYMGR_HPP -#define _CFACTORYMGR_HPP +#ifndef _CFACTORYMGR +#define _CFACTORYMGR #include "types.h" @@ -27,4 +27,4 @@ private: CFactoryFnReturn FStringTableFactory(const SObjectTag& tag, CInputStream& in, const CVParamTransfer& xfer); -#endif +#endif // _CFACTORYMGR diff --git a/include/Kyoto/CFrameDelayedKiller.hpp b/include/Kyoto/CFrameDelayedKiller.hpp index 9f39afff..a869b089 100644 --- a/include/Kyoto/CFrameDelayedKiller.hpp +++ b/include/Kyoto/CFrameDelayedKiller.hpp @@ -1,5 +1,5 @@ -#ifndef _CFRAMEDELAYEDKILLER_HPP -#define _CFRAMEDELAYEDKILLER_HPP +#ifndef _CFRAMEDELAYEDKILLER +#define _CFRAMEDELAYEDKILLER #include "types.h" @@ -9,4 +9,4 @@ public: static void ShutDown(); }; -#endif +#endif // _CFRAMEDELAYEDKILLER diff --git a/include/Kyoto/CMemoryCardSys.hpp b/include/Kyoto/CMemoryCardSys.hpp index 6c3fdc5d..3c7c1af1 100644 --- a/include/Kyoto/CMemoryCardSys.hpp +++ b/include/Kyoto/CMemoryCardSys.hpp @@ -1,5 +1,5 @@ -#ifndef _CMEMORYCARDSYS_HPP -#define _CMEMORYCARDSYS_HPP +#ifndef _CMEMORYCARDSYS +#define _CMEMORYCARDSYS #include "types.h" @@ -14,4 +14,4 @@ private: // TODO }; -#endif +#endif // _CMEMORYCARDSYS diff --git a/include/Kyoto/CMemorySys.hpp b/include/Kyoto/CMemorySys.hpp index a925a229..cf05246f 100644 --- a/include/Kyoto/CMemorySys.hpp +++ b/include/Kyoto/CMemorySys.hpp @@ -1,5 +1,5 @@ -#ifndef _CMEMORY_SYS_HPP -#define _CMEMORY_SYS_HPP +#ifndef _CMEMORYSYS +#define _CMEMORYSYS #include "types.h" @@ -17,4 +17,4 @@ private: u8 x0_unk; }; -#endif +#endif // _CMEMORYSYS diff --git a/include/Kyoto/CObjectReference.hpp b/include/Kyoto/CObjectReference.hpp index 5c46ea9f..f641365f 100644 --- a/include/Kyoto/CObjectReference.hpp +++ b/include/Kyoto/CObjectReference.hpp @@ -1,5 +1,5 @@ -#ifndef __COBJECTREFERENCE_HPP__ -#define __COBJECTREFERENCE_HPP__ +#ifndef _COBJECTREFERENCE +#define _COBJECTREFERENCE #include #include @@ -21,6 +21,7 @@ public: CVParamTransfer xfer); bool IsLoaded() const { return x10_object != nullptr; } + private: u16 x0_refCount; bool x2_locked : 1; @@ -30,4 +31,4 @@ private: IObj* x10_object; CVParamTransfer x14_params; }; -#endif // __COBJECTREFERENCE_HPP__ +#endif // _COBJECTREFERENCE diff --git a/include/Kyoto/CPakFile.hpp b/include/Kyoto/CPakFile.hpp index f8657ae5..4d87bd5a 100644 --- a/include/Kyoto/CPakFile.hpp +++ b/include/Kyoto/CPakFile.hpp @@ -1,5 +1,5 @@ -#ifndef _CPAKFILE_HPP -#define _CPAKFILE_HPP +#ifndef _CPAKFILE +#define _CPAKFILE #include "types.h" @@ -35,4 +35,4 @@ private: mutable int x84_currentSeek; }; -#endif +#endif // _CPAKFILE diff --git a/include/Kyoto/CRandom16.hpp b/include/Kyoto/CRandom16.hpp index 7e3054d3..a61103e6 100644 --- a/include/Kyoto/CRandom16.hpp +++ b/include/Kyoto/CRandom16.hpp @@ -1,5 +1,5 @@ -#ifndef __CRANDOM16_HPP__ -#define __CRANDOM16_HPP__ +#ifndef _CRANDOM16 +#define _CRANDOM16 #include "types.h" @@ -36,4 +36,4 @@ private: uint mSeed; }; -#endif // __CRANDOM16_HPP__ +#endif // _CRANDOM16 diff --git a/include/Kyoto/CResFactory.hpp b/include/Kyoto/CResFactory.hpp index 4ce9890f..c37abc7c 100644 --- a/include/Kyoto/CResFactory.hpp +++ b/include/Kyoto/CResFactory.hpp @@ -1,5 +1,5 @@ -#ifndef _CRESFACTORY_HPP -#define _CRESFACTORY_HPP +#ifndef _CRESFACTORY +#define _CRESFACTORY #include "types.h" @@ -52,4 +52,4 @@ CHECK_SIZEOF(CResFactory, 0xc8); extern CResFactory* gpResourceFactory; -#endif +#endif // _CRESFACTORY diff --git a/include/Kyoto/CResLoader.hpp b/include/Kyoto/CResLoader.hpp index f04e80fa..c639d36e 100644 --- a/include/Kyoto/CResLoader.hpp +++ b/include/Kyoto/CResLoader.hpp @@ -1,5 +1,5 @@ -#ifndef _CRESLOADER_HPP -#define _CRESLOADER_HPP +#ifndef _CRESLOADER +#define _CRESLOADER #include "types.h" @@ -37,4 +37,4 @@ private: bool x54_forwardSeek; }; -#endif +#endif // _CRESLOADER diff --git a/include/Kyoto/CSimplePool.hpp b/include/Kyoto/CSimplePool.hpp index ab961ce0..dab938dc 100644 --- a/include/Kyoto/CSimplePool.hpp +++ b/include/Kyoto/CSimplePool.hpp @@ -1,5 +1,5 @@ -#ifndef _CSIMPLEPOOL_HPP -#define _CSIMPLEPOOL_HPP +#ifndef _CSIMPLEPOOL +#define _CSIMPLEPOOL #include "types.h" @@ -37,4 +37,4 @@ CHECK_SIZEOF(CSimplePool, 0x20) extern CSimplePool* gpSimplePool; -#endif +#endif // _CSIMPLEPOOL diff --git a/include/Kyoto/CTimeProvider.hpp b/include/Kyoto/CTimeProvider.hpp index 706df32f..d8477959 100644 --- a/include/Kyoto/CTimeProvider.hpp +++ b/include/Kyoto/CTimeProvider.hpp @@ -1,5 +1,5 @@ -#ifndef __CTIMEPROVIDER_HPP__ -#define __CTIMEPROVIDER_HPP__ +#ifndef _CTIMEPROVIDER +#define _CTIMEPROVIDER #include @@ -17,4 +17,4 @@ private: CTimeProvider* x8_lastProvider; }; -#endif // __CTIMEPROVIDER_HPP__ +#endif // _CTIMEPROVIDER diff --git a/include/Kyoto/CToken.hpp b/include/Kyoto/CToken.hpp index 65069ed4..cf1b3e18 100644 --- a/include/Kyoto/CToken.hpp +++ b/include/Kyoto/CToken.hpp @@ -1,10 +1,10 @@ -#ifndef _CTOKEN_HPP -#define _CTOKEN_HPP +#ifndef _CTOKEN +#define _CTOKEN #include "types.h" -#include "Kyoto/IObj.hpp" #include "Kyoto/CObjectReference.hpp" +#include "Kyoto/IObj.hpp" class CObjectReference; @@ -20,9 +20,10 @@ public: CObjOwnerDerivedFromIObjUntyped* GetObj(); void Lock(); bool IsLoaded() const { return x0_objRef->IsLoaded(); } + private: CObjectReference* x0_objRef; bool x4_lockHeld; }; -#endif +#endif // _CTOKEN diff --git a/include/Kyoto/CVParamTransfer.hpp b/include/Kyoto/CVParamTransfer.hpp index 6b62e7ad..f5b341cd 100644 --- a/include/Kyoto/CVParamTransfer.hpp +++ b/include/Kyoto/CVParamTransfer.hpp @@ -1,9 +1,10 @@ -#ifndef __CVPARAMTRANSFER_HPP__ -#define __CVPARAMTRANSFER_HPP__ +#ifndef _CVPARAMTRANSFER +#define _CVPARAMTRANSFER #include class IObj; + class CVParamTransfer { public: static CVParamTransfer Null(); @@ -12,4 +13,4 @@ private: rstl::rc_ptr< unkptr > x0_; }; -#endif // __CVPARAMTRANSFER_HPP__ +#endif // _CVPARAMTRANSFER diff --git a/include/Kyoto/Graphics/CColor.hpp b/include/Kyoto/Graphics/CColor.hpp index 5781770d..b744b2a2 100644 --- a/include/Kyoto/Graphics/CColor.hpp +++ b/include/Kyoto/Graphics/CColor.hpp @@ -1,5 +1,5 @@ -#ifndef __CCOLOR_HPP__ -#define __CCOLOR_HPP__ +#ifndef _CCOLOR +#define _CCOLOR #include "types.h" @@ -80,4 +80,4 @@ CHECK_SIZEOF(CColor, 0x4) #pragma cpp_extensions off #endif -#endif // __CCOLOR_HPP__ +#endif // _CCOLOR diff --git a/include/Kyoto/Graphics/CCubeMaterial.hpp b/include/Kyoto/Graphics/CCubeMaterial.hpp index cf25d8a2..406e5263 100644 --- a/include/Kyoto/Graphics/CCubeMaterial.hpp +++ b/include/Kyoto/Graphics/CCubeMaterial.hpp @@ -1,5 +1,5 @@ -#ifndef _CCUBEMATERIAL_HPP -#define _CCUBEMATERIAL_HPP +#ifndef _CCUBEMATERIAL +#define _CCUBEMATERIAL #include "types.h" @@ -16,4 +16,4 @@ private: static CVector3f sViewingFrom; }; -#endif +#endif // _CCUBEMATERIAL diff --git a/include/Kyoto/Graphics/CGX.hpp b/include/Kyoto/Graphics/CGX.hpp index a1225a1a..4dc9ca3a 100644 --- a/include/Kyoto/Graphics/CGX.hpp +++ b/include/Kyoto/Graphics/CGX.hpp @@ -1,5 +1,5 @@ -#ifndef _CGX_HPP -#define _CGX_HPP +#ifndef _CGX +#define _CGX #include "types.h" @@ -168,4 +168,4 @@ private: static SGXState sGXState; }; -#endif +#endif // _CGX diff --git a/include/Kyoto/Graphics/CGraphics.hpp b/include/Kyoto/Graphics/CGraphics.hpp index adea86d2..75ff66e4 100644 --- a/include/Kyoto/Graphics/CGraphics.hpp +++ b/include/Kyoto/Graphics/CGraphics.hpp @@ -1,5 +1,5 @@ -#ifndef _CGRAPHICS_HPP -#define _CGRAPHICS_HPP +#ifndef _CGRAPHICS +#define _CGRAPHICS #include "types.h" @@ -65,4 +65,4 @@ private: static CTransform4f mModelMatrix; }; -#endif +#endif // _CGRAPHICS diff --git a/include/Kyoto/Graphics/CGraphicsSys.hpp b/include/Kyoto/Graphics/CGraphicsSys.hpp index 74cd1b2a..a81d28a7 100644 --- a/include/Kyoto/Graphics/CGraphicsSys.hpp +++ b/include/Kyoto/Graphics/CGraphicsSys.hpp @@ -1,5 +1,5 @@ -#ifndef _CGRAPHICSSYS_HPP -#define _CGRAPHICSSYS_HPP +#ifndef _CGRAPHICSSYS +#define _CGRAPHICSSYS #include "types.h" @@ -12,4 +12,4 @@ private: uint pad; }; -#endif +#endif // _CGRAPHICSSYS diff --git a/include/Kyoto/Graphics/CLight.hpp b/include/Kyoto/Graphics/CLight.hpp index 544f8f07..fb94c13c 100644 --- a/include/Kyoto/Graphics/CLight.hpp +++ b/include/Kyoto/Graphics/CLight.hpp @@ -1,5 +1,5 @@ -#ifndef __CLIGHT_HPP__ -#define __CLIGHT_HPP__ +#ifndef _CLIGHT +#define _CLIGHT #include "Kyoto/Graphics/CColor.hpp" #include "Kyoto/Math/CVector3f.hpp" @@ -19,6 +19,7 @@ class CLight { static const CVector3f kDefaultDirection; float CalculateLightRadius() const; + public: CLight(ELightType type, const CVector3f& position, const CVector3f& direction, const CColor& color, float cutoff); @@ -79,4 +80,4 @@ private: }; CHECK_SIZEOF(CLight, 0x50) -#endif // __CLIGHT_HPP__ +#endif // _CLIGHT diff --git a/include/Kyoto/Graphics/CModelFlags.hpp b/include/Kyoto/Graphics/CModelFlags.hpp index e6bd2fd6..9fb4ef0b 100644 --- a/include/Kyoto/Graphics/CModelFlags.hpp +++ b/include/Kyoto/Graphics/CModelFlags.hpp @@ -1,5 +1,5 @@ -#ifndef _CMODELFLAGS_HPP -#define _CMODELFLAGS_HPP +#ifndef _CMODELFLAGS +#define _CMODELFLAGS #include "types.h" @@ -104,4 +104,4 @@ private: }; CHECK_SIZEOF(CModelFlags, 0x8) -#endif +#endif // _CMODELFLAGS diff --git a/include/Kyoto/Graphics/CTevCombiners.hpp b/include/Kyoto/Graphics/CTevCombiners.hpp index 20d8bf20..d0145013 100644 --- a/include/Kyoto/Graphics/CTevCombiners.hpp +++ b/include/Kyoto/Graphics/CTevCombiners.hpp @@ -1,5 +1,5 @@ -#ifndef _CTEVCOMBINERS_HPP -#define _CTEVCOMBINERS_HPP +#ifndef _CTEVCOMBINERS +#define _CTEVCOMBINERS #include "types.h" @@ -99,4 +99,4 @@ extern CTevCombiners::CTevPass CTevPass_805a5ebc; // TODO move to CGraphics extern CTevCombiners::CTevPass* PTR_skPassThru_805a8828; -#endif +#endif // _CTEVCOMBINERS diff --git a/include/Kyoto/Graphics/CTexture.hpp b/include/Kyoto/Graphics/CTexture.hpp index 2937e9d0..bcb12796 100644 --- a/include/Kyoto/Graphics/CTexture.hpp +++ b/include/Kyoto/Graphics/CTexture.hpp @@ -1,5 +1,5 @@ -#ifndef _CTEXTURE_HPP -#define _CTEXTURE_HPP +#ifndef _CTEXTURE +#define _CTEXTURE #include "types.h" @@ -29,6 +29,7 @@ public: s16 GetWidth() const { return mWidth; } s16 GetHeight() const { return mHeight; } + private: u32 mTexelFormat; // TODO: Enum s16 mWidth; @@ -36,4 +37,4 @@ private: u8 pad[0x60]; }; -#endif +#endif // _CTEXTURE diff --git a/include/Kyoto/IObj.hpp b/include/Kyoto/IObj.hpp index bdac9df2..cd028776 100644 --- a/include/Kyoto/IObj.hpp +++ b/include/Kyoto/IObj.hpp @@ -1,5 +1,5 @@ -#ifndef _IOBJ_HPP -#define _IOBJ_HPP +#ifndef _IOBJ +#define _IOBJ #include "types.h" @@ -45,4 +45,4 @@ private: TObjOwnerDerivedFromIObj(const rstl::auto_ptr< T >& obj) : CObjOwnerDerivedFromIObjUntyped(obj) {} }; -#endif +#endif // _IOBJ diff --git a/include/Kyoto/IObjectStore.hpp b/include/Kyoto/IObjectStore.hpp index c191fcf3..c640f95a 100644 --- a/include/Kyoto/IObjectStore.hpp +++ b/include/Kyoto/IObjectStore.hpp @@ -1,7 +1,8 @@ -#ifndef _IOBJECTSTORE_HPP -#define _IOBJECTSTORE_HPP +#ifndef _IOBJECTSTORE +#define _IOBJECTSTORE #include "types.h" + #include "Kyoto/CToken.hpp" #include "rstl/auto_ptr.hpp" @@ -20,4 +21,4 @@ public: virtual void ObjectUnreferenced(const SObjectTag& tag) = 0; }; -#endif +#endif // _IOBJECTSTORE diff --git a/include/Kyoto/Input/CControllerAxis.hpp b/include/Kyoto/Input/CControllerAxis.hpp index 99a78020..f2e7c63d 100644 --- a/include/Kyoto/Input/CControllerAxis.hpp +++ b/include/Kyoto/Input/CControllerAxis.hpp @@ -1,5 +1,5 @@ -#ifndef __CCONTROLLERAXIS_HPP__ -#define __CCONTROLLERAXIS_HPP__ +#ifndef _CCONTROLLERAXIS +#define _CCONTROLLERAXIS class CControllerAxis { public: @@ -14,4 +14,4 @@ public: float x4_absolute; }; -#endif // __CCONTROLLERAXIS_HPP__ +#endif // _CCONTROLLERAXIS diff --git a/include/Kyoto/Input/CControllerButton.hpp b/include/Kyoto/Input/CControllerButton.hpp index 3dbda43a..b346bf67 100644 --- a/include/Kyoto/Input/CControllerButton.hpp +++ b/include/Kyoto/Input/CControllerButton.hpp @@ -1,5 +1,5 @@ -#ifndef __CCONTROLLERBUTTON_HPP__ -#define __CCONTROLLERBUTTON_HPP__ +#ifndef _CCONTROLLERBUTTON +#define _CCONTROLLERBUTTON class CControllerButton { public: @@ -17,4 +17,4 @@ private: uchar x2_releaseEvent; }; -#endif // __CCONTROLLERBUTTON_HPP__ +#endif // _CCONTROLLERBUTTON diff --git a/include/Kyoto/Input/CControllerGamepadData.hpp b/include/Kyoto/Input/CControllerGamepadData.hpp index fb06261d..d45dea0f 100644 --- a/include/Kyoto/Input/CControllerGamepadData.hpp +++ b/include/Kyoto/Input/CControllerGamepadData.hpp @@ -1,5 +1,5 @@ -#ifndef __CCONTROLLERGAMEPADDATA_HPP__ -#define __CCONTROLLERGAMEPADDATA_HPP__ +#ifndef _CCONTROLLERGAMEPADDATA +#define _CCONTROLLERGAMEPADDATA #include "Kyoto/Input/CControllerAxis.hpp" #include "Kyoto/Input/CControllerButton.hpp" @@ -28,4 +28,4 @@ private: CControllerButton x34_buttons[12]; }; -#endif // __CCONTROLLERGAMEPADDATA_HPP__ +#endif // _CCONTROLLERGAMEPADDATA diff --git a/include/Kyoto/Input/CDolphinController.hpp b/include/Kyoto/Input/CDolphinController.hpp index 631e5101..00788a88 100644 --- a/include/Kyoto/Input/CDolphinController.hpp +++ b/include/Kyoto/Input/CDolphinController.hpp @@ -1,5 +1,5 @@ -#ifndef __CDOLPHINCONTROLLER_HPP__ -#define __CDOLPHINCONTROLLER_HPP__ +#ifndef _CDOLPHINCONTROLLER +#define _CDOLPHINCONTROLLER #include "Kyoto/Input/IController.hpp" @@ -38,4 +38,4 @@ private: u32 x1cc_; }; -#endif // __CDOLPHINCONTROLLER_HPP__ +#endif // _CDOLPHINCONTROLLER diff --git a/include/Kyoto/Input/CFinalInput.hpp b/include/Kyoto/Input/CFinalInput.hpp index 48b98dc5..8300bfab 100644 --- a/include/Kyoto/Input/CFinalInput.hpp +++ b/include/Kyoto/Input/CFinalInput.hpp @@ -1,17 +1,19 @@ -#ifndef __CFINALINPUT_HPP__ -#define __CFINALINPUT_HPP__ +#ifndef _CFINALINPUT +#define _CFINALINPUT #include + #ifdef __MWERKS__ #pragma cpp_extensions on #endif class CControllerGamepadData; class COsContext; -class CFinalInput { +class CFinalInput { static const float kInput_AnalogOnThreshhold; static const float kInput_AnalogTriggerOnThreshhold; + public: CFinalInput(); CFinalInput(int channel, float dt, const CControllerGamepadData& data, float leftDif, @@ -103,4 +105,4 @@ private: #pragma cpp_extensions reset #endif -#endif // __CFINALINPUT_HPP__ +#endif // _CFINALINPUT diff --git a/include/Kyoto/Input/CRumbleGenerator.hpp b/include/Kyoto/Input/CRumbleGenerator.hpp index 0700a89b..7efce828 100644 --- a/include/Kyoto/Input/CRumbleGenerator.hpp +++ b/include/Kyoto/Input/CRumbleGenerator.hpp @@ -1,5 +1,5 @@ -#ifndef _CRUMBLEGENERATOR_HPP -#define _CRUMBLEGENERATOR_HPP +#ifndef _CRUMBLEGENERATOR +#define _CRUMBLEGENERATOR #include "types.h" @@ -15,4 +15,4 @@ private: bool xf0_24_disabled : 1; }; -#endif +#endif // _CRUMBLEGENERATOR diff --git a/include/Kyoto/Input/CRumbleVoice.hpp b/include/Kyoto/Input/CRumbleVoice.hpp index 59ea4f83..b85f99bf 100644 --- a/include/Kyoto/Input/CRumbleVoice.hpp +++ b/include/Kyoto/Input/CRumbleVoice.hpp @@ -1,5 +1,5 @@ -#ifndef _CRUMBLEVOICE_HPP -#define _CRUMBLEVOICE_HPP +#ifndef _CRUMBLEVOICE +#define _CRUMBLEVOICE #include "types.h" @@ -93,4 +93,4 @@ private: s16 CreateRumbleHandle(u16 idx); }; -#endif +#endif // _CRUMBLEVOICE diff --git a/include/Kyoto/Input/IController.hpp b/include/Kyoto/Input/IController.hpp index fee06e9c..83f011a2 100644 --- a/include/Kyoto/Input/IController.hpp +++ b/include/Kyoto/Input/IController.hpp @@ -1,5 +1,5 @@ -#ifndef __ICONTROLLER_HPP__ -#define __ICONTROLLER_HPP__ +#ifndef _ICONTROLLER +#define _ICONTROLLER #include @@ -26,4 +26,4 @@ public: static IController* Create(const COsContext& ctx); }; -#endif // __ICONTROLLER_HPP__ +#endif // _ICONTROLLER diff --git a/include/Kyoto/Input/InputTypes.hpp b/include/Kyoto/Input/InputTypes.hpp index eb910e01..ecba1ba6 100644 --- a/include/Kyoto/Input/InputTypes.hpp +++ b/include/Kyoto/Input/InputTypes.hpp @@ -1,5 +1,5 @@ -#ifndef __INPUTTYPES_HPP__ -#define __INPUTTYPES_HPP__ +#ifndef _INPUTTYPES +#define _INPUTTYPES #include @@ -36,4 +36,4 @@ enum EButton { enum EAnalogButton { kBA_Left, kBA_Right, kBA_MAX }; -#endif // __INPUTTYPES_HPP__ +#endif // _INPUTTYPES diff --git a/include/Kyoto/Math/CAABox.hpp b/include/Kyoto/Math/CAABox.hpp index c80351bb..ac78a2d0 100644 --- a/include/Kyoto/Math/CAABox.hpp +++ b/include/Kyoto/Math/CAABox.hpp @@ -1,5 +1,5 @@ -#ifndef __CAABOX_HPP__ -#define __CAABOX_HPP__ +#ifndef _CAABOX +#define _CAABOX #include "Kyoto/Math/CVector3f.hpp" @@ -104,4 +104,4 @@ private: }; CHECK_SIZEOF(CAABox, 0x18) -#endif // __CAABOX_HPP__ +#endif // _CAABOX diff --git a/include/Kyoto/Math/CAbsAngle.hpp b/include/Kyoto/Math/CAbsAngle.hpp index 65214f7d..f5e10d14 100644 --- a/include/Kyoto/Math/CAbsAngle.hpp +++ b/include/Kyoto/Math/CAbsAngle.hpp @@ -1,5 +1,5 @@ -#ifndef _CABSANGLE_HPP -#define _CABSANGLE_HPP +#ifndef _CABSANGLE +#define _CABSANGLE #include "types.h" @@ -48,4 +48,4 @@ CHECK_SIZEOF(CAbsAngle, 0x4) static inline f32 cosine(const CAbsAngle& angle) { return cos(angle.AsRadians()); } -#endif +#endif // _CABSANGLE diff --git a/include/Kyoto/Math/CFrustumPlanes.hpp b/include/Kyoto/Math/CFrustumPlanes.hpp index e70b1ae6..3799724b 100644 --- a/include/Kyoto/Math/CFrustumPlanes.hpp +++ b/include/Kyoto/Math/CFrustumPlanes.hpp @@ -1,5 +1,5 @@ -#ifndef _CFRUSTUMPLANES_HPP -#define _CFRUSTUMPLANES_HPP +#ifndef _CFRUSTUMPLANES +#define _CFRUSTUMPLANES #include "types.h" @@ -30,4 +30,4 @@ private: rstl::reserved_vector< CPlane, 6 > x0_planes; }; -#endif +#endif // _CFRUSTUMPLANES diff --git a/include/Kyoto/Math/CLine.hpp b/include/Kyoto/Math/CLine.hpp index 4290fb81..04b1af2e 100644 --- a/include/Kyoto/Math/CLine.hpp +++ b/include/Kyoto/Math/CLine.hpp @@ -1,5 +1,5 @@ -#ifndef _CLINE_HPP -#define _CLINE_HPP +#ifndef _CLINE +#define _CLINE #include "types.h" @@ -18,4 +18,4 @@ private: CUnitVector3f xc_dir; }; -#endif +#endif // _CLINE diff --git a/include/Kyoto/Math/CLineSeg.hpp b/include/Kyoto/Math/CLineSeg.hpp index 32c26c37..df3ba735 100644 --- a/include/Kyoto/Math/CLineSeg.hpp +++ b/include/Kyoto/Math/CLineSeg.hpp @@ -1,17 +1,16 @@ -#ifndef _CLINESEG_HPP -#define _CLINESEG_HPP +#ifndef _CLINESEG +#define _CLINESEG #include "types.h" +#include "Kyoto/Math/CLine.hpp" #include "Kyoto/Math/CUnitVector3f.hpp" #include "Kyoto/Math/CVector3f.hpp" -#include "Kyoto/Math/CLine.hpp" class CLineSeg : public CLine { public: CLineSeg(const CVector3f& start, const CVector3f& end) - : CLine(start, (end - start).AsNormalized()) - , x18_end(end) {} + : CLine(start, (end - start).AsNormalized()), x18_end(end) {} const CVector3f& GetEndPoint() const { return x18_end; } @@ -20,4 +19,4 @@ private: }; CHECK_SIZEOF(CLineSeg, 0x24) -#endif +#endif // _CLINESEG diff --git a/include/Kyoto/Math/CMath.hpp b/include/Kyoto/Math/CMath.hpp index 25aebcc9..798a7e6a 100644 --- a/include/Kyoto/Math/CMath.hpp +++ b/include/Kyoto/Math/CMath.hpp @@ -1,5 +1,5 @@ -#ifndef _CMATH_HPP -#define _CMATH_HPP +#ifndef _CMATH +#define _CMATH #include "types.h" @@ -73,4 +73,4 @@ public: // Swap__5CMathFRfRf weak }; -#endif +#endif // _CMATH diff --git a/include/Kyoto/Math/CMatrix3f.hpp b/include/Kyoto/Math/CMatrix3f.hpp index ec4838f5..95701972 100644 --- a/include/Kyoto/Math/CMatrix3f.hpp +++ b/include/Kyoto/Math/CMatrix3f.hpp @@ -1,5 +1,5 @@ -#ifndef _CMATRIX3F_HPP -#define _CMATRIX3F_HPP +#ifndef _CMATRIX3F +#define _CMATRIX3F #include "types.h" @@ -7,11 +7,13 @@ class CMatrix3f { static const CMatrix3f sIdentity; + public: CMatrix3f(const CMatrix3f&); const CMatrix3f& operator=(const CMatrix3f& other); static const CMatrix3f& Identity() { return sIdentity; } + private: // TODO maybe individual f32s CVector3f m0; @@ -20,4 +22,4 @@ private: }; CHECK_SIZEOF(CMatrix3f, 0x24); -#endif +#endif // _CMATRIX3F diff --git a/include/Kyoto/Math/CMatrix4f.hpp b/include/Kyoto/Math/CMatrix4f.hpp index d3f256c2..fd57a2e6 100644 --- a/include/Kyoto/Math/CMatrix4f.hpp +++ b/include/Kyoto/Math/CMatrix4f.hpp @@ -1,5 +1,5 @@ -#ifndef _CMATRIX4F_HPP -#define _CMATRIX4F_HPP +#ifndef _CMATRIX4F +#define _CMATRIX4F #include "types.h" @@ -24,4 +24,4 @@ private: }; CHECK_SIZEOF(CMatrix4f, 0x40); -#endif +#endif // _CMATRIX4F diff --git a/include/Kyoto/Math/CNUQuaternion.hpp b/include/Kyoto/Math/CNUQuaternion.hpp index ce2f1f99..f9593dfb 100644 --- a/include/Kyoto/Math/CNUQuaternion.hpp +++ b/include/Kyoto/Math/CNUQuaternion.hpp @@ -1,5 +1,5 @@ -#ifndef _CNUQUATERNION_HPP -#define _CNUQUATERNION_HPP +#ifndef _CNUQUATERNION +#define _CNUQUATERNION #include "types.h" @@ -10,6 +10,7 @@ public: static CNUQuaternion BuildFromMatrix3f(const CMatrix3f& matrix); static CNUQuaternion BuildFromQuaternion(const CQuaternion& quat); + private: f32 w; f32 x; @@ -17,4 +18,4 @@ private: f32 z; }; -#endif +#endif // _CNUQUATERNION diff --git a/include/Kyoto/Math/CPlane.hpp b/include/Kyoto/Math/CPlane.hpp index dff18e75..d4094bbd 100644 --- a/include/Kyoto/Math/CPlane.hpp +++ b/include/Kyoto/Math/CPlane.hpp @@ -1,5 +1,5 @@ -#ifndef _CPLANE_HPP -#define _CPLANE_HPP +#ifndef _CPLANE +#define _CPLANE #include "types.h" @@ -25,4 +25,4 @@ private: }; CHECK_SIZEOF(CPlane, 0x10) -#endif +#endif // _CPLANE diff --git a/include/Kyoto/Math/CQuaternion.hpp b/include/Kyoto/Math/CQuaternion.hpp index d36f2cc6..49431e60 100644 --- a/include/Kyoto/Math/CQuaternion.hpp +++ b/include/Kyoto/Math/CQuaternion.hpp @@ -1,5 +1,5 @@ -#ifndef _CQUATERNION_HPP -#define _CQUATERNION_HPP +#ifndef _CQUATERNION +#define _CQUATERNION #include "types.h" @@ -69,4 +69,4 @@ private: static const CQuaternion sNoRotation; }; -#endif +#endif // _CQUATERNION diff --git a/include/Kyoto/Math/CRelAngle.hpp b/include/Kyoto/Math/CRelAngle.hpp index 1f1f622b..19c7e8d4 100644 --- a/include/Kyoto/Math/CRelAngle.hpp +++ b/include/Kyoto/Math/CRelAngle.hpp @@ -1,5 +1,5 @@ -#ifndef _CRELANGLE_HPP -#define _CRELANGLE_HPP +#ifndef _CRELANGLE +#define _CRELANGLE #include "types.h" @@ -45,4 +45,4 @@ CHECK_SIZEOF(CRelAngle, 0x4) // __dv__FRC9CRelAnglef // sine__FRC9CRelAngle -#endif +#endif // _CRELANGLE diff --git a/include/Kyoto/Math/CSphere.hpp b/include/Kyoto/Math/CSphere.hpp index e925a2e5..9273241d 100644 --- a/include/Kyoto/Math/CSphere.hpp +++ b/include/Kyoto/Math/CSphere.hpp @@ -1,10 +1,10 @@ -#ifndef _CSPHERE_HPP -#define _CSPHERE_HPP +#ifndef _CSPHERE +#define _CSPHERE #include "types.h" -#include "Kyoto/Math/CVector3f.hpp" #include "Kyoto/Math/CUnitVector3f.hpp" +#include "Kyoto/Math/CVector3f.hpp" class CSphere { public: @@ -18,4 +18,4 @@ private: }; CHECK_SIZEOF(CSphere, 0x10) -#endif +#endif // _CSPHERE diff --git a/include/Kyoto/Math/CTransform4f.hpp b/include/Kyoto/Math/CTransform4f.hpp index 834cbe02..7c599549 100644 --- a/include/Kyoto/Math/CTransform4f.hpp +++ b/include/Kyoto/Math/CTransform4f.hpp @@ -1,5 +1,5 @@ -#ifndef __CTRANSFORM4F_HPP__ -#define __CTRANSFORM4F_HPP__ +#ifndef _CTRANSFORM4F +#define _CTRANSFORM4F #include "types.h" @@ -115,4 +115,4 @@ inline bool operator==(const CTransform4f& lhs, const CTransform4f& rhs); CHECK_SIZEOF(CTransform4f, 0x30) -#endif // __CTRANSFORM4F_HPP__ +#endif // _CTRANSFORM4F diff --git a/include/Kyoto/Math/CTri.hpp b/include/Kyoto/Math/CTri.hpp index f83ba33f..c2c484a4 100644 --- a/include/Kyoto/Math/CTri.hpp +++ b/include/Kyoto/Math/CTri.hpp @@ -1,5 +1,5 @@ -#ifndef _CTRI_HPP -#define _CTRI_HPP +#ifndef _CTRI +#define _CTRI #include "types.h" @@ -24,4 +24,4 @@ private: }; CHECK_SIZEOF(CTri, 0x34) -#endif +#endif // _CTRI diff --git a/include/Kyoto/Math/CUnitVector3f.hpp b/include/Kyoto/Math/CUnitVector3f.hpp index 03caebdd..014c4d57 100644 --- a/include/Kyoto/Math/CUnitVector3f.hpp +++ b/include/Kyoto/Math/CUnitVector3f.hpp @@ -1,5 +1,5 @@ -#ifndef _CUNITVECTOR3F_HPP -#define _CUNITVECTOR3F_HPP +#ifndef _CUNITVECTOR3F +#define _CUNITVECTOR3F #include "types.h" @@ -8,9 +8,9 @@ class CUnitVector3f : public CVector3f { public: CUnitVector3f(f32 x, f32 y, f32 z) : CVector3f(x, y, z) { Normalize(); } - CUnitVector3f(const CVector3f& vec);// : CVector3f(vec) { Normalize(); } + CUnitVector3f(const CVector3f& vec); // : CVector3f(vec) { Normalize(); } // TODO }; CHECK_SIZEOF(CUnitVector3f, 0xc) -#endif +#endif // _CUNITVECTOR3F diff --git a/include/Kyoto/Math/CVector2f.hpp b/include/Kyoto/Math/CVector2f.hpp index fe03b881..062d8486 100644 --- a/include/Kyoto/Math/CVector2f.hpp +++ b/include/Kyoto/Math/CVector2f.hpp @@ -1,10 +1,11 @@ -#ifndef __CVECTOR2F_HPP__ -#define __CVECTOR2F_HPP__ +#ifndef _CVECTOR2F +#define _CVECTOR2F #include "types.h" class CVector2f { static const CVector2f skZeroVector; + public: CVector2f(f32 x, f32 y); f32 GetX() const { return mX; } @@ -23,6 +24,7 @@ public: static float GetAngleDiff(const CVector2f& a, const CVector2f& b); static float Dot(const CVector2f& a, const CVector2f& b); + private: f32 mX; 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 CVector2f& lhs, const float& rhs); -#endif // __CVECTOR3F_HPP__ +#endif // _CVECTOR2F diff --git a/include/Kyoto/Math/CVector2i.hpp b/include/Kyoto/Math/CVector2i.hpp index 78a88d60..28af64ee 100644 --- a/include/Kyoto/Math/CVector2i.hpp +++ b/include/Kyoto/Math/CVector2i.hpp @@ -1,5 +1,5 @@ -#ifndef _CVECTOR2I_HPP -#define _CVECTOR2I_HPP +#ifndef _CVECTOR2I +#define _CVECTOR2I #include "types.h" @@ -9,6 +9,7 @@ public: int GetX() const { return mX; } int GetY() const { return mY; } + private: int mX; int mY; @@ -19,4 +20,5 @@ CVector2i 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); -#endif + +#endif // _CVECTOR2I diff --git a/include/Kyoto/Math/CVector3d.hpp b/include/Kyoto/Math/CVector3d.hpp index b1625ef6..0349fb62 100644 --- a/include/Kyoto/Math/CVector3d.hpp +++ b/include/Kyoto/Math/CVector3d.hpp @@ -1,6 +1,5 @@ -#ifndef __CVECTOR3D_HPP__ -#define __CVECTOR3D_HPP__ - +#ifndef _CVECTOR3D +#define _CVECTOR3D #include "Kyoto/Math/CVector3f.hpp" @@ -21,7 +20,6 @@ public: static double Dot(const CVector3d& a, const CVector3d& b); static CVector3d Cross(const CVector3d& a, const CVector3d& b); - private: double mX; double mY; @@ -30,4 +28,4 @@ private: CVector3d operator+(const CVector3d& other); -#endif // __CVECTOR3D_HPP__ +#endif // _CVECTOR3D diff --git a/include/Kyoto/Math/CVector3f.hpp b/include/Kyoto/Math/CVector3f.hpp index bd271492..bc94c211 100644 --- a/include/Kyoto/Math/CVector3f.hpp +++ b/include/Kyoto/Math/CVector3f.hpp @@ -1,5 +1,5 @@ -#ifndef __CVECTOR3F_HPP__ -#define __CVECTOR3F_HPP__ +#ifndef _CVECTOR3F +#define _CVECTOR3F #include "types.h" @@ -162,4 +162,4 @@ inline CVector3f operator-(const CVector3f& vec) { return CVector3f(-vec.GetX(), -vec.GetY(), -vec.GetZ()); } -#endif // __CVECTOR3F_HPP__ +#endif // _CVECTOR3F diff --git a/include/Kyoto/Math/CVector3i.hpp b/include/Kyoto/Math/CVector3i.hpp index 960dfad9..378db811 100644 --- a/include/Kyoto/Math/CVector3i.hpp +++ b/include/Kyoto/Math/CVector3i.hpp @@ -1,5 +1,5 @@ -#ifndef __CVECTOR3I_HPP__ -#define __CVECTOR3I_HPP__ +#ifndef _CVECTOR3I +#define _CVECTOR3I class CVector3i { public: @@ -11,4 +11,4 @@ private: int mZ; }; -#endif // __CVECTOR3I_HPP__ +#endif // _CVECTOR3I diff --git a/include/Kyoto/Math/CloseEnough.hpp b/include/Kyoto/Math/CloseEnough.hpp index 22126b68..0a47cdb9 100644 --- a/include/Kyoto/Math/CloseEnough.hpp +++ b/include/Kyoto/Math/CloseEnough.hpp @@ -1,5 +1,5 @@ -#ifndef __CLOSEENOUGH_HPP__ -#define __CLOSEENOUGH_HPP__ +#ifndef _CLOSEENOUGH +#define _CLOSEENOUGH #include "types.h" @@ -26,4 +26,4 @@ inline bool close_enough(double a, double b, double epsilon = Double::Epsilon()) return fabs(a - b) < epsilon; } -#endif // __CLOSEENOUGH_HPP__ +#endif // _CLOSEENOUGH diff --git a/include/Kyoto/Particles/CElementGen.hpp b/include/Kyoto/Particles/CElementGen.hpp index 9be1d141..f85bb0a7 100644 --- a/include/Kyoto/Particles/CElementGen.hpp +++ b/include/Kyoto/Particles/CElementGen.hpp @@ -1,10 +1,10 @@ -#ifndef _CELEMENTGEN_HPP -#define _CELEMENTGEN_HPP +#ifndef _CELEMENTGEN +#define _CELEMENTGEN #include "types.h" -#include "Kyoto/TToken.hpp" #include "Kyoto/Particles/CParticleGen.hpp" +#include "Kyoto/TToken.hpp" class CGenDescription; @@ -14,7 +14,8 @@ public: enum EOptionalSystemFlags { kOSF_None, kOSF_One, kOSF_Two }; enum LightType { kLT_None = 0, kLT_Custom = 1, kLT_Directional = 2, kLT_Spot = 3 }; - CElementGen(TToken, EModelOrientationType = kMOT_Normal, EOptionalSystemFlags = kOSF_One); + CElementGen(TToken< CGenDescription >, EModelOrientationType = kMOT_Normal, + EOptionalSystemFlags = kOSF_One); ~CElementGen(); virtual void Update(double); @@ -52,4 +53,4 @@ private: }; CHECK_SIZEOF(CElementGen, 0x340) -#endif +#endif // _CELEMENTGEN diff --git a/include/Kyoto/Particles/CGenDescription.hpp b/include/Kyoto/Particles/CGenDescription.hpp index 898ce7ca..6ab84d11 100644 --- a/include/Kyoto/Particles/CGenDescription.hpp +++ b/include/Kyoto/Particles/CGenDescription.hpp @@ -1,12 +1,13 @@ -#ifndef __CGENDESCRIPTION_HPP__ -#define __CGENDESCRIPTION_HPP__ +#ifndef _CGENDESCRIPTION +#define _CGENDESCRIPTION class CGenDescription { public: CGenDescription(); ~CGenDescription(); + private: char data[0x12c]; }; -#endif // __CGENDESCRIPTION_HPP__ +#endif // _CGENDESCRIPTION diff --git a/include/Kyoto/Particles/CParticleGen.hpp b/include/Kyoto/Particles/CParticleGen.hpp index 6d694f2d..fbc67e5b 100644 --- a/include/Kyoto/Particles/CParticleGen.hpp +++ b/include/Kyoto/Particles/CParticleGen.hpp @@ -1,5 +1,5 @@ -#ifndef _CPARTICLEGEN_HPP -#define _CPARTICLEGEN_HPP +#ifndef _CPARTICLEGEN +#define _CPARTICLEGEN #include "Kyoto/Graphics/CColor.hpp" #include "Kyoto/Graphics/CLight.hpp" @@ -40,4 +40,4 @@ public: virtual uint Get4CharId() const = 0; }; -#endif // _CPARTICLEGEN_HPP +#endif // _CPARTICLEGEN diff --git a/include/Kyoto/Particles/CParticleGlobals.hpp b/include/Kyoto/Particles/CParticleGlobals.hpp index 264f550e..8e08c1bb 100644 --- a/include/Kyoto/Particles/CParticleGlobals.hpp +++ b/include/Kyoto/Particles/CParticleGlobals.hpp @@ -1,5 +1,5 @@ -#ifndef __CPARTICLEGLOBALS_HPP__ -#define __CPARTICLEGLOBALS_HPP__ +#ifndef _CPARTICLEGLOBALS +#define _CPARTICLEGLOBALS class CParticleGlobals { public: @@ -8,4 +8,4 @@ public: static void UpdateParticleLifetimeTweenValues(int time); }; -#endif // __CPARTICLEGLOBALS_HPP__ +#endif // _CPARTICLEGLOBALS diff --git a/include/Kyoto/Particles/CWarp.hpp b/include/Kyoto/Particles/CWarp.hpp index a16e790e..8ae383d6 100644 --- a/include/Kyoto/Particles/CWarp.hpp +++ b/include/Kyoto/Particles/CWarp.hpp @@ -1,16 +1,18 @@ -#ifndef __CWARP_HPP__ -#define __CWARP_HPP__ +#ifndef _CWARP +#define _CWARP #include "rstl/vector.hpp" + class CParticle; + class CWarp { public: virtual ~CWarp(); virtual bool UpdateWarp() = 0; - virtual void ModifyParticles(const rstl::vector& particles) = 0; + virtual void ModifyParticles(const rstl::vector< CParticle >& particles) = 0; virtual void Activate(bool) = 0; - virtual bool IsActivated() =0; + virtual bool IsActivated() = 0; virtual int Get4CharID() = 0; }; -#endif // __CWARP_HPP__ +#endif // _CWARP diff --git a/include/Kyoto/SObjectTag.hpp b/include/Kyoto/SObjectTag.hpp index 5967f3fe..4547c7b7 100644 --- a/include/Kyoto/SObjectTag.hpp +++ b/include/Kyoto/SObjectTag.hpp @@ -1,5 +1,5 @@ -#ifndef __SOBJECTTAG_HPP__ -#define __SOBJECTTAG_HPP__ +#ifndef _SOBJECTTAG +#define _SOBJECTTAG #define kInvalidAssetId 0xFFFFFFFFu @@ -17,4 +17,4 @@ struct SObjectTag { static const char* Type2Text(FourCC type); }; -#endif +#endif // _SOBJECTTAG diff --git a/include/Kyoto/Streams/CInputStream.hpp b/include/Kyoto/Streams/CInputStream.hpp index 9be189c9..d5637d9c 100644 --- a/include/Kyoto/Streams/CInputStream.hpp +++ b/include/Kyoto/Streams/CInputStream.hpp @@ -1,5 +1,5 @@ -#ifndef _CINPUTSTREAM_HPP -#define _CINPUTSTREAM_HPP +#ifndef _CINPUTSTREAM +#define _CINPUTSTREAM #include "types.h" @@ -31,9 +31,7 @@ public: return cinput_stream_helper(type, *this); } - bool ReadPackedBool() { - return ReadBits(1) != 0; - } + bool ReadPackedBool() { return ReadBits(1) != 0; } private: bool GrabAnotherBlock(); @@ -77,4 +75,4 @@ inline rstl::pair< L, R > cinput_stream_helper(const TType< rstl::pair< L, R > > return result; } -#endif +#endif // _CINPUTSTREAM diff --git a/include/Kyoto/Streams/CMemoryInStream.hpp b/include/Kyoto/Streams/CMemoryInStream.hpp index 57df29f0..7b42f1c5 100644 --- a/include/Kyoto/Streams/CMemoryInStream.hpp +++ b/include/Kyoto/Streams/CMemoryInStream.hpp @@ -1,5 +1,5 @@ -#ifndef _CMEMORYINSTREAM_HPP -#define _CMEMORYINSTREAM_HPP +#ifndef _CMEMORYINSTREAM +#define _CMEMORYINSTREAM #include "Kyoto/Streams/CInputStream.hpp" @@ -16,4 +16,4 @@ public: virtual uint Read(void* dest, uint len) override; }; -#endif +#endif // _CMEMORYINSTREAM diff --git a/include/Kyoto/Streams/COutputStream.hpp b/include/Kyoto/Streams/COutputStream.hpp index f6c8f918..d851d21c 100644 --- a/include/Kyoto/Streams/COutputStream.hpp +++ b/include/Kyoto/Streams/COutputStream.hpp @@ -1,10 +1,10 @@ -#ifndef _COUTPUTSTREAM_HPP -#define _COUTPUTSTREAM_HPP +#ifndef _COUTPUTSTREAM +#define _COUTPUTSTREAM #include "types.h" class COutputStream; -template +template < typename T > void coutput_stream_helper(const T& t, COutputStream& out) { t.PutTo(out); } @@ -13,6 +13,7 @@ class COutputStream { void DoPut(const void* ptr, size_t len); void Flush(); void DoFlush(); + public: COutputStream(int len); virtual ~COutputStream(); @@ -24,25 +25,17 @@ public: DoPut(ptr, len); } - template + template < typename T > void Put(const T& t) { coutput_stream_helper(t, *this); } - void WriteReal32(float t) { - Put(t); - } + void WriteReal32(float t) { Put(t); } - void WriteUint32(uint t) { - Put(t); - } - void WriteInt32(int t) { - Put(t); - } + void WriteUint32(uint t) { Put(t); } + void WriteInt32(int t) { Put(t); } - void WriteLong(int t) { - Put(&t, sizeof(int)); - } + void WriteLong(int t) { Put(&t, sizeof(int)); } private: uint mPosition; @@ -60,15 +53,14 @@ inline void coutput_stream_helper(const float& t, COutputStream& out) { out.Put(&tmp, sizeof(float)); } -template<> +template <> inline void coutput_stream_helper(const int& t, COutputStream& out) { out.WriteLong(t); } -template<> +template <> inline void coutput_stream_helper(const uint& t, COutputStream& out) { out.WriteLong(t); } - -#endif // _COUTPUTSTREAM_HPP +#endif // _COUTPUTSTREAM diff --git a/include/Kyoto/Streams/CZipInputStream.hpp b/include/Kyoto/Streams/CZipInputStream.hpp index bc0a09cd..4092aefb 100644 --- a/include/Kyoto/Streams/CZipInputStream.hpp +++ b/include/Kyoto/Streams/CZipInputStream.hpp @@ -1,5 +1,5 @@ -#ifndef _CZIPINPUTSTREAM_HPP -#define _CZIPINPUTSTREAM_HPP +#ifndef _CZIPINPUTSTREAM +#define _CZIPINPUTSTREAM #include "types.h" @@ -19,4 +19,4 @@ private: unkptr x30_zstream; }; -#endif +#endif // _CZIPINPUTSTREAM diff --git a/include/Kyoto/TAverage.hpp b/include/Kyoto/TAverage.hpp index 3d5bcf1c..8be307bf 100644 --- a/include/Kyoto/TAverage.hpp +++ b/include/Kyoto/TAverage.hpp @@ -1,5 +1,5 @@ -#ifndef _TAVERAGE_HPP -#define _TAVERAGE_HPP +#ifndef _TAVERAGE +#define _TAVERAGE #include "types.h" @@ -38,4 +38,4 @@ void TAverage< T >::AddValue(const T& value) { template < typename T > T GetAverageValue(const T* ptr, int count); // TODO -#endif +#endif // _TAVERAGE diff --git a/include/Kyoto/TOneStatic.hpp b/include/Kyoto/TOneStatic.hpp index 2d85254e..1803cdf2 100644 --- a/include/Kyoto/TOneStatic.hpp +++ b/include/Kyoto/TOneStatic.hpp @@ -1,5 +1,5 @@ -#ifndef _TONESTATIC_HPP -#define _TONESTATIC_HPP +#ifndef _TONESTATIC +#define _TONESTATIC #include "types.h" @@ -29,4 +29,4 @@ void TOneStatic< T >::operator delete(void* ptr) { ReferenceCount()--; } -#endif +#endif // _TONESTATIC diff --git a/include/Kyoto/TReservedAverage.hpp b/include/Kyoto/TReservedAverage.hpp index a2cf29ed..8a3d77a3 100644 --- a/include/Kyoto/TReservedAverage.hpp +++ b/include/Kyoto/TReservedAverage.hpp @@ -1,5 +1,5 @@ -#ifndef _TRESERVEDAVERAGE_HPP -#define _TRESERVEDAVERAGE_HPP +#ifndef _TRESERVEDAVERAGE +#define _TRESERVEDAVERAGE #include "types.h" @@ -25,4 +25,4 @@ public: rstl::optional_object< T > GetAverage() const; }; -#endif +#endif // _TRESERVEDAVERAGE diff --git a/include/Kyoto/TToken.hpp b/include/Kyoto/TToken.hpp index a629fda8..81b4270a 100644 --- a/include/Kyoto/TToken.hpp +++ b/include/Kyoto/TToken.hpp @@ -1,5 +1,5 @@ -#ifndef _TTOKEN_HPP -#define _TTOKEN_HPP +#ifndef _TTOKEN +#define _TTOKEN #include "types.h" @@ -62,4 +62,4 @@ private: T* x8_item; }; -#endif +#endif // _TTOKEN diff --git a/include/Kyoto/Text/CFontImageDef.hpp b/include/Kyoto/Text/CFontImageDef.hpp index 952237be..40a89c93 100644 --- a/include/Kyoto/Text/CFontImageDef.hpp +++ b/include/Kyoto/Text/CFontImageDef.hpp @@ -1,5 +1,5 @@ -#ifndef __CFONTIMAGEDEF_HPP__ -#define __CFONTIMAGEDEF_HPP__ +#ifndef _CFONTIMAGEDEF +#define _CFONTIMAGEDEF #include #include @@ -28,4 +28,4 @@ private: CVector2f mCropFactor; }; -#endif // __CFONTIMAGEDEF__ +#endif // _CFONTIMAGEDEF diff --git a/include/Kyoto/Text/CRasterFont.hpp b/include/Kyoto/Text/CRasterFont.hpp index 434921d6..7693d8fa 100644 --- a/include/Kyoto/Text/CRasterFont.hpp +++ b/include/Kyoto/Text/CRasterFont.hpp @@ -1,5 +1,5 @@ -#ifndef _CRASTERFONT_HPP -#define _CRASTERFONT_HPP +#ifndef _CRASTERFONT +#define _CRASTERFONT #include "types.h" @@ -41,4 +41,4 @@ private: }; CHECK_SIZEOF(CRasterFont, 0x94) -#endif +#endif // _CRASTERFONT diff --git a/include/Kyoto/Text/CStringTable.hpp b/include/Kyoto/Text/CStringTable.hpp index 369400e6..5453b61d 100644 --- a/include/Kyoto/Text/CStringTable.hpp +++ b/include/Kyoto/Text/CStringTable.hpp @@ -1,5 +1,5 @@ -#ifndef _CSTRINGTABLE_HPP -#define _CSTRINGTABLE_HPP +#ifndef _CSTRINGTABLE +#define _CSTRINGTABLE #include "types.h" @@ -18,4 +18,4 @@ public: extern CStringTable* gpStringTable; -#endif +#endif // _CSTRINGTABLE diff --git a/include/Kyoto/Text/CTextColor.hpp b/include/Kyoto/Text/CTextColor.hpp index f87cb836..87255906 100644 --- a/include/Kyoto/Text/CTextColor.hpp +++ b/include/Kyoto/Text/CTextColor.hpp @@ -1,17 +1,17 @@ -#ifndef __CTEXTCOLOR_HPP__ -#define __CTEXTCOLOR_HPP__ +#ifndef _CTEXTCOLOR +#define _CTEXTCOLOR #include class CTextColor { public: - CTextColor(uchar r, uchar g, uchar b, uchar a) - : mR(r), mG(g), mB(b), mA(a) {} + CTextColor(uchar r, uchar g, uchar b, uchar a) : mR(r), mG(g), mB(b), mA(a) {} + private: - uchar mR; - uchar mG; - uchar mB; - uchar mA; + uchar mR; + uchar mG; + uchar mB; + uchar mA; }; -#endif \ No newline at end of file +#endif // _CTEXTCOLOR diff --git a/include/Kyoto/Text/CTextExecuteBuffer.hpp b/include/Kyoto/Text/CTextExecuteBuffer.hpp index a609ee42..b054b480 100644 --- a/include/Kyoto/Text/CTextExecuteBuffer.hpp +++ b/include/Kyoto/Text/CTextExecuteBuffer.hpp @@ -1,8 +1,6 @@ -#ifndef __CTEXTEXECUTEBUFFER_HPP__ -#define __CTEXTEXECUTEBUFFER_HPP__ +#ifndef _CTEXTEXECUTEBUFFER +#define _CTEXTEXECUTEBUFFER -class CTextExecuteBuffer { +class CTextExecuteBuffer {}; -}; - -#endif \ No newline at end of file +#endif // _CTEXTEXECUTEBUFFER diff --git a/include/Kyoto/Text/CTextParser.hpp b/include/Kyoto/Text/CTextParser.hpp index aa89c97f..0a1034cb 100644 --- a/include/Kyoto/Text/CTextParser.hpp +++ b/include/Kyoto/Text/CTextParser.hpp @@ -1,30 +1,32 @@ -#ifndef __CTEXTPARSER_HPP__ -#define __CTEXTPARSER_HPP__ +#ifndef _CTEXTPARSER +#define _CTEXTPARSER -#include #include +#include #include class IObjectStore; class CTextExecuteBuffer; + class CTextParser { public: - CTextParser(IObjectStore& store); - void ParseText(CTextExecuteBuffer&, const wchar_t* str, int len); - uint GetAssetIdFromString(const rstl::string& str); - uint GetFont(const wchar_t* str, int len); - uint GetImage(const wchar_t* str, int len); - uint HandleUserTag(CTextExecuteBuffer& buffer, const wchar_t* str, int len); - void ParseTag(CTextExecuteBuffer&, const wchar_t* str, int len); - static bool BeginsWith(const wchar_t* str1, int len, const wchar_t* str2); - static bool Equals(const wchar_t* str1, int len, const wchar_t* str2); - static uint ParseInt(const wchar_t* str, int len, bool); - static uint FromHex(wchar_t c); - static uint GetColorValue(const wchar_t* str); - CTextColor ParseColor(const wchar_t* str, int len); + CTextParser(IObjectStore& store); + void ParseText(CTextExecuteBuffer&, const wchar_t* str, int len); + uint GetAssetIdFromString(const rstl::string& str); + uint GetFont(const wchar_t* str, int len); + uint GetImage(const wchar_t* str, int len); + uint HandleUserTag(CTextExecuteBuffer& buffer, const wchar_t* str, int len); + void ParseTag(CTextExecuteBuffer&, const wchar_t* str, int len); + static bool BeginsWith(const wchar_t* str1, int len, const wchar_t* str2); + static bool Equals(const wchar_t* str1, int len, const wchar_t* str2); + static uint ParseInt(const wchar_t* str, int len, bool); + static uint FromHex(wchar_t c); + static uint GetColorValue(const wchar_t* str); + CTextColor ParseColor(const wchar_t* str, int len); + private: - IObjectStore& mObjectStore; + IObjectStore& mObjectStore; }; -#endif \ No newline at end of file +#endif // _CTEXTPARSER diff --git a/include/MetaRender/CCubeRenderer.hpp b/include/MetaRender/CCubeRenderer.hpp index 85642c56..a3af46cd 100644 --- a/include/MetaRender/CCubeRenderer.hpp +++ b/include/MetaRender/CCubeRenderer.hpp @@ -1,5 +1,5 @@ -#ifndef _CCUBERENDERER_HPP -#define _CCUBERENDERER_HPP +#ifndef _CCUBERENDERER +#define _CCUBERENDERER #include "types.h" @@ -90,10 +90,9 @@ public: virtual void Something(); virtual void PrepareDynamicLights(); - void AllocatePhazonSuitMaskTexture(); }; extern CCubeRenderer* gpRender; -#endif +#endif // _CCUBERENDERER diff --git a/include/MetaRender/IRenderer.hpp b/include/MetaRender/IRenderer.hpp index f3f1c4ee..ffc7eef7 100644 --- a/include/MetaRender/IRenderer.hpp +++ b/include/MetaRender/IRenderer.hpp @@ -1,5 +1,5 @@ -#ifndef _RENDERER_HPP -#define _RENDERER_HPP +#ifndef _IRENDERER +#define _IRENDERER #include "types.h" @@ -21,6 +21,6 @@ class CResFactory; namespace Renderer { IRenderer* AllocateRenderer(IObjectStore&, COsContext&, CMemorySys&, CResFactory&); -}; +}; // namespace Renderer -#endif +#endif // _IRENDERER diff --git a/include/MetroTRK/TrkInit.h b/include/MetroTRK/TrkInit.h index 3b9735ef..0d3ac9c8 100644 --- a/include/MetroTRK/TrkInit.h +++ b/include/MetroTRK/TrkInit.h @@ -1,5 +1,5 @@ -#ifndef __TRKINIT_H__ -#define __TRKINIT_H__ +#ifndef _TRKINIT +#define _TRKINIT #ifdef __cplusplus extern "C" { @@ -8,6 +8,6 @@ void InitMetroTRK(void); void EnableMetroTRKInterrupts(void); #ifdef __cplusplus } -#endif +#endif // _TRKINIT #endif /* #ifndef __TRKINIT_H__ */ diff --git a/include/MetroidPrime/CActor.hpp b/include/MetroidPrime/CActor.hpp index a3b0913c..2301d39c 100644 --- a/include/MetroidPrime/CActor.hpp +++ b/include/MetroidPrime/CActor.hpp @@ -1,5 +1,5 @@ -#ifndef _CACTOR_HPP -#define _CACTOR_HPP +#ifndef _CACTOR +#define _CACTOR #include "types.h" @@ -262,12 +262,8 @@ public: SetTransformDirtySpare(true); SetPreRenderHasMoved(true); } - void SetRotation(const CQuaternion& rot) { - SetTransform(rot.BuildTransform4f(GetTranslation())); - } - CQuaternion GetRotation() const { - return CQuaternion::FromMatrix(GetTransform()); - } + void SetRotation(const CQuaternion& rot) { SetTransform(rot.BuildTransform4f(GetTranslation())); } + CQuaternion GetRotation() const { return CQuaternion::FromMatrix(GetTransform()); } CVector3f GetTranslation() const { return x34_transform.GetTranslation(); } void SetTranslation(const CVector3f& vec); CTransform4f GetLocatorTransform(const rstl::string& segName) const; @@ -399,4 +395,4 @@ protected: }; CHECK_SIZEOF(CActor, 0xe8) -#endif +#endif // _CACTOR diff --git a/include/MetroidPrime/CActorLights.hpp b/include/MetroidPrime/CActorLights.hpp index e7425ac1..c6aa5668 100644 --- a/include/MetroidPrime/CActorLights.hpp +++ b/include/MetroidPrime/CActorLights.hpp @@ -1,5 +1,5 @@ -#ifndef _CACTORLIGHTS_HPP -#define _CACTORLIGHTS_HPP +#ifndef _CACTORLIGHTS +#define _CACTORLIGHTS #include "types.h" @@ -17,8 +17,9 @@ class CAABox; class CActorLights { public: - CActorLights(uint areaUpdateFramePeriod, const CVector3f& actorPosBias, int maxDynamicLights, int maxAreaLights, - bool ambientChannelOverflow, bool layer2, bool disableWorldLights, float positionUpdateThreshold); + CActorLights(uint areaUpdateFramePeriod, const CVector3f& actorPosBias, int maxDynamicLights, + int maxAreaLights, bool ambientChannelOverflow, bool layer2, bool disableWorldLights, + float positionUpdateThreshold); ~CActorLights(); void BuildConstantAmbientLighting(); @@ -66,4 +67,4 @@ private: }; CHECK_SIZEOF(CActorLights, 0x2e0) -#endif +#endif // _CACTORLIGHTS diff --git a/include/MetroidPrime/CActorModelParticles.hpp b/include/MetroidPrime/CActorModelParticles.hpp index 398759fa..c32ed6a5 100644 --- a/include/MetroidPrime/CActorModelParticles.hpp +++ b/include/MetroidPrime/CActorModelParticles.hpp @@ -1,5 +1,5 @@ -#ifndef _CACTORMODELPARTICLES_HPP -#define _CACTORMODELPARTICLES_HPP +#ifndef _CACTORMODELPARTICLES +#define _CACTORMODELPARTICLES #include "types.h" @@ -14,4 +14,4 @@ private: // TODO }; -#endif +#endif // _CACTORMODELPARTICLES diff --git a/include/MetroidPrime/CActorParameters.hpp b/include/MetroidPrime/CActorParameters.hpp index 3c10a61e..f51fde73 100644 --- a/include/MetroidPrime/CActorParameters.hpp +++ b/include/MetroidPrime/CActorParameters.hpp @@ -1,5 +1,5 @@ -#ifndef _CACTORPARAMETERS_HPP -#define _CACTORPARAMETERS_HPP +#ifndef _CACTORPARAMETERS +#define _CACTORPARAMETERS #include "types.h" @@ -134,4 +134,4 @@ private: }; CHECK_SIZEOF(CActorParameters, 0x68) -#endif +#endif // _CACTORPARAMETERS diff --git a/include/MetroidPrime/CAdditiveAnimPlayback.hpp b/include/MetroidPrime/CAdditiveAnimPlayback.hpp index f1efad45..db0f4dc5 100644 --- a/include/MetroidPrime/CAdditiveAnimPlayback.hpp +++ b/include/MetroidPrime/CAdditiveAnimPlayback.hpp @@ -1,5 +1,5 @@ -#ifndef _CADDITIVEANIMPLAYBACK_HPP -#define _CADDITIVEANIMPLAYBACK_HPP +#ifndef _CADDITIVEANIMPLAYBACK +#define _CADDITIVEANIMPLAYBACK #include "types.h" @@ -35,4 +35,4 @@ private: }; CHECK_SIZEOF(CAdditiveAnimPlayback, 0x24) -#endif +#endif // _CADDITIVEANIMPLAYBACK diff --git a/include/MetroidPrime/CAnimData.hpp b/include/MetroidPrime/CAnimData.hpp index 561a7d68..4f009540 100644 --- a/include/MetroidPrime/CAnimData.hpp +++ b/include/MetroidPrime/CAnimData.hpp @@ -1,5 +1,5 @@ -#ifndef _CANIMDATA_HPP -#define _CANIMDATA_HPP +#ifndef _CANIMDATA +#define _CANIMDATA #include "types.h" @@ -212,4 +212,4 @@ private: }; CHECK_SIZEOF(CAnimData, 0x434 + 0x144) -#endif +#endif // _CANIMDATA diff --git a/include/MetroidPrime/CAnimPlaybackParms.hpp b/include/MetroidPrime/CAnimPlaybackParms.hpp index 5004c110..0d4d9555 100644 --- a/include/MetroidPrime/CAnimPlaybackParms.hpp +++ b/include/MetroidPrime/CAnimPlaybackParms.hpp @@ -1,5 +1,5 @@ -#ifndef _CANIMPLAYBACKPARMS_HPP -#define _CANIMPLAYBACKPARMS_HPP +#ifndef _CANIMPLAYBACKPARMS +#define _CANIMPLAYBACKPARMS #include "types.h" @@ -35,4 +35,4 @@ public: }; CHECK_SIZEOF(CAnimPlaybackParms, 0x28) -#endif +#endif // _CANIMPLAYBACKPARMS diff --git a/include/MetroidPrime/CAnimRes.hpp b/include/MetroidPrime/CAnimRes.hpp index 51036a75..2dd5c50d 100644 --- a/include/MetroidPrime/CAnimRes.hpp +++ b/include/MetroidPrime/CAnimRes.hpp @@ -1,5 +1,5 @@ -#ifndef _CANIMRES_HPP -#define _CANIMRES_HPP +#ifndef _CANIMRES +#define _CANIMRES #include "types.h" @@ -21,8 +21,12 @@ public: // : x4_charIdx(-1), x14_canLoop(false), x8_scale(????), x18_defaultAnim(-1) {} CAnimRes(CAssetId ancs, int charIdx, const CVector3f& scale, const int defaultAnim, bool loop) - : x0_ancsId(ancs), x4_charIdx(charIdx), x8_scale(scale), x14_canLoop(loop), x18_defaultAnim(defaultAnim) {} + : x0_ancsId(ancs) + , x4_charIdx(charIdx) + , x8_scale(scale) + , x14_canLoop(loop) + , x18_defaultAnim(defaultAnim) {} }; CHECK_SIZEOF(CAnimRes, 0x1c) -#endif +#endif // _CANIMRES diff --git a/include/MetroidPrime/CArchMsgParmControllerStatus.hpp b/include/MetroidPrime/CArchMsgParmControllerStatus.hpp index 9ce674dc..e59933f7 100644 --- a/include/MetroidPrime/CArchMsgParmControllerStatus.hpp +++ b/include/MetroidPrime/CArchMsgParmControllerStatus.hpp @@ -1,6 +1,8 @@ -#ifndef __CARCMSGPARMCONTROLLERSTATUS_HPP__ -#define __CARCMSGPARMCONTROLLERSTATUS_HPP__ +#ifndef _CARCHMSGPARMCONTROLLERSTATUS +#define _CARCHMSGPARMCONTROLLERSTATUS + +#include "types.h" #include "MetroidPrime/CArchitectureMessage.hpp" @@ -13,4 +15,4 @@ public: ~CArchMsgParmControllerStatus(); }; -#endif // __CARCMSGPARMCONTROLLERSTATUS_HPP__ +#endif // _CARCHMSGPARMCONTROLLERSTATUS diff --git a/include/MetroidPrime/CArchMsgParmInt32.hpp b/include/MetroidPrime/CArchMsgParmInt32.hpp index 6fb9b100..bbd02b5b 100644 --- a/include/MetroidPrime/CArchMsgParmInt32.hpp +++ b/include/MetroidPrime/CArchMsgParmInt32.hpp @@ -1,13 +1,16 @@ -#ifndef __CARCMSGPARMINT32_HPP__ -#define __CARCMSGPARMINT32_HPP__ +#ifndef _CARCHMSGPARMINT32 +#define _CARCHMSGPARMINT32 + +#include "types.h" #include "MetroidPrime/CArchitectureMessage.hpp" class CArchMsgParmInt32 : public IArchitectureMessageParm { int mVal; + public: CArchMsgParmInt32(int); ~CArchMsgParmInt32(); }; -#endif // __CARCMSGPARMINT32_HPP__ +#endif // _CARCHMSGPARMINT32 diff --git a/include/MetroidPrime/CArchMsgParmInt32Int32VoidPtr.hpp b/include/MetroidPrime/CArchMsgParmInt32Int32VoidPtr.hpp index 710d26f6..8f22b663 100644 --- a/include/MetroidPrime/CArchMsgParmInt32Int32VoidPtr.hpp +++ b/include/MetroidPrime/CArchMsgParmInt32Int32VoidPtr.hpp @@ -1,6 +1,8 @@ -#ifndef __CARCMSGPARMINT32INT32VOIDPTR_HPP__ -#define __CARCMSGPARMINT32INT32VOIDPTR_HPP__ +#ifndef _CARCHMSGPARMINT32INT32VOIDPTR +#define _CARCHMSGPARMINT32INT32VOIDPTR + +#include "types.h" #include "MetroidPrime/CArchitectureMessage.hpp" @@ -14,4 +16,4 @@ public: ~CArchMsgParmInt32Int32VoidPtr(); }; -#endif // __CARCMSGPARMINT32INT32VOIDPTR_HPP__ +#endif // _CARCHMSGPARMINT32INT32VOIDPTR diff --git a/include/MetroidPrime/CArchMsgParmNull.hpp b/include/MetroidPrime/CArchMsgParmNull.hpp index 9a05cb2f..239c1ae3 100644 --- a/include/MetroidPrime/CArchMsgParmNull.hpp +++ b/include/MetroidPrime/CArchMsgParmNull.hpp @@ -1,5 +1,7 @@ -#ifndef __CARCMSGPARMNULL_HPP__ -#define __CARCMSGPARMNULL_HPP__ +#ifndef _CARCHMSGPARMNULL +#define _CARCHMSGPARMNULL + +#include "types.h" #include "MetroidPrime/CArchitectureMessage.hpp" @@ -9,4 +11,4 @@ public: ~CArchMsgParmNull(); }; -#endif // __CARCMSGPARMNULL_HPP__ +#endif // _CARCHMSGPARMNULL diff --git a/include/MetroidPrime/CArchMsgParmReal32.hpp b/include/MetroidPrime/CArchMsgParmReal32.hpp index a6509f02..146b92e9 100644 --- a/include/MetroidPrime/CArchMsgParmReal32.hpp +++ b/include/MetroidPrime/CArchMsgParmReal32.hpp @@ -1,13 +1,16 @@ -#ifndef __CARCMSGPARMREAL32_HPP__ -#define __CARCMSGPARMREAL32_HPP__ +#ifndef _CARCHMSGPARMREAL32 +#define _CARCHMSGPARMREAL32 + +#include "types.h" #include "MetroidPrime/CArchitectureMessage.hpp" class CArchMsgParmReal32 : public IArchitectureMessageParm { float mVal; + public: CArchMsgParmReal32(float); ~CArchMsgParmReal32(); }; -#endif // __CARCMSGPARMREAL32_HPP__ +#endif // _CARCHMSGPARMREAL32 diff --git a/include/MetroidPrime/CArchMsgParmUserInput.hpp b/include/MetroidPrime/CArchMsgParmUserInput.hpp index eac00c64..ba550d4f 100644 --- a/include/MetroidPrime/CArchMsgParmUserInput.hpp +++ b/include/MetroidPrime/CArchMsgParmUserInput.hpp @@ -1,5 +1,5 @@ -#ifndef __CARCMSGPARMUSERINPUT_HPP__ -#define __CARCMSGPARMUSERINPUT_HPP__ +#ifndef _CARCHMSGPARMUSERINPUT +#define _CARCHMSGPARMUSERINPUT #include "MetroidPrime/CArchitectureMessage.hpp" @@ -11,8 +11,9 @@ public: ~CArchMsgParmUserInput(); const CFinalInput& GetUserInput() const; + private: CFinalInput mInput; }; -#endif // __CARCMSGPARMUSERINPUT_HPP__ +#endif // _CARCHMSGPARMUSERINPUT diff --git a/include/MetroidPrime/CArchitectureMessage.hpp b/include/MetroidPrime/CArchitectureMessage.hpp index c80f4532..9422ffed 100644 --- a/include/MetroidPrime/CArchitectureMessage.hpp +++ b/include/MetroidPrime/CArchitectureMessage.hpp @@ -1,5 +1,5 @@ -#ifndef _CARCHITECTUREMESSAGE_HPP -#define _CARCHITECTUREMESSAGE_HPP +#ifndef _CARCHITECTUREMESSAGE +#define _CARCHITECTUREMESSAGE #include "types.h" @@ -37,4 +37,4 @@ private: rstl::rc_ptr< IArchitectureMessageParm > x8_parm; }; -#endif +#endif // _CARCHITECTUREMESSAGE diff --git a/include/MetroidPrime/CArchitectureQueue.hpp b/include/MetroidPrime/CArchitectureQueue.hpp index ea15f11e..41f16009 100644 --- a/include/MetroidPrime/CArchitectureQueue.hpp +++ b/include/MetroidPrime/CArchitectureQueue.hpp @@ -1,5 +1,5 @@ -#ifndef _CARCHITECTUREQUEUE_HPP -#define _CARCHITECTUREQUEUE_HPP +#ifndef _CARCHITECTUREQUEUE +#define _CARCHITECTUREQUEUE #include "types.h" @@ -18,4 +18,4 @@ private: rstl::list< CArchitectureMessage > x0_queue; }; -#endif +#endif // _CARCHITECTUREQUEUE diff --git a/include/MetroidPrime/CArtifactDoll.hpp b/include/MetroidPrime/CArtifactDoll.hpp index ce9eb31d..ebf59878 100644 --- a/include/MetroidPrime/CArtifactDoll.hpp +++ b/include/MetroidPrime/CArtifactDoll.hpp @@ -1,12 +1,14 @@ -#ifndef _CARTIFACTDOLL_HPP -#define _CARTIFACTDOLL_HPP +#ifndef _CARTIFACTDOLL +#define _CARTIFACTDOLL + +#include "types.h" -#include "MetroidPrime/TGameTypes.hpp" #include "MetroidPrime/Player/CPlayerState.hpp" +#include "MetroidPrime/TGameTypes.hpp" class CArtifactDoll { public: static CAssetId GetArtifactHeadScanFromItemType(CPlayerState::EItemType); }; -#endif // _CARTIFACTDOLL_HPP +#endif // _CARTIFACTDOLL diff --git a/include/MetroidPrime/CAudioStateWin.hpp b/include/MetroidPrime/CAudioStateWin.hpp index 08d2ca23..15163049 100644 --- a/include/MetroidPrime/CAudioStateWin.hpp +++ b/include/MetroidPrime/CAudioStateWin.hpp @@ -1,5 +1,5 @@ -#ifndef _CAUDIOSTATEWIN_HPP -#define _CAUDIOSTATEWIN_HPP +#ifndef _CAUDIOSTATEWIN +#define _CAUDIOSTATEWIN #include "types.h" @@ -13,4 +13,4 @@ public: EMessageReturn OnMessage(const CArchitectureMessage&, CArchitectureQueue&) override; }; -#endif +#endif // _CAUDIOSTATEWIN diff --git a/include/MetroidPrime/CAxisAngle.hpp b/include/MetroidPrime/CAxisAngle.hpp index 6bc3cdde..42dd0e2c 100644 --- a/include/MetroidPrime/CAxisAngle.hpp +++ b/include/MetroidPrime/CAxisAngle.hpp @@ -1,17 +1,19 @@ -#ifndef _CAXISANGLE_HPP -#define _CAXISANGLE_HPP +#ifndef _CAXISANGLE +#define _CAXISANGLE #include "types.h" -#include -#include "Kyoto/Math/CVector3f.hpp" #include "Kyoto/Math/CUnitVector3f.hpp" +#include "Kyoto/Math/CVector3f.hpp" + +#include class CAxisAngle { static const CAxisAngle sIdentity; friend CAxisAngle operator+(const CAxisAngle&, const CAxisAngle&); friend CAxisAngle operator*(const CAxisAngle&, const float&); friend CAxisAngle operator*(const float&, const CAxisAngle&); + public: CAxisAngle() : mVector(CVector3f::Zero()) {} explicit CAxisAngle(const CVector3f& vec); @@ -25,14 +27,15 @@ public: const CAxisAngle& operator*=(const float& rhs); const CAxisAngle& operator+=(const CAxisAngle& rhs); + private: CVector3f mVector; }; CAxisAngle operator+(const CAxisAngle& lhs, const CAxisAngle& rhs); -CAxisAngle operator*(const CAxisAngle& lhs,const float& rhs); +CAxisAngle operator*(const CAxisAngle& lhs, const float& rhs); CAxisAngle operator*(const float& rhs, const CAxisAngle& lhs); CHECK_SIZEOF(CAxisAngle, 0xc) -#endif +#endif // _CAXISANGLE diff --git a/include/MetroidPrime/CCharAnimTime.hpp b/include/MetroidPrime/CCharAnimTime.hpp index 60dd328d..1326edb8 100644 --- a/include/MetroidPrime/CCharAnimTime.hpp +++ b/include/MetroidPrime/CCharAnimTime.hpp @@ -1,5 +1,5 @@ -#ifndef _CCHARANIMTIME_HPP -#define _CCHARANIMTIME_HPP +#ifndef _CCHARANIMTIME +#define _CCHARANIMTIME #include "types.h" @@ -19,4 +19,4 @@ private: }; CHECK_SIZEOF(CCharAnimTime, 0x8) -#endif +#endif // _CCHARANIMTIME diff --git a/include/MetroidPrime/CCharacterInfo.hpp b/include/MetroidPrime/CCharacterInfo.hpp index 0afc7143..67a47c13 100644 --- a/include/MetroidPrime/CCharacterInfo.hpp +++ b/include/MetroidPrime/CCharacterInfo.hpp @@ -1,13 +1,13 @@ -#ifndef _CCHARACTERINFO_HPP -#define _CCHARACTERINFO_HPP +#ifndef _CCHARACTERINFO +#define _CCHARACTERINFO #include "types.h" #include "MetroidPrime/CEffectComponent.hpp" +#include "Kyoto/Animation/CPASDatabase.hpp" #include "Kyoto/IObjectStore.hpp" #include "Kyoto/Math/CAABox.hpp" -#include "Kyoto/Animation/CPASDatabase.hpp" #include "rstl/pair.hpp" #include "rstl/string.hpp" @@ -22,7 +22,7 @@ public: rstl::vector< CAssetId > x20_elsc; rstl::vector< CAssetId > x30_elsc; }; - + const CPASDatabase& GetPASDatabase() const { return x30_pasDatabase; } private: @@ -43,4 +43,4 @@ private: }; CHECK_SIZEOF(CCharacterInfo, 0xc0) -#endif +#endif // _CCHARACTERINFO diff --git a/include/MetroidPrime/CCollisionActor.hpp b/include/MetroidPrime/CCollisionActor.hpp index e0399a21..9c3d3b04 100644 --- a/include/MetroidPrime/CCollisionActor.hpp +++ b/include/MetroidPrime/CCollisionActor.hpp @@ -1,5 +1,5 @@ -#ifndef _CCOLLISIONACTOR_HPP -#define _CCOLLISIONACTOR_HPP +#ifndef _CCOLLISIONACTOR +#define _CCOLLISIONACTOR #include "types.h" @@ -13,4 +13,4 @@ private: // TODO }; -#endif +#endif // _CCOLLISIONACTOR diff --git a/include/MetroidPrime/CConsoleOutputWindow.hpp b/include/MetroidPrime/CConsoleOutputWindow.hpp index 16e0551a..87f9d044 100644 --- a/include/MetroidPrime/CConsoleOutputWindow.hpp +++ b/include/MetroidPrime/CConsoleOutputWindow.hpp @@ -1,5 +1,5 @@ -#ifndef _CCONSOLEOUTPUTWINDOW_HPP -#define _CCONSOLEOUTPUTWINDOW_HPP +#ifndef _CCONSOLEOUTPUTWINDOW +#define _CCONSOLEOUTPUTWINDOW #include "types.h" @@ -14,4 +14,4 @@ public: void Draw() override; }; -#endif +#endif // _CCONSOLEOUTPUTWINDOW diff --git a/include/MetroidPrime/CDamageInfo.hpp b/include/MetroidPrime/CDamageInfo.hpp index 440f1092..213e9a3c 100644 --- a/include/MetroidPrime/CDamageInfo.hpp +++ b/include/MetroidPrime/CDamageInfo.hpp @@ -1,5 +1,7 @@ -#ifndef _CDAMAGEINFO_HPP -#define _CDAMAGEINFO_HPP +#ifndef _CDAMAGEINFO +#define _CDAMAGEINFO + +#include "types.h" #include "MetroidPrime/TGameTypes.hpp" #include "MetroidPrime/Weapons/WeaponTypes.hpp" @@ -64,4 +66,4 @@ public: } }; -#endif +#endif // _CDAMAGEINFO diff --git a/include/MetroidPrime/CDamageVulnerability.hpp b/include/MetroidPrime/CDamageVulnerability.hpp index 5d1c9822..d7aee8dc 100644 --- a/include/MetroidPrime/CDamageVulnerability.hpp +++ b/include/MetroidPrime/CDamageVulnerability.hpp @@ -1,8 +1,9 @@ -#ifndef _CDAMAGEVULNERABILITY_HPP -#define _CDAMAGEVULNERABILITY_HPP +#ifndef _CDAMAGEVULNERABILITY +#define _CDAMAGEVULNERABILITY + +#include "types.h" #include "MetroidPrime/Weapons/WeaponTypes.hpp" -#include "types.h" enum EVulnerability { kVN_Weak, @@ -63,4 +64,4 @@ private: }; CHECK_SIZEOF(CDamageVulnerability, 0x68) -#endif +#endif // _CDAMAGEVULNERABILITY diff --git a/include/MetroidPrime/CDecalManager.hpp b/include/MetroidPrime/CDecalManager.hpp index e1dcda9a..0454716e 100644 --- a/include/MetroidPrime/CDecalManager.hpp +++ b/include/MetroidPrime/CDecalManager.hpp @@ -1,5 +1,5 @@ -#ifndef _CDECALMANAGER_HPP -#define _CDECALMANAGER_HPP +#ifndef _CDECALMANAGER +#define _CDECALMANAGER #include "types.h" @@ -9,4 +9,4 @@ public: static void ShutDown(); }; -#endif +#endif // _CDECALMANAGER diff --git a/include/MetroidPrime/CEffect.hpp b/include/MetroidPrime/CEffect.hpp index 6d9fd606..01bd2a3b 100644 --- a/include/MetroidPrime/CEffect.hpp +++ b/include/MetroidPrime/CEffect.hpp @@ -1,5 +1,5 @@ -#ifndef _CEFFECT_HPP -#define _CEFFECT_HPP +#ifndef _CEFFECT +#define _CEFFECT #include "types.h" @@ -15,4 +15,4 @@ public: }; CHECK_SIZEOF(CEffect, 0xe8) -#endif +#endif // _CEFFECT diff --git a/include/MetroidPrime/CEffectComponent.hpp b/include/MetroidPrime/CEffectComponent.hpp index 471535cd..e9a6fc51 100644 --- a/include/MetroidPrime/CEffectComponent.hpp +++ b/include/MetroidPrime/CEffectComponent.hpp @@ -1,5 +1,5 @@ -#ifndef _CEFFECTCOMPONENT_HPP -#define _CEFFECTCOMPONENT_HPP +#ifndef _CEFFECTCOMPONENT +#define _CEFFECTCOMPONENT #include "types.h" @@ -15,4 +15,4 @@ private: uint x30_flags; }; -#endif +#endif // _CEFFECTCOMPONENT diff --git a/include/MetroidPrime/CEntity.hpp b/include/MetroidPrime/CEntity.hpp index 8e9cd4e7..37fa9266 100644 --- a/include/MetroidPrime/CEntity.hpp +++ b/include/MetroidPrime/CEntity.hpp @@ -1,5 +1,5 @@ -#ifndef _CENTITY_HPP -#define _CENTITY_HPP +#ifndef _CENTITY +#define _CENTITY #include "types.h" @@ -53,4 +53,4 @@ protected: CHECK_SIZEOF(CEntity, 0x34) -#endif +#endif // _CENTITY diff --git a/include/MetroidPrime/CEntityInfo.hpp b/include/MetroidPrime/CEntityInfo.hpp index 264e1db4..dedce677 100644 --- a/include/MetroidPrime/CEntityInfo.hpp +++ b/include/MetroidPrime/CEntityInfo.hpp @@ -1,5 +1,5 @@ -#ifndef _CENTITY_INFO_HPP -#define _CENTITY_INFO_HPP +#ifndef _CENTITYINFO +#define _CENTITYINFO #include "types.h" @@ -247,4 +247,4 @@ public: TEditorId GetEditorId() const { return x14_editorId; } }; -#endif +#endif // _CENTITYINFO diff --git a/include/MetroidPrime/CEnvFxManager.hpp b/include/MetroidPrime/CEnvFxManager.hpp index 9929e9d2..2d449bcb 100644 --- a/include/MetroidPrime/CEnvFxManager.hpp +++ b/include/MetroidPrime/CEnvFxManager.hpp @@ -1,5 +1,5 @@ -#ifndef _CENVFXMANAGER_HPP -#define _CENVFXMANAGER_HPP +#ifndef _CENVFXMANAGER +#define _CENVFXMANAGER #include "types.h" @@ -65,4 +65,4 @@ private: bool xc54_; }; -#endif +#endif // _CENVFXMANAGER diff --git a/include/MetroidPrime/CErrorOutputWindow.hpp b/include/MetroidPrime/CErrorOutputWindow.hpp index 9605f422..8bdfd549 100644 --- a/include/MetroidPrime/CErrorOutputWindow.hpp +++ b/include/MetroidPrime/CErrorOutputWindow.hpp @@ -1,5 +1,5 @@ -#ifndef _CERROROUTPUTWINDOW_HPP -#define _CERROROUTPUTWINDOW_HPP +#ifndef _CERROROUTPUTWINDOW +#define _CERROROUTPUTWINDOW #include "types.h" @@ -15,4 +15,4 @@ public: void Draw() override; }; -#endif +#endif // _CERROROUTPUTWINDOW diff --git a/include/MetroidPrime/CExplosion.hpp b/include/MetroidPrime/CExplosion.hpp index d0b2fad6..241f3a86 100644 --- a/include/MetroidPrime/CExplosion.hpp +++ b/include/MetroidPrime/CExplosion.hpp @@ -1,5 +1,5 @@ -#ifndef _CEXPLOSION_HPP -#define _CEXPLOSION_HPP +#ifndef _CEXPLOSION +#define _CEXPLOSION #include "types.h" @@ -43,4 +43,4 @@ public: }; CHECK_SIZEOF(CExplosion, 0x100) -#endif +#endif // _CEXPLOSION diff --git a/include/MetroidPrime/CFluidPlaneManager.hpp b/include/MetroidPrime/CFluidPlaneManager.hpp index eb1995d5..f520346e 100644 --- a/include/MetroidPrime/CFluidPlaneManager.hpp +++ b/include/MetroidPrime/CFluidPlaneManager.hpp @@ -1,5 +1,5 @@ -#ifndef _CFLUIDPLANEMANAGER_HPP -#define _CFLUIDPLANEMANAGER_HPP +#ifndef _CFLUIDPLANEMANAGER +#define _CFLUIDPLANEMANAGER #include "types.h" @@ -22,4 +22,4 @@ private: bool x121_; }; -#endif +#endif // _CFLUIDPLANEMANAGER diff --git a/include/MetroidPrime/CGameArchitectureSupport.hpp b/include/MetroidPrime/CGameArchitectureSupport.hpp index 0f80e029..0c05cdc1 100644 --- a/include/MetroidPrime/CGameArchitectureSupport.hpp +++ b/include/MetroidPrime/CGameArchitectureSupport.hpp @@ -1,5 +1,5 @@ -#ifndef _CGAMEARCHITECTURESUPPORT_HPP -#define _CGAMEARCHITECTURESUPPORT_HPP +#ifndef _CGAMEARCHITECTURESUPPORT +#define _CGAMEARCHITECTURESUPPORT #include "types.h" @@ -52,4 +52,4 @@ private: }; CHECK_SIZEOF(CGameArchitectureSupport, 0xd0) -#endif +#endif // _CGAMEARCHITECTURESUPPORT diff --git a/include/MetroidPrime/CGameArea.hpp b/include/MetroidPrime/CGameArea.hpp index d4b7e24d..81d19c57 100644 --- a/include/MetroidPrime/CGameArea.hpp +++ b/include/MetroidPrime/CGameArea.hpp @@ -1,5 +1,5 @@ -#ifndef _CGAMEAREA_HPP -#define _CGAMEAREA_HPP +#ifndef _CGAMEAREA +#define _CGAMEAREA #include "types.h" @@ -78,4 +78,4 @@ private: rstl::list< rstl::rc_ptr< IDvdRequest > > xf8_loadTransactions; }; -#endif +#endif // _CGAMEAREA diff --git a/include/MetroidPrime/CGameCollision.hpp b/include/MetroidPrime/CGameCollision.hpp index bf33c421..4a87af2b 100644 --- a/include/MetroidPrime/CGameCollision.hpp +++ b/include/MetroidPrime/CGameCollision.hpp @@ -1,5 +1,5 @@ -#ifndef _CGAMECOLLISION_HPP -#define _CGAMECOLLISION_HPP +#ifndef _CGAMECOLLISION +#define _CGAMECOLLISION #include "types.h" @@ -27,4 +27,4 @@ public: TUniqueId&, CCollisionInfo&, f64&); }; -#endif +#endif // _CGAMECOLLISION diff --git a/include/MetroidPrime/CGameGlobalObjects.hpp b/include/MetroidPrime/CGameGlobalObjects.hpp index 344ee7f6..04716159 100644 --- a/include/MetroidPrime/CGameGlobalObjects.hpp +++ b/include/MetroidPrime/CGameGlobalObjects.hpp @@ -1,5 +1,5 @@ -#ifndef _CGAMEGLOBALOBJECTS_HPP -#define _CGAMEGLOBALOBJECTS_HPP +#ifndef _CGAMEGLOBALOBJECTS +#define _CGAMEGLOBALOBJECTS #include "types.h" @@ -56,4 +56,4 @@ CHECK_SIZEOF(CGameGlobalObjects, 0x15c) extern unkptr gpController; extern unkptr gpDefaultFont; -#endif +#endif // _CGAMEGLOBALOBJECTS diff --git a/include/MetroidPrime/CHealthInfo.hpp b/include/MetroidPrime/CHealthInfo.hpp index f9eb3a3c..258e33f2 100644 --- a/include/MetroidPrime/CHealthInfo.hpp +++ b/include/MetroidPrime/CHealthInfo.hpp @@ -1,5 +1,5 @@ -#ifndef _CHEALTHINFO_HPP -#define _CHEALTHINFO_HPP +#ifndef _CHEALTHINFO +#define _CHEALTHINFO #include "types.h" @@ -16,4 +16,4 @@ private: }; CHECK_SIZEOF(CHealthInfo, 0x8) -#endif +#endif // _CHEALTHINFO diff --git a/include/MetroidPrime/CHierarchyPoseBuilder.hpp b/include/MetroidPrime/CHierarchyPoseBuilder.hpp index 4a41fe60..603c8ef9 100644 --- a/include/MetroidPrime/CHierarchyPoseBuilder.hpp +++ b/include/MetroidPrime/CHierarchyPoseBuilder.hpp @@ -1,5 +1,5 @@ -#ifndef _CHIERARCHYPOSEBUILDER_HPP -#define _CHIERARCHYPOSEBUILDER_HPP +#ifndef _CHIERARCHYPOSEBUILDER +#define _CHIERARCHYPOSEBUILDER #include "types.h" @@ -59,4 +59,4 @@ private: }; CHECK_SIZEOF(CHierarchyPoseBuilder, 0x110) -#endif +#endif // _CHIERARCHYPOSEBUILDER diff --git a/include/MetroidPrime/CIOWin.hpp b/include/MetroidPrime/CIOWin.hpp index 36030130..ba9813ac 100644 --- a/include/MetroidPrime/CIOWin.hpp +++ b/include/MetroidPrime/CIOWin.hpp @@ -1,5 +1,5 @@ -#ifndef _CIOWIN_HPP -#define _CIOWIN_HPP +#ifndef _CIOWIN +#define _CIOWIN #include "types.h" @@ -30,4 +30,4 @@ private: rstl::string x4_name; }; -#endif +#endif // _CIOWIN diff --git a/include/MetroidPrime/CIOWinManager.hpp b/include/MetroidPrime/CIOWinManager.hpp index 0207459b..671ab4a1 100644 --- a/include/MetroidPrime/CIOWinManager.hpp +++ b/include/MetroidPrime/CIOWinManager.hpp @@ -1,5 +1,5 @@ -#ifndef _CIOWINMANAGER_HPP -#define _CIOWINMANAGER_HPP +#ifndef _CIOWINMANAGER +#define _CIOWINMANAGER #include "types.h" @@ -28,4 +28,4 @@ private: }; CHECK_SIZEOF(CIOWinManager, 0x20) -#endif +#endif // _CIOWINMANAGER diff --git a/include/MetroidPrime/CInGameTweakManager.hpp b/include/MetroidPrime/CInGameTweakManager.hpp index befa432d..cc6e1f83 100644 --- a/include/MetroidPrime/CInGameTweakManager.hpp +++ b/include/MetroidPrime/CInGameTweakManager.hpp @@ -1,5 +1,5 @@ -#ifndef _CINGAMETWEAKMANAGER_HPP -#define _CINGAMETWEAKMANAGER_HPP +#ifndef _CINGAMETWEAKMANAGER +#define _CINGAMETWEAKMANAGER #include "types.h" @@ -67,4 +67,4 @@ CHECK_SIZEOF(CInGameTweakManager, 0x10) extern CInGameTweakManager* gpTweakManager; -#endif +#endif // _CINGAMETWEAKMANAGER diff --git a/include/MetroidPrime/CInputGenerator.hpp b/include/MetroidPrime/CInputGenerator.hpp index 372e8bd0..830575cb 100644 --- a/include/MetroidPrime/CInputGenerator.hpp +++ b/include/MetroidPrime/CInputGenerator.hpp @@ -1,5 +1,5 @@ -#ifndef _CINPUTGENERATOR_HPP -#define _CINPUTGENERATOR_HPP +#ifndef _CINPUTGENERATOR +#define _CINPUTGENERATOR #include "types.h" @@ -25,4 +25,4 @@ private: }; CHECK_SIZEOF(CInputGenerator, 0x14) -#endif +#endif // _CINPUTGENERATOR diff --git a/include/MetroidPrime/CMain.hpp b/include/MetroidPrime/CMain.hpp index 80ad8b26..3ec0156f 100644 --- a/include/MetroidPrime/CMain.hpp +++ b/include/MetroidPrime/CMain.hpp @@ -1,5 +1,5 @@ -#ifndef _CMAIN_HPP -#define _CMAIN_HPP +#ifndef _CMAIN +#define _CMAIN #include "types.h" @@ -126,4 +126,4 @@ CHECK_SIZEOF(CMain, 0x168) extern CMain* gpMain; -#endif +#endif // _CMAIN diff --git a/include/MetroidPrime/CMainFlow.hpp b/include/MetroidPrime/CMainFlow.hpp index 80027545..ef0579d5 100644 --- a/include/MetroidPrime/CMainFlow.hpp +++ b/include/MetroidPrime/CMainFlow.hpp @@ -1,5 +1,5 @@ -#ifndef _CMAINFLOW_HPP -#define _CMAINFLOW_HPP +#ifndef _CMAINFLOW +#define _CMAINFLOW #include "types.h" @@ -15,4 +15,4 @@ public: void Draw() override; }; -#endif +#endif // _CMAINFLOW diff --git a/include/MetroidPrime/CMemoryCard.hpp b/include/MetroidPrime/CMemoryCard.hpp index 5a213278..6d82ed5a 100644 --- a/include/MetroidPrime/CMemoryCard.hpp +++ b/include/MetroidPrime/CMemoryCard.hpp @@ -1,5 +1,5 @@ -#ifndef _CMEMORYCARD_HPP -#define _CMEMORYCARD_HPP +#ifndef _CMEMORYCARD +#define _CMEMORYCARD #include "types.h" @@ -29,4 +29,4 @@ private: extern CMemoryCard* gpMemoryCard; -#endif +#endif // _CMEMORYCARD diff --git a/include/MetroidPrime/CMemoryDrawEnum.hpp b/include/MetroidPrime/CMemoryDrawEnum.hpp index 429439c6..a0ac6faa 100644 --- a/include/MetroidPrime/CMemoryDrawEnum.hpp +++ b/include/MetroidPrime/CMemoryDrawEnum.hpp @@ -1,4 +1,4 @@ -#ifndef __CMEMORYDRAWENUM_HPP__ -#define __CMEMORYDRAWENUM_HPP__ +#ifndef _CMEMORYDRAWENUM +#define _CMEMORYDRAWENUM -#endif // __CMEMORYDRAWENUM_HPP__ +#endif // _CMEMORYDRAWENUM diff --git a/include/MetroidPrime/CModelData.hpp b/include/MetroidPrime/CModelData.hpp index d0d9553f..1f50d992 100644 --- a/include/MetroidPrime/CModelData.hpp +++ b/include/MetroidPrime/CModelData.hpp @@ -1,5 +1,5 @@ -#ifndef _CMODELDATA_HPP -#define _CMODELDATA_HPP +#ifndef _CMODELDATA +#define _CMODELDATA #include "types.h" @@ -102,4 +102,4 @@ private: }; CHECK_SIZEOF(CModelData, 0x4c) -#endif +#endif // _CMODELDATA diff --git a/include/MetroidPrime/CObjectList.hpp b/include/MetroidPrime/CObjectList.hpp index b99c122b..91c495e1 100644 --- a/include/MetroidPrime/CObjectList.hpp +++ b/include/MetroidPrime/CObjectList.hpp @@ -1,5 +1,5 @@ -#ifndef __COBJECTLIST_HPP__ -#define __COBJECTLIST_HPP__ +#ifndef _COBJECTLIST +#define _COBJECTLIST #include "types.h" @@ -61,4 +61,4 @@ private: }; CHECK_SIZEOF(CObjectList, 0x200c) -#endif // __COBJECTLIST_HPP__ +#endif // _COBJECTLIST diff --git a/include/MetroidPrime/CPOINode.hpp b/include/MetroidPrime/CPOINode.hpp index f3319747..65e3f3c6 100644 --- a/include/MetroidPrime/CPOINode.hpp +++ b/include/MetroidPrime/CPOINode.hpp @@ -1,5 +1,5 @@ -#ifndef _CPOINODE_HPP -#define _CPOINODE_HPP +#ifndef _CPOINODE +#define _CPOINODE #include "types.h" @@ -85,4 +85,4 @@ private: f32 x40_maxDist; }; -#endif +#endif // _CPOINODE diff --git a/include/MetroidPrime/CParticleData.hpp b/include/MetroidPrime/CParticleData.hpp index 4eeab9a1..f6a8add6 100644 --- a/include/MetroidPrime/CParticleData.hpp +++ b/include/MetroidPrime/CParticleData.hpp @@ -1,5 +1,5 @@ -#ifndef _CPARTICLEDATA_HPP -#define _CPARTICLEDATA_HPP +#ifndef _CPARTICLEDATA +#define _CPARTICLEDATA #include "types.h" @@ -32,4 +32,4 @@ private: f32 x18_scale; }; -#endif +#endif // _CPARTICLEDATA diff --git a/include/MetroidPrime/CParticleDatabase.hpp b/include/MetroidPrime/CParticleDatabase.hpp index df0fce39..24e8c264 100644 --- a/include/MetroidPrime/CParticleDatabase.hpp +++ b/include/MetroidPrime/CParticleDatabase.hpp @@ -1,5 +1,5 @@ -#ifndef _CPARTICLEDATABASE_HPP -#define _CPARTICLEDATABASE_HPP +#ifndef _CPARTICLEDATABASE +#define _CPARTICLEDATABASE #include "types.h" @@ -42,4 +42,4 @@ private: }; CHECK_SIZEOF(CParticleDatabase, 0xb8) -#endif +#endif // _CPARTICLEDATABASE diff --git a/include/MetroidPrime/CPhysicsActor.hpp b/include/MetroidPrime/CPhysicsActor.hpp index b86c4060..1db6de47 100644 --- a/include/MetroidPrime/CPhysicsActor.hpp +++ b/include/MetroidPrime/CPhysicsActor.hpp @@ -1,5 +1,5 @@ -#ifndef _CPHYSICSACTOR_HPP -#define _CPHYSICSACTOR_HPP +#ifndef _CPHYSICSACTOR +#define _CPHYSICSACTOR #include "types.h" @@ -180,4 +180,4 @@ private: }; CHECK_SIZEOF(CPhysicsActor, 0x258) -#endif +#endif // _CPHYSICSACTOR diff --git a/include/MetroidPrime/CPhysicsState.hpp b/include/MetroidPrime/CPhysicsState.hpp index b8d738a2..3f584b53 100644 --- a/include/MetroidPrime/CPhysicsState.hpp +++ b/include/MetroidPrime/CPhysicsState.hpp @@ -1,5 +1,5 @@ -#ifndef __CPHYSICSSTATE_HPP__ -#define __CPHYSICSSTATE_HPP__ +#ifndef _CPHYSICSSTATE +#define _CPHYSICSSTATE #include "MetroidPrime/CAxisAngle.hpp" @@ -35,4 +35,4 @@ private: CAxisAngle x64_angularImpulse; }; -#endif // __CHPYSICSSTATE_HPP__ +#endif // _CPHYSICSSTATE diff --git a/include/MetroidPrime/CPoseAsTransforms.hpp b/include/MetroidPrime/CPoseAsTransforms.hpp index 87473612..79366412 100644 --- a/include/MetroidPrime/CPoseAsTransforms.hpp +++ b/include/MetroidPrime/CPoseAsTransforms.hpp @@ -1,5 +1,5 @@ -#ifndef _CPOSEASTRANSFORMS_HPP -#define _CPOSEASTRANSFORMS_HPP +#ifndef _CPOSEASTRANSFORMS +#define _CPOSEASTRANSFORMS #include "types.h" @@ -21,4 +21,4 @@ private: }; CHECK_SIZEOF(CPoseAsTransforms, 0xd8) -#endif +#endif // _CPOSEASTRANSFORMS diff --git a/include/MetroidPrime/CRainSplashGenerator.hpp b/include/MetroidPrime/CRainSplashGenerator.hpp index 1815f104..5fba09b3 100644 --- a/include/MetroidPrime/CRainSplashGenerator.hpp +++ b/include/MetroidPrime/CRainSplashGenerator.hpp @@ -1,5 +1,5 @@ -#ifndef _CRAINSPLASHGENERATOR_HPP -#define _CRAINSPLASHGENERATOR_HPP +#ifndef _CRAINSPLASHGENERATOR +#define _CRAINSPLASHGENERATOR #include "rstl/reserved_vector.hpp" #include "rstl/vector.hpp" @@ -47,4 +47,4 @@ private: }; CHECK_SIZEOF(CRainSplashGenerator, 0x4c) -#endif // _CRAINSPLASHGENERATOR_HPP +#endif // _CRAINSPLASHGENERATOR diff --git a/include/MetroidPrime/CRippleManager.hpp b/include/MetroidPrime/CRippleManager.hpp index 83174e6e..845678fa 100644 --- a/include/MetroidPrime/CRippleManager.hpp +++ b/include/MetroidPrime/CRippleManager.hpp @@ -1,5 +1,5 @@ -#ifndef _CRIPPLEMANAGER_HPP -#define _CRIPPLEMANAGER_HPP +#ifndef _CRIPPLEMANAGER +#define _CRIPPLEMANAGER #include "types.h" @@ -14,4 +14,4 @@ private: f32 x14_alpha; }; -#endif +#endif // _CRIPPLEMANAGER diff --git a/include/MetroidPrime/CRumbleManager.hpp b/include/MetroidPrime/CRumbleManager.hpp index e064060b..056f5a2d 100644 --- a/include/MetroidPrime/CRumbleManager.hpp +++ b/include/MetroidPrime/CRumbleManager.hpp @@ -1,5 +1,5 @@ -#ifndef _CRUMBLEMANAGER_HPP -#define _CRUMBLEMANAGER_HPP +#ifndef _CRUMBLEMANAGER +#define _CRUMBLEMANAGER #include "types.h" @@ -20,4 +20,4 @@ private: CRumbleGenerator x0_rumbleGenerator; }; -#endif +#endif // _CRUMBLEMANAGER diff --git a/include/MetroidPrime/CSimpleShadow.hpp b/include/MetroidPrime/CSimpleShadow.hpp index b6fac07b..ed417ec2 100644 --- a/include/MetroidPrime/CSimpleShadow.hpp +++ b/include/MetroidPrime/CSimpleShadow.hpp @@ -1,5 +1,5 @@ -#ifndef _CSIMPLESHADOW_HPP -#define _CSIMPLESHADOW_HPP +#ifndef _CSIMPLESHADOW +#define _CSIMPLESHADOW #include "types.h" @@ -19,4 +19,4 @@ private: // TODO }; -#endif +#endif // _CSIMPLESHADOW diff --git a/include/MetroidPrime/CSortedLists.hpp b/include/MetroidPrime/CSortedLists.hpp index 22628cad..26e5d041 100644 --- a/include/MetroidPrime/CSortedLists.hpp +++ b/include/MetroidPrime/CSortedLists.hpp @@ -1,5 +1,5 @@ -#ifndef _CSORTEDLISTS_HPP -#define _CSORTEDLISTS_HPP +#ifndef _CSORTEDLISTS +#define _CSORTEDLISTS #include "types.h" @@ -32,4 +32,4 @@ class CSortedListManager { CHECK_SIZEOF(CSortedListManager, 0xe018); } // namespace SL -#endif +#endif // _CSORTEDLISTS diff --git a/include/MetroidPrime/CSplashScreen.hpp b/include/MetroidPrime/CSplashScreen.hpp index fdd061a8..e373d1fd 100644 --- a/include/MetroidPrime/CSplashScreen.hpp +++ b/include/MetroidPrime/CSplashScreen.hpp @@ -1,5 +1,5 @@ -#ifndef _CSPLASHSCREEN_HPP -#define _CSPLASHSCREEN_HPP +#ifndef _CSPLASHSCREEN +#define _CSPLASHSCREEN #include "types.h" @@ -20,4 +20,4 @@ public: void Draw() override; }; -#endif +#endif // _CSPLASHSCREEN diff --git a/include/MetroidPrime/CStateManager.hpp b/include/MetroidPrime/CStateManager.hpp index 58e9943e..7788fb16 100644 --- a/include/MetroidPrime/CStateManager.hpp +++ b/include/MetroidPrime/CStateManager.hpp @@ -1,5 +1,5 @@ -#ifndef _CSTATEMANAGER_HPP -#define _CSTATEMANAGER_HPP +#ifndef _CSTATEMANAGER +#define _CSTATEMANAGER #include "types.h" @@ -173,9 +173,7 @@ public: // void QueueMessage(int frameCount, CAssetId msg, float f1); - int GetHUDMessageFrameCount() const { - return xf80_hudMessageFrameCount; - } + int GetHUDMessageFrameCount() const { return xf80_hudMessageFrameCount; } // State transitions void DeferStateTransition(EStateManagerTransition t); @@ -193,11 +191,11 @@ public: } void SetEnergyBarActorInfo(TUniqueId bossId, float maxEnergy, u32 stringIdx); - void SetPendingOnScreenTex(CAssetId texId, const CVector2i& origin, const CVector2i& extent);/* { - xef4_pendingScreenTex.x0_id = texId; - xef4_pendingScreenTex.x4_origin = origin; - xef4_pendingScreenTex.xc_extent = extent; - }*/ + void SetPendingOnScreenTex(CAssetId texId, const CVector2i& origin, const CVector2i& extent); /* { + xef4_pendingScreenTex.x0_id = texId; + xef4_pendingScreenTex.x4_origin = origin; + xef4_pendingScreenTex.xc_extent = extent; + }*/ const SOnScreenTex& GetPendingScreenTex() const { return xef4_pendingScreenTex; } float IntegrateVisorFog(float f); @@ -289,4 +287,4 @@ private: }; CHECK_SIZEOF(CStateManager, 0xf98) -#endif +#endif // _CSTATEMANAGER diff --git a/include/MetroidPrime/CStateManagerContainer.hpp b/include/MetroidPrime/CStateManagerContainer.hpp index 0dc4975f..0203acad 100644 --- a/include/MetroidPrime/CStateManagerContainer.hpp +++ b/include/MetroidPrime/CStateManagerContainer.hpp @@ -1,5 +1,5 @@ -#ifndef _CSTATEMANAGERCONTAINER_HPP -#define _CSTATEMANAGERCONTAINER_HPP +#ifndef _CSTATEMANAGERCONTAINER +#define _CSTATEMANAGERCONTAINER #include "types.h" @@ -27,4 +27,4 @@ class CStateManagerContainer { rstl::reserved_vector< TUniqueId, 20 > xf39c_renderLast; }; -#endif +#endif // _CSTATEMANAGERCONTAINER diff --git a/include/MetroidPrime/CWeaponMgr.hpp b/include/MetroidPrime/CWeaponMgr.hpp index 848d9a12..430c29e8 100644 --- a/include/MetroidPrime/CWeaponMgr.hpp +++ b/include/MetroidPrime/CWeaponMgr.hpp @@ -1,5 +1,5 @@ -#ifndef _CWEAPONMANAGER_HPP -#define _CWEAPONMANAGER_HPP +#ifndef _CWEAPONMGR +#define _CWEAPONMGR #include "types.h" @@ -14,4 +14,4 @@ private: }; CHECK_SIZEOF(CWeaponMgr, 0x14); -#endif +#endif // _CWEAPONMGR diff --git a/include/MetroidPrime/CWorld.hpp b/include/MetroidPrime/CWorld.hpp index e8c0e37b..a438aa9f 100644 --- a/include/MetroidPrime/CWorld.hpp +++ b/include/MetroidPrime/CWorld.hpp @@ -1,5 +1,5 @@ -#ifndef _CWORLD_HPP -#define _CWORLD_HPP +#ifndef _CWORLD +#define _CWORLD #include "types.h" @@ -105,4 +105,4 @@ private: }; CHECK_SIZEOF(CWorld, 0xf4) -#endif +#endif // _CWORLD diff --git a/include/MetroidPrime/CWorldShadow.hpp b/include/MetroidPrime/CWorldShadow.hpp index 91dc6d39..01862a66 100644 --- a/include/MetroidPrime/CWorldShadow.hpp +++ b/include/MetroidPrime/CWorldShadow.hpp @@ -1,17 +1,17 @@ -#ifndef _CWORLDSHADOW_HPP -#define _CWORLDSHADOW_HPP +#ifndef _CWORLDSHADOW +#define _CWORLDSHADOW #include "MetroidPrime/TGameTypes.hpp" -#include "Kyoto/Math/CVector3f.hpp" #include "Kyoto/Math/CTransform4f.hpp" +#include "Kyoto/Math/CVector3f.hpp" #include "rstl/single_ptr.hpp" class CTexture; class CWorldShadow { - rstl::single_ptr x0_texture; + rstl::single_ptr< CTexture > x0_texture; CTransform4f x4_view; CTransform4f x34_model; float x64_objHalfExtent; @@ -27,11 +27,10 @@ public: void EnableModelProjectedShadow(const CTransform4f& pos, uint lightIdx, float f1); void DisableModelProjectedShadow(); - void BuildLightShadowTexture(const CStateManager& mgr, TAreaId aid, uint lightIdx, const CAABox& aabb, - bool motionBlur, bool lighten); + void BuildLightShadowTexture(const CStateManager& mgr, TAreaId aid, uint lightIdx, + const CAABox& aabb, bool motionBlur, bool lighten); void ResetBlur(); }; CHECK_SIZEOF(CWorldShadow, 0x8c) - -#endif // _CWORLDSHADOW_HPP +#endif // _CWORLDSHADOW diff --git a/include/MetroidPrime/Cameras/CBallCamera.hpp b/include/MetroidPrime/Cameras/CBallCamera.hpp index f36ef016..bdaef058 100644 --- a/include/MetroidPrime/Cameras/CBallCamera.hpp +++ b/include/MetroidPrime/Cameras/CBallCamera.hpp @@ -1,5 +1,5 @@ -#ifndef __CBALLCAMERA_HPP__ -#define __CBALLCAMERA_HPP__ +#ifndef _CBALLCAMERA +#define _CBALLCAMERA #include "types.h" @@ -287,4 +287,4 @@ private: }; CHECK_SIZEOF(CBallCamera, 0x488) -#endif // __CBALLCAMERA_HPP__ +#endif // _CBALLCAMERA diff --git a/include/MetroidPrime/Cameras/CCameraBlurPass.hpp b/include/MetroidPrime/Cameras/CCameraBlurPass.hpp index a6184c46..81739b14 100644 --- a/include/MetroidPrime/Cameras/CCameraBlurPass.hpp +++ b/include/MetroidPrime/Cameras/CCameraBlurPass.hpp @@ -1,5 +1,5 @@ -#ifndef _CCAMERABLURPASS_HPP -#define _CCAMERABLURPASS_HPP +#ifndef _CCAMERABLURPASS +#define _CCAMERABLURPASS #include "types.h" @@ -39,4 +39,4 @@ private: }; CHECK_SIZEOF(CCameraBlurPass, 0x34) -#endif +#endif // _CCAMERABLURPASS diff --git a/include/MetroidPrime/Cameras/CCameraFilterPass.hpp b/include/MetroidPrime/Cameras/CCameraFilterPass.hpp index 176b1053..c0195dc2 100644 --- a/include/MetroidPrime/Cameras/CCameraFilterPass.hpp +++ b/include/MetroidPrime/Cameras/CCameraFilterPass.hpp @@ -1,5 +1,5 @@ -#ifndef _CCAMERAFILTERPASS_HPP -#define _CCAMERAFILTERPASS_HPP +#ifndef _CCAMERAFILTERPASS +#define _CCAMERAFILTERPASS #include "types.h" @@ -58,4 +58,4 @@ private: }; CHECK_SIZEOF(CCameraFilterPass, 0x2c) -#endif +#endif // _CCAMERAFILTERPASS diff --git a/include/MetroidPrime/Cameras/CCameraHint.hpp b/include/MetroidPrime/Cameras/CCameraHint.hpp index bb567f7c..d6887565 100644 --- a/include/MetroidPrime/Cameras/CCameraHint.hpp +++ b/include/MetroidPrime/Cameras/CCameraHint.hpp @@ -1,5 +1,5 @@ -#ifndef __CCAMERAHINT_HPP__ -#define __CCAMERAHINT_HPP__ +#ifndef _CCAMERAHINT +#define _CCAMERAHINT #include "Kyoto/Math/CVector3f.hpp" #include "MetroidPrime/Cameras/CBallCamera.hpp" @@ -36,4 +36,4 @@ private: float mControlInterpDur; }; -#endif // __CCAMERAHINT_HPP__ +#endif // _CCAMERAHINT diff --git a/include/MetroidPrime/Cameras/CCameraManager.hpp b/include/MetroidPrime/Cameras/CCameraManager.hpp index dee9be0c..c1b27d92 100644 --- a/include/MetroidPrime/Cameras/CCameraManager.hpp +++ b/include/MetroidPrime/Cameras/CCameraManager.hpp @@ -1,5 +1,5 @@ -#ifndef _CCAMERAMANAGER_HPP -#define _CCAMERAMANAGER_HPP +#ifndef _CCAMERAMANAGER +#define _CCAMERAMANAGER #include "types.h" @@ -66,4 +66,4 @@ private: }; CHECK_SIZEOF(CCameraManager, 0x3c0) -#endif +#endif // _CCAMERAMANAGER diff --git a/include/MetroidPrime/Cameras/CCameraShakeData.hpp b/include/MetroidPrime/Cameras/CCameraShakeData.hpp index 793a6a59..f42fccaa 100644 --- a/include/MetroidPrime/Cameras/CCameraShakeData.hpp +++ b/include/MetroidPrime/Cameras/CCameraShakeData.hpp @@ -1,5 +1,5 @@ -#ifndef _CCAMERASHAKEDATA_HPP -#define _CCAMERASHAKEDATA_HPP +#ifndef _CCAMERASHAKEDATA +#define _CCAMERASHAKEDATA #include "types.h" @@ -41,4 +41,4 @@ private: }; CHECK_SIZEOF(CCameraShakeData, 0xd4) -#endif +#endif // _CCAMERASHAKEDATA diff --git a/include/MetroidPrime/Cameras/CCameraSpline.hpp b/include/MetroidPrime/Cameras/CCameraSpline.hpp index bed78ea4..643f08f7 100644 --- a/include/MetroidPrime/Cameras/CCameraSpline.hpp +++ b/include/MetroidPrime/Cameras/CCameraSpline.hpp @@ -1,5 +1,5 @@ -#ifndef _CCAMERASPLINE_HPP -#define _CCAMERASPLINE_HPP +#ifndef _CCAMERASPLINE +#define _CCAMERASPLINE #include "types.h" @@ -26,4 +26,4 @@ private: }; CHECK_SIZEOF(CCameraSpline, 0x4c) -#endif +#endif // _CCAMERASPLINE diff --git a/include/MetroidPrime/Cameras/CFirstPersonCamera.hpp b/include/MetroidPrime/Cameras/CFirstPersonCamera.hpp index cac5032b..1cb60271 100644 --- a/include/MetroidPrime/Cameras/CFirstPersonCamera.hpp +++ b/include/MetroidPrime/Cameras/CFirstPersonCamera.hpp @@ -1,11 +1,10 @@ -#ifndef _CFIRSTPERSONCAMERA_HPP -#define _CFIRSTPERSONCAMERA_HPP +#ifndef _CFIRSTPERSONCAMERA +#define _CFIRSTPERSONCAMERA #include "MetroidPrime/Cameras/CGameCamera.hpp" class CFirstPersonCamera : public CGameCamera { public: - }; -#endif // _CFIRSTPERSONCAMERA_HPP +#endif // _CFIRSTPERSONCAMERA diff --git a/include/MetroidPrime/Cameras/CGameCamera.hpp b/include/MetroidPrime/Cameras/CGameCamera.hpp index ac0a6438..eeddaac6 100644 --- a/include/MetroidPrime/Cameras/CGameCamera.hpp +++ b/include/MetroidPrime/Cameras/CGameCamera.hpp @@ -1,5 +1,5 @@ -#ifndef _CGAMECAMERA_HPP -#define _CGAMECAMERA_HPP +#ifndef _CGAMECAMERA +#define _CGAMECAMERA #include "types.h" @@ -50,4 +50,4 @@ private: }; CHECK_SIZEOF(CGameCamera, 0x188) -#endif +#endif // _CGAMECAMERA diff --git a/include/MetroidPrime/Enemies/CAiFuncMap.hpp b/include/MetroidPrime/Enemies/CAiFuncMap.hpp index c1dd3a70..d0c66f97 100644 --- a/include/MetroidPrime/Enemies/CAiFuncMap.hpp +++ b/include/MetroidPrime/Enemies/CAiFuncMap.hpp @@ -1,5 +1,5 @@ -#ifndef _CAIFUNCMAP_HPP -#define _CAIFUNCMAP_HPP +#ifndef _CAIFUNCMAP +#define _CAIFUNCMAP #include "types.h" @@ -12,4 +12,4 @@ private: u8 pad[0x20]; }; -#endif +#endif // _CAIFUNCMAP diff --git a/include/MetroidPrime/Factories/CCharacterFactoryBuilder.hpp b/include/MetroidPrime/Factories/CCharacterFactoryBuilder.hpp index 40c53370..74286292 100644 --- a/include/MetroidPrime/Factories/CCharacterFactoryBuilder.hpp +++ b/include/MetroidPrime/Factories/CCharacterFactoryBuilder.hpp @@ -1,5 +1,5 @@ -#ifndef _CCHARACTERFACTORYBUILDER_HPP -#define _CCHARACTERFACTORYBUILDER_HPP +#ifndef _CCHARACTERFACTORYBUILDER +#define _CCHARACTERFACTORYBUILDER #include "types.h" @@ -14,4 +14,4 @@ private: extern CCharacterFactoryBuilder* gpCharacterFactoryBuilder; -#endif +#endif // _CCHARACTERFACTORYBUILDER diff --git a/include/MetroidPrime/HUD/CHUDMemoParms.hpp b/include/MetroidPrime/HUD/CHUDMemoParms.hpp index 9d173780..9678c91f 100644 --- a/include/MetroidPrime/HUD/CHUDMemoParms.hpp +++ b/include/MetroidPrime/HUD/CHUDMemoParms.hpp @@ -1,8 +1,10 @@ -#ifndef __CHUDMEMOPARMS_HPP__ -#define __CHUDMEMOPARMS_HPP__ +#ifndef _CHUDMEMOPARMS +#define _CHUDMEMOPARMS #include "types.h" + class CInputStream; + class CHUDMemoParms { public: CHUDMemoParms(float dispTime, bool clear, bool fadeOut, bool hint) @@ -20,4 +22,5 @@ private: bool mFadeOutOnly; bool mHintMemo; }; -#endif // __CHUDMEMOPARMS_HPP__ + +#endif // _CHUDMEMOPARMS diff --git a/include/MetroidPrime/HUD/CSamusHud.hpp b/include/MetroidPrime/HUD/CSamusHud.hpp index 21a0c831..56ebb2f9 100644 --- a/include/MetroidPrime/HUD/CSamusHud.hpp +++ b/include/MetroidPrime/HUD/CSamusHud.hpp @@ -1,5 +1,7 @@ -#ifndef __CSAMUSHUD_HPP__ -#define __CSAMUSHUD_HPP__ +#ifndef _CSAMUSHUD +#define _CSAMUSHUD + +#include "types.h" #include "MetroidPrime/HUD/CHUDMemoParms.hpp" @@ -10,4 +12,4 @@ public: static void DisplayHudMemo(const rstl::wstring& text, const CHUDMemoParms& info); }; -#endif // __CSAMUSHUD_HPP__ +#endif // _CSAMUSHUD diff --git a/include/MetroidPrime/Player/CFidget.hpp b/include/MetroidPrime/Player/CFidget.hpp index 4325cef8..d12ab84a 100644 --- a/include/MetroidPrime/Player/CFidget.hpp +++ b/include/MetroidPrime/Player/CFidget.hpp @@ -1,4 +1,5 @@ -#pragma once +#ifndef _CFIDGET +#define _CFIDGET #include "types.h" @@ -50,3 +51,5 @@ public: void DoneLoading() { x34_24_loading = false; } }; CHECK_SIZEOF(CFidget, 0x38) + +#endif // _CFIDGET diff --git a/include/MetroidPrime/Player/CGameOptions.hpp b/include/MetroidPrime/Player/CGameOptions.hpp index 97f870c2..41e83a46 100644 --- a/include/MetroidPrime/Player/CGameOptions.hpp +++ b/include/MetroidPrime/Player/CGameOptions.hpp @@ -1,5 +1,5 @@ -#ifndef _CGAMEOPTIONS_HPP -#define _CGAMEOPTIONS_HPP +#ifndef _CGAMEOPTIONS +#define _CGAMEOPTIONS #include "types.h" @@ -36,4 +36,4 @@ private: rstl::vector< rstl::pair< CAssetId, CAssetId > > x6c_controlTxtrMap; }; -#endif +#endif // _CGAMEOPTIONS diff --git a/include/MetroidPrime/Player/CGameState.hpp b/include/MetroidPrime/Player/CGameState.hpp index 362dd3cb..4deab129 100644 --- a/include/MetroidPrime/Player/CGameState.hpp +++ b/include/MetroidPrime/Player/CGameState.hpp @@ -1,12 +1,8 @@ -#ifndef _CGAMESTATE_HPP -#define _CGAMESTATE_HPP +#ifndef _CGAMESTATE +#define _CGAMESTATE #include "types.h" -#include "rstl/rc_ptr.hpp" -#include "rstl/reserved_vector.hpp" -#include "rstl/vector.hpp" - #include "MetroidPrime/Player/CGameOptions.hpp" #include "MetroidPrime/Player/CHintOptions.hpp" #include "MetroidPrime/Player/CPlayerState.hpp" @@ -15,6 +11,10 @@ #include "MetroidPrime/Player/CWorldTransManager.hpp" #include "MetroidPrime/TGameTypes.hpp" +#include "rstl/rc_ptr.hpp" +#include "rstl/reserved_vector.hpp" +#include "rstl/vector.hpp" + class CGameState { public: CGameState(); @@ -49,4 +49,4 @@ private: extern CGameState* gpGameState; -#endif +#endif // _CGAMESTATE diff --git a/include/MetroidPrime/Player/CGrappleArm.hpp b/include/MetroidPrime/Player/CGrappleArm.hpp index c8b91bd3..0c0bf08b 100644 --- a/include/MetroidPrime/Player/CGrappleArm.hpp +++ b/include/MetroidPrime/Player/CGrappleArm.hpp @@ -1,5 +1,5 @@ -#ifndef _CGRAPPLEARM_HPP_ -#define _CGRAPPLEARM_HPP_ +#ifndef _CGRAPPLEARM +#define _CGRAPPLEARM #include "types.h" @@ -12,7 +12,7 @@ public: void PreRender(CStateManager& mgr, const CFrustumPlanes& frustum, const CVector3f& camPos); void ReturnToDefault(CStateManager& mgr, float dt, bool setState); - + // EArmState GetAnimState() const { return x334_animState; } bool GetActive() const { return x3b2_24_active; } bool BeamActive() const { return x3b2_25_beamActive; } @@ -23,7 +23,7 @@ public: private: u8 x0_pad[0x3b0]; s16 x3b0_rumbleHandle; - bool x3b2_24_active : 1; + bool x3b2_24_active : 1; bool x3b2_25_beamActive : 1; bool x3b2_26_grappleHit : 1; bool x3b2_27_armMoving : 1; @@ -32,4 +32,4 @@ private: }; CHECK_SIZEOF(CGrappleArm, 0x3b4) -#endif // _CGRAPPLEARM_HPP_ +#endif // _CGRAPPLEARM diff --git a/include/MetroidPrime/Player/CHintOptions.hpp b/include/MetroidPrime/Player/CHintOptions.hpp index 4f0ebbac..3f064187 100644 --- a/include/MetroidPrime/Player/CHintOptions.hpp +++ b/include/MetroidPrime/Player/CHintOptions.hpp @@ -1,5 +1,5 @@ -#ifndef _CHINTOPTIONS_HPP -#define _CHINTOPTIONS_HPP +#ifndef _CHINTOPTIONS +#define _CHINTOPTIONS #include "types.h" @@ -26,4 +26,4 @@ private: int x10_nextHintIdx; }; -#endif +#endif // _CHINTOPTIONS diff --git a/include/MetroidPrime/Player/CPlayer.hpp b/include/MetroidPrime/Player/CPlayer.hpp index ce20ebea..86c4ca74 100644 --- a/include/MetroidPrime/Player/CPlayer.hpp +++ b/include/MetroidPrime/Player/CPlayer.hpp @@ -1,5 +1,5 @@ -#ifndef _CPLAYER_HPP -#define _CPLAYER_HPP +#ifndef _CPLAYER +#define _CPLAYER #include "types.h" @@ -414,4 +414,4 @@ private: }; CHECK_SIZEOF(CPlayer, 0xa38) -#endif +#endif // _CPLAYER diff --git a/include/MetroidPrime/Player/CPlayerCameraBob.hpp b/include/MetroidPrime/Player/CPlayerCameraBob.hpp index b0ac164f..bf6a5b2e 100644 --- a/include/MetroidPrime/Player/CPlayerCameraBob.hpp +++ b/include/MetroidPrime/Player/CPlayerCameraBob.hpp @@ -1,4 +1,5 @@ -#pragma once +#ifndef _CPLAYERCAMERABOB +#define _CPLAYERCAMERABOB #include "types.h" @@ -104,3 +105,5 @@ private: static const float kCameraDamping; }; CHECK_SIZEOF(CPlayerCameraBob, 0x108) + +#endif // _CPLAYERCAMERABOB diff --git a/include/MetroidPrime/Player/CPlayerEnergyDrain.hpp b/include/MetroidPrime/Player/CPlayerEnergyDrain.hpp index 42960262..bc3544eb 100644 --- a/include/MetroidPrime/Player/CPlayerEnergyDrain.hpp +++ b/include/MetroidPrime/Player/CPlayerEnergyDrain.hpp @@ -1,5 +1,5 @@ -#ifndef _CPLAYERENERGYDRAIN_HPP -#define _CPLAYERENERGYDRAIN_HPP +#ifndef _CPLAYERENERGYDRAIN +#define _CPLAYERENERGYDRAIN #include "types.h" @@ -26,4 +26,4 @@ private: }; CHECK_SIZEOF(CPlayerEnergyDrain, 0x14) -#endif \ No newline at end of file +#endif // _CPLAYERENERGYDRAIN diff --git a/include/MetroidPrime/Player/CPlayerGun.hpp b/include/MetroidPrime/Player/CPlayerGun.hpp index ccc37bad..1c085d82 100644 --- a/include/MetroidPrime/Player/CPlayerGun.hpp +++ b/include/MetroidPrime/Player/CPlayerGun.hpp @@ -1,5 +1,5 @@ -#ifndef _CPLAYERGUN_HPP -#define _CPLAYERGUN_HPP +#ifndef _CPLAYERGUN +#define _CPLAYERGUN #include "types.h" @@ -16,10 +16,10 @@ #include "Kyoto/Math/CTransform4f.hpp" #include "Kyoto/TOneStatic.hpp" -#include "rstl/string.hpp" #include "rstl/pair.hpp" #include "rstl/reserved_vector.hpp" #include "rstl/single_ptr.hpp" +#include "rstl/string.hpp" #include "rstl/vector.hpp" #include "math.h" @@ -407,4 +407,4 @@ private: }; CHECK_SIZEOF(CPlayerGun, 0x838) -#endif // _CPLAYERGUN_HPP +#endif // _CPLAYERGUN diff --git a/include/MetroidPrime/Player/CPlayerState.hpp b/include/MetroidPrime/Player/CPlayerState.hpp index d04ed5e1..d24e05ae 100644 --- a/include/MetroidPrime/Player/CPlayerState.hpp +++ b/include/MetroidPrime/Player/CPlayerState.hpp @@ -1,13 +1,16 @@ -#ifndef _CPLAYERSTATE_HPP -#define _CPLAYERSTATE_HPP +#ifndef _CPLAYERSTATE +#define _CPLAYERSTATE + +#include "types.h" -#include "Kyoto/IObjectStore.hpp" #include "MetroidPrime/CHealthInfo.hpp" #include "MetroidPrime/Player/CStaticInterference.hpp" + +#include "Kyoto/IObjectStore.hpp" + #include "rstl/pair.hpp" #include "rstl/reserved_vector.hpp" #include "rstl/vector.hpp" -#include "types.h" class CStateManager; @@ -152,7 +155,6 @@ public: const CHealthInfo& GetHealthInfo() const { return xc_health; } - private: struct CPowerUp { int x0_amount; @@ -193,4 +195,4 @@ private: CStaticInterference x188_staticIntf; }; -#endif +#endif // _CPLAYERSTATE diff --git a/include/MetroidPrime/Player/CStaticInterference.hpp b/include/MetroidPrime/Player/CStaticInterference.hpp index 671ccbbb..0329be3b 100644 --- a/include/MetroidPrime/Player/CStaticInterference.hpp +++ b/include/MetroidPrime/Player/CStaticInterference.hpp @@ -1,9 +1,10 @@ -#ifndef _CSTATICINTERFERENCE_HPP -#define _CSTATICINTERFERENCE_HPP +#ifndef _CSTATICINTERFERENCE +#define _CSTATICINTERFERENCE #include "types.h" #include "MetroidPrime/TGameTypes.hpp" + #include "rstl/vector.hpp" struct CStaticInterferenceSource { @@ -27,4 +28,4 @@ private: rstl::vector< CStaticInterferenceSource > sources; }; -#endif +#endif // _CSTATICINTERFERENCE diff --git a/include/MetroidPrime/Player/CSystemOptions.hpp b/include/MetroidPrime/Player/CSystemOptions.hpp index 3324f2aa..a564cc34 100644 --- a/include/MetroidPrime/Player/CSystemOptions.hpp +++ b/include/MetroidPrime/Player/CSystemOptions.hpp @@ -1,14 +1,14 @@ -#ifndef _CSYSTEMOPTIONS_HPP -#define _CSYSTEMOPTIONS_HPP +#ifndef _CSYSTEMOPTIONS +#define _CSYSTEMOPTIONS #include "types.h" +#include "MetroidPrime/TGameTypes.hpp" + #include "rstl/pair.hpp" #include "rstl/reserved_vector.hpp" #include "rstl/vector.hpp" -#include "MetroidPrime/TGameTypes.hpp" - class CSystemOptions { public: CSystemOptions(); @@ -42,4 +42,4 @@ private: bool xd0_29_allItemsCollected : 1; }; -#endif +#endif // _CSYSTEMOPTIONS diff --git a/include/MetroidPrime/Player/CWorldState.hpp b/include/MetroidPrime/Player/CWorldState.hpp index ea56b4da..54508e4e 100644 --- a/include/MetroidPrime/Player/CWorldState.hpp +++ b/include/MetroidPrime/Player/CWorldState.hpp @@ -1,5 +1,5 @@ -#ifndef _CWORLDSTATE_HPP -#define _CWORLDSTATE_HPP +#ifndef _CWORLDSTATE +#define _CWORLDSTATE #include "types.h" @@ -9,4 +9,4 @@ private: u8 pad[0x18]; }; -#endif +#endif // _CWORLDSTATE diff --git a/include/MetroidPrime/Player/CWorldTransManager.hpp b/include/MetroidPrime/Player/CWorldTransManager.hpp index 9474c874..accf3e6b 100644 --- a/include/MetroidPrime/Player/CWorldTransManager.hpp +++ b/include/MetroidPrime/Player/CWorldTransManager.hpp @@ -1,5 +1,5 @@ -#ifndef _CWORLDTRANSMANAGER_HPP -#define _CWORLDTRANSMANAGER_HPP +#ifndef _CWORLDTRANSMANAGER +#define _CWORLDTRANSMANAGER #include "types.h" @@ -9,4 +9,4 @@ private: u8 pad[0x48]; }; -#endif +#endif // _CWORLDTRANSMANAGER diff --git a/include/MetroidPrime/SFX/SFX.h b/include/MetroidPrime/SFX/SFX.h index 4bf0e640..0ec77c26 100644 --- a/include/MetroidPrime/SFX/SFX.h +++ b/include/MetroidPrime/SFX/SFX.h @@ -35,16 +35,16 @@ #include "LavaWorld.h" #include "Magdolite.h" #include "Metaree.h" -#include "MetroidPrime.h" #include "Metroid.h" +#include "MetroidPrime.h" #include "MinesWorld.h" -#include "MiscSamus.h" #include "Misc.h" +#include "MiscSamus.h" #include "OmegaPirate.h" #include "OverWorld.h" #include "Parasite.h" -#include "PhazonGun.h" #include "Phazon.h" +#include "PhazonGun.h" #include "PuddleSpore.h" #include "PuddleToad.h" #include "Puffer.h" diff --git a/include/MetroidPrime/ScriptObjects/CFire.hpp b/include/MetroidPrime/ScriptObjects/CFire.hpp index cb99affb..bfea6a4c 100644 --- a/include/MetroidPrime/ScriptObjects/CFire.hpp +++ b/include/MetroidPrime/ScriptObjects/CFire.hpp @@ -1,8 +1,9 @@ -#ifndef __CFIRE_HPP__ -#define __CFIRE_HPP__ +#ifndef _CFIRE +#define _CFIRE + +#include "types.h" #include "MetroidPrime/CActor.hpp" - #include "MetroidPrime/CDamageInfo.hpp" #include "Kyoto/Particles/CElementGen.hpp" @@ -38,4 +39,4 @@ private: float x15c_; }; -#endif // __CFIRE_HPP__ +#endif // _CFIRE diff --git a/include/MetroidPrime/ScriptObjects/CScriptDebugCameraWaypoint.hpp b/include/MetroidPrime/ScriptObjects/CScriptDebugCameraWaypoint.hpp index 48a5fee5..dfb9c48f 100644 --- a/include/MetroidPrime/ScriptObjects/CScriptDebugCameraWaypoint.hpp +++ b/include/MetroidPrime/ScriptObjects/CScriptDebugCameraWaypoint.hpp @@ -1,5 +1,5 @@ -#ifndef _CSCRIPTDEBUGCAMERAWAYPOINT_HPP -#define _CSCRIPTDEBUGCAMERAWAYPOINT_HPP +#ifndef _CSCRIPTDEBUGCAMERAWAYPOINT +#define _CSCRIPTDEBUGCAMERAWAYPOINT #include "types.h" @@ -17,4 +17,4 @@ private: uint xe8_value; }; -#endif +#endif // _CSCRIPTDEBUGCAMERAWAYPOINT diff --git a/include/MetroidPrime/ScriptObjects/CScriptMazeNode.hpp b/include/MetroidPrime/ScriptObjects/CScriptMazeNode.hpp index 6bd47d72..b0d4b1bd 100644 --- a/include/MetroidPrime/ScriptObjects/CScriptMazeNode.hpp +++ b/include/MetroidPrime/ScriptObjects/CScriptMazeNode.hpp @@ -1,5 +1,5 @@ -#ifndef _CSCRIPTMAZENODE_HPP -#define _CSCRIPTMAZENODE_HPP +#ifndef _CSCRIPTMAZENODE +#define _CSCRIPTMAZENODE #include "types.h" @@ -118,4 +118,4 @@ private: static uint sMazeSeeds[300]; }; -#endif +#endif // _CSCRIPTMAZENODE diff --git a/include/MetroidPrime/ScriptObjects/CScriptPickup.hpp b/include/MetroidPrime/ScriptObjects/CScriptPickup.hpp index 0b982e75..795cb16f 100644 --- a/include/MetroidPrime/ScriptObjects/CScriptPickup.hpp +++ b/include/MetroidPrime/ScriptObjects/CScriptPickup.hpp @@ -1,5 +1,5 @@ -#ifndef _CSCRIPTPICKUP_HPP -#define _CSCRIPTPICKUP_HPP +#ifndef _CSCRIPTPICKUP +#define _CSCRIPTPICKUP #include "types.h" @@ -43,4 +43,4 @@ public: void SetSpawned(); }; -#endif // _CSCRIPTPICKUP_HPP +#endif // _CSCRIPTPICKUP diff --git a/include/MetroidPrime/ScriptObjects/CScriptPlatform.hpp b/include/MetroidPrime/ScriptObjects/CScriptPlatform.hpp index 0fa55901..140caf52 100644 --- a/include/MetroidPrime/ScriptObjects/CScriptPlatform.hpp +++ b/include/MetroidPrime/ScriptObjects/CScriptPlatform.hpp @@ -1,5 +1,5 @@ -#ifndef _CSCRIPTPLATFORM_HPP -#define _CSCRIPTPLATFORM_HPP +#ifndef _CSCRIPTPLATFORM +#define _CSCRIPTPLATFORM #include "types.h" @@ -112,4 +112,4 @@ private: }; CHECK_SIZEOF(CScriptPlatform, 0x358) -#endif +#endif // _CSCRIPTPLATFORM diff --git a/include/MetroidPrime/ScriptObjects/CScriptSpecialFunction.hpp b/include/MetroidPrime/ScriptObjects/CScriptSpecialFunction.hpp index 4ee73902..e816d3bf 100644 --- a/include/MetroidPrime/ScriptObjects/CScriptSpecialFunction.hpp +++ b/include/MetroidPrime/ScriptObjects/CScriptSpecialFunction.hpp @@ -1,5 +1,5 @@ -#ifndef _CSCRIPTSPECIALFUNCTION_HPP -#define _CSCRIPTSPECIALFUNCTION_HPP +#ifndef _CSCRIPTSPECIALFUNCTION +#define _CSCRIPTSPECIALFUNCTION #include "MetroidPrime/CActor.hpp" #include "MetroidPrime/CDamageInfo.hpp" @@ -116,6 +116,7 @@ private: bool x1e5_25_playerInArea : 1; bool x1e5_26_displayBillboard : 1; rstl::optional_object< CToken > x1e8_; + public: CScriptSpecialFunction(TUniqueId, const rstl::string&, const CEntityInfo&, const CTransform4f&, ESpecialFunction, const rstl::string&, float, float, float, float, @@ -151,4 +152,4 @@ public: void AddOrUpdateEmitter(float pitch, CSfxHandle& handle, u16 id, CVector3f pos, u8 vol); }; -#endif _CSCRIPTSPECIALFUNCTION_HPP +#endif // _CSCRIPTSPECIALFUNCTION diff --git a/include/MetroidPrime/ScriptObjects/CScriptSwitch.hpp b/include/MetroidPrime/ScriptObjects/CScriptSwitch.hpp index 68d33d24..b5d230a1 100644 --- a/include/MetroidPrime/ScriptObjects/CScriptSwitch.hpp +++ b/include/MetroidPrime/ScriptObjects/CScriptSwitch.hpp @@ -1,5 +1,7 @@ -#ifndef __CSCRIPTSWITCH_HPP__ -#define __CSCRIPTSWITCH_HPP__ +#ifndef _CSCRIPTSWITCH +#define _CSCRIPTSWITCH + +#include "types.h" #include "MetroidPrime/CEntity.hpp" @@ -16,4 +18,4 @@ private: u8 mCloseOnOpened; }; -#endif // __CSCRIPTSWITCH_HPP__ +#endif // _CSCRIPTSWITCH diff --git a/include/MetroidPrime/ScriptObjects/CScriptWaypoint.hpp b/include/MetroidPrime/ScriptObjects/CScriptWaypoint.hpp index ac5305cf..7b0329eb 100644 --- a/include/MetroidPrime/ScriptObjects/CScriptWaypoint.hpp +++ b/include/MetroidPrime/ScriptObjects/CScriptWaypoint.hpp @@ -1,5 +1,5 @@ -#ifndef _CSCRIPTWAYPOINT_HPP -#define _CSCRIPTWAYPOINT_HPP +#ifndef _CSCRIPTWAYPOINT +#define _CSCRIPTWAYPOINT #include "types.h" @@ -47,4 +47,4 @@ private: u16 xfa_behaviourModifiers; }; -#endif \ No newline at end of file +#endif // _CSCRIPTWAYPOINT diff --git a/include/MetroidPrime/TCastTo.hpp b/include/MetroidPrime/TCastTo.hpp index c1cb4e2e..fb8a85c1 100644 --- a/include/MetroidPrime/TCastTo.hpp +++ b/include/MetroidPrime/TCastTo.hpp @@ -1,5 +1,5 @@ -#ifndef _TCASTTO_HPP -#define _TCASTTO_HPP +#ifndef _TCASTTO +#define _TCASTTO #include "types.h" @@ -106,4 +106,4 @@ static inline const T* TCastToConstPtr(const CEntity& p) { return TCastToPtr< T >(const_cast< CEntity& >(p)); } -#endif +#endif // _TCASTTO diff --git a/include/MetroidPrime/TGameTypes.hpp b/include/MetroidPrime/TGameTypes.hpp index 675d73d2..2962826a 100644 --- a/include/MetroidPrime/TGameTypes.hpp +++ b/include/MetroidPrime/TGameTypes.hpp @@ -1,7 +1,8 @@ -#ifndef _TGAMETYPES_HPP -#define _TGAMETYPES_HPP +#ifndef _TGAMETYPES +#define _TGAMETYPES #include "types.h" + class CInputStream; class COutputStream; @@ -73,4 +74,4 @@ private: #define ALIGN_UP(x, a) (((x) + (a - 1)) & ~(a - 1)) -#endif +#endif // _TGAMETYPES diff --git a/include/MetroidPrime/Tweaks/CTweakBall.hpp b/include/MetroidPrime/Tweaks/CTweakBall.hpp index 34881553..07299174 100644 --- a/include/MetroidPrime/Tweaks/CTweakBall.hpp +++ b/include/MetroidPrime/Tweaks/CTweakBall.hpp @@ -1,5 +1,5 @@ -#ifndef _CTWEAKBALL_HPP -#define _CTWEAKBALL_HPP +#ifndef _CTWEAKBALL +#define _CTWEAKBALL #include "types.h" @@ -213,4 +213,4 @@ private: extern CTweakBall* gpTweakBall; -#endif +#endif // _CTWEAKBALL diff --git a/include/MetroidPrime/Tweaks/CTweakGame.hpp b/include/MetroidPrime/Tweaks/CTweakGame.hpp index cdddf933..b27a037c 100644 --- a/include/MetroidPrime/Tweaks/CTweakGame.hpp +++ b/include/MetroidPrime/Tweaks/CTweakGame.hpp @@ -1,5 +1,5 @@ -#ifndef _CTWEAKGAME_HPP -#define _CTWEAKGAME_HPP +#ifndef _CTWEAKGAME +#define _CTWEAKGAME #include "types.h" @@ -57,4 +57,4 @@ private: extern CTweakGame* gpTweakGame; -#endif +#endif // _CTWEAKGAME diff --git a/include/MetroidPrime/Tweaks/CTweakGunRes.hpp b/include/MetroidPrime/Tweaks/CTweakGunRes.hpp index e17c2f9d..185da4fe 100644 --- a/include/MetroidPrime/Tweaks/CTweakGunRes.hpp +++ b/include/MetroidPrime/Tweaks/CTweakGunRes.hpp @@ -1,5 +1,7 @@ -#ifndef _CTWEAKGUNRES_HPP -#define _CTWEAKGUNRES_HPP +#ifndef _CTWEAKGUNRES +#define _CTWEAKGUNRES + +#include "types.h" #include "MetroidPrime/Tweaks/ITweakObject.hpp" @@ -45,4 +47,4 @@ public: extern CTweakGunRes* gpTweakGunRes; -#endif // _CTWEAKGUNRES_HPP +#endif // _CTWEAKGUNRES diff --git a/include/MetroidPrime/Tweaks/CTweakPlayer.hpp b/include/MetroidPrime/Tweaks/CTweakPlayer.hpp index 7350996c..d3be2635 100644 --- a/include/MetroidPrime/Tweaks/CTweakPlayer.hpp +++ b/include/MetroidPrime/Tweaks/CTweakPlayer.hpp @@ -1,5 +1,5 @@ -#ifndef _CTWEAKPLAYER_HPP -#define _CTWEAKPLAYER_HPP +#ifndef _CTWEAKPLAYER +#define _CTWEAKPLAYER #include "types.h" @@ -319,4 +319,4 @@ private: extern CTweakPlayer* gpTweakPlayer; -#endif +#endif // _CTWEAKPLAYER diff --git a/include/MetroidPrime/Tweaks/CTweakPlayerGun.hpp b/include/MetroidPrime/Tweaks/CTweakPlayerGun.hpp index f6fac3ea..91285da6 100644 --- a/include/MetroidPrime/Tweaks/CTweakPlayerGun.hpp +++ b/include/MetroidPrime/Tweaks/CTweakPlayerGun.hpp @@ -1,5 +1,7 @@ -#ifndef _CTWEAKPLAYERGUN_HPP_ -#define _CTWEAKPLAYERGUN_HPP_ +#ifndef _CTWEAKPLAYERGUN +#define _CTWEAKPLAYERGUN + +#include "types.h" #include "MetroidPrime/Tweaks/ITweakObject.hpp" @@ -17,7 +19,7 @@ struct SShotParam { float x10_radius; float x14_knockback; bool x18_24_noImmunity : 1; - + SShotParam() : x0_weaponType(-1) , x4_24_charged(false) @@ -27,8 +29,7 @@ struct SShotParam { , xc_radiusDamage(0.f) , x10_radius(0.f) , x14_knockback(0.f) - , x18_24_noImmunity(false) - {} + , x18_24_noImmunity(false) {} explicit SShotParam(CInputStream& in); }; @@ -47,12 +48,10 @@ struct SWeaponInfo { SShotParam x4_normal; SChargedShotParam x20_charged; - SWeaponInfo() - : x0_coolDown(0.1f) {} + SWeaponInfo() : x0_coolDown(0.1f) {} explicit SWeaponInfo(CInputStream& in); }; - class CTweakPlayerGun : public ITweakObject { public: ~CTweakPlayerGun() override; @@ -104,10 +103,11 @@ private: SShotParam x8c_powerBomb; SShotParam x1d4_missile; SWeaponInfo xa8_beams[5]; - rstl::reserved_vector x1f0_combos; // Originally rstl::reserved_vector - rstl::reserved_vector x280_ricochetData; + rstl::reserved_vector< SShotParam, 5 > + x1f0_combos; // Originally rstl::reserved_vector + rstl::reserved_vector< float, 5 > x280_ricochetData; }; extern CTweakPlayerGun* gpTweakPlayerGun; -#endif // _CTWEAKPLAYERGUN_HPP_ +#endif // _CTWEAKPLAYERGUN diff --git a/include/MetroidPrime/Tweaks/CTweaks.hpp b/include/MetroidPrime/Tweaks/CTweaks.hpp index 3403a7e0..49fcfc62 100644 --- a/include/MetroidPrime/Tweaks/CTweaks.hpp +++ b/include/MetroidPrime/Tweaks/CTweaks.hpp @@ -1,5 +1,5 @@ -#ifndef _CTWEAKS_HPP -#define _CTWEAKS_HPP +#ifndef _CTWEAKS +#define _CTWEAKS #include "types.h" @@ -21,4 +21,4 @@ private: }; CHECK_SIZEOF(CTweaks, 0x64) -#endif +#endif // _CTWEAKS diff --git a/include/MetroidPrime/Tweaks/ITweakObject.hpp b/include/MetroidPrime/Tweaks/ITweakObject.hpp index 28fb503a..ffc8ae3b 100644 --- a/include/MetroidPrime/Tweaks/ITweakObject.hpp +++ b/include/MetroidPrime/Tweaks/ITweakObject.hpp @@ -1,5 +1,5 @@ -#ifndef _ITWEAKOBJECT_HPP -#define _ITWEAKOBJECT_HPP +#ifndef _ITWEAKOBJECT +#define _ITWEAKOBJECT #include "types.h" @@ -8,4 +8,4 @@ public: virtual ~ITweakObject() = 0; }; -#endif +#endif // _ITWEAKOBJECT diff --git a/include/MetroidPrime/UserNames.hpp b/include/MetroidPrime/UserNames.hpp index 4e50f1c2..4a61a5b2 100644 --- a/include/MetroidPrime/UserNames.hpp +++ b/include/MetroidPrime/UserNames.hpp @@ -1,8 +1,8 @@ -#ifndef __USERNAMES_HPP_ -#define __USERNAMES_HPP_ +#ifndef _USERNAMES +#define _USERNAMES #include "types.h" bool IsUser(int name); -#endif // __USERNAMES_HPP_ +#endif // _USERNAMES diff --git a/include/MetroidPrime/Weapons/CAuxWeapon.hpp b/include/MetroidPrime/Weapons/CAuxWeapon.hpp index 5b447945..aadf3391 100644 --- a/include/MetroidPrime/Weapons/CAuxWeapon.hpp +++ b/include/MetroidPrime/Weapons/CAuxWeapon.hpp @@ -1,5 +1,7 @@ -#ifndef _CAUXWEAPON_HPP -#define _CAUXWEAPON_HPP +#ifndef _CAUXWEAPON +#define _CAUXWEAPON + +#include "types.h" #include "MetroidPrime/TGameTypes.hpp" @@ -14,4 +16,4 @@ private: }; CHECK_SIZEOF(CAuxWeapon, 0x84) -#endif // _CAUXWEAPON_HPP +#endif // _CAUXWEAPON diff --git a/include/MetroidPrime/Weapons/CEnergyProjectile.hpp b/include/MetroidPrime/Weapons/CEnergyProjectile.hpp index 28ab63b2..2dc2c258 100644 --- a/include/MetroidPrime/Weapons/CEnergyProjectile.hpp +++ b/include/MetroidPrime/Weapons/CEnergyProjectile.hpp @@ -1,5 +1,5 @@ -#ifndef _CENERGYPROJECTILE_HPP -#define _CENERGYPROJECTILE_HPP +#ifndef _CENERGYPROJECTILE +#define _CENERGYPROJECTILE #include "types.h" @@ -48,4 +48,4 @@ private: }; CHECK_SIZEOF(CEnergyProjectile, 0x3d8); -#endif +#endif // _CENERGYPROJECTILE diff --git a/include/MetroidPrime/Weapons/CGameProjectile.hpp b/include/MetroidPrime/Weapons/CGameProjectile.hpp index 8a1b0d84..bf1a5a7f 100644 --- a/include/MetroidPrime/Weapons/CGameProjectile.hpp +++ b/include/MetroidPrime/Weapons/CGameProjectile.hpp @@ -1,5 +1,5 @@ -#ifndef _CGAMEPROJECTILE_HPP -#define _CGAMEPROJECTILE_HPP +#ifndef _CGAMEPROJECTILE +#define _CGAMEPROJECTILE #include "types.h" @@ -59,4 +59,4 @@ private: }; CHECK_SIZEOF(CGameProjectile, 0x2e8) -#endif +#endif // _CGAMEPROJECTILE diff --git a/include/MetroidPrime/Weapons/CGunWeapon.hpp b/include/MetroidPrime/Weapons/CGunWeapon.hpp index 83a25d2c..17bbc2c0 100644 --- a/include/MetroidPrime/Weapons/CGunWeapon.hpp +++ b/include/MetroidPrime/Weapons/CGunWeapon.hpp @@ -1,6 +1,6 @@ // #pragma once -#ifndef _CGUNWEAPON_HPP_ -#define _CGUNWEAPON_HPP_ +#ifndef _CGUNWEAPON +#define _CGUNWEAPON #include "types.h" @@ -65,13 +65,15 @@ public: virtual void PlayAnim(NWeaponTypes::EGunAnimType type, bool loop); virtual void PreRenderGunFx(const CStateManager& mgr, const CTransform4f& xf); virtual void PostRenderGunFx(const CStateManager& mgr, const CTransform4f& xf); - virtual void UpdateGunFx(bool shotSmoke, float dt, const CStateManager& mgr, const CTransform4f& xf); - virtual void Fire(bool underwater, float dt, CPlayerState::EChargeStage chargeState, const CTransform4f& xf, CStateManager& mgr, - TUniqueId homingTarget, float chargeFactor1, float chargeFactor2); + virtual void UpdateGunFx(bool shotSmoke, float dt, const CStateManager& mgr, + const CTransform4f& xf); + virtual void Fire(bool underwater, float dt, CPlayerState::EChargeStage chargeState, + const CTransform4f& xf, CStateManager& mgr, TUniqueId homingTarget, + float chargeFactor1, float chargeFactor2); virtual void EnableFx(bool enable); virtual void EnableSecondaryFx(ESecondaryFxType type); - virtual void Draw(bool drawSuitArm, const CStateManager& mgr, const CTransform4f& xf, const CModelFlags& flags, - const CActorLights* lights); + virtual void Draw(bool drawSuitArm, const CStateManager& mgr, const CTransform4f& xf, + const CModelFlags& flags, const CActorLights* lights); virtual void DrawMuzzleFx(const CStateManager& mgr) const; virtual void Update(float dt, CStateManager& mgr); virtual void Load(CStateManager& mgr, bool subtypeBasePose); @@ -130,4 +132,4 @@ private: }; CHECK_SIZEOF(CGunWeapon, 0x21c) -#endif +#endif // _CGUNWEAPON diff --git a/include/MetroidPrime/Weapons/CIceBeam.hpp b/include/MetroidPrime/Weapons/CIceBeam.hpp index 6bfef51a..bb7a2313 100644 --- a/include/MetroidPrime/Weapons/CIceBeam.hpp +++ b/include/MetroidPrime/Weapons/CIceBeam.hpp @@ -1,16 +1,19 @@ -#ifndef _CICEBEAM_HPP -#define _CICEBEAM_HPP +#ifndef _CICEBEAM +#define _CICEBEAM + +#include "types.h" #include "MetroidPrime/Weapons/CGunWeapon.hpp" class CIceBeam : public CGunWeapon { public: CIceBeam(CAssetId characterId, EWeaponType type, TUniqueId playerId, - EMaterialTypes playerMaterial, const CVector3f& scale); + EMaterialTypes playerMaterial, const CVector3f& scale); ~CIceBeam(); + private: u8 x21c_pad[0x30]; }; CHECK_SIZEOF(CIceBeam, 0x24c) -#endif // _CICEBEAM_HPP +#endif // _CICEBEAM diff --git a/include/MetroidPrime/Weapons/CPhazonBeam.hpp b/include/MetroidPrime/Weapons/CPhazonBeam.hpp index a124fbf3..24da9c29 100644 --- a/include/MetroidPrime/Weapons/CPhazonBeam.hpp +++ b/include/MetroidPrime/Weapons/CPhazonBeam.hpp @@ -1,16 +1,19 @@ -#ifndef _CPHAZONBEAM_HPP -#define _CPHAZONBEAM_HPP +#ifndef _CPHAZONBEAM +#define _CPHAZONBEAM + +#include "types.h" #include "MetroidPrime/Weapons/CGunWeapon.hpp" class CPhazonBeam : public CGunWeapon { public: CPhazonBeam(CAssetId characterId, EWeaponType type, TUniqueId playerId, - EMaterialTypes playerMaterial, const CVector3f& scale); + EMaterialTypes playerMaterial, const CVector3f& scale); ~CPhazonBeam(); + private: u8 x21c_pad[0x60]; }; CHECK_SIZEOF(CPhazonBeam, 0x27c) -#endif // _CPHAZONBEAM_HPP +#endif // _CPHAZONBEAM diff --git a/include/MetroidPrime/Weapons/CPlasmaBeam.hpp b/include/MetroidPrime/Weapons/CPlasmaBeam.hpp index 00e692ce..d201a91d 100644 --- a/include/MetroidPrime/Weapons/CPlasmaBeam.hpp +++ b/include/MetroidPrime/Weapons/CPlasmaBeam.hpp @@ -1,16 +1,19 @@ -#ifndef _CPLASMABEAM_HPP -#define _CPLASMABEAM_HPP +#ifndef _CPLASMABEAM +#define _CPLASMABEAM + +#include "types.h" #include "MetroidPrime/Weapons/CGunWeapon.hpp" class CPlasmaBeam : public CGunWeapon { public: CPlasmaBeam(CAssetId characterId, EWeaponType type, TUniqueId playerId, - EMaterialTypes playerMaterial, const CVector3f& scale); + EMaterialTypes playerMaterial, const CVector3f& scale); ~CPlasmaBeam(); + private: u8 x21c_pad[0x24]; }; CHECK_SIZEOF(CPlasmaBeam, 0x240) -#endif // _CPLASMABEAM_HPP +#endif // _CPLASMABEAM diff --git a/include/MetroidPrime/Weapons/CPowerBeam.hpp b/include/MetroidPrime/Weapons/CPowerBeam.hpp index 2ba92856..cb628501 100644 --- a/include/MetroidPrime/Weapons/CPowerBeam.hpp +++ b/include/MetroidPrime/Weapons/CPowerBeam.hpp @@ -1,5 +1,7 @@ -#ifndef _CPOWERBEAM_HPP -#define _CPOWERBEAM_HPP +#ifndef _CPOWERBEAM +#define _CPOWERBEAM + +#include "types.h" #include "MetroidPrime/Weapons/CGunWeapon.hpp" @@ -14,4 +16,4 @@ private: }; CHECK_SIZEOF(CPowerBeam, 0x248) -#endif // _CPOWERBEAM_HPP +#endif // _CPOWERBEAM diff --git a/include/MetroidPrime/Weapons/CPowerBomb.hpp b/include/MetroidPrime/Weapons/CPowerBomb.hpp index 473dbe2e..c36732d6 100644 --- a/include/MetroidPrime/Weapons/CPowerBomb.hpp +++ b/include/MetroidPrime/Weapons/CPowerBomb.hpp @@ -1,5 +1,7 @@ -#ifndef _CPOWERBOMB_HPP_ -#define _CPOWERBOMB_HPP_ +#ifndef _CPOWERBOMB +#define _CPOWERBOMB + +#include "types.h" #include "MetroidPrime/Weapons/CWeapon.hpp" @@ -11,11 +13,11 @@ class CPowerBomb : public CWeapon { float x15c_curTime; float x160_curRadius; float x164_radiusIncrement; - rstl::single_ptr x168_particle; + rstl::single_ptr< CElementGen > x168_particle; float x16c_radius; public: float GetCurTime() const { return x15c_curTime; } }; -#endif // _CPOWERBOMB_HPP_ +#endif // _CPOWERBOMB diff --git a/include/MetroidPrime/Weapons/CProjectileWeapon.hpp b/include/MetroidPrime/Weapons/CProjectileWeapon.hpp index a2fc7043..6105ca4a 100644 --- a/include/MetroidPrime/Weapons/CProjectileWeapon.hpp +++ b/include/MetroidPrime/Weapons/CProjectileWeapon.hpp @@ -1,5 +1,5 @@ -#ifndef _CPROJECTILEWEAPON_HPP -#define _CPROJECTILEWEAPON_HPP +#ifndef _CPROJECTILEWEAPON +#define _CPROJECTILEWEAPON #include "types.h" @@ -68,4 +68,4 @@ private: }; CHECK_SIZEOF(CProjectileWeapon, 0x128) -#endif +#endif // _CPROJECTILEWEAPON diff --git a/include/MetroidPrime/Weapons/CWaveBeam.hpp b/include/MetroidPrime/Weapons/CWaveBeam.hpp index 090d2838..b4e88342 100644 --- a/include/MetroidPrime/Weapons/CWaveBeam.hpp +++ b/include/MetroidPrime/Weapons/CWaveBeam.hpp @@ -1,16 +1,19 @@ -#ifndef _CWAVEBEAM_HPP -#define _CWAVEBEAM_HPP +#ifndef _CWAVEBEAM +#define _CWAVEBEAM + +#include "types.h" #include "MetroidPrime/Weapons/CGunWeapon.hpp" class CWaveBeam : public CGunWeapon { public: CWaveBeam(CAssetId characterId, EWeaponType type, TUniqueId playerId, - EMaterialTypes playerMaterial, const CVector3f& scale); + EMaterialTypes playerMaterial, const CVector3f& scale); ~CWaveBeam(); + private: u8 x21c_pad[0x40]; }; CHECK_SIZEOF(CWaveBeam, 0x25c) -#endif // _CWAVEBEAM_HPP +#endif // _CWAVEBEAM diff --git a/include/MetroidPrime/Weapons/CWeapon.hpp b/include/MetroidPrime/Weapons/CWeapon.hpp index 06f0a626..80ae7878 100644 --- a/include/MetroidPrime/Weapons/CWeapon.hpp +++ b/include/MetroidPrime/Weapons/CWeapon.hpp @@ -1,5 +1,5 @@ -#ifndef _CWEAPON_HPP -#define _CWEAPON_HPP +#ifndef _CWEAPON +#define _CWEAPON #include "types.h" @@ -36,4 +36,4 @@ private: }; CHECK_SIZEOF(CWeapon, 0x158) -#endif +#endif // _CWEAPON diff --git a/include/MetroidPrime/Weapons/GunController/CGSFreeLook.hpp b/include/MetroidPrime/Weapons/GunController/CGSFreeLook.hpp index 235249a4..d772d808 100644 --- a/include/MetroidPrime/Weapons/GunController/CGSFreeLook.hpp +++ b/include/MetroidPrime/Weapons/GunController/CGSFreeLook.hpp @@ -1,5 +1,5 @@ -#ifndef _CGSFREELOOK_HPP -#define _CGSFREELOOK_HPP +#ifndef _CGSFREELOOK +#define _CGSFREELOOK #include "types.h" @@ -23,8 +23,9 @@ public: void SetIdle(bool l) { x14_idle = l; } int GetGunId() const { return xc_gunId; } bool Update(CAnimData& data, float dt, CStateManager& mgr); - int SetAnim(CAnimData& data, int gunId, int setId, int loopState, CStateManager& mgr, float delay); + int SetAnim(CAnimData& data, int gunId, int setId, int loopState, CStateManager& mgr, + float delay); }; CHECK_SIZEOF(CGSFreeLook, 0x18) -#endif // _CGSFREELOOK_HPP +#endif // _CGSFREELOOK diff --git a/include/MetroidPrime/Weapons/GunController/CGunController.hpp b/include/MetroidPrime/Weapons/GunController/CGunController.hpp index 13b07dc3..fcda9356 100644 --- a/include/MetroidPrime/Weapons/GunController/CGunController.hpp +++ b/include/MetroidPrime/Weapons/GunController/CGunController.hpp @@ -1,5 +1,5 @@ -#ifndef _CGUNCONTROLLER_HPP -#define _CGUNCONTROLLER_HPP +#ifndef _CGUNCONTROLLER +#define _CGUNCONTROLLER #include "types.h" @@ -34,7 +34,7 @@ class CGunController { public: explicit CGunController(CModelData& modelData); ~CGunController(); - + void EnterFreeLook(CStateManager&, int, int); void EnterComboFire(CStateManager&, int); void EnterFidget(CStateManager&, int, int, int); @@ -47,8 +47,7 @@ public: void ReturnToBasePosition(CStateManager&); int GetFreeLookSetId() const { return x4_freeLook.GetSetId(); } - }; CHECK_SIZEOF(CGunController, 0x5C) -#endif // _CGUNCONTROLLER_HPP +#endif // _CGUNCONTROLLER diff --git a/include/MetroidPrime/Weapons/GunController/CGunMotion.hpp b/include/MetroidPrime/Weapons/GunController/CGunMotion.hpp index d11c225a..a6f91bb2 100644 --- a/include/MetroidPrime/Weapons/GunController/CGunMotion.hpp +++ b/include/MetroidPrime/Weapons/GunController/CGunMotion.hpp @@ -1,11 +1,13 @@ -#ifndef _CGUNMOTION_HPP -#define _CGUNMOTION_HPP +#ifndef _CGUNMOTION +#define _CGUNMOTION + +#include "types.h" #include "MetroidPrime/CModelData.hpp" #include "MetroidPrime/Weapons/GunController/CGunController.hpp" -#include "Kyoto/CToken.hpp" #include "Kyoto/CObjectReference.hpp" +#include "Kyoto/CToken.hpp" #include "rstl/vector.hpp" @@ -34,7 +36,8 @@ public: CGunMotion(CAssetId ancsId, const CVector3f& scale); ~CGunMotion(); - bool PlayPasAnim(SamusGun::EAnimationState state, CStateManager& mgr, float angle, bool bigStrike); + bool PlayPasAnim(SamusGun::EAnimationState state, CStateManager& mgr, float angle, + bool bigStrike); void Update(float, CStateManager&); void Draw(const CStateManager&, const CTransform4f&) const; void ReturnToDefault(CStateManager& mgr); @@ -50,9 +53,9 @@ public: private: CModelData x0_modelData; CGunController x4c_gunController; - rstl::vector xa8_anims; + rstl::vector< CToken > xa8_anims; bool xb8_24_animPlaying : 1; }; CHECK_SIZEOF(CGunMotion, 0xbc) -#endif // _CGUNMOTION_HPP +#endif // _CGUNMOTION diff --git a/include/MetroidPrime/Weapons/WeaponCommon.hpp b/include/MetroidPrime/Weapons/WeaponCommon.hpp index 7acff768..7b6790f2 100644 --- a/include/MetroidPrime/Weapons/WeaponCommon.hpp +++ b/include/MetroidPrime/Weapons/WeaponCommon.hpp @@ -1,3 +1,5 @@ +#ifndef _WEAPONCOMMON +#define _WEAPONCOMMON #ifndef _WEAPONCOMMON_HPP #define _WEAPONCOMMON_HPP @@ -23,8 +25,11 @@ enum EGunAnimType { }; CSfxHandle play_sfx(u16 sfx, bool underwater, bool looped, short pan); -void get_token_vector(const CAnimData& animData, int begin, int end, rstl::vector& tokensOut, bool preLock); +void get_token_vector(const CAnimData& animData, int begin, int end, + rstl::vector< CToken >& tokensOut, bool preLock); -} +} // namespace NWeaponTypes #endif _WEAPONCOMMON_HPP + +#endif // _WEAPONCOMMON diff --git a/include/MetroidPrime/Weapons/WeaponTypes.hpp b/include/MetroidPrime/Weapons/WeaponTypes.hpp index baaccfe3..67ddc76d 100644 --- a/include/MetroidPrime/Weapons/WeaponTypes.hpp +++ b/include/MetroidPrime/Weapons/WeaponTypes.hpp @@ -1,5 +1,5 @@ -#ifndef _WEAPONTYPES_HPP -#define _WEAPONTYPES_HPP +#ifndef _WEAPONTYPES +#define _WEAPONTYPES enum EWeaponType { kWT_None = -1, @@ -52,4 +52,4 @@ public: static CWeaponMode PowerBomb() { return CWeaponMode(kWT_PowerBomb); } }; -#endif +#endif // _WEAPONTYPES diff --git a/include/Weapons/CDecal.hpp b/include/Weapons/CDecal.hpp index 95ada9d9..5f8b44df 100644 --- a/include/Weapons/CDecal.hpp +++ b/include/Weapons/CDecal.hpp @@ -1,5 +1,5 @@ -#ifndef __CDECAL_HPP__ -#define __CDECAL_HPP__ +#ifndef _CDECAL +#define _CDECAL #include "Kyoto/CRandom16.hpp" #include "Kyoto/Math/CTransform4f.hpp" @@ -28,6 +28,7 @@ public: inline float GetRotation() const { return x8_rotation; } inline void SetRotation(float rotation) { x8_rotation = rotation; } + private: bool x0_24_invalid : 1; int x4_lifetime; @@ -43,13 +44,13 @@ public: void Update(float dt); private: - TLockedToken x0_description; - CTransform4f xc_transform; - CQuadDecal x3c_quad1; - CQuadDecal x48_quad2; - int x54_modelLifetime; - int x58_frameIdx; - int x5c_flags; - CVector3f x60_rotation; + TLockedToken< CDecalDescription > x0_description; + CTransform4f xc_transform; + CQuadDecal x3c_quad1; + CQuadDecal x48_quad2; + int x54_modelLifetime; + int x58_frameIdx; + int x5c_flags; + CVector3f x60_rotation; }; -#endif // __CDECAL_HPP__ +#endif // _CDECAL diff --git a/include/Weapons/CDecalDescription.hpp b/include/Weapons/CDecalDescription.hpp index d1758083..6395ba85 100644 --- a/include/Weapons/CDecalDescription.hpp +++ b/include/Weapons/CDecalDescription.hpp @@ -1,13 +1,11 @@ -#ifndef __CDECALDESCRIPTION_HPP__ -#define __CDECALDESCRIPTION_HPP__ - +#ifndef _CDECALDESCRIPTION +#define _CDECALDESCRIPTION class CDecalDescription { public: - struct SQuadDescr { - }; + struct SQuadDescr {}; private: }; -#endif //__CDECALDESCRIPTION_HPP__ +#endif // _CDECALDESCRIPTION diff --git a/include/Weapons/IWeaponRenderer.hpp b/include/Weapons/IWeaponRenderer.hpp index 8f4de800..238be3b8 100644 --- a/include/Weapons/IWeaponRenderer.hpp +++ b/include/Weapons/IWeaponRenderer.hpp @@ -1,5 +1,5 @@ -#ifndef __IWEAPONRENDERER_HPP__ -#define __IWEAPONRENDERER_HPP__ +#ifndef _IWEAPONRENDERER +#define _IWEAPONRENDERER #include "Kyoto/Alloc/CMemory.hpp" #include "Kyoto/Particles/CParticleGen.hpp" @@ -22,4 +22,4 @@ public: void AddParticleGen(const CParticleGen& gen) { gen.Render(); } }; -#endif //__IWEAPONRENDERER_HPP__ +#endif // _IWEAPONRENDERER diff --git a/include/WorldFormat/CAreaOctTree.hpp b/include/WorldFormat/CAreaOctTree.hpp index 2741e9f6..0b1f6e28 100644 --- a/include/WorldFormat/CAreaOctTree.hpp +++ b/include/WorldFormat/CAreaOctTree.hpp @@ -1,5 +1,5 @@ -#ifndef _CAREAOCTTREE_HPP -#define _CAREAOCTTREE_HPP +#ifndef _CAREAOCTTREE +#define _CAREAOCTTREE #include "types.h" @@ -90,4 +90,4 @@ private: }; CHECK_SIZEOF(CAreaOctTree, 0x50) -#endif +#endif // _CAREAOCTTREE diff --git a/include/WorldFormat/CCollidableOBBTreeGroup.hpp b/include/WorldFormat/CCollidableOBBTreeGroup.hpp index 81319398..2b664be9 100644 --- a/include/WorldFormat/CCollidableOBBTreeGroup.hpp +++ b/include/WorldFormat/CCollidableOBBTreeGroup.hpp @@ -1,5 +1,5 @@ -#ifndef _CCOLLIDABLEOBBTREEGROUP_HPP -#define _CCOLLIDABLEOBBTREEGROUP_HPP +#ifndef _CCOLLIDABLEOBBTREEGROUP +#define _CCOLLIDABLEOBBTREEGROUP #include "types.h" @@ -37,4 +37,4 @@ private: CCollidableOBBTreeGroupContainer* x10_container; }; -#endif +#endif // _CCOLLIDABLEOBBTREEGROUP diff --git a/include/WorldFormat/CCollisionSurface.hpp b/include/WorldFormat/CCollisionSurface.hpp index fb995810..97a62fc1 100644 --- a/include/WorldFormat/CCollisionSurface.hpp +++ b/include/WorldFormat/CCollisionSurface.hpp @@ -1,5 +1,5 @@ -#ifndef _CCOLLISIONSURFACE_HPP -#define _CCOLLISIONSURFACE_HPP +#ifndef _CCOLLISIONSURFACE +#define _CCOLLISIONSURFACE #include "types.h" @@ -17,4 +17,4 @@ private: }; CHECK_SIZEOF(CCollisionSurface, 0x28) -#endif +#endif // _CCOLLISIONSURFACE diff --git a/include/WorldFormat/CMetroidAreaCollider.hpp b/include/WorldFormat/CMetroidAreaCollider.hpp index 28938120..a1abf28c 100644 --- a/include/WorldFormat/CMetroidAreaCollider.hpp +++ b/include/WorldFormat/CMetroidAreaCollider.hpp @@ -1,5 +1,5 @@ -#ifndef _CMETROIDAREACOLLIDER_HPP -#define _CMETROIDAREACOLLIDER_HPP +#ifndef _CMETROIDAREACOLLIDER +#define _CMETROIDAREACOLLIDER #include "types.h" @@ -65,4 +65,4 @@ private: }; CHECK_SIZEOF(CAreaCollisionCache, 0x1b44) -#endif +#endif // _CMETROIDAREACOLLIDER diff --git a/include/dolphin/CARDPriv.h b/include/dolphin/CARDPriv.h index f5f7371a..ca28f6e1 100644 --- a/include/dolphin/CARDPriv.h +++ b/include/dolphin/CARDPriv.h @@ -1,5 +1,5 @@ -#ifndef __CARDPRIV_H__ -#define __CARDPRIV_H__ +#ifndef _DOLPHIN_CARDPRIV +#define _DOLPHIN_CARDPRIV #ifdef __cplusplus extern "C" { @@ -129,4 +129,4 @@ extern u16 __CARDVendorID; #ifdef __cplusplus } #endif -#endif +#endif // _DOLPHIN_CARDPRIV diff --git a/include/dolphin/DVDPriv.h b/include/dolphin/DVDPriv.h index 36a47fcc..faedf4de 100644 --- a/include/dolphin/DVDPriv.h +++ b/include/dolphin/DVDPriv.h @@ -1,5 +1,5 @@ -#ifndef __DVDPRIV_H__ -#define __DVDPRIV_H__ +#ifndef _DOLPHIN_DVDPRIV +#define _DOLPHIN_DVDPRIV #include #include @@ -41,6 +41,6 @@ DVDLowCallback DVDLowClearCallback(); #ifdef __cplusplus } -#endif +#endif // _DOLPHIN_DVDPRIV #endif __DVDPRIV_H__ diff --git a/include/dolphin/OSRtcPriv.h b/include/dolphin/OSRtcPriv.h index e07e98e4..d5e1e0c5 100644 --- a/include/dolphin/OSRtcPriv.h +++ b/include/dolphin/OSRtcPriv.h @@ -1,5 +1,5 @@ -#ifndef __OSRTCPRIV_H__ -#define __OSRTCPRIV_H__ +#ifndef _DOLPHIN_OSRTCPRIV +#define _DOLPHIN_OSRTCPRIV #include @@ -29,4 +29,5 @@ typedef struct OSSramEx { OSSram* __OSLockSram(); OSSramEx* __OSLockSramEx(); -#endif + +#endif // _DOLPHIN_OSRTCPRIV diff --git a/include/dolphin/PPCArch.h b/include/dolphin/PPCArch.h index 89412045..4b123954 100644 --- a/include/dolphin/PPCArch.h +++ b/include/dolphin/PPCArch.h @@ -1,5 +1,5 @@ -#ifndef _DOLPHIN_PPCARCH_H -#define _DOLPHIN_PPCARCH_H +#ifndef _DOLPHIN_PPCARCH +#define _DOLPHIN_PPCARCH #include "types.h" @@ -32,4 +32,4 @@ void PPCSetFpNonIEEEMode(); } #endif -#endif +#endif // _DOLPHIN_PPCARCH diff --git a/include/dolphin/__ppc_eabi_init.h b/include/dolphin/__ppc_eabi_init.h index 9664f9d4..5dcba28d 100644 --- a/include/dolphin/__ppc_eabi_init.h +++ b/include/dolphin/__ppc_eabi_init.h @@ -1,3 +1,6 @@ +#ifndef _DOLPHIN__PPC_EABI_INIT +#define _DOLPHIN__PPC_EABI_INIT + #include "types.h" #ifdef __cplusplus @@ -12,3 +15,5 @@ void __init_cpp(void); #ifdef __cplusplus } #endif + +#endif // _DOLPHIN__PPC_EABI_INIT diff --git a/include/dolphin/__start.h b/include/dolphin/__start.h index 58cde530..9c3d9050 100644 --- a/include/dolphin/__start.h +++ b/include/dolphin/__start.h @@ -1,3 +1,6 @@ +#ifndef _DOLPHIN__START +#define _DOLPHIN__START + #include "dolphin/db.h" #include "types.h" @@ -52,3 +55,5 @@ typedef struct __bss_init_info { } __bss_init_info; __declspec(section ".init") extern __bss_init_info _bss_init_info[]; + +#endif // _DOLPHIN__START diff --git a/include/dolphin/ai.h b/include/dolphin/ai.h index cf0ab3b9..f226c700 100644 --- a/include/dolphin/ai.h +++ b/include/dolphin/ai.h @@ -1,5 +1,5 @@ -#ifndef __AI_H__ -#define __AI_H__ +#ifndef _DOLPHIN_AI +#define _DOLPHIN_AI #include "types.h" @@ -33,4 +33,4 @@ void AIInit(u8* stack); BOOL AICheckInit(); void AIReset(); -#endif // __AI_H__ +#endif // _DOLPHIN_AI diff --git a/include/dolphin/ar.h b/include/dolphin/ar.h index 198fd238..e31bdb6c 100644 --- a/include/dolphin/ar.h +++ b/include/dolphin/ar.h @@ -1,5 +1,5 @@ -#ifndef __AR_H__ -#define __AR_H__ +#ifndef _DOLPHIN_AR +#define _DOLPHIN_AR #include "types.h" @@ -14,4 +14,4 @@ u32 ARAlloc(u32 length); } #endif -#endif // __AR_H__ +#endif // _DOLPHIN_AR diff --git a/include/dolphin/arq.h b/include/dolphin/arq.h index 815ea33d..6fb79e6e 100644 --- a/include/dolphin/arq.h +++ b/include/dolphin/arq.h @@ -1,5 +1,5 @@ -#ifndef __ARQ_H__ -#define __ARQ_H__ +#ifndef _DOLPHIN_ARQ +#define _DOLPHIN_ARQ #include "types.h" @@ -15,4 +15,4 @@ void ARQInit(void); } #endif -#endif // __ARQ_H__ +#endif // _DOLPHIN_ARQ diff --git a/include/dolphin/card.h b/include/dolphin/card.h index bd402df9..7d0602d0 100644 --- a/include/dolphin/card.h +++ b/include/dolphin/card.h @@ -1,5 +1,5 @@ -#ifndef __CARD_H__ -#define __CARD_H__ +#ifndef _DOLPHIN_CARD +#define _DOLPHIN_CARD #include "types.h" @@ -173,4 +173,4 @@ s32 CARDWriteAsync(CARDFileInfo* fileInfo, const void* addr, s32 length, s32 off #ifdef __cplusplus } #endif -#endif // __CARD_H__ +#endif // _DOLPHIN_CARD diff --git a/include/dolphin/db.h b/include/dolphin/db.h index 1ce6ddcb..ac8c0856 100644 --- a/include/dolphin/db.h +++ b/include/dolphin/db.h @@ -1,5 +1,5 @@ -#ifndef _DOLPHIN_DB_H -#define _DOLPHIN_DB_H +#ifndef _DOLPHIN_DB +#define _DOLPHIN_DB #include "types.h" @@ -28,4 +28,4 @@ static void __DBExceptionDestination(void); } #endif -#endif +#endif // _DOLPHIN_DB diff --git a/include/dolphin/dsp.h b/include/dolphin/dsp.h index 63c6d545..009a8787 100644 --- a/include/dolphin/dsp.h +++ b/include/dolphin/dsp.h @@ -1,5 +1,5 @@ -#ifndef __DSP_H__ -#define __DSP_H__ +#ifndef _DOLPHIN_DSP +#define _DOLPHIN_DSP #include "types.h" #include @@ -56,4 +56,4 @@ void __DSP_debug_printf(const char* fmt, ...); } #endif -#endif // __DSP_H__ +#endif // _DOLPHIN_DSP diff --git a/include/dolphin/dsp_regs.h b/include/dolphin/dsp_regs.h index 91fbc298..eee93764 100644 --- a/include/dolphin/dsp_regs.h +++ b/include/dolphin/dsp_regs.h @@ -1,9 +1,9 @@ -#ifndef __DSP_REGS_H__ -#define __DSP_REGS_H__ +#ifndef _DOLPHIN_DSP_REGS +#define _DOLPHIN_DSP_REGS #include "types.h" vu16 __DSPRegs[32] : 0xCC005000; vu32 __AIRegs[8] : 0xCC006C00; -#endif // __DSP_REGS_H__ +#endif // _DOLPHIN_DSP_REGS diff --git a/include/dolphin/dtk.h b/include/dolphin/dtk.h index acb0ac27..f2661905 100644 --- a/include/dolphin/dtk.h +++ b/include/dolphin/dtk.h @@ -1,9 +1,8 @@ -#ifndef __DTK_H__ -#define __DTK_H__ +#ifndef _DOLPHIN_DTK +#define _DOLPHIN_DTK -#include #include - +#include #ifdef __cplusplus extern "C" { @@ -45,4 +44,4 @@ u16 DTKGetVolume(void); } #endif -#endif // __DTK_H__ +#endif // _DOLPHIN_DTK diff --git a/include/dolphin/dvd.h b/include/dolphin/dvd.h index d672a56d..6b4833fe 100644 --- a/include/dolphin/dvd.h +++ b/include/dolphin/dvd.h @@ -1,5 +1,5 @@ -#ifndef __DVD_H__ -#define __DVD_H__ +#ifndef _DOLPHIN_DVD +#define _DOLPHIN_DVD #include "types.h" @@ -49,24 +49,23 @@ struct DVDFileInfo { void DVDSetAutoFatalMessaging(BOOL); void DVDReset(); -BOOL DVDPrepareStreamAsync(DVDFileInfo *fInfo, u32 length, u32 offset, DVDCallback callback); -s32 DVDPrepareStream(DVDFileInfo *fInfo, u32 length, u32 offset); +BOOL DVDPrepareStreamAsync(DVDFileInfo* fInfo, u32 length, u32 offset, DVDCallback callback); +s32 DVDPrepareStream(DVDFileInfo* fInfo, u32 length, u32 offset); -BOOL DVDCancelStreamAsync(DVDCommandBlock *block, DVDCBCallback callback); -s32 DVDCancelStream(DVDCommandBlock *block); +BOOL DVDCancelStreamAsync(DVDCommandBlock* block, DVDCBCallback callback); +s32 DVDCancelStream(DVDCommandBlock* block); -BOOL DVDStopStreamAtEndAsync(DVDCommandBlock *block, DVDCBCallback callback); -s32 DVDStopStreamAtEnd(DVDCommandBlock *block); +BOOL DVDStopStreamAtEndAsync(DVDCommandBlock* block, DVDCBCallback callback); +s32 DVDStopStreamAtEnd(DVDCommandBlock* block); -BOOL DVDGetStreamErrorStatusAsync(DVDCommandBlock *block, DVDCBCallback callback); -s32 DVDGetStreamErrorStatus(DVDCommandBlock *block); - -BOOL DVDGetStreamPlayAddrAsync(DVDCommandBlock *block, DVDCBCallback callback); -s32 DVDGetStreamPlayAddr(DVDCommandBlock *block); +BOOL DVDGetStreamErrorStatusAsync(DVDCommandBlock* block, DVDCBCallback callback); +s32 DVDGetStreamErrorStatus(DVDCommandBlock* block); +BOOL DVDGetStreamPlayAddrAsync(DVDCommandBlock* block, DVDCBCallback callback); +s32 DVDGetStreamPlayAddr(DVDCommandBlock* block); #ifdef __cplusplus } #endif -#endif +#endif // _DOLPHIN_DVD diff --git a/include/dolphin/dvd_regs.h b/include/dolphin/dvd_regs.h index 98a3834c..85be4688 100644 --- a/include/dolphin/dvd_regs.h +++ b/include/dolphin/dvd_regs.h @@ -1,6 +1,6 @@ -#ifndef __DVD_REGS_H__ -#define __DVD_REGS_H__ +#ifndef _DOLPHIN_DVD_REGS +#define _DOLPHIN_DVD_REGS vu32 __DIRegs[16] : 0xCC006000; -#endif // __DVD_REGS_H__ +#endif // _DOLPHIN_DVD_REGS diff --git a/include/dolphin/gba.h b/include/dolphin/gba.h index 429c11cc..557c5641 100644 --- a/include/dolphin/gba.h +++ b/include/dolphin/gba.h @@ -1,5 +1,5 @@ -#ifndef __GBA_H__ -#define __GBA_H__ +#ifndef _DOLPHIN_GBA +#define _DOLPHIN_GBA #ifdef __cplusplus extern "C" { @@ -9,4 +9,4 @@ void GBAInit(); } #endif -#endif +#endif // _DOLPHIN_GBA diff --git a/include/dolphin/gx.h b/include/dolphin/gx.h index f3ab630a..856842b7 100644 --- a/include/dolphin/gx.h +++ b/include/dolphin/gx.h @@ -1,5 +1,5 @@ -#ifndef DOLPHIN_GX_H -#define DOLPHIN_GX_H +#ifndef _DOLPHIN_GX +#define _DOLPHIN_GX #include #include @@ -23,4 +23,4 @@ #include #include -#endif +#endif // _DOLPHIN_GX diff --git a/include/dolphin/gx/GXBump.h b/include/dolphin/gx/GXBump.h index fa41e36c..a936ddca 100644 --- a/include/dolphin/gx/GXBump.h +++ b/include/dolphin/gx/GXBump.h @@ -1,5 +1,5 @@ -#ifndef DOLPHIN_GXBUMP_H -#define DOLPHIN_GXBUMP_H +#ifndef _DOLPHIN_GXBUMP +#define _DOLPHIN_GXBUMP #include @@ -27,4 +27,4 @@ void GXSetIndTexCoordScale(GXIndTexStageID ind_state, GXIndTexScale scale_s, GXI } #endif -#endif +#endif // _DOLPHIN_GXBUMP diff --git a/include/dolphin/gx/GXCommandList.h b/include/dolphin/gx/GXCommandList.h index 090411e1..cf3a5172 100644 --- a/include/dolphin/gx/GXCommandList.h +++ b/include/dolphin/gx/GXCommandList.h @@ -1,5 +1,5 @@ -#ifndef DOLPHIN_GXCOMMANDLIST_H -#define DOLPHIN_GXCOMMANDLIST_H +#ifndef _DOLPHIN_GXCOMMANDLIST +#define _DOLPHIN_GXCOMMANDLIST #ifdef __cplusplus extern "C" { @@ -32,4 +32,4 @@ extern "C" { } #endif -#endif +#endif // _DOLPHIN_GXCOMMANDLIST diff --git a/include/dolphin/gx/GXCull.h b/include/dolphin/gx/GXCull.h index bf2d9229..b5699302 100644 --- a/include/dolphin/gx/GXCull.h +++ b/include/dolphin/gx/GXCull.h @@ -1,5 +1,5 @@ -#ifndef DOLPHIN_GXCULL_H -#define DOLPHIN_GXCULL_H +#ifndef _DOLPHIN_GXCULL +#define _DOLPHIN_GXCULL #include @@ -15,4 +15,4 @@ void GXSetCoPlanar(GXBool enable); } #endif -#endif +#endif // _DOLPHIN_GXCULL diff --git a/include/dolphin/gx/GXDispList.h b/include/dolphin/gx/GXDispList.h index b9a664d6..552eda2d 100644 --- a/include/dolphin/gx/GXDispList.h +++ b/include/dolphin/gx/GXDispList.h @@ -1,5 +1,5 @@ -#ifndef DOLPHIN_GXDISPLIST_H -#define DOLPHIN_GXDISPLIST_H +#ifndef _DOLPHIN_GXDISPLIST +#define _DOLPHIN_GXDISPLIST #include @@ -15,4 +15,4 @@ void GXCallDisplayList(const void* list, u32 nbytes); } #endif -#endif +#endif // _DOLPHIN_GXDISPLIST diff --git a/include/dolphin/gx/GXDraw.h b/include/dolphin/gx/GXDraw.h index 662ec40d..3901ebfe 100644 --- a/include/dolphin/gx/GXDraw.h +++ b/include/dolphin/gx/GXDraw.h @@ -1,5 +1,5 @@ -#ifndef DOLPHIN_GXDRAW_H -#define DOLPHIN_GXDRAW_H +#ifndef _DOLPHIN_GXDRAW +#define _DOLPHIN_GXDRAW #include @@ -13,4 +13,4 @@ void GXDrawSphere(u8 numMajor, u8 numMinor); } #endif -#endif +#endif // _DOLPHIN_GXDRAW diff --git a/include/dolphin/gx/GXEnum.h b/include/dolphin/gx/GXEnum.h index cb9fa9ce..e0d4ab8f 100644 --- a/include/dolphin/gx/GXEnum.h +++ b/include/dolphin/gx/GXEnum.h @@ -1,5 +1,5 @@ -#ifndef DOLPHIN_GXENUM_H -#define DOLPHIN_GXENUM_H +#ifndef _DOLPHIN_GXENUM +#define _DOLPHIN_GXENUM #include @@ -784,4 +784,4 @@ typedef enum _GXTlutFmt { } #endif -#endif +#endif // _DOLPHIN_GXENUM diff --git a/include/dolphin/gx/GXExtra.h b/include/dolphin/gx/GXExtra.h index 6e45d3d0..afd29caa 100644 --- a/include/dolphin/gx/GXExtra.h +++ b/include/dolphin/gx/GXExtra.h @@ -1,5 +1,6 @@ -#ifndef DOLPHIN_GXEXTRA_H -#define DOLPHIN_GXEXTRA_H +#ifndef _DOLPHIN_GXEXTRA +#define _DOLPHIN_GXEXTRA + // Extra types for PC #ifdef TARGET_PC #include @@ -29,6 +30,7 @@ void GXColor4f32(float r, float g, float b, float a); #ifdef __cplusplus } #endif -#endif -#endif +#endif // TARGET_PC + +#endif // _DOLPHIN_GXEXTRA diff --git a/include/dolphin/gx/GXFifo.h b/include/dolphin/gx/GXFifo.h index d4b8a0b4..36b9c31a 100644 --- a/include/dolphin/gx/GXFifo.h +++ b/include/dolphin/gx/GXFifo.h @@ -1,5 +1,5 @@ -#ifndef DOLPHIN_GXFIFO_H -#define DOLPHIN_GXFIFO_H +#ifndef _DOLPHIN_GXFIFO +#define _DOLPHIN_GXFIFO #include @@ -29,4 +29,4 @@ void GXInitFifoLimits(GXFifoObj* fifo, u32 hiWaterMark, u32 loWaterMark); } #endif -#endif +#endif // _DOLPHIN_GXFIFO diff --git a/include/dolphin/gx/GXFrameBuffer.h b/include/dolphin/gx/GXFrameBuffer.h index 906fcfe7..55b97bc5 100644 --- a/include/dolphin/gx/GXFrameBuffer.h +++ b/include/dolphin/gx/GXFrameBuffer.h @@ -1,5 +1,5 @@ -#ifndef DOLPHIN_GXFRAMEBUFFER_H -#define DOLPHIN_GXFRAMEBUFFER_H +#ifndef _DOLPHIN_GXFRAMEBUFFER +#define _DOLPHIN_GXFRAMEBUFFER #include #include @@ -8,38 +8,37 @@ extern "C" { #endif -//extern GXRenderModeObj GXNtsc240Ds; -//extern GXRenderModeObj GXNtsc240DsAa; -//extern GXRenderModeObj GXNtsc240Int; -//extern GXRenderModeObj GXNtsc240IntAa; +// extern GXRenderModeObj GXNtsc240Ds; +// extern GXRenderModeObj GXNtsc240DsAa; +// extern GXRenderModeObj GXNtsc240Int; +// extern GXRenderModeObj GXNtsc240IntAa; extern GXRenderModeObj GXNtsc480IntDf; -//extern GXRenderModeObj GXNtsc480Int; -//extern GXRenderModeObj GXNtsc480IntAa; -//extern GXRenderModeObj GXNtsc480Prog; -//extern GXRenderModeObj GXNtsc480ProgSoft; -//extern GXRenderModeObj GXNtsc480ProgAa; -//extern GXRenderModeObj GXMpal240Ds; -//extern GXRenderModeObj GXMpal240DsAa; -//extern GXRenderModeObj GXMpal240Int; -//extern GXRenderModeObj GXMpal240IntAa; +// extern GXRenderModeObj GXNtsc480Int; +// extern GXRenderModeObj GXNtsc480IntAa; +// extern GXRenderModeObj GXNtsc480Prog; +// extern GXRenderModeObj GXNtsc480ProgSoft; +// extern GXRenderModeObj GXNtsc480ProgAa; +// extern GXRenderModeObj GXMpal240Ds; +// extern GXRenderModeObj GXMpal240DsAa; +// extern GXRenderModeObj GXMpal240Int; +// extern GXRenderModeObj GXMpal240IntAa; extern GXRenderModeObj GXMpal480IntDf; -//extern GXRenderModeObj GXMpal480Int; -//extern GXRenderModeObj GXMpal480IntAa; -//extern GXRenderModeObj GXPal264Ds; -//extern GXRenderModeObj GXPal264DsAa; -//extern GXRenderModeObj GXPal264Int; -//extern GXRenderModeObj GXPal264IntAa; +// extern GXRenderModeObj GXMpal480Int; +// extern GXRenderModeObj GXMpal480IntAa; +// extern GXRenderModeObj GXPal264Ds; +// extern GXRenderModeObj GXPal264DsAa; +// extern GXRenderModeObj GXPal264Int; +// extern GXRenderModeObj GXPal264IntAa; extern GXRenderModeObj GXPal528IntDf; -//extern GXRenderModeObj GXPal528Int; -//extern GXRenderModeObj GXPal524IntAa; -//extern GXRenderModeObj GXEurgb60Hz240Ds; -//extern GXRenderModeObj GXEurgb60Hz240DsAa; -//extern GXRenderModeObj GXEurgb60Hz240Int; -//extern GXRenderModeObj GXEurgb60Hz240IntAa; +// extern GXRenderModeObj GXPal528Int; +// extern GXRenderModeObj GXPal524IntAa; +// extern GXRenderModeObj GXEurgb60Hz240Ds; +// extern GXRenderModeObj GXEurgb60Hz240DsAa; +// extern GXRenderModeObj GXEurgb60Hz240Int; +// extern GXRenderModeObj GXEurgb60Hz240IntAa; extern GXRenderModeObj GXEurgb60Hz480IntDf; -//extern GXRenderModeObj GXEurgb60Hz480Int; -//extern GXRenderModeObj GXEurgb60Hz480IntAa; - +// extern GXRenderModeObj GXEurgb60Hz480Int; +// extern GXRenderModeObj GXEurgb60Hz480IntAa; #define GX_MAX_Z24 0x00FFFFFF @@ -60,4 +59,4 @@ void GXCopyTex(void* dest, GXBool clear); } #endif -#endif +#endif // _DOLPHIN_GXFRAMEBUFFER diff --git a/include/dolphin/gx/GXGeometry.h b/include/dolphin/gx/GXGeometry.h index 167adcae..632ebc69 100644 --- a/include/dolphin/gx/GXGeometry.h +++ b/include/dolphin/gx/GXGeometry.h @@ -1,5 +1,5 @@ -#ifndef DOLPHIN_GXGEOMETRY_H -#define DOLPHIN_GXGEOMETRY_H +#ifndef _DOLPHIN_GXGEOMETRY +#define _DOLPHIN_GXGEOMETRY #include @@ -34,4 +34,4 @@ static inline void GXSetTexCoordGen(GXTexCoordID dst_coord, GXTexGenType func, } #endif -#endif +#endif // _DOLPHIN_GXGEOMETRY diff --git a/include/dolphin/gx/GXGet.h b/include/dolphin/gx/GXGet.h index 982359ab..673d60ae 100644 --- a/include/dolphin/gx/GXGet.h +++ b/include/dolphin/gx/GXGet.h @@ -1,5 +1,5 @@ -#ifndef DOLPHIN_GXGET_H -#define DOLPHIN_GXGET_H +#ifndef _DOLPHIN_GXGET +#define _DOLPHIN_GXGET #include #include @@ -25,4 +25,4 @@ void GXGetVtxAttrFmt(GXVtxFmt idx, GXAttr attr, GXCompCnt* compCnt, GXCompType* } #endif -#endif +#endif // _DOLPHIN_GXGET diff --git a/include/dolphin/gx/GXLighting.h b/include/dolphin/gx/GXLighting.h index d91116bc..a7e0ccc6 100644 --- a/include/dolphin/gx/GXLighting.h +++ b/include/dolphin/gx/GXLighting.h @@ -1,5 +1,5 @@ -#ifndef DOLPHIN_GXLIGHTING_H -#define DOLPHIN_GXLIGHTING_H +#ifndef _DOLPHIN_GXLIGHTING +#define _DOLPHIN_GXLIGHTING #include #include @@ -29,4 +29,4 @@ void GXLoadLightObjImm(GXLightObj* lt_obj, GXLightID light); } #endif -#endif +#endif // _DOLPHIN_GXLIGHTING diff --git a/include/dolphin/gx/GXManage.h b/include/dolphin/gx/GXManage.h index f590b8d5..f3a2bb13 100644 --- a/include/dolphin/gx/GXManage.h +++ b/include/dolphin/gx/GXManage.h @@ -1,5 +1,5 @@ -#ifndef DOLPHIN_GXMANAGE_H -#define DOLPHIN_GXMANAGE_H +#ifndef _DOLPHIN_GXMANAGE +#define _DOLPHIN_GXMANAGE #include @@ -20,4 +20,4 @@ void GXPixModeSync(void); } #endif -#endif +#endif // _DOLPHIN_GXMANAGE diff --git a/include/dolphin/gx/GXPerf.h b/include/dolphin/gx/GXPerf.h index 7859e185..c3850dc3 100644 --- a/include/dolphin/gx/GXPerf.h +++ b/include/dolphin/gx/GXPerf.h @@ -1,5 +1,5 @@ -#ifndef DOLPHIN_GXPERF_H -#define DOLPHIN_GXPERF_H +#ifndef _DOLPHIN_GXPERF +#define _DOLPHIN_GXPERF #include @@ -13,4 +13,4 @@ void GXReadXfRasMetric(u32* xf_wait_in, u32* xf_wait_out, u32* ras_busy, u32* cl } #endif -#endif +#endif // _DOLPHIN_GXPERF diff --git a/include/dolphin/gx/GXPixel.h b/include/dolphin/gx/GXPixel.h index c723a735..7dfae08f 100644 --- a/include/dolphin/gx/GXPixel.h +++ b/include/dolphin/gx/GXPixel.h @@ -1,5 +1,5 @@ -#ifndef DOLPHIN_GXPIXEL_H -#define DOLPHIN_GXPIXEL_H +#ifndef _DOLPHIN_GXPIXEL +#define _DOLPHIN_GXPIXEL #include @@ -26,4 +26,4 @@ void GXSetDstAlpha(GXBool enable, u8 alpha); } #endif -#endif +#endif // _DOLPHIN_GXPIXEL diff --git a/include/dolphin/gx/GXStruct.h b/include/dolphin/gx/GXStruct.h index b35a2efc..354f8923 100644 --- a/include/dolphin/gx/GXStruct.h +++ b/include/dolphin/gx/GXStruct.h @@ -1,5 +1,5 @@ -#ifndef DOLPHIN_GXSTRUCT_H -#define DOLPHIN_GXSTRUCT_H +#ifndef _DOLPHIN_GXSTRUCT +#define _DOLPHIN_GXSTRUCT #include #include @@ -97,4 +97,4 @@ typedef struct _GXColorS10 { } #endif -#endif +#endif // _DOLPHIN_GXSTRUCT diff --git a/include/dolphin/gx/GXTev.h b/include/dolphin/gx/GXTev.h index e8df7d00..01290a9d 100644 --- a/include/dolphin/gx/GXTev.h +++ b/include/dolphin/gx/GXTev.h @@ -1,5 +1,5 @@ -#ifndef DOLPHIN_GXTEV_H -#define DOLPHIN_GXTEV_H +#ifndef _DOLPHIN_GXTEV +#define _DOLPHIN_GXTEV #include #include @@ -34,4 +34,4 @@ void GXSetNumTevStages(u8 nStages); } #endif -#endif +#endif // _DOLPHIN_GXTEV diff --git a/include/dolphin/gx/GXTexture.h b/include/dolphin/gx/GXTexture.h index ac1af134..e14e26bb 100644 --- a/include/dolphin/gx/GXTexture.h +++ b/include/dolphin/gx/GXTexture.h @@ -1,5 +1,5 @@ -#ifndef DOLPHIN_GXTEXTURE_H -#define DOLPHIN_GXTEXTURE_H +#ifndef _DOLPHIN_GXTEXTURE +#define _DOLPHIN_GXTEXTURE #include #include @@ -28,4 +28,4 @@ void GXSetTexCoordScaleManually(GXTexCoordID coord, GXBool enable, u16 ss, u16 t } #endif -#endif +#endif // _DOLPHIN_GXTEXTURE diff --git a/include/dolphin/gx/GXTransform.h b/include/dolphin/gx/GXTransform.h index 73f5e83a..bc3bf107 100644 --- a/include/dolphin/gx/GXTransform.h +++ b/include/dolphin/gx/GXTransform.h @@ -1,5 +1,5 @@ -#ifndef DOLPHIN_GXTRANSFORM_H -#define DOLPHIN_GXTRANSFORM_H +#ifndef _DOLPHIN_GXTRANSFORM +#define _DOLPHIN_GXTRANSFORM #include @@ -30,4 +30,4 @@ void GXSetClipMode(GXClipMode mode); } #endif -#endif +#endif // _DOLPHIN_GXTRANSFORM diff --git a/include/dolphin/gx/GXVert.h b/include/dolphin/gx/GXVert.h index 8af0cdec..9579ac32 100644 --- a/include/dolphin/gx/GXVert.h +++ b/include/dolphin/gx/GXVert.h @@ -1,5 +1,5 @@ -#ifndef DOLPHIN_GXVERT_H -#define DOLPHIN_GXVERT_H +#ifndef _DOLPHIN_GXVERT +#define _DOLPHIN_GXVERT #include @@ -129,4 +129,4 @@ static inline void GXEnd(void) {} } #endif -#endif +#endif // _DOLPHIN_GXVERT diff --git a/include/dolphin/mtx.h b/include/dolphin/mtx.h index dff3e9f4..41b69edc 100644 --- a/include/dolphin/mtx.h +++ b/include/dolphin/mtx.h @@ -1,9 +1,9 @@ -#ifndef DOLPHIN_MTX_H -#define DOLPHIN_MTX_H +#ifndef _DOLPHIN_MTX +#define _DOLPHIN_MTX #include typedef f32 Mtx[3][4]; typedef f32 (*MtxPtr)[4]; -#endif +#endif // _DOLPHIN_MTX diff --git a/include/dolphin/os.h b/include/dolphin/os.h index e700511c..26e5540e 100644 --- a/include/dolphin/os.h +++ b/include/dolphin/os.h @@ -1,5 +1,5 @@ -#ifndef _DOLPHIN_OS_H -#define _DOLPHIN_OS_H +#ifndef _DOLPHIN_OS +#define _DOLPHIN_OS #include #include @@ -142,4 +142,4 @@ void OSFatal(GXColor fg, GXColor bg, const char* msg); #include #include #include -#endif +#endif // _DOLPHIN_OS diff --git a/include/dolphin/os/OSAlarm.h b/include/dolphin/os/OSAlarm.h index fd04bf18..a0c9d380 100644 --- a/include/dolphin/os/OSAlarm.h +++ b/include/dolphin/os/OSAlarm.h @@ -1,5 +1,5 @@ -#ifndef __OSALARM_H__ -#define __OSALARM_H__ +#ifndef _DOLPHIN_OSALARM +#define _DOLPHIN_OSALARM #include #include @@ -36,4 +36,4 @@ BOOL OSCheckAlarmQueue(void); } #endif -#endif +#endif // _DOLPHIN_OSALARM diff --git a/include/dolphin/os/OSArena.h b/include/dolphin/os/OSArena.h index 8d1c8b69..a709e519 100644 --- a/include/dolphin/os/OSArena.h +++ b/include/dolphin/os/OSArena.h @@ -1 +1,4 @@ - +#ifndef _DOLPHIN_OSARENA +#define _DOLPHIN_OSARENA + +#endif // _DOLPHIN_OSARENA diff --git a/include/dolphin/os/OSBootInfo.h b/include/dolphin/os/OSBootInfo.h index 0b604799..1b5229e8 100644 --- a/include/dolphin/os/OSBootInfo.h +++ b/include/dolphin/os/OSBootInfo.h @@ -1,5 +1,5 @@ -#ifndef __OSBOOTINFO_H__ -#define __OSBOOTINFO_H__ +#ifndef _DOLPHIN_OSBOOTINFO +#define _DOLPHIN_OSBOOTINFO typedef struct OSBootInfo { DVDDiskID DVDDiskID; @@ -13,4 +13,4 @@ typedef struct OSBootInfo { u32 FSTMaxLength; } OSBootInfo; -#endif // __OSBOOTINFO_H__ +#endif // _DOLPHIN_OSBOOTINFO diff --git a/include/dolphin/os/OSCache.h b/include/dolphin/os/OSCache.h index d3bfa5bc..29f99f39 100644 --- a/include/dolphin/os/OSCache.h +++ b/include/dolphin/os/OSCache.h @@ -15,4 +15,4 @@ void LCEnable(); } #endif -#endif +#endif // _DOLPHIN_OSCACHE diff --git a/include/dolphin/os/OSContext.h b/include/dolphin/os/OSContext.h index 922a33fa..acca3026 100644 --- a/include/dolphin/os/OSContext.h +++ b/include/dolphin/os/OSContext.h @@ -1,5 +1,5 @@ -#ifndef __OSCONTEXT_H__ -#define __OSCONTEXT_H__ +#ifndef _DOLPHIN_OSCONTEXT +#define _DOLPHIN_OSCONTEXT #include @@ -39,4 +39,4 @@ void OSSetCurrentContext(OSContext* context); } #endif -#endif +#endif // _DOLPHIN_OSCONTEXT diff --git a/include/dolphin/os/OSError.h b/include/dolphin/os/OSError.h index 3ad1a936..2f795a50 100644 --- a/include/dolphin/os/OSError.h +++ b/include/dolphin/os/OSError.h @@ -1,5 +1,5 @@ -#ifndef __OSERROR_H__ -#define __OSERROR_H__ +#ifndef _DOLPHIN_OSERROR +#define _DOLPHIN_OSERROR #include @@ -16,4 +16,4 @@ void OSSetErrorHandler(OSError code, OSErrorHandler* handler); } #endif -#endif +#endif // _DOLPHIN_OSERROR diff --git a/include/dolphin/os/OSException.h b/include/dolphin/os/OSException.h index eff9ba3a..cc416db9 100644 --- a/include/dolphin/os/OSException.h +++ b/include/dolphin/os/OSException.h @@ -1,6 +1,6 @@ -#ifndef __OSEXCEPTION_H__ -#define __OSEXCEPTION_H__ +#ifndef _DOLPHIN_OSEXCEPTION +#define _DOLPHIN_OSEXCEPTION #include #include @@ -15,4 +15,4 @@ typedef void (*__OSExceptionHandler)(__OSException exception, OSContext* context } #endif -#endif // __OSEXCEPTION_H__ +#endif // _DOLPHIN_OSEXCEPTION diff --git a/include/dolphin/os/OSFastCast.h b/include/dolphin/os/OSFastCast.h index a6380496..5b3f8d41 100644 --- a/include/dolphin/os/OSFastCast.h +++ b/include/dolphin/os/OSFastCast.h @@ -1,5 +1,5 @@ -#ifndef _OSFASTCAST_H_ -#define _OSFASTCAST_H_ +#ifndef _DOLPHIN_OSFASTCAST +#define _DOLPHIN_OSFASTCAST #ifdef __cplusplus extern "C" { @@ -12,4 +12,4 @@ extern "C" { } #endif -#endif +#endif // _DOLPHIN_OSFASTCAST diff --git a/include/dolphin/os/OSFont.h b/include/dolphin/os/OSFont.h index cb62d0a9..475fd694 100644 --- a/include/dolphin/os/OSFont.h +++ b/include/dolphin/os/OSFont.h @@ -1,5 +1,5 @@ -#ifndef __OSFONT_H__ -#define __OSFONT_H__ +#ifndef _DOLPHIN_OSFONT +#define _DOLPHIN_OSFONT #include @@ -14,4 +14,4 @@ u16 OSSetFontEncode(u16 encode); } #endif -#endif +#endif // _DOLPHIN_OSFONT diff --git a/include/dolphin/os/OSInterrupt.h b/include/dolphin/os/OSInterrupt.h index 3e3a72f9..9e5d2aa0 100644 --- a/include/dolphin/os/OSInterrupt.h +++ b/include/dolphin/os/OSInterrupt.h @@ -1,5 +1,5 @@ -#ifndef __OSINTERRUPT_H__ -#define __OSINTERRUPT_H__ +#ifndef _DOLPHIN_OSINTERRUPT +#define _DOLPHIN_OSINTERRUPT #include #include @@ -88,7 +88,6 @@ extern "C" { OS_INTERRUPTMASK_PI_PE_TOKEN | OS_INTERRUPTMASK_PI_PE_FINISH | OS_INTERRUPTMASK_PI_DEBUG | \ OS_INTERRUPTMASK_PI_HSP) - typedef s16 __OSInterrupt; typedef void (*__OSInterruptHandler)(__OSInterrupt interrupt, OSContext* context); @@ -113,4 +112,4 @@ OSInterruptMask __OSUnmaskInterrupts(OSInterruptMask mask); } #endif -#endif // __OSINTERRUPT_H__ +#endif // _DOLPHIN_OSINTERRUPT diff --git a/include/dolphin/os/OSMemory.h b/include/dolphin/os/OSMemory.h index 95e5d2ac..00c6ab08 100644 --- a/include/dolphin/os/OSMemory.h +++ b/include/dolphin/os/OSMemory.h @@ -1,5 +1,5 @@ -#ifndef _OSMEMORY_H_ -#define _OSMEMORY_H_ +#ifndef _DOLPHIN_OSMEMORY +#define _DOLPHIN_OSMEMORY #include "types.h" @@ -23,4 +23,4 @@ void OSProtectRange(u32 chan, void* addr, u32 nBytes, u32 control); } #endif -#endif +#endif // _DOLPHIN_OSMEMORY diff --git a/include/dolphin/os/OSMutex.h b/include/dolphin/os/OSMutex.h index ab8d788e..5dba31aa 100644 --- a/include/dolphin/os/OSMutex.h +++ b/include/dolphin/os/OSMutex.h @@ -1,5 +1,5 @@ -#ifndef _OSMUTEX_H_ -#define _OSMUTEX_H_ +#ifndef _DOLPHIN_OSMUTEX +#define _DOLPHIN_OSMUTEX #include "types.h" @@ -20,4 +20,4 @@ struct OSMutex { } #endif -#endif +#endif // _DOLPHIN_OSMUTEX diff --git a/include/dolphin/os/OSReset.h b/include/dolphin/os/OSReset.h index cd6c7754..d7f42308 100644 --- a/include/dolphin/os/OSReset.h +++ b/include/dolphin/os/OSReset.h @@ -1,5 +1,5 @@ -#ifndef __OSRESET_H__ -#define __OSRESET_H__ +#ifndef _DOLPHIN_OSRESET +#define _DOLPHIN_OSRESET #include @@ -24,4 +24,4 @@ struct OSResetFunctionInfo { } #endif -#endif +#endif // _DOLPHIN_OSRESET diff --git a/include/dolphin/os/OSSerial.h b/include/dolphin/os/OSSerial.h index 384dbef4..f0a6a4d3 100644 --- a/include/dolphin/os/OSSerial.h +++ b/include/dolphin/os/OSSerial.h @@ -1,5 +1,5 @@ -#ifndef __OSSERIAL_H__ -#define __OSSERIAL_H__ +#ifndef _DOLPHIN_OSSERIAL +#define _DOLPHIN_OSSERIAL #include @@ -66,4 +66,4 @@ void SISetSamplingRate(u32 msec); #ifdef __cplusplus } #endif -#endif +#endif // _DOLPHIN_OSSERIAL diff --git a/include/dolphin/os/OSThread.h b/include/dolphin/os/OSThread.h index 60cabd71..0dcef9ad 100644 --- a/include/dolphin/os/OSThread.h +++ b/include/dolphin/os/OSThread.h @@ -1,5 +1,5 @@ -#ifndef __OSTHREAD_H__ -#define __OSTHREAD_H__ +#ifndef _DOLPHIN_OSTHREAD +#define _DOLPHIN_OSTHREAD #include @@ -68,4 +68,4 @@ OSThread* OSGetCurrentThread(void); } #endif -#endif +#endif // _DOLPHIN_OSTHREAD diff --git a/include/dolphin/pad.h b/include/dolphin/pad.h index 5e5e5f68..0d525004 100644 --- a/include/dolphin/pad.h +++ b/include/dolphin/pad.h @@ -1,5 +1,5 @@ -#ifndef DOLPHIN_PAD_H -#define DOLPHIN_PAD_H +#ifndef _DOLPHIN_PAD +#define _DOLPHIN_PAD #include @@ -125,4 +125,4 @@ void PADBlockInput(bool block); } #endif -#endif +#endif // _DOLPHIN_PAD diff --git a/include/dolphin/sipriv.h b/include/dolphin/sipriv.h index bcba2404..8c8508c8 100644 --- a/include/dolphin/sipriv.h +++ b/include/dolphin/sipriv.h @@ -1,5 +1,6 @@ -#ifndef __SIPRIV_H__ -#define __SIPRIV_H__ +#ifndef _DOLPHIN_SIPRIV +#define _DOLPHIN_SIPRIV + #include "dolphin/os.h" #ifdef __cplusplus @@ -19,7 +20,6 @@ typedef struct SIPacket { OSTime fire; } SIPacket; - void SIInit(void); u32 SIGetStatus(s32 chan); @@ -49,4 +49,4 @@ u32 SIDecodeType(u32 type); } #endif -#endif // __SIPRIV_H__ +#endif // _DOLPHIN_SIPRIV diff --git a/include/dolphin/types.h b/include/dolphin/types.h index d5b40de7..64bfe0ff 100644 --- a/include/dolphin/types.h +++ b/include/dolphin/types.h @@ -1,5 +1,5 @@ -#ifndef DOLPHIN_TYPES_H -#define DOLPHIN_TYPES_H +#ifndef _DOLPHIN_TYPES +#define _DOLPHIN_TYPES #ifdef TARGET_PC #include @@ -83,4 +83,4 @@ typedef int BOOL; #endif #endif -#endif +#endif // _DOLPHIN_TYPES diff --git a/include/dolphin/vi.h b/include/dolphin/vi.h index 86b5cd58..b3170dc9 100644 --- a/include/dolphin/vi.h +++ b/include/dolphin/vi.h @@ -1,5 +1,5 @@ -#ifndef DOLPHIN_VI_H -#define DOLPHIN_VI_H +#ifndef _DOLPHIN_VI +#define _DOLPHIN_VI #include #include @@ -8,7 +8,6 @@ extern "C" { #endif - void VIInit(void); void VIConfigure(GXRenderModeObj* rm); void VIFlush(void); @@ -29,4 +28,4 @@ vu16 __VIRegs[59] : 0xCC002000; } #endif -#endif +#endif // _DOLPHIN_VI diff --git a/include/dolphin/vifuncs.h b/include/dolphin/vifuncs.h index acc6ae99..37ea70c6 100644 --- a/include/dolphin/vifuncs.h +++ b/include/dolphin/vifuncs.h @@ -1,5 +1,5 @@ -#ifndef DOLPHIN_VIFUNCS_H -#define DOLPHIN_VIFUNCS_H +#ifndef _DOLPHIN_VIFUNCS +#define _DOLPHIN_VIFUNCS #include @@ -13,4 +13,4 @@ u32 VIGetNextField(void); } #endif -#endif +#endif // _DOLPHIN_VIFUNCS diff --git a/include/math_ppc.h b/include/math_ppc.h index c079879a..76a35a32 100644 --- a/include/math_ppc.h +++ b/include/math_ppc.h @@ -1,4 +1,4 @@ -#ifndef _MATH_PPC_H_ -#define _MATH_PPC_H_ +#ifndef _MATH_PPC +#define _MATH_PPC -#endif +#endif // _MATH_PPC diff --git a/include/musyx/dsp_import.h b/include/musyx/dsp_import.h index f40828c4..8e2df96e 100644 --- a/include/musyx/dsp_import.h +++ b/include/musyx/dsp_import.h @@ -1,5 +1,5 @@ -#ifndef MUSYX_DSP_IMPORT_H -#define MUSYX_DSP_IMPORT_H +#ifndef _MUSYX_DSP_IMPORT +#define _MUSYX_DSP_IMPORT #include "types.h" @@ -14,4 +14,4 @@ short dspSlaveLength; } #endif -#endif +#endif // _MUSYX_DSP_IMPORT diff --git a/include/musyx/musyx.h b/include/musyx/musyx.h index 55722524..810a448f 100644 --- a/include/musyx/musyx.h +++ b/include/musyx/musyx.h @@ -1,5 +1,5 @@ -#ifndef MUSYX_H -#define MUSYX_H +#ifndef _MUSYX_MUSYX +#define _MUSYX_MUSYX #ifdef __cplusplus extern "C" { @@ -240,4 +240,4 @@ bool sndFXCtrl14(SND_VOICEID vid, u8 ctrl, u16 value); #ifdef __cplusplus } #endif -#endif +#endif // _MUSYX_MUSYX diff --git a/include/musyx/musyx_priv.h b/include/musyx/musyx_priv.h index 58b61fe8..d2f1f6ce 100644 --- a/include/musyx/musyx_priv.h +++ b/include/musyx/musyx_priv.h @@ -1,5 +1,5 @@ -#ifndef MUSYX_PRIV_H -#define MUSYX_PRIV_H +#ifndef _MUSYX_MUSYX_PRIV +#define _MUSYX_MUSYX_PRIV #include "musyx/musyx.h" @@ -56,4 +56,4 @@ bool hwRemoveInput(u8 studio, void* unk); #ifdef __cplusplus } #endif -#endif +#endif // _MUSYX_MUSYX_PRIV diff --git a/include/musyx/seq.h b/include/musyx/seq.h index d85e5201..c1c8baf0 100644 --- a/include/musyx/seq.h +++ b/include/musyx/seq.h @@ -1,3 +1,6 @@ +#ifndef _MUSYX_SEQ +#define _MUSYX_SEQ + #include "musyx/musyx_priv.h" #ifdef __cplusplus @@ -16,3 +19,5 @@ u16 seqGetMIDIPriority(s32 unk1, s32 unk2); #ifdef __cplusplus } #endif + +#endif // _MUSYX_SEQ diff --git a/include/musyx/synth.h b/include/musyx/synth.h index 35c06ee4..67ecc707 100644 --- a/include/musyx/synth.h +++ b/include/musyx/synth.h @@ -1,5 +1,5 @@ -#ifndef __SYNTH_H__ -#define __SYNTH_H__ +#ifndef _MUSYX_SYNTH +#define _MUSYX_SYNTH #include "musyx/musyx_priv.h" #ifndef __cplusplus @@ -44,4 +44,4 @@ void hwSetAUXProcessingCallbacks(u8 studio, SND_AUX_CALLBACK auxA, void* userA, } #endif -#endif // __SYNTH_H__ +#endif // _MUSYX_SYNTH diff --git a/include/musyx/synth_dbtab.h b/include/musyx/synth_dbtab.h index dbc7f1fd..9f02d960 100644 --- a/include/musyx/synth_dbtab.h +++ b/include/musyx/synth_dbtab.h @@ -1,5 +1,5 @@ -#ifndef MUSYX_DSP_IMPORT_H -#define MUSYX_DSP_IMPORT_H +#ifndef _MUSYX_SYNTH_DBTAB +#define _MUSYX_SYNTH_DBTAB #include "types.h" @@ -14,4 +14,5 @@ extern float dspDLSVolTab[129]; #ifdef __cplusplus } #endif -#endif + +#endif // _MUSYX_SYNTH_DBTAB diff --git a/include/rstl/algorithm.hpp b/include/rstl/algorithm.hpp index 2500fbed..108fa483 100644 --- a/include/rstl/algorithm.hpp +++ b/include/rstl/algorithm.hpp @@ -1,5 +1,5 @@ -#ifndef _RSTL_ALGORITHM_HPP -#define _RSTL_ALGORITHM_HPP +#ifndef _RSTL_ALGORITHM +#define _RSTL_ALGORITHM #include "rstl/pointer_iterator.hpp" @@ -30,4 +30,4 @@ template < typename It, class Cmp > inline void sort(It first, It last, Cmp cmp); // TODO } // namespace rstl -#endif // _RSTL_ALGORITHM_HPP +#endif // _RSTL_ALGORITHM diff --git a/include/rstl/auto_ptr.hpp b/include/rstl/auto_ptr.hpp index ec93754f..198a3cd6 100644 --- a/include/rstl/auto_ptr.hpp +++ b/include/rstl/auto_ptr.hpp @@ -1,5 +1,5 @@ -#ifndef _RSTL_AUTO_PTR_HPP -#define _RSTL_AUTO_PTR_HPP +#ifndef _RSTL_AUTO_PTR +#define _RSTL_AUTO_PTR #include "types.h" @@ -29,7 +29,7 @@ public: } x0_has = other.x0_has; x4_item = other.x4_item; - const_cast(other).x0_has = false; + const_cast< auto_ptr& >(other).x0_has = false; } return *this; } @@ -44,4 +44,4 @@ public: }; } // namespace rstl -#endif +#endif // _RSTL_AUTO_PTR diff --git a/include/rstl/construct.hpp b/include/rstl/construct.hpp index 17041555..0db9a9c7 100644 --- a/include/rstl/construct.hpp +++ b/include/rstl/construct.hpp @@ -1,5 +1,5 @@ -#ifndef _RSTL_CONSTRUCT_HPP -#define _RSTL_CONSTRUCT_HPP +#ifndef _RSTL_CONSTRUCT +#define _RSTL_CONSTRUCT #include "types.h" @@ -41,10 +41,10 @@ inline void uninitialized_copy_n(S src, int n, D dest) { template < typename D, typename S > inline void uninitialized_fill_n(D dest, int n, const S& value) { D cur = dest; - for (size_t i = 0; i < n ; ++i, ++cur) { + for (size_t i = 0; i < n; ++i, ++cur) { construct(&*cur, value); } } } // namespace rstl -#endif +#endif // _RSTL_CONSTRUCT diff --git a/include/rstl/construction_deferred.hpp b/include/rstl/construction_deferred.hpp index 66f0d6f7..92595de4 100644 --- a/include/rstl/construction_deferred.hpp +++ b/include/rstl/construction_deferred.hpp @@ -1,5 +1,5 @@ -#ifndef _RSTL_CONSTRUCTION_DEFERRED_HPP -#define _RSTL_CONSTRUCTION_DEFERRED_HPP +#ifndef _RSTL_CONSTRUCTION_DEFERRED +#define _RSTL_CONSTRUCTION_DEFERRED #include "types.h" @@ -34,4 +34,4 @@ private: }; } // namespace rstl -#endif +#endif // _RSTL_CONSTRUCTION_DEFERRED diff --git a/include/rstl/hash_map.hpp b/include/rstl/hash_map.hpp index 171ad8d0..d9366820 100644 --- a/include/rstl/hash_map.hpp +++ b/include/rstl/hash_map.hpp @@ -1,5 +1,5 @@ -#ifndef _RSTL_HASH_MAP_HPP -#define _RSTL_HASH_MAP_HPP +#ifndef _RSTL_HASH_MAP +#define _RSTL_HASH_MAP #include "types.h" @@ -27,4 +27,4 @@ private: }; } // namespace rstl -#endif +#endif // _RSTL_HASH_MAP diff --git a/include/rstl/list.hpp b/include/rstl/list.hpp index 11495deb..94707f56 100644 --- a/include/rstl/list.hpp +++ b/include/rstl/list.hpp @@ -1,5 +1,5 @@ -#ifndef _RSTL_LIST_HPP -#define _RSTL_LIST_HPP +#ifndef _RSTL_LIST +#define _RSTL_LIST #include "types.h" @@ -44,4 +44,4 @@ private: }; } // namespace rstl -#endif +#endif // _RSTL_LIST diff --git a/include/rstl/map.hpp b/include/rstl/map.hpp index e514412f..ed4723a8 100644 --- a/include/rstl/map.hpp +++ b/include/rstl/map.hpp @@ -1,5 +1,5 @@ -#ifndef _RSTL_MAP_HPP -#define _RSTL_MAP_HPP +#ifndef _RSTL_MAP +#define _RSTL_MAP #include "types.h" @@ -29,4 +29,4 @@ typedef map< char, char > unk_map; CHECK_SIZEOF(unk_map, 0x14) } // namespace rstl -#endif +#endif // _RSTL_MAP diff --git a/include/rstl/math.hpp b/include/rstl/math.hpp index dd6f4a16..13a1122d 100644 --- a/include/rstl/math.hpp +++ b/include/rstl/math.hpp @@ -1,5 +1,5 @@ -#ifndef _RSTL_MATH_HPP -#define _RSTL_MATH_HPP +#ifndef _RSTL_MATH +#define _RSTL_MATH #include "types.h" @@ -15,4 +15,4 @@ inline const T& max_val(const T& a, const T& b) { } } // namespace rstl -#endif +#endif // _RSTL_MATH diff --git a/include/rstl/optional_object.hpp b/include/rstl/optional_object.hpp index e34931ea..95a7abfb 100644 --- a/include/rstl/optional_object.hpp +++ b/include/rstl/optional_object.hpp @@ -1,5 +1,5 @@ -#ifndef _RSTL_OPTIONAL_OBJECT_HPP -#define _RSTL_OPTIONAL_OBJECT_HPP +#ifndef _RSTL_OPTIONAL_OBJECT +#define _RSTL_OPTIONAL_OBJECT #include "types.h" @@ -67,4 +67,4 @@ private: }; } // namespace rstl -#endif +#endif // _RSTL_OPTIONAL_OBJECT diff --git a/include/rstl/pair.hpp b/include/rstl/pair.hpp index 4d617fff..ddfda070 100644 --- a/include/rstl/pair.hpp +++ b/include/rstl/pair.hpp @@ -1,5 +1,5 @@ -#ifndef _RSTL_PAIR_HPP -#define _RSTL_PAIR_HPP +#ifndef _RSTL_PAIR +#define _RSTL_PAIR #include "types.h" @@ -15,4 +15,4 @@ public: }; } // namespace rstl -#endif +#endif // _RSTL_PAIR diff --git a/include/rstl/pointer_iterator.hpp b/include/rstl/pointer_iterator.hpp index 0e3e9367..a48281a3 100644 --- a/include/rstl/pointer_iterator.hpp +++ b/include/rstl/pointer_iterator.hpp @@ -1,8 +1,8 @@ -#ifndef _RSTL_POINTER_ITERATOR_HPP -#define _RSTL_POINTER_ITERATOR_HPP +#ifndef _RSTL_POINTER_ITERATOR +#define _RSTL_POINTER_ITERATOR -#include "types.h" #include "stddef.h" +#include "types.h" #include "rstl/construct.hpp" @@ -113,9 +113,7 @@ public: return it -= v; } // HACK: non-const operator- is required to match vector::insert - difference_type operator-(const pointer_iterator& other) { - return this->current - other.current; - } + difference_type operator-(const pointer_iterator& other) { return this->current - other.current; } }; template < typename T > @@ -137,4 +135,4 @@ inline typename It::difference_type distance(It first, It last) { } } // namespace rstl -#endif +#endif // _RSTL_POINTER_ITERATOR diff --git a/include/rstl/rc_ptr.hpp b/include/rstl/rc_ptr.hpp index 87e91600..28f08259 100644 --- a/include/rstl/rc_ptr.hpp +++ b/include/rstl/rc_ptr.hpp @@ -1,5 +1,5 @@ -#ifndef _RSTL_RC_PTR_HPP -#define _RSTL_RC_PTR_HPP +#ifndef _RSTL_RC_PTR +#define _RSTL_RC_PTR #include "types.h" @@ -47,4 +47,4 @@ public: }; } // namespace rstl -#endif +#endif // _RSTL_RC_PTR diff --git a/include/rstl/red_black_tree.hpp b/include/rstl/red_black_tree.hpp index 2cd50f8a..64e452b0 100644 --- a/include/rstl/red_black_tree.hpp +++ b/include/rstl/red_black_tree.hpp @@ -1,5 +1,5 @@ -#ifndef _RSTL_RED_BLACK_TREE_HPP -#define _RSTL_RED_BLACK_TREE_HPP +#ifndef _RSTL_RED_BLACK_TREE +#define _RSTL_RED_BLACK_TREE #include "types.h" @@ -55,4 +55,5 @@ private: uint x10_; }; }; // namespace rstl -#endif + +#endif // _RSTL_RED_BLACK_TREE diff --git a/include/rstl/reserved_vector.hpp b/include/rstl/reserved_vector.hpp index a7bbc855..67e435b0 100644 --- a/include/rstl/reserved_vector.hpp +++ b/include/rstl/reserved_vector.hpp @@ -1,5 +1,5 @@ -#ifndef _RSTL_RESERVED_VECTOR_HPP -#define _RSTL_RESERVED_VECTOR_HPP +#ifndef _RSTL_RESERVED_VECTOR +#define _RSTL_RESERVED_VECTOR #include "types.h" @@ -62,4 +62,4 @@ public: }; } // namespace rstl -#endif +#endif // _RSTL_RESERVED_VECTOR diff --git a/include/rstl/rmemory_allocator.hpp b/include/rstl/rmemory_allocator.hpp index c1f7f9b5..5ccfddb3 100644 --- a/include/rstl/rmemory_allocator.hpp +++ b/include/rstl/rmemory_allocator.hpp @@ -1,5 +1,5 @@ -#ifndef _RSTL_RMEMORY_ALLOCATOR_HPP -#define _RSTL_RMEMORY_ALLOCATOR_HPP +#ifndef _RSTL_RMEMORY_ALLOCATOR +#define _RSTL_RMEMORY_ALLOCATOR #include "types.h" @@ -37,4 +37,4 @@ struct rmemory_allocator { }; } // namespace rstl -#endif +#endif // _RSTL_RMEMORY_ALLOCATOR diff --git a/include/rstl/single_ptr.hpp b/include/rstl/single_ptr.hpp index c543f860..c570b577 100644 --- a/include/rstl/single_ptr.hpp +++ b/include/rstl/single_ptr.hpp @@ -1,5 +1,5 @@ -#ifndef _RSTL_SINGLE_PTR_HPP -#define _RSTL_SINGLE_PTR_HPP +#ifndef _RSTL_SINGLE_PTR +#define _RSTL_SINGLE_PTR #include "types.h" @@ -16,9 +16,7 @@ public: // const T* get() const { return x0_ptr; } T* operator->() { return x0_ptr; } const T* operator->() const { return x0_ptr; } - single_ptr(const single_ptr& other) : x0_ptr(other.x0_ptr) { - other.x0_ptr = nullptr; - } + single_ptr(const single_ptr& other) : x0_ptr(other.x0_ptr) { other.x0_ptr = nullptr; } single_ptr& operator=(T* ptr) { delete x0_ptr; x0_ptr = ptr; @@ -38,4 +36,4 @@ typedef single_ptr< void > unk_singleptr; CHECK_SIZEOF(unk_singleptr, 0x4); } // namespace rstl -#endif +#endif // _RSTL_SINGLE_PTR diff --git a/include/rstl/string.hpp b/include/rstl/string.hpp index 17c18512..36e26310 100644 --- a/include/rstl/string.hpp +++ b/include/rstl/string.hpp @@ -1,5 +1,5 @@ -#ifndef _RSTL_STRING_HPP -#define _RSTL_STRING_HPP +#ifndef _RSTL_STRING +#define _RSTL_STRING #include "types.h" @@ -120,4 +120,4 @@ string string_l(const char* data); CHECK_SIZEOF(string, 0x10) } // namespace rstl -#endif +#endif // _RSTL_STRING diff --git a/include/rstl/vector.hpp b/include/rstl/vector.hpp index 7c887f49..52011a60 100644 --- a/include/rstl/vector.hpp +++ b/include/rstl/vector.hpp @@ -1,5 +1,5 @@ -#ifndef _RSTL_VECTOR_HPP -#define _RSTL_VECTOR_HPP +#ifndef _RSTL_VECTOR +#define _RSTL_VECTOR #include "types.h" @@ -112,15 +112,15 @@ public: protected: template < typename In > - void insert_into(iterator at, int n, In in);/* { - int insertAt = xc_items + n; - if (x8_capacity < insertAt) { - int newCapacity = x8_capacity != 0 ? x8_capacity * 2 : 4; - T* newData; - x0_allocator.allocate(newData, newCapacity); + void insert_into(iterator at, int n, In in); /* { + int insertAt = xc_items + n; + if (x8_capacity < insertAt) { + int newCapacity = x8_capacity != 0 ? x8_capacity * 2 : 4; + T* newData; + x0_allocator.allocate(newData, newCapacity); - } - }*/ + } + }*/ }; template < typename T, typename Alloc > @@ -161,4 +161,4 @@ typedef vector< void > unk_vector; CHECK_SIZEOF(unk_vector, 0x10) } // namespace rstl -#endif +#endif // _RSTL_VECTOR diff --git a/include/types.h b/include/types.h index 442a9ab8..6c27a93c 100644 --- a/include/types.h +++ b/include/types.h @@ -1,5 +1,5 @@ -#ifndef __TYPES_H__ -#define __TYPES_H__ +#ifndef _TYPES +#define _TYPES #ifdef __cplusplus #include "static_assert.hpp" @@ -22,4 +22,4 @@ typedef void* unkptr; } #endif -#endif +#endif // _TYPES diff --git a/libc/math.h b/libc/math.h index c4717d87..39468087 100644 --- a/libc/math.h +++ b/libc/math.h @@ -154,22 +154,23 @@ static inline int __fpclassifyd(double x) { #define isinf(x) (fpclassify(x) == FP_INFINITE) #define isfinite(x) ((fpclassify(x) > FP_INFINITE)) -inline float sqrtf(float x) -{ - const double _half=.5; - const double _three=3.0; - volatile float y; +inline float sqrtf(float x) { + const double _half = .5; + const double _three = 3.0; + volatile float y; - if(x > 0.0f) - { - double guess = __frsqrte((double)x); /* returns an approximation to */ - guess = _half*guess*(_three - guess*guess*x); /* now have 12 sig bits */ - guess = _half*guess*(_three - guess*guess*x); /* now have 24 sig bits */ - guess = _half*guess*(_three - guess*guess*x); /* now have 32 sig bits */ - y=(float)(x*guess); - return y ; - } - return x ; + if (x > 0.0f) { + double guess = __frsqrte((double)x); /* returns an approximation to */ + guess = _half * guess * (_three - guess * guess * x); /* now have 12 sig bits + */ + guess = _half * guess * (_three - guess * guess * x); /* now have 24 sig bits + */ + guess = _half * guess * (_three - guess * guess * x); /* now have 32 sig bits + */ + y = (float)(x * guess); + return y; + } + return x; } static inline double sqrt(double x) {