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
ζeh Matt
cecf4ac202
Use CoordsXY for sprite_paint_setup
...
Co-authored-by: Ted John <ted@brambles.org>
2021-09-27 22:47:36 +03:00
Hielke Morsink
c234abfbb8
Fix #15213 : Freeze when reading a partially cut unicode character
2021-09-27 15:03:25 +02:00
Hielke Morsink
e88f96a15c
Move StaticLayout out of header file
2021-09-27 14:56:37 +02:00
Michael Steenbeek
f7d61c67e6
Fix arbitrary ride type cheat not working
2021-09-26 16:21:34 +02:00
Hielke Morsink
9dd9b27db4
Make WIDGETS_END constexpr
2021-09-26 11:11:42 +02:00
seanmajorpayne
2ba515fb37
Improve #15322 : Circus Music Not Playing
...
Alleviates the issue, though the circus in European Extravaganza still does not work correctly.
2021-09-25 19:21:38 +00: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
e5de2adc4f
Merge pull request #15429 from ZehMatt/backport/ticks
...
Remove scenario ticks and adjust export/import
2021-09-23 12:08:16 -07:00
ζeh Matt
c61f141cdc
Bump up network version
2021-09-23 21:49:09 +03:00
ζeh Matt
74e8988dd8
Remove scenario ticks and adjust export/import
...
Co-authored-by: Ted John <ted@brambles.org>
2021-09-23 21:49:09 +03: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
Hielke Morsink
9060a0d228
Add missing headers to VS project file ( #15457 )
2021-09-21 23:34:33 +02:00
Duncan
a268350615
Fix #15439 : Ride viewport is partially grey
...
The ride viewport does not work the same as other viewports due to the selection of views that it has. After refactoring the focus system to use a more streamlined approach the ride viewport lost its invalidation on resizing. If the ride window was to use the same viewport update code as say the guest window then the viewport focus still ends up incorrect due to it no longer centring the focus. Therefore the best approach was to lose the focus on resize and force a recalculation of it.
Also renamed Focus2 to Focus as Focus2 was meant to just be fill in whilst removing the original focus structs.
2021-09-21 11:06:04 +02:00
Gymnasiast
8fb8b2a4c1
Do not overwrite ride type when extending station
2021-09-21 10:50:38 +02:00
Gymnasiast
f21b941b46
Introduce ride_type_t
2021-09-21 10:49:29 +02:00
frutiemax
355019f97f
#15367 : Encode RideType in TrackElement
2021-09-21 10:49:28 +02:00
ζeh Matt
c56810e6a5
Fix #15442 : Use after free in object manager
2021-09-21 10:34:58 +02:00
Michał Janiszewski
a37c8539e7
Fix bounds check in Litter::GetName
2021-09-19 22:38:25 +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
73f5c48c94
Port over getPatrolAreaOffset and revert hasPatrol
...
HasPatrol shouldn't perform the expensive loop check as it was only used in StaffSetPatrolAreaAction and used incorrectly.
2021-09-19 08:39:08 +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
Duncan
81051f2d21
Add crypt files from NSF
2021-09-18 20:31:23 +00:00
Duncan
fa57b6aea0
Remove focus union and replace with typed focus ( #15426 )
...
* Remove focus union and replace with typed focus
This if for the NSF to allow for CoordsXYZ
* Remove legacy structures
* Rework viewport_create to deduplicate logic
* Simplify yet further
* Apply review comments
* Remove intermediate
2021-09-18 20:34:38 +01:00
Duncan
c05068e8d1
Replace sprite_left,t,r,b with SpriteRect ( #15408 )
...
* Replace sprite_left,t,r,b with SpriteRect
This is required for the NSF. I had to add a silly constructor to rct_sprite for now. Will eventually be removed one day...
* Fix compilation and memory leak
* Add some UB to prevent some other UB
* Make review change
2021-09-18 19:07:35 +01:00
ζeh Matt
2529568bfc
Use std::string_view where appropriate in network code
...
Co-authored-by: Ted John <ted@brambles.org>
2021-09-18 00:14:28 +03: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
fc8e0cf9d7
A couple more nullopt returns ( #15422 )
2021-09-16 23:05:50 +02:00
Hielke Morsink
4b4b3333d6
Remove unnecessary else blocks
2021-09-16 18:31:12 +02:00
ζeh Matt
427bb7b330
Fix sv6 export not adding all objects ( #15419 )
2021-09-16 14:28:02 +01:00
Gymnasiast
51a7c2ad44
Fix log_warning spam for OBJECT_ENTRY_INDEX_NULL
2021-09-15 22:42:32 +02:00
Gymnasiast
ecaf361743
Revert porting errors
2021-09-15 18:27:15 +02:00
Gymnasiast
adce8c998e
Return early in RepositoryItemToObject()
2021-09-15 17:58:42 +02:00
Gymnasiast
6a7084aa4d
Fix formatting and TODO note
2021-09-15 17:54:39 +02:00
Ted John
8cdece0252
Fix incorrect objects in S6 import
2021-09-15 11:28:40 +02:00
Gymnasiast
bdab3219cb
Modify object loading for JSON-only objects
2021-09-15 11:28:39 +02:00
Michael Steenbeek
37821ce25e
Merge pull request #15336 from Gymnasiast/refactor/more-paths
...
Prepare footpath handling for surfaces and railings (from NSF)
2021-09-15 10:58:01 +02:00
Michał Janiszewski
1a35cdafb3
Add limits include to Object.h ( #15415 )
...
PPA builds seem to complain about this
2021-09-15 08:25:55 +02:00
ζeh Matt
42254d774d
Allow game actions to store custom data instead of using inheritance
2021-09-14 20:25:37 +03:00
Hielke Morsink
28681eebc0
Merge pull request #15407 from ZehMatt/refactor/optional-use
...
Make use of std::optional strict
2021-09-14 17:45:18 +02:00
ζeh Matt
687b6c000e
Apply review suggestion
...
Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
2021-09-14 16:30:38 +03:00
Kane
b35fd28c55
Feature #7682 : Lock camera to vehicle in main window
...
Pressing the "Locate" button in the Ride window when selected on a "Vehicle/Train" will now have the main viewport track the vehicle.
2021-09-13 20:44:52 +02:00
ζeh Matt
59a6c34db4
Make use of std::optional strict
2021-09-13 20:02:32 +03:00
Michael Steenbeek
6ffb03dde0
Add icon for path railings tab
2021-09-13 09:29:46 +02:00
Michael Steenbeek
5d039a5f55
Use std::string_view instead of C string
...
Co-authored-by: ζeh Matt <5415177+ZehMatt@users.noreply.github.com>
2021-09-12 18:45:53 +02:00
Gymnasiast
6202ecb281
Make util_zlib_inflate() take const
2021-09-12 18:36:50 +02:00
Gymnasiast
1426010652
Plugin: use ObjectEntryIndex for music and entrance style
2021-09-12 18:33:27 +02:00
Gymnasiast
3e1544aac8
Add missing object types to ObjectTypeToString()
2021-09-12 18:31:21 +02:00
Gymnasiast
0f183e9ad2
Make FreeEntity take a reference
2021-09-12 18:29:37 +02:00
Gymnasiast
c567ca09db
Fix stray changes
2021-09-12 17:52:01 +02:00
Gymnasiast
228c1ac7f5
Fix formatting
2021-09-12 17:52:01 +02:00
IntelOrca
4f319d6ed4
Prepare footpath handling for surfaces and railings
2021-09-12 17:52:01 +02:00
ζeh Matt
f999b0acb2
Remove Nullable and use std::optional instead
2021-09-12 16:55:56 +03:00
ζeh Matt
65a484105e
Merge pull request #15395 from ZehMatt/refactor/common-numerics
...
Remove numerics from common.h and use it as needed
2021-09-11 14:27:07 -07:00
ζeh Matt
b733e97bfa
Remove numerics from common.h and use it as needed
2021-09-11 20:21:08 +03:00
ζeh Matt
2daa356fbf
Move ZipStream into new header
2021-09-11 19:06:17 +03:00
ζeh Matt
c9e2c9f4d2
Apply review suggestions
2021-09-11 17:25:42 +03:00
ζeh Matt
50d7b8bb1c
Remove unused function get_loaded_object_entry
2021-09-11 16:50:30 +03:00
ζeh Matt
38ec042a52
Refactor object_entry_get_chunk wrapper
2021-09-11 16:50:30 +03:00
ζeh Matt
c416c7ca27
Remove unused function get_loaded_object_chunk
2021-09-11 16:50:30 +03:00
ζeh Matt
e3f39bf554
Use PascalCase for object members
2021-09-11 16:50:30 +03:00
ζeh Matt
47d1633224
Refactor Export
2021-09-11 16:50:29 +03:00
ζeh Matt
b1ba29716d
Refactor import of s6 objects
2021-09-11 16:50:29 +03:00
ζeh Matt
ef6768dd33
Segment the object arrays in rct_s6_data
2021-09-11 16:50:26 +03:00
ζeh Matt
2e8d40b5e3
Fix out of bounds regression from #15391
2021-09-10 22:34:18 +03:00
Hielke Morsink
d42bc9a469
Merge pull request #15383 from Broxzier/refactor/smart-follow-cleanup
2021-09-10 20:13:23 +02:00
ζeh Matt
e5eb8f84cf
Apply review suggestions
2021-09-10 19:36:14 +03:00
ζeh Matt
516232e0a7
Change static casts to EnumValue
2021-09-10 19:10:15 +03:00
ζeh Matt
d21ccc103b
Bump up network version
2021-09-10 19:10:15 +03:00
ζeh Matt
8a21bd01c6
Bump up scripting version
2021-09-10 19:10:14 +03:00
ζeh Matt
50467d4fd8
Remove unused serialiser traits
2021-09-10 19:10:14 +03:00
ζeh Matt
120bb10fd5
Fix serialiser traits
2021-09-10 19:10:14 +03:00
ζeh Matt
18af5d4950
Use union for window association to prevent casts
2021-09-10 19:10:13 +03:00
ζeh Matt
eda3188ecf
Fix rebase
2021-09-10 19:10:13 +03:00
ζeh Matt
e1e29379ba
Add thought insertion overload with strong ride id type
2021-09-10 19:10:13 +03:00