mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-31 02:35:46 +01:00
Merge pull request #4181 from marijnvdwerf/clean/data-1
Misc RCT data integration
This commit is contained in:
@@ -289,7 +289,7 @@ static void window_game_bottom_toolbar_invalidate(rct_window *w)
|
||||
if (x == SPRITE_LOCATION_NULL)
|
||||
w->disabled_widgets |= (1 << WIDX_NEWS_LOCATE);
|
||||
|
||||
if (!((RCT2_ADDRESS(0x0097BE7C, char))[newsItem->type] & 2)) {
|
||||
if (!(news_type_properties[newsItem->type] & NEWS_TYPE_HAS_SUBJECT)) {
|
||||
w->disabled_widgets |= (1 << WIDX_NEWS_SUBJECT);
|
||||
window_game_bottom_toolbar_widgets[WIDX_NEWS_SUBJECT].type = WWT_EMPTY;
|
||||
}
|
||||
|
||||
@@ -1602,7 +1602,7 @@ void window_guest_rides_update(rct_window *w)
|
||||
uint8 ride_id_offset = ride_id / 8;
|
||||
if (peep->rides_been_on[ride_id_offset] & (1 << ride_id_bit)){
|
||||
rct_ride* ride = get_ride(ride_id);
|
||||
if (RCT2_ADDRESS(0x97C3AF, uint8)[ride->type] == 0){
|
||||
if (gRideClassifications[ride->type] == RIDE_CLASS_RIDE){
|
||||
w->list_item_positions[curr_list_position] = ride_id;
|
||||
curr_list_position++;
|
||||
}
|
||||
|
||||
@@ -221,12 +221,12 @@ static void window_news_scrollmousedown(rct_window *w, int scrollIndex, int x, i
|
||||
buttonIndex = 0;
|
||||
break;
|
||||
} else if (x < 351) {
|
||||
if (RCT2_ADDRESS(0x0097BE7C, uint8)[newsItem->type] & 2) {
|
||||
if (news_type_properties[newsItem->type] & NEWS_TYPE_HAS_SUBJECT) {
|
||||
buttonIndex = 1;
|
||||
break;
|
||||
}
|
||||
} else if (x < 376) {
|
||||
if (RCT2_ADDRESS(0x0097BE7C, uint8)[newsItem->type] & 1) {
|
||||
if (news_type_properties[newsItem->type] & NEWS_TYPE_HAS_LOCATION) {
|
||||
buttonIndex = 2;
|
||||
break;
|
||||
}
|
||||
@@ -304,7 +304,7 @@ static void window_news_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int s
|
||||
gfx_draw_string_left_wrapped(dpi, &ch, 2, y + 10, 325, STR_STRING, 14);
|
||||
|
||||
// Subject button
|
||||
if ((RCT2_ADDRESS(0x0097BE7C, uint8)[newsItem->type] & 2) && !(newsItem->flags & 1)) {
|
||||
if ((news_type_properties[newsItem->type] & NEWS_TYPE_HAS_SUBJECT) && !(newsItem->flags & 1)) {
|
||||
x = 328;
|
||||
yy = y + 14;
|
||||
|
||||
@@ -368,7 +368,7 @@ static void window_news_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int s
|
||||
}
|
||||
|
||||
// Location button
|
||||
if ((RCT2_ADDRESS(0x0097BE7C, uint8)[newsItem->type] & 1) && !(newsItem->flags & 1)) {
|
||||
if ((news_type_properties[newsItem->type] & NEWS_TYPE_HAS_LOCATION) && !(newsItem->flags & 1)) {
|
||||
x = 352;
|
||||
yy = y + 14;
|
||||
|
||||
|
||||
@@ -649,7 +649,7 @@ static void window_ride_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi,
|
||||
break;
|
||||
case INFORMATION_TYPE_GUESTS_FAVOURITE:
|
||||
formatSecondary = 0;
|
||||
if (RCT2_ADDRESS(0x0097C3AF, uint8)[ride->type] == PAGE_RIDES) {
|
||||
if (gRideClassifications[ride->type] == RIDE_CLASS_RIDE) {
|
||||
set_format_arg(2, uint16, ride->guests_favourite);
|
||||
formatSecondary = ride->guests_favourite == 1 ? STR_GUESTS_FAVOURITE_LABEL : STR_GUESTS_FAVOURITE_PLURAL_LABEL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user