Commit Graph

61 Commits

Author SHA1 Message Date
Gymnasiast c158854a7f
Move Park into namespace, add other park-related things to struct 2024-04-04 18:14:27 +02:00
ζeh Matt 84d1f502b1
Rename NO_TRAIN to kNoTrain 2024-03-30 23:18:51 +01:00
ζeh Matt f14b86426d
Remove some unnecessary field assignments in RideCreateAction 2024-03-30 23:18:51 +01:00
Peter Froud 322321645b
Add `STR_ERR_INVALID_COLOUR` 2024-03-30 17:15:14 +01:00
Peter Froud 1f698dfc76
Add `LOG_ERROR` calls 2024-03-30 17:12:54 +01:00
Peter Froud 40537a17fa
General cleanup of existing error messages 2024-03-30 17:12:54 +01:00
Peter Froud 23958186bd
Change `LOG_ERROR` to `LOG_WARNING` for errors 2024-03-30 17:12:53 +01:00
Claudio Tiecher 13e9ff84c2
Part of #21421: Replace define with constexpr (#21626)
* Part of #21421: Refactor RIDE_INITIAL_RELIABILITY in Ride.h

* Part of #21421: Refactor STATION_DEPART_FLAG and STATION_DEPART_MASK

* Part of #21421: Refactor MAX_STATION_PLATFORM_LENGTH

* Part of #21421: Refactor RIDE_RATING_UNDEFINED

* Part of #21421: Refactor TRACK_BLOCK_END

* Part of #21421: Refactor TRACK_PREVIEW_IMAGE_SIZE

* Part of #21421: Refactor based on feedback

* Part of #21421: Fix signed/unsigned mismatch on Win

* Improved consistency kTrackPreviewImageSize

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>

* Part of #21421: kMaxStationPlatformLength to int8

---------

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
2024-03-24 21:49:50 +00:00
Duncan 4b6ba80a46
Move cheats to struct in GameState_t 2024-03-03 22:44:15 +01:00
ζeh Matt 9bfc3a0a29
Zero initialize some fields in ride station 2024-03-02 15:36:27 +02:00
ζeh Matt a9870f8148
Fix #21484: Initialize drops to zero when creating a ride 2024-03-02 15:34:58 +02:00
Harry Hopkinson 7797db10c8
Replace Macros and Notation in Cheats.h, common.h and Context.h. (#21437) 2024-02-23 19:30:35 -03:00
Michael Steenbeek 115e7389a9
Move most gScenario* globals to GameState_t 2024-01-24 22:17:32 +01:00
Hielke Morsink fb420f6516
#21193: Move gParkEntranceFee to GameState_t (#21256) 2024-01-24 13:45:01 +01:00
Hielke Morsink 13351d996e #21193: Move gParkFlags to GameState_t, refactor uses
Also changed a few instances where GetGameState was called inside the same function.
The change in Peep.cpp is needed because of a function conflict. FormatStringID exists both in the global and in the OpenRCT2 namespace.
2024-01-22 16:31:35 +01:00
James103 1d8dc111f1
Replace 2023 with 2024 in copyright headers (#21139)
Replace all instances of the year 2023 with 2024 in all copyright headers
2024-01-01 12:52:28 +01:00
Ken Reese 79b5d814ce
Set default ride price to free if park entrance fee has been set (#20790)
* Set default ride price to 0 if park entrance fee is > 0

* Update changelog and network version

* Update distribution/changelog.txt

Co-authored-by: Matt <5415177+ZehMatt@users.noreply.github.com>

---------

Co-authored-by: Matt <5415177+ZehMatt@users.noreply.github.com>
2023-09-18 08:18:51 +01:00
Gymnasiast 2779e82ced
Return a full error message when the object cannot be found 2023-05-27 14:47:54 +02:00
Michael Steenbeek fd80b4c822
Refactor and clean up date handling (#19666)
* Refactor and clean up date handling

* Remove gDate, remove direct access to days_in_month

* Adjust the MultiLaunch test

* Bump network version

---------

Co-authored-by: ζeh Matt <5415177+ZehMatt@users.noreply.github.com>
2023-04-02 09:25:41 +01:00
Michael Steenbeek dd624f9bff
Replace remaining usages of money16, money32 (#19469)
* Use money64 for ride prices and shop items

* Use money64 for park entrance fee

* Use money64 for gGuestInitialCash

* Use money64 for upkeep costs

* Use money64 for ride value

* Use money64 for marketing campaign cost

* Use money64 for object prices

* Use money64 for land prices

* Use money64 for guest expenditure

* Replace remaining occurrences of money32 with money64

* Update replays

* Bump network version

---------

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2023-03-02 21:55:42 +00:00
ζeh Matt 063d97f4f2
Use fixed size storage for Rides, cleanup interface a bit 2023-02-21 23:20:48 +02:00
ζeh Matt a2a06d6dde
Return const RideObjectEntry*, refactor uses and fix related access 2023-02-05 17:36:37 +02:00
Duncan 7d08372c80
Remove snake_case from Class names OpenRCT2/Ride*-S* (#19232)
* Remove snake_case from Class names OpenRCT2/Ride*-S*

* Clang format
2023-01-20 20:58:55 +00:00
Stephan Spengler 31ea968480
Change openrct2/ride methods to UpperCamelCase, part 2 2023-01-17 17:42:29 +01:00
Hielke Morsink 6b7dc8fcdb
Rename snake_case functions in openrct2/src folder
Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2023-01-17 13:24:51 +01:00
Stephan Spengler 76b918e7ed
Change openrct2/ride methods to UpperCamelCase, part 1 2023-01-17 01:32:54 +01:00
Hielke Morsink 6dafbbfb65
Rename global window functions to TitleCase (#19167) 2023-01-16 20:13:42 +00:00
Michael Steenbeek 412bf8f8be
Use ride references instead of pointers 2023-01-07 14:02:18 +01:00
James103 73738bbdc8
Replace 2022 with 2023 in copyright headers
Replace all instances of the year 2022 with 2023 in all copyright headers
2023-01-01 11:58:01 +01:00
Duncan 5dba30778d
Code style: Remove more snakes from the park, maphelper, scenery. (#18222) 2022-10-08 06:56:17 -03:00
73 b9e677945d
Replace 20XX with 2022 (#18158)
* Replace 2020 with 2022

Replace all 2020 headers with 2022

* replace other years with 2022

add missing years
2022-10-01 08:42:14 +01:00
Michael Steenbeek 31e2d7692c
Rename more instances of “vehicle” to “train” 2022-09-22 11:22:18 +02:00
Hielke Morsink 7f29e4e39c
Make `rct_windowclass` strong type `WindowClass`
This already revealed some places where implicit conversions were done, including some where its use was nonsense (MouseInput.cpp).
The changes to the Intent class were necessary to keep things working, and this splits things up more neatly.
2022-08-21 18:38:25 +02:00
frutiemax 6868b3dcaf
Rename IS_SHOP to IS_SHOP_OR_FACILITY and use it for RideObject 2022-08-06 15:00:52 +02:00
frutiemax 76104cbbee
Use RIDE_TYPE_FLAG_IS_TOILET 2022-08-06 15:00:52 +02:00
Hielke Morsink 2936de5c86
Replace hardcoded 255/0xFF with TUNE_ID_NULL 2022-06-28 22:55:25 +02:00
Bas 078078416b Replace all 'cars_per_flat_ride' 0xFF with 'NoFlatRideCars' 2022-03-04 20:21:15 +01:00
Bas d239529a73 Fix “Disable vehicle limits” cheat giving all new rides 32 trains 2022-03-03 22:26:33 +01:00
Hielke Morsink f06645d2f7
Make stations a private std::array and use getters for access 2022-02-18 23:21:35 +02:00
Hielke Morsink f47c1b9f96
Close #16468: Use TIdentifier for StationIndex 2022-02-18 23:11:07 +02:00
ζeh Matt d7f5003943
Introduce EntityId and refactor everything 2022-02-16 18:56:39 +02:00
ζeh Matt 06e430157f
Use RideId::GetNull and RideId::IsNull over constant 2022-02-12 18:11:18 +02:00
ζeh Matt a2470c0573
Rename ride_id_t to RideId 2022-02-12 18:11:18 +02:00
Duncan 5157b57a15
OpenRCT2 Limits (#16088)
* Move over max rides to limits file

* Move max stations to limits file

* Move over max inversions, golf holes, helices, custhistsize

* Move over max trains per ride

* Bring over Max cars per train and max circuits per ride

* Port over NumColourSchemes and max vehicle colours

* Fix compilation

* Move over max awards

* Move over max peep spawns and park entrances

* Fix rebase issues

* Remove future work

* Switch style

* Update copyright
2022-02-01 20:59:48 +00:00
ζeh Matt dea22ad951
Refactor RideCreateAction to pass entrance object explicitly 2022-01-29 17:07:31 +02:00
Duncan 79b12d2953
Introduce DATLimits.h for RCT2 Dat file object limits (#16034) 2021-12-01 21:55:52 +00: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
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 2597c04eb4
Refactor RideCreateAction result data passing 2021-10-02 00:50:03 +03:00