Commit Graph

1285 Commits

Author SHA1 Message Date
ζeh Matt ad5e54460f
Merge pull request #16062 from ZehMatt/refactor/map-iterators
Refactor tile map iterations
2021-12-01 06:16:39 -08:00
ζeh Matt 810521bd5b
Remove BANNER_INDEX_NULL 2021-12-01 14:41:59 +02:00
ζeh Matt 3563d89e58
Add TIdentifier specialization to GameAction visitor 2021-12-01 14:41:59 +02:00
Michael Steenbeek fb9d02cab5
Fix #15998: Map action only accepts 998×998 instead of 999×999 2021-11-30 21:27:46 +01:00
ζeh Matt be5d6ac3db
Fix the loops 2021-11-29 14:12:26 +02:00
ζeh Matt 56425b33e4
Refactor iterating over all map tiles in RideDemolishAction 2021-11-29 12:59:36 +02:00
Duncan eba42a9584
Introduce Limits headers. (#15329)
* Move RCT12 limits to seperate file and namespace

* Remove prefix from constants

* Add rct1 limits file

* Rename constants to remove prefix

* Add RCT2 limits file

* Remove RCT2 prefix from constants

* Move constant to correct header

* Fix rebase mistakes

* Drop prefix
2021-11-27 16:20:05 +00:00
ζeh Matt c4ad5fcd15
Adjust includes 2021-11-26 21:01:44 +02:00
ζeh Matt 9f23449ffb
Move Staff/Guest/Peep to entity 2021-11-26 18:26:19 +02:00
ζeh Matt 56e78d5733
Merge pull request #15985 from ZehMatt/refactor/entities2
Refactor Sprite to Entity
2021-11-25 12:53:50 -08:00
Duncan 2b4eaab5dc
Modify TrackPlaceAction to handle ride type parameter (#15980)
* Modify TrackPlaceAction to handle ride type parameter

* Update network and plugin version

* Update replays
2021-11-25 12:28:30 +00:00
Peter Schussheim 0495b265c0
Refactor unchecked std::array subscript operator 2021-11-25 10:13:20 +01:00
ζeh Matt 0024252328
Fix includes 2021-11-24 17:19:52 +02:00
ζeh Matt 03fb9b390f
Rename Sprite to EntityRegistry 2021-11-24 17:04:12 +02:00
ζeh Matt 7c726e2a0c
Fix includes 2021-11-24 16:48:33 +02:00
ζeh Matt c6242fd310
More renaming 2021-11-24 15:50:18 +02:00
ζeh Matt 83b911b193
#15634: Refactor passing GameActions::Result by copy (#15951)
* Refactor to result GameActions::Result as copy instead of unique_ptr

* Remove alias GameActions::Result::Ptr

* Remove MakeResult wrapper

* Remove type forwarder in TileInspector
2021-11-24 07:35:08 +00:00
ζeh Matt 422c4629e4
Fix BannerSetStyleAction having wrong type in constructor 2021-11-22 19:29:17 +02:00
IntelOrca 34128dc262
Add new .park save format
Co-authored-by: Gymnasiast <Gymnasiast@users.noreply.github.com>
Co-authored-by: duncanspumpkin <duncanspumpkin@users.noreply.github.com>
Co-authored-by: ZehMatt <Zehmatt@users.noreply.github.com>
Co-authored-by: Broxzier <Broxzier@users.noreply.github.com>
2021-11-21 22:43:22 +01:00
Duncan 5d2a56525f
Refactor min max cars per train from nsf (#15911) 2021-11-14 20:58:44 +00:00
ζeh Matt d80612dfe4
Update date 2021-11-11 16:25:46 +02:00
ζeh Matt 55af69813a
Ensure registration is never out of bounds with static_assert 2021-11-11 16:23:50 +02:00
ζeh Matt f491c97734
Refactor game action registry initialization and make it constexpr 2021-11-11 16:16:52 +02:00
ζeh Matt c7fa1b44e9
Pass name during registration and minor cleanup 2021-11-11 15:50:01 +02:00
ζeh Matt 96e2641d0d
Remove macro for registration and cleanup 2021-11-10 19:42:23 +02:00
ζeh Matt 91d6338db5
Remove unused overload of SetCallback (#15885) 2021-11-10 14:03:34 +00:00
ζeh Matt d1e5a5d977
Refactor last uses of place_virtual_track 2021-10-29 02:06:59 +03:00
ζeh Matt 322e1203fc
Fix error message for WallPlaceAction 2021-10-28 21:26:07 +03:00
ζeh Matt 45c4ed2679
Fix error messages for when map_is_location_owned is false 2021-10-28 21:20:42 +03:00
Duncan a8d2d5fd44
Staff patrol area 2 from NSF (#15600)
* Port over changes from NSF for staff

* Fix import and export

* Fix crash on export

* Fix import issue

* Fix patrol import issue

* Remove staff id field

* Increment network version

* Actually remove all instances of staff id

* Update replays
2021-10-27 21:19:10 +01:00
ζeh Matt acef8a592a
Apply review suggestion 2021-10-27 19:50:08 +03:00
ζeh Matt 3bb86ebcfa
Refactor explicit constructor usage in LandSmoothAction 2021-10-27 04:32:07 +03:00
ζeh Matt 12a200abfe
Refactor explicit constructor usage in SetCheatAction 2021-10-27 04:32:07 +03:00
ζeh Matt 3b8486ed4a
Refactor explicit constructor usage in WallPlaceAction 2021-10-27 04:32:07 +03:00
ζeh Matt 89cca5cb32
Refactor explicit constructor usage in TrackRemoveAction 2021-10-27 04:32:07 +03:00
ζeh Matt d9222ab063
Refactor explicit constructor usage in RideDemolishAction 2021-10-27 04:32:07 +03:00
ζeh Matt 72b59445ad
Refactor explicit constructor usage in RideSetPriceAction 2021-10-27 04:32:07 +03:00
ζeh Matt 5c964d7fe8
Refactor explicit constructor usage in RideEntranceExitPlaceAction 2021-10-27 04:32:06 +03:00
ζeh Matt d8a255562a
Refactor explicit constructor usage in WaterSetHeightAction 2021-10-27 04:32:06 +03:00
ζeh Matt a4e5a92c54
Refactor explicit constructor usage in WaterRaiseAction 2021-10-27 04:32:06 +03:00
ζeh Matt 84acdba0f0
Refactor explicit constructor usage in WaterLowerAction 2021-10-27 04:32:06 +03:00
ζeh Matt 2702b2641f
Refactor explicit constructor usage in ScenarioSetSettingAction 2021-10-27 04:32:06 +03:00
ζeh Matt 8e80a74daa
Refactor explicit constructor usage in WallSetColourAction 2021-10-27 04:32:06 +03:00
ζeh Matt 2c38d3b180
Refactor explicit constructor usage in RideSetVehicleAction 2021-10-27 04:32:06 +03:00
ζeh Matt adbad84cc5
Refactor explicit constructor usage in SurfaceSetStyleAction 2021-10-27 04:32:05 +03:00
ζeh Matt ab248a67df
Refactor explicit constructor usage in TrackSetBrakeSpeedAction 2021-10-27 04:32:05 +03:00
ζeh Matt 60838f563e
Refactor explicit constructor usage for TileInspector 2021-10-27 04:32:05 +03:00
ζeh Matt fc489452ab
Refactor explicit constructor usage in RideSetSettingAction 2021-10-27 04:32:05 +03:00
ζeh Matt 86a07d7f48
Refactor explicit constructor usage in StaffSetPatrolAreaAction 2021-10-27 04:32:05 +03:00
ζeh Matt 6600f813de
Refactor explicit constructor usage in StaffSetCostumeAction 2021-10-27 04:32:05 +03:00
ζeh Matt 219d49aee1
Refactor explicit constructor usage in StaffSetOrdersAction 2021-10-27 04:32:04 +03:00
ζeh Matt 931b7f628d
Refactor explicit constructor usage in StaffSetNameAction 2021-10-27 04:32:04 +03:00
ζeh Matt d006a1f488
Refactor explicit constructor usage in SmallScenerySetColourAction 2021-10-27 04:32:04 +03:00
ζeh Matt 5a237bd663
Refactor explicit constructor usage in StaffSetColourAction 2021-10-27 04:32:04 +03:00
ζeh Matt cce3609c75
Refactor explicit constructor usage in LandRaiseAction 2021-10-27 04:32:04 +03:00
ζeh Matt d1c79e63f5
Refactor explicit constructor usage in StaffFireAction 2021-10-27 04:32:04 +03:00
ζeh Matt 76114bca2f
Refactor explicit constructor usage in SmallSceneryRemoveAction 2021-10-27 04:32:03 +03:00
ζeh Matt d99c6641e7
Refactor explicit constructor usage in LandSetHeightAction 2021-10-27 04:32:03 +03:00
ζeh Matt 1acbf14985
Refactor explicit constructor usage in SignSetStyleAction 2021-10-27 04:32:03 +03:00
ζeh Matt 18eaada85b
Refactor explicit constructor usage in SetParkEntranceFeeAction 2021-10-27 04:32:03 +03:00
ζeh Matt 8f9ad4743d
Refactor explicit constructor usage in FootpathPlaceAction 2021-10-27 04:32:03 +03:00
ζeh Matt 4fe71f3b45
Refactor explicit constructor usage in LargeSceneryPlaceAction 2021-10-27 04:32:03 +03:00
ζeh Matt effc6f4413
Refactor explicit constructor usage in FootpathRemoveAction 2021-10-27 04:32:03 +03:00
ζeh Matt 1660a5080b
Refactor explicit constructor usage in RideSetColourSchemeAction 2021-10-27 04:32:02 +03:00
ζeh Matt bb149d471c
Refactor explicit constructor usage in RideSetAppearanceAction 2021-10-27 04:32:02 +03:00
ζeh Matt 4a408821fd
Refactor explicit constructor usage in RideEntranceExitPlaceAction 2021-10-27 04:32:02 +03:00
ζeh Matt 33b18309cb
Refactor explicit constructor usage in ParkMarketingAction 2021-10-27 04:32:02 +03:00
ζeh Matt 1014c84620
Refactor explicit constructor usage in RideEntranceExitRemoveAction 2021-10-27 04:32:02 +03:00
ζeh Matt 586147c8dc
Refactor explicit constructor usage in FootpathPlaceFromTrackAction 2021-10-27 04:32:02 +03:00
ζeh Matt 6bfefc1cbd
Refactor explicit constructor usage in PeepPickupAction 2021-10-27 04:32:01 +03:00
ζeh Matt 4429bce005
Refactor explicit constructor usage in ParkSetResearchFundingAction 2021-10-27 04:32:01 +03:00
ζeh Matt ea6d2f6b65
Refactor explicit constructor usage in ParkSetParameterAction 2021-10-27 04:32:01 +03:00
ζeh Matt 9f4f1136ed
Refactor explicit constructor usage in ParkSetDateAction 2021-10-27 04:32:01 +03:00
ζeh Matt c4465464b6
Refactor explicit constructor usage in BannerSetColourAction 2021-10-27 04:32:01 +03:00
ζeh Matt 59a752bb15
Refactor explicit constructor usage in LargeScenerySetColourAction 2021-10-27 04:32:01 +03:00
ζeh Matt 16a30c13a3
Refactor explicit constructor usage in BannerRemoveAction 2021-10-27 04:32:00 +03:00
ζeh Matt cd7d5a0b40
Refactor explicit constructor usage in ParkEntranceRemoveAction 2021-10-27 04:32:00 +03:00
ζeh Matt d44bb21d97
Refactor explicit constructor usage in BannerSetStyleAction 2021-10-27 04:32:00 +03:00
ζeh Matt c4ea5732ea
Refactor explicit constructor usage in LargeSceneryRemoveAction 2021-10-27 04:32:00 +03:00
ζeh Matt f207ad4f64
Refactor explicit constructor usage in FootpathAdditionRemoveAction 2021-10-27 04:32:00 +03:00
ζeh Matt 520053a9ff
Refactor explicit constructor usage in LandLowerAction 2021-10-27 04:32:00 +03:00
ζeh Matt a9d9fd5f4f
Refactor explicit constructor usage in FootpathAdditionPlaceAction 2021-10-27 04:31:59 +03:00
ζeh Matt f8d9b0a2f9
Refactor explicit constructor usage in GuestSetNameAction 2021-10-27 04:31:59 +03:00
ζeh Matt fe3d3bdb3f
Refactor explicit constructor usage in GuestSetFlagsAction 2021-10-27 04:31:59 +03:00
ζeh Matt fcce046a48
Refactor explicit constructor usage in BannerPlaceAction 2021-10-27 04:31:59 +03:00
ζeh Matt cad2f42703
Refactor explicit constructor usage in BalloonPressAction 2021-10-27 04:31:59 +03:00
ζeh Matt 43608c807c
Make construction of GameActions::Result explicit 2021-10-27 04:31:59 +03:00
ζeh Matt 31239e3941
Refactor result passing on ConstructClearResult 2021-10-21 19:26:17 +03:00
ζeh Matt 7a30169c28
Refactor out construction clearance into a new compilation unit 2021-10-20 22:21:54 +03:00
ζeh Matt ea0b8840ac
Merge pull request #15610 from ZehMatt/refactor/stringvariant
Replace StringVariant with std::variant
2021-10-20 10:46:42 -07:00
Michael Steenbeek 578d8ce247
Fix #15612: Crash in WallCheckObstruction() 2021-10-20 14:15:35 +00:00
ζeh Matt 5bf3513156
Default initialize ErrorTitle and ErrorMessage with STR_NONE 2021-10-20 16:35:58 +03:00
ζeh Matt 7fc49fca39
Replace StringVariant with std::variant 2021-10-20 16:35:58 +03:00
ζeh Matt 8e06d84a09
Refactor result passing of TrackDesignAction 2021-10-20 16:08:21 +03:00
ζeh Matt e06f9c3ee7
Refactor result passing of TrackPlaceAction 2021-10-20 14:15:24 +02:00
ζeh Matt 2d78a5efc3
Move GameActionResult into its own unit (#15588) 2021-10-19 17:50:24 -03:00
Hielke Morsink 9dd20ec619
Improve array formatting
For most of these cases, adding a trailing comma to the array block makes clang-format put each item on a new line, and clang-format exception blocks could be reduced where clang-format does not handle them properly.
2021-10-17 18:21:45 +02: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
Michał Janiszewski b8c751e300 Drop some unnecessary includes 2021-10-09 21:30:24 +02:00
Duncan fd18ac7f85
Modify StaffSetPatrolAreaAction to have three modes (#15494)
* Modify StaffSetPatrolAreaAction to have three modes

* Actually serialise mode

* Apply review comments

* Increment network version

* Apply review comment

* Update replay
2021-10-07 18:02:24 +01:00
ζeh Matt c054967230
Merge pull request #15530 from ZehMatt/refactor/wallplaceaction-result
Refactor action result passing for WallPlaceAction
2021-10-06 08:50:57 -07:00
ζeh Matt 976d15ce10
Merge pull request #15529 from ZehMatt/refactor/smallsceneryplaceaction-result
Refactor action result passing for SmallSceneryPlaceAction
2021-10-06 08:32:16 -07:00
ζeh Matt d2ffeaa7b0
Refactor action result passing for WallPlaceAction 2021-10-06 18:31:09 +03:00
ζeh Matt 9cb26f7b02
Refactor action result passing for SmallSceneryPlaceAction 2021-10-06 16:12:37 +03:00
ζeh Matt 8effeb26b0
Refactor action result passing for StaffHireNewAction 2021-10-04 17:01:27 +03:00
ζeh Matt cf7b4ded08
Move static declaration into cpp file 2021-10-03 21:13:04 +03:00
ζeh Matt dc44d1f79d
Merge pull request #15511 from ZehMatt/refactor/ridecreateaction-result
Refactor RideCreateAction result data passing
2021-10-03 07:55:14 -07:00
ζeh Matt 24ec2e1b67
Merge pull request #15510 from ZehMatt/refactor/largescenerayplace-result
Refactor LargeSceneryPlaceAction result data passing
2021-10-03 07:54:59 -07:00
ζeh Matt 76c2f9db85
Refactor LargeSceneryPlaceAction result data passing 2021-10-02 00:56:59 +03:00
ζeh Matt 2597c04eb4
Refactor RideCreateAction result data passing 2021-10-02 00:50:03 +03:00
Hielke Morsink 1d62a902e7
Make scenery_small_entry_has_flag a member function (#15509) 2021-10-01 16:50:05 -03:00
Michael Steenbeek 317e562845
Merge pull request #15495 from ZehMatt/refactor/xyz-access
Use GetLocation in more places
2021-10-01 14:02:34 +02:00
Hielke Morsink 94144bcd89
Remove some dead code
Reported by clang
clang-analyzer-deadcode.DeadStores
2021-09-30 10:40:32 +02:00
Michael Steenbeek 987174e828
Merge pull request #15436 from duncanspumpkin/staff
Small Staff Refactor from NSF
2021-09-29 20:46:24 +02:00
frutiemax 2906cb8c89
Fix #14474: Map size can be synced in multiplayer (#15312)
* Fix #14474: Map size can be synced in multiplayer

* Bump up network version

Co-authored-by: ζeh Matt <5415177+ZehMatt@users.noreply.github.com>
2021-09-29 16:46:03 +01:00
ζeh Matt eb2de0222b
Use GetLocation in more places 2021-09-28 03:16:04 +03:00
Michael Steenbeek f7d61c67e6
Fix arbitrary ride type cheat not working 2021-09-26 16:21:34 +02:00
Michael Steenbeek 1feac16bed
Merge pull request #15414 from frutiemax/develop
#15367: Encode RideType in TrackElement
2021-09-25 12:02:08 +02:00
Hielke Morsink 53c22c9b4b
Check for nullptr explicitly (#15458) 2021-09-24 20:05:50 +02:00
ζeh Matt 719a5a9d8e
Merge pull request #15369 from ZehMatt/refactor/tile-coords
Refactor overload map_get_first_element_at
2021-09-21 14:36:03 -07:00
frutiemax 355019f97f
#15367: Encode RideType in TrackElement 2021-09-21 10:49:28 +02:00
duncanspumpkin ce75fbcae9 Fix graphics issues with staff fire 2021-09-19 09:17:11 +01:00
duncanspumpkin 6295473c94 Fix merged patrol area bug 2021-09-19 09:15:10 +01:00
duncanspumpkin 5b92f3f9ae Fix conversion error 2021-09-19 09:05:29 +01:00
duncanspumpkin ca689c3948 Introduce methods from NSF
These methods still call the same legacy functionality for now
2021-09-19 08:28:25 +01:00
Hielke Morsink 77141f57b0
Merge pull request #15416 from Broxzier/refactor/unnecessary-else
Remove unnecessary else blocks
2021-09-17 14:56:30 +02:00
ζeh Matt de85a1788b
Merge pull request #15412 from ZehMatt/refactor/ga-results
Allow game actions to store custom data instead of using inheritance
2021-09-16 14:35:03 -07:00
Hielke Morsink 4b4b3333d6
Remove unnecessary else blocks 2021-09-16 18:31:12 +02:00
Gymnasiast bdab3219cb
Modify object loading for JSON-only objects 2021-09-15 11:28:39 +02:00
ζeh Matt 42254d774d
Allow game actions to store custom data instead of using inheritance 2021-09-14 20:25:37 +03:00
IntelOrca 4f319d6ed4
Prepare footpath handling for surfaces and railings 2021-09-12 17:52:01 +02:00
ζeh Matt b733e97bfa
Remove numerics from common.h and use it as needed 2021-09-11 20:21:08 +03:00
ζeh Matt 516232e0a7
Change static casts to EnumValue 2021-09-10 19:10:15 +03:00
ZehMatt 3ad72baaae
Cast fixes 2021-09-10 19:10:12 +03:00
Michael Steenbeek 624a32e93b
Make Coords isNull/setNull functions TitleCase (#15382) 2021-09-08 20:48:53 -03:00
ζeh Matt 07a7946caf
Remove redundant conversions 2021-09-07 22:36:16 +03:00
Gymnasiast 4cc717ccdb
Rework path surface and railings descriptor handling 2021-09-05 19:09:09 +02:00
Michael Steenbeek a40cfae0ff
Merge pull request #15313 from frutiemax/13874_TrackDefinitions
Part of #13874: Add definition field in TrackElementDescriptor
2021-09-05 16:10:11 +02:00
Michael Steenbeek 2f3d4c6861
Merge pull request #15327 from spacek531/rename-ride-validate-function
Some housekeeping
2021-09-05 13:26:56 +02:00
spacek531 ebc201aaf2 comment and rename
refactor to class method

fix formatting

rename function

rename another

rename sub_6C683D

rename loc_6CD18E

annotate ride_get_entrance_or_exit_position_from_screen_position

fix format

rename loop value

fix formatting again

rename functions to TitleCase
2021-09-02 19:47:22 -07:00
Ted John 3c451a4af4
Use music objects instead of IDs 2021-09-01 10:26:23 +02:00
frutiemax 7e5e9bdf13 Part of #13874: Add definition field in TrackElementDescriptor 2021-08-29 20:22:48 -04:00
Michael Steenbeek 4bbee1c6ae
Merge pull request #15261 from frutiemax/13874_refactor
Track Element Descriptor refactor (issue #13874)
2021-08-29 22:38:46 +02:00
ζeh Matt b367f74496
Fix #15199: Construction window is not closed when a ride gets demolished 2021-08-29 22:20:30 +02:00
frutiemax 450bf61ee4 Part of #13874: TrackSequenceProperties, Pricing and MirrorMap renamed 2021-08-29 10:45:17 -04:00
frutiemax b3744f129f Part of #13874: Avoid copies of ted 2021-08-28 18:57:46 -04:00
frutiemax 5f438535ad Part of #13874: Gymnasiast review 2021-08-27 17:57:10 -04:00
frutiemax 046c060e74 Part of #13874: Replace Track Sequence properties 2021-08-22 18:01:03 -04:00
frutiemax a29b369ff8 Part of #13874: Replace Sequence Element Wall table 2021-08-22 17:58:52 -04:00
frutiemax 382315b2c3 Part of #13874: Replace block tables 2021-08-22 17:57:56 -04:00
frutiemax b5219d76d8 Part of #13874: Replace pricing tables 2021-08-22 17:55:17 -04:00
frutiemax 1bfa26e4c5 Part of #13874: replace flags table 2021-08-22 17:51:35 -04:00
frutiemax 80418efafb Part of #13874: Replace TrackCoordinates 2021-08-22 17:49:00 -04:00
ζeh Matt 3ab70b200b
Fix #15255: Wall banner index defaults to 0 instead of null type 2021-08-21 19:24:09 +02:00
Duncan 223b926f8c
Use std::vector for ride use memory (#14884)
* Use std::vector for ride use memory

* Use new system for import/export

* Remove legacy field

* Add replay entity size protection to prevent crash

* Increment network version

* Update replays

* Move function to header

* Move constant to RCT12 header as used for both 1 and 2

* Align naming with nsf
2021-08-17 21:29:35 +01:00
Duncan 940cab87d3
Map size refactors from NSF (#15112)
* Support large map sizes

* Fix top spin painting

* Fix crooked house

* Increase bb size

* Decrease limit back

* Clang format

* Remove asserts and apply review comments

* Fix rebase mistake

Co-authored-by: Ted John <ted@brambles.org>
2021-08-16 20:51:16 +01:00
Michael Steenbeek 8993e4d062
Use ObjectEntryIndex for entrance style 2021-08-15 22:54:43 +02:00
ζeh Matt 175394f15b
Fix #15193: Crash when rides/stalls are demolished 2021-08-15 14:28:08 +02:00
Michael Steenbeek b4f3923162
Name byte_9D8150 2021-08-08 18:10:52 +02:00
Michael Steenbeek 3c86d56933
Merge pull request #15129 from ZehMatt/refactor/clang-tidy-01
Minor cleanup
2021-08-02 22:04:08 +02:00
Ted John 70d9c1438e
Change most things and formatting to money64 2021-08-01 15:14:42 +02:00
Duncan 465d1c5414
Cleanup of Banner related actions (#15126)
* Close #15107. Use correct type and provide appropriate error messages

* Add further error messages to actions

* Apply review comments
2021-07-30 20:53:13 +01:00
ZehMatt fbc689818e
Default initialize ErrorMessageArgs in GameAction Result 2021-07-30 21:31:10 +03:00
ζeh Matt 43b7c3a204
Fix potential nullptr dereference (#15134) 2021-07-30 14:33:48 -03:00
Michael Steenbeek 0b6e80c7d4
Add error message body to failed Place Park Entrance action 2021-07-27 23:50:16 +02:00
Duncan e9eb1b8304
Banner Refactor from NSF (#14788)
* Banner refactor

* Fix mistake in fix_duplicated_banners

* Reduce limit back

* Fix export

* Free banner on delete

* Increment network version

* Fix potential banner pointer crashes

Co-authored-by: Ted John <ted@brambles.org>
2021-07-27 10:25:58 +01:00
ZehMatt e4758df2e9
Fix #15048: Crash removing litter from cheats 2021-07-22 22:14:12 +03:00
Duncan bbef85e752
Fix #15028, #15042. Crash when placing large scenery (#15043)
* Fix #15028, #15042. Crash when placing large scenery

When the fragmented tile element limit is reached whilst placing a large scenery ghost the game will perform a reorg of the map elements invalidating tile element pointers. As large scenery are multi tiled this can happen mid action invalidating the pointer that was allocated for the first tile element. Large scenery actions pass back the first tile element pointer to the calling function for use with ghost removal. When this pointer is invalid it causes the crash. The ultimate fix for this would be to create an undo function for actions. As an interim the function has been modified to return the first tile height.

* Update changelog
2021-07-21 13:01:09 +01:00
duncanspumpkin 6116b490eb
Revert place park entrance change
Incorrectly changed. ParkEntrances can go nearer to the edge.
2021-07-19 12:17:23 +02:00
duncanspumpkin ae6657dcdc
Close #14903. Use map_is_edge 2021-07-19 12:17:22 +02:00
Hielke Morsink bd18bce3a7
Reflect actual string in string identifier (#14958) 2021-06-26 10:00:05 -03:00
Michael Steenbeek 8aeb763402
Fix #14871: Crash in TrackPlaceAction::Execute (#14934) 2021-06-21 16:27:14 -03:00
Duncan 7e84e0ef3f
Fix #14893: Crash in MapCheckCapacityAndReorganise() 2021-06-13 13:34:54 +02:00
Michael Steenbeek 474e00d48b
Remove map_can_construct[_with_clear]_at() and gMapGroundFlags 2021-06-13 10:13:13 +02:00
Michael Steenbeek f9ad9ad3a5
Merge pull request #14868 from Gymnasiast/refactor/reduce-g-game-command-error-text
Reduce usage of gGameCommandErrorText
2021-06-10 13:21:32 +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
Gymnasiast 2da64715cc
Directly call MapCanConstructWithClearAt() 2021-06-09 19:26:11 +02:00
Michael Steenbeek 1031be9078
Fix #14751: Height limitation also affects trees 2021-06-08 22:02:17 +02:00
duncanspumpkin b2c0c3e246 Handle reaching tile element limits more gracefully 2021-06-06 08:28:07 +01:00
Duncan c34079acee
Refactor LargeSceneryEntry and remove rct_scenery_entry (#14816) 2021-06-04 12:41:23 +01:00
Duncan 12c5484f44
Refactor SmallSceneryEntry (#14815) 2021-06-03 22:14:41 -03:00
Duncan 8f59fe91cb
BannerSceneryEntry Refactor (#14810)
* Refactor BannerSceneryEntry to enforce type

* Remove old comment

* Fix incorrect renameing
2021-06-03 21:43:30 +01:00
Duncan 6f81248084
Rework and refactor PathBitEntry (#14809) 2021-06-03 21:23:00 +01:00
Duncan 425f968a67
Rearrange WallSceneryEntry to enforce types (#14808)
* Rearrange WallSceneryEntry to enforce types

* Clang format

Correct inverted nullptr check
2021-06-03 13:26:00 +01:00
Duncan 7253b92cfd
Use correct function call for WallPlaceAction plugin visitor (#14806)
* Use correct function call for WallPlaceAction plugin visitor

* Increment plugin version

* Update changelog
2021-06-02 21:30:49 +01:00
Emre Aydin ac80ca7b46 Refactored code to use a constant for max circuits 2021-06-02 17:48:09 +03:00
Duncan b7e7915efa
Merge pull request #14780 from duncanspumpkin/sprite2
Sprite Refactor 2: Moving around EntityTweener and misc
2021-06-01 20:10:17 +01:00
Michael Steenbeek 31848b195e
Close #14765: Rename gCheatsFastLiftHill 2021-05-29 18:41:16 +02:00
duncanspumpkin 98f9f24909 Remove sprite.h includes where possible 2021-05-29 08:54:33 +01:00
Duncan 39fcc5d078
Split up Sprite header (#14764)
* Remove fields from rct_sprite union

* more header fun

* Fix guest include
2021-05-29 06:01:32 +01:00
Matt 2b4b204ad8
Fix #14724: Money was ignored for ride creation 2021-05-23 19:58:47 +03:00
ζeh Matt 38c7a70025
Fix #14710: Preview not shown without enough money (#14711)
* Fix #14710: Preview not shown without enough money

* Bump up network version

* Add changelog.txt entry
2021-05-23 09:45:48 -03:00
Duncan d22afe2372
Merge pull request #14625 from ZehMatt/refactor/peep
Rename PeepActionType None1/None2
2021-05-13 18:15:54 +01:00
Matt 4c11e11fe2
Rename PeepActionType None1 and None2 2021-05-13 18:05:55 +03:00
duncanspumpkin c345396765
Move duck method into class 2021-05-13 16:09:26 +02:00
Duncan 816bf827ab
Split off a number of entity files into separate headers (#14629)
* Split off a number of entity files into seperate headers

* Get compiling

* Update copyright date
2021-05-13 07:56:24 +01:00
Ryan eb9ed63b0e
Fix some actions for plugins (#14607)
* Fix some actions for plugins

If an action doesn't have an AcceptParameters method, the paramaters passed in executeAction will be ignored and the action will fail.

* Change plugin parameter names

* Increment plugin API version
2021-05-09 22:04:03 +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