From 2a357a1006eca10d02b5857d2704b990c5ae79ad Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 11 Jun 2020 10:16:09 -0400 Subject: [PATCH] CDrone: Make use of in-class initializers for bitfields Eliminates some code. --- Runtime/MP1/World/CDrone.cpp | 14 +------------- Runtime/MP1/World/CDrone.hpp | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 25 deletions(-) diff --git a/Runtime/MP1/World/CDrone.cpp b/Runtime/MP1/World/CDrone.cpp index d3d15d908..b03edd33a 100644 --- a/Runtime/MP1/World/CDrone.cpp +++ b/Runtime/MP1/World/CDrone.cpp @@ -65,19 +65,7 @@ CDrone::CDrone(TUniqueId uid, std::string_view name, EFlavorType flavor, const C , x6b0_pathFind(nullptr, 3 + int(b1), pInfo.GetPathfindingIndex(), 1.f, 2.4f) , x7cc_(CSfxManager::TranslateSFXID(sId)) , x82c_shieldModel(std::make_unique(CStaticRes{aId2, zeus::skOne3f})) -, x832_a(0) -, x832_b(0) -, x834_24_(false) -, x834_25_(false) -, x834_26_(false) -, x834_27_(false) -, x834_28_(false) -, x834_29_codeTrigger(false) -, x834_30_visible(false) -, x834_31_(false) -, x835_24_(false) -, x835_25_(b1) -, x835_26_(false) { +, x835_25_(b1) { UpdateTouchBounds(pInfo.GetHalfExtent()); x460_knockBackController.SetEnableShock(true); x460_knockBackController.SetAvailableState(EKnockBackAnimationState::Hurled, false); diff --git a/Runtime/MP1/World/CDrone.hpp b/Runtime/MP1/World/CDrone.hpp index b6ce4d6d6..a11ebb082 100644 --- a/Runtime/MP1/World/CDrone.hpp +++ b/Runtime/MP1/World/CDrone.hpp @@ -80,19 +80,19 @@ class CDrone : public CPatterned { rstl::reserved_vector x818_ = {{0.f, 0.f}}; rstl::reserved_vector x824_ = {{false, false}}; std::unique_ptr x82c_shieldModel; - u8 x832_a : 3; - u8 x832_b : 3; - bool x834_24_ : 1; - bool x834_25_ : 1; - bool x834_26_ : 1; - bool x834_27_ : 1; - bool x834_28_ : 1; - bool x834_29_codeTrigger : 1; - bool x834_30_visible : 1; - bool x834_31_ : 1; - bool x835_24_ : 1; + u8 x832_a : 3 = 0; + u8 x832_b : 3 = 0; + bool x834_24_ : 1 = false; + bool x834_25_ : 1 = false; + bool x834_26_ : 1 = false; + bool x834_27_ : 1 = false; + bool x834_28_ : 1 = false; + bool x834_29_codeTrigger : 1 = false; + bool x834_30_visible : 1 = false; + bool x834_31_ : 1 = false; + bool x835_24_ : 1 = false; bool x835_25_ : 1; - bool x835_26_ : 1; + bool x835_26_ : 1 = false; void UpdateTouchBounds(float radius); bool HitShield(const zeus::CVector3f& dir) const;