ζeh Matt
040a0e58aa
Fix desync in headless mode with rides that create smoke particles
2019-10-27 16:55:34 +01:00
Tom Lankhorst
6eea943083
Pass SDL_WINDOW_ALLOW_HIGHDPI to SDL_CreateWindow ( #10125 )
2019-10-21 22:36:05 +02:00
Duncan
28e7d90efb
Merge pull request #10127 from tupaschoal/fix-10126
...
Fix #10126 : window movement inversed
2019-10-21 07:46:02 +01:00
Tulio Leao
6c35a0234e
Fix CoordsXY sum and subtract operators ( #10128 )
2019-10-21 07:23:01 +02:00
Tulio Leao
08db611dd5
Fix #10126 : window movement inversed
2019-10-20 23:44:26 -03:00
Tulio Leao
5f916b79ae
Use ScreenCoordsXY for MouseInput ( #10120 )
2019-10-20 19:10:30 +02:00
Michael Steenbeek
f79667d842
Fix #9995 : User strings with umlauts not imported correctly
2019-10-20 19:03:09 +02:00
Matt
666158df1c
Bump up network version
2019-10-20 00:22:11 +02:00
Matt
07f401baa2
Use unsigned type for scenario_rand results
2019-10-20 00:21:19 +02:00
Matt
6dbbc86ee1
Allow rendering of ducks with zoom level 1
2019-10-20 00:21:19 +02:00
Matt
365c7c6f51
Use better variable name
2019-10-20 00:21:19 +02:00
Matt
70d37fe8f9
Fix ducks asserting due to invalid position
2019-10-20 00:21:18 +02:00
Matt
ac30e35dfa
Fix crash when ducks try to navigate out of bounds
2019-10-20 00:21:18 +02:00
Matt
01ea0ae366
Fix duck removal not invalidating screen
2019-10-20 00:21:18 +02:00
Matt
477347b6d4
Implement 'Remove Ducks' cheat
2019-10-20 00:21:18 +02:00
Matt
7fa41bb82d
Implement 'Create Ducks' cheat
2019-10-20 00:21:18 +02:00
Hielke Morsink
2e090493f2
Use white colour for labels in Tile Inspector ( #10076 )
...
The DARK_GREEN colour comes from the days of hardcoded numbers, where it was most likely copied from somewhere else.
2019-10-19 18:12:00 +02:00
Duncan
0f659794d0
Fix #10108 . Import/Export smoke particles correctly to stop desync ( #10113 )
...
Mistake made whilst refactoring import/export caused steam particiles to have the wrong information for each of its fields. This manifestied on multiplayer games causing an immediate desync.
2019-10-19 18:11:20 +02:00
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
Duncan
9ad15e398b
Merge pull request #10091 from tupaschoal/nullprt-deref-avoid-get_first_at
...
Avoid dereferencing invalid map_get_first_element_at return
2019-10-19 13:55:54 +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
35577f5b19
Avoid dereferencing invalid map_get_first_element_at return
2019-10-19 07:54:31 -03:00
Duncan
c3e14328f1
Little Refactor ( #10075 )
...
* Correct the label for track elem 255.
* Catch last little change
2019-10-19 10:00:42 +02:00
Duncan
a491543e17
Merge pull request #10107 from tupaschoal/fix-powered-not-passing-station
...
Fix #10106 : Reset number of circuits if unsupported
2019-10-19 09:54:27 +02:00
Tulio Leao
88dfff5f5e
Use ScreenCoordsXY for Keyboard shortcuts
2019-10-18 18:36:18 -03:00
Tulio Leao
9d468167e4
Fix #10106 : Reset number of circuits if unsupported
...
Closes #10106
2019-10-18 18:06:51 -03:00
Tulio Leao
e1a9e6005d
Use ScreenCoordsXY for Chat functions ( #10084 )
2019-10-18 17:57:31 +02:00
Tulio Leao
2159fd282b
Use ScreenCoordsXY for Window functions ( #10083 )
2019-10-18 17:44:26 +02:00
Denis Khabenkov
6632b979d7
Fix #9684 and #9690 : Enter and keypad enter are treated as different keys
...
* Remapped keypad Enter to return scancode
Fix #9684 : Entering custom size for water/land tool allows confirmation
with main enter key, but not numpad enter key
Fix #9690 : The keyboard shortcut for rotating the game view can be set
to Enter or KP Enter, but not both
* Add changelog entry
2019-10-18 10:40:07 +02:00
Hielke Morsink
8c1ccfdaa9
Fix possible cause for desyncs on ride crashes ( #10104 )
...
`scenario_rand` was used twice between two sequence points. The order of evaluation is unspecified in C++, meaning that these calls could be done in both forward and reverse order. Storing them in variables guarantees their order, making this cross-platform.
2019-10-16 21:51:59 +02:00
Matt
59b71183a2
Only temporarily set the cheat state
2019-10-16 13:21:21 +02:00
Michał Janiszewski
bf18bb8161
Fixup MSVC CMake targets ( #10100 )
2019-10-15 23:14:00 +02:00
Michał Janiszewski
6c4f63ba58
Add define for ARM64 ( #10096 )
2019-10-15 06:47:49 +02:00
Denis Khabenkov
4e111c66a3
Fix #10074 : Refactor TrackDesignEntranceElement
2019-10-11 00:25:13 +03:00
duncanspumpkin
bb042213fd
Fix #10069 . Actually pass the track element flags to the new element.
...
Mistake made whilst refactoring #10058 . Flags were incorrectly been taken from the destination and not the source.
Refactored names to use the correct t number
2019-10-10 18:48:05 +01:00
Denis Khabenkov
57a208d560
Fix #10064 : Refactor TrackDesignEntranceElement ( #10066 )
...
* Fix #10064 : Refactor TrackDesignEntranceElement
2019-10-10 18:23:29 +01:00
Tulio Leao
b793d7e79a
Avoid dereferencing map_get_first_element_at nullptr on libopenrct2 ( #10013 )
...
* Avoid dereferencing map_get_first_element_at nullptr on Map.cpp
* Avoid dereferencing map_get_first_element_at nullptr on MapAnimation.cpp
Returning true or internal control variable, based on what was seen on `map_animation_invalidate_track_onridephoto`
* Avoid dereferencing map_get_first_element_at nullptr on Park.cpp
* Avoid dereferencing map_get_first_element_at nullptr on Scenery.cpp
* Avoid dereferencing map_get_first_element_at nullptr on Sprite.cpp
* Avoid dereferencing map_get_first_element_at nullptr on TileInspector.cpp
* Avoid dereferencing map_get_first_element_at nullptr on Wall.cpp
* Avoid dereferencing map_get_first_element_at nullptr on Fountain.cpp
* Avoid dereferencing map_get_first_element_at nullptr on Footpath.cpp
* Avoid dereferencing map_get_first_element_at nullptr on Entrance.cpp
* Avoid dereferencing map_get_first_element_at nullptr on Banner.cpp
* Avoid dereferencing map_get_first_element_at nullptr on Vehicle.cpp
* Avoid dereferencing map_get_first_element_at nullptr on TrackDesignSave.cpp
* Avoid dereferencing map_get_first_element_at nullptr on TrackDesign.cpp
* Avoid dereferencing map_get_first_element_at nullptr on Track.cpp
* Avoid dereferencing map_get_first_element_at nullptr on Station.cpp
* Avoid dereferencing map_get_first_element_at nullptr on RideRatings.cpp
* Avoid dereferencing map_get_first_element_at nullptr on Ride.cpp
* Avoid dereferencing map_get_first_element_at nullptr on S4Importer.cpp
* Avoid dereferencing map_get_first_element_at nullptr on Staff.cpp
* Avoid dereferencing map_get_first_element_at nullptr on Peep.cpp
* Avoid dereferencing map_get_first_element_at nullptr on GuestPathfinding.cpp
* Avoid dereferencing map_get_first_element_at nullptr on Guest.cpp
* Avoid dereferencing map_get_first_element_at nullptr on VirtualFloor.cpp
* Avoid dereferencing map_get_first_element_at nullptr on Paint.TileElement.cpp
* Fix issues raised on review
* Fix remaining review issues.
* Early exit on loops if tileElement is nullptr
* Fix clang-format issues
2019-10-09 15:02:21 +01:00
Tulio Leao
3f21933d5b
Fix clang-format issue.
2019-10-08 18:22:02 -03:00
Tulio Leao
121585578e
Remove implicit conversion constructor
2019-10-08 18:22:02 -03:00
Tulio Leao
7193ba1bb7
Create TrackDesignMazElement struct
...
Closes #10053
2019-10-08 18:21:58 -03:00
Tulio Leao
6be7c42a3d
Close #10051 : Create TrackDesignSceneryElement
2019-10-08 17:13:34 +02:00
ζeh Matt
dd6d028c5b
Merge pull request #10061 from tupaschoal/nullptr-deref-consistency
...
Make check for map_get_nth_element_at consistent
2019-10-08 17:08:52 +02:00
Tulio Leao
4a817b88d9
Make check for map_get_nth_element_at consistent
...
Most places compare to `nullptr` explicitly, thus changed the ones that didn't.
Also moved one call that might have been superfluous if `offset == 0`
2019-10-08 08:06:46 -03:00
Tulio Leao
68ce43308e
Remove implicit conversion constructor
2019-10-08 07:48:03 -03:00
Tulio Leao
ff57f43996
Create TrackDesignTrackElement struct
...
Closes #10054
2019-10-08 07:47:56 -03:00
Duncan
ee0025987a
Merge pull request #10056 from duncanspumpkin/refactor
...
Refactor
2019-10-08 09:26:43 +01:00
Denis Khabenkov
163221520b
Delete assert and size information
2019-10-07 22:26:16 +03:00
Denis Khabenkov
de53ac84b8
Fix #10052 : Create a TrackDesignEntranceElement struct to replace rct_td6_entrance_element
2019-10-07 21:59:07 +03:00
duncanspumpkin
2c5ff4a0d1
Rename variables
2019-10-07 18:56:31 +01:00