Commit Graph

794 Commits

Author SHA1 Message Date
spacek531 c49c6ca4a7
Rename animation vars 2021-08-21 19:23:27 +02:00
Michael Steenbeek e547dd96db
Make RideConstructionState a strong enum 2021-08-11 17:51:59 +02:00
Michael Steenbeek 8ecbabf8bf
Fix #14974: too many dodgems not handled correctly
Properly check if all vehicles have been created, and clean them up properly if not.
2021-08-02 22:02:06 +02:00
Ted John 5f853df1fd
Remove gS6Info 2021-08-02 20:38:02 +02:00
Gymnasiast 8af70cf402
Correctly import ride profits 2021-08-01 15:14:42 +02:00
ζeh Matt afc4cd7cba
Refactor ride construction code into a new unit 2021-07-27 17:21:03 +02:00
Michael Steenbeek 4f80ef50ef
Fix #15086: Crash in vehicle_create_trains() 2021-07-26 21:17:17 +02:00
Jamie Quigley 4f6d0a00fd
Refactor RIDE_STATUS to use strong enum (#14840)
* Refactor RIDE_STATUS to use strong enum

* Change platform-specific code to match RIDE_STATUS refactor

* Re-added check for valid RideStatus value

* Fixed errors in "g2" build target

* Use EnumValue instead of static_cast<uint8_t>

* Revert rct{1,2}.h to use uint8_t.

* Fix formatting

* Reverted from constexpr variable to additional enum variant

* Fix formatting
2021-06-10 07:09:58 +01:00
Adam dbd84f9f40
Fix #14415: Entrances/exits are removed when built on top of each other (#14490) 2021-05-23 15:41:34 +02:00
Michael Steenbeek 513398b1f6
Fix #14488: Crash when building too many rides 2021-05-13 19:23:53 +02:00
Basssiiie 5480c99e0b
Rename previously unknown vehicle flags, and json strings to camelCase 2021-05-13 13:34:32 +02:00
ZxBiohazardZx 36b2742c19
Change Vehicle Rotation namings in accordance with OpenRCT2 Codestyle (#14616)
* Code Refactor: Rename vehicle_sprite_type to Pitch 

In some of the issues the vehicle_sprite_type is used to check for properties in regards to the pitch of the vehicle.Similarly bank_rotation is used to provide information on the Roll property. This is not in alignment with the https://github.com/OpenRCT2/OpenRCT2/wiki/Coding-Style and makes it harder to refactor other elements of the codebase and makes for undesired nested logics.

This PR also includes the change from rename bank_rotation to Roll in alignment with the OpenRCT2 Coding Style


Related to PullRequest #11956

* Apply formatting

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2021-05-12 12:38:46 +01:00
Michael Steenbeek c9943ee11d
Merge pull request #14458 from Gymnasiast/backport-nsf
Backport ride limit refactors from new-save-format
2021-04-20 23:25:53 +02:00
Duncan 8eabdf8c8f
Split guest and staff peep variables (#14462)
* Split guest and staff peep variables

* Move variable location

* Increment network version

* Update replays
2021-04-18 17:48:21 +01:00
Gymnasiast d857dca36d
Replace hardcoded max number of trains per ride 2021-04-16 18:56:16 +02:00
Duncan a9e1f2e89c
Remove SpriteBase::flags (#14460)
* Remove SpriteBase::flags

* Increment network version

* update replays
2021-04-11 18:02:19 +01:00
Michael Steenbeek 7c73e271ad
Name num_sheltered_sections flags 2021-04-03 22:17:57 +02:00
Michael Steenbeek 7344b7fbfd
Use 16-bit ride_id_t thoughout and raise RIDE_ID_NULL (#14411)
* Replace RIDE_ENTRY_INDEX_NULL with OBJECT_ENTRY_INDEX_NULL

Ride entries are objects like any other, so there is little point having separate constants.

* Use ride_id_t in many more places

* Change RIDE_ID_NULL to 0xFFFF

* Increment network version

* Update replays

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2021-04-01 16:02:57 +01:00
Michael Steenbeek cbefc4fe38
Fix #14412: NPE in vehicle_create_car() 2021-04-01 11:26:14 +02:00
Duncan 0a47d2157a
Use more specific types where appropriate (#14388)
It takes marginally more time to get a Peep than a Guest/Staff so may as well go straight to the correct type
2021-03-25 08:44:25 +00:00
Duncan 6ec379cd0e
Split Entity Lists by Entity type (#14326)
* Make initial changes to add entity type

* Make further corrections

* Revert header changes

* Fix mistakes
2021-03-16 11:18:06 +00:00
Duncan 5474194905
Implement train view and remove linked_list_index (#13956)
* Make train manager view

* Remove linked list index field

* Remove merge mistake

* Fix further rebase errors

* Rename and add comments

* Update replays

* Fix Xcode project

* Increment network version

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
2021-03-15 08:13:00 +00:00
Michael Steenbeek 28c680f97f
Merge pull request #14163 from Gymnasiast/refactor/get-rtd
Use GetRideTypeDescriptor() in more places
2021-02-26 10:46:38 +01:00
Gymnasiast 48f513f73f
Apply review request; fix Testpaint 2021-02-26 10:19:03 +01:00
Gymnasiast 44d0e77afb
Make all access to RTD table use the bounds checking function 2021-02-26 10:01:00 +01:00
Gymnasiast 62f8796677
Replace more flag checking 2021-02-26 09:51:17 +01:00
Gymnasiast f118b2ede4
Replace ride_type_has_flag() with retrieving RTD 2021-02-26 09:49:09 +01:00
Gymnasiast b1ab20ec27
Replace loose flag checking with helper function 2021-02-25 23:04:40 +01:00
Michał Janiszewski 6baff43f52 Reduce inclusion of Sprite.h 2021-02-25 10:56:27 +01:00
Gymnasiast d63e3b1d9f
Replace RideTypeDescriptors[ride->type] with GetRideTypeDescriptor() 2021-02-24 14:10:30 +01:00
Gymnasiast 56399e7188
Use the RTD instead of ride_type_has_flag() 2021-02-24 14:10:30 +01:00
Gymnasiast 429f6fb845
Always return an RTD 2021-02-24 14:10:22 +01:00
ζeh Matt c9ca066e94
Merge pull request #14024 from ZehMatt/refactor/coords-peep-destination
Use CoordsXY for for some types
2021-02-21 15:33:52 +02:00
Duncan 2b26e423e4
Remove AsGuest and AsStaff duplicated functions 2021-02-21 13:23:31 +01:00
Matt 965041b437
Remove direct access to DirectionX and DirectionY 2021-02-21 09:52:33 +02:00
Ted John 762b6ee816 Refactor viewport interaction flags and add plugin API 2021-02-18 18:10:29 +00:00
Gymnasiast 1b964c0f2e
Refactor flat ride track pieces 2021-02-18 17:50:19 +01:00
Michael Steenbeek e3a1af3d05
Use getters/setters for track type and direction 2021-01-30 15:16:17 +01:00
spacek531 1e3fe9b550
Separate booster track elem type (#13857)
* add data to Track.cpp

add data to TrackData.cpp

add import helper functions

fix Booster value

import booster as 256

export booster as 100

add vehicle subposition data

add SV4 import

add TD4 import

add TD6 import

use track_type_t when importing TD6

add TD6 export

change peep tracktype type to auto

fix SV4 track element import

fix import of booster speed

add None enum to TrackElemType

move _legacy RideConstruction functions to Ride.cpp

change _currentPossibleRideConfigurations to use track_type_t

fix booster track category

add booster string tto

expand _currentTrackCurve to 32 bits

expand track_curve_chain to 32 bits

update get_track_element et al. to handle 16 bit track types

run clang-format

remove unused #includes from _legacy.cpp

Revert "remove unused #includes from _legacy.cpp"

This reverts commit 4c4d4b06edb0c130314789d8fe371246be246c9f.

Revert "update get_track_element et al. to handle 16 bit track types"

This reverts commit 73920dafd4a6c9e7c9f0c7ee1098d493f8f5d262.

Revert "move _legacy RideConstruction functions to Ride.cpp"

This reverts commit 2d83a75c1477d387ad77a7a5085f37a28f72a589.

update _legacy functions for 16-bit track types

update ride_construction_reset_current_piece behavior with new enum

fix declaration of _currentTrackCurve to match other track tcurve vars

remove unused include from T4Importer.cpp

move SCT to 256 part 1: RideConstruction.cpp

move SCT to 256 part 2: TrackData.cpp

move SCT to 256 part 3: Ride.h/Ride.cpp

move SCT to 256 Part 4: revert changes to S4Importer.cpp, T4Importer.cpp

fix stations appearing as curves

fix too many initializers in TrackData.cpp

move SCT to 256 part 5: S6/T6 importing and exporting

move SCT to 256 part 6: simplify RCT12.cpp functions

fix comments in S6Exporter.cpp, S6Importer.cpp

fix clang-format on S6Importer.cpp

add missing data to TrackData.cpp

revert new functions for checking if track type is a booster

revert unused include

change trackType to auto and add comment to S6Exporter.cpp

move track type aliasing from TrackDesign.cpp to T6Import.cpp, T6Export.cpp

add comment about sv6 vehicle.track_type

static cast to uint8_t in T6Exporter.cpp`

set type to auto when setting value to _currentTrackCurve

revert moving function in S6Importer.cpp

fix value names in RideData.cpp

revert cahnge to uint16_t return for GetTrackType() in RCT12.cpp

fix GetTrackType return type for real

add changelog entry

bump network version

cast alternate track type to track_type_t

static_cast tuple input value in _legacy.cpp

change _currentTrackCurve to uint32

use TrackElemType::Count to determine length of subposition array

perform some changes

remove padding from rct_trackdefinition

fix alternative type check

remove _boosterTrackSelected

add missing condition for booster speed

add comments for TrackElemType::MultiDimInvertedUp90ToFlatQuarterLoop

add missing comments to RideData.cpp

remove extra entry

simplify some things

fix formatting

remove redundant checks todo: fix building the track piece

use TrackElemType::None more

remove git.txt

* bump network version

* make conditional more explicit w/ parentheses

* move booster check to RCT12.cpp

* implement getters and setters for vehicle track type and direction

* fix formatting

* rename RCT12TrackTypeIsBooster to RCT2TrackTypeIsBooster

* add whitespace in RCT2.h

* change the thing I thought I changed

* move booster check function to RCT2.cpp

* move function into if condition

* fix scope issues with setters
2021-01-29 15:24:53 +00:00
ζeh Matt 109a06663d
Fix entrance or exit stacked on top considered a duplicate 2021-01-29 16:19:07 +01:00
Ted John a9755609c2 Move ride audio into own namespace 2021-01-27 18:45:28 +00:00
Ted John 2f39442d25 Implement ride music objects and refactor 2021-01-27 18:45:27 +00:00
Duncan 8c5cd61b69
Split free id's into seperate vector (#13924) 2021-01-26 07:42:56 +00:00
ζeh Matt 329b228cac
Fix #13916: use correct constant for maximum station locations 2021-01-23 23:06:05 +01:00
ζeh Matt 73275b311b
Fix #13903: ride exits not being recognized (#13906) 2021-01-22 22:08:54 +00:00
ζeh Matt bc20efb3df
Merge pull request #13822 from ZehMatt/refactor/fixedvector
Avoid some allocations by using a fixed size vector
2021-01-22 16:17:14 +02:00
Michael Steenbeek 20f959c833
Use track_type_t in more places 2021-01-22 11:33:55 +01:00
Duncan 354a131892
Use specific type for peep list access (#13831)
* Use specific type for peep list access

* Simplify calculation further
2021-01-19 17:57:22 +00:00
Duncan 4ff5b9a89f
Reset Entity to 0 on removal (#13835)
This is to force any use after remove bugs to the surface
2021-01-16 15:48:39 +00:00
Michael Steenbeek 32d8dadc2b
Replace some leftover use of uint8_t for ride subtype 2021-01-15 19:35:06 +01:00
Matt e9cdb559e3
Avoid some allocations by using a fixed size vector 2021-01-14 12:27:54 +02:00
Duncan d5ada2dca1
Remove type from SpriteBase (#13735)
* Move type field into sub structures

* Use type for misc_type

* Use type for l_type

* Rename to SubType

* Rename SpriteGeneric to MiscEntity

* Rename generic to misc

* Add extra nullptr checks for compilers that cant understand

* Make review changes

* Increment network version

* Update replays
2021-01-10 15:14:34 +00:00
Michael Steenbeek 1da6ae6b51
Merge pull request #13710 from skdltmxn/refactor/string_view
Refactor/string view
2021-01-10 13:37:01 +01:00
ζeh Matt acf71315b5
Cleanup variables usage and initialize them 2021-01-06 22:29:40 +01:00
skdltmxn c093a50f3f Refactor to use string_view more properly 2021-01-07 01:52:10 +09:00
Michael Steenbeek 406967c71f
Refactor object_entry_get_entry() to return Object 2021-01-03 23:01:52 +01:00
Dennis Devriendt 3073cca6aa
Close #13624: Refactor ViewportInteractionItem to use strong enum (#13657)
* Closes #13624: Refactor ViewportInteractionItem to use strong enum
2020-12-29 15:09:15 -03:00
Tulio Leao 8c9fa45a76 Use switch for Ride::UpdateAll 2020-12-23 20:15:39 -03:00
Tulio Leao 00483df2f2 Close #13625: Refactor TOOL_IDX to use strong enum 2020-12-23 20:07:54 -03:00
Tulio Leao 221aa8cece Close #12453: Refactor RCT2_EDITOR_STEP to strong enum 2020-12-23 20:07:53 -03:00
Michael Steenbeek abd7babc86
Get RTD from ride via a struct method, part 1 2020-12-12 22:53:50 +01:00
Adam f09b14ef2b
Split actions hpp files into separate h and cpp files (#13548)
* Split up SmallSceneryPlace/Remove

Added undo function for Remove Scenery

* Refactor: Balloon and Banner actions hpp=>h/cpp

* Refactor: rename all action *.hpp files to *.cpp

This is preparation for separation in later commits. Note that without
the complete set of commits in this branch, the code will not build.

* Refactor Clear, Climate, Custom, and Footpath actions hpp=>h/cpp

* VSCode: add src subdirectories to includePath

* Refactor Guest actions hpp=>h/cpp

* Refactor Land actions hpp=>h/cpp

* Refactor LargeScenery actions hpp=>h/cpp

* Refactor Load, Maze, Network actions hpp=>h/cpp

* Refactor Park actions hpp=>h/cpp

* Refactor/style: move private function declarations in actions *.h

Previous action .h files included private function declarations with
private member variables, before public function declarations. This
commit re-orders the header files to the following order:
- public member variables
- private member variables
- public functions
- private functions

* Refactor Pause action hpp=>h/cpp

* Refactor Peep, Place, Player actions hpp=>h/cpp

* Refactor Ride actions hpp=>h/cpp

* Refactor Scenario, Set*, Sign* actions hpp=>h/cpp

* Refactor SmallScenerySetColourAction hpp=>h/cpp

* Refactor Staff actions hpp=>h/cpp

* Refactor Surface, Tile, Track* actions hpp=>h/cpp

* Refactor Wall and Water actions hpp=>h/cpp

* Fix various includes and other compile errors

Update includes for tests.
Move static function declarations to .h files
Add explicit includes to various files that were previously implicit
(the required header was a nested include in an action hpp file, and the
action .h file does not include that header)
Move RideSetStatus string enum to the cpp file to avoid unused imports

* Xcode: modify project file for actions refactor

* Cleanup whitespace and end-of-file newlines

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2020-12-10 06:39:10 +00:00
Adam 1b61b4b104
Fix #13489: Mechanics continue heading to inspect broken down rides (#13490)
* Fix #13489: Mechanics continue heading to inspect broken down rides
2020-12-05 15:05:55 -03:00
Łukasz Pękalski 3de233c796
Close #12395: Refactor PeepItem to use strong enum (#13311)
* refactor: integrated PEEP_ITEM into SHOP_ITEM

* refactor: converted merged enum to flag

Only former occurrences of PEEP_ITEM

* cleanUp: code cleaned after merging

* refactor: converted ShopItem to strong enum

code reformatting

* refactor: ShopItem enum items renamed

code formatted

* refactor: new getter and setter functions for Item...Flags

* refactor: replaced all occurrences of ItemStandardFlags

with appropriate getter and setter functions.
COMPARE_FIELD macro needs to be commented out or the flag has to stay public.

* refactor: all occurrences of ItemExtraFlags replaced

with proper function calls. COMPARE_FIELD macro issue not resolved.

* refactor: introduced new variable for unified item flags

* refactor: adapted accessor functions

accessor functions were modified to accommodate both standard and extra ShopItem flags

* refactor: ItemExtraFlags accessor functions are replaced

with general functions

* refactor: reverted to original uint32_t flag variables

* refactor: implemented suggested changes

* refactor: integrate additional comments

* refactor: incorporated requested changes

* refactor: incorporated requested changes

added static_cast<PeepThoughtType> in lines 1572 and 1590
2020-12-03 21:15:59 -03:00
Florian Probst 923b5f990d
Close #12438: Refactor RIDE_COMPONENT_TYPE to use strong enum (#13456)
* Part of #12438  Changed RIDE_COMPONENT_TYPE to enum class

(1/3)

Changed the enum RIDE_COMPONENT_TYPE to be enum class in RideData.h.
Shortened the enumerators.
And fixed

I split the changes I did into 3 commits because the enum is used in a total of 85 different files where I just replace the single line where they occur.

The changes in those 85 files are analogous to my change in line 328 in RideData.h in this commit.

* Part of #12438  changed all RIDE_COMPONENT_TYPE enumerators appearances

(2/3)

Changed every appearance of the old RIDE_COMPONENT_TYPE enumerators to the changed enumerators from last commit.

* Part of #12438

(3/3)

Used EnumValue() wherever a field or variable of the type RideComponentType was used as an index.

Havent checked if anything from these 3 commits on this branch got codestyle issues

* Part of #12438

used clang-format

* Closes #12438  Added Accessor function for RideComponentName

Added Accessor function GetRideComponentName to RideData.
to replace the use RideComponentNames[EnumValue(RideComponentType type)]

* Close #12438 moving GetRideComponentName to RideData Headerfile

Moved GetRideComponentName to RideData Headerfile since thats where it should be.
2020-11-26 15:23:47 -03:00
ffrogman 1f0764be28
Fix #13427: Newly created Go-Karts show "Race won by <blank>" (#13457)
* Fix #13427. Show # of people for newly created Go-Karts

* Add changelog entry

* Reorder changelog entry
2020-11-26 18:04:35 +00:00
Łukasz Pękalski 832fd69822 refactor: changed ObjectType enum to strong enum
code does not compile yet
2020-11-11 16:07:01 +01:00
Łukasz Pękalski 6e5105ab3b refactor: ObjectType to use strong enum
enum renaming complete
2020-11-11 16:07:01 +01:00
Gymnasiast d58a8d1184
Change tile_element_get_ride_index() to method 2020-11-07 12:58:32 +01:00
Michael Steenbeek 92a5f1aa24
Merge pull request #13310 from ju-pinheiro/sprite-identifier-strong-enum
Close #12450: Refactor SPRITE_IDENTIFIER to use strong enum
2020-11-06 16:55:01 +01:00
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
ju-pinheiro bb16ca075b Close #12450: Refactor SPRITE_IDENTIFIER to use strong enum 2020-10-27 13:26:27 -03: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
Cory Sanin 394e8fb733
Resolve GCC warnings for Ride.cpp (#12553)
Eliminate warnings from ride_create_vehicles and ride_create_vehicles_find_first_block that would prevent build from succeeding when using GCC.
2020-08-02 00:28:47 +02:00
Duncan c6e26267a4
Reduce the use of GET_VEHICLE (#12494)
* Start removing GET_VEHICLE macro use

* Further work

* Remove further GET_VEHICLE's

* Further removal of GET_VEHICLE

* Remove the last of GET_VEHICLE

* Fix testpaint

* Fix nullptr deref

* Make review changes

Also swapped in helper functions and used a standard patern for iterating the train cars

* Further simplify loops for train cars
2020-07-31 07:48:27 +01:00
Tulio Leao 63f683853e
Merge pull request #12479 from pizza2004/news-enum
Refactor NewsItem to use strong enums
2020-07-28 18:21:45 -03:00
pizza2004 cee7f8d34c Close #12397: Refactor NEWS_ITEM_* to use strong enum 2020-07-28 12:54:18 -06:00
Duncan 8a378ad236
Remove uses of GET_PEEP macro and replace with GetEntity (#12467)
* Use TryGetEntity and GetEntity instead of macro

* Use GetEntity for ui guest window

* Remove final GET_PEEP macro uses

* Fix remaining issues
2020-07-26 17:42:02 +01:00
Michael Steenbeek ba10b84789
Fix #12478: Crash in track_block_get_next() 2020-07-26 17:16:27 +02:00
chaitanyathengdi 33a88fbdbd
Fix #10946: On-ride photo profit assumes every guest buys one (#12285)
* Use stored values of customers to adjust income from on-ride photos

Use stored values of photos sold and total customers to calculate ratio
and use that to predict income per hour for rides that include
on-ride-photo sections.

* Get rid of float

* Fix formatting

* Fix formatting - again

* Review changes

* Fix formatting

* Use new method of checking on-ride photo

* Use constants

* Add a changelog and contributors entry
2020-07-25 07:19:51 +01:00
Gymnasiast cf664c8340
Close #11971: Replace ride groups with new ride types 2020-07-17 00:19:49 +02:00
frutiemax 0fa0ca451e
Part of #12245: Use coords for window_scroll_to_location (#12282) 2020-07-15 23:26:27 -03:00
Tulio Leao 0758d0fe5c Prefer reference on ride_create_vehicles parameter 2020-07-11 12:21:46 -03:00
Tulio Leao de8bb169de Use CoordsXYZ on vehicle_create_trains 2020-07-11 12:21:44 -03:00
Tulio Leao 47db30f1d7 Use CoordsXYZ on vehicle_create_train 2020-07-11 12:21:09 -03:00
Tulio Leao 7921740938 Use CoordsXYZ on vehicle_create_car 2020-07-11 12:21:07 -03:00
frutiemax 123d0cceb6
Close #12173: Remove Formatter additions with void* (#12196) 2020-07-11 03:06:23 +02:00
Helio Santos 925d21eeda Part of #12159: update check_for_adjacent_station to use CoordsXYZ&
Update check_for_adjacent_station to use CoordsXYZ&. Updated caller(s) accordingly.
2020-07-10 11:00:00 -07:00
Helio Santos b0a4f2a97e Part of #12159: updated get_station_platform to use CoordsXYRangedZ
Updated get_station_platform function to use CoordsXYRangedZ. Updated caller(s) accordingly. Implemented constructor for CoordsXYRangedZ that takes a CoordsXYZ as argument.
2020-07-10 10:59:52 -07:00
Helio Santos fb9fab69a9 Part of #12159: Uses CoordXY on find_closest_mechanic
Updated find_closest_mechanic prototype to use CoordXY. Updated caller(s) accordingly.
2020-07-10 09:41:51 -07:00
Tulio Leao e5e70688c5
Use big Z coords on some Ride station functions (#12192) 2020-07-10 08:40:42 -03:00
Tulio Leao f29abf6953
Part of #11389: Use Formatter on Ride::FormatStatusTo (#12172) 2020-07-09 18:54:30 +02:00
duncanspumpkin 57d2877e67 Provide accesor function for get entity list count 2020-07-05 07:28:38 +01:00
duncanspumpkin e51bbeed23 Convert SPRITE_LIST to an enum class 2020-07-04 07:38:11 +01:00
frutiemax 14a07359b3
Part of #11389: Use formatter class for Ride::FormatNameTo (#12041) 2020-06-24 21:02:08 -03:00
frutiemax f86931d8a0
Close #12019: Use ScreenCoordsXY on gfx_draw_sprite_software 2020-06-22 23:52:54 +02:00
frutiemax 57b50e46df
Part of #11964: Move RideTypeEnumNames to RideTypeDescriptors 2020-06-19 23:03:24 +02:00
frutiemax 57b121d448
Part of 11964: move RideColourPresets to RideTypeDescriptors 2020-06-19 18:04:43 +02:00
Michael Steenbeek 2013e1a36f
Merge pull request #11974 from Gymnasiast/refactor/ride-type-misc
Refactor/ride type misc
2020-06-17 23:15:30 +02:00
Michael Steenbeek e2b187c24a
Merge pull request #11921 from duncanspumpkin/CreateSprite6
Entity List Iterator
2020-06-17 21:28:36 +02:00
Gymnasiast 2a9c2be7d0
Remove unused function 2020-06-17 19:11:02 +02:00
frutiemax de1c172c74
Move RideProperties and rideBonusValue to RideTypeDescriptors
Part of #11964.
2020-06-17 18:59:04 +02:00
Gymnasiast 96678a14eb
Move ride naming to RTD
This also means that all unused ride types will now have the same name. I have made an exception for the 'arbitrary ride type change' dropdown only.
2020-06-16 22:52:48 +02:00
duncanspumpkin 6ed17b4ff9 Remove FOR_ALL_PEEPS/GUESTS/STAFF macros
Replaced with an EntityList iterator

Fix formatting

Fix nullptr issues
2020-06-16 20:27:44 +01:00
duncanspumpkin 904e6c6987 Implement GetSprite and use it in a number of places
This will eventually replace all of the get_sprite and try_get_sprite calls

Further use of GetSprite

Use GetSprite in all remaining easy to use functions

Correct formatting

Rename GetSprite to GetEntity

Make suggested changes

Remove const to allow for building

Fix crashes due to next sprite
2020-06-16 20:21:56 +01:00
Gymnasiast 9cf12e763d
Move RideHeights and max mass to RTDs 2020-06-16 20:57:55 +02:00
Gymnasiast 140f2d6922
Rename rct_ride_data_5 and its fields to RideHeights 2020-06-16 20:17:07 +02:00
Gymnasiast 2eccef5979
Split max_mass from rct_ride_data_5 2020-06-16 20:00:25 +02:00
Tulio Leao e54a3d89f2
Rename some Peep member variables to use TitleCase (#11931)
* Rename Peep::destination_tolerance to use TitleCase

* Rename Peep::destination_y to use TitleCase

* Rename Peep::destination_x to use TitleCase

* Rename Peep::trousers_colour to use Title Case

* Rename Peep::tshirt_colour to use TitleCase

* Rename Peep::no_of_rides to use Title Case

* Rename Peep::staff_type to use TitleCase

* Rename Peep::type to use TitleCase

* Rename Peep::sprite_type to use TitleCase

* Rename Peep::sub_state to use TitleCase

* Rename Peep::state to use TitleCase

* Rename Peep::outside_of_park to use TitleCase

* Rename Peep::next_flags to use TitleCase

* Rename Peep::name to use TitleCase

* Rename Peep::NoOfRides to GuestNoOfRides

* Rename Peep::Type to AssignedPeepType

* Rename Peep::GuestNoOfRides to GuestNumRides
2020-06-14 06:31:08 +01:00
hdpoliveira 55bb2eaec9
Change all invalidate_sprite_2(Vehicle*) to Vehicle->Invalidate() (#11935) 2020-06-11 20:42:11 +01:00
Tulio Leao 92fbb9fc04 Rename Peep::happiness to Happiness 2020-06-08 23:30:27 -03:00
Tulio Leao 1b7223462f Rename Peep::happiness_target to use TitleCase 2020-06-08 23:27:47 -03:00
Tulio Leao f732c2f1cd Rename Peep::window_invalidate_flags to use TitleCase 2020-06-08 22:25:54 -03:00
Tulio Leao ccd76f8fc4 Rename Peep::current_ride to CurrentRide 2020-06-08 17:36:35 -03:00
Tulio Leao c302b16386 Rename Peep::current_ride_station to use TitleCase 2020-06-08 17:36:34 -03:00
Michael Steenbeek a0c6752ff3
Merge pull request #11882 from tupaschoal/prevent-shadow-peep-4
Rename some Peep member variables to use TitleCase
2020-06-07 23:35:23 +02:00
Michael Steenbeek 7646f1b7e4
Merge pull request #11896 from hdpoliveira/update_flags
Update flags
2020-06-07 23:03:48 +02:00
hdpoliveira 5b1469b8b7
Create Vehicle::GetTrackType() (#11895) 2020-06-07 21:43:32 +01:00
hdpoliveira 7bef44b020 Create Vehicle::SetUpdateFlag 2020-06-07 17:16:13 -03:00
hdpoliveira 480d1a6d6b Create Vehicle::ClearUpdateFlag 2020-06-07 17:16:12 -03:00
Tulio Leao 95624c748e Prefix Peep::NextInQueue with Guest 2020-06-07 10:46:18 -03:00
Tulio Leao d195c9fb1d Rename Peep::next_in_queue to NextInQueue 2020-06-06 11:53:51 -03:00
duncanspumpkin 5c48e5f0bb Remove AsPeep 2020-06-06 11:36:48 +01:00
duncanspumpkin 517ed57593 Remove IsPeep 2020-06-06 11:36:48 +01:00
Michael Steenbeek f21ddb0723
Refactor checks for station pieces (#11876) 2020-06-05 17:55:15 -03:00
Tulio Leao 9fbaf61e07
Rename Peep::staff_orders to StaffOrders 2020-06-04 19:16:12 +02:00
hdpoliveira 86550dad20 Rename swing-related variables in Vehicle 2020-05-31 16:37:09 -03:00
hdpoliveira c5e0489a48 #9473: Create Vehicle::CableLiftUpdateTrackMotion 2020-05-30 20:23:02 -03:00
Ted John bfa96d6205 Fix price in ScRide 2020-05-23 15:28:03 +01:00
Ted John f6fbd272ec Add built_date to ScRide and add GetAge() 2020-05-23 15:28:03 +01:00
Tulio Leao 3b632fcf95 Rename Peep::favourite_ride to FavouriteRide 2020-05-13 23:06:40 -03:00
Michael Steenbeek 620fb5e5c4
Migrate many set_format_arg calls to Formatter (#11744) 2020-05-13 21:29:39 -03:00
Michael Steenbeek 32609791de
Merge pull request #11719 from Gymnasiast/random-cleanup
Convert sprite_move to method
2020-05-13 11:52:18 +02:00
Michael Steenbeek 511a300251
Some cleanup in Vehicle.cpp (#11742) 2020-05-13 11:51:38 +02:00
Gymnasiast b5b563c2a8
Apply review requests 2020-05-13 10:53:30 +02:00
Gymnasiast 11472f909d
Convert sprite_move to method 2020-05-13 10:47:32 +02:00
Gymnasiast 15b5d97795
Refactor shop items 2020-05-11 19:16:23 +02:00
Michael Steenbeek d10f9ebf2a
Use named flags in calls to sub_6C683D() (#11650) 2020-05-05 23:11:38 -03:00
Fred-1044276 b03fbc086d
Fix #11450: Can't open rides, even with "Enable all track pieces" 2020-05-05 11:16:24 +02:00
Gymnasiast f88e1c03a0
Fix #11624: Crash when testing ride with a ghost end-of-station 2020-05-04 17:46:12 +02:00
Gymnasiast 50c750e176
Clean up GetOriginElement() 2020-05-04 17:10:57 +02:00
Tulio Leao a808ded45a Favour usage of CoordsXY objects instead of individual variables 2020-05-02 11:07:18 -03:00
Tulio Leao 1872152df9 Make window_ride_construction_update_state() use CoordsXYZ* 2020-05-02 11:07:18 -03:00
Tulio Leao 02a5c10a58 Make place_provisional_track_piece() use CoordsXYZ 2020-05-02 11:07:18 -03:00
Tulio Leao 28b3ac1693 Make track_block_get_previous() use CoordsXYE 2020-05-02 11:07:18 -03:00
Tulio Leao d58f3ec0b6 Make track_block_get_previous_from_zero() use CoordsXYZ 2020-05-02 11:07:17 -03:00
Tulio Leao 6203a5a20d Make track_block_get_next_from_zero() use CoordsXYZ 2020-05-02 11:07:15 -03:00
hdpoliveira 4649b573f4 Part of #9473: Create Vehicle::GetGForces
Converted from vehicle_get_g_forces
2020-05-01 19:49:03 -03:00
Tulio Leao 4589560a15 Make sub_6C683D() use CoordsXYZ on parameter and return 2020-05-01 18:06:26 -03:00
Michael Steenbeek fc860e8b6e
Merge pull request #11521 from Gymnasiast/refactor/oein3
Make ResearchItem use ObjectEntryIndex
2020-05-01 13:28:21 +02:00
hdpoliveira 4389670939 Improve names in UpdateDodgemsCollision 2020-04-30 20:53:18 -03:00
hdpoliveira 90cd90e738 Part of #9473: Create Vehicle::Entry
Converted from vehicle_get_vehicle_entry
2020-04-30 20:53:15 -03:00
hdpoliveira c88695a29c Part of #9473: Create Vehicle::UpdateDodgemsCollision
Converted from vehicle_update_dodgems_collision
2020-04-30 20:53:15 -03:00
Gymnasiast 6cdee9db93
Fix #7006: Use RTDs for determining ride category 2020-04-30 12:59:18 +02:00
duncanspumpkin 63549dee57 Ensure move_sprite_to_list only used in sprite.cpp
After an entity is created it should never need to call this function. This will be important in later changes when the lists are changed to vectors
2020-04-28 07:27:05 +01:00
duncanspumpkin 5b07a76f05 Use sprite_identifier when identifying entitys
The linked list index is only meant to be used for accessing the linked lists. Using the wrong variable is unlikely to cause issues for this exact case but it makes things cleaner.
2020-04-27 18:47:51 +01:00
Michael Steenbeek bcabc1d807
Merge pull request #11457 from Gymnasiast/refactor/rtd-forever
More RTD + cleanup
2020-04-27 15:11:54 +02:00
Fred-1044276 a3e7f0958c
Allow Air Powered Vertical Coaster without complete circuit
This changes the Air Powered Vertical Coaster so that it can be tested and opened without the need for a complete circuit (mirroring RCT1 and RCT3 behaviour). There appears to be no technical reason for RCT2's requirement for having a complete circuit.
2020-04-26 11:25:08 +02:00
Gymnasiast 100236c2d2
Move available ride modes to RTD; ride mode cleanup 2020-04-26 11:07:19 +02:00
Gymnasiast 2e3a4d41ce
Clean up some ride construction variables 2020-04-26 11:07:19 +02:00
Michael Steenbeek b89130e0f3
Use ObjectEntryIndex in more places (#11440) 2020-04-25 00:10:47 +02:00
Michael Steenbeek 44f62a97c2
Move PhotoItem to RTD (#11415) 2020-04-24 04:47:40 +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
Breno Rodrigues Guimarães 2479256bc1
Adjust Formatter function names according to coding style (#11378) 2020-04-20 18:55:15 -03:00
Michael Steenbeek e1e58423fc
Replace RideTypeHasRideGroups with flag (#11375) 2020-04-20 21:50:35 +02:00
ifimfree fb6dd4bfad
Create constants for a few flags 2020-04-20 10:39:26 +02:00
Breno Rodrigues Guimarães d4a2a98e20
Replacing set_format_arg_on macro in favor of a more C++zy solution (#11350) 2020-04-20 07:10:33 +02:00
Gymnasiast 99d270388b
Move ride start piece to RTD 2020-04-19 18:05:57 +02:00
Michael Steenbeek 957294568f
Use constants in ride_entry_get_supported_track_pieces() (#11337) 2020-04-19 13:33:01 +02:00
hdpoliveira fd111403f1 Part of #9473: vehicle_update_track_motion to Vehicle::UpdateTrackMotion 2020-04-18 14:41:47 -03:00
Michael Steenbeek 3bf316ee8c
Merge pull request #11336 from Gymnasiast/refactor/available-breakdowns-to-rtd
Move available breakdowns, category and independent listing flag to RTD
2020-04-18 18:31:39 +02:00
Eyal Minsky-Fenick 2ef77414d5
Ensure ride->inspection_station is set in ride_prepare_breakdown (#10245) 2020-04-18 15:30:25 +02:00
Gymnasiast 5d3bf2be20
Move category to RTD; move RideTypeIsIndependent to a flag 2020-04-18 15:22:41 +02:00
Gymnasiast c41fb64535
Move available breakdowns to RTD 2020-04-18 15:22:41 +02:00
Michael Steenbeek b4a763c751
Move naming convention to RTD (#11319) 2020-04-18 12:12:07 +02:00
Gymnasiast a295f3c003 Fix #11315: Never opened ride shown as favourite ride of 74 guests 2020-04-18 07:39:24 +01:00
Tulio Leao b449e445f7
Use named casts on openrct2/ride (#11163)
Excluding subfolders
2020-04-17 19:53:33 +02:00
Michael Steenbeek 777201c7fd
Return false for non-existing ride types
Co-Authored-By: Tulio Leao <tupaschoal@gmail.com>
2020-04-17 17:05:16 +02:00
Gymnasiast edd31d9f16
Move flags to RideTypeDescriptors 2020-04-17 17:03:33 +02:00
duncanspumpkin b857792f23 Fix vehicles changing state on export/import 2020-04-07 20:07:37 +01:00
Michał Janiszewski 94f6d70ac7 Fix #11084: null broken vehicle (#11090) 2020-04-06 22:32:27 +02:00
Michał Janiszewski 63c11ab8fd Fix #11128: null tile element in track_block_get_previous (#11144) 2020-04-06 22:32:27 +02:00
Michał Janiszewski 27da48336a Revert "Fix #11084: null broken vehicle (#11090)"
This is being reverted now that we have replay records uploaded as part
of the backtrace.io information to try figuring out the root cause.

This reverts commit 24edada2d8.
2020-04-03 09:53:36 +02:00
Michał Janiszewski 620be75285 Revert "Fix #11128: null tile element in track_block_get_previous (#11144)"
This is being reverted now that we have replay records uploaded as part
of the backtrace.io information to try figuring out the root cause.

This reverts commit d1faa228c5.
2020-04-03 09:49:58 +02:00
Michał Janiszewski d1faa228c5
Fix #11128: null tile element in track_block_get_previous (#11144) 2020-03-29 22:01:13 +01:00
Duncan f64ea65d03
Rename SPRITE_LIST_TRAIN_HEAD to reduce car head confusion (#11105)
A single car on a coaster can comprise of multiple vehicles. One of those vehicles will be the car head vehicle. The train can comprise of multiple cars. Therefore not all vehicle->IsHead 's will be in SPRITE_LIST_TRAIN_HEAD. This rename makes that slightly more clear
2020-03-29 09:23:24 +01:00
Tulio Leao fc645180be
Ammend #11090 for consistency on nullptr check (#11104) 2020-03-28 11:39:59 +00:00
Michał Janiszewski 24edada2d8
Fix #11084: null broken vehicle (#11090) 2020-03-28 10:21:24 +00: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
Aaron van Geffen 302fe1cb2b
Merge pull request #10926 from IntelOrca/zoom-refactor
Zoom refactor
2020-03-24 23:28:32 +01:00
Michael Steenbeek e66a6754f5
Remove some hardcoded numbers (#11004) 2020-03-23 19:12:57 +01:00
Ted John d34dec9c27 Create ZoomLevel struct to add two new zoom levels 2020-03-23 15:54:03 +00:00
Gymnasiast 2f7a26e8da
Refactor station index a bit 2020-03-21 17:05:16 +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 b73098ba21
Fix #10902: Resetting ride let guest out in the air (#10968) 2020-03-18 22:22:25 +01:00
Michael Steenbeek fd91c41a76
Name remaining ride type flags (#10947) 2020-03-16 22:52:06 +01:00
X123M3-256 7219c880e2
Allow opening rides with unsuitable track when "Enable all drawable track pieces" cheat is on. (#10923)
Co-authored-by: Edward Calver <hx010973@reading.ac.uk>
2020-03-15 14:11:04 +01:00
Gymnasiast bdf681f440
Clean up many other coordinates 2020-03-13 12:03:43 +01:00
Gymnasiast 9fd2b883a8
Apply review request 2020-03-12 15:27:58 +01:00
Gymnasiast 02c135e4fa
Clean up many staff functions 2020-03-07 23:07:47 +01:00