From 436c881f95f3959f3cd4a2deab7cc1d1c3dc14f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=B6eh=20Matt?= <5415177+ZehMatt@users.noreply.github.com> Date: Wed, 22 Mar 2023 17:54:10 +0200 Subject: [PATCH] Rename Vertical to GuestPurchase, this better reflects actual use --- src/openrct2/GameStateSnapshots.cpp | 2 +- src/openrct2/entity/MoneyEffect.cpp | 12 ++++++------ src/openrct2/entity/MoneyEffect.h | 4 ++-- src/openrct2/park/ParkFile.cpp | 2 +- src/openrct2/rct1/S4Importer.cpp | 2 +- src/openrct2/rct2/S6Importer.cpp | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/openrct2/GameStateSnapshots.cpp b/src/openrct2/GameStateSnapshots.cpp index 3ef00cedc2..d3dd2dde29 100644 --- a/src/openrct2/GameStateSnapshots.cpp +++ b/src/openrct2/GameStateSnapshots.cpp @@ -468,7 +468,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots COMPARE_FIELD(MoneyEffect, frame); COMPARE_FIELD(MoneyEffect, MoveDelay); COMPARE_FIELD(MoneyEffect, NumMovements); - COMPARE_FIELD(MoneyEffect, Vertical); + COMPARE_FIELD(MoneyEffect, GuestPurchase); COMPARE_FIELD(MoneyEffect, Value); COMPARE_FIELD(MoneyEffect, OffsetX); COMPARE_FIELD(MoneyEffect, Wiggle); diff --git a/src/openrct2/entity/MoneyEffect.cpp b/src/openrct2/entity/MoneyEffect.cpp index 672ffa87d2..946f6367d2 100644 --- a/src/openrct2/entity/MoneyEffect.cpp +++ b/src/openrct2/entity/MoneyEffect.cpp @@ -37,7 +37,7 @@ template<> bool EntityBase::Is() const * * rct2: 0x0067351F */ -void MoneyEffect::CreateAt(money64 value, const CoordsXYZ& effectPos, bool vertical) +void MoneyEffect::CreateAt(money64 value, const CoordsXYZ& effectPos, bool guestPurchase) { if (value == 0.00_GBP) return; @@ -47,7 +47,7 @@ void MoneyEffect::CreateAt(money64 value, const CoordsXYZ& effectPos, bool verti return; moneyEffect->Value = value; - moneyEffect->Vertical = (vertical ? 1 : 0); + moneyEffect->GuestPurchase = (guestPurchase ? 1 : 0); moneyEffect->sprite_width = 64; moneyEffect->sprite_height_negative = 20; moneyEffect->sprite_height_positive = 30; @@ -123,7 +123,7 @@ void MoneyEffect::Update() int32_t newZ = z; MoveDelay = 0; - if (Vertical) + if (GuestPurchase) { newZ += 1; } @@ -143,8 +143,8 @@ void MoneyEffect::Update() std::pair MoneyEffect::GetStringId() const { - StringId spentStringId = Vertical ? STR_MONEY_EFFECT_SPEND_HIGHP : STR_MONEY_EFFECT_SPEND; - StringId receiveStringId = Vertical ? STR_MONEY_EFFECT_RECEIVE_HIGHP : STR_MONEY_EFFECT_RECEIVE; + StringId spentStringId = GuestPurchase ? STR_MONEY_EFFECT_SPEND_HIGHP : STR_MONEY_EFFECT_SPEND; + StringId receiveStringId = GuestPurchase ? STR_MONEY_EFFECT_RECEIVE_HIGHP : STR_MONEY_EFFECT_RECEIVE; StringId stringId = receiveStringId; money64 outValue = Value; if (Value < 0) @@ -162,7 +162,7 @@ void MoneyEffect::Serialise(DataSerialiser& stream) stream << frame; stream << MoveDelay; stream << NumMovements; - stream << Vertical; + stream << GuestPurchase; stream << Value; stream << OffsetX; stream << Wiggle; diff --git a/src/openrct2/entity/MoneyEffect.h b/src/openrct2/entity/MoneyEffect.h index 9e1f480ae9..4f743613ab 100644 --- a/src/openrct2/entity/MoneyEffect.h +++ b/src/openrct2/entity/MoneyEffect.h @@ -22,12 +22,12 @@ struct MoneyEffect : EntityBase uint16_t frame; uint16_t MoveDelay; uint8_t NumMovements; - uint8_t Vertical; + uint8_t GuestPurchase; money64 Value; int16_t OffsetX; uint16_t Wiggle; - static void CreateAt(money64 value, const CoordsXYZ& effectPos, bool vertical); + static void CreateAt(money64 value, const CoordsXYZ& effectPos, bool guestPurchase); static void Create(money64 value, const CoordsXYZ& loc); void Update(); std::pair GetStringId() const; diff --git a/src/openrct2/park/ParkFile.cpp b/src/openrct2/park/ParkFile.cpp index 53d6421f68..e0a5a3b9b8 100644 --- a/src/openrct2/park/ParkFile.cpp +++ b/src/openrct2/park/ParkFile.cpp @@ -2311,7 +2311,7 @@ namespace OpenRCT2 ReadWriteEntityCommon(cs, moneyEffect); cs.ReadWrite(moneyEffect.MoveDelay); cs.ReadWrite(moneyEffect.NumMovements); - cs.ReadWrite(moneyEffect.Vertical); + cs.ReadWrite(moneyEffect.GuestPurchase); cs.ReadWrite(moneyEffect.Value); cs.ReadWrite(moneyEffect.OffsetX); cs.ReadWrite(moneyEffect.Wiggle); diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index 65957055e9..efb443fba2 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -2966,7 +2966,7 @@ namespace RCT1 ImportEntityCommonProperties(dst, src); dst->MoveDelay = src->MoveDelay; dst->NumMovements = src->NumMovements; - dst->Vertical = src->Vertical; + dst->GuestPurchase = src->Vertical; dst->Value = src->Value; dst->OffsetX = src->OffsetX; dst->Wiggle = src->Wiggle; diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index 9ee12d3c7c..aad22cf0c1 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -2197,7 +2197,7 @@ namespace RCT2 ImportEntityCommonProperties(dst, src); dst->MoveDelay = src->MoveDelay; dst->NumMovements = src->NumMovements; - dst->Vertical = src->Vertical; + dst->GuestPurchase = src->Vertical; dst->Value = src->Value; dst->OffsetX = src->OffsetX; dst->Wiggle = src->Wiggle;