mirror of https://github.com/OpenRCT2/OpenRCT2.git
66E407: news_item_peep_removed
This commit is contained in:
parent
eafbe8ede2
commit
f3f2e6c18b
|
@ -344,3 +344,27 @@ void news_item_open_subject(int type, int subject)
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* rct2: 0x0066E407
|
||||
*/
|
||||
void news_item_peep_removed(uint8 type, uint32 sprite_index) {
|
||||
rct_news_item* newsItem = RCT2_ADDRESS(RCT2_ADDRESS_NEWS_ITEM_LIST, rct_news_item);
|
||||
while (newsItem->type != NEWS_ITEM_NULL) {
|
||||
if (type == newsItem->type && sprite_index == newsItem->assoc) {
|
||||
newsItem->flags |= 0x1;
|
||||
if (newsItem == RCT2_ADDRESS(RCT2_ADDRESS_NEWS_ITEM_LIST, rct_news_item)) {
|
||||
window_game_bottom_toolbar_invalidate_news_item();
|
||||
}
|
||||
}
|
||||
newsItem++;
|
||||
}
|
||||
|
||||
newsItem = RCT2_ADDRESS(0x013CB2D8, rct_news_item);
|
||||
while (newsItem->type != NEWS_ITEM_NULL) {
|
||||
if (type == newsItem->type && sprite_index == newsItem->assoc) {
|
||||
newsItem->flags |= 0x1;
|
||||
window_invalidate_by_class(WC_RECENT_NEWS);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -58,5 +58,6 @@ void news_item_close_current();
|
|||
void news_item_get_subject_location(int type, int subject, int *x, int *y, int *z);
|
||||
void news_item_add_to_queue(uint8 type, rct_string_id string_id, uint32 assoc);
|
||||
void news_item_open_subject(int type, int subject);
|
||||
void news_item_peep_removed(uint8 type, uint32 sprite_index);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -567,7 +567,7 @@ void peep_sprite_remove(rct_peep* peep){
|
|||
if (peep->type == PEEP_TYPE_GUEST){
|
||||
window_invalidate_by_class(WC_GUEST_LIST);
|
||||
|
||||
RCT2_CALLPROC_X(0x0066E407, 2, 0, peep->sprite_index, 0, 0, 0, 0);
|
||||
news_item_peep_removed(NEWS_ITEM_PEEP_ON_RIDE, peep->sprite_index);
|
||||
}
|
||||
else{
|
||||
window_invalidate_by_class(WC_STAFF_LIST);
|
||||
|
@ -577,7 +577,7 @@ void peep_sprite_remove(rct_peep* peep){
|
|||
sub_6C0C3F();
|
||||
peep->type = PEEP_TYPE_STAFF;
|
||||
|
||||
RCT2_CALLPROC_X(0x0066E407, 3, 0, peep->sprite_index, 0, 0, 0, 0);
|
||||
news_item_peep_removed(NEWS_ITEM_PEEP, peep->sprite_index);
|
||||
}
|
||||
sprite_remove((rct_sprite*)peep);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue