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