Commit Graph

369 Commits

Author SHA1 Message Date
Duncan db1c9fab41
Fix #19823. Disallow overriding with wrong object type (#20182)
* Fix #19823. Disallow overriding with wrong object type

Some community objects have been made incorrectly and override small scenery objects with large scenery objects. This prevents that overload from being allowed.

* Bump network version and add changelog
2023-05-14 20:31:06 +00:00
Silent c4b70358c8
More MAX_PATH removals (#20113)
* Refactor FileScanner to lift a MAX_PATH limit

* Replace Platform::EnsureDirectoryExists with Path::CreateDirectory

* Remove MAX_PATH from Platform.Posix.cpp
2023-05-09 20:08:46 +01:00
ZeeMajora 7118249715 Fix a few RCT1 build height discrepancies 2023-05-08 10:26:31 -04:00
Michał Janiszewski 76ca8400ca Release v0.4.5
- Feature: [#18713] Block brakes have speed control and brakes slower than adjacent block brakes copy block brake speed when block brake open.
- Feature: [#19276] Add Powered Lifthill to Giga Coaster.
- Feature: [#19305] Add new Reversed Trains ride setting to run trains backwards, granting a bonus to ride ratings.
- Feature: [#19305] [Plugin] Add “Car.isReversed” to allow individual ride vehicles to run backwards.
- Feature: [#19446] Add new color options to color dropdown.
- Feature: [#19547] Add large sloped turns to hybrid coaster and single rail coaster.
- Feature: [#19930] Add plugin APIs for research.
- Feature: [OpenMusic#25] Added Prehistoric ride music style.
- Feature: [OpenMusic#26] Fairground Organ style 2 with new recordings from Herman's 35er Voigt (Previously known as Bressingham Voigt).
- Feature: [OpenMusic#28] Add Ragtime style 2 ride music.
- Improved: [#17739] Raise water and land height limits to 254 units/182m/600ft.
- Improved: [#18490] Reduce guests walking through trains on level crossing next to station.
- Improved: [#18996] When marketing campaigns are disabled, disable the Marketing tab in the Finances window.
- Improved: [#19764] Miscellaneous scenery tab now grouped next to the all-scenery tab.
- Improved: [#19830] “Highlight path issues” will now hide wall elements.
- Improved: [#19905] Add prompt before resetting shortcut keys.
- Improved: [#19952] Add colour preset to Spiral Slide using the new colour options.
- Improved: [#19953] Add keyboard shortcut to Keyboard Shortcuts window.
- Improved: [#20055] Performance improvement for the software renderer.
- Change: [OpenSFX#17] Update Hybrid RC lifthill loop.
- Fix: [#12598] Number of holes is not set correctly when saving track designs.
- Fix: [#13130] Android always defaulting to UK locale for language, currency and temperature.
- Fix: [#13397] Ride simulation causes strange station behaviour and makes the ride unusable in some cases.
- Fix: [#16791] Rotodrop top piece replicates when walls are placed around it and clearance checks are disabled (original bug).
- Fix: [#18583] Land dropdown is incorrect if there are surface entry index holes.
- Fix: [#18895] Responding mechanic blocked at level crossing.
- Fix: [#19231] Crash due to null pointer to previously deleted banner in tile copy/paste functionality.
- Fix: [#19296] Crash due to a race condition for parallel object loading.
- Fix: [#19733] Favorite ride of X guests integer overflow.
- Fix: [#19756] Crash with title sequences containing no commands.
- Fix: [#19767] No message when path is not connected to ride exit and is therefore unreachable for mechanics.
- Fix: [#19800] Crash when displaying station stats with more than 62 stations.
- Fix: [#19801] The in-game load/save window cannot be resized anymore.
- Fix: [#19854] Looping Coaster trains clipping through steep quarter turns down.
- Fix: [#19858] Issue drawing simulate flag icon on alternate colour palettes.
- Fix: [#19901] Random shop colours never assigning last colour.
- Fix: [#19911] Guests stuck at certain railway crossings.
- Fix: [#19924] Destructible cheat does not allow partial ride modification.
- Fix: [#19950] Mine train block brake supports drawn incorrectly.
- Fix: [#19955] Mine Train Roller Coaster has incorrect supports on the sloped left small turn (original bug).
- Fix: [#19987] [Plugin] ‘SetCheatAction’ has wrong ID in plugin API.
- Fix: [#20016] The group box for small scenery details in the Tile Inspector window has unused empty space.
- Fix: [#20018] Shops not calculating up-keep cost.
- Fix: [#20033] Asset packs cannot reference game data.
- Fix: [#20104] [Plugin] Some network APIs use player index and group index.
- Fix: [#20099] Some scrollbar is glitched or have incorrect size when open window for the first time
- Fix: [#20134] Grass length being updated for tiles in the void, causing unneccesary drawing operations.
2023-05-08 13:02:02 +02:00
spacek531 61d820e614
Refactor special track elements list part 2 (#19951)
Part 2 of #19922
Fixes #19964

There are a lot of files changed, so this PR is structured to be easy to follow by looking at individual commits.

This PR refactors how the special track element list is created. The refactors include:

Divorces creating the list from RideConstructionWindow for modularity, including potential plugin API
Adds list of special track elements which can be re-ordered for more sensible organization
Same-named track elements will collapse into as few entries as possible
Separates up helixes from down helixes in track flags
Track flag separation was done to remove special code related to alpine coaster. Refactors to ride construction window were tested against and confirmed working with:

alpine coaster
suspended swinging coaster
hybrid coaster
inverted coaster
2023-05-07 09:13:22 +00:00
ζeh Matt 5683cf9520
Bump up network version 2023-05-06 18:25:27 +03:00
Jochen Löppenberg 8627a5875f
Fix #20007: Wrong Error message when raising land or water: "Too low!" (#20123) 2023-05-06 12:23:17 +00:00
kyphii 6f55454ae8
Add ratings modifier for reversed trains (#20091)
* Add ratings modifier for reversed trains

* Add test save file and ratings for this

* Changelog entry

* Bump network version

* Modify changelog

* Changelog edit

---------

Co-authored-by: Trevor Finney <8711258+finneyt@users.noreply.github.com>
2023-05-06 02:40:41 +03:00
spacek531 1bbdba40b5
Implement paint code for spiral lifthill down (#19567)
* spiral lifthill down paintcode

* rename string anyway

* add some stuff I forgot and add documentation

* use static assert on SpriteGroupMultiplier

* add slope to list of opposite slopes

* bump scripting version

* update openrct2.d.ts

* improve documentation
2023-04-27 15:11:22 +01:00
ζeh Matt aa00f1768b
Bump up network version 2023-04-23 00:16:04 +03:00
kyphii 9ca4e48c79
Fix: #13397: Broken Stations with Simulate Mode 2023-04-22 19:41:26 +02:00
Duncan cdccb21dd5
Refactor of colours (#19998)
* Move dropdown functions to dropdown code

* Use a map for the colour tip

* Keep dropdownidx and colour seperated

* Allow number of rows to match vanilla

* Apply review comment

* Bump network version
2023-04-22 08:58:13 +00:00
kyphii 6dfc6225e2
"Reversed Trains" Option (#19305)
* Initial commit for backwards-facing trains

* Allow persistence for reversed cars across save/load

* Make log flume turntable compatible with new reversal implementation

* Style fixes + Better implementation of inverted bank angles

* Further Style Fixes

* Code cleanup from PR feedback

* Fix GetBankRotationForDrawing function declaration

* Use update flag for reversed state

* Replace modulo operation with bit mask

* Correct guest pathing destination when entering reversed cars

* More style fixes

* Add plugin support for reversed vehicles

* Fix formatting error

* Derive reversal from ride mode for car spawning

* Formatting

* Rename function to GetPaintBankRotation

* Add reversed trains modes to Multi Dimension Coaster

* Change name of isReversed plugin API parameter for consistency

* Replace reversal operating modes with separate ride setting

* Add ALLOW_REVERSED_TRAINS flag to more ride types

* Make clang-format happy

* More Formatting

* Fix ALLOW_REVERSED_TRAINS flag on a couple rides

* Exclude flat rides from Reverse Trains tickbox when cheats are enabled

* Formatting

* Use Disable Vehicle Limits cheat for checkbox appearance condition

* Use correct swinging sprites when cars are reversed

* Update changelog and Plugin/Network/Park version numbers

* Formatting

* Add separate error String ID for clarity

* Add name to contributors.md

* Fix ride vehicle preview window with reversed trains for RCT1 train types

* Bump version numbers again

---------

Co-authored-by: Trevor Finney <8711258+finneyt@users.noreply.github.com>
2023-04-21 19:22:33 +03:00
Michał Janiszewski 784237202b
Raise water and land height limits to 254 units/182m/600ft (#19988)
* Raise water and land height limits to 254 units/182m/600ft

New parks load correctly in older versions, but cannot be altered there.

Fixes #17739

* Add changelog, bump network and park file version
2023-04-21 12:58:39 +02:00
Chase 7e313d45cd
Fix #19906: Destructible cheat does not allow ride modification (#19924) 2023-04-14 21:10:54 -03:00
Spacek531 033b189b7a bump network version 2023-04-11 19:28:27 -07:00
Duncan 9493af44dd
Fix rand colours missing final colour (#19901) 2023-04-11 18:27:45 -03: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
Karst 1e79825549 Update NetworkBase.cpp 2023-04-08 19:50:13 +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
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
Duncan c0bd64f778
Split of Needs supports changes from OpenRCT2/OpenRCT2#19446 (#19759) 2023-04-04 07:52:07 +00: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
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
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
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 9610578621
Bump up network version 2023-03-22 21:51:52 +02: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
duncanspumpkin 58247ce5c1 Bump network version 2023-03-08 22:05:35 +00: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
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 eb33147013
Bump network version for #19401 (#19410) 2023-02-15 11:34:03 +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
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
ζeh Matt 2f8e208a9d
Refactor sprite_index to Id 2023-01-27 19:21:57 +02: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
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
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
Duncan 23b6d1840e
Rename classes with snakes OpenRCT2/G*-M* 2023-01-19 15:13:23 +00:00
Hielke Morsink 0762fcb601
Rename snake_case functions in OpenRCT2/util folder 2023-01-18 22:44:13 +01:00
Hielke Morsink 2c224cfd53
Rename snake_case functions in OpenRCT2/network folder (#19203) 2023-01-18 06:05:53 +00:00
Michael Steenbeek 12874f2af7
Replace format_string(4) with OpenRCT2::FormatStringLegacy() (#19190)
Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2023-01-17 21:56:30 +01:00
Michael Steenbeek bb55c6ce66
Remove loadsasnakes (#19192)
* Rename snake_case methods in scenario folder

* Rename snake_case methods in title folder

* Rename snake_case methods in object folder

* Rename snake_case methods in platform folder

* Rename snake_case methods in windows folder

* Rename tile_inspector.h to TileInspectorGlobals.h

* Rename snake_case methods in ui/windows folder
2023-01-17 19:46:55 +00:00
Hielke Morsink 6b7dc8fcdb
Rename snake_case functions in openrct2/src folder
Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2023-01-17 13:24:51 +01:00
Michael Steenbeek bf5f7e8e71
Rename format_string(2) and is_user_string_id() (#19178)
Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2023-01-17 08:59:07 +00:00
Stephan Spengler 76b918e7ed
Change openrct2/ride methods to UpperCamelCase, part 1 2023-01-17 01:32:54 +01:00
Gymnasiast 5309c80e29
Remove snake_case in interface folder 2023-01-16 22:20:41 +01:00
Hielke Morsink 6dafbbfb65
Rename global window functions to TitleCase (#19167) 2023-01-16 20:13:42 +00:00
Duncan 8a8d3105f3
Remove snake_case from first chunk of Drawing (#19164)
* Remove snake_case from first chunk of Drawing

* Address formatting
2023-01-16 13:50:43 +00:00
Basssiiie b15a6e843a
[Plugin] Wrap callback arguments for custom game actions in event arguments object, fix issue with unloading multiplayer plugins (#19091)
* Wrap custom game action arguments in event args object

* Update Typescript declaration, documentation and changelog

* Pass custom game action by value and remove log messages
2023-01-15 20:52:23 +00:00
Gymnasiast 24247e9c6b
Migrate server setting getters to u8string 2023-01-08 16:19:18 +01:00
James103 73738bbdc8
Replace 2022 with 2023 in copyright headers
Replace all instances of the year 2022 with 2023 in all copyright headers
2023-01-01 11:58:01 +01:00
Gymnasiast b90eab89fe
Bump network version 2022-12-17 18:08:50 +01:00
Gymnasiast 285e0fc42e
Release v0.4.3
- Feature: [#17782] The Flying Coaster now has access to boosters and can draw outside loops.
- Feature: [#17997] The Log Flume can now draw steep pieces down (if vehicle allows it).
- Feature: [#18312, objects#220, OpenSFX#13] New sound effects for the Hybrid and Single Rail roller coasters.
- Feature: [#18675] [Plugin] Plugins can refer to g2 image icons by name.
- Feature: [objects#173] Add alpine coaster vehicle.
- Feature: [objects#221] Add two extra jungle walls.
- Feature: [objects#225] Add log cabin roofs.
- Feature: [OpenMusic#14, OpenMusic#15, OpenMusic#18] Added Galaxy, Acid and Dodgems ride music styles.
- Improved: [#18013, #18016, #18018, #18019, #18514, objects#224] Added colour presets to Spiral Slide, Dodgems, Boat Hire, Flying Saucers, and Car Ride.
- Improved: [#18024] Clearer error messages when loading incompatible .park files.
- Improved: [#18192] Tycoon Park has been added to the Extras tab.
- Improved: [#18214] Competition scenarios have received their own section.
- Improved: [#18250] Added modern style file and folder pickers on Windows.
- Improved: [#18332] Allow Inverted Roller Coaster to draw boosters.
- Improved: [#18350] Changed ride vehicle list to have less padding.
- Improved: [#18422] Allow adding images to music objects.
- Improved: [#18428] [Plugin] Add widget description interfaces to documentation.
- Improved: [#18487] Mini Helicopters track can now draw spinning tunnels.
- Improved: [#18591] Order RollerCoaster Tycoon 2 scenarios by difficulty.
- Improved: [#18607] A new tab for all UCES Scenarios, if it’s installed.
- Improved: [#18621] OpenGL performance.
- Change: [#17677] Open campaign window from finished campaign news.
- Change: [#17998] Show cursor when using inverted mouse dragging.
- Change: [#18230] Make the large flat to steep pieces available on the corkscrew roller coaster without cheats.
- Change: [#18381] Convert custom invisible paths to the built-in ones.
- Change: [OpenSFX#11, OpenMusic#19] First implementation of official replacement asset packs for sound effects & music.
- Fix: [#1491] Clearance of the Cash Machine is too low (original bug).
- Fix: [#1519] “See-through rides” doesn't affect all rides (original bug).
- Fix: [#6341] “Unlock vehicle limits” does not allow setting fewer vehicles than the vehicle type requires.
- Fix: [#14312] Research ride type message incorrect.
- Fix: [#14425] Ride ratings do not skip unallocated ride ids.
- Fix: [#15969] Guests heading for ride use vanilla behaviour
- Fix: [#17067] Random Staff Patrol Area clicks.
- Fix: [#17316] Sides of River Rapids’ corners overlay other parts of the track.
- Fix: [#17657] When switching from buying land rights to buying construction rights, grid disables and won't re-enable afterwards.
- Fix: [#17763] Missing validation on invalid characters in file name.
- Fix: [#17853] Invention name tears while being dragged.
- Fix: [#18064] Unable to dismiss notification messages.
- Fix: [#18070] Underground entrance/exit shows through terrain walls (original bug).
- Fix: [#18094] Underground shops & facilities don't show when adjacent to non-underground path (original bug).
- Fix: [#18122] Ghosts count towards “Great scenery!” guest thought.
- Fix: [#18134] Underground on-ride photo section partially clips through adjacent terrain edge.
- Fix: [#18244] Invention DragWindow's starting position is inconsistent.
- Fix: [#18245] Guests stopping dead in their tracks at railway crossings.
- Fix: [#18257] Guests ‘waiting’ on extended railway crossings.
- Fix: [#18354] Overwrite alert does not show when save name has different casing on Windows.
- Fix: [#18379] Tunnel entrances for underground Mini Golf Hole E are not rendered correctly.
- Fix: [#18442] About window background is clickable.
- Fix: [#18449] [Plugin] Change type of listview widgets from 'scroll_view' to 'listview'.
- Fix: [#18453] Slow walking guests don't get across level crossings in time.
- Fix: [#18469] Land rights window buttons incorrectly disabled and markers remain visible indefinitely.
- Fix: [#18459] ‘Highlight path issues’ hides fences for paths with additions.
- Fix: [#18552] Trains clipping through helixes.
- Fix: [#18576] Cannot open parks with certain types of corrupt tile elements.
- Fix: [#18606] JSON objects do not take priority over the DAT files they supersede.
- Fix: [#18620] [Plugin] Crash when reading widget properties from windows that have both static and tab widgets.
- Fix: [#18653] Negative ratings multipliers do not appear in Vehicle tab.
- Fix: [#18696] Construction rights cannot be viewed after all are purchased.
- Fix: [#18720] Upwards helix is enabled for the Alpine Coaster, even when cheats are off.
- Fix: [#18755] Ferris Wheel and Circus ghosts not coloured correctly.
- Fix: [#18802] Game could crash when determining if a mechanic is heading to fix the ride blocking the path.
2022-12-14 13:22:08 +01:00
Karst 2c68c73a24
Add steep drops to the Log Flume 2022-12-07 22:52:22 +01:00
Duncan 482971710d
Apply code style to context functions 2022-11-06 21:49:07 +01:00
AuraSpecs 4c218ba443
Allow Inverted RC to draw boosters 2022-11-05 11:59:31 +00:00
Duncan 7f085e2752
Update rating skipping unused ride ids (#14425)
* Skip empty ride ids when evaluating ride ratings

This isn't much of a problem atm but when we increase the limit it may start to become an issue

* Increment network version

* Update changelog
2022-11-04 20:17:31 +00:00
73 048352edca
Guests will use Vanilla behaviour when choosing whether to head for a ride when leaving the park #15969 (#18500)
* Fix #18501: Guests incorrectly determining ride

This will restore guest behaviour to how it was in rct2 vanilla by having them only try to determine whether to ride a ride if they haven't already decided to leave the park

* Fix peeps incorrectly deciding when to get on rides in rain

This should now match how vanilla operates in the rain

* Update replays

Co-authored-by: reticulatingsplines <13323105+ReticulatingSplines@users.noreply.github.com>
Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2022-11-04 07:22:04 +00:00
Rik Smeets b2ae5b1413
Fix guests stopping dead in tracks at crossings (#18245)
When guests have to stop for a railway crossing, they stop dead in their tracks - right at the frame at which stop walking. This could look a tad weird at times.

Now, guests will assume a natural idle waiting position. If they have food or a drink, they will continue consuming it from time to time. And occasionally, guests might even wave at the train passing by!
2022-11-01 08:43:38 +01:00
Rik Smeets 6faddd94f5
Fix slow guests don't get across level crossing in time (#18453) 2022-10-31 19:57:50 +01:00
Hielke Morsink bff430805f
Rename public network config data members 2022-10-16 21:46:06 +02:00
AuraSpecs dda256ef5f
Add inverted large loops and inverted boosters to Flying RC 2022-10-13 20:51:54 +02:00
Rik Smeets bba54d2ecc Fix guests 'waiting' on extended railway crossings
On extended railway crossings, guests would stop to 'wait' for the passing train, which would then phase right through them. This change at least allows guests a chance to get to a safe place.
2022-10-08 21:59:26 +02:00
ZeeMajora ea04c0b010
Corkscrew rc's large flat to steep pieces available cheatless (#18230)
Makes the corkscrew roller coaster's large flat to steep pieces available without cheats for consistency with the looping & twister roller coasters which are similar coaster types that have this element available without cheats.
2022-10-07 22:27:58 +02:00
duncanspumpkin 16581e9288 Address snakes in mapgen and map animation 2022-10-05 20:22:51 +01:00
Nick 4aabc00335
Fix: ghosts are counted in guest scenery or fountain thoughts 2022-10-05 17:57:22 +00:00
Gymnasiast 8ceea45877
Release v0.4.2
- Feature: [#6326] Ability to load .SV6 files from RCT Classic that have more than 9601 guests.
- Feature: [#6570, #10860, #17929] Fully support RollerCoaster Tycoon Classic as a RCT2 base install path.
- Feature: [#13634] Add ability to sell merchandise in random colours.
- Feature: [#16164] Add new track elements for Flying Coaster and Lay-Down Coaster and add paint code for more elements.
- Feature: [#16283] Added parkinfo command line tool to list objects in a save file.
- Feature: [#16662] Show a warning message when g2.dat is mismatched.
- Feature: [#17107] Ride operating settings can be set via text input.
- Feature: [#17638] Added Zero G rolls, medium loops and large corkscrews to the Hybrid and Single-Rail coasters.
- Feature: [#17821] [Plugin] Add API for track subpositions and vehicle subposition.
- Feature: [#17877] Add three real-life flying roller coaster colour schemes.
- Feature: [#17900] Add “Classic Wooden Coaster” with shallow banked turns.
- Feature: [#18057] Staff members now wait for passing or stalled vehicles before crossing railway tracks.
- Feature: [#18168] Add additional track pieces to the LIM Launched Coaster and the Looping Coaster.
- Feature: [objects#198] Add additional pirate roofs.
- Feature: [objects#205] Add additional glass roofs.
- Feature: [objects#209] Add the Steel Roller Coaster train and 2-across Inverted Train from RollerCoaster Tycoon 1.
- Feature: [#18050] Add asset pack manager and asset packs.
- Improved: [#15358] Park and scenario names can now contain up to 128 characters.
- Improved: [#15589] Numpad Enter can now be used to close text input.
- Improved: [#16819] Don’t prompt to “Save game as” when saving a loaded saved game (excepting autosaves).
- Improved: [#16840] Add support for rectangular heightmaps.
- Improved: [#17575] You can now search for Authors in Object Selection.
- Improved: [#17806] Added warning when using RCT1 objects without RCT1 linked.
- Improved: [#17868] [Plugin] You can now change active tab of a custom window programmatically.
- Improved: [#17909] Track elements that are not supported by any train are now hidden by default.
- Improved: [#17924] Improved performance when loading JSON object images from a .DAT file.
- Improved: [#17955] Modifying ratings via in-game console is now multiplayer-safe and also freezes the ratings.
- Improved: [#18177] [Plugin] Widget tooltips can now be read and changed.
- Change: [#9104] Calculate maze support costs.
- Change: [#17319] Giant screenshots are now cropped to the horizontal view-clipping selection.
- Change: [#17499] Update error text when using vehicle incompatible with TD6 and add error when using incompatible track elements.
- Change: [#17655] Lower default price for the Crooked House.
- Change: [#17745] Make maintenance cost of Mini-Golf more balanced.
- Change: [#17762] Use vertical tabs in the New Game dialog.
- Change: [#18113] Increased limit of Loan Interest in Scenario Editor to 255%.
- Fix: [#5141] Headless server is counted as a player.
- Fix: [#7466] Coaster track not drawn at tunnel exit.
- Fix: [#10535] Guests getting stuck at specific level crossings.
- Fix: [#14337] Guest blocking ride entrance after ride price changed to be unaffordable.
- Fix: [#15328] Wooden Roller Coaster incorrectly draws a railing on the first station piece (original bug).
- Fix: [#16392] Scenery on sloped surface is placed at wrong height.
- Fix: [#16476] The game sometimes crashes when demolishing a maze.
- Fix: [#17053] Crash when trying to open files under 4 bytes in length.
- Fix: [#17312] (Flying) Inline Twist appearing under the surface when placed on ground level.
- Fix: [#17339] Distorted visuals when changing scaling factor between integer numbers in OpenGL rendering mode.
- Fix: [#17394] Six-seater Hyper-Twister Trains focuses ride window camera on Car 2 rather than Car 1 (original bug).
- Fix: [#17430] Possible crash when toggling tile element visibility in multiplayer.
- Fix: [#17444] “Manta Ray” boats slowed down too much in “Ayers Rock” scenario (original bug).
- Fix: [#17503] Parks with staff with an ID of 0 have all staff windows focus on that staff.
- Fix: [#17508] Grid doesn’t disable after setting patrol area.
- Fix: [#17532] Object Selection window allows unselecting all station types.
- Fix: [#17533] Missing audio when specifying ‘--rct2-data-path’.
- Fix: [#17535] Multiplayer desync when placing rides with scenery.
- Fix: [#17541] Station style not correctly saved to TD6.
- Fix: [#17542] Stalls will autorotate towards paths outside the park.
- Fix: [#17544, #17754] Visual glitches in Invention List window.
- Fix: [#17553] Crash when moving invention list items to empty list.
- Fix: [#17571] All researched tracked rides show up as new vehicles in .park scenarios.
- Fix: [#17600] Notifications are not properly cleared when loading a park.
- Fix: [#17605] Crash when opening parks which have had objects removed externally.
- Fix: [#17639, 17735] When building upside down, the special elements list contains many items twice (original bug).
- Fix: [#17664] Unable to save after an extended period of time due to inactive ride music data leaking.
- Fix: [#17703] (undefined string) when building on invalid height.
- Fix: [#17776] “Other Parks” tab uses separate lists for SC4/SC6 and .park scenarios.
- Fix: [#17784] Colour preset RNG is biased (original bug).
- Fix: [#17788] Guests could leave queue if another guest rejoins it from the entrance building.
- Fix: [#17834] Finance window becomes blank after 4096 years.
- Fix: [#17816] Option to pause game when Steam Overlay is active is not greyed out when using the OpenGL renderer.
- Fix: [#17897] Guest can get stuck on tiles with construction rights outside the park.
- Fix: [#17904] Trees are removed at no cost to make way for ride entrance/exits.
- Fix: [#17905] The chain button in the map window is enabled for rectangular maps when (re)opened.
- Fix: [#17931] The in-game command ‘count_objects’ crashes the game.
- Fix: [#17865] With difficult guest generation, tested but unopened rides still contribute to the guest cap.
- Fix: [#17866] [Plugin] Wrong Soft Guest Cap at start of new game.
- Fix: [#17889] Peeps don’t stop at level railway crossings if approached from downhill.
- Fix: [#17980] Queue lines of track designs mess up existing queue lines if dragged through them.
- Fix: [#17959] Areas marked for dirty drawing are too large.
- Fix: [#17963] Some marketing campaigns can’t be started after Finances window tab has been on Research.
- Fix: [#17964] Sprites don’t show up on two sides of the view-clip selection.
- Fix: [#17966] Reversed steel trains do not properly import from S4.
- Fix: [#17973] Bins and lamps overlay parts of the land (original bug).
- Fix: [#18008] Steeplechase S-bends has multiple gaps visible in the tracks (original bug).
- Fix: [#18009] Visual glitch with litter at edge of sloped path.
- Fix: [#18025] Fix land ownership in Six Holland, Six Flags Magic Mountain, North America - Grand Canyon and Asia - Great Wall of China Tourism Enhancement scenarios.
- Fix: [#18026] Park rating drops to 0 with more than 32k guests, total ride excitement or intensity.
- Fix: [#18032] All non-interactive widgets (labels, groupboxes) produce sound when clicked.
- Fix: [#18035] Favourited servers don’t get their online status updated.
- Fix: [#18051] Visual glitch with Mine Ride’s large unbanked turn (original bug).
- Fix: [#18059] [Plugin] Width and height of custom window not changeable via script.
- Fix: [#18063] Guests can stop for all kinds of actions at railway crossing.
- Fix: [#18087] Bank balance is clamped to a 32-bit integer every transaction.
2022-10-05 12:07:57 +02:00
X123M3-256 8b00fd1824
Add additional track pieces to LIM Launched Coaster and the Looping Coaster (#18168) 2022-10-05 06:41:10 +00:00
Rik Smeets 6d97bbddf9
Fix #18063: Guests stopping at railway crossings
Guests could stop at railway crossings for actions like taking a picture, watching a ride / a ride being constructed, reading a map etc. This also could mean they'd be in the way for a passing train.

Now, these actions will no longer be performed if the guest is at a crossing.
2022-10-01 19:09:51 +02:00
73 b9e677945d
Replace 20XX with 2022 (#18158)
* Replace 2020 with 2022

Replace all 2020 headers with 2022

* replace other years with 2022

add missing years
2022-10-01 08:42:14 +01:00
Rik Smeets efa7a23773
Fix #18140 & #18143: Invalid read in Staff
The tile element should be determined the same way as is done when checking if the footpath is blocked by a vehicle.

Also added some extra safety checks and made the code a bit more efficient / reusable. For example: when the staff member is not a mechanic, the tile element doesn't have to determined.
2022-09-30 18:00:59 +00:00
Michael Steenbeek a0dd6a3aa6
Fix #18087: gCash clamped to 32-bit integer every transaction 2022-09-28 12:20:44 +02:00
73 a8073f6bd5
Increase limit on Loan Interest from 80% to 255%
Co-authored-by: Gymnasiast <m.o.steenbeek@gmail.com>
2022-09-27 12:20:01 +02:00
Michael Steenbeek ae0f548d97
Bump network version 2022-09-25 19:21:05 +02:00
Gymnasiast d135d7dc52
Bump network version for fd531903ce 2022-09-25 13:33:32 +02:00
Rik Smeets 6c6ea169f1
Add railway crossing behaviour for staff (#18057) 2022-09-24 07:44:19 +02:00
Gymnasiast 9367314a9f
Bump network version 2022-09-22 16:22:33 +02:00
Gymnasiast 8c40223af3
Bump network and plugin API versions 2022-09-21 20:45:17 +02:00
Fruitsalad 27e7a1fca7
Added definitions for if DISABLE_NETWORK is defined. 2022-09-06 23:28:34 +02:00
Fruitsalad 63520216a4
Fixes a minor bug
Apparently NetworkBase isn't reset between connecting to a
server and starting a new server, so previously if you
connected to a server that set IsServerPlayerInvisible to
true, disconnected and then started a server (without
closing OpenRCT), player 0 would be invisible despite
the server not being headless.
2022-09-06 23:28:34 +02:00
Fruitsalad f17b1a970e
Remove headless servers from the player list UI 2022-09-06 23:28:33 +02:00
Fruitsalad 5bdcd06dec
Remove headless servers from the server list player count 2022-09-06 23:26:27 +02:00
Fruitsalad 27bf5e160d
Remove unused variable wsa_initialized from NetworkBase 2022-09-06 23:26:27 +02:00
Yuvraj Tetarwal 90b6cdb62e
Fix #17904: Trees are removed at no cost to make way for ride entrance/exits 2022-09-05 22:49:16 +02:00
Gymnasiast eea69c026c
Bump network version 2022-09-03 16:24:39 +02:00
Rik Smeets e0648f8ddb
Fix guests leaving queue if other guest rejoins it (#17788)
If another guest returns to the queue from the entrance building, guests arriving at the entrance building through the queue could decide to leave it.
2022-08-29 19:57:51 +01:00
AuraSpecs 2633eb013f
Add three colour schemes to Flying Roller Coaster 2022-08-27 15:37:24 +00:00
spacek531 74ff5429a9
Add Classic Wooden Roller Coaster
Co-authored-by: Gymnasiast <Gymnasiast@users.noreply.github.com>
2022-08-26 23:53:03 +02:00
Rik Smeets 67ea7e739f
Fix #14337: Guest blocking ride entrance (#17743)
If the ride price becomes unaffordable for a guest who is already waiting to enter a vehicle, that guest became stuck due to an animation loop.
2022-08-22 21:15:58 +01:00
Hielke Morsink 7f29e4e39c
Make `rct_windowclass` strong type `WindowClass`
This already revealed some places where implicit conversions were done, including some where its use was nonsense (MouseInput.cpp).
The changes to the Intent class were necessary to keep things working, and this splits things up more neatly.
2022-08-21 18:38:25 +02:00
Dan Stevens 4291568a95
Fix #17844L ‘ride.ratings.calculate’ hook called several times during calculation
The ‘ride.ratings.calculate’ API hook is now called for a ride only after its rating calculations are complete (RIDE_LIFECYCLE_TESTED lifecycle_flag is set).
2022-08-21 00:25:17 +02:00
Duncan adc51ad9aa
Rework rct_vehicle_colour (#16051)
* Remove rct_vehicle_colour and replace with VehicleColour

* Update network version

* Update replay version
2022-08-13 19:30:30 +00:00
ale a187e10819
Fix #17535: Multiplayer desync when placing rides with scenery 2022-08-13 18:27:43 +02:00
Michael Steenbeek 39722307d2
Fix #11746: Cannot set ride or shop prices in some circumstances (#17765) 2022-08-09 18:06:21 +00:00
Basssiiie fe9e60975f
Increment network version for #17638 (#17699) 2022-08-03 19:59:25 +00:00
Gymnasiast d3fd31c611
Rename rct_string_id to StringId 2022-07-31 22:30:13 +02:00