Commit Graph

19490 Commits

Author SHA1 Message Date
Michael Steenbeek 1f5e9ac285
Clean up path additions entry index handling (#20177)
* Clean up path additions entry index handling

* Bump network version
2023-05-20 09:33:02 +01:00
Rik Smeets 5b117ce910
Merge pull request #20078 from Gymnasiast/refactor/laydown-coaster
Cleanup uninverted Laydown RC code
2023-05-19 10:26:40 +02:00
LurkerRCT 946e57b7dd
Add Side Friction Roller Coaster colour preset (#20243)
* Update SideFrictionRollerCoaster.h

* Update changelog.txt

* Update src/openrct2/ride/coaster/meta/SideFrictionRollerCoaster.h

Co-authored-by: Rik Smeets <30838294+rik-smeets@users.noreply.github.com>

* Update distribution/changelog.txt

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

---------

Co-authored-by: Rik Smeets <30838294+rik-smeets@users.noreply.github.com>
Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
2023-05-19 08:19:03 +00:00
Michael Steenbeek 5e495d63c7
Close #15660: Allow showing window buttons on the left (#20176) 2023-05-19 10:17:38 +02:00
Matthias Moninger 551a68138e
Merge pull request #20233 from ZehMatt/fix-tooltips
Fix tool tips disappearing too quickly
2023-05-18 20:01:45 +03:00
ζeh Matt bdbb9023da
Fix tool tips disappearing too quickly 2023-05-18 18:08:16 +03:00
ζeh Matt a51d8066bf
Fix #20223: Reduce amount of audio samples to 256 to avoid high latency 2023-05-18 17:22:11 +03:00
Bart Ribbers 053c00218f
Fix int32_t being undefined on Musl systems due to missing import (#20231) 2023-05-18 14:16:59 +01:00
Matthias Moninger 6bd5f75330
Update the UI at screen refresh rate (#20214)
* Update the UI at screen refresh rate

* Decouple input from ticks, fix scroll at high frame rates

* Fix holding down mouse button on buttons causing too many events

* Subtract the initial delay to keep the same behavior as before

* Guard against the rare case where the value might be 0

* Fix right click not working correctly

* Fix odd behavior when using right click to scroll lists

* Make touch work again, fix mouse panning in fullscreen (borderless)

* Update changelog.txt
2023-05-17 19:19:44 +00:00
kyphii 0b18bc0923
Fix #20111: All coaster types can access the new diagonal slope pieces (#20150)
* Fix access to diagonal slopes and turns

* Add changelog entry

---------

Co-authored-by: Trevor Finney <8711258+finneyt@users.noreply.github.com>
2023-05-17 19:42:09 +01:00
spacek531 4507d3e5c4
fix restraints with 8 angles (#20197) 2023-05-17 19:41:23 +01:00
Michael Steenbeek 4a79af7b20
Use strong enum for ViewportSetVisibility (#20230) 2023-05-17 19:27:22 +01:00
Michael Steenbeek fe2d1e2372
Small symbol cleanup (#20229)
* Remove unused generate_string_file() declaration

* Move IsUserStringID() to RCT12.h

The function is only used by RCT1/2 code, and the implementation is in RCT12.cpp

* Move ScenarioTranslate() to ScenarioRepository.cpp

Seems to have ended up in ObjectRepository.cpp by accident.
2023-05-17 19:27:04 +01:00
Hielke Morsink 27e06ef7b7
Fix naming collision 2023-05-15 21:30:06 +02:00
Hielke Morsink fd3346b4b3
Fix: items after the removed RCT1 theme have wrong index 2023-05-15 21:13:47 +02:00
Hielke Morsink edd31163b0 Refactor GetTitleMusicDescriptor back to one function 2023-05-15 19:26:49 +01:00
Hielke Morsink 0a8c804347 Make the OpenRCT2 theme song the default 2023-05-15 19:26:49 +01:00
Karst 6d84a0681e Add about info 2023-05-15 19:25:00 +01:00
Karst 674443d075 Add OpenRCT2 official title music
Co-Authored-By: Ted John <intelorca@gmail.com>
2023-05-15 19:24:10 +01:00
AuraSpecs ed402ccef1
Upgrade sound engine to support 44100hz sample rate (#20200)
* Upgrade sound engine to support 44100hz.
* Increase audio output buffer size to 4096.
2023-05-15 18:42:15 +01:00
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
Michael Steenbeek 58baa85a27
Small path additions cleanup (#20076)
* Split off path addition paint calls

* Replace occurences of “path bit” with “path addition”

* Replace occurences of “footpath item“ with “path addition”
2023-05-09 20:08:25 +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
Michał Janiszewski f1c79f6ac4
Iterate widgets only until last (#20116) 2023-05-07 20:37:06 +00:00
Michał Janiszewski 0871525850
Use precompiled headers for libopenrct2 with MSVC (#15997)
* Use precompiled headers for libopenrct2 with MSVC

* Exclude PCH from duktape

duktape needs all the warnings turned off and forcing PCH also enables
warnings. As there is nothing duktape would consume from our header,
remove forcing inclusion of that header into duktape.

* Provide msbuild parameter for using PCH only in CI
2023-05-07 21:53:50 +02:00
Matthias Moninger 4afa56e373
Merge pull request #20143 from janisozaur/gcc-13.1
Fix compatibility with GCC 13.1
2023-05-07 22:09:17 +03:00
Michał Janiszewski 6f2bf26ce1 Do the seekg thing 2023-05-07 20:46:05 +02:00
Michał Janiszewski 01f32a660f Fix length calculation 2023-05-07 20:00:37 +02:00
Matthias Moninger 4cb5620f43
Fix #20145: Add missing OnRidePhoto to the special element table (#20147) 2023-05-07 19:52:11 +02:00
Michał Janiszewski 851632510f Use unique_ptr 2023-05-07 19:37:56 +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
Michał Janiszewski be145da783 Fix compatibility with GCC 13.1 2023-05-06 23:02:26 +02:00
ζeh Matt 5683cf9520
Bump up network version 2023-05-06 18:25:27 +03:00
ζeh Matt 4c78c8e512
Remove pointless masking 2023-05-06 18:25:27 +03:00
ζeh Matt cc1eee5bee
Fix #20134: Don't update grass length outside of the actual map 2023-05-06 18:25:27 +03:00
Meehoi 936f017147
Fix #20096: Server list window scroll is glitched when server list is empty (#20099)
* Fix initial scroll size of server list and change cast to int32_t

* set actual width for server list too

* add indentation

* fix pixel size of other scroll

* revert unnecessary changes

* add changelog entry
2023-05-06 17:01:14 +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
Matthias Moninger e9c480c66e
Fix #20121: Guard against nullptr on viewport scroll (#20122) 2023-05-03 20:15:02 +01:00
Ted John 79f8913065 Fix CI due to sign issue 2023-05-02 20:28:14 +01:00
Ted John 0ed4bfbc4a Return null for legacyIdentifier 2023-05-02 20:28:14 +01:00
Ted John cbd4c78cf6 Handle legacy objects correctly 2023-05-02 20:28:14 +01:00
Ted John 069a2b3192 Implement object manager for plugins 2023-05-02 20:28:14 +01:00
Ted John f95472c70a Add API for installed objects 2023-05-02 20:28:14 +01:00
Ted John f1ac4363ce Fix openrct2.d.ts 2023-05-02 20:28:14 +01:00
Ted John d3a65443f2 Increment plugin API version 2023-05-02 20:28:14 +01:00
Ted John 58dc3f193b Use simple identifiers 2023-05-02 20:27:57 +01:00
Ted John bf3c6964be Remove scenery from object type names 2023-05-02 20:27:56 +01:00
Ted John 74fc4d3666 Revert re order of small scenery function 2023-05-02 20:27:56 +01:00
Ted John 1a73a0be68 Implement other scenery objects 2023-05-02 20:27:56 +01:00
Ted John 2729956cef Add scenery group object interface 2023-05-02 20:27:56 +01:00
Ted John 530dfac7c9
Fix #20104: [Plugin] Some network APIs use player index and group index (#20115)
Change all APIs that took a player index or group index so that they now take unique IDs.
2023-05-02 15:25:05 +01:00
Michał Janiszewski 42fa4cb6b9
Update backtrace token (#20117) 2023-05-01 23:03:30 +02:00
kyphii fe219281ec
Refactor Ride Ratings 2023-04-29 22:03:25 +02:00
kyphii 4237a02105
Fix mine train diagonal piece drawing incorrectly (#20082)
Co-authored-by: Trevor Finney <8711258+finneyt@users.noreply.github.com>
2023-04-29 07:41:49 +01:00
Tom c2042d541a
Refactor window to class: Research (#19910)
* Refactor window to class: Research (#13794)

- Update Research window to new window class

- Refactor dependant windows (Finances and NewRides)

* Refactor window to class: Research (#13794)

- Refactor all shared logic for both pages in research window. Reused by Finances and NewRides windows.

* Refactor window to class: Research (#13794)

- Fix style issues

* Refactor window to class: Research

- Fix style issues, again

* Refactor window to class: Research

- Override Window class methods

* Refactor window to class: Research

- Remove old method comments

* Refactor window to class: Research

- Addresses code review comments

* Refactor window to class: Research

- Adds ResearchWindow ctor

* Refactor window to class: Research

- Hide funding dropdown in no money scenarios
- Addresses code review comments
2023-04-28 23:54:02 -03:00
Gymnasiast 83612a98e1
Move all other uninverted Lay-down coaster parts to Corkscrew 2023-04-29 00:21:15 +02:00
Gymnasiast 6281e8b603
Use Corkscrew RC for 46 other Lay-down track elements 2023-04-29 00:21:14 +02:00
Gymnasiast a534a94286
Use Corkscrew RC for 16 Lay-down track elements 2023-04-29 00:21:14 +02:00
Matthias Moninger 79af072cf4
Merge pull request #20055 from ZehMatt/dirty-grid
Improve dirty grid rendering performance.
2023-04-27 18:16:33 +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
Tulio Leao c849a75bc8
Close #13782: Refactor Multiplayer window to class (#19948) 2023-04-27 07:05:14 -03:00
ζeh Matt d6b340b34d
Fix comments 2023-04-26 21:58:44 +03:00
ζeh Matt 5439c7ffeb
Improve dirty grid rendering performance. 2023-04-26 18:37:00 +03:00
Chase d6ebeca483
Fix #19935: Part of old multiplayer name remains when entering a shorter name (#20004)
* clear _playerName

* Change _playerName to a u8string

* Explicitly set underlying string ptr on change
2023-04-26 08:34:39 +01:00
Michael Steenbeek c96762517f
Use strong enum for metal supports (#20045) 2023-04-24 21:46:33 -03:00
Duncan ee100f59c0
Fix #19800. Crash when more than 62 stations on a ride (#20039)
* Fix #19800. Crash when more than 62 stations on a ride

This is a bit of a temporary fix. The crash happens due to exhausting the space in the formatter but the format string only ever handled 4 stations so it was still not going to work for 5 <=> 62 stations. So for the time being capped the output at 4 stations.

* Add changelog entry

* Apply review comment
2023-04-24 21:16:21 +00:00
Ted John 9dac7f889f
Fix #18583: Land dropdown is incorrect if there are surface entry holes (#20035) 2023-04-24 22:00:12 +01:00
Ted John 0cf24f0100
Fix #20033: Asset packs cannot reference game data (#20034) 2023-04-24 21:55:36 +01:00
Michael Steenbeek 2f25d4054b
Refactor/wooden supports 2 (#20005)
* Use new enum in MiniatureRailway.cpp

* Add new paint functions for Wooden B supports

* Update and consolidate Wooden B supports calls for Minetrain RC

* Consolidate Wooden A supports calls for Minetrain RC

* Replace some unnecessary calls to PaintAddImageAsParentRotated()
2023-04-24 21:54:16 +01:00
kyphii c74e69b8a0
Fix #20027: Looping coaster with the reverse train option makes the wrong sound (#20028)
* Always use carEntry 0 for friction sound

* Use front car entry for sound index

* Add note for carEntry sound properties

* Bump network version

---------

Co-authored-by: Trevor Finney <8711258+finneyt@users.noreply.github.com>
2023-04-24 08:03:01 +01:00
Matthias Moninger 21a0ccbb77
Merge pull request #20024 from ZehMatt/fix-20018
Fix #20018: Shops not calculating up-keep cost
2023-04-23 01:29:37 +03:00
ζeh Matt aa00f1768b
Bump up network version 2023-04-23 00:16:04 +03:00
Matthias Moninger c0abafb4cc
Merge pull request #20023 from Broxzier/bugfix/20008-roto-drop-paint-crash
Fix #20008: Crash in PaintRotoDropTowerSection
2023-04-22 23:10:07 +03:00
ζeh Matt 4dbe3fa5d7
Fix #20018: Shops not calculating up-keep cost 2023-04-22 22:56:59 +03:00
Hielke Morsink 5ade3e704c
Fix #20008: Crash in PaintRotoDropTowerSection 2023-04-22 21:52:06 +02:00
kyphii 9ca4e48c79
Fix: #13397: Broken Stations with Simulate Mode 2023-04-22 19:41:26 +02:00
Hielke Morsink c88fe4d2d2
Fix: small scenery details group box is unnecessarily big (#20016)
Small mistake from d46f981f03 that I only noticed just now.
2023-04-22 14:31:03 +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
Ted John 713bb09990
Merge pull request #19930 from IntelOrca/plugin/research
Add research plugin API
2023-04-21 21:17:34 +01: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
Wenzhao Qiu 8f0db4cb20
Fix #16791: rotodrop top piece is replicated (#19970)
* Fix rotodrop top piece replication issue (#16791)

* Add changelog entry

* Raise network version

* Move changelog entry
2023-04-21 09:48:17 -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
Matthias Moninger 698a06121f
Merge pull request #19975 from Broxzier/bugfix/issue-form-fields
Fix: version info is not filled on bug report
2023-04-21 00:45:26 +03:00
Ted John e820956a59 Move research API to .cpp file 2023-04-20 22:09:23 +01:00
Duncan be30930b4a
Merge pull request #19955 from Gymnasiast/refactor/wooden-supports
Introduce normalised Wooden A supports functions
2023-04-20 19:14:12 +01:00
Rik Smeets d10be6d0e7
Fix #19911: Guests stuck at railway crossings (#19939)
In continuous circuit operating mode, not only the train head should be used for (un)blocking path. Because of this change, a previous change regarding which trailing track blocks should be unblocked has been reverted, as to prevent path being unblocked too soon.
2023-04-20 18:53:21 +02:00
Gymnasiast 33bd5c494f
Introduce normalised Wooden A supports functions 2023-04-20 18:35:58 +02:00
Matthias Moninger e614584f65
Fix #19991: Crash when using cut-away view (#19968)
* Fix #19991: Crash using cut-away view

* Update changelog.txt

* Document the use of temporary paint head
2023-04-20 16:00:22 +01:00
Gymnasiast 809e172a84
Fix Mine Train support bug (original bug) 2023-04-19 16:22:08 +02:00
Matthias Moninger 98aa816e5f
Fix #19989: Crash with small scenery objects having no offsets defined (#19990) 2023-04-19 06:35:09 +01:00
Ted John d471d7a4b7 Use strings for research category 2023-04-18 21:38:10 +01:00
Ted John 83bf0d7dce Make expectedDay in plugin in 1 to 31 range. 2023-04-18 21:38:10 +01:00
Ted John 00eb2aae95 Move uninvented item to invented list when research is complete
When an item began initial research, it was moved to the invented list. This is not intuitive for plugins, so move it once the item is fully researched.
2023-04-18 21:38:10 +01:00
Ted John fe3f32e82e Fix code review comments on research 2023-04-18 21:38:10 +01:00
Ted John aa3f8957bd Use enum for research item category 2023-04-18 21:38:10 +01:00
Ted John f35e595d0e Add research plugin API 2023-04-18 21:38:09 +01:00
Stephan Spengler 2fd3eb47e7
SetCheatAction has wrong ID in plugin API 2023-04-18 13:23:44 +02:00
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