NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
s_GlobalData.hpp
1#pragma once
2
3/**
4 * @brief A templated global data holder class.
5 * @tparam T The class that contains the global data struct.
6 * @unofficial
7 */
8template <typename T>
10public:
11 static const typename T::GlobalData_t mData; ///< @unofficial
12};
13
14// Some beautiful template magic to get quick access to the global data of a class.
15
16template <class T>
17struct remove_reference { typedef T type; };
18template <class T>
19struct remove_reference<T&> { typedef T type; };
20
21#define GLOBAL_DATA sGlobalData_c<remove_reference<decltype(*this)>::type>::mData
A templated global data holder class.
static const T::GlobalData_t mData