2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 01:07:43 +00:00

ITweakGunRes: Make use of std::array where applicable

Deduplicates a few array sizes and makes the member variables more
strongly typed.
This commit is contained in:
Lioncash
2020-02-25 15:43:25 -05:00
parent b608a72aad
commit e80d9c7192
3 changed files with 25 additions and 16 deletions

View File

@@ -107,8 +107,8 @@ void CPlayerGun::InitBombData() {
}
void CPlayerGun::InitMuzzleData() {
for (int i = 0; i < 5; ++i) {
x7c0_auxMuzzleEffects.push_back(g_SimplePool->GetObj(SObjectTag{FOURCC('PART'), g_tweakGunRes->xa4_auxMuzzle[i]}));
for (const auto muzzleID : g_tweakGunRes->xa4_auxMuzzle) {
x7c0_auxMuzzleEffects.push_back(g_SimplePool->GetObj(SObjectTag{FOURCC('PART'), muzzleID}));
x800_auxMuzzleGenerators.emplace_back(std::make_unique<CElementGen>(x7c0_auxMuzzleEffects.back()));
x800_auxMuzzleGenerators.back()->SetParticleEmission(false);
}