From fa3e639a9d0a9b0c18f0aa5b1f589a05fde0a406 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 21 Apr 2020 03:22:41 -0400 Subject: [PATCH] RuntimeCommon: Make use of bitfield initializers where applicable Continues and finishes the migration towards initializing all bitfield members where applicable --- Runtime/Audio/CSfxManager.hpp | 20 +++---- Runtime/Audio/CStreamAudioManager.cpp | 10 ++-- Runtime/Camera/CBallCamera.cpp | 23 -------- Runtime/Camera/CBallCamera.hpp | 44 +++++++-------- Runtime/Camera/CCameraManager.cpp | 8 +-- Runtime/Camera/CCameraManager.hpp | 10 ++-- Runtime/Camera/CFirstPersonCamera.cpp | 1 - Runtime/Camera/CFirstPersonCamera.hpp | 2 +- Runtime/Camera/CGameCamera.cpp | 1 - Runtime/Camera/CGameCamera.hpp | 2 +- Runtime/Camera/CInterpolationCamera.cpp | 3 +- Runtime/Camera/CInterpolationCamera.hpp | 2 +- Runtime/Character/CActorLights.cpp | 9 +-- Runtime/Character/CActorLights.hpp | 14 ++--- Runtime/Character/CAnimData.cpp | 8 --- Runtime/Character/CAnimData.hpp | 16 +++--- Runtime/Character/CAnimTreeTweenBase.cpp | 5 +- Runtime/Character/CAnimTreeTweenBase.hpp | 2 +- Runtime/Character/CBodyController.cpp | 7 +-- Runtime/Character/CBodyController.hpp | 10 ++-- Runtime/Character/CBodyState.hpp | 46 +++++++-------- Runtime/Character/CBodyStateCmdMgr.hpp | 61 +++++++------------- Runtime/Character/CBoneTracking.cpp | 2 - Runtime/Character/CBoneTracking.hpp | 4 +- Runtime/Character/CIkChain.hpp | 4 +- Runtime/Character/CModelData.cpp | 6 +- Runtime/Character/CModelData.hpp | 4 +- Runtime/Character/CParticleDatabase.cpp | 5 +- Runtime/Character/CParticleDatabase.hpp | 4 +- Runtime/Character/CRagDoll.cpp | 3 - Runtime/Character/CRagDoll.hpp | 15 ++--- Runtime/Collision/CMetroidAreaCollider.cpp | 4 +- Runtime/Collision/CMetroidAreaCollider.hpp | 9 ++- Runtime/Graphics/CBooRenderer.cpp | 12 +--- Runtime/Graphics/CBooRenderer.hpp | 20 +++---- Runtime/Graphics/CDrawablePlaneObject.hpp | 11 ++-- Runtime/Graphics/CLight.cpp | 8 +-- Runtime/Graphics/CLight.hpp | 9 +-- Runtime/Graphics/CModel.hpp | 4 +- Runtime/Graphics/CModelBoo.cpp | 2 - Runtime/Graphics/CMoviePlayer.cpp | 2 - Runtime/Graphics/CMoviePlayer.hpp | 4 +- Runtime/Graphics/CRainSplashGenerator.cpp | 2 - Runtime/Graphics/CRainSplashGenerator.hpp | 4 +- Runtime/Graphics/CSimpleShadow.cpp | 6 +- Runtime/Graphics/CSimpleShadow.hpp | 6 +- Runtime/MP1/CArtifactDoll.cpp | 1 - Runtime/MP1/CArtifactDoll.hpp | 2 +- Runtime/MP1/CFrontEndUI.cpp | 2 +- Runtime/MP1/CFrontEndUI.hpp | 4 +- Runtime/MP1/CGameCubeDoll.cpp | 1 - Runtime/MP1/CGameCubeDoll.hpp | 2 +- Runtime/MP1/CInGameGuiManager.cpp | 6 +- Runtime/MP1/CInGameGuiManager.hpp | 8 +-- Runtime/MP1/CLogBookScreen.cpp | 5 +- Runtime/MP1/CLogBookScreen.hpp | 6 +- Runtime/MP1/CMFGame.cpp | 7 +-- Runtime/MP1/CMFGame.hpp | 8 +-- Runtime/MP1/CMessageScreen.cpp | 1 - Runtime/MP1/CMessageScreen.hpp | 2 +- Runtime/MP1/COptionsScreen.cpp | 5 +- Runtime/MP1/COptionsScreen.hpp | 2 +- Runtime/MP1/CPauseScreen.cpp | 5 -- Runtime/MP1/CPauseScreen.hpp | 20 +++---- Runtime/MP1/CPauseScreenBase.cpp | 17 +----- Runtime/MP1/CPauseScreenBase.hpp | 24 ++++---- Runtime/MP1/CPauseScreenBlur.cpp | 3 +- Runtime/MP1/CPauseScreenBlur.hpp | 4 +- Runtime/MP1/CPlayMovie.cpp | 8 +-- Runtime/MP1/CPlayMovie.hpp | 8 +-- Runtime/MP1/CPlayerVisor.cpp | 2 - Runtime/MP1/CPlayerVisor.hpp | 4 +- Runtime/MP1/CSamusDoll.cpp | 8 +-- Runtime/MP1/CSamusDoll.hpp | 12 ++-- Runtime/MP1/CSamusHud.cpp | 3 - Runtime/MP1/CSamusHud.hpp | 6 +- Runtime/MP1/CSlideShow.cpp | 15 +---- Runtime/MP1/CSlideShow.hpp | 22 ++++---- Runtime/MP1/MP1.cpp | 12 +--- Runtime/MP1/MP1.hpp | 18 +++--- Runtime/MP1/World/CAtomicAlpha.cpp | 1 - Runtime/MP1/World/CAtomicAlpha.hpp | 2 +- Runtime/MP1/World/CBabygoth.cpp | 16 +----- Runtime/MP1/World/CBabygoth.hpp | 28 ++++----- Runtime/MP1/World/CBeetle.cpp | 5 +- Runtime/MP1/World/CBeetle.hpp | 6 +- Runtime/MP1/World/CBouncyGrenade.cpp | 4 +- Runtime/MP1/World/CBouncyGrenade.hpp | 4 +- Runtime/MP1/World/CChozoGhost.cpp | 12 ---- Runtime/MP1/World/CChozoGhost.hpp | 24 ++++---- Runtime/MP1/World/CElitePirate.cpp | 12 +--- Runtime/MP1/World/CElitePirate.hpp | 20 +++---- Runtime/MP1/World/CEyeball.cpp | 25 ++++---- Runtime/MP1/World/CEyeball.hpp | 13 +++-- Runtime/MP1/World/CFlaahgra.cpp | 15 ----- Runtime/MP1/World/CFlaahgra.hpp | 30 +++++----- Runtime/MP1/World/CFlaahgraTentacle.cpp | 1 - Runtime/MP1/World/CFlaahgraTentacle.hpp | 2 +- Runtime/MP1/World/CFlickerBat.cpp | 3 - Runtime/MP1/World/CFlickerBat.hpp | 6 +- Runtime/MP1/World/CFlyingPirate.cpp | 22 +------- Runtime/MP1/World/CFlyingPirate.hpp | 44 +++++++-------- Runtime/MP1/World/CJellyZap.cpp | 2 - Runtime/MP1/World/CJellyZap.hpp | 4 +- Runtime/MP1/World/CMetroid.cpp | 3 +- Runtime/MP1/World/CMetroid.hpp | 2 +- Runtime/MP1/World/CMetroidBeta.cpp | 10 +--- Runtime/MP1/World/CMetroidBeta.hpp | 16 +++--- Runtime/MP1/World/CParasite.cpp | 14 +---- Runtime/MP1/World/CParasite.hpp | 24 ++++---- Runtime/MP1/World/CPhazonPool.cpp | 3 +- Runtime/MP1/World/CPhazonPool.hpp | 2 +- Runtime/MP1/World/CPuddleSpore.cpp | 4 +- Runtime/MP1/World/CPuddleSpore.hpp | 4 +- Runtime/MP1/World/CPuddleToadGamma.cpp | 5 +- Runtime/MP1/World/CPuddleToadGamma.hpp | 6 +- Runtime/MP1/World/CRidley.cpp | 25 -------- Runtime/MP1/World/CRidley.hpp | 54 +++++++++--------- Runtime/MP1/World/CRipper.cpp | 3 +- Runtime/MP1/World/CRipper.hpp | 2 +- Runtime/MP1/World/CSeedling.cpp | 4 +- Runtime/MP1/World/CSeedling.hpp | 4 +- Runtime/MP1/World/CSpacePirate.cpp | 33 ----------- Runtime/MP1/World/CSpacePirate.hpp | 66 +++++++++++----------- Runtime/MP1/World/CThardus.hpp | 4 +- Runtime/MP1/World/CTryclops.cpp | 6 +- Runtime/MP1/World/CTryclops.hpp | 8 +-- Runtime/MP1/World/CWarWasp.cpp | 9 +-- Runtime/MP1/World/CWarWasp.hpp | 14 ++--- 129 files changed, 467 insertions(+), 866 deletions(-) diff --git a/Runtime/Audio/CSfxManager.hpp b/Runtime/Audio/CSfxManager.hpp index 2e4e6a155..f3b60285f 100644 --- a/Runtime/Audio/CSfxManager.hpp +++ b/Runtime/Audio/CSfxManager.hpp @@ -60,16 +60,16 @@ public: s16 xa_prio; // CSfxHandle xc_handle; TAreaId x10_area; - bool x14_24_isActive : 1; - bool x14_25_isPlaying : 1; + bool x14_24_isActive : 1 = true; + bool x14_25_isPlaying : 1 = false; bool x14_26_looped : 1; - bool x14_27_inArea : 1; - bool x14_28_isReleased : 1; + bool x14_27_inArea : 1 = true; + bool x14_28_isReleased : 1 = false; bool x14_29_useAcoustics : 1; protected: - bool m_isEmitter : 1; - bool m_isClosed : 1; + bool m_isEmitter : 1 = false; + bool m_isClosed : 1 = false; public: virtual ~CBaseSfxWrapper() = default; @@ -112,14 +112,8 @@ public: CBaseSfxWrapper(bool looped, s16 prio, /*const CSfxHandle& handle,*/ bool useAcoustics, TAreaId area) : xa_prio(prio) , /*xc_handle(handle),*/ x10_area(area) - , x14_24_isActive(true) - , x14_25_isPlaying(false) , x14_26_looped(looped) - , x14_27_inArea(true) - , x14_28_isReleased(false) - , x14_29_useAcoustics(useAcoustics) - , m_isEmitter(false) - , m_isClosed(false) {} + , x14_29_useAcoustics(useAcoustics) {} }; class CSfxEmitterWrapper : public CBaseSfxWrapper { diff --git a/Runtime/Audio/CStreamAudioManager.cpp b/Runtime/Audio/CStreamAudioManager.cpp index ba6c4db21..ffc9ef0f5 100644 --- a/Runtime/Audio/CStreamAudioManager.cpp +++ b/Runtime/Audio/CStreamAudioManager.cpp @@ -446,9 +446,9 @@ public: private: dspadpcm_header x0_header; std::string x60_fileName; // arg1 - bool x70_24_unclaimed : 1; - bool x70_25_headerReadCancelled : 1; - u8 x70_26_headerReadState : 2; // 0: not read 1: reading 2: read + bool x70_24_unclaimed : 1 = true; + bool x70_25_headerReadCancelled : 1 = false; + u8 x70_26_headerReadState : 2 = 0; // 0: not read 1: reading 2: read s8 x71_companionRight = -1; s8 x72_companionLeft = -1; float x73_volume = 0.f; @@ -460,13 +460,11 @@ private: static std::array g_Streams; public: - CDSPStreamManager() : x70_24_unclaimed(true), x70_25_headerReadCancelled(false), x70_26_headerReadState(0) {} + CDSPStreamManager() = default; CDSPStreamManager(std::string_view fileName, s32 handle, float volume, bool oneshot) : x60_fileName(fileName) , x70_24_unclaimed(!CDvdFile::FileExists(fileName)) - , x70_25_headerReadCancelled(false) - , x70_26_headerReadState(0) , x73_volume(volume) , x74_oneshot(oneshot) , x78_handleId(handle) {} diff --git a/Runtime/Camera/CBallCamera.cpp b/Runtime/Camera/CBallCamera.cpp index 0f24b66e9..6a43ab13d 100644 --- a/Runtime/Camera/CBallCamera.cpp +++ b/Runtime/Camera/CBallCamera.cpp @@ -57,34 +57,11 @@ CBallCamera::CBallCamera(TUniqueId uid, TUniqueId watchedId, const zeus::CTransf , x250_ballCameraCentroidDistanceSpring(g_tweakBall->GetBallCameraCentroidDistanceSpringConstant(), g_tweakBall->GetBallCameraCentroidDistanceSpringMax(), g_tweakBall->GetBallCameraCentroidDistanceSpringTardis()) -, x37c_camSpline(false) , x41c_ballCameraChaseSpring(g_tweakBall->GetBallCameraChaseSpringConstant(), g_tweakBall->GetBallCameraChaseSpringMax(), g_tweakBall->GetBallCameraChaseSpringTardis()) , x448_ballCameraBoostSpring(g_tweakBall->GetBallCameraBoostSpringConstant(), g_tweakBall->GetBallCameraBoostSpringMax(), g_tweakBall->GetBallCameraBoostSpringTardis()) { - x18c_24_ = true; - x18c_25_chaseAllowed = true; - x18c_26_boostAllowed = true; - x18c_27_obscureAvoidance = true; - x18c_28_volumeCollider = true; - x18c_29_clampAttitude = false; - x18c_30_clampAzimuth = false; - x18c_31_clearLOS = true; - x18d_24_prevClearLOS = true; - x18d_25_avoidGeometryFull = false; - x18d_26_lookAtBall = false; - x18d_27_forceProcessing = false; - x18d_28_obtuseDirection = false; - x18d_29_noElevationInterp = false; - x18d_30_directElevation = false; - x18d_31_overrideLookDir = false; - x18e_24_noElevationVelClamp = false; - x18e_25_noSpline = false; - x18e_26_ = false; - x18e_27_nearbyDoorClosed = false; - x18e_28_nearbyDoorClosing = false; - x190_curMinDistance = g_tweakBall->GetBallCameraMinSpeedDistance(); x194_targetMinDistance = g_tweakBall->GetBallCameraMinSpeedDistance(); x198_maxDistance = g_tweakBall->GetBallCameraMaxSpeedDistance(); diff --git a/Runtime/Camera/CBallCamera.hpp b/Runtime/Camera/CBallCamera.hpp index dcc6572b8..6fdc1e338 100644 --- a/Runtime/Camera/CBallCamera.hpp +++ b/Runtime/Camera/CBallCamera.hpp @@ -79,27 +79,27 @@ private: }; EBallCameraBehaviour x188_behaviour = EBallCameraBehaviour::Default; - bool x18c_24_ : 1; - bool x18c_25_chaseAllowed : 1; - bool x18c_26_boostAllowed : 1; - bool x18c_27_obscureAvoidance : 1; - bool x18c_28_volumeCollider : 1; - bool x18c_29_clampAttitude : 1; - bool x18c_30_clampAzimuth : 1; - bool x18c_31_clearLOS : 1; - bool x18d_24_prevClearLOS : 1; - bool x18d_25_avoidGeometryFull : 1; - bool x18d_26_lookAtBall : 1; - bool x18d_27_forceProcessing : 1; - bool x18d_28_obtuseDirection : 1; - bool x18d_29_noElevationInterp : 1; - bool x18d_30_directElevation : 1; - bool x18d_31_overrideLookDir : 1; - bool x18e_24_noElevationVelClamp : 1; - bool x18e_25_noSpline : 1; - bool x18e_26_ : 1; - bool x18e_27_nearbyDoorClosed : 1; - bool x18e_28_nearbyDoorClosing : 1; + bool x18c_24_ : 1 = true; + bool x18c_25_chaseAllowed : 1 = true; + bool x18c_26_boostAllowed : 1 = true; + bool x18c_27_obscureAvoidance : 1 = true; + bool x18c_28_volumeCollider : 1 = true; + bool x18c_29_clampAttitude : 1 = false; + bool x18c_30_clampAzimuth : 1 = false; + bool x18c_31_clearLOS : 1 = true; + bool x18d_24_prevClearLOS : 1 = true; + bool x18d_25_avoidGeometryFull : 1 = false; + bool x18d_26_lookAtBall : 1 = false; + bool x18d_27_forceProcessing : 1 = false; + bool x18d_28_obtuseDirection : 1 = false; + bool x18d_29_noElevationInterp : 1 = false; + bool x18d_30_directElevation : 1 = false; + bool x18d_31_overrideLookDir : 1 = false; + bool x18e_24_noElevationVelClamp : 1 = false; + bool x18e_25_noSpline : 1 = false; + bool x18e_26_ : 1 = false; + bool x18e_27_nearbyDoorClosed : 1 = false; + bool x18e_28_nearbyDoorClosing : 1 = false; float x190_curMinDistance; float x194_targetMinDistance; float x198_maxDistance; @@ -153,7 +153,7 @@ private: bool x370_24_reevalSplineEnd : 1; float x374_splineCtrl = 0.f; float x378_splineCtrlRange; - CCameraSpline x37c_camSpline; + CCameraSpline x37c_camSpline{false}; CMaterialList x3c8_collisionExcludeList = {EMaterialTypes::NoStepLogic}; bool x3d0_24_camBehindFloorOrWall : 1; float x3d4_elevInterpTimer = 0.f; diff --git a/Runtime/Camera/CCameraManager.cpp b/Runtime/Camera/CCameraManager.cpp index f2a61f4f7..2f2fc6919 100644 --- a/Runtime/Camera/CCameraManager.cpp +++ b/Runtime/Camera/CCameraManager.cpp @@ -21,13 +21,7 @@ namespace urde { float CCameraManager::sFirstPersonFOV = 55.f; -CCameraManager::CCameraManager(TUniqueId curCameraId) -: x0_curCameraId(curCameraId) -, xa0_24_pendingRumble(false) -, xa0_25_rumbling(false) -, xa0_26_inWater(false) -, x3b8_24_(false) -, x3b8_25_(false) { +CCameraManager::CCameraManager(TUniqueId curCameraId) : x0_curCameraId(curCameraId) { CSfxManager::AddListener(CSfxManager::ESfxChannels::Game, zeus::skZero3f, zeus::skZero3f, {1.f, 0.f, 0.f}, {0.f, 0.f, 1.f}, 50.f, 50.f, 1000.f, 1, 1.f); sFirstPersonFOV = g_tweakGame->GetFirstPersonFOV(); diff --git a/Runtime/Camera/CCameraManager.hpp b/Runtime/Camera/CCameraManager.hpp index 60b5edd40..3c43ba103 100644 --- a/Runtime/Camera/CCameraManager.hpp +++ b/Runtime/Camera/CCameraManager.hpp @@ -40,9 +40,9 @@ class CCameraManager { float x94_fogDensityFactor = 1.f; float x98_fogDensitySpeed = 0.f; float x9c_fogDensityFactorTarget = 1.f; - bool xa0_24_pendingRumble : 1; - bool xa0_25_rumbling : 1; - bool xa0_26_inWater : 1; + bool xa0_24_pendingRumble : 1 = false; + bool xa0_25_rumbling : 1 = false; + bool xa0_26_inWater : 1 = false; TUniqueId xa2_spindleCamId = kInvalidUniqueId; TUniqueId xa4_pathCamId = kInvalidUniqueId; TUniqueId xa6_camHintId = kInvalidUniqueId; @@ -50,8 +50,8 @@ class CCameraManager { rstl::reserved_vector, 64> xac_cameraHints; rstl::reserved_vector x2b0_inactiveCameraHints; rstl::reserved_vector x334_activeCameraHints; - bool x3b8_24_ : 1; - bool x3b8_25_ : 1; + bool x3b8_24_ : 1 = false; + bool x3b8_25_ : 1 = false; float x3bc_curFov = 60.f; void SetPathCamera(TUniqueId id, CStateManager& mgr); diff --git a/Runtime/Camera/CFirstPersonCamera.cpp b/Runtime/Camera/CFirstPersonCamera.cpp index 267df6d0e..9523e9c50 100644 --- a/Runtime/Camera/CFirstPersonCamera.cpp +++ b/Runtime/Camera/CFirstPersonCamera.cpp @@ -20,7 +20,6 @@ CFirstPersonCamera::CFirstPersonCamera(TUniqueId uid, const zeus::CTransform& xf nearz, farz, aspect, watchedObj, false, 0) , x188_orbitCameraSpeed(orbitCameraSpeed) , x190_gunFollowXf(xf) { - x1c6_24_deferBallTransitionProcessing = false; DataSpec::DNAMP1::tw_fov->addListener([this](hecl::CVar* cv) { _fovListener(cv); }); } diff --git a/Runtime/Camera/CFirstPersonCamera.hpp b/Runtime/Camera/CFirstPersonCamera.hpp index dd9330fe1..01ed95497 100644 --- a/Runtime/Camera/CFirstPersonCamera.hpp +++ b/Runtime/Camera/CFirstPersonCamera.hpp @@ -14,7 +14,7 @@ class CFirstPersonCamera : public CGameCamera { zeus::CTransform x190_gunFollowXf; float x1c0_pitch = 0.f; TUniqueId x1c4_pitchId = kInvalidUniqueId; - bool x1c6_24_deferBallTransitionProcessing : 1; + bool x1c6_24_deferBallTransitionProcessing : 1 = false; zeus::CVector3f x1c8_closeInVec; float x1d4_closeInTimer = 0.f; void _fovListener(hecl::CVar* cv); diff --git a/Runtime/Camera/CGameCamera.cpp b/Runtime/Camera/CGameCamera.cpp index 772eef002..dc3508d8f 100644 --- a/Runtime/Camera/CGameCamera.cpp +++ b/Runtime/Camera/CGameCamera.cpp @@ -18,7 +18,6 @@ CGameCamera::CGameCamera(TUniqueId uid, bool active, std::string_view name, cons , x164_zfar(zfar) , x168_aspect(aspect) , x16c_controllerIdx(controllerIdx) -, x170_24_perspDirty(true) , x170_25_disablesInput(disableInput) , x180_perspInterpStartFov(fovy) , x184_perspInterpEndFov(fovy) { diff --git a/Runtime/Camera/CGameCamera.hpp b/Runtime/Camera/CGameCamera.hpp index a0c8cbbdb..c0d33805e 100644 --- a/Runtime/Camera/CGameCamera.hpp +++ b/Runtime/Camera/CGameCamera.hpp @@ -22,7 +22,7 @@ protected: float x164_zfar; float x168_aspect; u32 x16c_controllerIdx; - bool x170_24_perspDirty : 1; + bool x170_24_perspDirty : 1 = true; bool x170_25_disablesInput : 1; float x174_delayTime = 0.f; float x178_perspInterpRemTime = 0.f; diff --git a/Runtime/Camera/CInterpolationCamera.cpp b/Runtime/Camera/CInterpolationCamera.cpp index af20e7d51..56c37d097 100644 --- a/Runtime/Camera/CInterpolationCamera.cpp +++ b/Runtime/Camera/CInterpolationCamera.cpp @@ -14,8 +14,7 @@ CInterpolationCamera::CInterpolationCamera(TUniqueId uid, const zeus::CTransform : CGameCamera(uid, false, "Interpolation Camera", CEntityInfo(kInvalidAreaId, CEntity::NullConnectionList, kInvalidEditorId), xf, CCameraManager::ThirdPersonFOV(), CCameraManager::NearPlane(), CCameraManager::FarPlane(), - CCameraManager::Aspect(), kInvalidUniqueId, false, 0) -, x1d8_24_sinusoidal{false} {} + CCameraManager::Aspect(), kInvalidUniqueId, false, 0) {} void CInterpolationCamera::Accept(IVisitor& visitor) { visitor.Visit(this); } diff --git a/Runtime/Camera/CInterpolationCamera.hpp b/Runtime/Camera/CInterpolationCamera.hpp index 3ac69efdd..b34cde012 100644 --- a/Runtime/Camera/CInterpolationCamera.hpp +++ b/Runtime/Camera/CInterpolationCamera.hpp @@ -16,7 +16,7 @@ class CInterpolationCamera : public CGameCamera { float x1d0_positionSpeed = 0.f; float x1d4_rotationSpeed = 0.f; float x1d8_ = 0.f; - bool x1d8_24_sinusoidal : 1; + bool x1d8_24_sinusoidal : 1 = false; float x1dc_closeInAngle = M_PIF * 2.f; bool InterpolateSinusoidal(zeus::CTransform& xf, const zeus::CVector3f& targetOrigin, const zeus::CVector3f& lookPos, diff --git a/Runtime/Character/CActorLights.cpp b/Runtime/Character/CActorLights.cpp index 4144aa614..7dc154911 100644 --- a/Runtime/Character/CActorLights.cpp +++ b/Runtime/Character/CActorLights.cpp @@ -18,17 +18,10 @@ s32 CActorLights::sFrameSchedulerCount = 0; CActorLights::CActorLights(u32 areaUpdateFramePeriod, const zeus::CVector3f& actorPosBias, int maxDynamicLights, int maxAreaLights, bool ambientChannelOverflow, bool layer2, bool disableWorldLights, float positionUpdateThreshold) -: x298_24_dirty(true) -, x298_25_castShadows(true) -, x298_26_hasAreaLights(false) -, x298_27_findShadowLight(false) -, x298_28_inArea(!disableWorldLights && maxAreaLights > 0) +: x298_28_inArea(!disableWorldLights && maxAreaLights > 0) , x298_29_ambienceGenerated(ambientChannelOverflow) , x298_30_layer2(layer2) , x298_31_disableWorldLights(disableWorldLights) -, x299_24_inBrightLight(true) -, x299_25_useBrightLightLag(false) -, x299_26_ambientOnly(false) , x2a8_areaUpdateFramePeriod(areaUpdateFramePeriod) , x2ac_actorPosBias(actorPosBias) , x2b8_maxAreaLights(maxAreaLights) diff --git a/Runtime/Character/CActorLights.hpp b/Runtime/Character/CActorLights.hpp index 4a5044786..6c437a2ed 100644 --- a/Runtime/Character/CActorLights.hpp +++ b/Runtime/Character/CActorLights.hpp @@ -20,17 +20,17 @@ class CActorLights { std::vector x144_dynamicLights; zeus::CColor x288_ambientColor = zeus::skBlack; TAreaId x294_aid = kInvalidAreaId; - bool x298_24_dirty : 1; - bool x298_25_castShadows : 1; - bool x298_26_hasAreaLights : 1; - bool x298_27_findShadowLight : 1; + bool x298_24_dirty : 1 = true; + bool x298_25_castShadows : 1 = true; + bool x298_26_hasAreaLights : 1 = false; + bool x298_27_findShadowLight : 1 = false; bool x298_28_inArea : 1; bool x298_29_ambienceGenerated : 1; bool x298_30_layer2 : 1; bool x298_31_disableWorldLights : 1; - bool x299_24_inBrightLight : 1; - bool x299_25_useBrightLightLag : 1; - bool x299_26_ambientOnly : 1; + bool x299_24_inBrightLight : 1 = true; + bool x299_25_useBrightLightLag : 1 = false; + bool x299_26_ambientOnly : 1 = false; bool x29a_findNearestDynamicLights = false; s32 x29c_shadowLightArrIdx = -1; s32 x2a0_shadowLightIdx = -1; diff --git a/Runtime/Character/CAnimData.cpp b/Runtime/Character/CAnimData.cpp index 9c6431c96..72b60a44c 100644 --- a/Runtime/Character/CAnimData.cpp +++ b/Runtime/Character/CAnimData.cpp @@ -55,14 +55,6 @@ CAnimData::CAnimData(CAssetId id, const CCharacterInfo& character, int defaultAn , x1fc_transMgr(std::move(transMgr)) , x204_charIdx(charIdx) , x208_defaultAnim(defaultAnim) -, x220_24_animating(false) -, x220_25_loop(false) -, x220_26_aligningPos(false) -, x220_27_(false) -, x220_28_(false) -, x220_29_animationJustStarted(false) -, x220_30_poseBuilt(false) -, x220_31_poseCached(false) , x224_pose(layout->GetSegIdList().GetList().size()) , x2fc_poseBuilder(CLayoutDescription{layout}) , m_drawInstCount(drawInstCount) { diff --git a/Runtime/Character/CAnimData.hpp b/Runtime/Character/CAnimData.hpp index ce488f2a2..62905ca84 100644 --- a/Runtime/Character/CAnimData.hpp +++ b/Runtime/Character/CAnimData.hpp @@ -124,14 +124,14 @@ private: u32 x214_passedParticleCount = 0; u32 x218_passedSoundCount = 0; s32 x21c_particleLightIdx = 0; - bool x220_24_animating : 1; - bool x220_25_loop : 1; - bool x220_26_aligningPos : 1; - bool x220_27_ : 1; - bool x220_28_ : 1; - bool x220_29_animationJustStarted : 1; - bool x220_30_poseBuilt : 1; - bool x220_31_poseCached : 1; + bool x220_24_animating : 1 = false; + bool x220_25_loop : 1 = false; + bool x220_26_aligningPos : 1 = false; + bool x220_27_ : 1 = false; + bool x220_28_ : 1 = false; + bool x220_29_animationJustStarted : 1 = false; + bool x220_30_poseBuilt : 1 = false; + bool x220_31_poseCached : 1 = false; CPoseAsTransforms x224_pose; CHierarchyPoseBuilder x2fc_poseBuilder; diff --git a/Runtime/Character/CAnimTreeTweenBase.cpp b/Runtime/Character/CAnimTreeTweenBase.cpp index 70a02fc16..ef1fb01c4 100644 --- a/Runtime/Character/CAnimTreeTweenBase.cpp +++ b/Runtime/Character/CAnimTreeTweenBase.cpp @@ -9,10 +9,7 @@ s32 CAnimTreeTweenBase::sAdvancementDepth = 0; CAnimTreeTweenBase::CAnimTreeTweenBase(bool b1, const std::weak_ptr& a, const std::weak_ptr& b, int flags, std::string_view name) -: CAnimTreeDoubleChild(a, b, name), x1c_flags(flags) { - x20_24_b1 = b1; - x20_25_cullSelector = 0; -} +: CAnimTreeDoubleChild(a, b, name), x1c_flags(flags), x20_24_b1{b1} {} void CAnimTreeTweenBase::VGetWeightedReaders( rstl::reserved_vector>, 16>& out, float w) const { diff --git a/Runtime/Character/CAnimTreeTweenBase.hpp b/Runtime/Character/CAnimTreeTweenBase.hpp index fefbdf58a..e0f41a4dc 100644 --- a/Runtime/Character/CAnimTreeTweenBase.hpp +++ b/Runtime/Character/CAnimTreeTweenBase.hpp @@ -14,7 +14,7 @@ class CAnimTreeTweenBase : public CAnimTreeDoubleChild { protected: int x1c_flags; bool x20_24_b1 : 1; - u8 x20_25_cullSelector : 2; + u8 x20_25_cullSelector : 2 = 0; public: CAnimTreeTweenBase(bool, const std::weak_ptr& a, const std::weak_ptr& b, int, diff --git a/Runtime/Character/CBodyController.cpp b/Runtime/Character/CBodyController.cpp index 94f86a935..4e077b60e 100644 --- a/Runtime/Character/CBodyController.cpp +++ b/Runtime/Character/CBodyController.cpp @@ -15,12 +15,7 @@ CBodyController::CBodyController(CActor& actor, float turnSpeed, EBodyType bodyT : x0_actor(actor) , x2a4_bodyStateInfo(actor, bodyType) , x2f4_bodyType(bodyType) -, x2fc_turnSpeed(turnSpeed) -, x300_24_animationOver(false) -, x300_25_active(false) -, x300_26_frozen(false) -, x300_27_hasBeenFrozen(false) -, x300_28_playDeathAnims(true) { +, x2fc_turnSpeed(turnSpeed) { x2a4_bodyStateInfo.x18_bodyController = this; } diff --git a/Runtime/Character/CBodyController.hpp b/Runtime/Character/CBodyController.hpp index a50d2663d..980085c16 100644 --- a/Runtime/Character/CBodyController.hpp +++ b/Runtime/Character/CBodyController.hpp @@ -28,11 +28,11 @@ class CBodyController { EBodyType x2f4_bodyType; s32 x2f8_curAnim = -1; float x2fc_turnSpeed; - bool x300_24_animationOver : 1; - bool x300_25_active : 1; - bool x300_26_frozen : 1; - bool x300_27_hasBeenFrozen : 1; - bool x300_28_playDeathAnims : 1; + bool x300_24_animationOver : 1 = false; + bool x300_25_active : 1 = false; + bool x300_26_frozen : 1 = false; + bool x300_27_hasBeenFrozen : 1 = false; + bool x300_28_playDeathAnims : 1 = true; float x304_intoFreezeDur = 0.f; float x308_frozenDur = 0.f; float x30c_breakoutDur = 0.f; diff --git a/Runtime/Character/CBodyState.hpp b/Runtime/Character/CBodyState.hpp index 17b83075a..738aee8ab 100644 --- a/Runtime/Character/CBodyState.hpp +++ b/Runtime/Character/CBodyState.hpp @@ -146,15 +146,12 @@ public: class CBSLoopAttack : public CBodyState { pas::ELoopState x4_state = pas::ELoopState::Invalid; pas::ELoopAttackType x8_loopAttackType = pas::ELoopAttackType::Invalid; - bool xc_24_waitForAnimOver : 1; - bool xc_25_advance : 1; + bool xc_24_waitForAnimOver : 1 = false; + bool xc_25_advance : 1 = false; pas::EAnimationState GetBodyStateTransition(float dt, const CBodyController& bc) const; public: - CBSLoopAttack() { - xc_24_waitForAnimOver = false; - xc_25_advance = false; - } + CBSLoopAttack() = default; bool CanShoot() const override { return true; } void Start(CBodyController& bc, CStateManager& mgr) override; pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr) override; @@ -164,12 +161,12 @@ public: class CBSLoopReaction : public CBodyState { pas::ELoopState x4_state = pas::ELoopState::Invalid; pas::EReactionType x8_reactionType = pas::EReactionType::Invalid; - bool xc_24_loopHit : 1; + bool xc_24_loopHit : 1 = false; pas::EAnimationState GetBodyStateTransition(float dt, const CBodyController& bc) const; bool PlayExitAnimation(CBodyController& bc, CStateManager& mgr) const; public: - CBSLoopReaction() { xc_24_loopHit = false; } + CBSLoopReaction() = default; void Start(CBodyController& bc, CStateManager& mgr) override; pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr) override; void Shutdown(CBodyController&) override {} @@ -202,23 +199,18 @@ class CBSJump : public CBodyState { zeus::CVector3f xc_waypoint1; zeus::CVector3f x18_velocity; zeus::CVector3f x24_waypoint2; - bool x30_24_bodyForceSet : 1; - bool x30_25_wallJump : 1; - bool x30_26_wallBounceRight : 1; - bool x30_27_wallBounceComplete : 1; - bool x30_28_startInJumpLoop : 1; + bool x30_24_bodyForceSet : 1 = false; + bool x30_25_wallJump : 1 = false; + bool x30_26_wallBounceRight : 1 = false; + bool x30_27_wallBounceComplete : 1 = false; + bool x30_28_startInJumpLoop : 1 = false; pas::EAnimationState GetBodyStateTransition(float dt, const CBodyController& bc) const; bool CheckForWallJump(CBodyController& bc, CStateManager& mgr); void CheckForLand(CBodyController& bc, CStateManager& mgr); void PlayJumpLoop(CStateManager& mgr, CBodyController& bc); public: - CBSJump() - : x30_24_bodyForceSet(false) - , x30_25_wallJump(false) - , x30_26_wallBounceRight(false) - , x30_27_wallBounceComplete(false) - , x30_28_startInJumpLoop(false) {} + CBSJump() = default; bool IsMoving() const override { return true; } bool ApplyHeadTracking() const override { return false; } bool CanShoot() const override; @@ -238,7 +230,7 @@ class CBSHurled : public CBodyState { float x18_curTime = 0.f; mutable zeus::CVector3f x1c_lastTranslation; mutable float x28_landedDur = 0.f; - bool x2c_24_needsRecover : 1; + bool x2c_24_needsRecover : 1 = false; pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc) const; void Recover(CStateManager& mgr, CBodyController& bc, pas::EHurledState state); void PlayStrikeWallAnimation(CBodyController& bc, CStateManager& mgr); @@ -247,7 +239,7 @@ class CBSHurled : public CBodyState { bool ShouldStartLand(float dt, CBodyController& bc) const; public: - CBSHurled() { x2c_24_needsRecover = false; } + CBSHurled() = default; bool IsMoving() const override { return true; } bool IsInAir(const CBodyController&) const override { return true; } bool ApplyHeadTracking() const override { return false; } @@ -278,13 +270,13 @@ public: }; class CBSScripted : public CBodyState { - bool x4_24_loopAnim : 1; - bool x4_25_timedLoop : 1; + bool x4_24_loopAnim : 1 = false; + bool x4_25_timedLoop : 1 = false; float x8_remTime = 0.f; pas::EAnimationState GetBodyStateTransition(float dt, const CBodyController& bc) const; public: - CBSScripted() : x4_24_loopAnim(false), x4_25_timedLoop(false) {} + CBSScripted() = default; bool ApplyHeadTracking() const override { return false; } void Start(CBodyController& bc, CStateManager& mgr) override; pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr) override; @@ -310,8 +302,8 @@ class CBSWallHang : public CBodyState { pas::EWallHangState x4_state = pas::EWallHangState::Invalid; TUniqueId x8_wpId = kInvalidUniqueId; zeus::CVector3f xc_launchVel; - bool x18_24_launched : 1; - bool x18_25_needsExit : 1; + bool x18_24_launched : 1 = false; + bool x18_25_needsExit : 1 = false; pas::EAnimationState GetBodyStateTransition(float dt, const CBodyController& bc) const; void FixInPlace(CBodyController& bc); bool CheckForLand(CBodyController& bc, CStateManager& mgr); @@ -319,7 +311,7 @@ class CBSWallHang : public CBodyState { void SetLaunchVelocity(CBodyController& bc); public: - CBSWallHang() : x18_24_launched(false), x18_25_needsExit(false) {} + CBSWallHang() = default; bool IsMoving() const override { return true; } bool CanShoot() const override { return x4_state == pas::EWallHangState::WallHang; } bool IsInAir(const CBodyController& bc) const override; diff --git a/Runtime/Character/CBodyStateCmdMgr.hpp b/Runtime/Character/CBodyStateCmdMgr.hpp index 17f4e5af5..e8d7e5332 100644 --- a/Runtime/Character/CBodyStateCmdMgr.hpp +++ b/Runtime/Character/CBodyStateCmdMgr.hpp @@ -63,24 +63,15 @@ class CBCJumpCmd : public CBodyStateCmd { pas::EJumpType x8_type = pas::EJumpType::Normal; zeus::CVector3f xc_waypoint1; zeus::CVector3f x18_waypoint2; - bool x24_24_wallJump : 1; - bool x24_25_startInJumpLoop : 1; + bool x24_24_wallJump : 1 = false; + bool x24_25_startInJumpLoop : 1 = false; public: - explicit CBCJumpCmd() : CBodyStateCmd(EBodyStateCmd::Jump) { - x24_24_wallJump = false; - x24_25_startInJumpLoop = false; - } + explicit CBCJumpCmd() : CBodyStateCmd(EBodyStateCmd::Jump) {} explicit CBCJumpCmd(const zeus::CVector3f& wp1, pas::EJumpType type, bool startInLoop = false) - : CBodyStateCmd(EBodyStateCmd::Jump), x8_type(type), xc_waypoint1(wp1) { - x24_24_wallJump = false; - x24_25_startInJumpLoop = startInLoop; - } + : CBodyStateCmd(EBodyStateCmd::Jump), x8_type(type), xc_waypoint1(wp1), x24_25_startInJumpLoop{startInLoop} {} explicit CBCJumpCmd(const zeus::CVector3f& wp1, const zeus::CVector3f& wp2, pas::EJumpType type) - : CBodyStateCmd(EBodyStateCmd::Jump), x8_type(type), xc_waypoint1(wp1), x18_waypoint2(wp2) { - x24_24_wallJump = true; - x24_25_startInJumpLoop = false; - } + : CBodyStateCmd(EBodyStateCmd::Jump), x8_type(type), xc_waypoint1(wp1), x18_waypoint2(wp2), x24_24_wallJump{true} {} pas::EJumpType GetJumpType() const { return x8_type; } const zeus::CVector3f& GetJumpTarget() const { return xc_waypoint1; } const zeus::CVector3f& GetSecondJumpTarget() const { return x18_waypoint2; } @@ -92,30 +83,22 @@ class CBCGenerateCmd : public CBodyStateCmd { pas::EGenerateType x8_type = pas::EGenerateType::Invalid; zeus::CVector3f xc_targetPos; s32 x18_animId = -1; - bool x1c_24_targetTransform : 1; - bool x1c_25_overrideAnim : 1; + bool x1c_24_targetTransform : 1 = false; + bool x1c_25_overrideAnim : 1 = false; public: - explicit CBCGenerateCmd() : CBodyStateCmd(EBodyStateCmd::Generate) { - x1c_24_targetTransform = false; - x1c_25_overrideAnim = false; - } + explicit CBCGenerateCmd() : CBodyStateCmd(EBodyStateCmd::Generate) {} explicit CBCGenerateCmd(pas::EGenerateType type) - : CBodyStateCmd(EBodyStateCmd::Generate), x8_type(type) { - x1c_24_targetTransform = false; - x1c_25_overrideAnim = false; - } + : CBodyStateCmd(EBodyStateCmd::Generate), x8_type(type) {} explicit CBCGenerateCmd(pas::EGenerateType type, s32 animId) - : CBodyStateCmd(EBodyStateCmd::Generate), x8_type(type), x18_animId(animId) { - x1c_24_targetTransform = false; - x1c_25_overrideAnim = animId != -1; - } + : CBodyStateCmd(EBodyStateCmd::Generate), x8_type(type), x18_animId(animId), x1c_25_overrideAnim{animId != -1} {} explicit CBCGenerateCmd(pas::EGenerateType type, const zeus::CVector3f& vec, bool targetTransform = false, bool overrideAnim = false) - : CBodyStateCmd(EBodyStateCmd::Generate), x8_type(type), xc_targetPos(vec) { - x1c_24_targetTransform = targetTransform; - x1c_25_overrideAnim = overrideAnim; - } + : CBodyStateCmd(EBodyStateCmd::Generate) + , x8_type(type) + , xc_targetPos(vec) + , x1c_24_targetTransform{targetTransform} + , x1c_25_overrideAnim{overrideAnim} {} pas::EGenerateType GetGenerateType() const { return x8_type; } const zeus::CVector3f& GetExitTargetPos() const { return xc_targetPos; } bool HasExitTargetPos() const { return x1c_24_targetTransform; } @@ -206,20 +189,14 @@ public: class CBCScriptedCmd : public CBodyStateCmd { s32 x8_anim = -1; - bool xc_24_loopAnim : 1; - bool xc_25_timedLoop : 1; + bool xc_24_loopAnim : 1 = false; + bool xc_25_timedLoop : 1 = false; float x10_loopDur = 0.f; public: - explicit CBCScriptedCmd() : CBodyStateCmd(EBodyStateCmd::Scripted) { - xc_24_loopAnim = false; - xc_25_timedLoop = false; - } + explicit CBCScriptedCmd() : CBodyStateCmd(EBodyStateCmd::Scripted) {} explicit CBCScriptedCmd(int i, bool b1, bool b2, float f) - : CBodyStateCmd(EBodyStateCmd::Scripted), x8_anim(i), x10_loopDur(f) { - xc_24_loopAnim = b1; - xc_25_timedLoop = b2; - } + : CBodyStateCmd(EBodyStateCmd::Scripted), x8_anim(i), xc_24_loopAnim{b1}, xc_25_timedLoop{b2}, x10_loopDur(f) {} s32 GetAnimId() const { return x8_anim; } bool IsLooped() const { return xc_24_loopAnim; } bool GetUseLoopDuration() const { return xc_25_timedLoop; } diff --git a/Runtime/Character/CBoneTracking.cpp b/Runtime/Character/CBoneTracking.cpp index b6afda934..af7490ece 100644 --- a/Runtime/Character/CBoneTracking.cpp +++ b/Runtime/Character/CBoneTracking.cpp @@ -15,8 +15,6 @@ CBoneTracking::CBoneTracking(const CAnimData& animData, std::string_view bone, : x14_segId(animData.GetCharLayoutInfo().GetSegIdFromString(bone)) , x1c_maxTrackingAngle(maxTrackingAngle) , x20_angSpeed(angSpeed) -, x36_24_active(false) -, x36_25_hasTrackedRotation(false) , x36_26_noParent(True(flags & EBoneTrackingFlags::NoParent)) , x36_27_noParentOrigin(True(flags & EBoneTrackingFlags::NoParentOrigin)) , x36_28_noHorizontalAim(True(flags & EBoneTrackingFlags::NoHorizontalAim)) diff --git a/Runtime/Character/CBoneTracking.hpp b/Runtime/Character/CBoneTracking.hpp index 94d9456aa..e349f7fbb 100644 --- a/Runtime/Character/CBoneTracking.hpp +++ b/Runtime/Character/CBoneTracking.hpp @@ -33,8 +33,8 @@ class CBoneTracking { float x20_angSpeed; std::optional x24_targetPosition; TUniqueId x34_target = kInvalidUniqueId; - bool x36_24_active : 1; - bool x36_25_hasTrackedRotation : 1; + bool x36_24_active : 1 = false; + bool x36_25_hasTrackedRotation : 1 = false; bool x36_26_noParent : 1; bool x36_27_noParentOrigin : 1; bool x36_28_noHorizontalAim : 1; diff --git a/Runtime/Character/CIkChain.hpp b/Runtime/Character/CIkChain.hpp index c572dc836..6908f0e2c 100644 --- a/Runtime/Character/CIkChain.hpp +++ b/Runtime/Character/CIkChain.hpp @@ -21,10 +21,10 @@ class CIkChain { zeus::CQuaternion x24_holdRot; zeus::CVector3f x34_holdPos; float x40_time = 0.f; - bool x44_24_activated : 1; + bool x44_24_activated : 1 = false; public: - CIkChain() : x44_24_activated(false) {} + CIkChain() = default; bool GetActive() const { return x44_24_activated; } void Update(float); diff --git a/Runtime/Character/CModelData.cpp b/Runtime/Character/CModelData.cpp index a9db25302..05077c929 100644 --- a/Runtime/Character/CModelData.cpp +++ b/Runtime/Character/CModelData.cpp @@ -25,16 +25,14 @@ CModelData::~CModelData() = default; CModelData::CModelData() {} CModelData CModelData::CModelDataNull() { return CModelData(); } -CModelData::CModelData(const CStaticRes& res, int instCount) -: x0_scale(res.GetScale()), x14_24_renderSorted(false), x14_25_sortThermal(false), m_drawInstCount(instCount) { +CModelData::CModelData(const CStaticRes& res, int instCount) : x0_scale(res.GetScale()), m_drawInstCount(instCount) { x1c_normalModel = g_SimplePool->GetObj({SBIG('CMDL'), res.GetId()}); if (!x1c_normalModel) Log.report(logvisor::Fatal, FMT_STRING("unable to find CMDL {}"), res.GetId()); m_normalModelInst = x1c_normalModel->MakeNewInstance(0, instCount); } -CModelData::CModelData(const CAnimRes& res, int instCount) -: x0_scale(res.GetScale()), x14_24_renderSorted(false), x14_25_sortThermal(false), m_drawInstCount(instCount) { +CModelData::CModelData(const CAnimRes& res, int instCount) : x0_scale(res.GetScale()), m_drawInstCount(instCount) { TToken factory = g_CharFactoryBuilder->GetFactory(res); x10_animData = factory->CreateCharacter(res.GetCharacterNodeId(), res.CanLoop(), factory, res.GetDefaultAnim(), instCount); diff --git a/Runtime/Character/CModelData.hpp b/Runtime/Character/CModelData.hpp index 57e1680c7..90f510eb7 100644 --- a/Runtime/Character/CModelData.hpp +++ b/Runtime/Character/CModelData.hpp @@ -62,8 +62,8 @@ class CModelData { zeus::CVector3f x0_scale; bool xc_ = false; std::unique_ptr x10_animData; - bool x14_24_renderSorted : 1; - bool x14_25_sortThermal : 1; + bool x14_24_renderSorted : 1 = false; + bool x14_25_sortThermal : 1 = false; zeus::CColor x18_ambientColor; TLockedToken x1c_normalModel; diff --git a/Runtime/Character/CParticleDatabase.cpp b/Runtime/Character/CParticleDatabase.cpp index 82df24852..6ac19bfa9 100644 --- a/Runtime/Character/CParticleDatabase.cpp +++ b/Runtime/Character/CParticleDatabase.cpp @@ -10,10 +10,7 @@ namespace urde { -CParticleDatabase::CParticleDatabase() { - xb4_24_updatesEnabled = true; - xb4_25_anySystemsDrawnWithModel = false; -} +CParticleDatabase::CParticleDatabase() = default; void CParticleDatabase::CacheParticleDesc(const SObjectTag& tag) {} diff --git a/Runtime/Character/CParticleDatabase.hpp b/Runtime/Character/CParticleDatabase.hpp index 60984f347..ead193f8e 100644 --- a/Runtime/Character/CParticleDatabase.hpp +++ b/Runtime/Character/CParticleDatabase.hpp @@ -28,8 +28,8 @@ class CParticleDatabase { std::map> x78_rendererDraw; std::map> x8c_firstDraw; std::map> xa0_lastDraw; - bool xb4_24_updatesEnabled : 1; - bool xb4_25_anySystemsDrawnWithModel : 1; + bool xb4_24_updatesEnabled : 1 = true; + bool xb4_25_anySystemsDrawnWithModel : 1 = false; static void SetModulationColorAllActiveEffectsForParticleDB( const zeus::CColor& color, std::map>& map); diff --git a/Runtime/Character/CRagDoll.cpp b/Runtime/Character/CRagDoll.cpp index 0ca6d8b0a..ef4c79499 100644 --- a/Runtime/Character/CRagDoll.cpp +++ b/Runtime/Character/CRagDoll.cpp @@ -62,9 +62,6 @@ CRagDoll::CRagDoll(float normalGravity, float floatingGravity, float overTime, u : x44_normalGravity(normalGravity) , x48_floatingGravity(floatingGravity) , x50_overTimer(overTime) -, x68_24_prevMovingSlowly(false) -, x68_25_over(false) -, x68_26_primed(false) , x68_27_continueSmallMovements(bool(flags & 0x1)) , x68_28_noOverTimer(bool(flags & 0x2)) , x68_29_noAiCollision(bool(flags & 0x4)) {} diff --git a/Runtime/Character/CRagDoll.hpp b/Runtime/Character/CRagDoll.hpp index 3f383e68b..3f1ca7c62 100644 --- a/Runtime/Character/CRagDoll.hpp +++ b/Runtime/Character/CRagDoll.hpp @@ -26,15 +26,12 @@ protected: zeus::CVector3f x20_velocity; zeus::CVector3f x2c_impactResponseDelta; float x38_impactFrameVel = 0.f; - bool x3c_24_impactPending : 1; - bool x3c_25_ : 1; + bool x3c_24_impactPending : 1 = false; + bool x3c_25_ : 1 = false; public: CRagDollParticle(CSegId id, const zeus::CVector3f& curPos, float radius, const zeus::CVector3f& prevPos) - : x0_id(id), x4_curPos(curPos), x10_radius(radius), x14_prevPos(prevPos) { - x3c_24_impactPending = false; - x3c_25_ = false; - } + : x0_id(id), x4_curPos(curPos), x10_radius(radius), x14_prevPos(prevPos) {} CSegId GetBone() const { return x0_id; } const zeus::CVector3f& GetPosition() const { return x4_curPos; } zeus::CVector3f& Position() { return x4_curPos; } @@ -94,9 +91,9 @@ protected: float x54_impactVel = 0.f; zeus::CVector3f x58_averageVel; float x64_angTimer = 0.f; - bool x68_24_prevMovingSlowly : 1; - bool x68_25_over : 1; - bool x68_26_primed : 1; + bool x68_24_prevMovingSlowly : 1 = false; + bool x68_25_over : 1 = false; + bool x68_26_primed : 1 = false; bool x68_27_continueSmallMovements : 1; bool x68_28_noOverTimer : 1; bool x68_29_noAiCollision : 1; diff --git a/Runtime/Collision/CMetroidAreaCollider.cpp b/Runtime/Collision/CMetroidAreaCollider.cpp index 3a914762e..f5a5ed9dd 100644 --- a/Runtime/Collision/CMetroidAreaCollider.cpp +++ b/Runtime/Collision/CMetroidAreaCollider.cpp @@ -166,9 +166,7 @@ CMovingAABoxComponents::CMovingAABoxComponents(const zeus::CAABox& aabb, const z } } -CMetroidAreaCollider::COctreeLeafCache::COctreeLeafCache(const CAreaOctTree& octTree) : x0_octTree(octTree) { - x908_24_overflow = false; -} +CMetroidAreaCollider::COctreeLeafCache::COctreeLeafCache(const CAreaOctTree& octTree) : x0_octTree(octTree) {} void CMetroidAreaCollider::COctreeLeafCache::AddLeaf(const CAreaOctTree::Node& node) { if (x4_nodeCache.size() == x4_nodeCache.capacity()) { diff --git a/Runtime/Collision/CMetroidAreaCollider.hpp b/Runtime/Collision/CMetroidAreaCollider.hpp index 97a0a9e6d..27ed6fd0a 100644 --- a/Runtime/Collision/CMetroidAreaCollider.hpp +++ b/Runtime/Collision/CMetroidAreaCollider.hpp @@ -120,7 +120,7 @@ public: friend class CMetroidAreaCollider; const CAreaOctTree& x0_octTree; rstl::reserved_vector x4_nodeCache; - bool x908_24_overflow : 1; + bool x908_24_overflow : 1 = false; public: explicit COctreeLeafCache(const CAreaOctTree& octTree); @@ -173,12 +173,11 @@ public: class CAreaCollisionCache { zeus::CAABox x0_aabb; rstl::reserved_vector x18_leafCaches; - bool x1b40_24_leafOverflow : 1; - bool x1b40_25_cacheOverflow : 1; + bool x1b40_24_leafOverflow : 1 = false; + bool x1b40_25_cacheOverflow : 1 = false; public: - explicit CAreaCollisionCache(const zeus::CAABox& aabb) - : x0_aabb(aabb), x1b40_24_leafOverflow(false), x1b40_25_cacheOverflow(false) {} + explicit CAreaCollisionCache(const zeus::CAABox& aabb) : x0_aabb(aabb) {} void ClearCache(); const zeus::CAABox& GetCacheBounds() const { return x0_aabb; } void SetCacheBounds(const zeus::CAABox& aabb) { x0_aabb = aabb; } diff --git a/Runtime/Graphics/CBooRenderer.cpp b/Runtime/Graphics/CBooRenderer.cpp index c0c5ebee8..41e3ecfa1 100644 --- a/Runtime/Graphics/CBooRenderer.cpp +++ b/Runtime/Graphics/CBooRenderer.cpp @@ -681,18 +681,8 @@ void CBooRenderer::LoadBallFade() { } CBooRenderer::CBooRenderer(IObjectStore& store, IFactory& resFac) -: x8_factory(resFac), xc_store(store), x2a8_thermalRand(20) -, x318_24_refectionDirty(false) -, x318_25_drawWireframe(false) -, x318_26_requestRGBA6(false) -, x318_27_currentRGBA6(false) -, x318_28_disableFog(false) -, x318_29_thermalVisor(false) -, x318_30_inAreaDraw(false) -, x318_31_persistRGBA6(false) -, m_thermalHotPass(false) { +: x8_factory(resFac), xc_store(store), x2a8_thermalRand(20) { g_Renderer = this; - xee_24_ = true; m_staticEntropy = store.GetObj("RandomStaticEntropy"); diff --git a/Runtime/Graphics/CBooRenderer.hpp b/Runtime/Graphics/CBooRenderer.hpp index 81e4e47cb..7e8d54cd4 100644 --- a/Runtime/Graphics/CBooRenderer.hpp +++ b/Runtime/Graphics/CBooRenderer.hpp @@ -105,7 +105,7 @@ class CBooRenderer final : public IRenderer { u32 xe0_pvsAreaIdx = 0; // boo::ITextureS* xe4_blackTex = nullptr; - bool xee_24_ : 1; + bool xee_24_ : 1 = true; boo::ObjToken m_clearTexture; boo::ObjToken m_blackTexture; @@ -152,15 +152,15 @@ class CBooRenderer final : public IRenderer { // std::unique_ptr x314_phazonSuitMask; CPhazonSuitFilter m_phazonSuitFilter; - bool x318_24_refectionDirty : 1; - bool x318_25_drawWireframe : 1; - bool x318_26_requestRGBA6 : 1; - bool x318_27_currentRGBA6 : 1; - bool x318_28_disableFog : 1; - bool x318_29_thermalVisor : 1; - bool x318_30_inAreaDraw : 1; - bool x318_31_persistRGBA6 : 1; - bool m_thermalHotPass : 1; + bool x318_24_refectionDirty : 1 = false; + bool x318_25_drawWireframe : 1 = false; + bool x318_26_requestRGBA6 : 1 = false; + bool x318_27_currentRGBA6 : 1 = false; + bool x318_28_disableFog : 1 = false; + bool x318_29_thermalVisor : 1 = false; + bool x318_30_inAreaDraw : 1 = false; + bool x318_31_persistRGBA6 : 1 = false; + bool m_thermalHotPass : 1 = false; void GenerateFogVolumeRampTex(boo::IGraphicsDataFactory::Context& ctx); void GenerateSphereRampTex(boo::IGraphicsDataFactory::Context& ctx); diff --git a/Runtime/Graphics/CDrawablePlaneObject.hpp b/Runtime/Graphics/CDrawablePlaneObject.hpp index eb20bc5fd..0ade8d42a 100644 --- a/Runtime/Graphics/CDrawablePlaneObject.hpp +++ b/Runtime/Graphics/CDrawablePlaneObject.hpp @@ -6,7 +6,7 @@ namespace urde { class CDrawablePlaneObject : public CDrawable { friend class Buckets; - u16 x24_targetBucket; + u16 x24_targetBucket = 0; float x28_farDist; zeus::CPlane x2c_plane; bool x3c_24_invertTest : 1; @@ -15,10 +15,11 @@ class CDrawablePlaneObject : public CDrawable { public: CDrawablePlaneObject(EDrawableType dtype, float closeDist, float farDist, const zeus::CAABox& aabb, bool invertTest, const zeus::CPlane& plane, bool zOnly, void* data) - : CDrawable(dtype, 0, closeDist, aabb, data), x24_targetBucket(0), x28_farDist(farDist), x2c_plane(plane) { - x3c_24_invertTest = invertTest; - x3c_25_zOnly = zOnly; - } + : CDrawable(dtype, 0, closeDist, aabb, data) + , x28_farDist(farDist) + , x2c_plane(plane) + , x3c_24_invertTest{invertTest} + , x3c_25_zOnly{zOnly} {} const zeus::CPlane& GetPlane() const { return x2c_plane; } }; } // namespace urde diff --git a/Runtime/Graphics/CLight.cpp b/Runtime/Graphics/CLight.cpp index a5de5e03a..ff40f8bb8 100644 --- a/Runtime/Graphics/CLight.cpp +++ b/Runtime/Graphics/CLight.cpp @@ -55,9 +55,7 @@ CLight::CLight(const zeus::CVector3f& pos, const zeus::CVector3f& dir, const zeu , x2c_distQ(distQ) , x30_angleC(angleC) , x34_angleL(angleL) -, x38_angleQ(angleQ) -, x4c_24_intensityDirty(true) -, x4c_25_radiusDirty(true) {} +, x38_angleQ(angleQ) {} CLight::CLight(ELightType type, const zeus::CVector3f& pos, const zeus::CVector3f& dir, const zeus::CColor& color, float cutoff) @@ -65,9 +63,7 @@ CLight::CLight(ELightType type, const zeus::CVector3f& pos, const zeus::CVector3 , xc_dir(dir) , x18_color(color) , x1c_type(type) -, x20_spotCutoff(cutoff) -, x4c_24_intensityDirty(true) -, x4c_25_radiusDirty(true) { +, x20_spotCutoff(cutoff) { switch (type) { case ELightType::Spot: { const float cosCutoff = std::cos(zeus::degToRad(cutoff)); diff --git a/Runtime/Graphics/CLight.hpp b/Runtime/Graphics/CLight.hpp index 76747d52a..b2b699efe 100644 --- a/Runtime/Graphics/CLight.hpp +++ b/Runtime/Graphics/CLight.hpp @@ -37,16 +37,13 @@ class CLight { u32 x40_lightId = 0; // Serves as unique key mutable float x44_cachedRadius = 0.f; mutable float x48_cachedIntensity = 0.f; - mutable bool x4c_24_intensityDirty : 1; - mutable bool x4c_25_radiusDirty : 1; + mutable bool x4c_24_intensityDirty : 1 = true; + mutable bool x4c_25_radiusDirty : 1 = true; float CalculateLightRadius() const; public: - CLight() { - x4c_24_intensityDirty = true; - x4c_25_radiusDirty = true; - } + CLight() = default; CLight(const zeus::CVector3f& pos, const zeus::CVector3f& dir, const zeus::CColor& color, float distC, float distL, float distQ, float angleC, float angleL, float angleQ); diff --git a/Runtime/Graphics/CModel.hpp b/Runtime/Graphics/CModel.hpp index e267d2136..8e05fdf27 100644 --- a/Runtime/Graphics/CModel.hpp +++ b/Runtime/Graphics/CModel.hpp @@ -143,8 +143,8 @@ private: zeus::CAABox x20_aabb; CBooSurface* x38_firstUnsortedSurface = nullptr; CBooSurface* x3c_firstSortedSurface = nullptr; - bool x40_24_texturesLoaded : 1; - bool x40_25_modelVisible : 1; + bool x40_24_texturesLoaded : 1 = false; + bool x40_25_modelVisible : 1 = false; u8 x41_mask; u32 x44_areaInstanceIdx = UINT32_MAX; diff --git a/Runtime/Graphics/CModelBoo.cpp b/Runtime/Graphics/CModelBoo.cpp index 983274ef1..122e6ecde 100644 --- a/Runtime/Graphics/CModelBoo.cpp +++ b/Runtime/Graphics/CModelBoo.cpp @@ -178,8 +178,6 @@ CBooModel::CBooModel(TToken& token, CModel* parent, std::vector m_filter; public: diff --git a/Runtime/MP1/CArtifactDoll.cpp b/Runtime/MP1/CArtifactDoll.cpp index 7f997aac5..7df5643b2 100644 --- a/Runtime/MP1/CArtifactDoll.cpp +++ b/Runtime/MP1/CArtifactDoll.cpp @@ -52,7 +52,6 @@ constexpr zeus::CColor ArtifactPostColor{1.f, 0.63f, 0.02f, 1.f}; CArtifactDoll::CArtifactDoll() { x10_lights.resize(2, CLight::BuildDirectional(zeus::skForward, zeus::skWhite)); x20_actorLights = std::make_unique(8, zeus::skZero3f, 4, 4, false, false, false, 0.1f); - x28_24_loaded = false; x0_models.reserve(ArtifactPieceModels.size()); for (const char* const model : ArtifactPieceModels) { x0_models.emplace_back(g_SimplePool->GetObj(model)); diff --git a/Runtime/MP1/CArtifactDoll.hpp b/Runtime/MP1/CArtifactDoll.hpp index c37252fdd..549c6e13f 100644 --- a/Runtime/MP1/CArtifactDoll.hpp +++ b/Runtime/MP1/CArtifactDoll.hpp @@ -17,7 +17,7 @@ class CArtifactDoll { std::vector x10_lights; std::unique_ptr x20_actorLights; float x24_fader = 0.f; - bool x28_24_loaded : 1; + bool x28_24_loaded : 1 = false; void UpdateActorLights(); public: diff --git a/Runtime/MP1/CFrontEndUI.cpp b/Runtime/MP1/CFrontEndUI.cpp index 30065b8af..ea3d64baa 100644 --- a/Runtime/MP1/CFrontEndUI.cpp +++ b/Runtime/MP1/CFrontEndUI.cpp @@ -1487,7 +1487,7 @@ void CFrontEndUI::SNesEmulatorFrame::Draw(CSaveGameScreen* saveUi) const { } } -CFrontEndUI::SOptionsFrontEndFrame::SOptionsFrontEndFrame() : x134_24_visible(true), x134_25_exitOptions(false) { +CFrontEndUI::SOptionsFrontEndFrame::SOptionsFrontEndFrame() { x4_frme = g_SimplePool->GetObj("FRME_OptionsFrontEnd"); x10_pauseScreen = g_SimplePool->GetObj("STRG_PauseScreen"); } diff --git a/Runtime/MP1/CFrontEndUI.hpp b/Runtime/MP1/CFrontEndUI.hpp index 046f0522a..c44e7ecd8 100644 --- a/Runtime/MP1/CFrontEndUI.hpp +++ b/Runtime/MP1/CFrontEndUI.hpp @@ -279,8 +279,8 @@ public: float x38_rowPitch = 0.f; CSfxHandle x3c_sliderSfx; CRumbleGenerator x40_rumbleGen; - bool x134_24_visible : 1; - bool x134_25_exitOptions : 1; + bool x134_24_visible : 1 = true; + bool x134_25_exitOptions : 1 = false; std::unique_ptr m_touchBar; bool m_touchBarInValue = false; diff --git a/Runtime/MP1/CGameCubeDoll.cpp b/Runtime/MP1/CGameCubeDoll.cpp index 86e643bb6..285ac0a82 100644 --- a/Runtime/MP1/CGameCubeDoll.cpp +++ b/Runtime/MP1/CGameCubeDoll.cpp @@ -10,7 +10,6 @@ CGameCubeDoll::CGameCubeDoll() { x0_model = g_SimplePool->GetObj("CMDL_GameCube"); x8_lights.push_back(CLight::BuildDirectional(zeus::skForward, zeus::skWhite)); x18_actorLights = std::make_unique(8, zeus::skZero3f, 4, 4, false, false, false, 0.1f); - x20_24_loaded = false; } void CGameCubeDoll::UpdateActorLights() { diff --git a/Runtime/MP1/CGameCubeDoll.hpp b/Runtime/MP1/CGameCubeDoll.hpp index 97d012539..2d81041b4 100644 --- a/Runtime/MP1/CGameCubeDoll.hpp +++ b/Runtime/MP1/CGameCubeDoll.hpp @@ -16,7 +16,7 @@ class CGameCubeDoll { std::vector x8_lights; std::unique_ptr x18_actorLights; float x1c_fader = 0.f; - bool x20_24_loaded : 1; + bool x20_24_loaded : 1 = false; void UpdateActorLights(); public: diff --git a/Runtime/MP1/CInGameGuiManager.cpp b/Runtime/MP1/CInGameGuiManager.cpp index e076f4065..a7d0cfbc3 100644 --- a/Runtime/MP1/CInGameGuiManager.cpp +++ b/Runtime/MP1/CInGameGuiManager.cpp @@ -178,11 +178,7 @@ CInGameGuiManager::CInGameGuiManager(CStateManager& stateMgr, CArchitectureQueue , x1c_rand(1234) , x20_faceplateDecor(stateMgr) , x50_deathDot(g_SimplePool->GetObj("TXTR_DeathDot")) -, x5c_pauseScreenDGRPs(LockPauseScreenDependencies()) -, x1f8_24_(false) -, x1f8_25_playerAlive(true) -, x1f8_26_deferTransition(false) -, x1f8_27_exitSaveUI(true) { +, x5c_pauseScreenDGRPs(LockPauseScreenDependencies()) { x1e0_helmetVisMode = g_tweakGui->GetHelmetVisMode(); x1e4_enableTargetingManager = g_tweakGui->GetEnableTargetingManager(); x1e8_enableAutoMapper = g_tweakGui->GetEnableAutoMapper(); diff --git a/Runtime/MP1/CInGameGuiManager.hpp b/Runtime/MP1/CInGameGuiManager.hpp index e89fb4185..7c3e252c7 100644 --- a/Runtime/MP1/CInGameGuiManager.hpp +++ b/Runtime/MP1/CInGameGuiManager.hpp @@ -95,10 +95,10 @@ private: EHudVisMode x1ec_hudVisMode; u32 x1f0_enablePlayerVisor; float x1f4_visorStaticAlpha; - bool x1f8_24_ : 1; - bool x1f8_25_playerAlive : 1; - bool x1f8_26_deferTransition : 1; - bool x1f8_27_exitSaveUI : 1; + bool x1f8_24_ : 1 = false; + bool x1f8_25_playerAlive : 1 = true; + bool x1f8_26_deferTransition : 1 = false; + bool x1f8_27_exitSaveUI : 1 = true; std::optional m_deathRenderTexQuad; std::optional m_deathDotQuad; diff --git a/Runtime/MP1/CLogBookScreen.cpp b/Runtime/MP1/CLogBookScreen.cpp index f469b1722..7d4a6f3e5 100644 --- a/Runtime/MP1/CLogBookScreen.cpp +++ b/Runtime/MP1/CLogBookScreen.cpp @@ -14,10 +14,7 @@ namespace urde::MP1 { CLogBookScreen::CLogBookScreen(const CStateManager& mgr, CGuiFrame& frame, const CStringTable& pauseStrg) -: CPauseScreenBase(mgr, frame, pauseStrg, true) -, x260_24_loaded(false) -, x260_25_inTextScroll(false) -, x260_26_exitTextScroll(false) { +: CPauseScreenBase(mgr, frame, pauseStrg, true) { x19c_scanCompletes.resize(5); x200_viewScans.resize(5); x258_artifactDoll = std::make_unique(); diff --git a/Runtime/MP1/CLogBookScreen.hpp b/Runtime/MP1/CLogBookScreen.hpp index f782faf0f..246678a63 100644 --- a/Runtime/MP1/CLogBookScreen.hpp +++ b/Runtime/MP1/CLogBookScreen.hpp @@ -30,9 +30,9 @@ class CLogBookScreen : public CPauseScreenBase { LeavingPause = 1, LeftPause = 2 } x25c_leavePauseState = ELeavePauseState::InPause; - bool x260_24_loaded : 1; - bool x260_25_inTextScroll : 1; - bool x260_26_exitTextScroll : 1; + bool x260_24_loaded : 1 = false; + bool x260_25_inTextScroll : 1 = false; + bool x260_26_exitTextScroll : 1 = false; void InitializeLogBook(); void UpdateRightTitles(); diff --git a/Runtime/MP1/CMFGame.cpp b/Runtime/MP1/CMFGame.cpp index 81d422198..7c413d8f0 100644 --- a/Runtime/MP1/CMFGame.cpp +++ b/Runtime/MP1/CMFGame.cpp @@ -18,9 +18,7 @@ CMFGame::CMFGame(const std::weak_ptr& stateMgr, const std::weak_p const CArchitectureQueue&) : CMFGameBase("CMFGame") , x14_stateManager(stateMgr.lock()) -, x18_guiManager(guiMgr.lock()) -, x2a_24_initialized(false) -, x2a_25_samusAlive(true) { +, x18_guiManager(guiMgr.lock()) { static_cast(*g_Main).SetMFGameBuilt(true); } @@ -258,8 +256,7 @@ void CMFGame::EnterMapScreen() { x14_stateManager->SetInMapScreen(true); } -CMFGameLoader::CMFGameLoader() -: CMFGameLoaderBase("CMFGameLoader"), x2c_24_initialized(false), x2c_25_transitionFinished(false) { +CMFGameLoader::CMFGameLoader() : CMFGameLoaderBase("CMFGameLoader") { auto* m = static_cast(g_Main); switch (m->GetFlowState()) { case EFlowState::Default: diff --git a/Runtime/MP1/CMFGame.hpp b/Runtime/MP1/CMFGame.hpp index d491089b1..3284006ee 100644 --- a/Runtime/MP1/CMFGame.hpp +++ b/Runtime/MP1/CMFGame.hpp @@ -23,8 +23,8 @@ class CMFGame : public CMFGameBase { float x20_cineSkipTime; u32 x24_ = 0; TUniqueId x28_skippedCineCam = kInvalidUniqueId; - bool x2a_24_initialized : 1; - bool x2a_25_samusAlive : 1; + bool x2a_24_initialized : 1 = false; + bool x2a_25_samusAlive : 1 = true; CColoredQuadFilter m_fadeToBlack{EFilterType::Multiply}; @@ -52,8 +52,8 @@ class CMFGameLoader : public CMFGameLoaderBase { std::shared_ptr x14_stateMgr; std::shared_ptr x18_guiMgr; std::vector x1c_loadList; - bool x2c_24_initialized : 1; - bool x2c_25_transitionFinished : 1; + bool x2c_24_initialized : 1 = false; + bool x2c_25_transitionFinished : 1 = false; void MakeLoadDependencyList(); diff --git a/Runtime/MP1/CMessageScreen.cpp b/Runtime/MP1/CMessageScreen.cpp index ea2b28c7c..aba57d97a 100644 --- a/Runtime/MP1/CMessageScreen.cpp +++ b/Runtime/MP1/CMessageScreen.cpp @@ -12,7 +12,6 @@ namespace urde::MP1 { CMessageScreen::CMessageScreen(CAssetId msg, float delayTime) : x74_delayTime(delayTime) { - x78_24_exit = false; x0_msg = g_SimplePool->GetObj({FOURCC('STRG'), msg}); xc_msgScreen = g_SimplePool->GetObj("FRME_MsgScreen"); } diff --git a/Runtime/MP1/CMessageScreen.hpp b/Runtime/MP1/CMessageScreen.hpp index 8998cb06f..db52a0678 100644 --- a/Runtime/MP1/CMessageScreen.hpp +++ b/Runtime/MP1/CMessageScreen.hpp @@ -36,7 +36,7 @@ class CMessageScreen { u32 x6c_page = 0; float x70_blurAmt = 0.f; float x74_delayTime; - bool x78_24_exit : 1; + bool x78_24_exit : 1 = false; public: explicit CMessageScreen(CAssetId msg, float time); diff --git a/Runtime/MP1/COptionsScreen.cpp b/Runtime/MP1/COptionsScreen.cpp index ae175de5f..f2bc0035a 100644 --- a/Runtime/MP1/COptionsScreen.cpp +++ b/Runtime/MP1/COptionsScreen.cpp @@ -10,10 +10,7 @@ namespace urde::MP1 { COptionsScreen::COptionsScreen(const CStateManager& mgr, CGuiFrame& frame, const CStringTable& pauseStrg) -: CPauseScreenBase(mgr, frame, pauseStrg) { - x1a0_gameCube = std::make_unique(); - x2a0_24_inOptionBody = false; -} +: CPauseScreenBase(mgr, frame, pauseStrg), x1a0_gameCube{std::make_unique()} {} COptionsScreen::~COptionsScreen() { CSfxManager::SfxStop(x1a4_sliderSfx); } diff --git a/Runtime/MP1/COptionsScreen.hpp b/Runtime/MP1/COptionsScreen.hpp index d32e784d1..f6c5ccd1e 100644 --- a/Runtime/MP1/COptionsScreen.hpp +++ b/Runtime/MP1/COptionsScreen.hpp @@ -15,7 +15,7 @@ class COptionsScreen : public CPauseScreenBase { CSfxHandle x1a4_sliderSfx; CRumbleGenerator x1a8_rumble; float x29c_optionAlpha = 0.f; - bool x2a0_24_inOptionBody : 1; + bool x2a0_24_inOptionBody : 1 = false; void UpdateOptionView(); void ResetOptionWidgetVisibility(); diff --git a/Runtime/MP1/CPauseScreen.cpp b/Runtime/MP1/CPauseScreen.cpp index 0d1af0369..209c74e72 100644 --- a/Runtime/MP1/CPauseScreen.cpp +++ b/Runtime/MP1/CPauseScreen.cpp @@ -25,11 +25,6 @@ CPauseScreen::CPauseScreen(ESubScreen subscreen, const CDependencyGroup& suitDgr x60_loadTok = g_ResFactory->LoadResourceAsync(frmeTag, x5c_frmePauseScreenBuf.get()); CSfxManager::SfxStart(SFXui_pause_screen_enter, 1.f, 0.f, false, 0x7f, false, kInvalidAreaId); x7c_screens.resize(2); - m_returnDown = false; - m_nextDown = false; - m_backDown = false; - m_lDown = false; - m_rDown = false; } CPauseScreen::~CPauseScreen() { diff --git a/Runtime/MP1/CPauseScreen.hpp b/Runtime/MP1/CPauseScreen.hpp index 0c3721e86..4233869d9 100644 --- a/Runtime/MP1/CPauseScreen.hpp +++ b/Runtime/MP1/CPauseScreen.hpp @@ -44,16 +44,16 @@ private: bool x90_resourcesLoaded = false; bool x91_initialTransition = true; - bool m_returnClicked : 1; - bool m_nextClicked : 1; - bool m_backClicked : 1; - bool m_lClicked : 1; - bool m_rClicked : 1; - bool m_returnDown : 1; - bool m_nextDown : 1; - bool m_backDown : 1; - bool m_lDown : 1; - bool m_rDown : 1; + bool m_returnClicked : 1 = false; + bool m_nextClicked : 1 = false; + bool m_backClicked : 1 = false; + bool m_lClicked : 1 = false; + bool m_rClicked : 1 = false; + bool m_returnDown : 1 = false; + bool m_nextDown : 1 = false; + bool m_backDown : 1 = false; + bool m_lDown : 1 = false; + bool m_rDown : 1 = false; std::unique_ptr BuildPauseSubScreen(ESubScreen subscreen, const CStateManager& mgr, CGuiFrame& frame) const; diff --git a/Runtime/MP1/CPauseScreenBase.cpp b/Runtime/MP1/CPauseScreenBase.cpp index caf457b95..df04c123e 100644 --- a/Runtime/MP1/CPauseScreenBase.cpp +++ b/Runtime/MP1/CPauseScreenBase.cpp @@ -19,22 +19,7 @@ namespace urde::MP1 { CPauseScreenBase::CPauseScreenBase(const CStateManager& mgr, CGuiFrame& frame, const CStringTable& pauseStrg, bool isLogBook) -: x4_mgr(mgr) -, x8_frame(frame) -, xc_pauseStrg(pauseStrg) -, x198_24_ready(false) -, x198_25_handledInput(false) -, x198_26_exitPauseScreen(false) -, x198_27_canDraw(false) -, x198_28_pulseTextArrowTop(false) -, x198_29_pulseTextArrowBottom(false) -, m_isLogBook(isLogBook) -, m_bodyUpClicked(false) -, m_bodyDownClicked(false) -, m_bodyClicked(false) -, m_leftClicked(false) -, m_rightClicked(false) -, m_playRightTableSfx(true) { +: x4_mgr(mgr), x8_frame(frame), xc_pauseStrg(pauseStrg), m_isLogBook(isLogBook) { InitializeFrameGlue(); } diff --git a/Runtime/MP1/CPauseScreenBase.hpp b/Runtime/MP1/CPauseScreenBase.hpp index 6272087e9..8451e9f37 100644 --- a/Runtime/MP1/CPauseScreenBase.hpp +++ b/Runtime/MP1/CPauseScreenBase.hpp @@ -74,19 +74,19 @@ protected: CGuiSliderGroup* x18c_slidergroup_slider = nullptr; CGuiTableGroup* x190_tablegroup_double = nullptr; CGuiTableGroup* x194_tablegroup_triple = nullptr; - bool x198_24_ready : 1; - bool x198_25_handledInput : 1; - bool x198_26_exitPauseScreen : 1; - bool x198_27_canDraw : 1; - bool x198_28_pulseTextArrowTop : 1; - bool x198_29_pulseTextArrowBottom : 1; + bool x198_24_ready : 1 = false; + bool x198_25_handledInput : 1 = false; + bool x198_26_exitPauseScreen : 1 = false; + bool x198_27_canDraw : 1 = false; + bool x198_28_pulseTextArrowTop : 1 = false; + bool x198_29_pulseTextArrowBottom : 1 = false; bool m_isLogBook : 1; - bool m_bodyUpClicked : 1; - bool m_bodyDownClicked : 1; - bool m_bodyClicked : 1; - bool m_leftClicked : 1; - bool m_rightClicked : 1; - bool m_playRightTableSfx : 1; + bool m_bodyUpClicked : 1 = false; + bool m_bodyDownClicked : 1 = false; + bool m_bodyClicked : 1 = false; + bool m_leftClicked : 1 = false; + bool m_rightClicked : 1 = false; + bool m_playRightTableSfx : 1 = true; void InitializeFrameGlue(); void ChangeMode(EMode mode, bool playSfx = true); diff --git a/Runtime/MP1/CPauseScreenBlur.cpp b/Runtime/MP1/CPauseScreenBlur.cpp index f750dba69..360b662bb 100644 --- a/Runtime/MP1/CPauseScreenBlur.cpp +++ b/Runtime/MP1/CPauseScreenBlur.cpp @@ -6,8 +6,7 @@ namespace urde::MP1 { -CPauseScreenBlur::CPauseScreenBlur() -: x4_mapLightQuarter(g_SimplePool->GetObj("TXTR_MapLightQuarter")), x50_24_blurring(false), x50_25_gameDraw(true) {} +CPauseScreenBlur::CPauseScreenBlur() : x4_mapLightQuarter(g_SimplePool->GetObj("TXTR_MapLightQuarter")) {} void CPauseScreenBlur::OnNewInGameGuiState(EInGameGuiState state, CStateManager& stateMgr) { switch (state) { diff --git a/Runtime/MP1/CPauseScreenBlur.hpp b/Runtime/MP1/CPauseScreenBlur.hpp index 69a7e4951..1aa04d242 100644 --- a/Runtime/MP1/CPauseScreenBlur.hpp +++ b/Runtime/MP1/CPauseScreenBlur.hpp @@ -20,8 +20,8 @@ class CPauseScreenBlur { EState x14_nextState = EState::InGame; float x18_blurAmt = 0.f; CCameraBlurPass x1c_camBlur; - bool x50_24_blurring : 1; - bool x50_25_gameDraw : 1; + bool x50_24_blurring : 1 = false; + bool x50_25_gameDraw : 1 = true; CTexturedQuadFilter m_quarterFilter{EFilterType::Multiply, x4_mapLightQuarter}; CScanLinesFilterEven m_linesFilter{EFilterType::Multiply}; diff --git a/Runtime/MP1/CPlayMovie.cpp b/Runtime/MP1/CPlayMovie.cpp index 9d9494fc8..fcffdaf28 100644 --- a/Runtime/MP1/CPlayMovie.cpp +++ b/Runtime/MP1/CPlayMovie.cpp @@ -8,13 +8,7 @@ const char* kMovies[] = {"Video/wingame.thp", "Video/wingame_best.thp", " bool CPlayMovie::IsResultsScreen(EWhichMovie which) { return int(which) <= 2; } -CPlayMovie::CPlayMovie(EWhichMovie which) -: CPlayMovieBase("CPlayMovie", kMovies[int(which)]) -, x18_which(which) -, x78_24_(false) -, x78_25_(false) -, x78_26_resultsScreen(false) -, x78_27_(false) { +CPlayMovie::CPlayMovie(EWhichMovie which) : CPlayMovieBase("CPlayMovie", kMovies[int(which)]), x18_which(which) { (void)x18_which; } diff --git a/Runtime/MP1/CPlayMovie.hpp b/Runtime/MP1/CPlayMovie.hpp index 8e40a9f85..c0b5dd0ee 100644 --- a/Runtime/MP1/CPlayMovie.hpp +++ b/Runtime/MP1/CPlayMovie.hpp @@ -20,10 +20,10 @@ public: private: EWhichMovie x18_which; - bool x78_24_ : 1; - bool x78_25_ : 1; - bool x78_26_resultsScreen : 1; - bool x78_27_ : 1; + bool x78_24_ : 1 = false; + bool x78_25_ : 1 = false; + bool x78_26_resultsScreen : 1 = false; + bool x78_27_ : 1 = false; static bool IsResultsScreen(EWhichMovie which); diff --git a/Runtime/MP1/CPlayerVisor.cpp b/Runtime/MP1/CPlayerVisor.cpp index d1602cf8e..1d53ed93c 100644 --- a/Runtime/MP1/CPlayerVisor.cpp +++ b/Runtime/MP1/CPlayerVisor.cpp @@ -15,8 +15,6 @@ namespace urde::MP1 { CPlayerVisor::CPlayerVisor(CStateManager&) : x108_newScanPane(EFilterType::Blend, CGraphics::g_SpareTexture.get()) { - x25_24_visorTransitioning = false; - x25_25_ = false; xcc_scanFrameCorner = g_SimplePool->GetObj("CMDL_ScanFrameCorner"); xd8_scanFrameCenterSide = g_SimplePool->GetObj("CMDL_ScanFrameCenterSide"); xe4_scanFrameCenterTop = g_SimplePool->GetObj("CMDL_ScanFrameCenterTop"); diff --git a/Runtime/MP1/CPlayerVisor.hpp b/Runtime/MP1/CPlayerVisor.hpp index a38135aca..594b999d8 100644 --- a/Runtime/MP1/CPlayerVisor.hpp +++ b/Runtime/MP1/CPlayerVisor.hpp @@ -31,8 +31,8 @@ class CPlayerVisor { CPlayerState::EPlayerVisor x1c_curVisor = CPlayerState::EPlayerVisor::Combat; CPlayerState::EPlayerVisor x20_nextVisor = CPlayerState::EPlayerVisor::Combat; float x24_visorSfxVol = 1.f; // used to be u8 - bool x25_24_visorTransitioning : 1; - bool x25_25_ : 1; + bool x25_24_visorTransitioning : 1 = false; + bool x25_25_ : 1 = false; float x28_ = 0.f; float x2c_scanDimInterp = 1.f; EScanWindowState x30_prevState = EScanWindowState::NotInScanVisor; diff --git a/Runtime/MP1/CSamusDoll.cpp b/Runtime/MP1/CSamusDoll.cpp index 01c6673d8..3aa911875 100644 --- a/Runtime/MP1/CSamusDoll.cpp +++ b/Runtime/MP1/CSamusDoll.cpp @@ -100,13 +100,7 @@ CSamusDoll::CSamusDoll(const CDependencyGroup& suitDgrp, const CDependencyGroup& , x44_suit(suit) , x48_beam(beam) , x270_24_hasSpiderBall(hasSpiderBall) -, x270_25_hasGrappleBeam(hasGrappleBeam) -, x270_26_pulseSuit(false) -, x270_27_pulseBeam(false) -, x270_28_pulseGrapple(false) -, x270_29_pulseBoots(false) -, x270_30_pulseVisor(false) -, x270_31_loaded(false) { +, x270_25_hasGrappleBeam(hasGrappleBeam) { x70_fixedRot.rotateZ(M_PIF); x90_userInterpRot = xb0_userRot = x70_fixedRot; x1d4_spiderBallGlass = g_SimplePool->GetObj(SpiderBallGlassModels[size_t(suit)].first); diff --git a/Runtime/MP1/CSamusDoll.hpp b/Runtime/MP1/CSamusDoll.hpp index 6833a75e6..48ac340e3 100644 --- a/Runtime/MP1/CSamusDoll.hpp +++ b/Runtime/MP1/CSamusDoll.hpp @@ -73,12 +73,12 @@ class CSamusDoll { CSfxHandle x26c_zoomSfx; bool x270_24_hasSpiderBall : 1; bool x270_25_hasGrappleBeam : 1; - bool x270_26_pulseSuit : 1; - bool x270_27_pulseBeam : 1; - bool x270_28_pulseGrapple : 1; - bool x270_29_pulseBoots : 1; - bool x270_30_pulseVisor : 1; - bool x270_31_loaded : 1; + bool x270_26_pulseSuit : 1 = false; + bool x270_27_pulseBeam : 1 = false; + bool x270_28_pulseGrapple : 1 = false; + bool x270_29_pulseBoots : 1 = false; + bool x270_30_pulseVisor : 1 = false; + bool x270_31_loaded : 1 = false; static constexpr zeus::CVector3f skInitialOffset{0.0f, 0.0f, 0.8f}; static CModelData BuildSuitModelData1(CPlayerState::EPlayerSuit suit); diff --git a/Runtime/MP1/CSamusHud.cpp b/Runtime/MP1/CSamusHud.cpp index 2631b60c8..f7b632354 100644 --- a/Runtime/MP1/CSamusHud.cpp +++ b/Runtime/MP1/CSamusHud.cpp @@ -23,9 +23,6 @@ CSamusHud::CSamusHud(CStateManager& stateMgr) : x8_targetingMgr(stateMgr) , x258_frmeHelmet(g_SimplePool->GetObj("FRME_Helmet")) , x268_frmeBaseHud(g_SimplePool->GetObj("FRME_BaseHud")) -, x2e0_24_inFreeLook(false) -, x2e0_25_lookControlHeld(false) -, x2e0_26_latestFirstPerson(true) , x2e0_27_energyLow(stateMgr.GetPlayer().IsEnergyLow(stateMgr)) , m_energyDrainFilter(g_tweakGui->GetEnergyDrainFilterAdditive() ? EFilterType::Add : EFilterType::Blend) { x33c_lights = std::make_unique(8, zeus::skZero3f, 4, 1, true, 0, 0, 0.1f); diff --git a/Runtime/MP1/CSamusHud.hpp b/Runtime/MP1/CSamusHud.hpp index b357e5b57..136556e03 100644 --- a/Runtime/MP1/CSamusHud.hpp +++ b/Runtime/MP1/CSamusHud.hpp @@ -95,9 +95,9 @@ class CSamusHud { u32 x2d4_totalEnergyTanks = 0; u32 x2d8_missileAmount = 0; u32 x2dc_missileCapacity = 0; - bool x2e0_24_inFreeLook : 1; - bool x2e0_25_lookControlHeld : 1; - bool x2e0_26_latestFirstPerson : 1; + bool x2e0_24_inFreeLook : 1 = false; + bool x2e0_25_lookControlHeld : 1 = false; + bool x2e0_26_latestFirstPerson : 1 = true; bool x2e0_27_energyLow : 1; u32 x2e4_ = 0; u32 x2e8_ = 0; diff --git a/Runtime/MP1/CSlideShow.cpp b/Runtime/MP1/CSlideShow.cpp index 50338b7ab..57dd34af3 100644 --- a/Runtime/MP1/CSlideShow.cpp +++ b/Runtime/MP1/CSlideShow.cpp @@ -6,20 +6,7 @@ namespace urde { -CSlideShow::CSlideShow() -: CIOWin("SlideShow") -, x5c_slideA(*this) -, x90_slideB(*this) -, x130_(g_tweakSlideShow->GetX54()) -, x134_24_(true) -, x134_25_(false) -, x134_26_(false) -, x134_27_(false) -, x134_28_disableInput(false) -, x134_29_(false) -, x134_30_(true) -, x134_31_(false) -, x135_24_(true) { +CSlideShow::CSlideShow() : CIOWin("SlideShow"), x130_(g_tweakSlideShow->GetX54()) { const SObjectTag* font = g_ResFactory->GetResourceIdByName(g_tweakSlideShow->GetFont()); if (font) { CGuiTextProperties propsA(false, true, EJustification::Center, EVerticalJustification::Bottom); diff --git a/Runtime/MP1/CSlideShow.hpp b/Runtime/MP1/CSlideShow.hpp index ce1de5b75..4d2689f72 100644 --- a/Runtime/MP1/CSlideShow.hpp +++ b/Runtime/MP1/CSlideShow.hpp @@ -58,8 +58,8 @@ private: float x58_ = 0.f; */ - SSlideData x5c_slideA; - SSlideData x90_slideB; + SSlideData x5c_slideA{*this}; + SSlideData x90_slideB{*this}; std::unique_ptr xc4_textA; std::unique_ptr xc8_textB; @@ -87,15 +87,15 @@ private: float x12c_ = 32.f; */ float x130_; - bool x134_24_ : 1; - bool x134_25_ : 1; - bool x134_26_ : 1; - bool x134_27_ : 1; - bool x134_28_disableInput : 1; - bool x134_29_ : 1; - bool x134_30_ : 1; - bool x134_31_ : 1; - bool x135_24_ : 1; + bool x134_24_ : 1 = true; + bool x134_25_ : 1 = false; + bool x134_26_ : 1 = false; + bool x134_27_ : 1 = false; + bool x134_28_disableInput : 1 = false; + bool x134_29_ : 1 = false; + bool x134_30_ : 1 = true; + bool x134_31_ : 1 = false; + bool x135_24_ : 1 = true; bool LoadTXTRDep(std::string_view name); static bool AreAllDepsLoaded(const std::vector>& deps); diff --git a/Runtime/MP1/MP1.cpp b/Runtime/MP1/MP1.cpp index 8fe307f85..004b4bb5d 100644 --- a/Runtime/MP1/MP1.cpp +++ b/Runtime/MP1/MP1.cpp @@ -236,17 +236,7 @@ void CGameArchitectureSupport::specialKeyUp(boo::ESpecialKey key, boo::EModifier CMain::CMain(IFactory* resFactory, CSimplePool* resStore, boo::IGraphicsDataFactory* gfxFactory, boo::IGraphicsCommandQueue* cmdQ, const boo::ObjToken& spareTex) -: m_booSetter(gfxFactory, cmdQ, spareTex) -, x128_globalObjects(resFactory, resStore) -, x160_24_finished(false) -, x160_25_mfGameBuilt(false) -, x160_26_screenFading(false) -, x160_27_(false) -, x160_28_manageCard(false) -, x160_29_(false) -, x160_30_(false) -, x160_31_cardBusy(false) -, x161_24_gameFrameDrawn(false) { +: m_booSetter(gfxFactory, cmdQ, spareTex), x128_globalObjects(resFactory, resStore) { xe4_gameplayResult = EGameplayResult::Playing; g_Main = this; } diff --git a/Runtime/MP1/MP1.hpp b/Runtime/MP1/MP1.hpp index f2ca5a0ac..7586d70d3 100644 --- a/Runtime/MP1/MP1.hpp +++ b/Runtime/MP1/MP1.hpp @@ -217,15 +217,15 @@ private: u32 x130_[10] = {1000000}; - bool x160_24_finished : 1; - bool x160_25_mfGameBuilt : 1; - bool x160_26_screenFading : 1; - bool x160_27_ : 1; - bool x160_28_manageCard : 1; - bool x160_29_ : 1; - bool x160_30_ : 1; - bool x160_31_cardBusy : 1; - bool x161_24_gameFrameDrawn : 1; + bool x160_24_finished : 1 = false; + bool x160_25_mfGameBuilt : 1 = false; + bool x160_26_screenFading : 1 = false; + bool x160_27_ : 1 = false; + bool x160_28_manageCard : 1 = false; + bool x160_29_ : 1 = false; + bool x160_30_ : 1 = false; + bool x160_31_cardBusy : 1 = false; + bool x161_24_gameFrameDrawn : 1 = false; std::unique_ptr x164_archSupport; diff --git a/Runtime/MP1/World/CAtomicAlpha.cpp b/Runtime/MP1/World/CAtomicAlpha.cpp index b01194626..98088a818 100644 --- a/Runtime/MP1/World/CAtomicAlpha.cpp +++ b/Runtime/MP1/World/CAtomicAlpha.cpp @@ -23,7 +23,6 @@ CAtomicAlpha::CAtomicAlpha(TUniqueId uid, std::string_view name, const CEntityIn CAssetId cmdl, bool invisible, bool b2) : CPatterned(ECharacter::AtomicAlpha, uid, name, EFlavorType::Zero, info, xf, std::move(mData), pInfo, EMovementType::Flyer, EColliderType::One, EBodyType::Flyer, actParms, EKnockBackVariant::Medium) -, x568_24_inRange(false) , x568_25_invisible(invisible) , x568_26_applyBeamAttraction(b2) , x56c_bomdDropDelay(bombDropDelay) diff --git a/Runtime/MP1/World/CAtomicAlpha.hpp b/Runtime/MP1/World/CAtomicAlpha.hpp index a0499941d..34fb81820 100644 --- a/Runtime/MP1/World/CAtomicAlpha.hpp +++ b/Runtime/MP1/World/CAtomicAlpha.hpp @@ -17,7 +17,7 @@ class CAtomicAlpha : public CPatterned { SBomb(const std::string_view locator, pas::ELocomotionType locomotionType) : x0_locatorName(locator), x10_locomotionType(locomotionType) {} }; - bool x568_24_inRange : 1; + bool x568_24_inRange : 1 = false; bool x568_25_invisible : 1; bool x568_26_applyBeamAttraction : 1; float x56c_bomdDropDelay; diff --git a/Runtime/MP1/World/CBabygoth.cpp b/Runtime/MP1/World/CBabygoth.cpp index 12c1d1aeb..7562a5ff0 100644 --- a/Runtime/MP1/World/CBabygoth.cpp +++ b/Runtime/MP1/World/CBabygoth.cpp @@ -79,21 +79,7 @@ CBabygoth::CBabygoth(TUniqueId uid, std::string_view name, const CEntityInfo& in g_SimplePool->GetObj({SBIG('WPSC'), babyData.x44_fireBreathWeapon}) : g_SimplePool->GetObj("FlameThrower"sv)) , x98c_dVuln(pInfo.GetDamageVulnerability()) -, xa00_shellHitPoints(babyData.GetShellHitPoints()) -, xa48_24_isAlert(false) -, xa48_25_(false) -, xa48_26_inProjectileAttack(false) -, xa48_27_(false) -, xa48_28_pendingAttackContactDamage(false) -, xa48_29_hasBeenEnraged(false) -, xa48_30_heardPlayerFire(false) -, xa48_31_approachNeedsPathSearch(true) -, xa49_24_gettingUp(false) -, xa49_25_shouldStepBackwards(false) -, xa49_26_readyForTeam(false) -, xa49_27_locomotionValid(false) -, xa49_28_onApproachPath(false) -, xa49_29_objectSpaceCollision(false) { +, xa00_shellHitPoints(babyData.GetShellHitPoints()) { TLockedToken model = g_SimplePool->GetObj({SBIG('CMDL'), babyData.x138_noShellModel}); TLockedToken skin = g_SimplePool->GetObj({SBIG('CSKR'), babyData.x13c_noShellSkin}); xa08_noShellModel = diff --git a/Runtime/MP1/World/CBabygoth.hpp b/Runtime/MP1/World/CBabygoth.hpp index fec7ec593..5b927aa4d 100644 --- a/Runtime/MP1/World/CBabygoth.hpp +++ b/Runtime/MP1/World/CBabygoth.hpp @@ -97,20 +97,20 @@ private: TToken xa20_crackTwoParticle; TToken xa2c_destroyShellParticle; TLockedToken xa38_intermediateCrackParticle; // Used to be an optional, not necessary in URDE - bool xa48_24_isAlert : 1; - bool xa48_25_ : 1; - bool xa48_26_inProjectileAttack : 1; - bool xa48_27_ : 1; - bool xa48_28_pendingAttackContactDamage : 1; - bool xa48_29_hasBeenEnraged : 1; - bool xa48_30_heardPlayerFire : 1; - bool xa48_31_approachNeedsPathSearch : 1; - bool xa49_24_gettingUp : 1; - bool xa49_25_shouldStepBackwards : 1; - bool xa49_26_readyForTeam : 1; - bool xa49_27_locomotionValid : 1; - bool xa49_28_onApproachPath : 1; - bool xa49_29_objectSpaceCollision : 1; + bool xa48_24_isAlert : 1 = false; + bool xa48_25_ : 1 = false; + bool xa48_26_inProjectileAttack : 1 = false; + bool xa48_27_ : 1 = false; + bool xa48_28_pendingAttackContactDamage : 1 = false; + bool xa48_29_hasBeenEnraged : 1 = false; + bool xa48_30_heardPlayerFire : 1 = false; + bool xa48_31_approachNeedsPathSearch : 1 = true; + bool xa49_24_gettingUp : 1 = false; + bool xa49_25_shouldStepBackwards : 1 = false; + bool xa49_26_readyForTeam : 1 = false; + bool xa49_27_locomotionValid : 1 = false; + bool xa49_28_onApproachPath : 1 = false; + bool xa49_29_objectSpaceCollision : 1 = false; void AddSphereCollisionList(const SSphereJointInfo*, size_t, std::vector&); diff --git a/Runtime/MP1/World/CBeetle.cpp b/Runtime/MP1/World/CBeetle.cpp index ed6b65e05..98b89e08a 100644 --- a/Runtime/MP1/World/CBeetle.cpp +++ b/Runtime/MP1/World/CBeetle.cpp @@ -31,10 +31,7 @@ CBeetle::CBeetle(TUniqueId uid, std::string_view name, const CEntityInfo& info, , x744_platingVuln(platingVuln) , x7ac_tailVuln(tailVuln) , x814_attackDelayTimer(initialAttackDelay) -, x834_retreatTime(retreatTime) -, x838_24_hitSomething(false) -, x838_25_burrowing(false) -, x838_26_canSkid(false) { +, x834_retreatTime(retreatTime) { x5a0_headbuttDist = GetAnimationDistance(CPASAnimParmData(7, CPASAnimParm::FromEnum(0), CPASAnimParm::FromEnum(1))); x5a4_jumpBackwardDist = x64_modelData->GetScale().y() * diff --git a/Runtime/MP1/World/CBeetle.hpp b/Runtime/MP1/World/CBeetle.hpp index a810c5a6f..90ac67886 100644 --- a/Runtime/MP1/World/CBeetle.hpp +++ b/Runtime/MP1/World/CBeetle.hpp @@ -38,9 +38,9 @@ private: zeus::CVector3f x824_predictPos; float x830_intoGroundFactor = 1.f; float x834_retreatTime; - bool x838_24_hitSomething : 1; - bool x838_25_burrowing : 1; - bool x838_26_canSkid : 1; + bool x838_24_hitSomething : 1 = false; + bool x838_25_burrowing : 1 = false; + bool x838_26_canSkid : 1 = false; void SquadAdd(CStateManager& mgr); void SquadRemove(CStateManager& mgr); diff --git a/Runtime/MP1/World/CBouncyGrenade.cpp b/Runtime/MP1/World/CBouncyGrenade.cpp index bd88c8c2e..6cd2450d2 100644 --- a/Runtime/MP1/World/CBouncyGrenade.cpp +++ b/Runtime/MP1/World/CBouncyGrenade.cpp @@ -22,9 +22,7 @@ CBouncyGrenade::CBouncyGrenade(TUniqueId uid, std::string_view name, const CEnti , x2a4_elementGen2(std::make_unique(g_SimplePool->GetObj({'PART', data.GetElementGenId2()}))) , x2a8_elementGen3(std::make_unique(g_SimplePool->GetObj({'PART', data.GetElementGenId3()}))) , x2ac_elementGen4(std::make_unique(g_SimplePool->GetObj({'PART', data.GetElementGenId4()}))) -, x2b0_explodePlayerDistance(explodePlayerDistance) -, x2b4_24_exploded(false) -, x2b4_25_(false) { +, x2b0_explodePlayerDistance(explodePlayerDistance) { SetMomentumWR({0.f, 0.f, -GravityConstant() * GetMass()}); SetVelocityWR(velocity * xf.frontVector()); x2a0_elementGen1->SetParticleEmission(false); diff --git a/Runtime/MP1/World/CBouncyGrenade.hpp b/Runtime/MP1/World/CBouncyGrenade.hpp index ab6cfa9d7..5868fa5fe 100644 --- a/Runtime/MP1/World/CBouncyGrenade.hpp +++ b/Runtime/MP1/World/CBouncyGrenade.hpp @@ -68,8 +68,8 @@ private: std::unique_ptr x2a8_elementGen3; std::unique_ptr x2ac_elementGen4; float x2b0_explodePlayerDistance; - bool x2b4_24_exploded : 1; - bool x2b4_25_ : 1; + bool x2b4_24_exploded : 1 = false; + bool x2b4_25_ : 1 = false; public: CBouncyGrenade(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CTransform& xf, diff --git a/Runtime/MP1/World/CChozoGhost.cpp b/Runtime/MP1/World/CChozoGhost.cpp index 6018129a0..b59524219 100644 --- a/Runtime/MP1/World/CChozoGhost.cpp +++ b/Runtime/MP1/World/CChozoGhost.cpp @@ -99,18 +99,6 @@ CChozoGhost::CChozoGhost(TUniqueId uid, std::string_view name, const CEntityInfo , x660_midChance(midChance) , x664_24_behaviorEnabled(w1) , x664_25_flinch(!w1) -, x664_26_alert(false) -, x664_27_onGround(false) -, x664_28_(false) -, x664_29_fadedIn(false) -, x664_30_fadedOut(false) -, x664_31_(false) -, x665_24_(true) -, x665_25_(false) -, x665_26_shouldSwoosh(false) -, x665_27_playerInLeashRange(false) -, x665_28_inRange(false) -, x665_29_aggressive(false) , x680_behaveType(x664_24_behaviorEnabled ? EBehaveType::Attack : EBehaveType::None) , x68c_boneTracking(*GetModelData()->GetAnimationData(), "Head_1"sv, zeus::degToRad(80.f), zeus::degToRad(180.f), EBoneTrackingFlags::None) { diff --git a/Runtime/MP1/World/CChozoGhost.hpp b/Runtime/MP1/World/CChozoGhost.hpp index 9252fac8b..af0575a9f 100644 --- a/Runtime/MP1/World/CChozoGhost.hpp +++ b/Runtime/MP1/World/CChozoGhost.hpp @@ -62,18 +62,18 @@ private: u32 x660_midChance; bool x664_24_behaviorEnabled : 1; bool x664_25_flinch : 1; - bool x664_26_alert : 1; - bool x664_27_onGround : 1; - bool x664_28_ : 1; - bool x664_29_fadedIn : 1; - bool x664_30_fadedOut : 1; - bool x664_31_ : 1; - bool x665_24_ : 1; - bool x665_25_ : 1; - bool x665_26_shouldSwoosh : 1; - bool x665_27_playerInLeashRange : 1; - bool x665_28_inRange : 1; - bool x665_29_aggressive : 1; + bool x664_26_alert : 1 = false; + bool x664_27_onGround : 1 = false; + bool x664_28_ : 1 = false; + bool x664_29_fadedIn : 1 = false; + bool x664_30_fadedOut : 1 = false; + bool x664_31_ : 1 = false; + bool x665_24_ : 1 = true; + bool x665_25_ : 1 = false; + bool x665_26_shouldSwoosh : 1 = false; + bool x665_27_playerInLeashRange : 1 = false; + bool x665_28_inRange : 1 = false; + bool x665_29_aggressive : 1 = false; float x668_ = 0.f; float x66c_ = 0.f; float x670_ = 0.f; diff --git a/Runtime/MP1/World/CElitePirate.cpp b/Runtime/MP1/World/CElitePirate.cpp index dbb6d549c..fea797581 100644 --- a/Runtime/MP1/World/CElitePirate.cpp +++ b/Runtime/MP1/World/CElitePirate.cpp @@ -85,17 +85,7 @@ CElitePirate::CElitePirate(TUniqueId uid, std::string_view name, const CEntityIn EBoneTrackingFlags::None) , x738_collisionAabb(GetBoundingBox(), GetMaterialList()) , x7a0_initialSpeed(x3b4_speed) -, x7d0_pathFindSearch(nullptr, 1, pInfo.GetPathfindingIndex(), 1.f, 1.f) -, x8c0_(5.f) -, x988_24_damageOn(false) -, x988_25_attackingRightClaw(false) -, x988_26_attackingLeftClaw(false) -, x988_27_shotAt(false) -, x988_28_alert(false) -, x988_29_shockWaveAnim(false) -, x988_30_calledForBackup(false) -, x988_31_running(false) -, x989_24_onPath(false) { +, x7d0_pathFindSearch(nullptr, 1, pInfo.GetPathfindingIndex(), 1.f, 1.f) { if (x5d8_data.GetX20().IsValid()) { x760_energyAbsorbDesc = g_SimplePool->GetObj({SBIG('PART'), x5d8_data.GetX20()}); } diff --git a/Runtime/MP1/World/CElitePirate.hpp b/Runtime/MP1/World/CElitePirate.hpp index 0a77b2987..088a67981 100644 --- a/Runtime/MP1/World/CElitePirate.hpp +++ b/Runtime/MP1/World/CElitePirate.hpp @@ -127,16 +127,16 @@ private: u32 x7cc_activeMaterialSet = 0; CPathFindSearch x7d0_pathFindSearch; zeus::CVector3f x8b4_targetDestPos; - SUnknownStruct x8c0_; - bool x988_24_damageOn : 1; - bool x988_25_attackingRightClaw : 1; - bool x988_26_attackingLeftClaw : 1; - bool x988_27_shotAt : 1; - bool x988_28_alert : 1; - bool x988_29_shockWaveAnim : 1; - bool x988_30_calledForBackup : 1; - bool x988_31_running : 1; - bool x989_24_onPath : 1; + SUnknownStruct x8c0_{5.0f}; + bool x988_24_damageOn : 1 = false; + bool x988_25_attackingRightClaw : 1 = false; + bool x988_26_attackingLeftClaw : 1 = false; + bool x988_27_shotAt : 1 = false; + bool x988_28_alert : 1 = false; + bool x988_29_shockWaveAnim : 1 = false; + bool x988_30_calledForBackup : 1 = false; + bool x988_31_running : 1 = false; + bool x989_24_onPath : 1 = false; public: DEFINE_PATTERNED(ElitePirate) diff --git a/Runtime/MP1/World/CEyeball.cpp b/Runtime/MP1/World/CEyeball.cpp index 7fd687e17..5ed3ebd6c 100644 --- a/Runtime/MP1/World/CEyeball.cpp +++ b/Runtime/MP1/World/CEyeball.cpp @@ -29,17 +29,9 @@ CEyeball::CEyeball(TUniqueId uid, std::string_view name, CPatterned::EFlavorType , x5e0_beamPulseFxId(beamPulseFxId) , x5e4_beamTextureId(beamTextureId) , x5e8_beamGlowTextureId(beamGlowTextureId) +, x5f4_animIdxs{static_cast(anim0), static_cast(anim1), static_cast(anim2), static_cast(anim3)} , x604_beamSfxId(CSfxManager::TranslateSFXID(beamSfx)) -, x60c_24_canAttack(false) -, x60c_25_playerInRange(false) -, x60c_26_alert(false) -, x60c_27_attackDisabled(attackDisabled) -, x60c_28_firingBeam(false) { - x5f4_animIdxs[0] = anim0; - x5f4_animIdxs[1] = anim1; - x5f4_animIdxs[2] = anim2; - x5f4_animIdxs[3] = anim3; - +, x60c_27_attackDisabled(attackDisabled) { x460_knockBackController.SetAutoResetImpulse(false); } @@ -192,19 +184,22 @@ void CEyeball::Active(CStateManager& mgr, EStateMsg msg, float) { } void CEyeball::UpdateAnimation() { - if (std::fabs(GetModelData()->GetAnimationData()->GetAnimTimeRemaining("Whole Body"sv) - 0.f) >= 0.00001f) + if (std::fabs(GetModelData()->GetAnimationData()->GetAnimTimeRemaining("Whole Body"sv) - 0.f) >= 0.00001f) { return; + } x5f0_currentAnim = (x5f0_currentAnim + 1) & 3; - for (u32 i = 0; i < 4; ++i) { - if (x5f4_animIdxs[x5f0_currentAnim] != -1) + for (size_t i = 0; i < x5f4_animIdxs.size(); ++i) { + if (x5f4_animIdxs[x5f0_currentAnim] != -1) { break; + } x5f0_currentAnim = (x5f0_currentAnim + 1) & 3; } - s32 animIdx = x5f4_animIdxs[x5f0_currentAnim]; - if (animIdx != -1) + const s32 animIdx = x5f4_animIdxs[x5f0_currentAnim]; + if (animIdx != -1) { x450_bodyController->GetCommandMgr().DeliverCmd(CBCScriptedCmd(animIdx, false, false, 0.f)); + } } void CEyeball::ResetBeamState(CStateManager& mgr) { diff --git a/Runtime/MP1/World/CEyeball.hpp b/Runtime/MP1/World/CEyeball.hpp index a7fa3699c..0566caa78 100644 --- a/Runtime/MP1/World/CEyeball.hpp +++ b/Runtime/MP1/World/CEyeball.hpp @@ -1,5 +1,6 @@ #pragma once +#include #include #include "Runtime/RetroTypes.hpp" @@ -22,14 +23,14 @@ class CEyeball : public CPatterned { CAssetId x5e8_beamGlowTextureId; TUniqueId x5ec_projectileId = kInvalidUniqueId; u32 x5f0_currentAnim = 0; - s32 x5f4_animIdxs[4]; + std::array x5f4_animIdxs; u16 x604_beamSfxId; - CSfxHandle x608_beamSfx = 0; - bool x60c_24_canAttack : 1; - bool x60c_25_playerInRange : 1; - bool x60c_26_alert : 1; + CSfxHandle x608_beamSfx; + bool x60c_24_canAttack : 1 = false; + bool x60c_25_playerInRange : 1 = false; + bool x60c_26_alert : 1 = false; bool x60c_27_attackDisabled : 1; - bool x60c_28_firingBeam : 1; + bool x60c_28_firingBeam : 1 = false; void CreateBeam(CStateManager&); void FireBeam(CStateManager&, const zeus::CTransform&); diff --git a/Runtime/MP1/World/CFlaahgra.cpp b/Runtime/MP1/World/CFlaahgra.cpp index 4768fc538..b4e30c97a 100644 --- a/Runtime/MP1/World/CFlaahgra.cpp +++ b/Runtime/MP1/World/CFlaahgra.cpp @@ -93,21 +93,6 @@ CFlaahgra::CFlaahgra(TUniqueId uid, std::string_view name, const CEntityInfo& in , x820_(xf.origin) , x8a0_(xf.frontVector()) , x8ac_(animRes) { - x8e4_24_loaded = false; - x8e4_25_loading = false; - x8e4_26_ = false; - x8e4_27_ = false; - x8e4_28_ = false; - x8e4_29_getup = false; - x8e4_30_ = false; - x8e4_31_ = false; - x8e5_24_ = false; - x8e5_25_ = false; - x8e5_26_ = false; - x8e5_27_ = false; - x8e5_28_ = false; - x8e5_29_ = true; - x8e5_30_ = false; x6dc_.Token().Lock(); x704_.Token().Lock(); x7dc_.SetDamage(0.5f * x7dc_.GetDamage()); diff --git a/Runtime/MP1/World/CFlaahgra.hpp b/Runtime/MP1/World/CFlaahgra.hpp index 24bbfcd20..1a23dfdcd 100644 --- a/Runtime/MP1/World/CFlaahgra.hpp +++ b/Runtime/MP1/World/CFlaahgra.hpp @@ -134,21 +134,21 @@ class CFlaahgra : public CPatterned { CAnimRes x8ac_; std::optional> x8c8_depGroup; std::vector x8d4_tokens; - bool x8e4_24_loaded : 1; - bool x8e4_25_loading : 1; - bool x8e4_26_ : 1; - bool x8e4_27_ : 1; - bool x8e4_28_ : 1; - bool x8e4_29_getup : 1; - bool x8e4_30_ : 1; - bool x8e4_31_ : 1; - bool x8e5_24_ : 1; - bool x8e5_25_ : 1; - bool x8e5_26_ : 1; - bool x8e5_27_ : 1; - bool x8e5_28_ : 1; - bool x8e5_29_ : 1; - bool x8e5_30_ : 1; + bool x8e4_24_loaded : 1 = false; + bool x8e4_25_loading : 1 = false; + bool x8e4_26_ : 1 = false; + bool x8e4_27_ : 1 = false; + bool x8e4_28_ : 1 = false; + bool x8e4_29_getup : 1 = false; + bool x8e4_30_ : 1 = false; + bool x8e4_31_ : 1 = false; + bool x8e5_24_ : 1 = false; + bool x8e5_25_ : 1 = false; + bool x8e5_26_ : 1 = false; + bool x8e5_27_ : 1 = false; + bool x8e5_28_ : 1 = false; + bool x8e5_29_ : 1 = true; + bool x8e5_30_ : 1 = false; void LoadDependencies(CAssetId); void ResetModelDataAndBodyController(); diff --git a/Runtime/MP1/World/CFlaahgraTentacle.cpp b/Runtime/MP1/World/CFlaahgraTentacle.cpp index 7004b05f5..a9c5cc1c2 100644 --- a/Runtime/MP1/World/CFlaahgraTentacle.cpp +++ b/Runtime/MP1/World/CFlaahgraTentacle.cpp @@ -24,7 +24,6 @@ CFlaahgraTentacle::CFlaahgraTentacle(TUniqueId uid, std::string_view name, const const CActorParameters& actParms) : CPatterned(ECharacter::FlaahgraTentacle, uid, name, EFlavorType::Zero, info, xf, std::move(mData), pInfo, EMovementType::Flyer, EColliderType::One, EBodyType::Restricted, actParms, EKnockBackVariant::Large) { - x58e_24_ = false; GetActorLights()->SetCastShadows(false); x460_knockBackController.SetAutoResetImpulse(false); CreateShadow(false); diff --git a/Runtime/MP1/World/CFlaahgraTentacle.hpp b/Runtime/MP1/World/CFlaahgraTentacle.hpp index 5c55392aa..1647f3ed9 100644 --- a/Runtime/MP1/World/CFlaahgraTentacle.hpp +++ b/Runtime/MP1/World/CFlaahgraTentacle.hpp @@ -19,7 +19,7 @@ class CFlaahgraTentacle : public CPatterned { TUniqueId x57c_tentacleTipAct = kInvalidUniqueId; zeus::CVector3f x580_forceVector; TUniqueId x58c_triggerId = kInvalidUniqueId; - bool x58e_24_ : 1; + bool x58e_24_ : 1 = false; void AddSphereCollisionList(const SSphereJointInfo* sphereJoints, size_t jointCount, std::vector& outJoints); diff --git a/Runtime/MP1/World/CFlickerBat.cpp b/Runtime/MP1/World/CFlickerBat.cpp index 6fc2c5696..665a41b9b 100644 --- a/Runtime/MP1/World/CFlickerBat.cpp +++ b/Runtime/MP1/World/CFlickerBat.cpp @@ -17,9 +17,6 @@ CFlickerBat::CFlickerBat(TUniqueId uid, std::string_view name, CPatterned::EFlav : CPatterned(ECharacter::FlickerBat, uid, name, flavor, info, xf, std::move(mData), pInfo, EMovementType::Flyer, colType, EBodyType::Pitchable, actParms, EKnockBackVariant::Small) , x574_state(EFlickerBatState(startsHidden)) -, x580_24_wasInXray(false) -, x580_25_heardShot(false) -, x580_26_inLOS(false) , x580_27_enableLOSCheck(enableLineOfSight) { SetupPlayerCollision(startsHidden); x3d8_xDamageThreshold = 0.f; diff --git a/Runtime/MP1/World/CFlickerBat.hpp b/Runtime/MP1/World/CFlickerBat.hpp index 729bb9835..3329110f1 100644 --- a/Runtime/MP1/World/CFlickerBat.hpp +++ b/Runtime/MP1/World/CFlickerBat.hpp @@ -14,9 +14,9 @@ private: EFlickerBatState x574_state; float x578_fadeRemTime = 1.f; float x57c_ooFadeDur = 0.f; - bool x580_24_wasInXray : 1; - bool x580_25_heardShot : 1; - bool x580_26_inLOS : 1; + bool x580_24_wasInXray : 1 = false; + bool x580_25_heardShot : 1 = false; + bool x580_26_inLOS : 1 = false; bool x580_27_enableLOSCheck : 1; void NotifyNeighbors(CStateManager&); diff --git a/Runtime/MP1/World/CFlyingPirate.cpp b/Runtime/MP1/World/CFlyingPirate.cpp index 6a561f026..88b5d83b7 100644 --- a/Runtime/MP1/World/CFlyingPirate.cpp +++ b/Runtime/MP1/World/CFlyingPirate.cpp @@ -112,8 +112,7 @@ CFlyingPirate::CFlyingPirateRagDoll::CFlyingPirateRagDoll(CStateManager& mgr, CF , x6c_actor(actor) , x88_sfx(w1) , x9c_(w2) -, xa4_(actor->GetDestPos() - actor->GetTranslation()) -, xb0_24_(false) { +, xa4_(actor->GetDestPos() - actor->GetTranslation()) { actor->RemoveMaterial(EMaterialTypes::Solid, EMaterialTypes::AIBlock, EMaterialTypes::GroundCollider, mgr); actor->HealthInfo(mgr)->SetHP(-1.f); SetNumParticles(skParts.size()); @@ -311,25 +310,6 @@ CFlyingPirate::CFlyingPirate(TUniqueId uid, std::string_view name, const CEntity , x568_data(in, propCount) , x6a0_24_isFlyingPirate(x568_data.x8_type == EFlyingPirateType::FlyingPirate) , x6a0_25_isAquaPirate(x568_data.x8_type == EFlyingPirateType::AquaPirate) -, x6a0_26_hearShot(false) -, x6a0_27_canPatrol(false) -, x6a0_28_(false) -, x6a0_29_checkForProjectiles(false) -, x6a0_30_(false) -, x6a0_31_canSeePlayer(true) -, x6a1_24_prevInCineCam(false) -, x6a1_25_(false) -, x6a1_26_isAttackingObject(false) -, x6a1_27_(false) -, x6a1_28_(false) -, x6a1_29_isMoving(false) -, x6a1_30_spinToDeath(false) -, x6a1_31_stopped(false) -, x6a2_24_aggressive(false) -, x6a2_25_aggressionChecked(false) -, x6a2_26_jetpackActive(false) -, x6a2_27_sparksActive(false) -, x6a2_28_(false) , x6a8_pathFindSearch(nullptr, x6a0_25_isAquaPirate ? 2 : 3, pInfo.GetHalfExtent(), pInfo.GetHeight(), pInfo.GetPathfindingIndex()) , x7a0_boneTracking(*GetModelData()->GetAnimationData(), "Head_1"sv, zeus::degToRad(80.f), zeus::degToRad(180.f), diff --git a/Runtime/MP1/World/CFlyingPirate.hpp b/Runtime/MP1/World/CFlyingPirate.hpp index f705b1abc..cfd0854db 100644 --- a/Runtime/MP1/World/CFlyingPirate.hpp +++ b/Runtime/MP1/World/CFlyingPirate.hpp @@ -68,7 +68,7 @@ private: u16 x9c_; CSfxHandle xa0_; zeus::CVector3f xa4_; - bool xb0_24_ : 1; + bool xb0_24_ : 1 = false; public: CFlyingPirateRagDoll(CStateManager& mgr, CFlyingPirate* actor, u16 w1, u16 w2); @@ -145,27 +145,27 @@ private: rstl::reserved_vector, 3> x65c_particleGenDescs; // was rstl::reserved_vector, 3> rstl::reserved_vector, 3> x684_particleGens; - bool x6a0_24_isFlyingPirate : 1; - bool x6a0_25_isAquaPirate : 1; - bool x6a0_26_hearShot : 1; - bool x6a0_27_canPatrol : 1; - bool x6a0_28_ : 1; - bool x6a0_29_checkForProjectiles : 1; - bool x6a0_30_ : 1; - bool x6a0_31_canSeePlayer : 1; - bool x6a1_24_prevInCineCam : 1; - bool x6a1_25_ : 1; - bool x6a1_26_isAttackingObject : 1; - bool x6a1_27_ : 1; - bool x6a1_28_ : 1; - bool x6a1_29_isMoving : 1; - bool x6a1_30_spinToDeath : 1; - bool x6a1_31_stopped : 1; - bool x6a2_24_aggressive : 1; - bool x6a2_25_aggressionChecked : 1; - bool x6a2_26_jetpackActive : 1; - bool x6a2_27_sparksActive : 1; - bool x6a2_28_ : 1; + bool x6a0_24_isFlyingPirate : 1 = false; + bool x6a0_25_isAquaPirate : 1 = false; + bool x6a0_26_hearShot : 1 = false; + bool x6a0_27_canPatrol : 1 = false; + bool x6a0_28_ : 1 = false; + bool x6a0_29_checkForProjectiles : 1 = false; + bool x6a0_30_ : 1 = false; + bool x6a0_31_canSeePlayer : 1 = true; + bool x6a1_24_prevInCineCam : 1 = false; + bool x6a1_25_ : 1 = false; + bool x6a1_26_isAttackingObject : 1 = false; + bool x6a1_27_ : 1 = false; + bool x6a1_28_ : 1 = false; + bool x6a1_29_isMoving : 1 = false; + bool x6a1_30_spinToDeath : 1 = false; + bool x6a1_31_stopped : 1 = false; + bool x6a2_24_aggressive : 1 = false; + bool x6a2_25_aggressionChecked : 1 = false; + bool x6a2_26_jetpackActive : 1 = false; + bool x6a2_27_sparksActive : 1 = false; + bool x6a2_28_ : 1 = false; TUniqueId x6a4_currentCoverPoint = kInvalidUniqueId; TUniqueId x6a6_id2 = kInvalidUniqueId; CPathFindSearch x6a8_pathFindSearch; diff --git a/Runtime/MP1/World/CJellyZap.cpp b/Runtime/MP1/World/CJellyZap.cpp index ec6e4fc4d..bdf201212 100644 --- a/Runtime/MP1/World/CJellyZap.cpp +++ b/Runtime/MP1/World/CJellyZap.cpp @@ -28,8 +28,6 @@ CJellyZap::CJellyZap(TUniqueId uid, std::string_view name, const CEntityInfo& in , x5ac_(f6) , x5b0_(f7) , x5b4_(f12) -, x5b8_24_(false) -, x5b8_25_(false) , x5b8_26_(b1) { UpdateThermalFrozenState(true); x50c_baseDamageMag = 0.f; diff --git a/Runtime/MP1/World/CJellyZap.hpp b/Runtime/MP1/World/CJellyZap.hpp index 8cf555e54..372d5cfb0 100644 --- a/Runtime/MP1/World/CJellyZap.hpp +++ b/Runtime/MP1/World/CJellyZap.hpp @@ -18,8 +18,8 @@ class CJellyZap : public CPatterned { float x5ac_; float x5b0_; float x5b4_; - bool x5b8_24_ : 1; - bool x5b8_25_ : 1; + bool x5b8_24_ : 1 = false; + bool x5b8_25_ : 1 = false; bool x5b8_26_ : 1; void AddSelfToFishCloud(CStateManager&, float, float, bool); diff --git a/Runtime/MP1/World/CMetroid.cpp b/Runtime/MP1/World/CMetroid.cpp index 0361fa327..8adbdbff1 100644 --- a/Runtime/MP1/World/CMetroid.cpp +++ b/Runtime/MP1/World/CMetroid.cpp @@ -23,7 +23,6 @@ CMetroid::CMetroid(TUniqueId uid, std::string_view name, EFlavorType flavor, con const zeus::CTransform& xf, CModelData&& mData, const CPatternedInfo& pInfo, const CActorParameters& aParms, const CMetroidData& metroidData, TUniqueId) : CPatterned(ECharacter::Metroid, uid, name, flavor, info, xf, std::move(mData), pInfo, EMovementType::Flyer, - EColliderType::One, EBodyType::Flyer, aParms, EKnockBackVariant::Medium) -, x9bf_29_(false) {} + EColliderType::One, EBodyType::Flyer, aParms, EKnockBackVariant::Medium) {} } // namespace urde::MP1 diff --git a/Runtime/MP1/World/CMetroid.hpp b/Runtime/MP1/World/CMetroid.hpp index 14c4d5b25..adbe84b62 100644 --- a/Runtime/MP1/World/CMetroid.hpp +++ b/Runtime/MP1/World/CMetroid.hpp @@ -30,7 +30,7 @@ public: }; class CMetroid : public CPatterned { - bool x9bf_29_ : 1; + bool x9bf_29_ : 1 = false; public: DEFINE_PATTERNED(Metroid) diff --git a/Runtime/MP1/World/CMetroidBeta.cpp b/Runtime/MP1/World/CMetroidBeta.cpp index 6750f6006..fac634659 100644 --- a/Runtime/MP1/World/CMetroidBeta.cpp +++ b/Runtime/MP1/World/CMetroidBeta.cpp @@ -56,15 +56,7 @@ CMetroidBeta::CMetroidBeta(TUniqueId uid, std::string_view name, const CEntityIn , x824_(std::make_unique(x7f0_, 0)) , x828_(std::make_unique(x7fc_)) , x82c_(std::make_unique(x808_)) -, x830_(std::make_unique(x814_)) -, x840_24_(false) -, x840_25_(false) -, x840_26_(false) -, x840_27_(false) -, x840_28_(false) -, x840_29_(false) -, x840_30_(false) -, x840_31_(false) { +, x830_(std::make_unique(x814_)) { x820_->SetParticleEmission(false); x828_->SetParticleEmission(false); x82c_->SetParticleEmission(false); diff --git a/Runtime/MP1/World/CMetroidBeta.hpp b/Runtime/MP1/World/CMetroidBeta.hpp index 0c4400203..c8b41efe0 100644 --- a/Runtime/MP1/World/CMetroidBeta.hpp +++ b/Runtime/MP1/World/CMetroidBeta.hpp @@ -75,14 +75,14 @@ class CMetroidBeta : public CPatterned { float x834_ = 0.f; CRandom16 x838_ = CRandom16(1469); float x83c_; - bool x840_24_ : 1; - bool x840_25_ : 1; - bool x840_26_ : 1; - bool x840_27_ : 1; - bool x840_28_ : 1; - bool x840_29_ : 1; - bool x840_30_ : 1; - bool x840_31_ : 1; + bool x840_24_ : 1 = false; + bool x840_25_ : 1 = false; + bool x840_26_ : 1 = false; + bool x840_27_ : 1 = false; + bool x840_28_ : 1 = false; + bool x840_29_ : 1 = false; + bool x840_30_ : 1 = false; + bool x840_31_ : 1 = false; void CreateCollisionActorManager(CStateManager& mgr); void AddSphereJoints(SSphereJointInfo* sphereJoints, s32 count, std::vector& joints); diff --git a/Runtime/MP1/World/CParasite.cpp b/Runtime/MP1/World/CParasite.cpp index e21fed1f5..7d8423cb6 100644 --- a/Runtime/MP1/World/CParasite.cpp +++ b/Runtime/MP1/World/CParasite.cpp @@ -58,19 +58,7 @@ CParasite::CParasite(TUniqueId uid, std::string_view name, EFlavorType flavor, c , x714_iceZoomerJointHP(iceZoomerJointHP) , x73c_haltSfx(CSfxManager::TranslateSFXID(haltSfx)) , x73e_getUpSfx(CSfxManager::TranslateSFXID(getUpSfx)) -, x740_crouchSfx(CSfxManager::TranslateSFXID(crouchSfx)) -, x742_24_receivedTelegraph(false) -, x742_25_jumpVelDirty(false) -, x742_26_(false) -, x742_27_landed(false) -, x742_28_onGround(true) -, x742_29_(false) -, x742_30_attackOver(true) -, x742_31_(false) -, x743_24_halted(false) -, x743_25_vulnerable(false) -, x743_26_oculusShotAt(false) -, x743_27_inJump(false) { +, x740_crouchSfx(CSfxManager::TranslateSFXID(crouchSfx)) { switch (x5d0_walkerType) { case EWalkerType::Geemer: x460_knockBackController.SetEnableFreeze(false); diff --git a/Runtime/MP1/World/CParasite.hpp b/Runtime/MP1/World/CParasite.hpp index 69b07dc15..505f61590 100644 --- a/Runtime/MP1/World/CParasite.hpp +++ b/Runtime/MP1/World/CParasite.hpp @@ -70,18 +70,18 @@ class CParasite : public CWallWalker { u16 x73c_haltSfx; u16 x73e_getUpSfx; u16 x740_crouchSfx; - bool x742_24_receivedTelegraph : 1; - bool x742_25_jumpVelDirty : 1; - bool x742_26_ : 1; - bool x742_27_landed : 1; - bool x742_28_onGround : 1; - bool x742_29_ : 1; - bool x742_30_attackOver : 1; - bool x742_31_ : 1; - bool x743_24_halted : 1; - bool x743_25_vulnerable : 1; - bool x743_26_oculusShotAt : 1; - bool x743_27_inJump : 1; + bool x742_24_receivedTelegraph : 1 = false; + bool x742_25_jumpVelDirty : 1 = false; + bool x742_26_ : 1 = false; + bool x742_27_landed : 1 = false; + bool x742_28_onGround : 1 = true; + bool x742_29_ : 1 = false; + bool x742_30_attackOver : 1 = true; + bool x742_31_ : 1 = false; + bool x743_24_halted : 1 = false; + bool x743_25_vulnerable : 1 = false; + bool x743_26_oculusShotAt : 1 = false; + bool x743_27_inJump : 1 = false; bool CloseToWall(const CStateManager& mgr) const; void FaceTarget(const zeus::CVector3f& target); diff --git a/Runtime/MP1/World/CPhazonPool.cpp b/Runtime/MP1/World/CPhazonPool.cpp index 96d8596c3..a9c4b86f2 100644 --- a/Runtime/MP1/World/CPhazonPool.cpp +++ b/Runtime/MP1/World/CPhazonPool.cpp @@ -22,8 +22,7 @@ CPhazonPool::CPhazonPool(TUniqueId uid, std::string_view name, const CEntityInfo , x1c0_(p19) , x1c8_(p18) , x1d8_(p11) -, x1e0_24_(p15) -, x1e0_25_(false) { +, x1e0_24_(p15) { if (w3.IsValid()) { x170_elementGen1 = std::make_unique(g_SimplePool->GetObj(SObjectTag{SBIG('PART'), w3})); x170_elementGen1->SetParticleEmission(false); diff --git a/Runtime/MP1/World/CPhazonPool.hpp b/Runtime/MP1/World/CPhazonPool.hpp index 2c5cb7c2e..2a5f8132f 100644 --- a/Runtime/MP1/World/CPhazonPool.hpp +++ b/Runtime/MP1/World/CPhazonPool.hpp @@ -32,7 +32,7 @@ private: u32 x1d8_; u32 x1dc_ = 0; bool x1e0_24_ : 1; - bool x1e0_25_ : 1; + bool x1e0_25_ : 1 = false; public: CPhazonPool(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CTransform& xf, diff --git a/Runtime/MP1/World/CPuddleSpore.cpp b/Runtime/MP1/World/CPuddleSpore.cpp index 9ac5a7951..a0744347f 100644 --- a/Runtime/MP1/World/CPuddleSpore.cpp +++ b/Runtime/MP1/World/CPuddleSpore.cpp @@ -37,9 +37,7 @@ CPuddleSpore::CPuddleSpore(TUniqueId uid, std::string_view name, EFlavorType fla , x594_height(pInfo.GetHeight()) , x5a0_(CalculateBoundingBox(), GetMaterialList()) , x5d0_(g_SimplePool->GetObj({SBIG('PART'), glowFx})) -, x5ec_projectileInfo(weapon, dInfo) -, x614_24(false) -, x614_25(false) { +, x5ec_projectileInfo(weapon, dInfo) { x5dc_elemGens.reserve(kEyeCount); for (u32 i = 0; i < kEyeCount; ++i) x5dc_elemGens.emplace_back(std::make_unique(x5d0_)); diff --git a/Runtime/MP1/World/CPuddleSpore.hpp b/Runtime/MP1/World/CPuddleSpore.hpp index 9d37a99bf..b5b76e485 100644 --- a/Runtime/MP1/World/CPuddleSpore.hpp +++ b/Runtime/MP1/World/CPuddleSpore.hpp @@ -29,8 +29,8 @@ class CPuddleSpore : public CPatterned { TToken x5d0_; std::vector> x5dc_elemGens; // originally a vector of CElementGen CProjectileInfo x5ec_projectileInfo; - bool x614_24 : 1; - bool x614_25 : 1; + bool x614_24 : 1 = false; + bool x614_25 : 1 = false; bool HitShell(const zeus::CVector3f&) const; void KnockPlayer(CStateManager&, float); diff --git a/Runtime/MP1/World/CPuddleToadGamma.cpp b/Runtime/MP1/World/CPuddleToadGamma.cpp index 82304c0bd..0fe8b5cc6 100644 --- a/Runtime/MP1/World/CPuddleToadGamma.cpp +++ b/Runtime/MP1/World/CPuddleToadGamma.cpp @@ -37,10 +37,7 @@ CPuddleToadGamma::CPuddleToadGamma(TUniqueId uid, std::string_view name, EFlavor , x5b4_localShootDir(localShootDir) , x5c0_playerShootSpeed(playerShootSpeed) , x5c4_shouldAttackWaitTime(shouldAttackWaitTime) -, x5c8_spotPlayerWaitTime(spotPlayerWaitTime) -, x5e8_24_playerInside(false) -, x5e8_25_waitTimerActive(false) -, x5e8_26_shotPlayer(false) { +, x5c8_spotPlayerWaitTime(spotPlayerWaitTime) { x401_26_disableMove = true; x460_knockBackController.SetEnableBurn(false); x460_knockBackController.SetEnableLaggedBurnDeath(false); diff --git a/Runtime/MP1/World/CPuddleToadGamma.hpp b/Runtime/MP1/World/CPuddleToadGamma.hpp index c0af30aa8..2cd4f43da 100644 --- a/Runtime/MP1/World/CPuddleToadGamma.hpp +++ b/Runtime/MP1/World/CPuddleToadGamma.hpp @@ -25,9 +25,9 @@ class CPuddleToadGamma final : public CPatterned { zeus::CVector3f x5cc_suckPoint; zeus::CVector3f x5d8_damageablePoint; std::unique_ptr x5e4_collisionTreePrim; - bool x5e8_24_playerInside : 1; - bool x5e8_25_waitTimerActive : 1; - bool x5e8_26_shotPlayer : 1; + bool x5e8_24_playerInside : 1 = false; + bool x5e8_25_waitTimerActive : 1 = false; + bool x5e8_26_shotPlayer : 1 = false; void SetSolid(CStateManager&, bool); diff --git a/Runtime/MP1/World/CRidley.cpp b/Runtime/MP1/World/CRidley.cpp index 80dbe047e..aeab38bfa 100644 --- a/Runtime/MP1/World/CRidley.cpp +++ b/Runtime/MP1/World/CRidley.cpp @@ -260,31 +260,6 @@ CRidley::CRidley(TUniqueId uid, std::string_view name, const CEntityInfo& info, , x998_(CStaticRes(x568_data.x28_, GetModelData()->GetScale())) , x9e4_(CStaticRes(x568_data.x2c_, GetModelData()->GetScale())) , xa30_breastPlateSegId(GetModelData()->GetAnimationData()->GetLocatorSegId("breastPlate_LCTR"sv)) -, xa31_24_(true) -, xa31_25_(true) -, xa31_26_(false) -, xa31_27_(false) -, xa31_28_(false) -, xa31_29_(false) -, xa31_30_(false) -, xa31_31_(false) -, xa32_24_(false) -, xa32_25_(false) -, xa32_26_(false) -, xa32_28_shotAt(false) -, xa32_29_(false) -, xa32_31_(true) -, xa33_24_(false) -, xa33_25_(true) -, xa33_26_(false) -, xa33_27_(true) -, xa33_28_(false) -, xa33_29_doStrafe(false) -, xa33_30_(false) -, xa33_31_(false) -, xa34_24_(false) -, xa34_25_(false) -, xa34_26_(false) , xa38_(CStaticRes(x568_data.x24_, 4.f * GetModelData()->GetScale())) , xadc_(44.f * GetModelData()->GetScale().z()) , xae0_(20.f * GetModelData()->GetScale().x()) diff --git a/Runtime/MP1/World/CRidley.hpp b/Runtime/MP1/World/CRidley.hpp index dc42688f7..cbe30f81c 100644 --- a/Runtime/MP1/World/CRidley.hpp +++ b/Runtime/MP1/World/CRidley.hpp @@ -73,33 +73,33 @@ class CRidley : public CPatterned { CModelData x998_; CModelData x9e4_; CSegId xa30_breastPlateSegId; - bool xa31_24_ : 1; - bool xa31_25_ : 1; - bool xa31_26_ : 1; - bool xa31_27_ : 1; - bool xa31_28_ : 1; - bool xa31_29_ : 1; - bool xa31_30_ : 1; - bool xa31_31_ : 1; - bool xa32_24_ : 1; - bool xa32_25_ : 1; - bool xa32_26_ : 1; - bool xa32_27_ : 1; - bool xa32_28_shotAt : 1; - bool xa32_29_ : 1; - bool xa32_30_ : 1; - bool xa32_31_ : 1; - bool xa33_24_ : 1; - bool xa33_25_ : 1; - bool xa33_26_ : 1; - bool xa33_27_ : 1; - bool xa33_28_ : 1; - bool xa33_29_doStrafe : 1; - bool xa33_30_ : 1; - bool xa33_31_ : 1; - bool xa34_24_ : 1; - bool xa34_25_ : 1; - bool xa34_26_ : 1; + bool xa31_24_ : 1 = true; + bool xa31_25_ : 1 = true; + bool xa31_26_ : 1 = false; + bool xa31_27_ : 1 = false; + bool xa31_28_ : 1 = false; + bool xa31_29_ : 1 = false; + bool xa31_30_ : 1 = false; + bool xa31_31_ : 1 = false; + bool xa32_24_ : 1 = false; + bool xa32_25_ : 1 = false; + bool xa32_26_ : 1 = false; + bool xa32_27_ : 1 = false; + bool xa32_28_shotAt : 1 = false; + bool xa32_29_ : 1 = false; + bool xa32_30_ : 1 = false; + bool xa32_31_ : 1 = true; + bool xa33_24_ : 1 = false; + bool xa33_25_ : 1 = true; + bool xa33_26_ : 1 = false; + bool xa33_27_ : 1 = true; + bool xa33_28_ : 1 = false; + bool xa33_29_doStrafe : 1 = false; + bool xa33_30_ : 1 = false; + bool xa33_31_ : 1 = false; + bool xa34_24_ : 1 = false; + bool xa34_25_ : 1 = false; + bool xa34_26_ : 1 = false; CModelData xa38_; zeus::CTransform xa84_; float xab4_ = 20.f; diff --git a/Runtime/MP1/World/CRipper.cpp b/Runtime/MP1/World/CRipper.cpp index 45344ca70..9e67b1016 100644 --- a/Runtime/MP1/World/CRipper.cpp +++ b/Runtime/MP1/World/CRipper.cpp @@ -15,8 +15,7 @@ CRipper::CRipper(TUniqueId uid, std::string_view name, EFlavorType type, const C const CActorParameters& actParms, const CGrappleParameters& grappleParms) : CPatterned(ECharacter::Ripper, uid, name, type, info, xf, std::move(mData), pInfo, EMovementType::Flyer, EColliderType::One, EBodyType::Flyer, actParms, EKnockBackVariant::Medium) -, x568_grappleParams(grappleParms) -, x59c_24_muted(false) { +, x568_grappleParams(grappleParms) { SetMaterialFilter(CMaterialFilter::MakeIncludeExclude( {EMaterialTypes::Solid}, {EMaterialTypes::NoStaticCollision, EMaterialTypes::NoPlatformCollision, EMaterialTypes::Platform})); diff --git a/Runtime/MP1/World/CRipper.hpp b/Runtime/MP1/World/CRipper.hpp index ccd721f67..0c4121584 100644 --- a/Runtime/MP1/World/CRipper.hpp +++ b/Runtime/MP1/World/CRipper.hpp @@ -10,7 +10,7 @@ class CRipper : public CPatterned { CGrappleParameters x568_grappleParams; TUniqueId x598_grapplePoint = kInvalidUniqueId; TUniqueId x59a_platformId = kInvalidUniqueId; - bool x59c_24_muted : 1; + bool x59c_24_muted : 1 = false; void ProcessGrapplePoint(CStateManager&); void AddGrapplePoint(CStateManager&); diff --git a/Runtime/MP1/World/CSeedling.cpp b/Runtime/MP1/World/CSeedling.cpp index a8a98e5d9..8b7fabc16 100644 --- a/Runtime/MP1/World/CSeedling.cpp +++ b/Runtime/MP1/World/CSeedling.cpp @@ -42,9 +42,7 @@ CSeedling::CSeedling(TUniqueId uid, std::string_view name, const CEntityInfo& in , x5d8_searchPath(nullptr, 1, pInfo.GetPathfindingIndex(), 1.f, 1.f) , x6bc_spikeData(std::make_unique(CStaticRes(needleId, GetModelData()->GetScale()))) , x6c0_projectileInfo(weaponId, dInfo1) -, x6e8_deathDamage(dInfo2) -, x722_24_renderOnlyClusterA(true) -, x722_25_curNeedleCluster(false) { +, x6e8_deathDamage(dInfo2) { x6c0_projectileInfo.Token().Lock(); CreateShadow(false); MakeThermalColdAndHot(); diff --git a/Runtime/MP1/World/CSeedling.hpp b/Runtime/MP1/World/CSeedling.hpp index fa07befbe..d2b93baa7 100644 --- a/Runtime/MP1/World/CSeedling.hpp +++ b/Runtime/MP1/World/CSeedling.hpp @@ -18,8 +18,8 @@ class CSeedling : public CWallWalker { zeus::CAABox x704_modelBounds = zeus::skNullBox; float x71c_attackCoolOff = 0.f; TUniqueId x720_prevObj = kInvalidUniqueId; - bool x722_24_renderOnlyClusterA : 1; - bool x722_25_curNeedleCluster : 1; + bool x722_24_renderOnlyClusterA : 1 = true; + bool x722_25_curNeedleCluster : 1 = false; void LaunchNeedles(CStateManager&); public: diff --git a/Runtime/MP1/World/CSpacePirate.cpp b/Runtime/MP1/World/CSpacePirate.cpp index 5fe62cdf7..4af6dfb6b 100644 --- a/Runtime/MP1/World/CSpacePirate.cpp +++ b/Runtime/MP1/World/CSpacePirate.cpp @@ -181,7 +181,6 @@ CSpacePirate::CSpacePirateData::CSpacePirateData(urde::CInputStream& in, u32 pro CPirateRagDoll::CPirateRagDoll(CStateManager& mgr, CSpacePirate* sp, u16 thudSfx, u32 flags) : CRagDoll(-sp->GetGravityConstant(), -3.f, 8.f, flags), x6c_spacePirate(sp), x70_thudSfx(thudSfx) { - xb0_24_initSfx = true; x6c_spacePirate->RemoveMaterial(EMaterialTypes::Solid, EMaterialTypes::AIBlock, EMaterialTypes::GroundCollider, mgr); x6c_spacePirate->HealthInfo(mgr)->SetHP(-1.f); SetNumParticles(14); @@ -408,38 +407,6 @@ CSpacePirate::CSpacePirate(TUniqueId uid, std::string_view name, const CEntityIn x635_30_floatingCorpse = bool(x568_pirateData.x18_flags & 0x10000); x635_31_ragdollNoAiCollision = bool(x568_pirateData.x18_flags & 0x20000); x636_24_trooper = bool(x568_pirateData.x18_flags & 0x40000); - x636_25_hearNoise = false; - x636_26_enableMeleeAttack = false; - x636_27_ = false; - x636_28_ = false; - x636_29_enableRetreat = false; - x636_30_shuffleClose = false; - x636_31_inAttackState = false; - x637_24_enablePatrol = false; - x637_25_enableAim = false; - x637_26_hearPlayerFire = false; - x637_27_inProjectilePath = false; - x637_28_noPlayerLos = false; - x637_29_inWallHang = false; - x637_30_jumpVelSet = false; - x637_31_prevInCineCam = false; - x638_24_pendingFrenzyChance = false; - x638_25_appliedBladeDamage = false; - x638_26_alwaysAggressive = false; - x638_27_coverCheck = false; - x638_28_enableDodge = false; - x638_29_noPlayerDodge = false; - x638_30_ragdollOver = false; - x638_31_mayStartAttack = false; - x639_24_ = false; - x639_25_useJumpBackJump = false; - x639_26_started = false; - x639_27_inRange = false; - x639_28_satUp = false; - x639_29_enableBreakDodge = false; - x639_30_closeMelee = false; - x639_31_sentAttackMsg = false; - x63a_24_normalDodge = false; x758_headSeg = x64_modelData->GetAnimationData()->GetLocatorSegId("Head_1"sv); x7b6_gunSeg = x64_modelData->GetAnimationData()->GetLocatorSegId("R_gun_LCTR"sv); diff --git a/Runtime/MP1/World/CSpacePirate.hpp b/Runtime/MP1/World/CSpacePirate.hpp index 89e61b92d..137f92eeb 100644 --- a/Runtime/MP1/World/CSpacePirate.hpp +++ b/Runtime/MP1/World/CSpacePirate.hpp @@ -25,7 +25,7 @@ class CPirateRagDoll : public CRagDoll { zeus::CVector3f x84_torsoImpulse; rstl::reserved_vector x90_waypoints; rstl::reserved_vector x9c_wpParticleIdxs; - bool xb0_24_initSfx : 1; + bool xb0_24_initSfx : 1 = true; public: CPirateRagDoll(CStateManager& mgr, CSpacePirate* sp, u16 thudSfx, u32 flags); @@ -115,38 +115,38 @@ private: bool x635_30_floatingCorpse : 1; bool x635_31_ragdollNoAiCollision : 1; bool x636_24_trooper : 1; - bool x636_25_hearNoise : 1; - bool x636_26_enableMeleeAttack : 1; - bool x636_27_ : 1; - bool x636_28_ : 1; - bool x636_29_enableRetreat : 1; - bool x636_30_shuffleClose : 1; - bool x636_31_inAttackState : 1; - bool x637_24_enablePatrol : 1; - bool x637_25_enableAim : 1; - bool x637_26_hearPlayerFire : 1; - bool x637_27_inProjectilePath : 1; - bool x637_28_noPlayerLos : 1; - bool x637_29_inWallHang : 1; - bool x637_30_jumpVelSet : 1; - bool x637_31_prevInCineCam : 1; - bool x638_24_pendingFrenzyChance : 1; - bool x638_25_appliedBladeDamage : 1; - bool x638_26_alwaysAggressive : 1; - bool x638_27_coverCheck : 1; - bool x638_28_enableDodge : 1; - bool x638_29_noPlayerDodge : 1; - bool x638_30_ragdollOver : 1; - bool x638_31_mayStartAttack : 1; - bool x639_24_ : 1; - bool x639_25_useJumpBackJump : 1; - bool x639_26_started : 1; - bool x639_27_inRange : 1; - bool x639_28_satUp : 1; - bool x639_29_enableBreakDodge : 1; - bool x639_30_closeMelee : 1; - bool x639_31_sentAttackMsg : 1; - bool x63a_24_normalDodge : 1; + bool x636_25_hearNoise : 1 = false; + bool x636_26_enableMeleeAttack : 1 = false; + bool x636_27_ : 1 = false; + bool x636_28_ : 1 = false; + bool x636_29_enableRetreat : 1 = false; + bool x636_30_shuffleClose : 1 = false; + bool x636_31_inAttackState : 1 = false; + bool x637_24_enablePatrol : 1 = false; + bool x637_25_enableAim : 1 = false; + bool x637_26_hearPlayerFire : 1 = false; + bool x637_27_inProjectilePath : 1 = false; + bool x637_28_noPlayerLos : 1 = false; + bool x637_29_inWallHang : 1 = false; + bool x637_30_jumpVelSet : 1 = false; + bool x637_31_prevInCineCam : 1 = false; + bool x638_24_pendingFrenzyChance : 1 = false; + bool x638_25_appliedBladeDamage : 1 = false; + bool x638_26_alwaysAggressive : 1 = false; + bool x638_27_coverCheck : 1 = false; + bool x638_28_enableDodge : 1 = false; + bool x638_29_noPlayerDodge : 1 = false; + bool x638_30_ragdollOver : 1 = false; + bool x638_31_mayStartAttack : 1 = false; + bool x639_24_ : 1 = false; + bool x639_25_useJumpBackJump : 1 = false; + bool x639_26_started : 1 = false; + bool x639_27_inRange : 1 = false; + bool x639_28_satUp : 1 = false; + bool x639_29_enableBreakDodge : 1 = false; + bool x639_30_closeMelee : 1 = false; + bool x639_31_sentAttackMsg : 1 = false; + bool x63a_24_normalDodge : 1 = false; s32 x63c_frenzyFrames = 0; TUniqueId x640_coverPoint = kInvalidUniqueId; diff --git a/Runtime/MP1/World/CThardus.hpp b/Runtime/MP1/World/CThardus.hpp index 85a16cb14..bbb079843 100644 --- a/Runtime/MP1/World/CThardus.hpp +++ b/Runtime/MP1/World/CThardus.hpp @@ -14,10 +14,10 @@ class CThardus : public CPatterned { class CThardusSomething { TUniqueId x0_ = kInvalidUniqueId; zeus::CVector3f x4_; - bool x10_24_ : 1; + bool x10_24_ : 1 = false; public: - CThardusSomething() : x10_24_(false) {} + CThardusSomething() = default; }; u32 x568_; TUniqueId x56c_ = kInvalidUniqueId; diff --git a/Runtime/MP1/World/CTryclops.cpp b/Runtime/MP1/World/CTryclops.cpp index da9539c6b..b67af543f 100644 --- a/Runtime/MP1/World/CTryclops.cpp +++ b/Runtime/MP1/World/CTryclops.cpp @@ -27,11 +27,7 @@ CTryclops::CTryclops(urde::TUniqueId uid, std::string_view name, const CEntityIn , x67c_(f1) , x680_(std::cos(zeus::degToRad(0.5f * f2))) , x684_(f3) -, x688_launchSpeed(f4) -, x698_24_(false) -, x698_25_(false) -, x698_26_(false) -, x698_27_dizzy(false) { +, x688_launchSpeed(f4) { CreateShadow(false); MakeThermalColdAndHot(); x460_knockBackController.SetAutoResetImpulse(false); diff --git a/Runtime/MP1/World/CTryclops.hpp b/Runtime/MP1/World/CTryclops.hpp index b164e4753..4a3ef6150 100644 --- a/Runtime/MP1/World/CTryclops.hpp +++ b/Runtime/MP1/World/CTryclops.hpp @@ -19,10 +19,10 @@ class CTryclops : public CPatterned { u32 x690_ = 0; TUniqueId x694_bombId = kInvalidUniqueId; TUniqueId x696_ = kInvalidUniqueId; - bool x698_24_ : 1; - bool x698_25_ : 1; - bool x698_26_ : 1; - bool x698_27_dizzy : 1; + bool x698_24_ : 1 = false; + bool x698_25_ : 1 = false; + bool x698_26_ : 1 = false; + bool x698_27_dizzy : 1 = false; bool sub8025dbd0(CStateManager&) { return false; } void LaunchPlayer(CStateManager& mgr, const zeus::CTransform& xf, float); void DragBomb(CStateManager& mgr, const zeus::CTransform& xf); diff --git a/Runtime/MP1/World/CWarWasp.cpp b/Runtime/MP1/World/CWarWasp.cpp index eaddc3e1e..c84d9bf53 100644 --- a/Runtime/MP1/World/CWarWasp.cpp +++ b/Runtime/MP1/World/CWarWasp.cpp @@ -27,14 +27,7 @@ CWarWasp::CWarWasp(TUniqueId uid, std::string_view name, const CEntityInfo& info , x684_(dInfo1) , x6d4_projectileInfo(projectileWeapon, projectileDamage) , x72c_projectileVisorSfx(CSfxManager::TranslateSFXID(projecileVisorSfx)) -, x72e_24_jumpBackRepeat(true) -, x72e_25_canApplyDamage(false) -, x72e_26_initiallyInactive(!pInfo.GetActive()) -, x72e_27_teamMatesMelee(false) -, x72e_28_inProjectileAttack(false) -, x72e_29_pathObstructed(false) -, x72e_30_isRetreating(false) -, x72e_31_heardNoise(false) { +, x72e_26_initiallyInactive(!pInfo.GetActive()) { x6d4_projectileInfo.Token().Lock(); UpdateTouchBounds(); SetCoefficientOfRestitutionModifier(0.1f); diff --git a/Runtime/MP1/World/CWarWasp.hpp b/Runtime/MP1/World/CWarWasp.hpp index b5b5f84d8..42721d3a8 100644 --- a/Runtime/MP1/World/CWarWasp.hpp +++ b/Runtime/MP1/World/CWarWasp.hpp @@ -33,14 +33,14 @@ class CWarWasp : public CPatterned { float x718_circleBurstOffTotemAngle = zeus::degToRad(90.f); TLockedToken x71c_projectileVisorParticle; // Used to be optional u16 x72c_projectileVisorSfx; - bool x72e_24_jumpBackRepeat : 1; - bool x72e_25_canApplyDamage : 1; + bool x72e_24_jumpBackRepeat : 1 = true; + bool x72e_25_canApplyDamage : 1 = false; bool x72e_26_initiallyInactive : 1; - bool x72e_27_teamMatesMelee : 1; - bool x72e_28_inProjectileAttack : 1; - bool x72e_29_pathObstructed : 1; - bool x72e_30_isRetreating : 1; - bool x72e_31_heardNoise : 1; + bool x72e_27_teamMatesMelee : 1 = false; + bool x72e_28_inProjectileAttack : 1 = false; + bool x72e_29_pathObstructed : 1 = false; + bool x72e_30_isRetreating : 1 = false; + bool x72e_31_heardNoise : 1 = false; void SwarmAdd(CStateManager& mgr); void SwarmRemove(CStateManager& mgr);