Commit Graph

160 Commits

Author SHA1 Message Date
Gymnasiast 8fb8b2a4c1
Do not overwrite ride type when extending station 2021-09-21 10:50:38 +02:00
Gymnasiast f21b941b46
Introduce ride_type_t 2021-09-21 10:49:29 +02:00
frutiemax 355019f97f
#15367: Encode RideType in TrackElement 2021-09-21 10:49:28 +02:00
Hielke Morsink 4b4b3333d6
Remove unnecessary else blocks 2021-09-16 18:31:12 +02:00
Michael Steenbeek 624a32e93b
Make Coords isNull/setNull functions TitleCase (#15382) 2021-09-08 20:48:53 -03:00
frutiemax 7e5e9bdf13 Part of #13874: Add definition field in TrackElementDescriptor 2021-08-29 20:22:48 -04: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 56399e7188
Use the RTD instead of ride_type_has_flag() 2021-02-24 14:10:30 +01:00
Gymnasiast 1b964c0f2e
Refactor flat ride track pieces 2021-02-18 17:50:19 +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
Michael Steenbeek 20f959c833
Use track_type_t in more places 2021-01-22 11:33:55 +01:00
Michael Steenbeek 60d1e94046
Close #7059: Implement landscape doors on Ghost Train (#13636)
* Implement landscape door updating

* Implement door drawing for Ghost Train

* Amend changelog and bump network version

* Apply review requests

* Always return default seat rotation for ride types with landscape doors

* Fix comment

* Update replays

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2021-01-10 21:38:02 +00:00
Gymnasiast d11862046c Actually make Spinning control track behave as such for Steel Wild Mouse 2020-12-19 15:35:35 -06: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
Gymnasiast 89f04c4fb3
Fix names of two track type functions 2020-08-10 23:48:18 +02:00
Gymnasiast 6802011f7d
Use a 16-bit integer for track type in more places 2020-08-10 21:34:10 +02:00
Gymnasiast 9d24655056
Convert track_element_is_block_start() to member function 2020-08-10 21:15:48 +02:00
Arran Ireland 89e4714198
Close #12331: Use CoordsXY in track_remove_station_element (#12609)
* Update track_remove_station_element signature

Part of #12331: This commit will update the
signature of track_remove_station_element and
its callers, to use CoordsXYZD.

* Fix track_remove_station_element local vars

Part of #12331: This commit will ensure that
references to the previous arguments in
track_remove_station_element will now use the new
CoordsXYZD argument.

* Refactor remove in track_remove_station_element

Part of #12331: This commit refactors the removeX/Y
to use CoordsXY.

* Refactor station0 in track_remove_station_element

Part of #12331: This commit will refactor stationX/Y0
to use CoordsXY.

* Close #12331 track_remove_station_element refactor

This commit refactors stationX/Y1 to use CoordsXY,
and fixes the smallZ vs bigZ problem in callers of
track_remove_station_element. These are the final
changes for this issue.

* Added operator for CoordsXYZD minus CoordsXY.

This commit adds a missing operator for subtracting
a CoordsXY from a CoordsXYZD. This was needed for
refactoring Track.cpp

* Refactor track_remove_station_element Coord use

This commit utilises the overloaded operators for
Coords and ensures that they are used so that the
function implementation is more readable.

* Close #12331 track_remove_station_element refactor

This commit also fixes a bug in which a small Z
value (the Height of a RideStation) was being
updated with a big Z value without scaling. It
adds a few extra refactors in calls of the
track_remove_station_element function, and
changes the contributors to add ion232.
2020-08-09 07:25:44 +01:00
Aaron van Geffen 7b5087f057
Update copyright year to 2020 2020-07-21 15:04:34 +02:00
0ro8lu 6e077c42ea
Close #12270: Remove goto track_remove_station_element (#12323)
Refactored the goto statement
2020-07-20 20:55:50 +01:00
Gymnasiast cf664c8340
Close #11971: Replace ride groups with new ride types 2020-07-17 00:19:49 +02:00
hdpoliveira c35556d754 Use CamelCase on track functions 2020-06-19 17:35:21 -03:00
hdpoliveira 93b2872747 Rename v-angle to pitch and bank to roll 2020-06-19 12:23:16 -03:00
hdpoliveira 4ce425b436 Fix type issues 2020-06-19 11:18:59 -03:00
hdpoliveira 23cf4b580e Remove global _vehicleVAngleAndBank 2020-06-19 11:17:46 -03:00
hdpoliveira d3d853b7d6 Make loc_6DB38B receive only the update flag 2020-06-19 11:14:02 -03:00
Michael Steenbeek ba5e730c06
Rename UpdateFlag to HasUpdateFlag; refactor to bool (#11966) 2020-06-17 00:05:37 -03:00
Michael Steenbeek f21ddb0723
Refactor checks for station pieces (#11876) 2020-06-05 17:55:15 -03:00
hdpoliveira a1be45d0b7
#9473: Create Vehicle::UpdateFlag (#11850) 2020-06-01 08:35:30 -03:00
Tulio Leao 28b3ac1693 Make track_block_get_previous() use CoordsXYE 2020-05-02 11:07:18 -03:00
Gymnasiast edd31d9f16
Move flags to RideTypeDescriptors 2020-04-17 17:03:33 +02:00
Michael Steenbeek 9dfe5af851
Add remark about track designs with 5 stations (#11051) 2020-03-26 05:53:49 +00:00
Michael Steenbeek 3f473ec3f0
Fix #6123: Cannot build some track designs with 4 stations (#11031) 2020-03-25 14:20:29 +01:00
Gymnasiast 0f8fec1413
Fix #10631: Assertion fails when modifying copied station pieces 2020-03-21 18:43:34 +01:00
Gymnasiast 2f7a26e8da
Refactor station index a bit 2020-03-21 17:05:16 +01:00
Michael Steenbeek fd91c41a76
Name remaining ride type flags (#10947) 2020-03-16 22:52:06 +01:00
Michael Steenbeek ba49850195
Fix errors and apply requests 2020-03-08 11:23:20 +01:00
Gymnasiast 27af60f062
More CoordsXYZ(D) conversion 2020-03-07 22:14:29 +01:00
Gymnasiast ad91654a3d
Use big Z in more places 2020-03-07 21:54:47 +01:00
Michael Steenbeek 4f86d0115c
Merge pull request #10866 from Gymnasiast/refactor/more-tile-element-prep
Refactor/more tile element prep
2020-03-06 09:25:32 +01:00
Gymnasiast 2eb967b30d
Change station start to CoordsXY 2020-03-05 12:29:02 +01:00
Gymnasiast c9afcaa5b3
Fix errors 2020-03-05 00:09:39 +01:00
Gymnasiast 3ed7694495
Move tile element-specific flags 2020-03-04 22:01:09 +01:00
Gymnasiast 93926d5e5d
Move all the ride type-specific track categories to regular ones 2020-02-22 23:20:12 +01:00
Michael Steenbeek 1690361b36
Increase size of ride_id_t to 16 bits 2020-02-16 22:21:17 +01:00
duncanspumpkin a5ef8d6240 Rename rct_vehicle 2020-01-19 17:14:56 +00:00
Tulio Leao 98110c0544 Make Map::map_invalidate*() use CoordsXY (#10437)
* Make Map::map_invalidate_element() use CoordsXY

* Make Map::map_invalidate_tile_full() use CoordsXY

* Make Map::map_invalidate_tile_zoom0() use CoordsXY

* Make Map::map_invalidate_tile_zoom1() use CoordsXY

* Make Map::map_invalidate_tile() use CoordsXY

* Use CoordsXYRangedZ for map invalidation

* Fix vehicle tile invalidation use Z instead of Y coord

* Fix BannerRemoveAction sending Z TileCoords to invalidate tile

* Fix wrong tile invalidation on peep_update_walking_break_scenery

* Prefer ToTileStart over bitwise and
2019-12-28 08:44:33 +00:00
Michael Steenbeek 64f7cac6d6
Create getters for station height and start (#10453) 2019-12-27 15:57:40 +01:00
Tulio Leao 81647b3dd8 Make Map::map_get_track_element_at_with_direction_from_ride() use CoordsXYZD 2019-12-24 11:19:06 -03:00