Commit Graph

139 Commits

Author SHA1 Message Date
Michael Steenbeek 1b686816db
Move tile element banner functions to methods 2021-01-02 11:28:39 +01:00
Gymnasiast d58a8d1184
Change tile_element_get_ride_index() to method 2020-11-07 12:58:32 +01:00
Manuel Vögele 69b07904c1
Make TileElement conversion preserve the const qualifier
Additionally this commit fixes some constness issues revealed by this change
2020-11-04 19:15:44 +01:00
Sadret 0b99943a3f
Fix address comments in TileElement.h 2020-11-04 17:41:38 +01:00
Vinicius Sa d583911997
Avoid variable shadowing in derived struct RCT12BannerElement
Give a more meaningful name to its private member that caused the
shadowing, as well as in the struct BannerElement.

Reported by PVS-Studio (Warning: V703).

Fix 3/7.

Issue: 12523
2020-10-06 18:21:19 -03:00
Richard Fine 6e176e725c Fix formatting 2020-09-07 22:27:33 -04:00
Richard Fine 4d3ba7a6f0 Rename PathElement::Edges for clarity
PathElement::Edges actualy stores both 'edges' (in the lower 4 bits) and 'corners' in the upper four. Rename the variable to make this dual usage easier to see.
2020-09-07 21:20:34 -04:00
Gymnasiast 9d24655056
Convert track_element_is_block_start() to member function 2020-08-10 21:15:48 +02:00
Michael Steenbeek f8ab48176a
Tile Inspector: remove hardcoded surface/edge style names 2020-07-28 22:37:52 +02:00
Aaron van Geffen 7b5087f057
Update copyright year to 2020 2020-07-21 15:04:34 +02:00
Gymnasiast 88a5e4cd2a
Remove some unused constants 2020-07-13 22:09:28 +02:00
Gymnasiast 3c4721d014
Move some constants to RCT12.h 2020-07-13 22:04:50 +02:00
Thamara Andrade 8ce799a72e
Close #12118: Prefer foward declaration of *Coords* in headers (#12142)
* Removing unnecessary world/Location includes in headers
* Prefer foward declaration of *Coords* in header files
Closes #12118
2020-07-06 10:10:39 -03:00
Michael Steenbeek 9ef8d6da42
Convert most remaining C-style casts to C++-style ones (#11867) 2020-06-07 23:18:11 +02:00
Michael Steenbeek f21ddb0723
Refactor checks for station pieces (#11876) 2020-06-05 17:55:15 -03:00
Hielke Morsink b39c673456 Introduce constant MAX_ELEMENT_HEIGHT 2020-05-05 11:35:42 +02:00
Gymnasiast cc65564521
Use (RCT12)ObjectEntryIndex in more places 2020-05-01 22:06:13 +02:00
Michael Steenbeek b89130e0f3
Use ObjectEntryIndex in more places (#11440) 2020-04-25 00:10:47 +02:00
Michał Janiszewski 2323cc1596
Use named casts instead of old-style casts
Change prepared with clang-tidy and google-readability-casting check
2020-04-22 17:09:29 +02:00
Tulio Leao 64e4a8420e
Use named casts on openrct2/world (#11141) 2020-04-17 21:08:22 +02:00
Michael Steenbeek 8a12ad8f6b
Fix #9719: Hacked walls in RCT1 saves are imported incorrectly (#11222) 2020-04-05 13:49:36 +02:00
Michael Steenbeek c519512cfe
Create ObjectEntryIndex (#10980) 2020-03-20 19:28:39 +01:00
Gymnasiast c9afcaa5b3
Fix errors 2020-03-05 00:09:39 +01:00
Gymnasiast 3ed7694495
Move tile element-specific flags 2020-03-04 22:01:09 +01:00
Gymnasiast 57a40c0657
Extend PathElement 2020-03-04 21:57:42 +01:00
Gymnasiast 383d5d99e1
Change entry index size of Small and Large scenery elements 2020-03-04 15:57:54 +01:00
Gymnasiast 1b38289490
Move scenery_update_age to SmallScenery member function 2020-03-04 15:48:17 +01:00
Tulio Leao 0c4623a39f
Replace typedef aliasing by using (#10712) 2020-02-17 11:43:47 +01:00
Michael Steenbeek 1690361b36
Increase size of ride_id_t to 16 bits 2020-02-16 22:21:17 +01:00
Gymnasiast b59e37284d
Fix private field warning 2020-02-15 11:18:27 +01:00
Gymnasiast 1e6efa6eb4
Extend BannerIndex to 16 bits 2020-02-15 10:37:34 +01:00
Gymnasiast 1077bf0702
Make room for 255 station indexes in Entrance Element 2020-02-15 09:47:37 +01:00
Gymnasiast e88ee6ee7b
Expand WallElement 2020-02-15 09:47:37 +01:00
Matt 758a7e432f
Use const reference instead of copy for location structures 2020-02-13 11:53:14 +01:00
Michael Steenbeek 723f658dbd
Change ride_idnew_t to 16 bit; use it in more places (#10667) 2020-02-10 22:41:49 +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 08ab15ef36
Fix #10313: Path furniture can be placed on level crossings 2020-01-05 17:59:02 +01:00
Tulio Leao d861658669 Use CoordsXY on Scenery and SmallScenery (#10513) 2020-01-04 12:45:51 +01: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
Michael Steenbeek a5700a3d07
Merge pull request #9959 from richard-fine/directions
Convert more code to use proper Direction symbols
2019-09-22 16:59:41 +02: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
Richard Fine 52b4717d85 Use Direction type for PathElement SlopeDirection 2019-09-01 16:08:01 +01:00
Gymnasiast bb73dd0dfb
Refactor track element to use 16 bytes 2019-08-31 13:14:19 +02:00
Gymnasiast 1fead03179
Modify Surface tile element to use 16 bytes 2019-08-30 22:22:08 +02:00
Gymnasiast f4eceaf35e
Modify Large Scenery tile element to use 16 bytes 2019-08-30 22:07:43 +02:00
Gymnasiast f365bc3cb7
Create getters and setters for occupied quadrant 2019-08-27 21:12:48 +02:00
Gymnasiast ec5ba20992
Create dedicated method for SetLastForTile() 2019-08-25 16:13:02 +02:00
Gymnasiast 6e200459d3
Refactor some accessors to tile element type and flags fields 2019-08-24 22:42:47 +02:00