1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-28 17:24:47 +01:00
Commit Graph

86 Commits

Author SHA1 Message Date
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
Manuel Vögele
6517757df7 Rename VEHICLE_UPDATE_FLAG_1 2020-11-03 20:08:10 +01:00
ju-pinheiro
bb16ca075b Close #12450: Refactor SPRITE_IDENTIFIER to use strong enum 2020-10-27 13:26:27 -03:00
Matt
091145037e Move the audio code into OpenRCT2 namespace 2020-10-07 00:34:42 +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
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
Sidney
97d74e142e Close #12441: Refactor VEHICLE_TRACK_SUBPOSITION to use strong enum (#12550) 2020-08-02 07:50:07 +01: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
Aaron van Geffen
7b5087f057 Update copyright year to 2020 2020-07-21 15:04:34 +02:00
duncanspumpkin
64ab101b4e Fix formatting and comment 2020-07-04 07:38:11 +01:00
duncanspumpkin
e51bbeed23 Convert SPRITE_LIST to an enum class 2020-07-04 07:38:11 +01:00
Tulio Leao
3ba505e5bd Merge pull request #11956 from hdpoliveira/loc_6DB38B
Simplify code related to V-angle and bank
2020-07-03 15:16:08 -03:00
Hudson Oliveira
ef5f117373 Part of #9473: Create Vehicle::GetRide (#12002)
* Part of #9473: Create Vehicle::GetRide

* Redefine Vehicle::GetRide in Compat.cpp
2020-06-21 08:38:53 +01:00
hdpoliveira
c35556d754 Use CamelCase on track functions 2020-06-19 17:35:21 -03:00
hdpoliveira
0bdbcbcd88 Part of #9473: Create Vehicle::GetTrackProgress 2020-06-19 15:02:35 -03:00
hdpoliveira
f33f3c07bd Part of #9473: Create Vehicle::GetMoveInfo 2020-06-19 15:02:35 -03:00
hdpoliveira
93b2872747 Rename v-angle to pitch and bank to roll 2020-06-19 12:23:16 -03:00
hdpoliveira
23cf4b580e Remove global _vehicleVAngleAndBank 2020-06-19 11:17:46 -03:00
hdpoliveira
affa0dd30b Create struct VAngleAndBank and simplify code 2020-06-19 11:16:52 -03:00
Michael Steenbeek
97b99122de Merge pull request #11962 from Gymnasiast/refactor/rtd-rtd-rtd
Move RideNaming, RideHeights and max mass to RTDs
2020-06-17 13:06:26 +02:00
Michael Steenbeek
ba5e730c06 Rename UpdateFlag to HasUpdateFlag; refactor to bool (#11966) 2020-06-17 00:05:37 -03: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
hdpoliveira
55bb2eaec9 Change all invalidate_sprite_2(Vehicle*) to Vehicle->Invalidate() (#11935) 2020-06-11 20:42:11 +01:00
hdpoliveira
5b1469b8b7 Create Vehicle::GetTrackType() (#11895) 2020-06-07 21:43:32 +01:00
hdpoliveira
a1be45d0b7 #9473: Create Vehicle::UpdateFlag (#11850) 2020-06-01 08:35:30 -03:00
hdpoliveira
86550dad20 Rename swing-related variables in Vehicle 2020-05-31 16:37:09 -03:00
hdpoliveira
60b54bdd04 #9473: Create CableLiftUpdateTrackMotion functions 2020-05-30 20:23:02 -03:00
hdpoliveira
c5e0489a48 #9473: Create Vehicle::CableLiftUpdateTrackMotion 2020-05-30 20:23:02 -03:00
Gymnasiast
11472f909d Convert sprite_move to method 2020-05-13 10:47:32 +02:00
Tulio Leao
28b3ac1693 Make track_block_get_previous() use CoordsXYE 2020-05-02 11:07:18 -03:00
hdpoliveira
d69cc1c877 Part of #9473: Create Vehicle::TrainHead and Vehicle::TrainTail
Converted from vehicle_get_head and vehicle_get_tail
2020-04-30 20:53:17 -03: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
Mustapha Elghoul
38630eeb59 Update dist_x and dist_y to camelCase. (1 >> 1) to VEHICLE_UPDATE_MOTION_TRACK_FLAG_1, and (1 >> 0) to VEHICLE_UPDATE_MOTION_TRACK_FLAG_VEHICLE_AT_STATION 2020-04-21 16:51:00 -04:00
Mustapha Elghoul
e627b1680c Part of #9473: Create 5 Vehicle::CableLiftUpdate... from cable_lift_update_... 2020-04-20 22:12:42 -04:00
hdpoliveira
857db2925c Part of #9473: Convert cable_lift_update to Vehicle private method CableLiftUpdate 2020-04-18 14:29:19 -03:00
Tulio Leao
b449e445f7 Use named casts on openrct2/ride (#11163)
Excluding subfolders
2020-04-17 19:53:33 +02:00
duncanspumpkin
b857792f23 Fix vehicles changing state on export/import 2020-04-07 20:07:37 +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
Michael Steenbeek
b70c5cefd6 Use station index in a few more places (#11066) 2020-03-27 11:13:02 +01:00
Michael Steenbeek
d5c4d78d49 Move vehicle track location to CoordsXYZ (#10856)
* Move vehicle track location to CoordsXYZ

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-03-01 15:45:51 -03:00
duncanspumpkin
5e9e9df7ce Refactor invalidate_sprite 2020-01-19 17:16:42 +00:00
duncanspumpkin
bdcfd615ed Refactor sprite_move 2020-01-19 17:16:41 +00:00
duncanspumpkin
65c6564165 Use SpriteBase instead of rct_sprite for move_sprite_to_list 2020-01-19 17:15:52 +00:00
duncanspumpkin
a5ef8d6240 Rename rct_vehicle 2020-01-19 17:14:56 +00:00
modulo7
fdf0c17fd8 Name field var_CD of vehicle struct. Refactor to enum 2020-01-19 17:34:11 +01:00
Tulio Leao
4f93d6a0f9 Remove LocationXY usage on openrct2\ride\CableLift.cpp 2019-12-27 08:31:15 -03:00
Tulio Leao
21435a4d01 Make Map::map_get_track_element_at_of_type_seq() use CoordsXYZ 2019-12-24 11:19:05 -03:00
Ted John
9954f0b725 Add nullptr checks for more instances of get_ride (#9819) 2019-08-09 14:20:59 +01:00