mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 11:03:00 +01:00
Fix double negative showing on money effects
This commit is contained in:
@@ -56,8 +56,9 @@ void misc_paint(rct_sprite *misc, sint32 imageDirection)
|
||||
}
|
||||
|
||||
rct_money_effect * moneyEffect = &misc->money_effect;
|
||||
rct_string_id stringId = money_effect_get_string_id(moneyEffect);
|
||||
paint_floating_money_effect(moneyEffect->value, stringId, moneyEffect->y, moneyEffect->z, (sint8 *) &money_wave[moneyEffect->wiggle % 22], moneyEffect->offset_x, get_current_rotation());
|
||||
money32 value;
|
||||
rct_string_id stringId = money_effect_get_string_id(moneyEffect, &value);
|
||||
paint_floating_money_effect(value, stringId, moneyEffect->y, moneyEffect->z, (sint8 *) &money_wave[moneyEffect->wiggle % 22], moneyEffect->offset_x, get_current_rotation());
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ void money_effect_create_at(money32 value, sint32 x, sint32 y, sint32 z, bool ve
|
||||
moneyEffect->move_delay = 0;
|
||||
|
||||
// Construct string to display
|
||||
rct_string_id stringId = money_effect_get_string_id(moneyEffect);
|
||||
rct_string_id stringId = money_effect_get_string_id(moneyEffect, &value);
|
||||
char buffer[128];
|
||||
format_string(buffer, 128, stringId, &value);
|
||||
|
||||
@@ -126,7 +126,7 @@ void money_effect_update(rct_money_effect *moneyEffect)
|
||||
sprite_remove((rct_sprite*)moneyEffect);
|
||||
}
|
||||
|
||||
rct_string_id money_effect_get_string_id(const rct_money_effect * sprite)
|
||||
rct_string_id money_effect_get_string_id(const rct_money_effect * sprite, money32 * outValue)
|
||||
{
|
||||
bool vertical = (sprite->vertical != 0);
|
||||
rct_string_id spentStringId = vertical ? STR_MONEY_EFFECT_SPEND_HIGHP : STR_MONEY_EFFECT_SPEND;
|
||||
@@ -137,5 +137,6 @@ rct_string_id money_effect_get_string_id(const rct_money_effect * sprite)
|
||||
value *= -1;
|
||||
stringId = spentStringId;
|
||||
}
|
||||
if (outValue != NULL) *outValue = value;
|
||||
return stringId;
|
||||
}
|
||||
|
||||
@@ -463,7 +463,7 @@ uint32 duck_get_frame_image(const rct_duck * duck, sint32 direction);
|
||||
void money_effect_create(money32 value);
|
||||
void money_effect_create_at(money32 value, sint32 x, sint32 y, sint32 z, bool vertical);
|
||||
void money_effect_update(rct_money_effect *moneyEffect);
|
||||
rct_string_id money_effect_get_string_id(const rct_money_effect * sprite);
|
||||
rct_string_id money_effect_get_string_id(const rct_money_effect * sprite, money32 * outValue);
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Crash particles
|
||||
|
||||
Reference in New Issue
Block a user