mirror of https://github.com/OpenRCT2/OpenRCT2.git
use helper functions instead of direct access to 0x00982164
This commit is contained in:
parent
caf8b45dc3
commit
bd040918a1
|
@ -5798,9 +5798,7 @@ static void window_ride_income_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
||||||
profit = ride->price;
|
profit = ride->price;
|
||||||
|
|
||||||
stringId = STR_PROFIT_PER_ITEM_SOLD;
|
stringId = STR_PROFIT_PER_ITEM_SOLD;
|
||||||
profit -= primaryItem < 32 ?
|
profit -= get_shop_item_cost(primaryItem);
|
||||||
RCT2_GLOBAL(0x00982164 + (primaryItem * 8), uint16) :
|
|
||||||
RCT2_GLOBAL(0x00982144 + (primaryItem * 8), uint16);
|
|
||||||
if (profit < 0) {
|
if (profit < 0) {
|
||||||
profit *= -1;
|
profit *= -1;
|
||||||
stringId = STR_LOSS_PER_ITEM_SOLD;
|
stringId = STR_LOSS_PER_ITEM_SOLD;
|
||||||
|
@ -5819,9 +5817,7 @@ static void window_ride_income_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
||||||
profit = ride->price_secondary;
|
profit = ride->price_secondary;
|
||||||
|
|
||||||
stringId = STR_PROFIT_PER_ITEM_SOLD;
|
stringId = STR_PROFIT_PER_ITEM_SOLD;
|
||||||
profit -= secondaryItem < 32 ?
|
profit -= get_shop_item_cost(secondaryItem);
|
||||||
RCT2_GLOBAL(0x00982164 + (secondaryItem * 8), uint16) :
|
|
||||||
RCT2_GLOBAL(0x00982144 + (secondaryItem * 8), uint16);
|
|
||||||
if (profit < 0) {
|
if (profit < 0) {
|
||||||
profit *= -1;
|
profit *= -1;
|
||||||
stringId = STR_LOSS_PER_ITEM_SOLD;
|
stringId = STR_LOSS_PER_ITEM_SOLD;
|
||||||
|
|
Loading…
Reference in New Issue