Commit Graph

2601 Commits

Author SHA1 Message Date
Michael Steenbeek b3d65c9ee6
Merge pull request #17801 from Gymnasiast/fix/17797
Fix #17797: NPE in ride_check_block_brakes()
2022-08-13 17:55:06 +02:00
Ted John b0656122c1
Fix #17784: Colour preset RNG is biased 2022-08-13 17:33:21 +02:00
Gymnasiast 4832e67d14
Fix crash in ride_scroll_to_track_error() 2022-08-13 17:21:34 +02:00
Gymnasiast ec81a5ff14
Fix #17797: NPE in ride_check_block_brakes() 2022-08-13 16:51:48 +02:00
frutiemax 807e080d41
Add RideUpdate to RTD (#17752) 2022-08-13 10:36:43 -03:00
frutiemax a21d9183e6
Add MusicTrackOffsetLength field to RTD (#17684) 2022-08-13 09:56:05 -03:00
frutiemax 2202f8d060
Add ConstructionWindowContext field to RTD (#17749) 2022-08-13 09:18:56 -03:00
spacek531 48530026a2
Flying coaster track additions 2022-08-10 22:54:33 +00:00
Michael Steenbeek 5661da1c68
Unwrap game action compat wrappers 2022-08-11 00:00:58 +02:00
frutiemax 59c31e8b7a
Add AccelerationFactor field to RTD (#17687) 2022-08-09 22:20:07 -03:00
frutiemax 9cd6c646a9
Add UpdateMeasurementsSpecialElements field to RTD (#17659) 2022-08-09 22:18:15 -03: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 2d75858589
Add IS_FIRST_AID flag 2022-08-06 15:00:52 +02:00
frutiemax 76104cbbee
Use RIDE_TYPE_FLAG_IS_TOILET 2022-08-06 15:00:52 +02:00
Gymnasiast ab68d7d631
Remove ride type check in JuniorRollerCoaster.cpp 2022-08-06 12:19:27 +02:00
frutiemax d6d43e5b0b
Remove ride type check for reverser upkeep cost 2022-08-05 21:56:28 +02:00
spacek531 468084a401
Move supported track pieces return type to BitSet 2022-08-05 18:55:30 +00:00
Michael Steenbeek 840f497d85
Merge pull request #17663 from frutiemax/RTD_PoweredLaunchBlock
Convert PoweredLaunch to PoweredLaunchBlockSectioned when block brake
2022-08-03 20:09:36 +02:00
Gymnasiast b54ef13c4f
Implement cleaner method for checking mode availability 2022-08-03 19:42:43 +02:00
Michael Steenbeek 80f0d952ad
Merge pull request #17638 from X123M3-256/new_track_pieces
Add new track pieces to the hybrid and single rail
2022-08-01 23:24:22 +02:00
Gymnasiast d3fd31c611
Rename rct_string_id to StringId 2022-07-31 22:30:13 +02:00
Hielke Morsink d05d675ed9
Refactor window functions to take references 6 2022-07-31 17:23:17 +02:00
Hielke Morsink a258008bef
Refactor window functions to take references 4 2022-07-31 17:23:16 +02:00
Rik Smeets 889293f2b7
Lower default price for the Crooked House (#17655)
Guests didn't want to pay the previous default price,
even if the ride was brand new.
2022-07-31 14:07:36 +02:00
frutiemax e96f428c7b
Add RIDE_TYPE_FLAG_HAS_SEAT_ROTATION for multi-dim rollercoaster 2022-07-31 12:01:22 +02:00
Hielke Morsink 099b3c939b Apply regular expressions to format tables 2022-07-31 10:22:46 +01:00
X123M3-256 da472ff033 Remove unnecessary changes 2022-07-31 10:22:45 +01:00
X123M3-256 f77a2386ca Remove excess newlines from VehicleSubpositionData 2022-07-31 10:22:45 +01:00
X123M3-256 0347ee62cb Remove apparently redundant cast 2022-07-31 10:22:45 +01:00
X123M3-256 8090eab2a3 Fix comments in TrackData 2022-07-31 10:22:45 +01:00
X123M3-256 3b7cd1194c Fix formatting 2022-07-31 10:22:44 +01:00
X123M3-256 77c5bbcafe Finalize track data and G forces 2022-07-31 10:22:04 +01:00
X123M3-256 15d82db8fd Implement zero g rolls, large corkscrews and medium loops 2022-07-31 10:22:00 +01:00
frutiemax aab94437dc
Add RIDE_TYPE_FLAG_HAS_ONE_STATION for gokarts and minigolf 2022-07-31 02:16:48 +02:00
Michael Steenbeek 0bfc151ab9
Remove remaining usages of gGameCommandErrorText 2022-07-30 18:04:59 +02:00
frutiemax d556eafc73
Add LightFXAddLightsMagicVehicle to RTD (#17211) 2022-07-30 16:45:41 +02:00
Michael Steenbeek 5a5b107245
Refactor Twist rotations, fix truncating of operating value (#17636) 2022-07-30 16:32:22 +02:00
Hielke Morsink e2da19f0f7
Add missing includes 2022-07-29 18:45:10 +02:00
Michael Steenbeek 2b859c7099
Remove __ENABLE_LIGHTFX__ define
It is already enabled for all our builds, and upcoming changes to RTD would add a slew more.
Discussed in team chat with Duncan and Hielke.
2022-07-28 21:34:02 +00:00
Michael Steenbeek 6852b184b6
Fix #17541: Station style not correctly saved to TD6 2022-07-28 14:23:53 +02:00
Michael Steenbeek a75cc10dd5
Refactor Ride::Open, Ride::Test not to use gGameCommandErrorText 2022-07-28 14:23:33 +02:00
Michael Steenbeek 1a8660d59d
Pass window reference to tool_set (#17625) 2022-07-27 22:22:22 -03:00
frutiemax a3ce24658c
Add StartRideMusic field to RTD 2022-07-27 23:50:20 +00:00
frutiemax bc72c7e24c
Add UpdateLeaveEntrance field to the RTD (#16986)
Co-authored-by: frutiemax <frutiemax@users.noreply.github.com>
2022-07-26 19:33:54 -03:00
Michael Steenbeek 3f56a0eac9
Fix stray white line 2022-07-26 20:08:05 +01:00
Raymond Zhao 4f23e5e9ec
Refactor struct TrackDesignFileRef
- Refactors track_design_file_ref to TrackDesignFileRef and replaces the utf8* fields of that struct with u8string
- Gets rid of some String::Duplicate() and delete calls
- Uses a bunch of c_str() calls to interface with older functions
2022-07-26 16:12:46 +00:00
Nikolas Parshook 628da77c0e
Refactor ride construction window (#17578) 2022-07-26 15:17:25 +01:00
frutiemax bf432cc943
Add name field to RideTypeDescriptor structure 2022-07-25 00:06:37 +02:00
X123M3-256 55c8a3d775
Add extra vehicle sprite groups (new track pieces part 1) (#17352)
* Add new sprite groups for zero G rolls

* Fix formatting

* Rename vehicle paint functions

* Fix formatting

* Fix parameter name

* Fix formatting
2022-07-24 05:40:41 +01:00
Karst a74acee961
Fix: Wrong boundboxes for tunnels & terrain. (#17312)
* Edit Boundboxes

* Make all code consistent

Eight is the magic number
2022-07-21 07:57:49 +01:00
8street 213696ea27
Add option to sell merchandise in random colours
Co-authored-by: 8street <nikolai_e@rambler.ru>
2022-07-12 22:20:49 +00:00
underdoom fe2f1bad5a
Remove unwanted condition in ride_ratings_update_state_5 2022-07-12 19:58:40 +02:00
Gymnasiast 8871760472
Rename car entry animation flags 2022-07-11 18:06:22 +02:00
Gymnasiast 06c368694a
Update variables containing a CarEntry 2022-07-11 18:06:22 +02:00
spacek531 312ad3e3ce
Warn user if unsupported vehicle or element used 2022-07-04 19:06:59 +00:00
Gymnasiast d42e67ddfe
Reformat the ifs, remove unnecessary parameter 2022-07-01 23:26:40 +02:00
Gymnasiast d936aa48e1
Fix #17481: Roto-drop cars try going up to the wrong top pieces 2022-07-01 18:23:03 +02:00
Hielke Morsink 2936de5c86
Replace hardcoded 255/0xFF with TUNE_ID_NULL 2022-06-28 22:55:25 +02:00
Ted John 83758de284 Prevent ride music popping in loudly 2022-06-28 00:16:40 +01:00
Ted John 585ebed600
Fix #17297: Crash when switching language (#17370)
* Refactor all uses of IAudioChannel and the audio mixer.
* Use shared_ptr to avoid dead pointers hanging about.
* Reload particular audio channels where necessary after object reload.
2022-06-27 17:41:53 +01:00
Basssiiie 4d8dd516bf
Fix plugin ‘Car.travelBy()’ moving other cars as well (#17369) 2022-06-26 20:28:54 +01:00
ywnico 2d9e2de603
Fix: Wrong T-shirt colors when riding Twist (#17433)
A typo in the code had caused the wrong ImageId object to be used when
painting the peeps, resulting in their T-shirts being set to the ride
colors. The peeps are now painted with the correct T-shirt colors.
2022-06-23 07:07:59 +01:00
Gymnasiast 20f458b561
Remove outdated comment 2022-06-21 19:05:31 +02:00
Hielke Morsink 13db5a771b
Annotate hardcoded arrays and verify their sizes
This also reduces the number of lines within // clang-format comments
2022-06-16 23:51:24 +02:00
autofire372 d76a21551a
Fix #17381: wrong stat penalty on APVC
Co-authored-by: duncanspumpkin <duncanspumpkin@users.noreply.github.com>
2022-06-13 18:31:26 +00:00
frutiemax 9c796816a1
Add DesignCreateMode field to the RTD (#16987) 2022-06-13 08:39:37 -03:00
Hielke Morsink b0ffa9d28e
Add missing includes to VehicleEntry.h (#17376) 2022-06-11 13:48:57 -03:00
Ted John dda5402644 Allow ride music to loop seamlessly without reload 2022-06-08 00:28:57 +01:00
Michael Steenbeek 3fae2413db
Use “car” instead of the ambiguous “vehicle”, part 1
Currently, the word “vehicle” is used for both “train” and “car”. This is a first effort towards disambiguation.
2022-06-07 20:36:20 +00:00
frutiemax 0791b221e5
Add MusicUpdateFunction field to RTD 2022-06-06 21:00:16 +02:00
X123M3-256 4b11a4fc6a
Remove incorrect flags from alpine coaster (#17347) 2022-06-06 20:10:56 +02:00
Michael Steenbeek 88b3e88bdd
Remove Testpaint (#17333)
TestPaint served us well, but it hasn’t compiled for years, and before that it produced incorrect results for years.
2022-06-06 10:07:07 +02:00
spacek531 673ec0fa10
Frames rotation count part 1 (#17106)
Refactor vehicle sprite groups

rename rotationType to spriteGroup

remove numframes getters from scobject

add sprite groups getters

add documentation to plugin

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2022-06-03 23:03:02 +01:00
X123M3-256 502f06af91
Add "Alpine Coaster" ride type (#16825)
* Implement "Alpine Coaster" ride type


Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2022-05-26 21:28:17 +00:00
Ted John 97c0c4e052
Merge pull request #16975 from IntelOrca/plugin/track-segments
[Plugin] Add APIs for track segments and track iteration
2022-05-26 20:33:53 +01:00
Ted John 2effca59d1 Fix audio source leak 2022-05-23 22:24:56 +01:00
Ted John a2e6691ac2 Add new audio objects for loading sounds 2022-05-23 22:24:56 +01:00
Ted John 4eef86dc50 Implement track iterator 2022-05-17 19:27:39 +01:00
Gymnasiast 4c4a20af81
Load Spiral Slide images from the object 2022-05-14 23:48:36 +02:00
Ted John 0b9184b99b Avoid overwriting _currentTrackPieceDirection when placing TD 2022-05-10 22:41:09 +01:00
Matt aea88b7320 Fix #13997: Placing track design influences clients ride construction 2022-05-10 21:58:51 +01:00
germanaizek 958bfbc08a
Using std::move(), correct clear strings, better use '= default;', modernize make_* and replace heavy strlen 2022-05-07 16:05:39 +02:00
frutiemax 275e970d69
Add RIDE_TYPE_FLAG_IS_CASH_MACHINE flag to RTD (#17130)
* Add RIDE_TYPE_FLAG_HAS_CASH flag to RTD

* Rename to RIDE_TYPE_FLAG_IS_CASH_MACHINE
2022-05-04 19:37:11 +01:00
frutiemax c1065db88f
Add Classification field to RTD (#17131) 2022-05-03 23:32:00 -03:00
frutiemax 8ab1258af7
Close #15353: Add VerticalFactor and LateralFactor fields to TrackElementDescriptor (#15401)
Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
2022-05-03 23:27:16 -03:00
spacek531 22c44fac71
Cleanup vehicle drawing code part 4 (#17105)
* Refactor VehiclePaint to take into account NumRotationFrames

* Reduce copied code
2022-04-30 11:26:55 +01:00
spacek531 5659d43f46
Cleanup vehicle drawing code part 3 (#16968)
* Cleanup vehicle drawing code part 3

* Create functions to convert between rotation amounts

* Add regions to ease code navigation
2022-04-30 07:56:23 +01:00
Michael Steenbeek 4d2ca33c2f
Use more constants in WoodenRollerCoaster.cpp 2022-04-25 23:32:26 +02:00
norisa118 483548120b
Fix #16879: TED::Price is price modifier, not price (#16962)
* Fix #16879: TED::Price is price modifier, not price

Change unit type to uint32_t, change name to 'PriceModifer' &
add comment on how to use PriceModifier.
2022-04-14 20:36:39 +01:00
Ivan 9c04024537
Close #16933: Rename car_visual to PaintStyle (#16969) 2022-04-11 23:18:18 -03:00
spacek531 5ecb7a6c6a
Cleanup vehicle drawing code part 2 (#16960) (#16960)
* Rename assembly variable names

* Repurpose unused rct_ride_entry_vehicle field for NumRotationFrames
2022-04-10 21:26:00 +01:00
spacek531 e699e96f38
Cleanup vehicle drawing code part 1 (#16956)
* rename some constants based on pitch index

* rename functions based on pitch index
2022-04-09 21:40:54 +01:00
Michael Steenbeek e9213e3ecf
Fix switched order of imageids on looping coasters (#16951) 2022-04-09 00:34:55 -03:00
Duncan 9c9b554813
Fix #16890. Incorrect rotation for splash boats (#16949) 2022-04-09 00:32:17 -03:00
Duncan 5760f11349
Simplify Track Cost calcs (#16940)
* Multiply out 5 in track cost calcs and use _GBP

* Fix typo on Hypercoaster conversion

* Use two decimals for literals converted by _GBP

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2022-04-07 11:35:11 +01:00
Michael Steenbeek 765bc59acd
Merge pull request #14207 from geoff-B/money32-UDL
#14093 User defined literals for Money32
2022-04-06 15:29:26 +02:00
X123M3-256 605112297d
Implement RIDE_ENTRY_FLAG_RIDER_CONTROLS_SPEED (#16837) 2022-04-06 08:38:24 -03:00
Hielke Morsink 7db9aeb709
Remove max queue length limit 2022-04-05 19:55:47 +02:00
Charles Machalow 0ece5d0f44
Add a new cheat to disable queue length limits 2022-04-02 20:07:06 +02:00
Tulio Leao 4bb17e643b Make whole ShopItems array use _GBP 2022-03-29 07:23:35 -03:00
Geoff Banh 85baa6f7ca Fix #14093: Replace MONEY macro with user defined literal 2022-03-29 07:23:35 -03:00
Rik Smeets 4e8ea47e1b
Guests with umbrellas no longer always avoid Maze when it rains (#16859)
Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2022-03-28 23:26:56 -03:00
spacek531 047a7f8090
Do not turn off chain when building downhill if chain cheat is on 2022-03-28 20:34:37 +00:00
X123M3-256 f5507c42e0
Add RIDE_TYPE_FLAG_UP_INCLINE_REQUIRES_LIFT 2022-03-28 21:32:42 +02:00
Michael Steenbeek 18be90f8b6
Split TRACK_SLOPE_STEEP into flags for up and down 2022-03-21 21:05:59 +01:00
Ted John fc2ed95641
Merge pull request #16831 from IntelOrca/feature/ternary-scenery-colours
Implement tertiary colours for small and large scenery objects.
2022-03-20 19:24:47 +00:00
Ted John 793acf67ae Implement small scenery ternary colours 2022-03-20 18:53:11 +00:00
Michael Steenbeek e78c29ea5c
Fix most occurrences of ‘ternary’ (#16832) 2022-03-20 19:22:05 +01:00
Ted John e9e377ac09 Implement large scenery ternary colours 2022-03-20 18:12:39 +00:00
Ted John f909be7a43
Merge pull request #16797 from IntelOrca/feature/enhanced-transparency
Introduce more transparency toggles and allow each one to be set to either an invisible or ghost state which is a persisted user setting.

A new window is introduced to control these settings and is inspired by OpenTTD.
2022-03-20 17:56:08 +00:00
Duncan d266743083
Fix #16808: Incorrect serialisation of track design object (#16817) 2022-03-18 07:10:19 -03:00
Ted John 61f1e13c0b Refactor viewport flags 2022-03-14 21:57:05 +00:00
Ted John c68359662d Refactor visibility control 2022-03-14 21:57:05 +00:00
Ted John 8aafab2a70 Split paint item into element and entity 2022-03-14 21:55:15 +00:00
Ted John ba2fea88fd Fix build failure 2022-03-14 21:55:07 +00:00
Kane b83e21a953 Improve code readability (added parentheses) 2022-03-14 21:43:12 +00:00
Kane 20cd8465f5 Code cleanup, remove ignore_invisible_flag.
Known issues:
- Some flat-rides have transparency issues
2022-03-14 21:43:12 +00:00
Kane 3d3271a5ec Misc. clean ups
Define see-through paint colours in Paint.h for global use
Color staff sprite button
Change ride->is_visible bool to ignore_invisible_flag bool
Add shortcut to open transparency options (CTRL+T)
2022-03-14 21:41:49 +00:00
Kane 2e93e42a71 More finishing touches
- Changes all references of `VIEWPORT_FLAG_INVISIBLE_PEEPS` to `VIEWPORT_FLAG_INVISIBLE_GUESTS` and `VIEWPORT_FLAG_INVISIBLE_STAFF`
- Updates Invisible People menu item and shortcut.
- Added new viewport flags into the `viewport_set_visibility` function
- Invisible options only work if see-through is activated as well
- Added see-through supports

- Regression: Exclude ride from invisible no longer works (ride is still see-through)
2022-03-14 21:40:27 +00:00
Kane e134be9538 Implement more options
- Invisible guests
- Invisible staff
- See-through trees
- Invisible trees
- Strings/Ids
2022-03-14 21:38:46 +00:00
Kane 204f8ceac1 Add new Transparency options window.
Remove added options from Top Toolbar.
Move invisible ride code into ride paint functions.
Move invisible vehicle code into sprite paint function.
2022-03-14 21:37:41 +00:00
duncanspumpkin 7a36e34782 Apply review comments 2022-03-12 07:26:34 +00:00
duncanspumpkin 68d0d05d49 Remove extra non rotated PaintAddImageAsChild 2022-03-11 21:45:12 +00:00
duncanspumpkin 763aae70f7 Fix regex fail 2022-03-11 21:45:12 +00:00
duncanspumpkin 39c8fda4e6 Apply regex to PaintAddImageAsChildRotated 2022-03-11 21:45:12 +00:00
duncanspumpkin b7aa5ebd2e Correct failures 2022-03-11 13:55:01 +00:00
duncanspumpkin a5a00517ea Apply regex on PaintAddImageAsParentRotated2 2022-03-11 13:45:00 +00:00
Duncan b6175bb556
Apply regex for PaintAddIMageAsParentRotated (#16775)
* Apply regex for PaintAddIMageAsParentRotated

* Remove unused function
2022-03-11 13:36:55 +00:00
Bas 078078416b Replace all 'cars_per_flat_ride' 0xFF with 'NoFlatRideCars' 2022-03-04 20:21:15 +01:00
Duncan 66b8f283eb
Rename flag and reorg ghost remove flags (#16734) 2022-02-27 22:39:55 +00:00
Hielke Morsink ba85cf4873
Close #15896: Refactor out the ZoomLevel operators 2022-02-26 23:14:59 +01:00
ζeh Matt f27d0ff3b0
Merge pull request #16359 from ZehMatt/refactor/didpasssurface
Refactor out DidPassSurface
2022-02-26 12:43:40 -08:00
spacek531 466c8b4b89
rename vehicle position variables (#15370) 2022-02-25 07:21:45 +00:00
ζeh Matt d9bdc1441f
Rename IsPassedSurface to PassedSurface and cleanup values 2022-02-25 01:21:36 +02:00
ζeh Matt b5d6abdd22
Refactor out DidPassSurface and rename Unk141E9DB to Flags 2022-02-25 00:34:24 +02:00
GalBr f44d944b26
Refactor DodgemsCarWouldCollideAt to return optional (#16695) 2022-02-24 21:29:11 +00:00
Michael Steenbeek 70121eae38
Close #14484: Make the Heartline Twister ratings less hateful (#16680)
This raises two parameters: the base excitement value (which is very low, especially since the air-time bonus is limited too) and the bonus value (the novelty of this ride type warrants a bigger value).
It leaves the rest of the poor bonuses as-is, as some of them (like scenery and synchronisation bonuses) might just be there because the track obscures the view.
2022-02-23 11:24:02 +01:00
spacek531 05b80acfa1
Rename VAR_C4 (#16217) 2022-02-22 20:14:42 -03:00
spacek531 82378c09c3
Rename VAR_CE and its unions (#16215) 2022-02-20 23:20:06 -03:00
Hielke Morsink 5c5f86ac42
Correct some mistakes 2022-02-18 23:28:21 +02:00
Hielke Morsink ad0a2a8f96
Remove entrance/exit location functions 2022-02-18 23:28:17 +02:00
Hielke Morsink 2137cea3bb
Reduce use of UnderlyingType 2022-02-18 23:21:38 +02: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 4b73923425
Access properties with full name 2022-02-18 23:11:11 +02:00
Hielke Morsink 054f7392a1
Let index underflow for reverse loops 2022-02-18 23:11:11 +02:00
Hielke Morsink f47c1b9f96
Close #16468: Use TIdentifier for StationIndex 2022-02-18 23:11:07 +02:00
Michael Steenbeek 5edc561715
Close #11437: Migrate old platform methods 2022-02-18 21:57:00 +01:00
Michael Steenbeek 4c046024a3
Merge pull request #16640 from ZehMatt/refactor/entityid-16469
#16469: Introduce EntityId and refactor everything
2022-02-18 21:29:23 +01:00
Karst d0c019d222
Fix #16674: Double support on B&M left inline-twist (up to down) 2022-02-17 19:22:24 +01:00
ζeh Matt ff1eb583fc
Make clang-format happy 2022-02-16 18:56:43 +02:00
ζeh Matt d7f5003943
Introduce EntityId and refactor everything 2022-02-16 18:56:39 +02:00
Ted John 45040cd34a More code review changes 2022-02-14 23:15:59 +00:00
Ted John 454bfb0a8f Refactor map size to allow for rectangle maps 2022-02-14 23:15:59 +00:00
Michael Steenbeek 34aafa5e14
Merge pull request #16638 from Gymnasiast/fix/16576
Fix #16576: Cannot select vehicle types with entry index >= 256
2022-02-13 21:33:53 +01:00
Karst 9dd54b9ee1
Add Inline Twist to B&M Track (#16389)
This adds the inline twist to the B&M track.

Feature is complete. Note: The inline twist doesn't draw correctly when going out of the tunnel. This is sadly an original bug, as this is also present on the Flying RC's Flying Twist (#7466).
2022-02-12 22:31:08 +01:00
Gymnasiast 49ccc21d84
Fix #16576: Cannot select vehicle types with entry index >= 256 2022-02-12 20:43:45 +01:00
ζeh Matt 004cf02c26
Fix variable name type conflict 2022-02-12 18:15:19 +02:00
ζeh Matt 1fe6c0618b
Fix clang format 2022-02-12 18:11:18 +02:00
ζeh Matt 06e430157f
Use RideId::GetNull and RideId::IsNull over constant 2022-02-12 18:11:18 +02:00
ζeh Matt 4554d6d883
Fix all uses of RideId 2022-02-12 18:11:18 +02:00
ζeh Matt 2c72940cfd
Use TIdentifier for RideId 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
GalBr b5f649c972
Fix peeps not showing on one side of pirate ship (#16499)
This commit fixes this bug by adding a missing ^ operator on frameNum.
Before a recent refactor, the framenum was changed to the mirrored one
with "^ 1", but it was omitted. Using "^ col" when col is 0 or 1, adds
this back.
2022-02-04 22:04:50 +01:00
Johan Mattsson c00cc90b1f
Fix bounds checks and a nullptr check 2022-02-03 21:42:12 +01:00
ζeh Matt aed98b5d82
Initialize track data table at compile time 2022-02-02 21:10:32 +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 19dca61ee8
Fix #16535: Entering construction mode unblocks all paths 2022-01-31 23:05:26 +01:00
ζeh Matt dea22ad951
Refactor RideCreateAction to pass entrance object explicitly 2022-01-29 17:07:31 +02:00
Michael Steenbeek 9f74c7081b
Create definitions for u8string and u8string_view 2022-01-25 16:41:45 +01:00
Silent 4172f3eb4e
Close #16493: Boat Hide and Submarine Ride have odd support costs 2022-01-24 11:40:29 +01:00
Michael Steenbeek d97ecdd981
Fix #13336: Can no longer place Bumble Bee track design 2022-01-20 10:56:27 +01:00
Gymnasiast 92f38c566a
Fix music style check for ‘niceness’ 2022-01-19 13:25:00 +01:00
ζeh Matt 993b168bfd
Implement profiler (#16194)
* Implement profiling API

* Add console commands for the profiler

* Remove accidental line

* Correct csv output

* Add copyright notice

* Add missing override

* Add default virtual destructor

* Explicitly pass template argument

* Use static

* Add plugin API for profiler

* Add more profile calls

* Workaround for GCC hopefully

* Add missing static keyword

* Use uint64 for call count

* Reduce name length see if CI passes

* Improve handling of function names

* Work around (broken) static inline variables

* Fix missing include

* Disable profiler for clang 5 and older

* Update copyright date

* Profile UpdateAllMiscEntities

* Apply review suggestions

Co-authored-by: Ted John <ted@brambles.org>
2022-01-18 20:21:20 +02:00
spacek531 ef77f9c2c1
Fix flying RC track availability 2022-01-16 13:14:27 +01:00
GalBr f2f47aa492
Fix TrackDesignPreviewDrawOutlines using a local struct
TrackDesignPreviewDrawOutlines created and modified a local
TrackDesignState struct, so the calculated information was lost.
Now the function receives a ref to a TrackDesignState struct.
2022-01-15 21:24:59 +01:00
Duncan 667f3e856d
Merge pull request #16439 from duncanspumpkin/fix_16276
Fix #16276. Paths on trackdesigns not connecting on placement
2022-01-15 15:14:54 +00:00
Duncan 7e46427059
refactor ride track groups to use new bitset (#16172) 2022-01-15 07:50:00 +00:00
duncanspumpkin 81b490b0bc Fix #16276. Paths on trackdesigns not connecting on placement 2022-01-15 07:11:07 +00:00
Michael Steenbeek 788697a7c1
Use static constexpr const for image ids 2022-01-08 23:28:29 +00:00
GalBr fae4e6323f
Fix #16234: Wrap vehicle colors when there are more than 32 trains (#16323)
* Wrap vehicle_colours in TrackDesignAction

* Wrap the color presets in set_vehicle_colours_to_random_preset

* Increment network version

* Update changelog.txt

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2022-01-08 19:03:58 -03:00
Michael Steenbeek ca27c2181b
Clean up two hardcoded vehicle maxes 2022-01-05 14:16:16 +01:00
Michael Steenbeek fa9ef5728e
Merge pull request #16298 from Gymnasiast/refactor/rotation-frames-1
Clean up ride object rotation frames
2022-01-03 14:26:47 +01:00
Michael Steenbeek c468a6b197
Merge pull request #16332 from Gymnasiast/refactor/screams
(Re)name some scream-related symbols
2022-01-01 10:55:59 +01:00
ζeh Matt 2329d3d681
Refactor tile access to be continuous when iterating 2021-12-30 23:03:32 +01:00
Michael Steenbeek 678dd0f69f
Merge pull request #16195 from frutiemax/ForwardDeclareFormatter
Forward declare Formatter
2021-12-30 23:01:42 +01:00
Gymnasiast f1f6ac4177
Order scream sounds by name 2021-12-30 22:29:34 +01:00
Gymnasiast 0f2ad4ac40
(Re)name some scream-related symbols 2021-12-30 22:29:14 +01:00
Michael Steenbeek c7f87d3aa9
Merge pull request #16310 from frutiemax/ted_description
Add description field to TrackElementDescriptor
2021-12-30 22:26:08 +01:00
frutiemax adb692b74e Forward declare Formatter 2021-12-30 12:17:51 -05:00
Hielke Morsink 66bd4b4894
Remove unused includes from TrackDesign.cpp 2021-12-30 17:18:16 +01:00
frutiemax 95c63832bb Replace zeros with STR_EMPTY 2021-12-30 11:07:03 -05:00
Gymnasiast 3c8558bba0
Use uint32_t in more places 2021-12-30 12:27:43 +01:00
Gymnasiast b09898ab3b
Clean up ride object rotation frames 2021-12-30 12:26:21 +01:00
frutiemax 36f0cce65b Add description field to TrackElementDescriptor 2021-12-25 09:55:03 -05:00
spacek531 52d55f5341 refactor ride track groups to use new bitset
remove erroneous value from dummy rtd

make comment more descriptive

remove comment
2021-12-23 02:17:57 -08:00
Gal B 343f9bbca0 Refactor maze_set_track to use const CoordsXYZD& 2021-12-22 18:48:37 +02:00
Karst ee6296215b
Close#16132: Add Inline Twist to Corkscrew Roller Coaster
The code for this sadly did not exist yet in any other coaster. The sprites did though. So I pulled the sprites from the lay-down coaster and modified the regular inline twist (instead of the flyer) to be drawn correctly.
2021-12-19 18:36:36 +01:00
Michael Steenbeek 25cb49f8ce
Pass paint_session as reference 2021-12-19 14:48:00 +00:00
Michael Steenbeek 2cf62abf85
Fix #16188: B&M tracks support incorrect in single angle 2021-12-19 14:48:53 +01:00
Gymnasiast 86df2b0ea7
const auto* stationObj 2021-12-18 23:22:29 +01:00
Gymnasiast db3048ac67
Fix formatting 2021-12-18 23:22:29 +01:00
Gymnasiast 9d3b76388a
Pass Ride ref to individual track paint functions 2021-12-18 23:01:39 +01:00
Gymnasiast 85e1326832
Pass Ride ref to track_paint_util_draw_pier() 2021-12-18 22:58:26 +01:00
Gymnasiast 089c231224
Pass Ride ref to station drawing function 2021-12-18 22:58:26 +01:00
Gymnasiast cf6c1d0a40
Pass Ride ref to track_paint_util_draw_narrow_station_platform() 2021-12-18 22:58:26 +01:00
Gymnasiast bd500d7d93
Pass ref to Ride in track_paint_util_has_fence() 2021-12-18 22:58:26 +01:00
Gymnasiast 76f6fa1b0d
Remove superfluous ride null checks 2021-12-18 22:58:24 +01:00
Michael Steenbeek 4005d3b86a
Make Ride::GetStationObject() const 2021-12-18 20:49:24 +00:00
Gymnasiast ef6f2cceee
Create RideConstruction.h 2021-12-18 20:27:13 +01:00
Gymnasiast 517fbe2d8d
Remove unused ride_entry_get_train_layout() 2021-12-18 18:49:29 +01:00
Gymnasiast 449da0d6bd
Convert ride_get_station_object() to method 2021-12-18 18:48:52 +01:00
spacek531 35d4410fb5
Remove VAR_CF union and fix mini golf mistake (#16216)
Mistake in mini golf implementation meant that the brake_speed (var_cf) was being set from the seat rotation instead of the booster brake speed. Mini golfs do not use seat rotations or booster brakes but for consistency reasons this has been fixed anyway.
2021-12-14 07:25:36 +00:00
Gymnasiast 4ebc23ad36
Move ride_get_total_time() to method 2021-12-12 13:00:28 +01:00
Gymnasiast 5e8a204365
Move ride_get_total_length() to method 2021-12-12 13:00:28 +01:00
Gymnasiast 9b81bacecd
Move ride_remove_peeps() to method 2021-12-12 12:31:19 +01:00
Gymnasiast 7559354d25
Move ride_update_popularity() to method 2021-12-12 12:30:22 +01:00
Gymnasiast 6df7c1e3b0
Move ride_update_satisfaction() to method 2021-12-12 12:30:22 +01:00
Michael Steenbeek b4f256be87
Merge pull request #16151 from IntelOrca/refactor/imageid-painting
Refactor most map paint routines to use ImageId
2021-12-12 11:43:31 +01:00
Michael Steenbeek 27cbb6c6ae
Merge pull request #16190 from Gymnasiast/refactor/normalised-tile-element-type-3
Part of #15485: normalise all OpenRCT2 tile element types
2021-12-12 09:53:09 +01:00
Ted John 4e9ca39c4a Refactor station covers to use ImageId 2021-12-11 23:07:55 +00:00
Ted John 6cbf87cab3 Refactor paint vehicle to ImageId 2021-12-11 23:06:21 +00:00
deurklink ceb49e0984
Fix: #16162 Go Kart speeds not correctly randomised (#16165)
* Fix Go Kart Speeds not being random

Go kart speeds now only get 2 different values (around 37kmh or around 25kmh), in vanilla Go karts can also have a value in between. This PR fixes that.

* Update changelog.txt

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

* Increment network version

* Update replays

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2021-12-11 17:11:23 +00:00
Gymnasiast aa34f0f760
Drop the N postfix 2021-12-11 00:39:39 +01:00
Gymnasiast fc3ce3294c
Move over switches to normalised tile element types 2021-12-11 00:30:59 +01:00
Gymnasiast 50c0080da8
Update calls to ClearAs() 2021-12-10 22:58:27 +01:00
Michael Steenbeek 2d1af0ec42
Replace many GetType() calls with GetTypeN() 2021-12-10 22:43:17 +01:00
Ted John 54ed1ecd05
Fix #16155: Paint issue on Swinging Ship 2021-12-09 20:41:16 +01:00
Ted John 8c65e39ce9
Merge pull request #16137 from OpenRCT2/refactor/imageid-rides
Refactor ride painting to use ImageId
2021-12-07 20:11:13 +00:00
Michael Steenbeek ea099c0d2d
Merge pull request #16129 from Gymnasiast/refactor/normalised-tile-element-type
Part of #15485: Use normalised tile element type enum for setting type
2021-12-07 11:50:54 +01:00
Duncan fdfd9b4760
Make track designs NSF map size safe (#16116)
* Make track designs NSF map size safe

* Increment network version
2021-12-06 16:58:50 +00:00
Ted John 9a7ff47690 Refactor paint enterprise to use ImageId 2021-12-05 23:05:14 +00:00
Ted John 17350d5766 Refactor paint magic carpet to use ImageId 2021-12-05 23:05:14 +00:00
Ted John 8a4929a240 Refactor paint swinging inverter to use ImageId 2021-12-05 23:05:13 +00:00
Ted John f628f53e3f Refactor paint ferris wheel to use ImageId 2021-12-05 23:05:13 +00:00
Ted John 9d7471da1e Refactor paint swinging ship to use ImageId 2021-12-05 23:05:13 +00:00
Ted John b759f9ab39 Refactor paint motion simulator to use ImageId 2021-12-05 23:05:13 +00:00
Ted John 7eb44b580f Refactor paint 3D cinema to use ImageId 2021-12-05 23:05:13 +00:00
Ted John 8b71136056 Refactor paint merry go round to use ImageId 2021-12-05 23:05:13 +00:00
Ted John a4e0a5ab07 Refactor simple rides / shops to use ImageId 2021-12-05 23:05:13 +00:00
Ted John 70506d2216 Refactor paint top spin to use ImageId 2021-12-05 23:05:13 +00:00
Ted John a8505dc689 Refactor paint twist to use ImageId 2021-12-05 22:18:52 +00:00
Gymnasiast 91635a5047
Replace SetType and old strong enum with normalised 2021-12-05 13:54:01 +01:00
Karst 32b4fc0ca3
Make Looping Coaster draw missing sprites from LIM Launched Coaster 2021-12-05 13:27:42 +01:00
ζeh Matt 7cfb5832c4
Fix #16075: Track designs save scenery in wrong location 2021-12-04 12:07:10 +01:00
Michael Steenbeek 9bb2547dfb
Use templated function for the Twister and Vertical Drop 2021-12-03 18:00:42 +01:00
Hielke Morsink 325b986c56
Merge pull request #15489 2021-12-03 00:16:06 +01:00
Michael Steenbeek 75aecadbc5
Always show Looping RC booster 2021-12-02 10:40:25 +01:00
Duncan 79b12d2953
Introduce DATLimits.h for RCT2 Dat file object limits (#16034) 2021-12-01 21:55:52 +00:00
ζeh Matt ad5e54460f
Merge pull request #16062 from ZehMatt/refactor/map-iterators
Refactor tile map iterations
2021-12-01 06:16:39 -08:00
Hielke Morsink 53d9bfa8b4
Update implicit zoom conversions 2021-12-01 00:08:35 +01:00