1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-22 14:24:33 +01:00
Commit Graph

667 Commits

Author SHA1 Message Date
73
c7c703515e Rename audio.h to Audio.h (#23842) 2025-02-17 13:24:03 +01:00
73
b9b2c96c97 Rename sprites.h to SpriteIds.h (#23804) 2025-02-13 15:51:46 +00:00
Aaron van Geffen
cf448753c1 Move WindowInvalidate and WidgetInvalidate families into WindowManager (#23692)
* Move WindowInvalidate and WidgetInvalidate families into WindowManager

* Use InvalidateWidget shorthand in more places

* Cut back on UiContext includes

* Cut back on Window.h includes

* Remove outdated parameter comments
2025-01-25 13:46:08 +01:00
Michael Steenbeek
a3d5b4e0c3 Change FIXED_XDP from macros to constexprs 2025-01-25 13:42:22 +01:00
Michael Steenbeek
b0c99fcb6c Refactor more constants to kConstant notation 2025-01-22 16:16:55 +00:00
Aaron van Geffen
a8773dd805 Move WindowClose family into WindowManager (#23646)
* Replace WindowClose() calls with Close method calls where possible

* Move WindowClose family into WindowManager

* Remove UpdateSceneryGroupIndexes hack
2025-01-19 18:49:18 +01:00
Michael Steenbeek
be9f27e4f9 Mass rename constants (#23656) 2025-01-19 15:59:45 +00:00
Aaron van Geffen
5fbe8d0ae1 Centralise external window signatures in Windows.h (#23653) 2025-01-19 15:50:54 +01:00
Aaron van Geffen
bed4d5bdca Move WindowCreate and WindowFocusOrCreate into WindowManager (#23643)
* Move WindowBringToFront into WindowManager

* Move WindowCreate and WindowFocusOrCreate into WindowManager

* Cut back on Context/UiContext includes
2025-01-19 06:58:28 -03:00
Matt
b9f6b6f754 Refactor widgets state (#23621)
* Refactor windows to not share widget state

* First half of refactoring all the windows

* Refactor the remaining windows, compiles but has issues

* Fix drawing only every second widget

* Remove the need of an terminating widget

* Address WidgetIndex signedness issues; use kWidgetIndexNull more

* Address constexpr issue with Widget content union

* Fix tabs in scenery window

* Fix tabs in object selection window

* Adjust custom widget index for CustomTool events

* Use STR_NONE for default tooltip initialisation

* Adjustment for mingw compiler

* Fix bottom toolbar using the widget declaration not instance

* Remove pointless code in Guest window, handled by SetPage

* Prevent out of bounds crash

* Move scroll widgets initialization to SetPage in Cheats window

* Remove special logic in Options window

* Remove special logic in Park window

* Remove special logic for Player window

* Remove special logic for Research window

* Remove special logic for Ride window

* Remove special logic for Staff window

* Remove special logic for Finances window

* Remove special logic for MapGen window

* Remove special logic for editor objective options window

* Remove special logic for editor scenario options window

* Fix widgets not being set since page is initialized to 0

* Remove more redundant code

* Fix remaining access to widget declarations

* Remove unused variable

* Fix editor object selection tabs on successive windows

---------

Co-authored-by: Aaron van Geffen <aaron@aaronweb.net>
2025-01-18 13:45:17 +01:00
Aaron van Geffen
7e3fe58067 Use peep animation objects for guest and staff sprites 2024-12-05 13:37:39 +01:00
Aaron van Geffen
aa45247f21 Move WindowFind functions into WindowManager (#23517)
* Move WindowFind* functions into WindowManager

* Update parameter documentation where applicable
2025-01-08 21:12:11 +01:00
Aaron van Geffen
fa06a49302 Update copyright year to 2025 (#23514) 2024-12-31 20:30:04 +01:00
Aaron van Geffen
25ac4cf5d6 Prevent closing object selection window when selection is invalid (#23487)
* Prevent closing object selection window when selection is invalid

* Ride window: remove superfluous virtual keyword from event signatures

* Amend changelog
2024-12-29 22:15:26 +00:00
Michael Steenbeek
7baae607ac Use ride_type_t in more places 2024-12-22 19:59:36 +01:00
Aaron van Geffen
2a3a72396b Remove ImageId::FromUInt32 and ToUInt32 (#23415)
* Allow high image ids when rendering an inline sprite

* CustomWindow: refactor use of ImageId::FromUInt32

* Dropdown: refactor use of ImageId::FromUInt32, ToUInt32

* Remove ImageId::FromUInt32

* Fix typo in mechanic status string ids

* Rewrite InventoryFormatItem to not use inline sprites any more

* Widget: replace ImageId::ToUInt32 with ImageId::GetIndex

* Remove ImageId::ToUInt32
2024-12-17 21:26:11 +01:00
Aaron van Geffen
6ee798337a Introduce EnumUtils header (#23407) 2024-12-15 17:39:52 +01:00
mrmbernardi
1e25472ec6 Merge pull request #23350 from mrmbernardi/resize-ride-graph
Increase the maximum width of the ride graph window
2024-12-12 20:17:19 +11:00
Aaron van Geffen
35e117aca2 Rename String methods to use lowerCamelCase 2024-12-11 22:49:37 +01:00
Michael Bernardi
e7ca356633 Replace big window size limits with int16_t max. 2024-12-10 02:09:05 +11:00
Michael Bernardi
ab2d2a5180 Increased the maximum width of the ride graph window 2024-12-10 02:00:36 +11:00
ζeh Matt
9dfd4f3b19 Rename the callback types 2024-12-04 20:43:55 +02:00
ζeh Matt
e86618e835 Make sure the callback is not converted to void* 2024-12-04 16:46:35 +02:00
RedMarcher
c24e47dea1 Rename cheat variables to match new code style 2024-12-01 18:15:37 +01:00
Michael Steenbeek
c8388002d9 Merge pull request #23245 from Gymnasiast/refactor/ride-type-checks
Replace some direct ride type checks
2024-11-28 19:55:36 +01:00
Aaron van Geffen
f90954b1a4 Reduce dependencies for Research.h (#23268) 2024-11-25 14:32:16 +00:00
Gymnasiast
d9d5df509e Add RtdSpecialType to replace checks for maze and other naughty types 2024-11-24 12:58:32 +01:00
Aaron van Geffen
ece199176e Move UnitConversion from Util into its own compilation unit 2024-10-29 11:27:00 +01:00
Michael Steenbeek
8063c5caa7 Reduce casting for objects 2024-10-16 14:12:25 +02:00
Michael Steenbeek
71ce725a2a Split off BannerElement and TrackElement (#22955) 2024-10-14 14:26:10 +02:00
AT41
6e7b489304 Added additional stats to Plugin interface
Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2024-10-03 11:23:50 +00:00
Michael Steenbeek
e6e0f97557 Split off EntranceElement header 2024-10-03 12:42:53 +02:00
Michael Steenbeek
558d235680 Fix #22479: Crash when a ride has no valid music object 2024-09-29 14:21:26 +00:00
Michael Bernardi
09fa68a803 Revert DPI accessors 2024-09-27 02:50:50 +10:00
Michael Bernardi
4cd5548352 Refactor DPI to distinguish screen and world coords 2024-09-27 00:07:40 +10:00
Michael Steenbeek
04bdff052f Use FlagHolder for _currentTrackAlternative 2024-09-25 14:29:39 +02:00
Harry Hopkinson
d34f17c945 Refactor Colour.h constants to kCamelCase 2024-09-24 20:42:44 +00:00
Aaron van Geffen
97acb793e8 Rename InteractionInfo::SpriteType to interactionType 2024-09-22 16:53:43 +02:00
Aaron van Geffen
6d27369ea6 Rename PeepSpriteType to PeepAnimationGroup 2024-09-22 16:42:27 +02:00
Gymnasiast
5f92d1920b Group all sequence-bound properties 2024-09-18 22:43:55 +02:00
Michael Steenbeek
4fd07d3216 Fix #2614: Junior Roller Coaster - Invisible First Vehicle 2024-09-07 21:23:58 +02:00
Aaron van Geffen
b971d1596e Indent window widget definitions (#22700)
* Indent definitions in About, AssetPacks windows

* Indent definitions in Banner, Changelog, CustomCurrency windows

* Indent DebugPaint, DemolishRidePrompt windows

* Indent EditorBottomToolbar, EditorInventionsList

* Indent EditorObjectiveOptions, EditorScenarioOptions

* Indent Finances

* Indent Footpath

* Indent GameBottomToolbar

* Indent Guest window

* Indent GuestList, InstallTrack windows

* Indent Land, LandRights windows

* Indent LoadSave, Main, MapGen, MapTooltip windows

* Indent MazeConstruction

* Indent Multiplayer

* Indent NetworkStatus

* Indent NewCampaign

* Indent NewRide window

* Indent News window

* Indent NewsOptions window

* Indent ObjectLoadError window

* Indent Options window

* Indent Park window

* Indent PatrolArea window

* Indent Player window

* Indent RefurbishRidePrompt window

* Indent Research window

* Indent Ride window

* Indent RideConstruction

* Indent RideList

* Indent SavePrompt

* Indent ScenarioSelect widgets

* Indent scenario window

* Indent scenery scatter window defs

* Indent server list window

* Indent server start window§

* Indent ShortcutKeys window

* Indent Sign window

* Indent Staff window

* Indent StaffFirePrompt window

* Indent StaffList window defs

* Indent Themes window defs

* Indent TileInspector window defs

* Indent TitleExit, TitleMenu, TitleOptions, Tooltip windows

* Indent TrackDesignManage window defs

* Indent TrackDesignPlace defs

* Indent TrackList def

* Indent Transparency window defs

* Indent ViewClipping window defs

* Indent Viewport window defs

* Indent Water window defs
2024-09-04 21:11:26 +02:00
Harry Hopkinson
003c196eb8 Cleanup gameState usage (#22692) 2024-09-04 07:34:37 +02:00
Gymnasiast
71b9cfb12c Keep ‘i’ and ‘colour’ variables inside the loop 2024-08-17 19:06:09 +02:00
Gymnasiast
9bda9a50d5 Fix: ‘Randomise all’ sometimes picks invalid colours 2024-08-17 18:01:04 +02:00
Arnold Zhou
cbaf01658a Add option to randomise train or vehicle colours (#22206) 2024-08-17 11:55:32 +00:00
Michael Steenbeek
47800cddcf Change RTD flags to a strong enum 2024-08-13 20:20:25 +00:00
Harry Hopkinson
4744c7416d Refactor object and network constants to kCamelCase 2024-08-11 20:21:24 +00:00
Aaron van Geffen
aa7eb18d78 Rename ScrollBar struct to ScrollArea and rename its properties (#22539) 2024-08-11 16:21:53 +02:00
Gymnasiast
a436801d64 Remove TrackDrawerDescriptor::SupportsTrackGroup() 2024-08-11 15:27:12 +02:00