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

Runtime/World: Replace bitfield unions with constructor initializers

This commit is contained in:
2020-04-11 01:50:10 -04:00
parent 22880abb7e
commit bb7e94f304
69 changed files with 583 additions and 657 deletions

View File

@@ -34,27 +34,37 @@ CActor::CActor(TUniqueId uid, bool active, std::string_view name, const CEntityI
, x34_transform(xf)
, x68_material(MakeActorMaterialList(list, params))
, x70_materialFilter(CMaterialFilter::MakeIncludeExclude({EMaterialTypes::Solid}, {0ull}))
, xc6_nextDrawNode(otherUid) {
, xc6_nextDrawNode(otherUid)
, xe4_24_nextNonLoopingSfxHandle(0)
, xe4_27_notInSortedLists(true)
, xe4_28_transformDirty(true)
, xe4_29_actorLightsDirty(true)
, xe4_30_outOfFrustum(false)
, xe4_31_calculateLighting(true)
, xe5_24_shadowEnabled(false)
, xe5_25_shadowDirty(false)
, xe5_26_muted(false)
, xe5_27_useInSortedLists(true)
, xe5_28_callTouch(true)
, xe5_29_globalTimeProvider(params.x58_24_globalTimeProvider)
, xe5_30_renderUnsorted(params.x58_26_renderUnsorted)
, xe5_31_pointGeneratorParticles(false)
, xe6_24_fluidCounter(0)
, xe6_27_thermalVisorFlags(u8(params.x58_25_thermalHeat ? 2 : 1))
, xe6_29_renderParticleDBInside(true)
, xe6_30_enablePitchBend(false)
, xe6_31_targetableVisorFlags(params.GetVisorParameters().GetMask())
, xe7_27_enableRender(true)
, xe7_28_worldLightingDirty(false)
, xe7_29_drawEnabled(active)
, xe7_30_doTargetDistanceTest(true)
, xe7_31_targetable(true) {
x90_actorLights = mData.IsNull() ? nullptr : params.x0_lightParms.MakeActorLights();
if (mData.x10_animData || mData.x1c_normalModel)
x64_modelData = std::make_unique<CModelData>(std::move(mData));
xd0_damageMag = params.x64_thermalMag;
xd8_nonLoopingSfxHandles.resize(2);
xe4_27_notInSortedLists = true;
xe4_28_transformDirty = true;
xe4_29_actorLightsDirty = true;
xe4_31_calculateLighting = true;
xe5_27_useInSortedLists = true;
xe5_28_callTouch = true;
xe5_29_globalTimeProvider = params.x58_24_globalTimeProvider;
xe5_30_renderUnsorted = params.x58_26_renderUnsorted;
xe6_27_thermalVisorFlags = u8(params.x58_25_thermalHeat ? 2 : 1);
xe6_29_renderParticleDBInside = true;
xe6_31_targetableVisorFlags = params.GetVisorParameters().GetMask();
xe7_27_enableRender = true;
xe7_29_drawEnabled = active;
xe7_30_doTargetDistanceTest = true;
xe7_31_targetable = true;
if (x64_modelData) {
if (params.x44_xrayAssets.first.IsValid())
x64_modelData->SetXRayModel(params.x44_xrayAssets);