Commit Graph
563 Commits
Author SHA1 Message Date
Duncan 7546c846df Name functions and remove dead code
The dead code removed has been removed already from the draw sprite. Should have removed it from interaction at the same time.
2019-10-19 17:21:08 +02:00
Tulio Leao dbb66dd028 Remove duplicate functions (#10067)
* Reduce code duplication in src\openrct2\interface\Window.cpp

`window_resize_gui_scenario_editor` was a subset of `window_resize_gui`

* Reduce code duplication in src\openrct2\network\Twitch.cpp

Both `GetFollowers()` and `GetMessage()` were very similar

* Reduce code duplication in src/openrct2/world/SmallScenery.cpp

`map_place_non_scenery_clear_func` and `map_place_scenery_clear_func` did basically the same thing, with a single branch difference

* Reduce code duplication in src/openrct2-ui/windows/TopToolbar.cpp

Make `top_toolbar_tool_update_scenery_clear` call `top_toolbar_tool_update_land_paint` and then do the additional differing calculation it did.
2019-10-19 15:38:26 +02:00
Tulio Leao ce1f38da25 Use ScreenCoordsXY for window functions (#10086)
* Use ScreenCoordsXY for window_create function

* Use ScreenCoordsXY for window_find_from_point function

* Use ScreenCoordsXY for window_find_widget_from_point

* Use ScreenCoordsXY for ride_contruction_tool*

* Use ScreenCoordsXY for window_event_tool*

* Use ScreenCoordsXY for window_event_scroll_mouse*

* Use ScreenCoordsXY for remaining window_event*

* Use ScreenCoordsXY for window_(set|move)_position
2019-10-19 13:07:03 +02:00
Tulio Leao e1a9e6005d Use ScreenCoordsXY for Chat functions (#10084) 2019-10-18 17:57:31 +02:00
duncanspumpkin 213ba15ba5 Remove unused code and variables from function 2019-10-07 18:36:27 +01:00
Ted John c211292fdd Fix #9941: Giant screenshot's made from command line aren't positioned right 2019-08-26 14:50:47 +01:00
Ted John 9be0130f2d Show image limit in show_limits console command (#9935) 2019-08-26 12:28:37 +01:00
Ted John 8d543a056d Prevent cropping top of giant screenshot (#9934)
Search through every single tile on the map for the highest element in 2D space. Use that as reference for top of screenshot.
2019-08-24 16:33:03 +01:00
Gymnasiast c3fdb728d1 Rename rct_research_item to ResearchItem 2019-08-23 22:41:43 +02:00
Hielke Morsink bd42977243 Fix: Fences still visible after using remove_park_fences 2019-08-23 21:01:08 +02:00
Ted John 2dda23d82e Refactor benchgfx 2019-08-21 20:12:26 +01:00
Ted John f4079434dc Fix #4927: Giant screenshot cut off at bottom and top 2019-08-21 20:11:06 +01:00
duncanspumpkin 37ef48890f Move various to use CoordsXYZ funcs instead of LocationXYZ 2019-08-19 20:04:58 +01:00
duncanspumpkin 927c8a4e85 Create ScreenCoords struct. Refactor 3d_to_2d again 2019-08-19 20:04:58 +01:00
duncanspumpkin c6452095ca Refactor tile_element_height to use CoordsXY 2019-08-19 20:04:57 +01:00
Matt cc6321048f Refactor window_invalidate to use rct_window::Invalidate 2019-08-11 17:22:00 +02:00
Matt 2053ecb688 Refactor window_scroll_to_viewport to use rct_window::ScrollToViewport 2019-08-11 17:22:00 +02:00
Matt b046d45c01 Refactor window_set_location to use rct_window::SetLocation 2019-08-11 17:21:56 +02:00
Ted John 9954f0b725 Add nullptr checks for more instances of get_ride (#9819) 2019-08-09 14:20:59 +01:00
Ted John ab7b17fc4e Add nullptr checks for get_ride in libopenrct2 (#9788) 2019-08-08 22:58:56 +01:00
Ted John cbb1bf9289 Fix #9752: window_close from ride construction window causes a crash
Re-obtain iterator after calling window close event as close event may open / close other windows.
2019-08-07 23:20:50 +01:00
Ted John cd4eb86a7c Merge pull request #9725 from IntelOrca/refactor/ride-manager
Refactor ride list
2019-08-07 21:03:17 +01:00
Matt 4f6dbd6496 Fix #9727: Crash when multiple windows are closed during close events 2019-08-06 17:08:10 +02:00
Ted John a863c7ae50 Remove rest of FOR_ALL_RIDES instances 2019-08-04 16:44:17 +01:00
Ted John e23638548a Reduce use of MAX_RIDES and RIDE_TYPE_NULL 2019-08-04 16:44:17 +01:00
Ted John a3fe00f0a3 Refactor ride list to a manager with iterator 2019-08-04 16:43:50 +01:00
Ted John d28799ef18 Remove user strings 2019-07-29 20:01:37 +01:00
Ted John 40d49b93d3 Do not use user strings for peep names 2019-07-29 19:18:16 +01:00
Ted John 6fff2079f9 Refactor ride name to dynamic args and std::string 2019-07-29 19:18:16 +01:00
Ted John 0b4d989a67 Rename get_banner to GetBanner 2019-07-26 17:24:19 +01:00
Ted John 5c07c53faf Refactor get banner 2019-07-25 22:21:19 +01:00
Matt 3395079737 Remove NUM_SPRITE_LISTS macro and replace with SPRITE_LIST_COUNT for consistency 2019-07-24 17:53:54 +02:00
Duncan ab5f5b20cd Use enum class for RCT2_SOUND (#9618)
* Use enum class for RCT2_SOUND

* Fix formatting. Fix mistaken declaration.

* Change name of enum to SoundId

* Fix clang format
2019-07-22 19:02:45 +01:00
Ted John 5733d666b3 Do not store park name as a user string 2019-07-21 11:33:15 +02:00
FredFucks d44e89d9a4 Fix Chinese fonts on Linux with "WenQuanYi Micro Hei" (#9584) 2019-07-17 11:22:38 +02:00
ζeh Matt a7f8960151 Fix #9498: Only close the most recent window when using the hotkey (#9504) 2019-07-01 22:59:31 +02:00
ζeh Matt e149722a15 Fix #9467: Crash when windows create new window when being closed (#9470) 2019-06-27 22:28:07 +02:00
duncanspumpkin b896f07687 Add PeepPickupAction
Move Guest and Staff pickup to the new game action. Rework the game
action so that only one game action is required for the two game
commands. Remove the final game command with a callback.
2019-06-20 19:34:02 +01:00
Hielke Morsink 6b7fee86bb Don't clear the screen to black for giant screenshots
When certain viewport flags were set (underground view, hide base land,
hide vetical faces, clip view), the viewport would always be cleared,
including for giant screenshots.
2019-06-16 16:42:21 +02:00
Hielke Morsink e2d7b2cf03 Use new setting in screenshot command too 2019-06-09 11:03:01 +02:00
Hielke Morsink 5418eb6e34 Add transparency setting to options window 2019-06-09 11:03:01 +02:00
Hielke Morsink bffc012d16 Implement #1260: --transparent switch for screenshot command 2019-06-09 11:03:00 +02:00
Hielke Morsink f5ac98c1e2 Early out when context creation fails 2019-06-09 11:03:00 +02:00
Matt f98d027a14 Fix #9377: accumulate a list of windows to close before actual closing 2019-06-06 12:21:46 +02:00
Aaron van Geffen f1ac847fce Merge pull request #9222 from IntelOrca/implement/485-ghost-train-simulation
Implement #485: ghost train simulation
2019-06-04 20:24:16 +02:00
Duncan 06c666c298 Merge pull request #9358 from ZehMatt/undo-fuckup1
Remove useless log_info
2019-06-04 18:45:34 +01:00
Duncan f44d29f861 Merge pull request #9368 from ZehMatt/fix-9365
Fix #9365: Crash when bringing window to front
2019-06-04 18:45:22 +01:00
Matt d6975a8f23 Fix #9365: Crash when bringing window to front 2019-06-04 07:02:55 +02:00
Hielke Morsink 4dea507e50 Fix #9360: sticky windows can be closed 2019-06-03 22:49:45 +02:00
Matt af65811f50 Remove useless log_info 2019-06-03 18:59:23 +02:00