mirror of https://github.com/OpenRCT2/OpenRCT2.git
Rename Vertical to GuestPurchase, this better reflects actual use
This commit is contained in:
parent
e8ec7b6c89
commit
436c881f95
|
@ -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);
|
||||
|
|
|
@ -37,7 +37,7 @@ template<> bool EntityBase::Is<MoneyEffect>() 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<StringId, money64> 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;
|
||||
|
|
|
@ -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<StringId, money64> GetStringId() const;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue