diff --git a/include/s/README.txt b/include/s/README.txt index 99281a97..5be519ee 100644 --- a/include/s/README.txt +++ b/include/s/README.txt @@ -5,7 +5,8 @@ with differences/modifications outlined below: The NSMBW code uses inlined destructors. In SS, these destructors are all part of the s_StateID.cpp(?) TU, and pretty much every generic instantiation of the state manager (which for a large part are in RELs) -will call back into those destructors in the main DOL. +will call back into those destructors in the main DOL. As a result, the destructors were made not inline +and explicitly instantiated in s_StateID.cpp ## s_StateIDChk.hpp diff --git a/include/s/docgroup.h b/include/s/docgroup.h index a99aa2fb..43c81fd9 100644 --- a/include/s/docgroup.h +++ b/include/s/docgroup.h @@ -1,4 +1,6 @@ -#pragma once +#ifndef S_DOCGROUP_H +#define S_DOCGROUP_H + // [This header file defines documentation groups for better categorization] /// @ingroup game @@ -8,3 +10,5 @@ /// @defgroup state sState /// @ingroup slib /// @brief A state system implementation. + +#endif diff --git a/include/s/s_FState.hpp b/include/s/s_FState.hpp index a883d6f3..5ce14991 100644 --- a/include/s/s_FState.hpp +++ b/include/s/s_FState.hpp @@ -1,4 +1,6 @@ -#pragma once +#ifndef S_FSTATE_H +#define S_FSTATE_H + #include #include @@ -42,3 +44,5 @@ private: T &mpOwner; ///< The owner of this state. const sFStateID_c *mpID; ///< The state ID that runs the state methods. }; + +#endif diff --git a/include/s/s_FStateFct.hpp b/include/s/s_FStateFct.hpp index 3d349d3e..cb488d2d 100644 --- a/include/s/s_FStateFct.hpp +++ b/include/s/s_FStateFct.hpp @@ -1,4 +1,6 @@ -#pragma once +#ifndef S_FSTATEFCT_H +#define S_FSTATEFCT_H + #include #include #include @@ -27,3 +29,5 @@ public: private: sFState_c mState; }; + +#endif diff --git a/include/s/s_FStateID.hpp b/include/s/s_FStateID.hpp index 7ea2295a..5fd05476 100644 --- a/include/s/s_FStateID.hpp +++ b/include/s/s_FStateID.hpp @@ -1,4 +1,6 @@ -#pragma once +#ifndef S_FSTATEID_H +#define S_FSTATEID_H + #include #include @@ -59,3 +61,5 @@ private: stateFunc mpExecute; ///< The execute method for this state ID. stateFunc mpFinalize; ///< The finalize method for this state ID. }; + +#endif diff --git a/include/s/s_FStateMgr.hpp b/include/s/s_FStateMgr.hpp index f154cbb6..a001ffea 100644 --- a/include/s/s_FStateMgr.hpp +++ b/include/s/s_FStateMgr.hpp @@ -1,4 +1,6 @@ -#pragma once +#ifndef S_FSTATEMGR_H +#define S_FSTATEMGR_H + #include #include #include @@ -18,3 +20,5 @@ public: sFStateMgr_c(T &owner, const sStateIDIf_c &initializeState) : sStateMgr_c(owner, initializeState) {} }; + +#endif diff --git a/include/s/s_Phase.hpp b/include/s/s_Phase.hpp index 4b3d6403..596484b6 100644 --- a/include/s/s_Phase.hpp +++ b/include/s/s_Phase.hpp @@ -1,4 +1,5 @@ -#pragma once +#ifndef S_PHASE_H +#define S_PHASE_H // Note: Ported from https://github.com/NSMBW-Community/NSMBW-Decomp/tree/master/include/dol/sLib // See include/s/README.txt for changes made @@ -35,3 +36,5 @@ public: unsigned short mPhaseLength; ///< The length of the method list. unsigned short mCurrMethod; ///< The index of the method to execute. }; + +#endif diff --git a/include/s/s_State.hpp b/include/s/s_State.hpp index 8a7079f9..97a5847e 100644 --- a/include/s/s_State.hpp +++ b/include/s/s_State.hpp @@ -1,4 +1,6 @@ -#pragma once +#ifndef S_STATE_H +#define S_STATE_H + #include #include @@ -15,3 +17,5 @@ &class::initializeState_##name, \ &class::executeState_##name, \ &class::finalizeState_##name) + +#endif diff --git a/include/s/s_StateID.hpp b/include/s/s_StateID.hpp index e74d155e..422d9143 100644 --- a/include/s/s_StateID.hpp +++ b/include/s/s_StateID.hpp @@ -1,4 +1,6 @@ -#pragma once +#ifndef S_STATEID_H +#define S_STATEID_H + #include // Note: Ported from https://github.com/NSMBW-Community/NSMBW-Decomp/tree/master/include/dol/sLib @@ -44,3 +46,5 @@ namespace sStateID { /// @ingroup state extern sStateID_c null; ///< A null state instance. } + +#endif diff --git a/include/s/s_StateIDChk.hpp b/include/s/s_StateIDChk.hpp index c808ad8b..5237cbaf 100644 --- a/include/s/s_StateIDChk.hpp +++ b/include/s/s_StateIDChk.hpp @@ -1,4 +1,6 @@ -#pragma once +#ifndef S_STATEIDCHK_H +#define S_STATEIDCHK_H + #include // Note: Ported from https://github.com/NSMBW-Community/NSMBW-Decomp/tree/master/include/dol/sLib @@ -11,3 +13,5 @@ public: virtual ~sStateIDChk_c(); virtual bool isNormalID(const sStateIDIf_c &) const { return true; } }; + +#endif diff --git a/include/s/s_StateInterfaces.hpp b/include/s/s_StateInterfaces.hpp index 0acd6f80..8e28f44c 100644 --- a/include/s/s_StateInterfaces.hpp +++ b/include/s/s_StateInterfaces.hpp @@ -1,4 +1,5 @@ -#pragma once +#ifndef S_STATEINTERFACES_H +#define S_STATEINTERFACES_H // Note: Ported from https://github.com/NSMBW-Community/NSMBW-Decomp/tree/master/include/dol/sLib // See include/s/README.txt for changes made @@ -74,3 +75,5 @@ public: }; /// @} + +#endif diff --git a/include/s/s_StateMethod.hpp b/include/s/s_StateMethod.hpp index 4feb0c6a..4d7b630d 100644 --- a/include/s/s_StateMethod.hpp +++ b/include/s/s_StateMethod.hpp @@ -1,4 +1,6 @@ -#pragma once +#ifndef S_STATEMETHOD_H +#define S_STATEMETHOD_H + #include // Note: Ported from https://github.com/NSMBW-Community/NSMBW-Decomp/tree/master/include/dol/sLib @@ -50,3 +52,5 @@ protected: sStateIf_c *mpState; ///< The current state holder. }; + +#endif diff --git a/include/s/s_StateMethodUsr_FI.hpp b/include/s/s_StateMethodUsr_FI.hpp index 8104557f..a18516df 100644 --- a/include/s/s_StateMethodUsr_FI.hpp +++ b/include/s/s_StateMethodUsr_FI.hpp @@ -1,4 +1,6 @@ -#pragma once +#ifndef S_STATEMETHODUSR_FI_H +#define S_STATEMETHODUSR_FI_H + #include // Note: Ported from https://github.com/NSMBW-Community/NSMBW-Decomp/tree/master/include/dol/sLib @@ -17,3 +19,5 @@ public: virtual void finalizeStateLocalMethod(); virtual void changeStateLocalMethod(const sStateIDIf_c &newStateID); }; + +#endif diff --git a/include/s/s_StateMgr.hpp b/include/s/s_StateMgr.hpp index 66d07020..c043eb71 100644 --- a/include/s/s_StateMgr.hpp +++ b/include/s/s_StateMgr.hpp @@ -1,4 +1,6 @@ -#pragma once +#ifndef S_STATEMGR_H +#define S_STATEMGR_H + #include // Note: Ported from https://github.com/NSMBW-Community/NSMBW-Decomp/tree/master/include/dol/sLib @@ -38,3 +40,5 @@ private: Factory mFactory; Method mMethod; }; + +#endif