Gymnasiast
33d2155529
Use define for some remapping instructions
2020-03-05 18:15:03 +01:00
Gymnasiast
57a40c0657
Extend PathElement
2020-03-04 21:57:42 +01:00
Michael Steenbeek
5f0db41e48
Process @duncanspumpkin 's feedback on #10830 ( #10853 )
2020-03-01 14:39:18 +01:00
Michael Steenbeek
938f2a891f
Implement #682 : Staff patrol area now drawn on the water ( #10830 )
2020-02-24 13:47:28 +01:00
pizza2004
57605f36e3
Fix #2485 : Hide Vertical Faces not applied to water
2020-02-23 21:32:57 +01:00
Michael Steenbeek
f41f878581
Replace some usages of LocationXY(Z)16 ( #10699 )
2020-02-18 22:42:38 +01:00
Matt
c381d9ff3f
Remove obsolete construction of CoordsXY object
2020-02-13 12:11:20 +01:00
Matt
758a7e432f
Use const reference instead of copy for location structures
2020-02-13 11:53:14 +01:00
Michael Steenbeek
733ec6ec24
Fix water sides glitch ( #10599 )
2020-01-21 14:34:25 +01:00
Michael Steenbeek
d798811c4a
Make GetWaterHeight return big Z ( #10579 )
...
* Make GetWaterHeight return big Z
* Restore > 0 [ci skip]
2020-01-19 15:12:48 +00:00
Michael Steenbeek
29922da871
Refactor calls to staff_is_patrol_area_set()
2019-12-31 10:10:40 +01:00
Duncan
c170926200
Refactor to prefer baseZ instead of height for big Z ( #10478 )
2019-12-31 09:33:27 +01:00
Duncan
2c359736ee
Refactor to reduce usage of LocationXY8 and sLocationXY8 ( #10479 )
...
* Refactor to reduce LocationXY8 usage
* Further reduction of LocationXY usage and sLocationXY usage
* Reduce sLocationXY8 usage
2019-12-30 19:03:34 +00:00
Michael Steenbeek
8ca0cf52a7
Replace more direct accesses to base/clearance Z with getter/setter ( #10454 )
2019-12-27 15:26:40 +01:00
Gymnasiast
62fcbb07ca
Rename methods to GetBaseZ/GetClearanceZ
2019-12-23 20:08:37 +01:00
Gymnasiast
7d11858dbe
Create getter for GetBaseHeight()/GetClearanceHeight()
2019-12-23 20:05:24 +01:00
Tulio Leao
a2c7ecc6e5
Make Map::map_get_first_element_at() use CoordsXY ( #10413 )
...
* Make Map::map_get_first_element_at() use CoordsXY
* Fix clang-format on ClearAction.hpp
* Prefer TileDIrectionDelta over hardcoded delta on RideConstruction
* Use named Direction constants
* Make Compat::map_get_first_element_at() use CoordsXY
2019-12-23 07:35:41 +00:00
Tulio Leao
7c75db2b2d
Make map_get_surface_element_at only accept Coords objects
2019-12-18 23:46:50 -03:00
ζeh Matt
ab5be44ccb
Fix #10325 : Crash when banners have no text ( #10327 )
...
* Fix #10325 : Crash when banners have no text
* Update changelog.txt
2019-12-04 11:22:07 +01:00
Tulio Leao
2acdc577f7
Use Coords for windows/RideConstruction
2019-11-18 19:17:54 -03:00
Sijmen Schoon
f7fd98fcf2
Add constexpr keywords
2019-11-01 02:07:14 +01:00
Sijmen Schoon
3f3baa2b13
Revert changing constructor lists to constructors
2019-10-31 16:10:26 +01:00
Sijmen Schoon
ab2dbea32a
Change a sizable portion of LocationXY(Z) to (Tile)CoordsXY(Z)
2019-10-31 00:19:14 +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
Richard Fine
5ff78e48c7
Reduce usage of GetDirectionWithOffset()
...
GetDirectionWithOffset(2) is the same thing as 'direction_reverse(GetDirection())', and the latter is more readable.
2019-09-01 18:40:08 +01:00
Gymnasiast
f12eb3010f
Fix display of G2 characters; remove some unused sprite IDs
2019-09-01 11:12:09 +02:00
duncanspumpkin
bc12618d46
Clang format
2019-08-19 20:04:57 +01:00
duncanspumpkin
c6452095ca
Refactor tile_element_height to use CoordsXY
2019-08-19 20:04:57 +01:00
duncanspumpkin
5333dc4295
Return a SurfaceElement from get_surface_element
2019-08-19 20:04:56 +01:00
Ted John
53f228fc33
Fix #9769 : NRE in sub_6A4101
2019-08-08 12:45:17 +01:00
Ted John
2cfad1fc66
Fix #9764 : NRE in ride_entrance_exit_paint
2019-08-08 12:37:53 +01:00
Ted John
b7121553b4
Fix #9715 : large scenery banners have incorrect colour and scrolling ( #9716 )
2019-08-02 21:18:42 +02:00
Ted John
1f9f48e054
Fix flickering banners
2019-07-29 21:41:21 +01:00
Ted John
7ce2f38c92
Fix formatting
2019-07-29 20:01:49 +01:00
Ted John
61d64ab8c5
Do not use user strings for banners
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
Ted John
85543bd1c8
Separate RCT2 and OpenRCT2 banner struct
2019-07-25 22:21:19 +01:00
Ted John
5733d666b3
Do not store park name as a user string
2019-07-21 11:33:15 +02: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
aw20368
9effe21dd0
Fix #8602 : Wall piece collision detection deviates from vanilla ( #9414 )
...
Wall piece collision used the base height of the wall. Changed to use the clearance height.
2019-06-13 20:03:53 +02:00
Duncan
e5972f8a67
Fix #9401 , Fix #9387 . Check for tile element before deref. ( #9409 )
...
This fixes two crashes that can occur when surface elements are deleted. For normal play you should never delete a surface element as the game expects there to be a surface element on all usable terrain.
2019-06-12 21:16:40 +01:00
Hielke Morsink
bffc012d16
Implement #1260 : --transparent switch for screenshot command
2019-06-09 11:03:00 +02:00
aw20368
3823befa10
Fix #7323 Tunnel entrances not rendering in 'highlight path issues' ( #9339 )
...
Hiding path scenery caused function that draws tunnel to prematurely return. Changed to only skip drawing scenery.
2019-06-04 20:34:39 +02:00
Gymnasiast
170307cd0f
Remove redundant semicolons after for loops
2019-05-13 22:16:30 +02:00
Filip Gawin
6833da77e3
Simplify boolean expresions
2019-05-10 22:00:38 +02:00
Xkeeper
51593c540a
Fix ride entrance hut banner issue
...
This fixes the problem where the ride entrance hut
banner would show a nonsense number after auto-named
rides based on the amount the text had scrolled.
2019-05-01 23:59:09 +02:00
Xkeeper
100ee139f5
Update code style with clang-format
2019-05-01 23:59:09 +02:00
Xkeeper
c6a4316bd4
Update banner formatting code/strings
...
Changes some things to use STR_BANNER_TEXT_FORMAT and removes
instances of " - - " attached to other strings in the
localization files.
This can be used in the future to show the messages on
a sign or banner via a tooltip without having to
duplicate those messages without " - - ".
2019-05-01 23:57:07 +02:00
Nicole
d38fb6a7a2
Fix #8800 : ensure tile_element_height is used correctly ( #9087 )
...
* Changed calls to tile_element_height to tile_element_water_height
* Changes to calls to tile_element_height
* Removed tile element_height, map_get_highest_land_height, and map_get lowest_land_height
3 functions removed due to relocation.
* Added function tile_element_height back to map.cpp
Added tile_element height back to map.cpp. Was unnecessarily deleted.
* Update Map.h
* water_height changes
* Update Scenario.cpp
* Update Scenario.cpp
* Fix 8800: applied clang format
* Removed unnecessary ANDs
2019-04-23 18:26:48 +01:00
Michael Steenbeek
42a1a8704d
Use empty() for vectors; clean up bool comparisons ( #9118 )
2019-04-20 20:39:47 +02:00
duncanspumpkin
30a5194085
Use a vector for map selection tiles
2019-04-04 19:23:44 +01:00
Matt
c520b0061e
Refactor large_scenery_sign_fit_text to not return static local.
2019-04-02 20:14:50 +02:00
Matt
4b1e7c3dd2
Remove _unk9E32BC from global scope and make it local
2019-03-31 17:15:15 +02:00
Matt
37c3809744
Implement partial multicore rendering
2019-03-31 15:50:55 +02:00
Aaron van Geffen
2af13904c5
Update copyright notices for 2019. ( #8903 )
2019-03-17 07:16:15 +00:00
Michael Steenbeek
6884eac24c
Turn railing support type into enum class
2019-03-16 14:21:44 +01:00
Michael Steenbeek
602821a389
Split path surface objects into paths and queues
2019-03-16 12:37:32 +01:00
Ted John
cdec457abd
Refactor peep struct
2019-02-28 20:28:58 +01:00
duncanspumpkin
9d78bb0d4e
Fix compile and formating
2019-02-27 10:54:08 +00:00
duncanspumpkin
fae15fceca
Use IsBroken
2019-02-27 10:49:48 +00:00
duncanspumpkin
6495ffdb34
Use IsBlockedByVehicle
2019-02-27 10:49:48 +00:00
duncanspumpkin
112b40910b
Pass a bool to the set function. Make review changes
2019-02-25 20:44:12 +00:00
duncanspumpkin
737c308e4e
Use IsGhost() to access ghost state
...
Added set and clear ghost to further prevent direct access to flags
2019-02-25 15:12:35 +00:00
Michael Steenbeek
2a4215a30f
Create constant for SCROLLING_MODE_NONE
2019-02-14 22:41:48 +01:00
Michael Steenbeek
4e9d2ce764
Split footpath object into two internally
2019-01-20 21:38:38 +01:00
Gymnasiast
cd8227c756
Clean up magic numbers in footpath corner drawing
2019-01-20 17:54:30 +01:00
Gymnasiast
ad2698df0d
Move 'should draw path over supports' to tile element
2019-01-20 17:23:27 +01:00
Gymnasiast
1f6d4caf7c
Rename some variables
2019-01-20 17:23:27 +01:00
Gymnasiast
2f0b6a9652
Rename FOOTPATH_ENTRY_FLAG_HAS_PATH_BASE_SPRITE
2019-01-20 17:23:27 +01:00
Gymnasiast
73e25399d3
Rename footpathEntry to railingEntry where appropriate
2019-01-20 17:23:27 +01:00
Gymnasiast
9da5b5d513
Rename path_paint_{box,pole}_support parameter
2019-01-20 17:23:27 +01:00
Michael Steenbeek
6ef01b3cd3
Name some path drawing variables
2019-01-18 20:35:43 +01:00
Richard Fine
e90e9dd73f
Introduce many uses of direction_reverse
...
Change many of the places doing the ^2 trick to use direction_reverse instead, for improved readability.
2019-01-05 15:41:46 +00:00
Michael Steenbeek
31298bd772
Merge pull request #8543 from IntelOrca/refactor-ride
...
Refactor ride structure
2019-01-02 22:38:20 +01:00
Michael Steenbeek
b5317ee9e9
Split drawing of path and railing
2019-01-02 19:52:53 +01:00
Ted John
38f632074b
Merge ride track colour arrays into one
2019-01-01 21:25:34 +00:00
ζeh Matt
7d19a5bc77
Refactor memcpy to std::memcpy and memset to std::memset ( #8408 )
2018-12-15 22:23:31 +01:00
Ted John
06f203a7e7
Implement surfaces, edges and stations as objects
2018-12-09 23:30:40 +00:00
Matt
468d94a6ca
Remove gCurrentViewportFlags
2018-12-05 23:09:17 +01:00
ζeh Matt
940fff4bbf
Fix dereferencing nullptr when game objects are missing. ( #8360 )
2018-12-05 22:59:15 +01:00
Hielke Morsink
354d973a48
Use std::size instead of Util::CountOf
2018-11-23 21:59:08 +01:00
Michael Steenbeek
f8add7f62e
Rename rct_tile_element to TileElement
2018-11-01 13:53:50 +01:00
Michael Steenbeek
5f4cca3c7e
Remove rest of access to footpath edges
2018-10-31 15:08:06 +01:00
Michael Steenbeek
d89c3d9e67
Replace calls to get path edges
...
This replaces most calls/direct access to the footpath edges (i.e. the orthogonal directions, not the corners). This includes places where the whole byte was retrieved, but only compared against orthogonal directions.
2018-10-31 15:08:06 +01:00
Michael Steenbeek
af2c1e69d1
Remove residual access to path addition_status field
2018-10-31 13:10:07 +01:00
Michael Steenbeek
853e4c4a6a
Remove residual access to path ride_index field
2018-10-31 13:09:53 +01:00
Michael Steenbeek
66cde65f87
Replace C style function for getting slope direction
2018-10-31 13:09:19 +01:00
Gymnasiast
a6885ea464
Replace C-style functions for getting direction
2018-10-04 14:54:12 +02:00
Gymnasiast
015ece94c6
Replace C-style functions for getting path entries
2018-10-04 12:13:17 +02:00
Gymnasiast
ecd6247462
Replace C-style functions for checking getting path additions
2018-10-04 12:13:17 +02:00
Gymnasiast
ee05438953
Replace C-style functions for checking path addition ghost status
2018-10-04 12:13:17 +02:00
Gymnasiast
e159ac65a6
Replace C-style functions for IsWide() and SetWide()
2018-10-04 12:13:17 +02:00
Gymnasiast
f9f233dbb1
Replace C-style function for HasQueueBanner()
2018-10-04 12:13:17 +02:00
Gymnasiast
37f59e17dc
Replace C-style isSloped() function
2018-10-04 12:13:17 +02:00
Michael Steenbeek
882a65e4c0
Port queue functions
2018-10-03 12:18:21 +02:00
Michael Steenbeek
3b7fc4cf8c
Port rest of banner functions
2018-09-27 22:15:04 +02:00
Michael Steenbeek
d01b21a1ac
Port banner index
2018-09-27 22:15:04 +02:00
Michael Steenbeek
995c6debf1
Port entrance path type lookup
2018-09-27 22:15:04 +02:00