mirror of https://github.com/AxioDL/metaforce.git
CCollisionResponseData: Join vector initializations into constructor initializer list
Generally provides marginally better code generation. We can also fill x10_sfx with the invalid SFX constant at the same time instead of performing a resize and then filling it again.
This commit is contained in:
parent
3d67088697
commit
9c391f90e3
|
@ -155,13 +155,7 @@ bool CCollisionResponseData::CheckAndAddResourceToResponse(FourCC clsId, CInputS
|
||||||
}
|
}
|
||||||
|
|
||||||
CCollisionResponseData::CCollisionResponseData(CInputStream& in, CSimplePool* resPool)
|
CCollisionResponseData::CCollisionResponseData(CInputStream& in, CSimplePool* resPool)
|
||||||
: x30_RNGE(50.f), x34_FOFF(0.2f) {
|
: x0_generators(94), x10_sfx(94, kInvalidSFX), x20_decals(94), x30_RNGE(50.f), x34_FOFF(0.2f) {
|
||||||
x0_generators.resize(94);
|
|
||||||
x10_sfx.resize(94);
|
|
||||||
x20_decals.resize(94);
|
|
||||||
for (s32& id : x10_sfx)
|
|
||||||
id = kInvalidSFX;
|
|
||||||
|
|
||||||
FourCC clsId = CPF::GetClassID(in);
|
FourCC clsId = CPF::GetClassID(in);
|
||||||
if (clsId == UncookedResType()) {
|
if (clsId == UncookedResType()) {
|
||||||
CRandom16 rand;
|
CRandom16 rand;
|
||||||
|
|
Loading…
Reference in New Issue