diff --git a/src/windows/banner.c b/src/windows/banner.c index 34bc104436..b33b94fcdb 100644 --- a/src/windows/banner.c +++ b/src/windows/banner.c @@ -118,7 +118,7 @@ void window_banner_open(rct_windownumber number) if (w != NULL) return; - w = window_create_auto_pos(WW, WH, (uint32*)window_banner_events, WC_BANNER, 0); + w = window_create_auto_pos(WW, WH, (uint32*)window_banner_events, WC_BANNER, WF_2); w->widgets = window_banner_widgets; w->enabled_widgets = (1 << WIDX_CLOSE) | @@ -170,7 +170,6 @@ void window_banner_open(rct_windownumber number) ); w->viewport->flags = (RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_FLAGS, uint8) & CONFIG_FLAG_ALWAYS_SHOW_GRIDLINES) ? VIEWPORT_FLAG_GRIDLINES : 0; - w->flags |= WF_2; window_invalidate(w); } diff --git a/src/windows/changelog.c b/src/windows/changelog.c index 051f65f0ca..bf4830f1b7 100644 --- a/src/windows/changelog.c +++ b/src/windows/changelog.c @@ -98,7 +98,7 @@ rct_window *window_changelog_open() screenHeight * 4 / 5, (uint32*)window_changelog_events, WC_CHANGELOG, - 0x100 + WF_RESIZABLE ); window->widgets = window_changelog_widgets; window->enabled_widgets = (1 << WIDX_CLOSE); @@ -107,7 +107,6 @@ rct_window *window_changelog_open() window->colours[0] = 7; window->colours[1] = 7; window->colours[2] = 7; - window->flags |= WF_RESIZABLE; window->min_width = MIN_WW; window->min_height = MIN_WH; window->max_width = MIN_WW; diff --git a/src/windows/demolish_ride_prompt.c b/src/windows/demolish_ride_prompt.c index 5bdf32447b..ba62515caf 100644 --- a/src/windows/demolish_ride_prompt.c +++ b/src/windows/demolish_ride_prompt.c @@ -95,11 +95,10 @@ void window_ride_demolish_prompt_open(int rideIndex){ if (w != NULL) return; - w = window_create_centred(WW, WH, (uint32*)window_ride_demolish_events, WC_DEMOLISH_RIDE_PROMPT, 0); + w = window_create_centred(WW, WH, (uint32*)window_ride_demolish_events, WC_DEMOLISH_RIDE_PROMPT, WF_TRANSPARENT); w->widgets = window_ride_demolish_widgets; w->enabled_widgets = (1 << WIDX_CLOSE) | (1 << WIDX_CANCEL) | (1 << WIDX_DEMOLISH); window_init_scroll_widgets(w); - w->flags |= WF_TRANSPARENT; w->number = rideIndex; } diff --git a/src/windows/guest.c b/src/windows/guest.c index 5c8cce1cac..ea4ecb9221 100644 --- a/src/windows/guest.c +++ b/src/windows/guest.c @@ -493,7 +493,7 @@ void window_guest_open(rct_peep* peep){ window = window_bring_to_front_by_number(WC_PEEP, peep->sprite_index); if (window == NULL){ - window = window_create_auto_pos(192, 157, (uint32*)window_guest_overview_events, WC_PEEP, 0); + window = window_create_auto_pos(192, 157, (uint32*)window_guest_overview_events, WC_PEEP, WF_RESIZABLE); window->widgets = window_guest_overview_widgets; window->enabled_widgets = window_guest_page_enabled_widgets[0]; window->number = peep->sprite_index; @@ -508,7 +508,6 @@ void window_guest_open(rct_peep* peep){ window->min_height = 157; window->max_width = 500; window->max_height = 450; - window->flags = WF_RESIZABLE; window->no_list_items = 0; window->selected_list_item = -1; diff --git a/src/windows/guest_list.c b/src/windows/guest_list.c index dc3466f961..47fff45313 100644 --- a/src/windows/guest_list.c +++ b/src/windows/guest_list.c @@ -148,7 +148,7 @@ void window_guest_list_open() if (window != NULL) return; - window = window_create_auto_pos(350, 330, (uint32*)window_guest_list_events, WC_GUEST_LIST, 0x0400); + window = window_create_auto_pos(350, 330, (uint32*)window_guest_list_events, WC_GUEST_LIST, WF_10 | WF_RESIZABLE); window->widgets = window_guest_list_widgets; window->enabled_widgets = (1 << WIDX_CLOSE) | @@ -174,7 +174,6 @@ void window_guest_list_open() window->min_height = 330; window->max_width = 500; window->max_height = 450; - window->flags |= WF_RESIZABLE; } /** diff --git a/src/windows/map.c b/src/windows/map.c index 1ccc928c80..4e8e2f9149 100644 --- a/src/windows/map.c +++ b/src/windows/map.c @@ -159,7 +159,7 @@ void window_map_open() return; RCT2_GLOBAL(RCT2_ADDRESS_MAP_IMAGE_DATA, uint32*) = map_image_data; - w = window_create_auto_pos(245, 259, (uint32*)window_map_events, WC_MAP, 0x0400); + w = window_create_auto_pos(245, 259, (uint32*)window_map_events, WC_MAP, WF_10); w->widgets = window_map_widgets; w->enabled_widgets = (1 << WIDX_CLOSE) | diff --git a/src/windows/music_credits.c b/src/windows/music_credits.c index 4a6f1c9da3..1c628bde81 100644 --- a/src/windows/music_credits.c +++ b/src/windows/music_credits.c @@ -94,7 +94,7 @@ void window_music_credits_open() (uint32*)window_music_credits_events, WC_MUSIC_CREDITS, 0 - ); + ); window->widgets = window_music_credits_widgets; window->enabled_widgets = 1 << WIDX_CLOSE; diff --git a/src/windows/new_ride.c b/src/windows/new_ride.c index 8eb74fba1e..99518a8d95 100644 --- a/src/windows/new_ride.c +++ b/src/windows/new_ride.c @@ -390,7 +390,7 @@ rct_window *window_new_ride_open() window_close_by_class(WC_TRACK_DESIGN_LIST); window_close_by_class(WC_TRACK_DESIGN_PLACE); - w = window_create_auto_pos(601, 370, (uint32*)window_new_ride_events, WC_CONSTRUCT_RIDE, 0x400); + w = window_create_auto_pos(601, 370, (uint32*)window_new_ride_events, WC_CONSTRUCT_RIDE, WF_10); w->widgets = window_new_ride_widgets; w->enabled_widgets = (1 << WIDX_CLOSE) | diff --git a/src/windows/options.c b/src/windows/options.c index 62eecae40b..5642fe426e 100644 --- a/src/windows/options.c +++ b/src/windows/options.c @@ -384,12 +384,11 @@ void window_options_open() if (w != NULL) return; - w = window_create_centred(WW, WH, (uint32*)window_options_events, WC_OPTIONS, 0); + w = window_create_centred(WW, WH, (uint32*)window_options_events, WC_OPTIONS, WF_RESIZABLE); w->widgets = window_options_display_widgets; w->enabled_widgets = window_options_page_enabled_widgets[WINDOW_OPTIONS_PAGE_DISPLAY]; w->page = WINDOW_OPTIONS_PAGE_DISPLAY; w->frame_no = 0; - w->flags = WF_RESIZABLE; window_init_scroll_widgets(w); //window_invalidate(w); diff --git a/src/windows/park.c b/src/windows/park.c index 68d83e65f3..1fe32e1dcb 100644 --- a/src/windows/park.c +++ b/src/windows/park.c @@ -550,7 +550,7 @@ rct_window *window_park_open() { rct_window* w; - w = window_create_auto_pos(230, 174 + 9, (uint32*)window_park_entrance_events, WC_PARK_INFORMATION, 0x0400); + w = window_create_auto_pos(230, 174 + 9, (uint32*)window_park_entrance_events, WC_PARK_INFORMATION, WF_10); w->widgets = window_park_entrance_widgets; w->enabled_widgets = window_park_page_enabled_widgets[WINDOW_PARK_PAGE_ENTRANCE]; w->number = 0; diff --git a/src/windows/publisher_credits.c b/src/windows/publisher_credits.c index a517c189a0..270a2d790c 100644 --- a/src/windows/publisher_credits.c +++ b/src/windows/publisher_credits.c @@ -94,7 +94,7 @@ void window_publisher_credits_open() (uint32*)window_publisher_credits_events, WC_PUBLISHER_CREDITS, 0 - ); + ); window->widgets = window_publisher_credits_widgets; window->enabled_widgets = 1 << WIDX_CLOSE; diff --git a/src/windows/ride.c b/src/windows/ride.c index 4123a2c280..58b72cd9ef 100644 --- a/src/windows/ride.c +++ b/src/windows/ride.c @@ -1166,7 +1166,7 @@ rct_window *window_ride_open(int rideIndex) uint8 *rideEntryIndexPtr; int numSubTypes, quadIndex, bitIndex; - w = window_create_auto_pos(316, 180, window_ride_page_events[0], WC_RIDE, 0x400); + w = window_create_auto_pos(316, 180, window_ride_page_events[0], WC_RIDE, WF_10 | WF_RESIZABLE); w->widgets = window_ride_page_widgets[0]; w->enabled_widgets = window_ride_page_enabled_widgets[0]; w->number = rideIndex; @@ -1182,7 +1182,6 @@ rct_window *window_ride_open(int rideIndex) w->min_height = 180; w->max_width = 500; w->max_height = 450; - w->flags |= WF_RESIZABLE; ride = GET_RIDE(rideIndex); numSubTypes = 0; diff --git a/src/windows/ride_list.c b/src/windows/ride_list.c index 41780614cb..c70fb45ac0 100644 --- a/src/windows/ride_list.c +++ b/src/windows/ride_list.c @@ -146,7 +146,7 @@ void window_ride_list_open() // Check if window is already open window = window_bring_to_front_by_class(WC_RIDE_LIST); if (window == NULL) { - window = window_create_auto_pos(340, 240, (uint32*)window_ride_list_events, WC_RIDE_LIST, 0x0400); + window = window_create_auto_pos(340, 240, (uint32*)window_ride_list_events, WC_RIDE_LIST, WF_10 | WF_RESIZABLE); window->widgets = window_ride_list_widgets; window->enabled_widgets = (1 << WIDX_CLOSE) | @@ -168,7 +168,6 @@ void window_ride_list_open() window->min_height = 240; window->max_width = 400; window->max_height = 450; - window->flags |= WF_RESIZABLE; } _window_ride_list_information_type = INFORMATION_TYPE_STATUS; window->list_information_type = 0; diff --git a/src/windows/scenery.c b/src/windows/scenery.c index 912a9d5a08..a546540d0a 100644 --- a/src/windows/scenery.c +++ b/src/windows/scenery.c @@ -422,8 +422,15 @@ void window_scenery_open() init_scenery(); - window = window_create(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_WIDTH, sint16) - WINDOW_SCENERY_WIDTH, 0x1D, WINDOW_SCENERY_WIDTH, WINDOW_SCENERY_HEIGHT, - (uint32*)window_scenery_events, WC_SCENERY, WF_2); + window = window_create( + RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_WIDTH, sint16) - WINDOW_SCENERY_WIDTH, + 0x1D, + WINDOW_SCENERY_WIDTH, + WINDOW_SCENERY_HEIGHT, + (uint32*)window_scenery_events, + WC_SCENERY, + WF_2 + ); window->widgets = window_scenery_widgets; window->enabled_widgets = diff --git a/src/windows/sign.c b/src/windows/sign.c index 7689997a3a..934638a368 100644 --- a/src/windows/sign.c +++ b/src/windows/sign.c @@ -153,7 +153,7 @@ void window_sign_open(rct_windownumber number) if (w != NULL) return; - w = window_create_auto_pos(WW, WH, (uint32*)window_sign_events, WC_BANNER, 0); + w = window_create_auto_pos(WW, WH, (uint32*)window_sign_events, WC_BANNER, WF_2); w->widgets = window_sign_widgets; w->enabled_widgets = (1 << WIDX_CLOSE) | @@ -211,7 +211,6 @@ void window_sign_open(rct_windownumber number) ); w->viewport->flags = (RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_FLAGS, uint8) & CONFIG_FLAG_ALWAYS_SHOW_GRIDLINES) ? VIEWPORT_FLAG_GRIDLINES : 0; - w->flags |= WF_2; window_invalidate(w); } diff --git a/src/windows/staff.c b/src/windows/staff.c index fea192a8b3..117d41d9ee 100644 --- a/src/windows/staff.c +++ b/src/windows/staff.c @@ -303,7 +303,7 @@ void window_staff_open(rct_peep* peep) { rct_window* w = window_bring_to_front_by_number(WC_PEEP, peep->sprite_index); if (w == NULL) { - w = window_create_auto_pos(WW, WH, (uint32*)window_staff_overview_events, WC_PEEP, (uint16)0x400); + w = window_create_auto_pos(WW, WH, (uint32*)window_staff_overview_events, WC_PEEP, WF_10 | WF_RESIZABLE); w->widgets = RCT2_GLOBAL(0x9AF81C, rct_widget*); w->enabled_widgets = RCT2_GLOBAL(0x9929B0, uint32); @@ -321,7 +321,6 @@ void window_staff_open(rct_peep* peep) w->max_width = 500; w->max_height = 450; - w->flags = 1 << 8; } w->page = 0; window_invalidate(w); diff --git a/src/windows/staff_fire_prompt.c b/src/windows/staff_fire_prompt.c index 50f1acafda..dcf4ae0c28 100644 --- a/src/windows/staff_fire_prompt.c +++ b/src/windows/staff_fire_prompt.c @@ -93,7 +93,7 @@ void window_staff_fire_prompt_open(rct_peep* peep){ return; } - rct_window* w = window_create_centred(WW, WH, (uint32*)0x992C3C, 0x1A, 0); + rct_window* w = window_create_centred(WW, WH, (uint32*)0x992C3C, 0x1A, WF_TRANSPARENT); w->widgets = window_staff_fire_widgets; w->enabled_widgets |= (1 << WIDX_CLOSE) | (1 << WIDX_YES) | (1 << WIDX_CANCEL); @@ -101,7 +101,6 @@ void window_staff_fire_prompt_open(rct_peep* peep){ colour_scheme_update(w); - w->flags |= WF_TRANSPARENT; w->number = peep->sprite_index; } diff --git a/src/windows/staff_list.c b/src/windows/staff_list.c index ece1cce011..18014ac40e 100644 --- a/src/windows/staff_list.c +++ b/src/windows/staff_list.c @@ -151,7 +151,7 @@ void window_staff_list_open() if (window != NULL) return; - window = window_create_auto_pos(320, 270, (uint32*)window_staff_list_events, WC_STAFF_LIST, 0x0400); + window = window_create_auto_pos(320, 270, (uint32*)window_staff_list_events, WC_STAFF_LIST, WF_10 | WF_RESIZABLE); window->widgets = window_staff_list_widgets; window->enabled_widgets = (1 << WIDX_STAFF_LIST_CLOSE) | @@ -174,7 +174,6 @@ void window_staff_list_open() window->min_height = 270; window->max_width = 500; window->max_height = 450; - window->flags |= WF_RESIZABLE; _quick_fire_mode = false; } diff --git a/src/windows/themes.c b/src/windows/themes.c index 8d9a1d8252..265da25fb9 100644 --- a/src/windows/themes.c +++ b/src/windows/themes.c @@ -368,7 +368,7 @@ void window_themes_open() if (window != NULL) return; - window = window_create_auto_pos(320, 107, (uint32*)window_themes_events, WC_THEMES, 0x0400); + window = window_create_auto_pos(320, 107, (uint32*)window_themes_events, WC_THEMES, WF_10 | WF_RESIZABLE); window->widgets = window_themes_widgets; window->enabled_widgets = (1 << WIDX_THEMES_CLOSE) | @@ -401,7 +401,6 @@ void window_themes_open() window->min_height = 107; window->max_width = 320; window->max_height = 107; - window->flags |= WF_RESIZABLE; } void window_themes_close() { diff --git a/src/windows/tile_inspector.c b/src/windows/tile_inspector.c index 7408fac2b8..539b3a2f9b 100644 --- a/src/windows/tile_inspector.c +++ b/src/windows/tile_inspector.c @@ -113,7 +113,7 @@ void window_tile_inspector_open() WH, (uint32*)window_tile_inspector_events, WC_TILE_INSPECTOR, - 0x100 + WF_RESIZABLE ); window->widgets = window_tile_inspector_widgets; window->enabled_widgets = (1 << WIDX_CLOSE); @@ -122,7 +122,6 @@ void window_tile_inspector_open() window->colours[0] = 7; window->colours[1] = 7; window->colours[2] = 7; - window->flags |= WF_RESIZABLE; window->min_width = WW; window->min_height = MIN_WH; window->max_width = WW; diff --git a/src/windows/title_exit.c b/src/windows/title_exit.c index 4c52d07349..37ea4942fd 100644 --- a/src/windows/title_exit.c +++ b/src/windows/title_exit.c @@ -81,12 +81,11 @@ void window_title_exit_open() 40, 64, (uint32*)window_title_exit_events, WC_TITLE_EXIT, - WF_STICK_TO_BACK + WF_STICK_TO_BACK | WF_TRANSPARENT ); window->widgets = window_title_exit_widgets; window->enabled_widgets |= 1; window_init_scroll_widgets(window); - window->flags |= 16; } /** diff --git a/src/windows/title_logo.c b/src/windows/title_logo.c index afa52c9ea1..dbb473c4bf 100644 --- a/src/windows/title_logo.c +++ b/src/windows/title_logo.c @@ -81,10 +81,17 @@ void window_title_logo_open() packs++; // Create the window - window = window_create(0, 0, 200, 106 + (10 * packs), (uint32*)window_title_logo_events, WC_TITLE_LOGO, WF_STICK_TO_BACK); + window = window_create( + 0, + 0, + 200, + 106 + (10 * packs), + (uint32*)window_title_logo_events, + WC_TITLE_LOGO, + WF_STICK_TO_BACK | WF_TRANSPARENT + ); window->widgets = (rct_widget*)0x009A9658; // mouse move bug in original game, keep this address and no crash happens window_init_scroll_widgets(window); - window->flags |= 16; window->colours[0] = 129; window->colours[1] = 129; window->colours[2] = 129; diff --git a/src/windows/title_menu.c b/src/windows/title_menu.c index cd5882bc99..fc65c97a2c 100644 --- a/src/windows/title_menu.c +++ b/src/windows/title_menu.c @@ -97,12 +97,11 @@ void window_title_menu_open() 328, 82, (uint32*)window_title_menu_events, WC_TITLE_MENU, - WF_STICK_TO_BACK + WF_STICK_TO_BACK | WF_TRANSPARENT ); window->widgets = window_title_menu_widgets; window->enabled_widgets |= (8 | 4 | 2 | 1); window_init_scroll_widgets(window); - window->flags |= 16; } static void window_title_menu_mouseup() diff --git a/src/windows/title_options.c b/src/windows/title_options.c index a5d9ef610c..39be909cbd 100644 --- a/src/windows/title_options.c +++ b/src/windows/title_options.c @@ -79,12 +79,11 @@ void window_title_options_open() 80, 12, (uint32*)window_title_options_events, WC_TITLE_OPTIONS, - WF_STICK_TO_BACK + WF_STICK_TO_BACK | WF_TRANSPARENT ); window->widgets = window_title_options_widgets; window->enabled_widgets |= 1; window_init_scroll_widgets(window); - window->flags |= 16; } static void window_title_options_mouseup() diff --git a/src/windows/tooltip.c b/src/windows/tooltip.c index 4bb1b3d3dc..8a6e8a11e2 100644 --- a/src/windows/tooltip.c +++ b/src/windows/tooltip.c @@ -146,7 +146,15 @@ void window_tooltip_open(rct_window *widgetWindow, int widgetIndex, int x, int y y -= height + 40; y = clamp(22, y, max_y); - w = window_create(x, y, width, height, (uint32*)window_tooltip_events, WC_TOOLTIP, WF_TRANSPARENT | WF_STICK_TO_FRONT); + w = window_create( + x, + y, + width, + height, + (uint32*)window_tooltip_events, + WC_TOOLTIP, + WF_TRANSPARENT | WF_STICK_TO_FRONT + ); w->widgets = window_tooltip_widgets; RCT2_GLOBAL(RCT2_ADDRESS_TOOLTIP_NOT_SHOWN_TICKS, uint16) = 0; diff --git a/src/windows/track_list.c b/src/windows/track_list.c index 5da75b2c36..416d6db0e1 100644 --- a/src/windows/track_list.c +++ b/src/windows/track_list.c @@ -125,7 +125,15 @@ void window_track_list_open(ride_list_item item) x = 0; y = 29; } - w = window_create(x, y, 600, 400, (uint32*)window_track_list_events, WC_TRACK_DESIGN_LIST, 0); + w = window_create( + x, + y, + 600, + 400, + (uint32*)window_track_list_events, + WC_TRACK_DESIGN_LIST, + 0 + ); w->widgets = window_track_list_widgets; w->enabled_widgets = (1 << WIDX_CLOSE) | (1 << WIDX_ROTATE) | (1 << WIDX_TOGGLE_SCENERY); window_init_scroll_widgets(w); diff --git a/src/windows/track_manage.c b/src/windows/track_manage.c index fe8055f14d..9f9bea901f 100644 --- a/src/windows/track_manage.c +++ b/src/windows/track_manage.c @@ -158,7 +158,7 @@ void window_track_manage_open() 44, (uint32*)window_track_manage_events, WC_MANAGE_TRACK_DESIGN, - WF_STICK_TO_FRONT + WF_STICK_TO_FRONT | WF_TRANSPARENT ); w->widgets = window_track_manage_widgets; w->enabled_widgets = @@ -166,7 +166,6 @@ void window_track_manage_open() (1 << WIDX_RENAME) | (1 << WIDX_DELETE); window_init_scroll_widgets(w); - w->flags |= WF_TRANSPARENT; trackDesignListWindow = window_find_by_class(WC_TRACK_DESIGN_LIST); if (trackDesignListWindow != NULL) diff --git a/src/windows/track_place.c b/src/windows/track_place.c index f4b71dd56f..7e8bcbf35f 100644 --- a/src/windows/track_place.c +++ b/src/windows/track_place.c @@ -376,7 +376,15 @@ void window_track_place_open() _window_track_place_mini_preview = malloc(TRACK_MINI_PREVIEW_SIZE); window_track_place_clear_mini_preview(); - w = window_create(0, 29, 200, 124, (uint32*)window_track_place_events, WC_TRACK_DESIGN_PLACE, 0); + w = window_create( + 0, + 29, + 200, + 124, + (uint32*)window_track_place_events, + WC_TRACK_DESIGN_PLACE, + 0 + ); w->widgets = window_track_place_widgets; w->enabled_widgets = 4 | 8 | 0x10 | 0x20; window_init_scroll_widgets(w); diff --git a/src/windows/water.c b/src/windows/water.c index 07bba3425e..ff74724149 100644 --- a/src/windows/water.c +++ b/src/windows/water.c @@ -100,7 +100,15 @@ void window_water_open() if (window_find_by_class(WC_WATER) != NULL) return; - window = window_create(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_WIDTH, sint16) - 76, 29, 76, 77, (uint32*)window_water_events, WC_WATER, 0); + window = window_create( + RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_WIDTH, sint16) - 76, + 29, + 76, + 77, + (uint32*)window_water_events, + WC_WATER, + 0 + ); window->widgets = window_water_widgets; window->enabled_widgets = (1 << WIDX_CLOSE) | (1 << WIDX_DECREMENT) | (1 << WIDX_INCREMENT) | (1 << WIDX_PREVIEW); window_init_scroll_widgets(window);