mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 18:24:55 +00:00
CPlayerState: Move arrays into an anonymous namespace where applicable
Keeps local arrays together and makes it impossible to accidentally violate the ODR.
This commit is contained in:
@@ -90,8 +90,6 @@ public:
|
||||
|
||||
private:
|
||||
static const std::unordered_map<std::string_view, EItemType> g_TypeNameMap;
|
||||
static const u32 PowerUpMaxValues[41];
|
||||
static const char* PowerUpNames[41];
|
||||
struct CPowerUp {
|
||||
u32 x0_amount = 0;
|
||||
u32 x4_capacity = 0;
|
||||
@@ -176,7 +174,7 @@ public:
|
||||
CPlayerState();
|
||||
CPlayerState(CBitStreamReader& stream);
|
||||
void PutTo(CBitStreamWriter& stream);
|
||||
static u32 GetPowerUpMaxValue(EItemType type) { return PowerUpMaxValues[u32(type)]; }
|
||||
static u32 GetPowerUpMaxValue(EItemType type);
|
||||
static EItemType ItemNameToType(std::string_view name);
|
||||
bool CanTakeDamage() const { return m_canTakeDamage; }
|
||||
void SetCanTakeDamage(bool c) { m_canTakeDamage = c; }
|
||||
|
||||
Reference in New Issue
Block a user