Commit Graph

673 Commits

Author SHA1 Message Date
ζeh Matt a98caef48a
Merge remote-tracking branch 'upstream/develop' into new-save-format 2021-10-20 16:35:05 +03:00
ζeh Matt e06f9c3ee7
Refactor result passing of TrackPlaceAction 2021-10-20 14:15:24 +02:00
duncanspumpkin e5f9568180 Merge branch 'develop' into HEAD 2021-10-10 07:21:36 +01:00
Michał Janiszewski 1b4875e528 Extract math-related functions from common.h to Math.hpp
Saves wide inclusion of <stdexcept> header, which pulls in <string>
2021-10-09 21:43:06 +02:00
Hielke Morsink d93309d065
Merge branch 'develop' into new-save-format 2021-09-17 23:41:58 +02:00
Gymnasiast c390e9f521
Merge remote-tracking branch 'upstream/develop' into new-save-format
Some conflicts intentionally unresolved
2021-09-17 10:15:09 +02:00
Hielke Morsink 4b4b3333d6
Remove unnecessary else blocks 2021-09-16 18:31:12 +02:00
Daniel Karandikar 613c309f93
Close #13407 Allow building covered lift hill when cheat enabled 2021-09-05 21:57:08 +02:00
Gymnasiast 612724e8f8
Merge remote-tracking branch 'upstream/develop' into new-save-format 2021-08-31 00:42:44 +02:00
frutiemax 5f438535ad Part of #13874: Gymnasiast review 2021-08-27 17:57:10 -04:00
frutiemax 1bfa26e4c5 Part of #13874: replace flags table 2021-08-22 17:51:35 -04:00
frutiemax 5a8cc7c610 Part of #13874: Replace alternativeTypes 2021-08-22 17:49:39 -04:00
frutiemax 80418efafb Part of #13874: Replace TrackCoordinates 2021-08-22 17:49:00 -04:00
Gymnasiast ca47b31207
Merge remote-tracking branch 'upstream/develop' into new-save-format 2021-08-13 18:29:09 +02:00
Michael Steenbeek e547dd96db
Make RideConstructionState a strong enum 2021-08-11 17:51:59 +02:00
duncanspumpkin 5bac7821c9 Merge develop 2021-06-04 13:11:47 +01:00
duncanspumpkin 98f9f24909 Remove sprite.h includes where possible 2021-05-29 08:54:33 +01:00
Gymnasiast 87422c2806 Replace corrupt elements with invisibility bit 2021-04-03 00:21:43 +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
amdoku 85efe047bb
Close #12444: Refactor TILE_INSPECTOR_PAGE to use strong enum (#13134) 2021-01-03 10:30:59 -03:00
Tulio Leao d6ebdded6b Close #13630: Refactor DATATYPE into 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
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
Tulio Leao 09bb66848c Change windowTileInspectorTile to TileCoordsXY type 2020-10-02 01:45:08 -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 088db4a7c3 Fix incorrect const names of long base pieces
- Fix function names referring to that of the renamed consts
- Fix incorrect mirror of TrackType::FlatToDown60Long in TrackData
2020-10-01 19:57:52 +01: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
Duncan 3c8adb1fc1
Remove gMapTooltip format args global (#12971)
Fix mistake
2020-09-28 21:45:28 -03:00
Michał Janiszewski 30e452d76c
Fix null dereference in place_provisional_track_piece (#12777) 2020-08-25 23:20:40 +02:00
Simon J 4c2ce0f892
Remove duplicate TRACK_ELEMENT_LOCATION_IS_UNDERGROUND flag (#12714)
Renamed all instances to ELEMENT_IS_UNDERGROUND

Co-authored-by: Simon Jarrett <simonjjarrett@gmail.com>
2020-08-18 09:26:03 -03:00
Gymnasiast 89f04c4fb3
Fix names of two track type functions 2020-08-10 23:48:18 +02:00
Aaron van Geffen 7b5087f057
Update copyright year to 2020 2020-07-21 15:04:34 +02:00
Gymnasiast cf664c8340
Close #11971: Replace ride groups with new ride types 2020-07-17 00:19:49 +02:00
Michael Steenbeek 8a4724a691
Move covered track piece availability to RTD 2020-06-17 23:15:05 +02:00
Tulio Leao 373776f3db
Address review comments on #11598 2020-05-09 12:35:36 +02: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 7c82daec25 Use CoordsXYZD in window_ride_construction_mouseup_demolish_next_piece() 2020-05-02 11:07:18 -03:00
Gymnasiast 2e3a4d41ce
Clean up some ride construction variables 2020-04-26 11:07:19 +02:00
Michał Janiszewski 2323cc1596
Use named casts instead of old-style casts
Change prepared with clang-tidy and google-readability-casting check
2020-04-22 17:09:29 +02:00
Michał Janiszewski c4b6897635 Address possible nullptr dereferences 2020-04-21 13:31:01 +02:00
Tulio Leao e2be89648e
Fix #6119: Advertising campaign for ride window not updated properly (#11335) 2020-04-18 16:15:04 +02:00
Tulio Leao 116bcb5ccb
Use named casts on openrct2/(util|windows|scenario|title) (#11146) 2020-04-17 19:45:19 +02: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 3791de21c8
Fix #10871: Building tall pieces underground results in 'Too high!' (#10907) 2020-03-09 22:11:47 +01:00