mirror of https://github.com/OpenRCT2/OpenRCT2.git
commit
6f4854222e
|
@ -51,9 +51,9 @@ void gfx_fill_rect(rct_drawpixelinfo *dpi, int left, int top, int right, int bot
|
|||
uint16 cross_pattern = 0;
|
||||
|
||||
int start_x = left - dpi->x;
|
||||
if (start_x < 0){
|
||||
start_x = 0;
|
||||
if (start_x < 0){
|
||||
cross_pattern ^= start_x;
|
||||
start_x = 0;
|
||||
}
|
||||
|
||||
int end_x = right - dpi->x;
|
||||
|
@ -64,9 +64,9 @@ void gfx_fill_rect(rct_drawpixelinfo *dpi, int left, int top, int right, int bot
|
|||
int width = end_x - start_x;
|
||||
|
||||
int start_y = top - dpi->y;
|
||||
if (start_y < 0){
|
||||
start_y = 0;
|
||||
if (start_y < 0){
|
||||
cross_pattern ^= start_y;
|
||||
start_y = 0;
|
||||
}
|
||||
int end_y = bottom - dpi->y;
|
||||
end_y++;
|
||||
|
|
|
@ -793,6 +793,8 @@ static void widget_scroll_draw(rct_drawpixelinfo *dpi, rct_window *w, int widget
|
|||
r--;
|
||||
b--;
|
||||
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_FONT_SPRITE_BASE, sint16) = 0xE0;
|
||||
|
||||
// Horizontal scrollbar
|
||||
if (scroll->flags & HSCROLLBAR_VISIBLE)
|
||||
widget_hscrollbar_draw(dpi, scroll, l, b - 10, (scroll->flags & VSCROLLBAR_VISIBLE ? r - 10 : r), b, colour);
|
||||
|
@ -882,7 +884,7 @@ static void widget_vscrollbar_draw(rct_drawpixelinfo *dpi, rct_scroll *scroll, i
|
|||
|
||||
// Down button
|
||||
gfx_fill_rect_inset(dpi, l, b - 9, r, b, colour, (scroll->flags & VSCROLLBAR_DOWN_PRESSED ? 0x20 : 0));
|
||||
gfx_draw_string(dpi, (char*)0x009DED69, 0, l + 1, b - 8);
|
||||
gfx_draw_string(dpi, (char*)0x009DED69, 0, l + 1, b - 9);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -46,7 +46,7 @@ void research_reset_items()
|
|||
{
|
||||
gResearchItems[0].entryIndex = RESEARCHED_ITEMS_SEPERATOR;
|
||||
gResearchItems[1].entryIndex = RESEARCHED_ITEMS_END;
|
||||
gResearchItems[2].entryIndex = -3;
|
||||
gResearchItems[2].entryIndex = RESEARCHED_ITEMS_END_2;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -276,10 +276,10 @@ void research_update()
|
|||
*/
|
||||
void sub_684AC3(){
|
||||
rct_research_item* research = gResearchItems;
|
||||
for (; research->entryIndex != -2; research++);
|
||||
for (; research->entryIndex != RESEARCHED_ITEMS_END; research++);
|
||||
|
||||
research++;
|
||||
for (; research->entryIndex != -3; research += 2){
|
||||
for (; research->entryIndex != RESEARCHED_ITEMS_END_2; research += 2){
|
||||
if (scenario_rand() & 1) continue;
|
||||
|
||||
rct_research_item* edx;
|
||||
|
@ -321,7 +321,7 @@ void sub_684AC3(){
|
|||
}
|
||||
|
||||
|
||||
for (research = gResearchItems; research->entryIndex != -1; research++){
|
||||
for (research = gResearchItems; research->entryIndex != RESEARCHED_ITEMS_SEPERATOR; research++){
|
||||
research_finish_item(research->entryIndex);
|
||||
}
|
||||
|
||||
|
|
|
@ -771,7 +771,6 @@ static void window_cheats_paint()
|
|||
gfx_draw_string(dpi, (char*)language_get_string(STR_CHEAT_TIP_LARGE_TRAM_GUESTS), 0, w->x + XPL(0) + TXTO, w->y + YPL(2) + TXTO);
|
||||
gfx_draw_string(dpi, (char*)language_get_string(STR_CHEAT_TIP_NAUSEA), 0, w->x + XPL(0) + TXTO, w->y + YPL(4) + TXTO);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static void window_cheats_draw_tab_images(rct_drawpixelinfo *dpi, rct_window *w)
|
||||
|
@ -816,6 +815,8 @@ static void window_cheats_set_page(rct_window *w, int page)
|
|||
|
||||
w->enabled_widgets = window_cheats_page_enabled_widgets[page];
|
||||
|
||||
w->pressed_widgets = 0;
|
||||
|
||||
w->event_handlers = window_cheats_page_events[page];
|
||||
w->widgets = window_cheats_page_widgets[page];
|
||||
|
||||
|
|
|
@ -170,14 +170,7 @@ static int research_item_is_always_researched(rct_research_item *researchItem)
|
|||
*/
|
||||
static void sub_685901()
|
||||
{
|
||||
for (rct_research_item* research = gResearchItems;
|
||||
research->entryIndex != -3;
|
||||
research++){
|
||||
|
||||
if (research->entryIndex < -3){
|
||||
research->entryIndex &= 0x00FFFFFF;
|
||||
}
|
||||
}
|
||||
RCT2_CALLPROC_EBPSAFE(0x00685901);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -185,8 +178,15 @@ static void sub_685901()
|
|||
* rct2: 0x00685A79
|
||||
*/
|
||||
static void sub_685A79()
|
||||
{
|
||||
RCT2_CALLPROC_EBPSAFE(0x00685A79);
|
||||
{
|
||||
for (rct_research_item* research = gResearchItems;
|
||||
research->entryIndex != RESEARCHED_ITEMS_END_2;
|
||||
research++){
|
||||
|
||||
if (research->entryIndex < RESEARCHED_ITEMS_END_2){
|
||||
research->entryIndex &= 0x00FFFFFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -551,7 +551,7 @@ static void window_editor_inventions_list_scrollmousedown()
|
|||
if (researchItem == NULL)
|
||||
return;
|
||||
|
||||
if (researchItem->entryIndex < (uint32)-3 && research_item_is_always_researched(researchItem))
|
||||
if (researchItem->entryIndex < (uint32)RESEARCHED_ITEMS_END_2 && research_item_is_always_researched(researchItem))
|
||||
return;
|
||||
|
||||
window_invalidate(w);
|
||||
|
@ -613,7 +613,7 @@ static void window_editor_inventions_list_cursor()
|
|||
if (researchItem == NULL)
|
||||
return;
|
||||
|
||||
if (researchItem->entryIndex < (uint32)-3 && research_item_is_always_researched(researchItem)) {
|
||||
if (researchItem->entryIndex < (uint32)RESEARCHED_ITEMS_END_2 && research_item_is_always_researched(researchItem)) {
|
||||
cursorId = -1;
|
||||
window_cursor_set_registers(cursorId);
|
||||
return;
|
||||
|
@ -699,12 +699,12 @@ static void window_editor_inventions_list_paint()
|
|||
if (eax >= 0x10000)
|
||||
objectEntryType = 0;
|
||||
|
||||
void **entries = RCT2_GLOBAL(0x0098D97C + (objectEntryType * 8), void*);
|
||||
void *entry = entries[researchItem->entryIndex & 0xFF];
|
||||
if (entry == NULL || entry == (void*)0xFFFFFFFF)
|
||||
void *chunk = object_entry_groups[objectEntryType].chunks[researchItem->entryIndex & 0xFF];
|
||||
|
||||
if (chunk == NULL || chunk == (void*)0xFFFFFFFF)
|
||||
return;
|
||||
|
||||
object_paint(objectEntryType, 3, objectEntryType, x, y, 0, (int)dpi, (int)entry);
|
||||
object_paint(objectEntryType, 3, objectEntryType, x, y, 0, (int)dpi, (int)chunk);
|
||||
|
||||
// Item name
|
||||
x = w->x + ((widget->left + widget->right) / 2) + 1;
|
||||
|
|
|
@ -642,6 +642,7 @@ static void window_map_paint()
|
|||
|
||||
// FEATURE larger land tool size support
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_INPUT_FLAGS, uint32) & INPUT_FLAG_TOOL_ACTIVE &&
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_TOOL_WIDGETINDEX, uint8) == WIDX_SET_LAND_RIGHTS &&
|
||||
(RCT2_GLOBAL(RCT2_ADDRESS_LAND_TOOL_SIZE, sint16) > 7) &&
|
||||
(RCT2_GLOBAL(RCT2_ADDRESS_TOOL_WINDOWCLASS, uint8) == WC_MAP)) {
|
||||
RCT2_GLOBAL(0x009BC677, char) = FORMAT_BLACK;
|
||||
|
|
Loading…
Reference in New Issue