Commit Graph

19490 Commits

Author SHA1 Message Date
Hielke Morsink 2e3cb6a106
Fix: version info is not filled on bug report 2023-04-17 21:25:05 +02:00
Matthias Moninger 1ecdfb68ee
Set NextQuadrantEntry not to null (#19969) 2023-04-17 18:18:43 +01:00
Tulio Leao f5d9d00fba
Merge pull request #19958 from Gymnasiast/refactor/wooden-a-b 2023-04-17 10:58:33 -03:00
Rik Smeets 35674ac627
Add Spiral Slide pallette (#19952) 2023-04-17 09:49:30 +00:00
Rik Smeets 55adb71cd8
Add keyboard shortcut to Keyboard Shortcuts window 2023-04-17 11:15:32 +02:00
Gymnasiast f773bc9471
Break out some common code in WoodenA and WoodenB paint setup 2023-04-16 20:26:59 +02:00
Gymnasiast 235dc0fe92
Remove stylistic diff between WoodenA and WoodenB paint setup
Removes the differences in variable names, comments, order of assignment. There should be no functional difference.
2023-04-16 20:02:42 +02:00
Matthias Moninger e88d606925
Merge pull request #19888 from ZehMatt/cleanup-paint
Refactor paint sort code
2023-04-16 17:20:43 +03:00
Michael Steenbeek 812ea151bb
Fix duplicate RGB colours in palette (#18299)
* Remove duplicate RGB colours from palette

* Update hash

* Update reference dat file

---------

Co-authored-by: Spacek531 <spacek531@comcast.net>
Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2023-04-16 15:15:26 +01:00
ζeh Matt fc7fa91d2f
Remove atomic include and use array for arrange functions 2023-04-16 16:58:15 +03:00
ζeh Matt cf64bba0b7
Add more comments 2023-04-16 16:55:40 +03:00
Michael Steenbeek d088533ac4
Fix #19950: Mine train block brake supports drawn incorrectly (#19954) 2023-04-16 14:19:17 +01:00
Rik Smeets a31ff7e02e
Add prompt before resetting shortcut keys (#19905) 2023-04-16 09:22:05 +00:00
spacek531 319d759d71
fix TrackData.cpp (#19922) 2023-04-16 09:28:56 +01:00
Duncan 383642a812
Fix #19916. Crash when changing language (#19945)
Issue caused by the unload image function not resetting the image id back to invalid. Also noticed that water wasn't correctly cleaning up.

Fix #19918, #19926, #19927, #19928, #19929, #19931
2023-04-15 21:11:01 +00:00
Chase 7e313d45cd
Fix #19906: Destructible cheat does not allow ride modification (#19924) 2023-04-14 21:10:54 -03:00
Kevin Strehl f7b8a2fde7
Disable marketing tab when marketing is prohibited (#19828)
Disable marketing tab when marketing is prohibited

---------

Co-authored-by: Rik Smeets <30838294+rik-smeets@users.noreply.github.com>
2023-04-14 18:25:35 +02:00
ζeh Matt a1c3f38469
Rename next to NextEntry 2023-04-14 03:37:26 +03:00
ζeh Matt b78a1ac9f2
Use ScreenCoordsXY for PaintStringStruct 2023-04-14 03:27:07 +03:00
ζeh Matt d35933dc9f
Use ScreenCoordsXY in AttachedPaintStruct 2023-04-14 03:22:32 +03:00
ζeh Matt fc75f8b0e9
Use ScreenCoordsXY, refactor uses 2023-04-14 03:14:37 +03:00
ζeh Matt 31e1a5dbcd
Use CoordsXY for map position 2023-04-14 03:09:29 +03:00
ζeh Matt 5ea09be0f8
Rename some fields in PaintStruct 2023-04-14 03:06:53 +03:00
ζeh Matt 63d15c71ae
Refactor paint sort 2023-04-14 02:35:59 +03:00
Nikolas Parshook ef35dfa40a
Expose obj image offset and num images to plugins (#17567)
Co-authored-by: Duncan <duncans_pumpkin@hotmail.co.uk>
2023-04-13 19:09:15 +00:00
Tulio Leao d0c7d0f6fb
Close #18318: Refactor MapTooltip window to class (#19914) 2023-04-13 14:16:14 -03:00
undermark5 78aa02fe8a
Fix #13130: Android respects device locale (#19419)
Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2023-04-13 09:30:18 +00:00
Wenzhao Qiu 0a28f6b0b9
Close #18316: Refactor GameBottomToolbar window to class (#19896)
Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2023-04-13 06:13:12 -03:00
Spacek531 fdeb311ad3 remove redundant condition 2023-04-11 19:28:27 -07:00
Spacek531 033b189b7a bump network version 2023-04-11 19:28:27 -07:00
Spacek531 ba5627c544 load brake from parkfile 2023-04-11 19:28:26 -07:00
Spacek531 7fe9580131 vehicle chooses between brake speed and block brake speed 2023-04-11 19:28:26 -07:00
Spacek531 6488f0397e link brake open to block brake open 2023-04-11 19:28:26 -07:00
Spacek531 115fc957c0 import block brake from legacy file types 2023-04-11 19:28:26 -07:00
Spacek531 99ffaa8b71 allow block brakes to be built with speed 2023-04-11 19:28:17 -07:00
Spacek531 c57f0bd962 add strings 2023-04-11 18:05:51 -07:00
Gymnasiast c1626a54bf Fix formatting 2023-04-11 22:59:03 +01:00
Gymnasiast 57c366e983 Fix rebase error 2023-04-11 22:59:03 +01:00
Gymnasiast c3e5c83c92 Fix missed occurrence in BenchSpriteSort.cpp 2023-04-11 22:59:03 +01:00
Gymnasiast 2662518ff0 Fix formatting 2023-04-11 22:59:03 +01:00
Gymnasiast 91f4c1e752 Use dpi ref in misc drawing functions 2023-04-11 22:59:03 +01:00
Gymnasiast bb83a80eab Use dpi ref in rect and line drawing functions 2023-04-11 22:59:01 +01:00
Gymnasiast 2941f6f7a5 Use dpi ref in misc drawing folder places 2023-04-11 22:57:25 +01:00
Gymnasiast 0139c8d19e Use dpi ref in everything outside the drawing folder 2023-04-11 22:57:25 +01:00
Gymnasiast fc0e0d029a Use dpi ref in ui context and weather 2023-04-11 22:57:25 +01:00
Gymnasiast 16c5c1b752 Use dpi ref in interface folder 2023-04-11 22:57:25 +01:00
Gymnasiast 3e764677da Use dpi ref in paint folder 2023-04-11 22:57:25 +01:00
Gymnasiast f09df5a06a Use dpi ref in Graph.cpp and InGameConsole.cpp 2023-04-11 22:57:25 +01:00
Gymnasiast f98818f8e5 Use dpi ref in Intro.cpp 2023-04-11 22:57:25 +01:00
Gymnasiast 90d21dbe14 Use dpi ref in Widget.cpp 2023-04-11 22:57:25 +01:00
Gymnasiast 96d77ed8f7 Using dpi refs in most remaining window defs 2023-04-11 22:57:23 +01:00
Gymnasiast 9c2d5b9fef Make GfxDrawSprite() take reference 2023-04-11 22:53:30 +01:00
Duncan 437329bb13
Scenario select cleanup (#19899)
* Move private functions to privat

Fix init

* Minor style cleanup

* Apply review comments

* Apply further review comments
2023-04-11 22:47:53 +01:00
Duncan 9493af44dd
Fix rand colours missing final colour (#19901) 2023-04-11 18:27:45 -03:00
AuraSpecs d8f9bc3146
Add Powered Lifthill to Giga Coaster (#19276)
Co-authored-by: Gymnasiast <m.o.steenbeek@gmail.com>
2023-04-11 06:44:05 -03:00
John Mulcahy 681f22748d
#13798: Refactor ScenarioSelect to the new window system (#19693)
* reset branch and readd changes to clear unnecessary commits

* Apply suggestions from code review

Will include another commit addressing more in depth comments

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>

* continued PR cleanup

* Clang formatting

* remainder of PR feedback corrections

* return from function to destroy window

* PR Feedback

* Apply minor feedback points

---------

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
2023-04-10 21:29:28 +01:00
Raed 1bb1767577
Fix #19733: Favorite ride of X guests integer overflow (#19887)
* Fix #19733: Favorite ride of X guests integer overflow

Changed the variable for the number of guests favoring a ride to
match the maximum number of guests able to be in a park.

* Bump network stream and park file versions

* Added changelog entry for #19733 fix

* Reorder changelog entry
2023-04-10 20:03:25 +01:00
Duncan 01d9be4609
Name a lot of the palettes (#19889) 2023-04-09 20:29:35 +00:00
Matthias Moninger 3d5cb20ca6
Merge pull request #19874 from ZehMatt/cleanup-entity
Move sprite related info into its own structure
2023-04-09 23:21:38 +03:00
Meehoi b4156c0c77
Fix highlight path issues not hiding wall elements (#19830)
* Fix highlight path issue not hide wall element

* Add changelog and contributors
2023-04-09 19:13:47 +02:00
Hielke Morsink 417f1048e9
Store SurfaceElement directly in PaintSessionCore 2023-04-08 21:57:25 +02:00
Matthias Moninger af9aa82e3b
Merge pull request #19851 from karst/update/fly
Make the FLY pallette more accurate
2023-04-08 21:45:03 +03:00
Karst 1e79825549 Update NetworkBase.cpp 2023-04-08 19:50:13 +02:00
Matthias Moninger 59198a5126
Merge pull request #19838 from ZehMatt/refactor-tile-access
Refactor tile access
2023-04-08 15:00:19 +03:00
ζeh Matt 7d764f52a1
Fix formatting 2023-04-08 14:51:33 +03:00
Meehoi 9eb3cdf548
Fix color of ground tile marker when building ride (#19869)
* Fix color of ground tile marker when building ride
2023-04-08 09:50:46 +01:00
Hielke Morsink e6d439dc5b
Fix #19801: Cannot resize load/save window anymore (#19872)
The main issue was that the min/max sizes of the window were set in the constructor, then being overwritten by the WindowCreate function. That function calls the OnOpen function, which can be used to set them properly.

The other two changes are just minor cleanups; a pixel difference in padding on the right side, and an overriden function that's identical to the base.
2023-04-08 07:25:46 +02:00
ζeh Matt 8f82aa95b3
Move Direction out and rename it to Orientation to avoid name conflict 2023-04-07 22:46:25 +03:00
ζeh Matt 679f5aac2e
Rename members of EntitySpriteData 2023-04-07 19:47:26 +03:00
ζeh Matt dce21bc8ec
Split move sprite specific data into EntitySpriteData 2023-04-07 19:37:47 +03:00
Michał Janiszewski db1b7f2a0f
Update src/openrct2-ui/audio/SDLAudioSource.h 2023-04-07 13:09:40 +02:00
Michał Janiszewski 8d30e9dfaa Make audio source release status atomic
As audio sources get released from a callback done in a thread separate
from main, the released status needs to be atomic.
2023-04-07 12:15:11 +02:00
kyphii ce4ca96b27
Fix 19853: Landscaping tool not indicating corners when choosing where to raise or lower land (#19857)
* Fix land marker palettes

* Appease Clang

* Remove one more magic number

---------

Co-authored-by: Trevor Finney <8711258+finneyt@users.noreply.github.com>
2023-04-07 06:12:55 +01:00
Matthias Moninger 5462c28b8c
Fix dereferencing nullptr for bad loaded g2 using OpenGL renderer (#19855) 2023-04-06 21:56:52 +02:00
Rik Smeets c2d55e9535
Fix Looping Coaster trains clipping through steep quarter turns down 2023-04-06 21:34:00 +02:00
Michał Janiszewski 993da08fb9
Fix #19850: Only provide default value for final arguments (#19852) 2023-04-06 15:35:02 +01:00
Karst 139c6561b4 Make the FLY pallette more accurate
With the introduction of new palettes this colour scheme is more accurate with the real thing.
2023-04-06 14:38:02 +02:00
kyphii 39790779bb
Extend color selection dropdown with more colors (#19446)
* Setup for extended palette

* Define order for color picker cells

* Init G2 Palettes in ColoursInitMaps

* Add Glass Palettes

* Use special sprite for Invisible color

* Set up new cheat for special colors

* Add glass palettes to palette_to_g1_offset

* Add entries for new colors in TranslucentWindowPalettes

* Finish implementation of special colors cheat

* Some cleanup

* New colors almost work

* Correct g2 palette loading indices

* Invisible color sprite displays properly

* Repaint works with large scenery and walls

* Prevent random shop items from overflowing to junk palettes

* More cleanup

* Fix glass palettes

* Add mapping of new colors to original colors for UI themes

* Fix junk palettes for random shop items

* Fix missing highlight color in software renderer

* Convert small scenery support flag to allow use of new colors

* Progress on displaying new colors in software renderer

* Fix invisible color scheme sprite

* Formatting cleanup

* Resolve comparison of integer expressions of different signedness

* Index g2 palette maps to fix visible chain lift

* Progress on fixing new colors in software renderer

* Fix station and support colors

* Fix dropdown selected index

* Get invisible color (mostly) working in software renderer

* Use forceBmp for palette resources

* Remove test function definition left in by mistake

* Remove some obsolete range checks for original color values

* Add changelog entry

* Reorder color dropdown based on NE user feedback

* Some cleanup

* Further cleanup

* Formatting

* Add include for GetPaletteMapIndexForColour

* Fix a couple things I broke

* Fix function placement

* Revert "Add include for GetPaletteMapIndexForColour"

This reverts commit 0af9611e6656d792adb7a36efe7dbf3387a4a759.

* Use color constants for color order list

* Make remappable colors contiguous

* turn off clang format for ordered color list

* Appease clang

* Use all colors for random shop item animation

* Improvements to palette map resources

* Fix chain lifts again + adjustments to a few colors

* Update changelog and contributors.md

* Revert changes to S4 and S6 importers which are no longer needed

* Bump network, plugin, and minimum park versions

* Revert "Progress on displaying new colors in software renderer"

This reverts commit 337602e4a7.

* Remove unnecessary comment

---------

Co-authored-by: Trevor Finney <8711258+finneyt@users.noreply.github.com>
2023-04-06 08:36:07 +01:00
Hielke Morsink b4beb0c69f
Fix #19839: Game freezes on protected rides tab (#19840) 2023-04-06 07:33:29 +02:00
Michał Janiszewski ee6746373e
Fix #19817: merry-go-round doesn't have a vehicle until opened (#19842)
Merry-go-round doesn't receive its vehicle until it gets tested/opened,
but tries painting non-existent guests anyway, leading to reference
binding to nullptr.
2023-04-06 00:55:05 +02:00
ζeh Matt 86456f3538
clang-format fixes 2023-04-05 23:37:18 +03:00
ζeh Matt c248ac58ed
Make passing of CoordsXY explicit 2023-04-05 23:23:19 +03:00
ζeh Matt 1a0afab6c6
Remove redundant ToCoordsXY 2023-04-05 23:18:12 +03:00
ζeh Matt 0c3c2ebcd2
Refactor MapGetSurfaceElementAt to accept TileCoordsXY 2023-04-05 23:13:47 +03:00
ζeh Matt be45b20de8
Fix parameter deduction for TileElementsView 2023-04-05 22:56:00 +03:00
ζeh Matt 2ee7c24282
Use TileCoordsXY for the TileElementsView 2023-04-05 22:55:34 +03:00
Michał Janiszewski fe4be750c6
Fix #12598: Incorrect assignment in TrackDesign (#19831) 2023-04-05 13:05:48 +00:00
X123M3-256 3c4e32458a
Add large sloped turns to hybrid and single rail (#19547)
* Implement large sloped turns

* Fix formatting

* Add sprites

* Fix large turns button being active on steep slopes

* Remove bad comment

* Increment network,plugin,park version numbers

* Update changelog

* Increment park file version again
2023-04-05 13:47:56 +01:00
kyphii 1dafb8e56e
Fix small scenery repainting (#19826)
Co-authored-by: Trevor Finney <8711258+finneyt@users.noreply.github.com>
2023-04-05 06:27:51 +02:00
Michał Janiszewski 81fd7b6b8a
Merge pull request #19821 from janisozaur/llvm-coverage
Add clang-based tests coverage
2023-04-04 15:52:58 +02:00
John Mulcahy 18ce417dc0
Fix 19231 - Fix Tile Copy/Paste null pointer exception 2023-04-04 11:35:20 +02:00
Duncan c0bd64f778
Split of Needs supports changes from OpenRCT2/OpenRCT2#19446 (#19759) 2023-04-04 07:52:07 +00:00
Michał Janiszewski d25fa7fe1e Fix compilation with mingw GCC 12
Another case of the compiler bug found in #17371
2023-04-04 08:52:12 +02:00
Matthias Moninger a949255067
Merge pull request #19812 from ZehMatt/fix-19811
Fix #19811: Use the correct SDL event for window resize handling
2023-04-03 21:32:37 +03:00
ζeh Matt cc64ab530c
Fix #19811: Use the correct SDL event for window resize handling 2023-04-03 17:09:50 +03:00
Michał Janiszewski 470d02572d
Fix #17371: GCC regression with -Wmaybe-uninitialized (#19810)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105937 was reported for
GCC12 and fixed in GCC13 (not yet released).

Leave the suppresions in place until we can get rid of GCC12
2023-04-03 16:09:41 +02:00
Vlad Rakhmanin 90599d9b5a
Fix #13801: Refactor ServerList to use Window class (#19675)
Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2023-04-03 06:51:40 -03:00
Duncan 2afed4c272
Fix #19803. Crash when invalid scenery element for sign 2023-04-03 10:27:19 +02:00
Matthias Moninger d7923c479e
Merge pull request #19481 from Gymnasiast/feature/compat-object
Add flag to mark an object as a compatibility object
2023-04-03 11:17:13 +03:00
Rik Smeets de06f6026e
Fix #18895: Responding mechanic blocked at level crossing (#19620)
Remove the condition regarding the ride's breakdown reason. Other breakdown reasons can also cause trains getting stuck at a level crossing.
2023-04-02 17:57:59 +02:00
Rik Smeets f8b30fbb36
Reduce guests walking through trains on level crossing next to station (#19619) 2023-04-02 17:38:00 +02:00
Vlad Rakhmanin 63cad26dfc
Fix #13771: Refactor EditorObjectiveOptions to use Window class (#19789)
* Initial refactoring to class completed.

* Removed legacy events.

* Fix issues with variables shadowing outer scope.

* Declaring class final.

* Deleted unused GetHeight function.

* Added early return and OnScrollGetSize

* Fixed typo in OnScrollGetSize
2023-04-02 15:10:58 +01:00
Andrew ad0229199d
Sticky the Misc scenery tab next to the All scenery tab (#19764)
* Sticky the Misc tab next to the All tab

* More robust misc check

Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
Co-authored-by: Duncan <duncans_pumpkin@hotmail.co.uk>
2023-04-02 08:42:37 +00: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
Kevin Strehl 1174063c27
Improve check whether path is connected (#19788) 2023-04-01 06:44:22 +00:00
Matthias Moninger 63b0d16025
Merge pull request #19757 from ZehMatt/fix-19296
Fix #19296: Race condition for parallel object loading
2023-03-31 01:21:00 +03:00
Vlad Rakhmanin f90b18fb3a
Fix #13793: Refactor Player to use Window class (#19726)
* Initial refactoring into class completed.

* Added general events for page specific events to hook into.

* Updated variable names to avoid shadowing outer scope.

* Added clang-format

* Moved elements from "WindowPlayerOpen" into "OnOpen" and "Init". Added id parameter for "Init".

* Rearranged the OnMouseUp commands into one root level function.

* Added clang format.

* Refactored code into "OnOpen" function.

* Rearranged the OnMouseUp commands into one root level function.

* Added clang format.

* Added early return to OnMouseUp switch statement.
2023-03-29 21:00:06 +00:00
ζeh Matt 92f821af07
Fix some mistake 2023-03-29 15:54:16 +03:00
ζeh Matt e69d46bd41
Rename some variables 2023-03-29 15:54:16 +03:00
ζeh Matt 1dd9fd525f
Fix #19296: Race condition for parallel object loading 2023-03-29 15:54:12 +03:00
Matthias Moninger 745279cded
Fix #19756: Crash with title sequences containing no commands (#19761)
* Fix #19756: Crash with title sequences containing no commands

* Update changelog.txt
2023-03-29 08:50:57 +00:00
Michał Janiszewski 9e4918cdbc Release v0.4.4
- Feature: [#11269] Add properties for speed and length of vehicle animations.
- Feature: [#15849] Objectives can now be set for up to 50000 guests.
- Feature: [#18537] Add shift/control modifiers to window close buttons, closing all but the given window or all windows of the same type, respectively.
- Feature: [#18732] [Plugin] API to get the guests thoughts.
- Feature: [#18744] Cheat to allow using a regular path as a queue path.
- Feature: [#19023] Add Canadian French translation.
- Feature: [#19341] Add “All Scenery” tab to scenery window.
- Feature: [#19378] Add command to combine CSG1i.DAT and CSG1.DAT.
- Feature: [objects#226] Port RCT1 Corkscrew Coaster train.
- Feature: [objects#229] Port RCT1 go karts with helmets.
- Feature: [OpenMusic#20, OpenMusic#21] Added Blizzard and Extraterresterial ride music styles.
- Improved: [#11473] Hot reload for plug-ins now works on macOS.
- Improved: [#12466] RCT1 parks now use RCT1’s interest calculation algorithm.
- Improved: [#14635] Scenery window now shows up to 255 scenery groups.
- Improved: [#17288] Reorganise the order of shortcut keys in the Shortcut Keys window.
- Improved: [#18706] Ability to view the list of contributors in-game.
- Improved: [#18749] Ability to have 4 active awards for more than one month in a row.
- Improved: [#18826] [Plugin] Added all actions and their documentation to plugin API.
- Improved: [#18945] Languages can now fall back to other languages than English.
- Improved: [#18970] Trying to load a non-park save will now display a context error.
- Improved: [#18975] Add lift sprites for steep hills on the wooden roller coaster.
- Improved: [#19044] Added special thanks to RMC and Wiegand to the About page.
- Improved: [#19131] Track missing objects when selecting scenery groups in console.
- Improved: [#19253] Queue junctions drawn properly when using regular paths as queue. Note: Requires using tile inspector to indicate railings can be used at T or X junctions.
- Improved: [#19067] New Ride window now allows filtering similarly to Object Selection.
- Improved: [#19272] Scenery window now allows filtering similarly to Object Selection.
- Improved: [#19447] The control key now enables word jumping in text input fields.
- Improved: [#19463] Added ‘W’ and ‘Y’ with circumflex to sprite font (for Welsh).
- Improved: [#19549] Enable large address awareness for 32 bit Windows builds allowing to use 4 GiB of virtual memory.
- Improved: [#19668] Decreased the minimum map size from 13 to 3.
- Improved: [#19683] The delays for ride ratings to appear has been reduced drastically.
- Improved: [#19697] “Show guest purchases” will now work in multiplayer.
- Change: [#19018] Renamed actions to fit the naming scheme.
- Change: [#19091] [Plugin] Add game action information to callback arguments of custom actions.
- Change: [#19233] Reduce lift speed minimum and maximum values for “Classic Wooden Coaster”.
- Removed: [#19520] Support for Windows Vista systems.
- Fix: [#474] Mini golf window shows more players than there actually are (original bug).
- Fix: [#592] Window scrollbar not able to navigate to the end of large lists.
- Fix: [#7210] Land tile smoothing occurs with edge tiles (original bug).
- Fix: [#17996] Finances window not cleared when starting some .park scenarios.
- Fix: [#18260] Crash opening parks that have multiple tiles referencing the same banner entry.
- Fix: [#18467] “Selected only” Object Selection filter is active in Track Designs Manager, and cannot be toggled.
- Fix: [#18904] OpenRCT2 audio object accidentally exported in saves.
- Fix: [#18905] Ride Construction window theme is not applied correctly.
- Fix: [#18911] Mini Golf station does not draw correctly from all angles.
- Fix: [#18971] New Game does not prompt for save before quitting.
- Fix: [#18986] [Plugin] Sending remote scripts larger than 63KiB crashing all clients.
- Fix: [#18994] Title music doesn’t start after enabling master volume.
- Fix: [#19025] Park loan behaves inconsistently with non-round and out-of-bounds values.
- Fix: [#19026] Park loan is clamped to a 32-bit integer.
- Fix: [#19068] Guests may not join queues correctly.
- Fix: [#19091] [Plugin] Remote plugins in multiplayer servers do not unload properly.
- Fix: [#19112] Clearing the last character in the Object Selection filter does not properly reset it.
- Fix: [#19112] Text boxes not updated with empty strings in Track List, Server List, and Start Server windows.
- Fix: [#19114] [Plugin] ‘GameActionResult’ does not comply to API specification.
- Fix: [#19136] SV6 saves with experimental RCT1 paths not imported correctly.
- Fix: [#19243] .park scenarios don’t complete properly.
- Fix: [#19250] MusicObjects do not free their preview images.
- Fix: [#19292] Overflow in ‘totalRideValue’.
- Fix: [#19339] Incorrect import of crashed particles from SV4.
- Fix: [#19379] “No platforms” station style shows platforms on the Junior Roller Coaster.
- Fix: [#19380] Startup crash when no sequences are installed and random sequences are enabled.
- Fix: [#19391] String corruption caused by an improper buffer handling in ‘GfxWrapString’.
- Fix: [#19434, #19509] Object types added by OpenRCT2 do not get removed when executing ‘remove_unused_objects’.
- Fix: [#19475] Cannot increase loan when more than £1000 in debt.
- Fix: [#19493] SV4 saves not importing the correct vehicle colours.
- Fix: [#19517] Crash when peeps try to exit or enter hacked rides that have no waypoints specified.
- Fix: [#19524] Staff counter shows incorrect values if there are more than 32767 staff members.
- Fix: [#19574] Handle exits in null locations.
- Fix: [#19641, #19643] Missing water tile in Infernal Views’ and Six Flags Holland’s river.
2023-03-28 17:48:53 +02:00
Michał Janiszewski 20d43db4a7
Fix invalid indices to user strings (#19738)
C++ treats `%` (mod) operation differently to common knowledge. While
`1 % 4` yields expected `1`, `-1 % 4` yields `-1` instead of expected
`3`. This can lead to user string IDs with low values (less than
`USER_STRING_START` or 0x8000) to become negative, resulting in
incorrect reads from user strings array.

Instead of trying to massage the value less `USER_STRING_START` into
expected range, I observed the original value (of uint16_t type) would
be congruent even if we didn't subtract, as both modulus and subtrahent
are sufficiently large powers of two.

This is _possibly_ the reason for issues such as
https://github.com/OpenRCT2/OpenRCT2/issues/19240 where crash occured
during park load.

This can be trivially reproduced by loading "Prehistoric - After the
Asteroid" from "Time Twister".
2023-03-28 18:10:59 +03:00
Michał Janiszewski 56ff06a8d2 Fix the object editor tab selector
Object editor has unusually high WIDX_TAB_1 value making the default
32-bit type not wide enough.
2023-03-28 11:37:38 +02:00
Michał Janiszewski be82582063 Fix EditorObjectSelection opening of TrackManager
Calling `Close()` on a window deletes its object, rendering any future
uses of its members invalid.

In this case `WindowsCloseAll` closed Editor window itself rendering
call to `ManageTracks` on a deleted pointer. Previously
`WindowsCloseAll` was called, but earlier in the same function we have
already closed all windows but Editor itself. It is sufficient to close
the editor once we have opened `TrackDesignList`.

When this got fixed, I noticed `TrackDesignList` could not locate any
rides, which was happening due to calls to `ObjectManager::UnloadAll`
in several places. Code to load the selected ride back was added.
2023-03-28 11:37:38 +02:00
Michał Janiszewski 1670de0a4e Fix guest window accessing members after it is deleted
Calling `Close()` on a window deletes its object, rendering any future
uses of its members invalid.
2023-03-28 11:37:37 +02:00
Michał Janiszewski bb6182bafb Fix closing invention list window while holding invention
Calling `Close()` on a window deletes its object, rendering any future
uses of its members invalid.

This can be triggered by opening inventions list window, holding an
invention, closing the inventions list window (e.g. with keyboard) and
then releasing the held invention
2023-03-28 11:37:37 +02:00
Michał Janiszewski 801d760487
Update backtrace token for upcoming release (#19742) 2023-03-28 11:36:17 +02:00
Michał Janiszewski 1f7ef64627
Fix #19574: Handle exits in null locations (#19727)
In park/replay from dump #19574 there was a calamity that happened
likely due to a plugin. Pretty much all rides were deleted in single
tick, which caused the park to mark some locations as null and then it
tripped on one of the many assertions. In many of the places it already
bails out if ride or vehicle is a nullptr, so I followed with similar
approach for invalid ride exits.
2023-03-28 01:16:55 +03:00
Matthias Moninger 62b0a5edfe
Build with link time code generation only on the develop branch 2023-03-26 16:50:18 +02:00
Gymnasiast af167552fb
Add flag to mark an object as a compatibility object 2023-03-25 14:40:03 +01:00
Duncan e904ef406f
Fix #19503. Hide 3+ queue junction railings behind a flag (#19644)
* Fix #19503. Hide 3+ queue junction railings behind a flag

This is to prevent existing parks from changing their behaviour

* Clang format

* Bump version numbers. Update changelog

* Update text
2023-03-23 08:16:32 +00:00
ζeh Matt dddd52799c
Bump up network version 2023-03-22 22:28:15 +02:00
ζeh Matt 5ee5f8013d
Separate game state logic and rendering logic for money entities 2023-03-22 22:28:14 +02:00
ζeh Matt 436c881f95
Rename Vertical to GuestPurchase, this better reflects actual use 2023-03-22 22:28:14 +02:00
Matthias Moninger e8ec7b6c89
Merge pull request #19683 from ZehMatt/parallel-ride-ratings
Improve ride rating calculation
2023-03-22 22:25:06 +02:00
John Mulcahy 3916221cfb
Part of #19608: improve error reporting of zip command failure (#19672) 2023-03-22 19:52:54 +00:00
ζeh Matt 1ae20ca3f2
Apply review suggestions 2023-03-22 21:51:52 +02:00
ζeh Matt 9610578621
Bump up network version 2023-03-22 21:51:52 +02:00
ζeh Matt 1480495d2f
Bump up park version 2023-03-22 21:51:52 +02:00
ζeh Matt d3e377e905
Refactor and optimize ride rating calculation 2023-03-22 21:51:52 +02:00
ζeh Matt 8eec6948c2
Update multiple ride rating states at once 2023-03-22 21:51:52 +02:00
ζeh Matt 72a76a0ea5
Refactor import/export to support multiple ride rating update states 2023-03-22 21:51:52 +02:00
ζeh Matt f07434546c
Re-order the compared fields and add missing ones 2023-03-22 16:34:43 +02:00
Matthias Moninger 6170bb05e2
Merge pull request #19668 from karst/miniminimap
Decrease minimum map size from 13 to 3
2023-03-20 18:21:55 +02:00
Karst adf1c9a1a5 Decrease minimum map size from 13 to 3
As requested by DKMP.
2023-03-18 21:27:19 +01:00
Gymnasiast f31d3c5cc1
Fix #19652: remove_unused_objects removes scenery groups 2023-03-18 14:52:36 +01:00
HtotheTML e6a0262522
Fix water tile in Six Flags Holland (and merge with Infernal Views fix) (#19643)
* Update S6Importer.cpp

* Update changelog.txt
2023-03-16 08:00:59 +00:00
Cory Sanin a102688f5c
Fix: Chat history in wrong order, doesn't pop up 2023-03-15 09:57:05 +01:00
HtotheTML b41438bbc9
Fix missing water tile in Infernal Views (#19641)
* Update S6Importer.cpp

Edit a stray tile in the lava river of Infernal Views to have its missing lava.

* Update changelog.txt

* Update contributors.md
2023-03-14 19:26:51 +00:00
Cory Sanin c9883e1553
Fix: Input text floating outside chat window 2023-03-13 16:54:28 +01:00
Michael Steenbeek 049164c400
Pass dpi as ref when drawing object preview 2023-03-13 16:52:49 +01:00
Rik Smeets ac2afdcfaf
Fix #18994: Title music doesn't start after enabling master volume (#19621) 2023-03-11 16:30:40 +00:00
icy17 75fb313e5a
Fix #19279: Memory leak in Zip.cpp upon error (#19283)
* fix memleak

* Replace deprecated functions and throw on error

---------

Co-authored-by: ζeh Matt <5415177+ZehMatt@users.noreply.github.com>
2023-03-09 18:07:33 -03:00
spacek531 fdbc3d29bb
steam position modifier and animation speed properties (#11269)
* Add speed and frame properties

* add steam position modifier

* copy code from OpenLoco

* update sin and cos

* add computation function

* finalize locomotion code

* fix formatting

* refine code

* refactor things slightly

* manually fix formatting

* use PascalCase and rename

* fix copyright notice

* fix name again

* rename function, move outt  of namespace

* fix rebase issues

* remove pitch table derived from physics

* rename some stuff

* flip vertical component sign to make sense

* change json structure

* create steam particles based on number of animation frames

* fix formatting

* add slope for spiral lift hill down

* fix formatting again

* parens around bitwise and

* make animations separate functions

* rename MultiDimCoaster to MultiDimension

* use EnumValue method

* rework multidim frame count

* bump network to be safe

* fix formatting

* move array out of function

* make table const

* move struct into RideObject.cpp

* try new method to fix numbers in multidim

* implement ZehMatt modulo

* add documentation to new function

* include Yaw.hpp

* rename src/ride/SteamPosition.hpp to src/math/Trigonometry.hpp

* actually add src/math/Trigonometry.hpp

* move ComputeSteamOffset to Vehicle.cpp

* use static asserts on arrays

* fix changelog grammar

* add more static asserts
2023-03-09 15:45:45 +02:00
Matthias Moninger 2ac5e070c1
Fix #19601: Crash hiring staff with auto placement turned off (#19602) 2023-03-09 12:04:19 +00:00
duncanspumpkin 58247ce5c1 Bump network version 2023-03-08 22:05:35 +00:00
ζeh Matt ff1941eb8d
Fix #19586: Guests generated have potentially a large amount of money 2023-03-07 06:46:50 +02:00
Matthias Moninger 30e6eb9f08
Merge pull request #19422 from ZehMatt/string-duplicate
Remove String::Duplicate
2023-03-06 23:29:32 +02:00
Matthias Moninger 7e48b57d6a
Fix #18986: Sending remote scripts larger than 63KiB crashing all clients. (#19573)
* Fix #18986: Sending remote scripts larger than 63KiB crashing clients

* Add GetRemotePlugins in ScriptEngine

* Bump up network version

* Update changelog.txt
2023-03-06 13:50:05 +01:00
Johan Mattsson 0c8486f2d3
Fix potential index out of bounds (#19561) 2023-03-05 20:17:03 +00:00
Ernest Wong e9ecf6ee4a
Fix #19553: Undefined upkeep cost check uses new sentinel value (#19568)
* Fix #19553: Undefined upkeep cost check uses new sentinel value

Mistake from #19469
2023-03-05 20:16:31 +00:00
Matthias Moninger b8966a83e3
Enable Large address awareness for 32-bit builds (#19549)
* Enable large address awareness for 32 bit builds allowing 4GiB memory

* Fix debug builds failing for 32 bit

* Update changelog.txt
2023-03-04 15:55:40 +00:00
Mathias Gibbens 6f7af78642
Fix #17069: Fix build on ppc64el architectures (#19555)
Co-authored-by: Mathias Gibbens <mathias@calenhad.com>
2023-03-04 12:51:08 -03:00
ζeh Matt 712cb49a8d
Fix #19545: Unable to scroll staff list with over 32768 staff 2023-03-03 20:19:39 +02:00
Duncan a018cb1ca5
Fix import of ride value (#19541)
The ride value undefined constant was changed causing all imports of the undefined value to be incorrect. We can fix the broken imports but can't fix the users of the broken value (gParkValue and its history)
2023-03-03 08:45:32 +00: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
Michael Steenbeek 6a89dfbfe9
Fix #19434, #19509: OpenRCT2 object types not removed by ‘remove_unused_objects’ (#19511)
* Add ObjectTypeIsTransient() and ObjectTypeIsIntransient()

* Fix #19434, #19509: remove_unused_objects does not remove OpenRCT2 types
2023-03-02 19:26:19 +00:00
ZeeMajora 2887104707
Fix some RCT1 vehicle colour imports
Fixes a few errors in the vehicle colours table used for RCT1 imports, they are:
Both steam trains third colour should be yellow (the bell and some other details)
Suspended swinging airplane cars third colour should copy colour 2 (the restraints are colour 2 in RCT1 but colour 3 in RCT2)
Reverse freefall car colour 3 should copy colour 1 (the front bits are the same as colour 1 in RCT1)
Vertical drop trains colour 3 should copy colour 2 (the bottom metal bar is the same as colour 2 in RCT1)
Sitdown twister train colour 2 should copy colour 1, colour 3 should copy colour 2 (restraints are colour 2 in RCT1 but colour 3 in RCT2)
Laydown trains colour 3 should copy colour 2 (part of the restraint, it uses colour 2 in RCT1)
Hyper-twister trains colour 3 should copy colour 1 (the lap bar, it uses colour 1 in RCT1)
Face-off trains colour 3 should copy colour 2 (the restraints use colour 2 in RCT1 but colour 3 in RCT2)
River rafts colour 3 should copy colour 2 (the top of the roof uses colour 2 in RCT1 but colour 3 in RCT2)
2023-03-02 09:40:40 +01:00
Michael Steenbeek 4a78fd772c
Fix #19524: Incorrect staff count beyond 32767 (#19530) 2023-03-01 20:58:15 +00:00
Matthias Moninger c3bd837c42
Fix #19517: Crash when peeps try to exit or enter a hacked ride (#19518)
* Fix #19517: Crash when peeps try to exit or enter a hacked ride

* Update changelog.txt
2023-03-01 08:31:20 +00:00
Michael Steenbeek 2a8872018b
Close #13780: Refactor MapGen to class (#19477) 2023-03-01 08:26:30 +00:00
Michael Steenbeek 0674d9527c
Fix #19475: Cannot increase loan when in debt (#19478)
* Small refactor of ParkSetLoanAction

* Fix #19475: Cannot increase loan when in debt
2023-02-28 20:34:18 +00:00
Matthias Moninger d18de99579
Merge pull request #19515 from ZehMatt/fix-large-list
Fix window scrollbar not able to navigate to the end of large lists
2023-02-28 22:34:06 +02:00
Matthias Moninger 71e2618265
Merge pull request #19514 from ZehMatt/hire-staff-complexity
Improve performance of hiring staff and its window
2023-02-28 22:33:28 +02:00
Matthias Moninger 59875eb409
Merge pull request #19480 from Gymnasiast/refactor/dpi-string
Pass DPI by ref to string drawing
2023-02-28 22:27:51 +02:00
Michał Janiszewski 7459ba0efe
GCC 13 fixes (#19519)
This addresses issues when compiling with GCC 13
2023-02-28 21:04:52 +02:00
ζeh Matt 8777ba0195
Improve performance staff list 2023-02-28 16:33:59 +02:00
ζeh Matt 16cc1d3eb9
Change loop for searching free staff id from O(N^2) to O(N*log(N)) 2023-02-28 16:32:42 +02:00
ζeh Matt 320894971f
Fix window scrollbar not able to navigate to the end of large lists 2023-02-28 06:21:15 +02:00
Michael Steenbeek 291a778720
Remove unused WaveFormat and WaveFormatEx structs (#19512) 2023-02-27 23:29:42 +01:00
Matthias Moninger edde337177
Merge pull request #19465 from Gymnasiast/refactor/cmd-line-consistent
Close #19176, close #19273: Consistent “CmdLine” naming
2023-02-27 18:54:38 +02:00
Andrew 0da9693e15
Fix blank row getting added at exactly 19 scenery groups (#19502) 2023-02-26 21:29:00 +00:00
ζeh Matt 7b398d89a6
Remove unused variable 2023-02-25 15:42:37 +02:00
ζeh Matt 365fcf24c3
Implement #19468 and rename functions cursor to caret 2023-02-25 15:42:37 +02:00
ζeh Matt dc97eb5bbd
Fix deleting characters in the middle of the text 2023-02-25 15:42:37 +02:00
ζeh Matt ec2f332b92
Fix #19445: Text not cleared using Ctrl+Backspace 2023-02-25 15:42:37 +02:00
Gymnasiast a15f72da87
Pass DPI by ref to string drawing 2023-02-24 22:05:07 +01:00
Matthias Moninger 777fea6c8c
Avoid triggering an assert when saving the park 2023-02-24 12:45:24 +01:00
Michael Steenbeek be52b55980
Remove some unused stuff (#19474)
* Remove unused symbols

* Remove unused SceneryObject.cpp

* Remove GetScgWallsHeader() and GetScgPiratHeader()
2023-02-23 22:27:21 +00:00
Michael Steenbeek 777d43ae18
Add W and Y with circumflex 2023-02-23 10:56:37 +01:00
Josh Trzebiatowski 04aeed8692
Add "All Scenery" tab to scenery window 2023-02-22 23:31:21 +00:00
Gymnasiast fd4c9a7b9d
Close #19176, close #19273: Consistent “CmdLine” naming 2023-02-23 00:03:30 +01:00
Hielke Morsink d5b7569537
Merge pull request #19453 2023-02-22 20:42:21 +01:00
ζeh Matt d6be08a410
Apply review suggestions 2023-02-22 15:58:05 +02:00
Michael Steenbeek 28476cb9a9
Raise max objective guests to 50000 2023-02-22 13:43:26 +01:00
Michael Steenbeek 767d65f101
RideConstruction: Create constant for group box width (#19461) 2023-02-22 09:08:44 -03:00
ζeh Matt ef8d08c5e5
Add assert to test if the ride slot is actually free 2023-02-22 00:01:44 +02:00
ζeh Matt 6a5bfa5cad
Ensure all rides names are cleared on map load 2023-02-21 23:45:11 +02:00
ζeh Matt b1667d3423
Use a dedicated Ride instance for previews 2023-02-21 23:44:03 +02:00
ζeh Matt d60890f7e5
Use ride id to determine if the slot is unused 2023-02-21 23:29:59 +02:00
ζeh Matt 063d97f4f2
Use fixed size storage for Rides, cleanup interface a bit 2023-02-21 23:20:48 +02:00
Gymnasiast ee7b9ae6b0
Add missing null check 2023-02-19 23:06:05 +01:00
ζeh Matt 60bd8a4f3a
Fix crash at scenario completion 2023-02-19 23:59:16 +02:00
ζeh Matt b057f0fe82
Remove memset 2023-02-19 23:59:15 +02:00
ζeh Matt 1f03bc89d7
Remove unused String::Duplicate 2023-02-19 23:59:15 +02:00
ζeh Matt b465b9d6e5
Use string to store ScenarioIndexEntry name 2023-02-19 23:59:15 +02:00
ζeh Matt 1b216c4d01
Use string to store ScenarioIndexEntry filename 2023-02-19 23:59:15 +02:00
ζeh Matt a0bc5d9f3f
Remove unused functions 2023-02-19 23:59:15 +02:00
ζeh Matt a7ef031430
Remove String::Duplicate in TextComposition.cpp 2023-02-19 23:59:15 +02:00
Hielke Morsink 3e713e5c2f
Fix memory leak in GetFileName (#19420) 2023-02-16 19:45:48 +00:00
kyphii a428f20d46
Fix #19243: .park scenarios don't complete properly (#19411)
* Check for .park scenario during scenario completion

* Update changelog

---------

Co-authored-by: Trevor Finney <8711258+finneyt@users.noreply.github.com>
2023-02-16 05:39:31 +00:00
Michael Steenbeek 583b4ed0e6
Replace GfxDrawStringNoFormatting() (#19414)
* Replace GfxDrawStringNoFormatting()

* Unwrap static DrawText overload
2023-02-15 22:44:22 +00:00
Duncan b56748bc82
ObjectEntry Cleanup. FootpathItem, SceneryGroup, Water, LargeScenery (#19385)
* Move footpathitem entry into new getter

* Move scenery group entry into new getter

* Move water entry into new getter

* Move large scenery entry into new getter

* Remove unused header includes

* Fix compile issue

* Include missing header from vcxproj
2023-02-15 21:35:16 +00:00
Michael Steenbeek eb33147013
Bump network version for #19401 (#19410) 2023-02-15 11:34:03 +00:00
Raymond Zhao a19cd214e7
Introduce mph literal for velocities 2023-02-15 10:40:46 +01:00
Duncan 93b5cabb9e
Merge pull request #19399 from Gymnasiast/refactor/wooden-rc-track-paint
Update WoodenRCTrackPaint() signature
2023-02-14 23:01:29 +00:00
Michael Steenbeek 5fbd3e6ea5
Merge pull request #19401 from Gymnasiast/feature/better-clearances
Allow shops and stalls to set their own clearances
2023-02-14 23:56:43 +01:00
Michael Steenbeek 3ac7858549
Fix #7210: Land tile smoothing occurs with edge tiles (#19400) 2023-02-14 22:09:36 +00:00
Michael Steenbeek b4dc2d3fe6
Fix #19339: Incorrect import of crashed particles from SV4 (#19404) 2023-02-14 22:08:42 +00:00
John R Patek Sr 6e9c10167e
Refactor TopToolbar to class (#19043) 2023-02-14 21:19:42 +00:00
Andrew ef730aa56c
Fix #14635: Show more scenery tab groups in rows (#19373) 2023-02-14 20:57:11 +00:00
Gymnasiast d450a85c5b
Update WoodenRCTrackPaint() signature
Make the signature reflect the arguments and order of PaintAddImage*
2023-02-14 09:57:19 +01:00
Gymnasiast 8b2d3937fd
Clean up call to PaintAddImageAsParent() 2023-02-14 09:57:19 +01:00
Silent 0763fd5a78
Fix GfxWrapString potentially corrupting the in/out buffer
Fixes a consistent assertion when displaying "Cannot start construction"
in Japanese, but it has potential fix countless other crashes
related to string wrapping/display.
2023-02-14 09:50:05 +01:00
Silent 8216d00522
Set the container type in LanguagePack::FromFile to std::string
The code interpreting fileData assumes the string has a valid null terminator,
which is not guaranteed by std::vector, but is guaranteed by std::string.
2023-02-14 09:50:05 +01:00
ACGNnsj d3ea4bfbc8
Remove Duplicated Preprocessor Macro Definition (#19376)
* Update openrct2.common.props

Remove duplicated preprocessor macro definition of _USE_MATH_DEFINES which defined in src/openrct2/common.h and SDL2/SDL_stdinc.h

* Remove the definition of _USE_MATH_DEFINES from 'common.h'
2023-02-14 08:19:58 +00:00
Michael Steenbeek 8a0a4819ca
Close #19393: Replace PaintMonorailCyclesUtil7C() (#19395) 2023-02-14 08:14:47 +00:00
Michael Steenbeek bd84d626c9
Clean up PaintAddImageAsChildRotated() (#19394) 2023-02-14 08:13:56 +00:00
Gymnasiast e585f1a633
Base shop/facility bounding box on actual height 2023-02-14 01:05:13 +01:00
Gymnasiast 23a5044509
Allow shops and stalls to set their own clearances 2023-02-14 00:52:21 +01:00
Michael Steenbeek 70af1c6c0d
Clean up PaintAddImageAsParent() calls (#19392) 2023-02-13 22:07:39 +00:00
kyphii dfb2c3fa60
Fix #17996 - Finances window not cleared when starting some .park scenarios (#19368)
* Clear Finances Graph on Scenario Load

* Update changelog

---------

Co-authored-by: Trevor Finney <8711258+finneyt@users.noreply.github.com>
2023-02-13 21:30:47 +00:00
Michael Steenbeek 3814d6b3af
Add some additional RCT1 vehicle IDs (#19389) 2023-02-13 20:38:03 +00:00
Matthias Moninger 7b61c6352a
Desnake some stuff, small string passing cleanup (#19388)
* Rename scenario_index_entry to ScenarioIndexEntry

* Desnake members of ScenarioIndexEntry

* Pass const u8string& instead of utf8 pointer
2023-02-13 20:30:16 +00:00
Gymnasiast 38b057a0ba
Use BoundBoxXYZ version of PaintAddImageAsParentRotated() 2023-02-13 20:51:42 +01:00
Gymnasiast 04f2479c34
Create PaintAddImageAsParentRotated() function that takes a BoundBoxXYZ 2023-02-13 19:59:30 +01:00
Silent 0383875692
Fix an assertion error in ResearchNextDesign, simplify code 2023-02-13 12:30:24 +01:00
spacek531 df0edc92d0
Vehicle/rename update flags (#19363)
* rename VEHICLE_UPDATE_FLAG_ON_LIFT_HILL

* rename VEHICLE_UPDATE_FLAG_COLLISION_DISABLED

* rename VEHICLE_UPDATE_FLAG_WAIT_ON_ADJACENT

* rename VEHICLE_UPDATE_FLAG_REVERSING_SHUTTLE

* rename VEHICLE_UPDATE_FLAG_READY_DEPART

* rename VEHICLE_UPDATE_FLAG_TESTING

* rename VEHICLE_UPDATE_FLAG_6

* rename VEHICLE_UPDATE_FLAG_ZERO_VELOCITY

* rename VEHICLE_UPDATE_FLAG_BROKEN_CAR

* rename VEHICLE_UPDATE_FLAG_BROKEN_TRAIN

* rename VEHICLE_UPDATE_FLAG_ON_BRAKE_FOR_DROP

* rename VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES

* rename VEHICLE_UPDATE_FLAG_12

* rename VEHICLE_UPDATE_FLAG_ROTATION_OFF_WILD_MOUSE

* rename VEHICLE_UPDATE_FLAG_SINGLE_CAR_POSITION

* rename VEHICLE_UPDATE_FLAG_CRASHED

* name flag 12 to Reverse Incline Completed Lap

* name flag 6 to Currently Colliding

* fix formatting

* rename has/clear/set update flag

* fix formatting again

* move to namespace constexpr

* fix formatting

* the one that got away
2023-02-12 22:32:16 +00:00
Michael Steenbeek 3912381502
Implement "no platforms" for Junior RC (#19379) 2023-02-12 21:33:24 +00:00
Michael Steenbeek 07d198f084
Close #12466: Add flag to use RCT1 interest (#19377)
* Close #12466: Add flag to use RCT1 interest

* Bump network version
2023-02-12 21:23:05 +00:00
Michael Steenbeek bc20c33568
Add command to combine CSG1i and CSG1 (#19378) 2023-02-12 21:13:46 +00:00
Duncan d811c9a9ba
Add Object Entry Manager (#19332)
* Add object entry manager

Port over wall and banner

* Port over small scenery to ObjectEntryManager

Clang format files

Actually make things safe

Fix build
2023-02-12 20:43:11 +00:00
Silent 7fb21721a7
Fix a division by zero in TitleScreen::TitleInitialise (#19380)
This occurs when there are no installed sequences
and random_title_sequence is enabled in the config.
2023-02-12 18:59:28 +00:00
spacek531 1dfbb5f124
Widen Vehicle::update_flags to 32 bits (#19340)
* Expand update_flags to uint32

* move IsCrashedVehicle to update_flags

* rename update_flags to Flags

* Update replays

---------

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2023-02-10 21:46:06 +00:00
eaeiv 96bfa633fe
Widens TotalRideValue to fix overflow reported in #19292 (#19326)
* Widens TotalRideValue to 64 bits

* Adds name to contributors file

* Adds totalRideValue overflow fix to changelog
2023-02-09 21:51:03 +00:00
Josh Trzebiatowski 4591ad2f4e
scenery filtering improvements 2023-02-08 23:54:58 +01:00
Matthias Moninger ece0ee42d5
Rename snake functions in Station.cpp (#19316) 2023-02-05 20:48:35 +00:00
ζeh Matt d492cfc6d9
Make clang-format happy 2023-02-05 18:07:04 +02:00
ζeh Matt bf9efc7f84
Rename some variables 2023-02-05 17:52:47 +02:00
ζeh Matt a2a06d6dde
Return const RideObjectEntry*, refactor uses and fix related access 2023-02-05 17:36:37 +02:00
ζeh Matt 76b94a150c
Cleanup UpdateMaxVehicles 2023-02-05 17:07:09 +02:00
ζeh Matt a509efd0ab
Cleanup VehicleCreateCar 2023-02-05 17:01:21 +02:00
ζeh Matt 6b814ddc9b
Cleanup use of GetRideTypeDescriptor 2023-02-05 16:40:58 +02:00
ζeh Matt 1a83702b2c
De-snake more functions 2023-02-05 16:32:18 +02:00
ζeh Matt 59a0def818
Rename some functions and pass Ride instance instead of ride id 2023-02-05 16:20:51 +02:00
Hielke Morsink 51dccb4096
Remove unused global 2023-01-29 20:51:26 +00:00
Matthias Moninger 62a96cc251
Fix and refactor banner fixing (#19288) 2023-01-28 22:43:59 +00:00
Hielke Morsink 566c1f21dd
Merge pull request #17288 from guljam/clear-shortcut-order
Reorganise the order of shortcut keys in the Shortcut Keys window
2023-01-28 17:31:58 +01:00
Matthias Moninger 5994fe6be6
Merge pull request #19284 from ZehMatt/entityId
Refactor sprite_index to entityId for entities
2023-01-28 18:13:04 +02:00
Hielke Morsink 5ada16723b
Clean up shortcut bindings and unused constructors 2023-01-28 15:43:03 +01:00
Duncan 24581e781f
Move misc ObjectEntries into Object folder (#19281)
* Move water entry

* Move FootpathEntry

* Move EntranceEntry

* Move SceneryGroupEntry
2023-01-27 19:44:58 +00:00
ζeh Matt 2f8e208a9d
Refactor sprite_index to Id 2023-01-27 19:21:57 +02:00
ζeh Matt 17ce2d759f
Rename Id to Id to PeepId to avoid conflicts with entity id 2023-01-27 19:11:04 +02:00
mdbckrtn b1b056ec52
Fix #18839: New staff members now picked up correctly (#18956)
* Fix #18839: New staff members now picked up correctly

When "Automatically place staff" is disabled, new staff members were not automatically placed into the "picked" state as is the case with vanilla RCT. This change ensures that new staff members are automatically placed into the picker and that, in scenarios where multiple new staff members are queued up without having first placed one, the most recently created staff member will be the actively picked up peep (also the case with vanilla).

* Fix #18839: Address networking issues

* Fix #18839: Add else to pickup action intent.
2023-01-27 08:20:59 +00:00
Josh Trzebiatowski 258b569deb
Allow filtering in Scenery window (#19272)
* WIP: scenery searching

* refactor snake case

* actually start filtering scenery

* prepare for merge from develop

* use ObjectManager to get scenery info

* clear selected scenery when it is filtered out

* Clear tool when no scenery is selected

* updating changelog

* fix clang formatting issues
2023-01-26 21:40:02 +00:00
Duncan 85b72c766e
Spin off Object Type into standalone header (#19278)
* Split off object type into standalone header

* Include missing header

* Rename to ObjectTypes.h
2023-01-26 21:39:20 +00:00
Duncan ead13c44b8
Split off LargeSceneryEntry (#19277) 2023-01-26 18:44:42 +00:00
guljam 3fc029fc34
custom order for default shortcut keys 2023-01-26 00:02:20 +01:00
Michael Steenbeek bb7fdc0e28
Hide primary/secondary remap button on broken large scenery (#17045) 2023-01-25 22:21:05 +00:00
spacek531 b1bb24aefb
Fill out TrackSegment API (#18478)
* add fields to track segment api

* add getTrackSegments to API

* change element to segment for continuity

* improve documentation

* continue tweaking documentation

* implement segment suggestions

* clarify purpose of isSteepUp flag

* add rest of track element flags

* remove extraneous information from comment

* continue tweaking API

* implement basssiiie suggestion

* rename angle to slope

* reorder items in the documentation

* bump plugin api
2023-01-25 22:05:18 +00:00
Josh Trzebiatowski c437a9f0cc
Add filter text box to new ride selection window (#19067)
* Add filter text box to new ride selection window

* update after snake_case refactor

* Change _filter to an instance variable, move textbox data assignment to OnPrepareDraw

* replace std::string_view with u8string_view
2023-01-25 21:47:00 +00:00
spacek531 9844532112
Refactor TrackPlaceAction so block brake logic only runs once (#18777)
* move block brake incrementation out of trackblock loop

* add comment to new code block
2023-01-25 21:09:36 +00:00
Michael Steenbeek c260a95abc
Fix #19245: NPE in UpdateRideApproachExitWaypoints() (#19252)
* Fix #19245: NPE in UpdateRideApproachExitWaypoints()

* Apply suggestions from code review

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2023-01-25 20:48:37 +00:00
Duncan ef27814ca5
Split off scenery entries (#19133)
BannerSceneryEntry, WallSceneryEntry footpathItemEntry
2023-01-25 19:56:29 +00:00
Duncan d51b4d3191
Split off SmallSceneryEntry into dedicated file (#19115)
* Split off small scenery entry to new file

* Move flags to new file
2023-01-25 19:25:33 +00:00
Michael Steenbeek 6b85b0a8c7
Change lift speed range of Classic Wooden RC (#19233)
* Change lift speed range of Classic Wooden RC

As this ride is meant to reflect both old-school wooden roller coasters, as well as RCT1’s wooden RC, it makes no sense the lift can be set to speeds up to 11 km/h. Limit this to 4-8 km/h.

* Bump network version

* Add changelog entry

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2023-01-25 12:01:54 +00:00
spacek531 9071c91ec8
RideConstruction window can set block brake speed (#18992)
* RideConstruction window can set block brake speed

* add missing constant

* refactor to allow future expansion

* revert addition of constant
2023-01-25 07:32:03 +00:00
Wirlie 538b87e94c
Fix: A queuing guest can ignore the next guest in the queue in certain circumstances (RCT2 bug) (#19068)
* Use PeepDirection instead of sprite_direction to update queue position

* Align guests to the centre of the first queue tile.

* Bump network version

* Update changelog

* Update replays

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2023-01-24 09:35:12 +00:00
Michał Janiszewski be5b7b7f74
Drop unused variables (#19267)
* Drop unused variable in ShortcutKeys.cpp

* Drop unused variable in TitleMenu.cpp
2023-01-24 09:24:47 +00:00
Josh Trzebiatowski d6027a111a
Fix #19250: MusicObjects do not free their preview images (#19264)
* Fix: MusicObjects do not free their preview images

* Update changelog

* remove unneeded preview check on MusicObject
2023-01-24 05:55:31 +00:00
Josh Trzebiatowski 54f263b704
Fix #19112: Text boxes not updated with empty strings (#19207)
* fix #19112 text boxes not updated with empty strings

* Update changelog
2023-01-23 21:20:27 +00:00
Michael Steenbeek d8417fee30
Desnake the rct2/rct12 fields (#19254) 2023-01-22 19:16:41 +00:00
Michael Steenbeek f328aef84b
Add drawing code for queue junctions (#19253) 2023-01-22 00:59:40 +01:00
Duncan b76bffe1ec
Desnake RCT12 class names 2023-01-21 22:32:44 +00:00
Michael Steenbeek e17f09c25c
Move three tables to MazeSetTrackACtion.cpp 2023-01-21 22:25:31 +00:00
Michael Steenbeek ba39d7be5d
Merge pull request #19241 from Gymnasiast/refactor/more-fields
Desnake TileElement fields, pad_ and byte_
2023-01-21 22:38:07 +01:00
Duncan e09f27df3c
Rename snake_case Class names (Remaining Bits) (#19237)
* Rename snake_case Class names

* Clang format

* Fix build issues
2023-01-21 19:57:17 +00:00
Gymnasiast f6427817e8
Rename byte_ to Byte 2023-01-21 16:41:03 +01:00
Gymnasiast 3dd895abf7
Rename pad_ to Pad 2023-01-21 16:39:35 +01:00
Gymnasiast fa7dd95321
Rename remaining snake in (RCT12)TileElement fields 2023-01-21 16:37:11 +01:00
Michael Steenbeek 09b1074d08
Merge pull request #19234 from Gymnasiast/objects-138
Objects v1.3.8 + fix #474: Mini Golf window allows selecting nonexistent players
2023-01-21 15:41:21 +01: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
Gymnasiast eb5fe27495
Fix #474: Mini Golf window allows selecting nonexistent players 2023-01-20 13:24:16 +01:00
Gymnasiast 06dd935d36
Use RCT1 variants of Corkscrew and Go Karts when importing S4 2023-01-20 12:39:30 +01:00
Michael Steenbeek cf9aad7885
Close #19214: Use consistent casing for RC and RCT (#19230) 2023-01-20 08:19:14 +00:00
Duncan 9deed6d98a
Replace snakes in Class names OpenRCT2/N*-P* (#19227)
* Replace snakes in Class names OpenRCT2/N*-P*

* Rename PODDate (and TimeOfDay for good measure)

Co-authored-by: Gymnasiast <m.o.steenbeek@gmail.com>
2023-01-20 05:24:44 +00:00
Hielke Morsink e110c631f1
Include missing project headers in solution 2023-01-19 23:34:49 +00:00
Michael Steenbeek 31b510a30b
Rename entity-related stuff in RCT12.h
Replaces ‘sprite’ with ‘entity’ where appropriate.
2023-01-19 22:29:48 +00:00
Michael Steenbeek 48619afbb8
Replace snake_case in rct1 folder 2023-01-19 21:48:07 +00:00
Michael Steenbeek 24cc49cde9
Fix #19076: scrolling on money amounts doesn’t work 2023-01-19 21:07:21 +00:00
Michael Steenbeek 448c8fafd0
Rename base_height, clearance_height and owner 2023-01-19 20:36:30 +01:00
Duncan 23b6d1840e
Rename classes with snakes OpenRCT2/G*-M* 2023-01-19 15:13:23 +00:00
Duncan 859b071ddc
Rename classes with snakes OpenRCT2/A*-F* (#19215)
* Rename classes with snakes OpenRCT2/A*-F*

* Clang format files
2023-01-19 08:16:44 +00:00
Michael Steenbeek 59736ecfbc
Merge pull request #19216 from Broxzier/refactor/snake-case-util
Rename snake_case functions in OpenRCT2/util folder
2023-01-19 00:10:28 +01:00
Hielke Morsink ba0c8c135a
Apply review changes 2023-01-18 23:41:59 +01:00
Hielke Morsink 86ffb01ddd
Add comment and rename function pointer 2023-01-18 23:02:44 +01:00
Hielke Morsink 0762fcb601
Rename snake_case functions in OpenRCT2/util folder 2023-01-18 22:44:13 +01:00
Duncan 3456797893
Use clang-tidy to get remaining snakes in ride/coaster (#19200)
* First pass with clang-tidy

Fix Rc RC

Clang format files

* Apply clang tidy to remaining ride files

* Undo table mangling in SplashBoats.cpp

Co-authored-by: Gymnasiast <m.o.steenbeek@gmail.com>
2023-01-18 20:41:42 +00:00
Michael Steenbeek 92dce8e046
Rename snake_case functions in peep folder (#19213) 2023-01-18 20:35:58 +00:00