Gymnasiast
6cdee9db93
Fix #7006 : Use RTDs for determining ride category
2020-04-30 12:59:18 +02:00
Michael Steenbeek
2e50cd44ba
Refactor ride_list_item to RideSelection ( #11505 )
2020-04-27 16:26:35 +02:00
Gymnasiast
e67ebed697
Remove some Americanisms
2020-04-26 11:07:19 +02:00
Gymnasiast
100236c2d2
Move available ride modes to RTD; ride mode cleanup
2020-04-26 11:07:19 +02:00
Breno Guimaraes
38ffc4f577
Use a pointer instead of reference as a member.
...
This allows the assignment operator for the iterator to be generated
automatically by the compiler.
2020-04-25 17:51:26 -03:00
Michael Steenbeek
b89130e0f3
Use ObjectEntryIndex in more places ( #11440 )
2020-04-25 00:10:47 +02:00
Breno Rodrigues Guimarães
ef8fd20c99
Let Ride::FormatStatusTo return the number of written bytes ( #11411 )
2020-04-22 21:24:51 -03:00
Breno Rodrigues Guimarães
374b744477
Use Formatter to handle argument formatting for tooltips ( #11379 )
2020-04-21 12:38:59 +02:00
ifimfree
fb6dd4bfad
Create constants for a few flags
2020-04-20 10:39:26 +02:00
Gymnasiast
5d3bf2be20
Move category to RTD; move RideTypeIsIndependent to a flag
2020-04-18 15:22:41 +02:00
Tulio Leao
b449e445f7
Use named casts on openrct2/ride ( #11163 )
...
Excluding subfolders
2020-04-17 19:53:33 +02:00
Gymnasiast
edd31d9f16
Move flags to RideTypeDescriptors
2020-04-17 17:03:33 +02:00
Michael Steenbeek
b70c5cefd6
Use station index in a few more places ( #11066 )
2020-03-27 11:13:02 +01:00
Michael Steenbeek
cfb405f0ed
Use StationIndex in many more places ( #10992 )
2020-03-26 21:38:26 +01:00
Gymnasiast
2f7a26e8da
Refactor station index a bit
2020-03-21 17:05:16 +01:00
Michael Steenbeek
c519512cfe
Create ObjectEntryIndex ( #10980 )
2020-03-20 19:28:39 +01:00
Ted John
c89cecb2b5
Refactor the ride type to entry map ( #10967 )
...
Use C++ vectors and allow larger ride entry indices (> 256)
2020-03-20 18:07:31 +01:00
Michael Steenbeek
fd91c41a76
Name remaining ride type flags ( #10947 )
2020-03-16 22:52:06 +01:00
Michael Steenbeek
be13c1fc87
Refactor more TileCoords
2020-03-07 21:07:18 +01:00
Gymnasiast
2eb967b30d
Change station start to CoordsXY
2020-03-05 12:29:02 +01:00
Michael Steenbeek
e3f5eb7275
Merge pull request #10847 from tupaschoal/const-ref-coords
...
Prefer const ref to send (Tile)CoordsXY(ZD) over
2020-03-01 14:38:39 +01:00
Tulio Leao
9bcd20e0e6
Prefer const ref to send ScreenCoordsXY over
2020-02-29 08:25:48 -03:00
Tulio Leao
181eaf768d
Receive CoordsXYZ by const ref instead of copy
2020-02-29 01:14:05 -03:00
Michael Steenbeek
1690361b36
Increase size of ride_id_t to 16 bits
2020-02-16 22:21:17 +01:00
Michael Steenbeek
d16fbb0cd2
Change ride->overall_view to CoordsXY ( #10673 )
2020-02-08 17:19:59 +01:00
duncanspumpkin
a5ef8d6240
Rename rct_vehicle
2020-01-19 17:14:56 +00:00
Tulio Leao
d34321fdaa
Use CoordsXY on ride_entrance_exit_place_ghost()
2020-01-19 13:30:28 -03:00
Michael Steenbeek
8a9f0eeca5
Prepare track piece handling code for more than 256 pieces ( #10575 )
2020-01-17 12:27:14 +01:00
Michael Steenbeek
0c9b1cec96
Correct max vehicles per ride value ( #10504 )
...
* Correct max vehicles per ride value
* Fix formatting
* Fix constant usage in TrackDesign.cpp
2020-01-04 18:10:33 +01:00
Tulio Leao
a7b33a7d36
Use more Coords on some files. ( #10463 )
...
* Use more Coords on MazePlaceTrackAction
* Use more Coords on MazeSetTrackAction
* Use more Coords on PlacePeepSpawnAction
* Use more Coords on SetCheatAction
* Use more Coords on SurfaceSetStyleAction
* Use more Coords on Station
2019-12-30 16:50:48 +00:00
Michael Steenbeek
64f7cac6d6
Create getters for station height and start ( #10453 )
2019-12-27 15:57:40 +01:00
duncanspumpkin
38434ad688
Use CoordsXYZ for cable lift location
2019-12-24 12:04:14 +00:00
duncanspumpkin
0f90b2c353
Rename variable as its technically new
2019-12-24 11:46:56 +00:00
duncanspumpkin
370a9b1113
Change type of cur_test_track_location
2019-12-24 11:44:01 +00:00
duncanspumpkin
a5ad2f9a87
Change overall view and boat hire return type to TileCoordsXY
2019-12-24 08:51:48 +00:00
duncanspumpkin
0a5d094785
Change type of ChairLiftBullwheel to TileCoordsXYZ
2019-12-24 08:28:10 +00:00
duncanspumpkin
45403ac2d3
Move station_starts to TileCoordsXY
2019-12-21 11:48:13 +00:00
duncanspumpkin
63b8f83f4f
Make suggested changes
2019-12-15 08:23:21 +00:00
Duncan
fed417da03
Merge pull request #10356 from duncanspumpkin/label_var
...
Change the label on known var to reflect use.
2019-12-11 18:14:07 +00:00
Tulio Leao
01c62437b2
Remove Ride::ride_get_rotated_coords()
2019-12-09 16:52:47 -03:00
Tulio Leao
6f0ebfea27
Use CoordsXY and ScreenCoordsXY for rotate in Ride*.*
2019-12-04 08:02:09 -03:00
Tulio Leao
5dfe373061
Refactor ride_get_entrance_or_exit_position_from_screen_position()
2019-11-13 09:41:58 -03:00
Tulio Leao
9d468167e4
Fix #10106 : Reset number of circuits if unsupported
...
Closes #10106
2019-10-18 18:06:51 -03:00
Ted John
132a1916d6
Fix #9832 : Access violation in ride_measurement_update ( #9842 )
...
We can not store a ride pointer in ride measurement as rides are now stored in a vector which means their addresses can change when rides are constructed / removed.
2019-08-10 15:14:22 +01:00
duncanspumpkin
54d6722bf2
Link everything together
2019-08-09 20:40:35 +01:00
Ted John
7fd4fd0c2a
Fix #9179 : Crash when modifying a ride occasionally ( #9756 )
...
Add lots of nullptr and tile element checks in the ride_modify call chain.
2019-08-08 12:59:06 +01: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
414b53b56d
Remove ride classifications
2019-08-04 16:43:50 +01:00
Ted John
a3fe00f0a3
Refactor ride list to a manager with iterator
2019-08-04 16:43:50 +01:00
Ted John
1a6e5b5548
Fix #9680 : invalid-read in ride_entry_get_supported_track_pieces ( #9681 )
2019-08-03 19:55:24 +02:00
Ted John
40d49b93d3
Do not use user strings for peep names
2019-07-29 19:18:16 +01:00
Ted John
1d4c1958dd
Do not allow duplicate ride names
2019-07-29 19:18:16 +01:00
Ted John
3f8890afde
Fix remaining errors and a few bugs
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
6f0298deb3
Refactor ride measurement storage
2019-06-09 11:55:41 +02:00
Ted John
ca32357dad
Use bool for isApplying
2019-05-28 22:31:46 +01:00
Ted John
5f1f428bce
Add and use Ride::SupportsStatus
2019-05-28 16:50:08 +01:00
Ted John
c4e18e570e
Add and implement simulation mode for rides
2019-05-28 16:50:08 +01:00
Gymnasiast
4e23c42d38
Remove stub functions from new_game_command_table[]
2019-05-13 22:51:41 +02:00
Gymnasiast
2ea1fcc69d
Remove unused declarations and functions
2019-05-13 22:16:14 +02:00
Hielke Morsink
ac7bc97736
Expose colour scheme in the tile inspector ( #6116 )
2019-04-22 15:49:09 +02:00
Michael Steenbeek
5a906b2378
Port more functions to Ride struct ( #9119 )
2019-04-20 22:22:39 +02:00
Michael Steenbeek
8d83f5a549
Merge pull request #8978 from Gymnasiast/refactor/inversions
...
Close #8965 : Refactor ride->inversions
2019-03-28 20:28:35 +01:00
Michael Steenbeek
a50c7836f8
Move more ride functions to struct methods ( #8977 )
2019-03-27 21:53:38 +01:00
Gymnasiast
731af74732
Cast after std::min
2019-03-27 21:49:10 +01:00
Gymnasiast
a27e04e5a3
Limit inversions and holes to 31 (for now)
2019-03-27 19:44:46 +01:00
Gymnasiast
921e426605
Increase size of inversions and holes to uint16_t
2019-03-27 15:55:34 +01:00
Gymnasiast
64e51cd34b
Close #8965 : Refactor ride->inversions
2019-03-27 11:30:18 +01:00
Michael Steenbeek
1c570c8eec
Move some ride functions to struct methods
2019-03-20 20:05:25 +01:00
Aaron van Geffen
2af13904c5
Update copyright notices for 2019. ( #8903 )
2019-03-17 07:16:15 +00:00
duncanspumpkin
f10391c98d
Remove references to old command
2019-03-02 07:24:42 +00:00
Ted John
cdec457abd
Refactor peep struct
2019-02-28 20:28:58 +01:00
duncanspumpkin
245a7fe64d
Remove old game command
2019-02-28 08:21:58 +00:00
duncanspumpkin
e1977d1a2f
Remove references to game command
2019-02-27 08:15:11 +00:00
duncanspumpkin
d01dfe44d5
Add RideSetSettingAction
...
Use game action for calling
Use correct error titles for operation mode changes
2019-02-27 08:15:07 +00:00
duncanspumpkin
d5ad6b7b0f
Move game command calls to a single call site
2019-02-26 12:47:44 +00:00
Nathaniel Ngo
300fd3a589
Fix for Issue#8725: refactoring _currentTrackBegin and _previousTrackPiece to use CoordsXYZ struct ( #8759 )
...
* Refactored _currentTrackBeginX, _currentTrackBeginY, _currentTrackBeginZ to use a CoordsXYZ struct
* Refactored _previousTracPieceX, _previousTrackPieceY, _previousTrackPieceZ to use a CoordsXYZ struct
* Refactored _currentTrackBegin and _previousTrackPiece in source files
* Fixed clang formatting
2019-02-24 09:15:31 +00:00
duncanspumpkin
1227bc09fc
Remove references to game command
2019-02-21 16:00:31 +00:00
duncanspumpkin
9b6fdd41aa
Remove redundant code. Rename to standard style
2019-02-19 15:20:55 +00:00
duncanspumpkin
8bf3689d42
Introduce flag to prevent ghosts in multiplayer
...
Fix error message arguments
Remove dead code. Fix clang format
2019-02-19 12:31:11 +00:00
duncanspumpkin
77b25714ff
Move callbacks into GameActionCallbacks
...
Remove remaining references to game command
2019-02-19 12:30:42 +00:00
Ted John
ba445cb6ef
Pass Ride* instead of ride_id_t
2019-02-13 20:16:42 +00:00
Ted John
fdf9f36fab
Pass Ride* instead of ride_id_t
2019-02-12 23:58:45 +00:00
Ted John
9e461b2e34
Pass Ride* instead of ride_id_t
2019-02-12 23:29:38 +00:00
Ted John
fd090f5ef3
Refactor PickRideToGoOn
2019-02-12 23:29:38 +00:00
Ted John
9706dd8675
Pass Ride* instead of ride_id_t
2019-02-12 23:29:37 +00:00
Ted John
aaacece0ea
Pass Ride* instead of ride_id_t
2019-02-12 23:29:37 +00:00
Michał Janiszewski
379fd42dc4
Fix types passed to ride_type_has_flag
2019-02-10 00:04:52 +01:00
Matt
d87ca57e72
Replace game command references with new game action.
2019-02-08 18:03:06 +01:00
duncanspumpkin
201db19d0a
Move Ride Set Appearance into action framework
2019-02-07 08:14:45 +00:00
Michał Janiszewski
8a395e3706
Fix misaligned access ( #8665 )
...
Platforms like ARM are very sensitive to unaligned access. This change
makes sure the addresses obey the C++ standard and are properly aligned.
2019-02-04 23:15:14 +01:00
Ted John
92412d4bab
Store ride index inside ride struct
2019-01-18 11:46:18 +01:00
Ted John
8701286772
Use new ride_id_t typedef ( #8561 )
2019-01-12 10:11:55 +00:00
Michael Steenbeek
31298bd772
Merge pull request #8543 from IntelOrca/refactor-ride
...
Refactor ride structure
2019-01-02 22:38:20 +01:00
Ted John
d979511628
Do code review suggestions
2019-01-02 19:46:13 +00:00
Ted John
38f632074b
Merge ride track colour arrays into one
2019-01-01 21:25:34 +00:00
Ted John
37f76d1687
Move station fields into new station struct
2019-01-01 02:26:14 +00:00
Ted John
8e6497fc1d
Merge vehicle_colours and vehicle_colours_extended
2018-12-31 19:25:07 +00:00
Matt
d3a20df682
Fix track designs ignoring ghost/preview flags.
2018-12-29 19:23:28 +01:00
Matt
727ba2d7d0
Fix #8333 : Replace assert with in-game error.
2018-12-23 22:28:59 +01:00
Michael Steenbeek
2530cd1ac3
Fix #8426 : Queue banner left behind after ride demolition
2018-12-22 15:34:17 +01:00
Ted John
06f203a7e7
Implement surfaces, edges and stations as objects
2018-12-09 23:30:40 +00:00
ζeh Matt
06c5508bab
Fix #8212 : Crash when opening rides with changed mode and no tracks. ( #8216 )
2018-11-12 20:13:42 +01:00
Felix Pelletier
0cd7f1e07c
Fix #8142 : Reliability of unbreakable rides can go below 100%
2018-11-02 09:04:27 +01:00
Michael Steenbeek
f8add7f62e
Rename rct_tile_element to TileElement
2018-11-01 13:53:50 +01:00
clang-format
b02dfdbc93
Binpack function arguments together
...
Previously when the arguments of a function wouldn't fit on a single line, clang-format would put each argument on its own line instead. By enabling the binpack parameter setting, it tried to fit as many on one line as possible instead.
Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
2018-07-23 16:00:22 +02:00
clang-format
95ce592579
Enforce not breaking before assignments and function names
...
Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
2018-07-23 16:00:19 +02:00
clang-format
e8310d079d
clang-format ride
2018-07-23 16:00:09 +02:00
Gymnasiast
5128737666
Rename some flags, move FLAG_16 to ride groups
2018-06-23 17:39:38 +02:00
spacek531
0861481cb6
First iteration
2018-06-23 16:24:01 +02:00
Michael Steenbeek
1b08fb4e69
Replace our own integer types with standard ones
2018-06-20 17:30:40 +02:00
Hielke Morsink
0cf256ac9e
Ready copyright notice for clang-format
...
Clang-format sees the text behind `#pragma region` as code and formats it. Instead of stating the copyright and date there, it's now in the comment block right below it. The text "Copyright" is left in the `#pragma region` line, as clang-format sees it as a single identifier.
I took the opportunity to normalize the dates, and add the copyright notice to the source files where it was missing them (except for third-party and the generated resources.h file).
2018-06-15 14:07:34 +02:00
Ted John
b4d3806614
Unblock tiles when vehicles are removed from ride
2018-06-10 22:59:58 +01:00
Hielke Morsink
2fed57d792
Check for ghost flag when removing track blocks ( #7596 )
2018-05-31 22:36:45 +02:00
jensj12
56fcd2ec94
Use ride_get_start_of_track in TrackDesignSave
2018-05-23 16:33:37 +02:00
jensj12
50e3f8b4f6
Cleanup of ride_demolish
2018-05-23 16:33:37 +02:00
jensj12
23dc6bb9d3
Add button to refurbish ride
...
Add a button to refurbish the selected ride. The cost for this is 35% of the
build price and may only be done if the ride is closed and empty.
2018-05-23 16:33:37 +02:00
Michael Steenbeek
fcf507e051
Spin off shop item stuff to separate files
2018-05-14 19:21:43 +02:00
Ted John
d7e93cec27
Prevent use of Context during ~Context
2018-05-13 00:43:56 +01:00
Michael Steenbeek
2d92ecf10b
Fix #7436 : Only the first 32 vehicles of a train can be painted
2018-04-26 10:33:54 +02:00
Hielke Morsink
bf4f68fe33
Use enum type that guarantee to support its values
...
By default enumerators use type `int` which can store values up to `1 << 31 - 1`. The clang compiler generates this error for enums values that use the sign bit: `enumerator value is not representable in the underlying type 'int'.`
To get rid of those warnings (and technically improve the code) the erroneous enums are now of type of `uint32`.
Note: I've skipped peep.h to prevent conflicts with the peep refactor branch.
2018-04-24 16:51:42 +02:00
Hielke Morsink
30063984e6
Delete unused function arguments or mark them so ( #7426 )
...
This aims to make future refactoring easier. The arguments are removed where possible, but kept and marked with C++17's [[maybe_unused]] where they could not be removed (e.g. when they are used as a callback, rather than called directly).
I've skipped the rides/<category>/* and peep/* source files, because the rides source files are mostly generated and have a ton of unused variables, and the peep source files are being refactored.
I've also skipped most of window/* source files, because most of the functions are used as callbacks and will be bulk-renamed at some point.
2018-04-20 13:56:37 +02:00
Michael Steenbeek
cfb5a6b39d
Correct spelling of 'sujonkwa'
2018-03-29 13:00:01 +02:00
Ted John
f700c661d8
Allow cars property to be a single object
2018-03-26 21:37:23 +02:00
Michael Steenbeek
695d3762e5
Remove last usages of SEPARATE_RIDE flag
2018-03-26 20:36:16 +02:00
Michael Steenbeek
1fa2fa8f80
Refactor ride->entrances and ride->exits
2018-03-07 19:10:50 +01:00
Michael Steenbeek
f4ac2b4d5b
Replace LocationXYZD16
2018-02-16 16:16:49 +01:00
Michael Steenbeek
bde913ee16
Rename SmallCoords and BigCoords
2018-02-15 22:26:50 +01:00
Michael Steenbeek
a2260929dd
Replace rct_xy_element with BigCoordsXYE
2018-02-15 22:26:50 +01:00
Hielke Morsink
55979a3fff
Remove and replace C typedefs
...
`typedef struct/union/enum name { ... } name_again;` is not needed whe compiling C++, moving the name at the back to be in front of the object and removing `typedef` makes it usable the very same way.
This also replaces typedefs with the using keyword. They have better readability, especially for function pointer types, and would allow more flexibility when used with templates.
2018-02-14 09:42:26 +01:00
jensj12
02474353e3
Reduce duplicate code
...
Fix two cases of duplicated code
2018-02-13 00:11:29 +01:00
Michael Steenbeek
acc6136847
Do not pack Ride struct
2018-02-08 15:33:43 +01:00
Michael Steenbeek
e2dd629aaf
Remove padding and offsets in Ride struct
2018-02-08 15:33:43 +01:00
Michael Steenbeek
34c8409251
Clean up ride struct and num_riders import, update changelog
2018-02-08 15:33:43 +01:00
Gymnasiast
02196a1919
Fix #3330 : Current number of passengers overflows
2018-02-08 15:33:43 +01:00
Gymnasiast
34a6b5ef92
Remove __cplusplus ifdefs
2018-02-05 16:20:15 +01:00
Gymnasiast
778ba466c5
Remove almost every extern C block
2018-02-05 16:20:15 +01:00
Ted John
aa0d7645da
Refactor ride_ratings.c to C++
2018-01-18 22:33:06 +00:00
Michał Janiszewski
19d35e6898
MSVC fixes pt 5
2018-01-11 09:30:09 +01:00
Michael Steenbeek
6a88d6e04d
Move and rename RCT{1,2,12}.h
2018-01-09 13:36:41 +01:00
Michael Steenbeek
91589f57c6
Compile map.c as C++
2018-01-03 20:40:51 +01:00
Gymnasiast
6e281e2061
Move music tune id list out of Ride.cpp for now
2017-12-31 20:43:17 +01:00
Gymnasiast
23d70a4ac9
Compile ride.c as C++
2017-12-31 20:43:17 +01:00