mirror of https://github.com/OpenRCT2/OpenRCT2.git
Merge branch 'master' of https://github.com/ZedThree/OpenRCT2 into ZedThree-master
This commit is contained in:
commit
cdd65dbcee
|
@ -165,7 +165,9 @@ static int news_item_get_new_history_slot()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Get the (x,y,z) coordinates of the subject of a news item.
|
||||||
|
* If the new item is no longer valid, return 0x8000 in the x-coordinate
|
||||||
|
*
|
||||||
* rct2: 0x0066BA74
|
* rct2: 0x0066BA74
|
||||||
*/
|
*/
|
||||||
void news_item_get_subject_location(int type, int subject, int *x, int *y, int *z)
|
void news_item_get_subject_location(int type, int subject, int *x, int *y, int *z)
|
||||||
|
|
|
@ -56,5 +56,5 @@ typedef struct {
|
||||||
void news_item_init_queue();
|
void news_item_init_queue();
|
||||||
void news_item_update_current();
|
void news_item_update_current();
|
||||||
void news_item_close_current();
|
void news_item_close_current();
|
||||||
|
void news_item_get_subject_location(int type, int subject, int *x, int *y, int *z);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -179,15 +179,16 @@ static void window_game_bottom_toolbar_mouseup()
|
||||||
break;
|
break;
|
||||||
|
|
||||||
{
|
{
|
||||||
uint32 eax, ebx, ecx, edx, esi, edi, ebp;
|
int x, y, z;
|
||||||
ecx = newsItem->assoc;
|
int subject = newsItem->assoc;
|
||||||
edx = newsItem->type;
|
|
||||||
RCT2_CALLFUNC_X(0x0066BA74, &eax, &ebx, &ecx, &edx, &esi, &edi, &ebp);
|
news_item_get_subject_location(newsItem->type, subject, &x, &y, &z);
|
||||||
if ((eax & 0xFFFF) == 0x8000)
|
|
||||||
|
if (x == 0x8000)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if ((mainWindow = window_get_main()) != NULL)
|
if ((mainWindow = window_get_main()) != NULL)
|
||||||
window_scroll_to_location(mainWindow, eax & 0xFFFF, ecx & 0xFFFF, edx & 0xFFFF);
|
window_scroll_to_location(mainWindow, x, y, z);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case WIDX_RIGHT_OUTSET:
|
case WIDX_RIGHT_OUTSET:
|
||||||
|
@ -278,12 +279,12 @@ static void window_game_bottom_toolbar_invalidate()
|
||||||
w->disabled_widgets &= ~(1 << WIDX_NEWS_SUBJECT);
|
w->disabled_widgets &= ~(1 << WIDX_NEWS_SUBJECT);
|
||||||
w->disabled_widgets &= ~(1 << WIDX_NEWS_LOCATE);
|
w->disabled_widgets &= ~(1 << WIDX_NEWS_LOCATE);
|
||||||
|
|
||||||
int eax, ebx, ecx, edx, esi, edi, ebp;
|
// Find out if the news item is no longer valid
|
||||||
ecx = newsItem->assoc;
|
int x, y, z;
|
||||||
edx = newsItem->type;
|
int subject = newsItem->assoc;
|
||||||
RCT2_CALLFUNC_X(0x0066BA74, &eax, &ebx, &ecx, &edx, &esi, &edi, &ebp);
|
news_item_get_subject_location(newsItem->type, subject, &x, &y, &z);
|
||||||
|
|
||||||
if ((eax & 0xFFFF) == 0x8000)
|
if (x == 0x8000)
|
||||||
w->disabled_widgets |= (1 << WIDX_NEWS_LOCATE);
|
w->disabled_widgets |= (1 << WIDX_NEWS_LOCATE);
|
||||||
|
|
||||||
if (!(((char*)0x0097BE7C)[newsItem->type] & 2)) {
|
if (!(((char*)0x0097BE7C)[newsItem->type] & 2)) {
|
||||||
|
|
Loading…
Reference in New Issue