1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-20 21:43:06 +01:00
Commit Graph

523 Commits

Author SHA1 Message Date
Michael Steenbeek
eea57f2bfe Create calls for min/max cars per train 2020-11-05 17:42:02 +01:00
Manuel Vögele
ef51cfb29c Refactor loc_6DDF9C (#13369)
* Move ride_create_vehicles into Ride

* Refactor loc_6DDF9C
2020-11-04 15:58:24 +00:00
Manuel Vögele
96ff1894ee Remove unnecessary parameter from Ride::Open (#13368)
Ride::Open is only ever called with RIDE_STATUS_OPEN,
so the parameter is redundant.
2020-11-04 11:24:32 +00:00
Manuel Vögele
b40ea0169d Rename sub_6B5952 to ChainQueues (#13357)
Also remove unreachable call to it
2020-11-03 22:43:26 -03:00
Manuel Vögele
47419b8ba1 Rename vehicle_unset_update_flag_b1 and move it into Vehicle 2020-11-03 21:36:26 +01:00
Manuel Vögele
6517757df7 Rename VEHICLE_UPDATE_FLAG_1 2020-11-03 20:08:10 +01:00
Manuel Vögele
1b55914c96 Rename ride_set_block_points to RideOpenBlockBrakes (#13360) 2020-11-03 17:24:54 +00:00
Manuel Vögele
15dc5e004e Rename VEHICLE_UPDATE_MOTION_TRACK_FLAG_10 (#13362) 2020-11-03 17:24:18 +00:00
Michael Steenbeek
1aff58b23e Use TrackElement in vehicle_create_trains() and friends (#13338) 2020-11-02 23:56:12 -03:00
Manuel Vögele
fac1b1f81e Refactor loc_6B51C0 2020-11-02 23:05:47 +01:00
Manuel Vögele
d0e5a5ab6e Move ride_open and ride_test into Ride 2020-10-28 18:13:37 +01:00
Manuel Vögele
eaa340dd92 Rename ride_is_valid_for_test/open and update return type 2020-10-28 15:31:24 +01:00
Manuel Vögele
d927fefb86 Fix #13019: Stop simulating when ghost train crashes in block mode 2020-10-26 21:37:51 +01:00
Simon J
a017d3fa57 Fix #13215: lingering arrows after ride construction (#13245)
Co-authored-by: Simon Jarrett <mwnciau@users.noreply.github.com>
2020-10-21 23:45:53 -03:00
Simon Jarrett
65a8c58af7 Fix missing direction arrow for stations 2020-10-15 19:44:36 +01:00
Simon Jarrett
25ce8b3f6e Fix #7443: Construction arrows pulse at irregular intervals. 2020-10-15 19:44:10 +01:00
ζeh Matt
645289f4ec Rename GameActionResult and use GameActions namespace instead (#13184) 2020-10-14 22:04:39 -03:00
Duncan
84c9ff833a Move formatter to separate file. Rework GetMeasurement (#13131)
* Move formatter to seperate file. Rework GetMeasurement

* Add Formatter source files to Xcode project

Co-authored-by: Aaron van Geffen <aaron@aaronweb.net>
2020-10-09 08:02:07 -03:00
Duncan
4fb4feb83c Fix missing error message on ride graph (#13129)
* Fix missing error message on ride graph

Mistake made during implementation meant that the ride graph would not show the error message when the ride had not left the station. Another mistake meant that the tertiary colour of the ride window was not set to green. The tertiary colour was only used by this error message though so was not noticed.
2020-10-08 15:22:23 -03:00
Tulio Leao
db728d61a7 Fix signed/unsigned mismatch 2020-10-06 21:32:59 -03:00
Matt
7045fd9e9f Minor cleanup 2020-10-07 01:10:53 +03:00
Matt
091145037e Move the audio code into OpenRCT2 namespace 2020-10-07 00:34:42 +03:00
Simon J
7f963c4901 Fix entrance and exit ghosts not being removed for mazes (#13074)
* Fix entrance and exit ghosts not being removed for mazes

Co-authored-by: Simon Jarrett <simonjjarrett@gmail.com>
Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-10-03 09:33:28 -03:00
Tulio Leao
29955f28e0 Merge pull request #12976 from mwnciau/Refactor-TRACK_ELEM-enum
Refactor TRACK_ELEM_* enum
2020-10-01 22:05:44 -03:00
Simon Jarrett
52209af94d Rename TRACK_ELEM_* enums to TrackElemType::*
- Replace enum in Track.h with namespace and constexpr
- Find and replace all instances of TRACK_ELEM_* enums
2020-10-01 19:57:52 +01:00
Sam J Gunner
55b4c4c6f1 Fix #13046: Simplify block sectioned comparisons (#13049) 2020-10-01 09:06:28 -03:00
rpstester
3508bdc37d Close #12390: Refactor PeepRideSubState to enum class
Also made a RideSubState as a union with SubState and SittingSubState
Updated all values across all files, and the corresponding assert.
2020-09-30 23:33:58 +02:00
Duncan
3c8adb1fc1 Remove gMapTooltip format args global (#12971)
Fix mistake
2020-09-28 21:45:28 -03:00
Łukasz Pękalski
d1cd2e08b5 Close #12388, refactor PeepState to use strong enum (#12927)
* Close #12388, refactor:PeepState to use strong enum

* refactor: refactored file PlayTests.cpp

* refactor: change PEEP_STATE_ to PeepState:: and camel case after merging

chore: code reformatting
2020-09-28 15:51:49 -03:00
Łukasz Pękalski
065da23b3b Close #12437, refactor: RIDE_MODE_* to strong enums (#12833)
* partial refactor: RIDE_MODE_* to strong enums

* Close #12437, refactor: RIDE_MODE_* to strong enums

* chore: code formatting

* refactor: RideMode, change enum names to CamelCase

and resolve casting order.

* chore: refactor due to code formatting

* Close #12437, refactor: RIDE_MODE_* to strong enums

Resolved comments

* chore: Formatting correction.

* Use EnumsToFlags constexpr

* refactor: resolved comments

added newline at the end of file

* refactor: Change case stack to default in Switch

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2020-09-28 14:09:59 +01:00
Richard Fine
a1222fa4ca Staff code cleanup (#12907)
* Make UpdateFixing*() methods use const where possible

To make it clearer which steps actually modify the ride being fixed and which do not, pass const Ride* instead of Ride* where possible.

* Extract maximum litter search distance to a constant

* Make peep_update_*() methods return bool

* Use Direction type and helpers where applicable

* Const correctness and other cleanup

Make many functions take a const Peep* / const Staff* to clarify that they do not modify the peep being passed in. Also use the Direction type for some return values, and simplify staff_is_location_on_patrol_edge.

* Use clearer expression of constant value

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>

* Convert staff functions to members

* Remove AsStaff const overload

* Use As<Staff>() instead of static_cast

* Simplify direction selection code

* Clean up use of magic constants

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
2020-09-27 21:07:09 -03:00
Matt
b3b9a348c5 Apply review suggestions 2020-09-17 22:16:05 +03:00
Matt
38e03ae45d Use the Formatter for News items 2020-09-17 22:14:36 +03:00
Matt
ccde06ab0f Explicitly pass formatter arguments to ShowError and family 2020-09-17 22:14:36 +03:00
Matt
2639349925 Move storage into Formatter class and refactor usage 2020-09-17 22:14:36 +03:00
Michael Steenbeek
8b19d943a4 Merge pull request #12676 from mwnciau/Ride-Helix-Save
Fix #7037: saving rides starting with sloped turn
2020-08-26 12:13:59 +02:00
Tulio Leao
efdb7e1a2d Change gDateMonthsElapsed type to int32_t 2020-08-25 19:06:38 -03:00
Tulio Leao
10aca0fe6e Fix #12764: Rides don't start aged anymore 2020-08-25 08:21:34 -03:00
Simon Jarrett
31a1d5259c Fix #7037: Unable to save tracks starting with a sloped turn or helix 2020-08-19 00:08:14 +01:00
ryan-bello
cc2bb33892 changed enum STAFF_TYPE to strong enum StaffType, moved it to Peep.h 2020-08-17 22:59:02 -04:00
ryan-bello
54a33cbde8 renamed StaffType to AssignedStaffType 2020-08-17 20:16:09 -04:00
Gymnasiast
89f04c4fb3 Fix names of two track type functions 2020-08-10 23:48:18 +02:00
Arran Ireland
4de58e1fd4 Close #12440: Refactor VEHICLE_STATUS to use strong enum (#12606)
* Close #12440: Refactor VEHICLE_STATUS to use strong enum

* Fix code formatting for VEHICLE_STATUS refactoring

* Refactor VehicleStatus enum to be inside Vehicle

This commit moves VehicleStatus inside Vehicle,
renamed as Status.
2020-08-09 06:24:25 +01:00
Arran Ireland
1702c90c8e Merge pull request #12605 from ion232/refactor-vehicle-type
closes #12439: Refactor VEHICLE_TYPE to use strong enum
2020-08-08 18:41:04 +01:00
Łukasz Pękalski
399e0abe2e Close #12497: Remove extra SPRITE_INDEX_NULL checks (#12601) 2020-08-08 09:12:52 -03:00
pizza2004
156be224f9 Close #12399: Refactor MIXER_GROUP to strong enum (#12531) 2020-08-03 20:51:12 -03:00
pizza2004
d217dfa9b9 Refactor NewsItem into namespace and Pascal Case (#12511) 2020-08-02 23:14:00 -03:00
Duncan
733bc5a981 Close #12518: Viewport Refactor (#12541)
* Remove viewport pointer from get_map_coordinates_from_pos

* Removed viewport from get_window

* Return a InteractionInfo from get_map_coord...

* Remove viewport_interaction_info struct

* Add Entity union to simplify code

* Name the enum used for viewport interaction

* Simplify functions further by returning the info struct

* Add default switches
2020-08-02 08:32:59 +01:00
Łukasz Pękalski
0f78d452a4 Part of #12497: Remove extra SPRITE_INDEX_NULL check (#12538)
* refactor: deleted double check of SPRITE_INDEX_NULL in Staff* ride_get_mechanic(Ride* ride)

* refactor: deleted double check of SPRITE_INDEX_NULL in Ride.cpp file

* refactor: deleted double check of SPRITE_INDEX_NULL in windows/Ride.cpp in function static rct_string_id window_ride_get_status_vehicle

* refactor: deleted double check of SPRITE_INDEX_NULL in ride/Ride.cpp

* refactor: deleted double check in FormatStatusTo
2020-08-02 08:28:11 +01:00
Sidney
97d74e142e Close #12441: Refactor VEHICLE_TRACK_SUBPOSITION to use strong enum (#12550) 2020-08-02 07:50:07 +01:00