Commit Graph

3734 Commits

Author SHA1 Message Date
Rik Smeets 55adb71cd8
Add keyboard shortcut to Keyboard Shortcuts window 2023-04-17 11:15:32 +02: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
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
Tulio Leao d0c7d0f6fb
Close #18318: Refactor MapTooltip window to class (#19914) 2023-04-13 14:16:14 -03: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 99ffaa8b71 allow block brakes to be built with speed 2023-04-11 19:28:17 -07:00
Gymnasiast 57c366e983 Fix rebase error 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 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
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
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
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 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
Matthias Moninger 5462c28b8c
Fix dereferencing nullptr for bad loaded g2 using OpenGL renderer (#19855) 2023-04-06 21:56:52 +02:00
Michał Janiszewski 993da08fb9
Fix #19850: Only provide default value for final arguments (#19852) 2023-04-06 15:35:02 +01: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
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
ζeh Matt cc64ab530c
Fix #19811: Use the correct SDL event for window resize handling 2023-04-03 17:09:50 +03: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
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
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
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 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
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