mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 23:07:42 +00:00
Function-scope statics aren't as efficient as file-scope ones
This commit is contained in:
@@ -113,21 +113,25 @@ void CPlayerState::PutTo(CBitStreamWriter &stream)
|
||||
stream.WriteEncoded(x184_, CBitStreamWriter::GetBitCount(0x100));
|
||||
}
|
||||
|
||||
static const float unk[]
|
||||
{
|
||||
0.2f, 0.1f, 0.2f, 0.2f, 1.f
|
||||
};
|
||||
|
||||
float CPlayerState::sub_80091204() const
|
||||
{
|
||||
static const float unk[] {
|
||||
0.2f, 0.1f, 0.2f, 0.2f, 1.f
|
||||
};
|
||||
|
||||
|
||||
return unk[u32(x8_currentBeam)];
|
||||
}
|
||||
|
||||
static const u32 costs[]
|
||||
{
|
||||
5, 10, 10, 10, 1
|
||||
};
|
||||
|
||||
u32 CPlayerState::GetMissileCostForAltAttack() const
|
||||
{
|
||||
static const u32 costs[] {
|
||||
5, 10, 10, 10, 1
|
||||
};
|
||||
|
||||
return costs[u32(x8_currentBeam)];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user