2
0
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:
Jack Andersen
2016-04-14 17:26:01 -10:00
parent c91bfade75
commit 86c21a77ac
12 changed files with 70 additions and 66 deletions

View File

@@ -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)];
}