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

264 Commits

Author SHA1 Message Date
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
Gymnasiast
d63e3b1d9f Replace RideTypeDescriptors[ride->type] with GetRideTypeDescriptor() 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
406967c71f Refactor object_entry_get_entry() to return Object 2021-01-03 23:01:52 +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
Łukasz Pękalski
fc4ad82ac1 resolve: integrated changes from comments 2020-11-11 16:08:39 +01:00
Łukasz Pękalski
7648feeba2 Close #12427: Refactor OBJECT_TYPE to use strong enum 2020-11-11 16:07:01 +01: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
ζeh Matt
645289f4ec Rename GameActionResult and use GameActions namespace instead (#13184) 2020-10-14 22:04:39 -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
Simon J
f7acb84e42 Fix #400: unable to place some saved tracks flush to the the ground (#12721) 2020-09-01 18:26:44 +02:00
Gymnasiast
89f04c4fb3 Fix names of two track type functions 2020-08-10 23:48:18 +02:00
quale
9ef3eec47d Fix #10751: Save mazes in their entirety 2020-08-05 18:08:34 +02:00
Aaron van Geffen
7b5087f057 Update copyright year to 2020 2020-07-21 15:04:34 +02:00
frutiemax
b39a0037f0 Close #12164: Use Coords for place_virtual_track (#12240) 2020-07-13 16:37:10 -03:00
frutiemax
09ad720dfc Part of #12164: Use Coords for track_design_place_ride (#12233) 2020-07-13 14:38:39 -03:00
frutiemax
e2ef82ca0a Part of #12164: Use Coords for track_design_place_maze (#12218) 2020-07-12 19:02:28 -03:00
frutiemax
bc7f7248bb Part of #12164: Use Coords for track_design_add_selection_tile 2020-07-11 19:13:57 +02:00
frutiemax
3948600cd0 Part of #12164: track_design_update_max_min_coordinates Coords (#12194) 2020-07-10 15:34:13 -03:00
frutiemax
f6eb9f1cc5 Merge RideRatings in RideTypeDescriptor structure (#11975) 2020-06-17 22:22:52 +02:00
Sohil Adwani
03f016e9ef Smart pointers (#11852)
* Part of #11159 Added smart pointers to a few functions

* Use camelCase for variables

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2020-06-15 19:47:07 +01:00
Tulio Leao
4589560a15 Make sub_6C683D() use CoordsXYZ on parameter and return 2020-05-01 18:06:26 -03:00
Michał Janiszewski
cb74c5bbb6 Fix globals that really aren't 2020-04-21 13:30:55 +02:00
Tulio Leao
b449e445f7 Use named casts on openrct2/ride (#11163)
Excluding subfolders
2020-04-17 19:53:33 +02:00
Gymnasiast
edd31d9f16 Move flags to RideTypeDescriptors 2020-04-17 17:03:33 +02:00
duncanspumpkin
de7051d940 Fix #11225: Track design replays.
The replay state was not being passed to all sub actions this prevented the replay from working. Note replays made before this still work its just they couldn't be replayed.

name the flag

Update changelog
2020-04-05 12:48:42 +01:00
Michael Steenbeek
c1e2c7cc5a Fix mistake made in #10579 (#11184) 2020-03-31 20:56:47 +02:00
Michael Steenbeek
cfb405f0ed Use StationIndex in many more places (#10992) 2020-03-26 21:38:26 +01:00
Michael Steenbeek
3f473ec3f0 Fix #6123: Cannot build some track designs with 4 stations (#11031) 2020-03-25 14:20:29 +01:00
Michael Steenbeek
c519512cfe Create ObjectEntryIndex (#10980) 2020-03-20 19:28:39 +01:00
Michael Steenbeek
18ebe73dfa Replace object_entry_get_type() with method (#10937) 2020-03-15 12:07:04 +01:00
Gymnasiast
bdf681f440 Clean up many other coordinates 2020-03-13 12:03:43 +01:00
Duncan
3003e1de75 Fix #10602: Error adding track scenery additions far from station start
Issue caused due to stuffing a temporary unsigned variable in a signed variable. This fix is not a permanent fix and this field in the future should be split up into two separate fields: tile position and relative tile position.

Co-authored-by: Gymnasiast <m.o.steenbeek@gmail.com>
2020-03-13 09:32:05 +01:00
Michael Steenbeek
be13c1fc87 Refactor more TileCoords 2020-03-07 21:07:18 +01:00
Michael Steenbeek
d64b73c29a Clean up RCT1/2 constants (#10855) 2020-03-05 22:49:16 +01:00
Tulio Leao
09fad0ef7f Change rct_viewport to use ScreenCoordsXY 2020-03-02 20:50:58 -03:00
Michael Steenbeek
d798811c4a Make GetWaterHeight return big Z (#10579)
* Make GetWaterHeight return big Z

* Restore > 0 [ci skip]
2020-01-19 15:12:48 +00:00
Michael Steenbeek
8a9f0eeca5 Prepare track piece handling code for more than 256 pieces (#10575) 2020-01-17 12:27:14 +01:00
Michael Steenbeek
44dc2068e7 Merge pull request #10515 from tupaschoal/use-more-coords-4
Use CoordsXY* on world/Footpath.cpp
2020-01-11 20:52:39 +01:00
Tulio Leao
7cf03d3e41 Use CoordsXY on footpath_remove_edges_at() 2020-01-11 11:13:04 -03:00
Tulio Leao
b1dc6ed6ed Use CoordsXY on footpath_connect_edges() 2020-01-05 08:20:16 -03:00
Michael Steenbeek
0c9b1cec96 Correct max vehicles per ride value (#10504)
* Correct max vehicles per ride value

* Fix formatting

* Fix constant usage in TrackDesign.cpp
2020-01-04 18:10:33 +01:00
Duncan
c170926200 Refactor to prefer baseZ instead of height for big Z (#10478) 2019-12-31 09:33:27 +01:00
Tulio Leao
06fb16ee88 Use CoordsXYZ for gMapSelectArrowPosition (#10442) 2019-12-30 16:51:35 +00:00
Michael Steenbeek
77494bbc73 Create definitions for some coords related stuff (#10456)
* Create definitions for some coords related stuff

* Use constexpr; add define for Z step
2019-12-30 15:03:51 +00:00
Michael Steenbeek
64f7cac6d6 Create getters for station height and start (#10453) 2019-12-27 15:57:40 +01:00