Commit Graph

8218 Commits

Author SHA1 Message Date
ζ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 ea3463399f
Merge pull request #15635 from ZehMatt/refactor/constructionclearance-result
#15632: Refactor result passing on ConstructClearResult
2021-10-26 18:29:49 -07:00
ζeh Matt bdc4393517
Cleanup MapCanConstructWithClearAt 2021-10-26 22:15:04 +03:00
Michael Steenbeek a1b70b59d6
Fix #15177: Crash in lightfx_add_lights_magic_vehicle() 2021-10-26 20:10:03 +02:00
Michael Steenbeek dd007c836f
Fix #15579: Crash in track_block_get_next() 2021-10-26 18:05:13 +00:00
Hielke Morsink 30506c7a35
Use ScreenCoordsXY and ScreenSize structs for main toolbar 2021-10-23 11:22:43 +02:00
Gymnasiast 9e0fac9169
Bump network version 2021-10-22 16:17:40 +02:00
Gymnasiast 9b6b86c855
Make convertFlat parameter explicit 2021-10-22 16:16:50 +02:00
Gymnasiast 59e73f9cfb
Add additional explanation + fix for flat ride vehicles on track 2021-10-22 16:15:21 +02:00
Gymnasiast afb49dfe38
Also fix vehicle track refs for good measure 2021-10-22 16:15:21 +02:00
Gymnasiast 815d09a431
Fix #14482: Rides with Crooked House hack sometimes misbehave 2021-10-22 16:15:21 +02:00
ζeh Matt 31239e3941
Refactor result passing on ConstructClearResult 2021-10-21 19:26:17 +03:00
Michael Steenbeek 4205b3569b
Merge pull request #15619 from ZehMatt/refactor/construction-clearnace
Refactor out construction clearance into a new compilation unit
2021-10-21 16:55:21 +02:00
ζeh Matt dd2a140d1f
Apply review suggestions 2021-10-21 16:44:56 +03:00
Duncan e13307a28d
Small cleanup of variables (#13655)
Co-authored-by: Gymnasiast <m.o.steenbeek@gmail.com>
2021-10-20 23:51:06 -03:00
Steve Blythe b15dc66acb
Part of #12098: Use ScreenRect in gfx_filter_rect() (#15603) 2021-10-20 19:43:32 -03:00
ζeh Matt a40f6a8444
Include required headers 2021-10-20 22:21:54 +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 b762cb26ed
Turn some guest functions into methods 2021-10-20 18:33:14 +02:00
ζeh Matt 428eed469a
Merge pull request #15611 from ZehMatt/backport/imagetable
NSF Backport ImageTable changes
2021-10-20 09:19:32 -07:00
Michael Steenbeek 578d8ce247
Fix #15612: Crash in WallCheckObstruction() 2021-10-20 14:15:35 +00:00
ζeh Matt 6f28f3e516
Backport ImageTable changes
Co-authored-by: Ted John <ted@brambles.org>
2021-10-20 16:50:38 +03:00
ζeh Matt 3325898e25
Apply review suggestions 2021-10-20 16:37:32 +03:00
ζeh Matt 4d72c29ca3
Specify underlying type for rct_string_id 2021-10-20 16:35:58 +03: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 27939c2417
Merge pull request #15587 from ZehMatt/refactor/trackdesignaction-result
Refactor result passing of TrackDesignAction
2021-10-20 06:34:23 -07:00
seanmajorpayne f6cb144f8c
Fix #15322: Circus Music is Not Playing (Full Fix) 2021-10-20 13:11:06 +00: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 edde5096db
Use correct size for monorail_cycles_track_pieces_flat 2021-10-19 21:54:02 +02: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
Duncan fe46a2cf09
Fix Custom Currency window (#15596)
* Fix custom currency window exchange rate

This was using the wrong size type for the money

* Change name of string id

This was being used by two windows and should be made generic
2021-10-17 14:56:11 +01:00
Michael Steenbeek 5cb1cee0d8
Fix #15584: Ride income underflows when on-ride photos are making losses 2021-10-17 09:15:13 +02:00
Hielke Morsink c01aedf32e
Merge pull request #15578 2021-10-16 23:28:02 +02:00
ζeh Matt 50cd5dbb75
Merge pull request #15582 from Basssiiie/plugin-fix-litter
Plugin API: Fix being unable to read litter information
2021-10-16 08:10:28 -07:00
Bas 8682a8677e Fix unable to read litter information in plugin api 2021-10-16 15:38:52 +02:00
Michael Steenbeek c04249f208
Merge pull request #15563 from ZehMatt/backport/trackdesign
Backport TrackDesign changes
2021-10-15 21:31:19 +02:00
Michael Steenbeek 0b6c6bb22a
Merge pull request #15490 from Broxzier/bugfix/invalid-clearance-surfaces
Fix: Surface slopes edited by TI have invalid clearance
2021-10-15 19:55:50 +02:00
Gymnasiast eb14c426fd
Rename research_remove() to ResearchRemove() 2021-10-15 17:01:04 +02:00
Gymnasiast 5cf4a53b66
Make research_remove take const ref 2021-10-15 16:21:14 +02:00
ζeh Matt 7f3dc5c001
Fix fallback for missing path objects 2021-10-15 01:12:38 +03:00
Hielke Morsink c2d3ca5f85
Automatically deduce std::array types
This also improves formatting of some arrays with weird or no indention.
2021-10-14 23:27:28 +02:00
ζeh Matt 19464c6e17
Merge pull request #15566 from ZehMatt/fix-litter-underflow
Fix #15567: Litter age underflow
2021-10-14 09:11:22 -07:00
seanmajorpayne 04004d9b8c
Fix #15377: Station Hover doesn't show entrance/exit ghost (#15523)
Fix #15377: Station Hover doesn't show entrance/exit ghost

Replacing tileElement->AsTrack() with trackElement
Changing const auto* to TrackElement*
Replacing trackElement with auto
Implementing ZehMatt's Feedback
Update changelog.txt
2021-10-14 17:01:47 +03:00
ζeh Matt e1fb987c12
Replace loop with count_if 2021-10-14 16:33:06 +03:00
ζeh Matt f701d2ceb5
Make EntityList const correct 2021-10-14 16:31:37 +03:00
Hielke Morsink ea4c21522b
Increment network version 2021-10-13 23:42:28 +02:00
Hielke Morsink f09006b6dd
Do not change clearance height when toggling slope 2021-10-13 23:41:10 +02:00
Hielke Morsink a3641aa102
Fix: Surface slopes edited by TI have invalid clearance 2021-10-13 23:40:47 +02:00
ζeh Matt f2372337bf
Bump up network version 2021-10-12 21:36:13 +03:00
ζeh Matt c2d9d727d9
Fix #15566: Litter age underflow 2021-10-12 21:27:08 +03:00
ζeh Matt 0ef4ed35e9
Fix scenery being disabled, footpath railings don't exist in develop 2021-10-11 20:28:13 +03:00
ζeh Matt d5bac47834
Bump up network version 2021-10-11 20:28:13 +03:00
ζeh Matt 6f8e017a32
Backport track design changes
Co-authored-by: Ted John <ted@brambles.org>
2021-10-11 20:28:13 +03:00
Michael Steenbeek 6ea0d8639d
Merge pull request #15552 from CookiePLMonster/fix-15227
Fix Object Selection not tearing down objects properly
2021-10-11 09:30:33 +02:00
Adam c812b696bd
Fix #14741: crash on macOS exit (#15550) 2021-10-10 22:01:18 +01:00
Duncan 5ee78213b2
Port over research == operator from NSF 2021-10-10 12:09:26 +02:00
Silent daef940bc8
Fix LargeSceneryObject and WaterObject not tearing down the image ID 2021-10-10 00:09:36 +02:00
Michał Janiszewski 6067048fd5 Reduce inclusion of NewsItem.h 2021-10-09 22:12:18 +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
Michael Steenbeek 15897c23a1
Merge pull request #15498 from duncanspumpkin/sceneryWindow
Backport scenery window from NSF
2021-10-09 17:13:36 +02:00
ζeh Matt 05e58cda11
Merge pull request #15538 from ZehMatt/feature/parallel-draw
Implement multithreaded drawing
2021-10-09 05:53:48 -07:00
Ted John 6b965074ec
Merge pull request #15527 from hjort96/refactor-window-ViewClipping
Close #13813 : Refactor window to class: ViewClipping
2021-10-08 13:57:25 +01: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
Michael Steenbeek 5563139ed1
Fix #15503: Freeze when doing specific merges 2021-10-06 23:00:06 +02:00
ζeh Matt a0e7752f26
Pass rct_drawpixelinfo explicit to avoid races 2021-10-06 23:48:07 +03: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
duncanspumpkin 9e227c1e2f Add const where possible 2021-10-06 16:44:07 +01:00
duncanspumpkin fea69cc86c Backport scenery window from NSF
Co-authored-by: IntelOrca <IntelOrca@users.noreply.github.com>
Co-authored-by: Gymnasiast <Gymnasiast@users.noreply.github.com>
2021-10-06 16:44:05 +01: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 aa50809a85
Merge pull request #15528 from ZehMatt/refactor/staffhireaction-result
Refactor action result passing for StaffHireNewAction
2021-10-06 08:32:00 -07:00
ζeh Matt d2ffeaa7b0
Refactor action result passing for WallPlaceAction 2021-10-06 18:31:09 +03:00
ζeh Matt 911f168f8f
Mark two palettes thread_local for parallel drawing support 2021-10-06 17:28:37 +03:00
ζeh Matt fa340cb5a1
Add parallel drawing if engine allows it 2021-10-06 17:24:39 +03:00
ζeh Matt 6ad4150085
Introduce rendering engine flag for parallel drawing 2021-10-06 17:15:40 +03:00
ζeh Matt 9cb26f7b02
Refactor action result passing for SmallSceneryPlaceAction 2021-10-06 16:12:37 +03:00
Duncan 6cac668447
Fix incorrect staff costumes being available (#15499)
Noticed this when trying to fix an NSF scenery window issue. The previous code meant that if any single scenery item in a set was researched then the costume was available but I'm pretty sure its meant to be tied to if the whole scenery set is invented.
2021-10-06 12:32:17 +01:00
Silent 5fcbc3a53d
Fix #15299: Breakpad crash dumps are created in game directory 2021-10-05 18:23:06 +02:00
Soham Roy 4d27417fd2
Fix #11354: Coding style causes undefined behaviour
An underscore followed by a capital letter used as a prefix might cause
undefined behaviour
2021-10-05 13:58:50 +02:00
Jonathan Hjorth 4fe21e3274 OnToolUpdate, OnToolDrag, OnToolUp now being used 2021-10-05 10:53:40 +02:00
Jonathan Hjorth 0a392841c2 Added functions OnToolUpdate, OnToolDrag, OnToolUp to rct_window 2021-10-05 10:52:44 +02:00
ζeh Matt 8effeb26b0
Refactor action result passing for StaffHireNewAction 2021-10-04 17:01:27 +03:00
Michael Steenbeek 233b1e99b4
Fix Windows compilation of OrcaStream 2021-10-03 22:41:55 +02:00
Michael Steenbeek 7530a03b8e
Merge pull request #15508 from Broxzier/refactor/widget-references
Use (const) references to widgets and scrolls where possible
2021-10-03 21:07:31 +02:00
Silent 445fb747bf
Fix Scenario description missing when loading a park from a save file
Saved games do not have a valid info chunk,
so scenario names/descriptions did not load.
2021-10-03 20:57:17 +02: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 06dc75845a
Fix #15476: Crash in map_place_clear_func() 2021-10-01 16:10:25 +00:00
Michael Steenbeek d320a5cfe7
Merge pull request #15505 from Gymnasiast/fix/15496
Fix #15496 and clean up paint_swinging_inverter_ship_structure() a bit
2021-10-01 18:03:22 +02:00
Hielke Morsink 5b9b52c028
Use (const) references to scrolls where possible 2021-10-01 15:21:01 +02:00
Hielke Morsink 6de1868ad8
Use (const) references to widgets where possible
Note: The change from `w->widgets[WIDX_ENTRY_PRICE]` to `entryPriceWidget` is intended.
2021-10-01 15:21:00 +02: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
Gymnasiast d3cfa07a2a
Fix #15496: crash in paint_swinging_inverter_ship_structure() 2021-10-01 13:51:00 +02:00
Gymnasiast c74984740b
Pass ride ref to paint_swinging_inverter_ship_structure() 2021-10-01 13:48:27 +02:00
Michael Steenbeek 26d1186240
Merge pull request #15493 from Broxzier/refactor/minor-cleanups
Minor code cleanups
2021-09-30 15:03:33 +02:00
ζeh Matt 456e54b022
Remove useless comment
Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
2021-09-30 05:37:23 -07:00
Hielke Morsink 429e34d7f3
Make uses of window_get_main use (const) auto* 2021-09-30 14:36:06 +02:00
ζeh Matt c492362e45
Fix mistake and cleanup 2021-09-30 15:34:22 +03:00
Duncan e01c9a3afa
Stream changes from NSF (#15446)
* Bring over NSF changes to stream classes

* Add orca stream to project files

* Bring over util changes as well.

* Add const to util and fix util ungzip

* Add const and apply review comments

* Apply review comments
2021-09-30 13:02:54 +01:00
Hielke Morsink bb5d09982f
Properly name argument 2021-09-30 10:40:32 +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 bfe7caacd7
Fix #15487: map animations do not work correctly in vanilla RCT2 (#15492)
Co-authored-by: duncanspumpkin <duncanspumpkin@users.noreply.github.com>

Co-authored-by: duncanspumpkin <duncanspumpkin@users.noreply.github.com>
2021-09-30 07:40:58 +01:00
Michał Janiszewski ce1d3e9c83
Minor fixes (#15491) 2021-09-29 21:06:46 +00:00
Hielke Morsink ba74393a43
Remove pointless return statement 2021-09-29 22:39:34 +02:00
ζeh Matt afc0e87f29
Merge pull request #15477 from ZehMatt/nsf/update-xyz
Update entities xyz to int32_t
2021-09-29 13:32:06 -07:00
ζeh Matt 98625e1aaa
Fix #14798: Overflow on sound position 2021-09-29 22:47:53 +03:00
Michael Steenbeek 987174e828
Merge pull request #15436 from duncanspumpkin/staff
Small Staff Refactor from NSF
2021-09-29 20:46:24 +02:00
Michael Steenbeek e5f9282a36
Merge pull request #15470 from Broxzier/bugfix/15213-unicode-freeze
Fix #15213: Freeze when reading a partially cut unicode character
2021-09-29 20:26:01 +02:00
Michael Steenbeek 22af2ecdcc
Merge pull request #15486 from ZehMatt/nsf/backport-overflow
Use int32_t for iterating tiles
2021-09-29 20:02:05 +02:00
ζeh Matt 82f0da24b1
Use int32_t for iterating tiles
Co-authored-by: Ted John <ted@brambles.org>
2021-09-29 20:40:57 +03:00
Duncan 8c6f10797b
Prevent wasting paint time on unviewable entities 2021-09-29 19:20:43 +02:00
ζeh Matt c1cde60e7f
Bump up network version 2021-09-29 19:49:42 +03:00
ζeh Matt 3a5452f0c9
Update entities xyz to int32_t 2021-09-29 19:49:15 +03:00
Duncan cce3bb1845
Fix #15136: Exported SV6 hangs/crashes vanilla RCT2 2021-09-29 18:48:50 +02:00
ζeh Matt 9216786efc
Refactor GetSpatialIndexOffset (#15479) 2021-09-29 17:19:47 +01: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
ζeh Matt 274bc039af
Fix out of bounds access 2021-09-28 01:26:22 +03:00
ζeh Matt 04f15b7d45
Merge pull request #15474 from ZehMatt/fix/spatial-overflow
Fix overflow in GetSpatialIndexOffset
2021-09-27 14:54:31 -07:00
ζeh Matt 185cfdea0f
Refactor GetSpatialIndexOffset and fix overflow 2021-09-28 00:25:15 +03:00
Duncan 50118ae039
Move function for NSF use 2021-09-27 22:54:41 +02:00
ζeh Matt 4ea8902587
Refactor arg passing to sprite_paint_setup 2021-09-27 22:48:06 +03:00