1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-21 22:13:07 +01:00
Commit Graph

517 Commits

Author SHA1 Message Date
spacek531
bf413b2ab7 Booster code cleanups/unified booster speed preparation 2025-01-19 16:43:26 +01: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
X123M3-256
864d9b2d73 Add large diagonal flat to steep and dive loop track pieces 2025-01-15 13:25:29 +01:00
Severin Paul Höfer
8a84f225e1 Fix #23508: RideConstruction and Footpath windows racing to set the VirtualFloor 2025-01-10 15:13:17 +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
Michael Steenbeek
7baae607ac Use ride_type_t in more places 2024-12-22 19:59:36 +01:00
Aaron van Geffen
b3aa852a8d Consolidate util/Math.hpp into core/Numerics.hpp (#23319)
* Consolidate util/Math.hpp into core/Numerics.hpp

* Remove branching; replace isPowerOf2 with std::has_single_bit

* Add templated types to floor2 and ceil2
2024-12-04 21:00:26 +00:00
RedMarcher
c24e47dea1 Rename cheat variables to match new code style 2024-12-01 18:15:37 +01:00
Gymnasiast
d9d5df509e Add RtdSpecialType to replace checks for maze and other naughty types 2024-11-24 12:58:32 +01:00
Gymnasiast
ad0dfc6f0a Remove one check for RIDE_TYPE_CHAIRLIFT 2024-11-24 12:58:03 +01:00
Michael Steenbeek
a2ed026264 Split up remaining tile elements 2024-10-15 22:02:31 +02:00
Michael Steenbeek
71ce725a2a Split off BannerElement and TrackElement (#22955) 2024-10-14 14:26:10 +02:00
Michael Steenbeek
52b70703af Turn TrackElemType into a strong enum 2024-10-11 13:30:27 +00:00
Michael Steenbeek
e6e0f97557 Split off EntranceElement header 2024-10-03 12:42:53 +02:00
Michael Steenbeek
ffad32ee8c Refactor enabling of covered pieces 2024-10-01 14:04:44 +02:00
Michael Steenbeek
5c29967d61 Use FlagHolder for lift+inverted flags (#22839) 2024-09-27 22:51:04 -03:00
Michael Steenbeek
04bdff052f Use FlagHolder for _currentTrackAlternative 2024-09-25 14:29:39 +02:00
Michael Steenbeek
d6a7697622 Refactor _currentTrackHasLiftHill to bool 2024-09-23 21:24:43 +00:00
Aaron van Geffen
30fa3128a6 Merge pull request #22812 from AaronVanGeffen/name-peep-var
Rename Peep properties to better distinguish Actions and Animations
2024-09-22 21:47:10 +02:00
Michael Steenbeek
a53784551b Move _legacy.cpp contents to UI project (#22811) 2024-09-22 21:00:52 +02:00
Aaron van Geffen
97acb793e8 Rename InteractionInfo::SpriteType to interactionType 2024-09-22 16:53:43 +02:00
Gymnasiast
5f92d1920b Group all sequence-bound properties 2024-09-18 22:43:55 +02:00
Gymnasiast
4ff99d6fd1 Confine provisional paths to Footpath.cpp 2024-09-06 23:31:50 +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
Harry Hopkinson
c1ac7c0700 Cleanup gameState usage 2024-09-02 22:42:37 +02:00
Aaron van Geffen
31527edbea Use named flags in RideGetPlacePositionFromScreenPosition (#22607) 2024-08-21 22:25:44 +02:00
Aaron van Geffen
5f37ba6615 Rename footpath height related constants 2024-08-16 21:18:33 +00:00
Aaron van Geffen
2a99b2f1f9 Rework modifier key state into strong enum class (#22558)
* Rework modifier key state into strong enum class

* Move modifier key state into InputManager
2024-08-14 16:36:05 +02:00
Michael Steenbeek
47800cddcf Change RTD flags to a strong enum 2024-08-13 20:20:25 +00:00
Michael Steenbeek
8ebacc1821 Close #19003: Change _currentTrackCurve to a struct 2024-08-11 21:35:29 +02:00
Gymnasiast
a436801d64 Remove TrackDrawerDescriptor::SupportsTrackGroup() 2024-08-11 15:27:12 +02:00
Gymnasiast
803f683f58 Update PreviewTrack field names 2024-08-11 15:15:45 +02:00
Gymnasiast
0ea9c5a2c2 Update TrackDefinition field names 2024-08-11 14:52:25 +02:00
Michael Steenbeek
f0c73cb9ef Specify track style icon and tooltip in RTD 2024-08-11 10:42:11 +00:00
Michael Steenbeek
07f54c22bd Create named enum for track group (#22523) 2024-08-11 09:26:19 +02:00
Aaron van Geffen
03bc1e5707 Introduce isToolActive function as alternative for globals (#22430)
* Introduce isToolActive function
* Ride window: use isToolActive instead of gCurrentToolWidget
* Footpath window: use isToolActive instead of gCurrentToolWidget
* Staff window: use isToolActive instead of gCurrentToolWidget
* MazeConstruction window: use isToolActive instead of gCurrentToolWidget
* Guest window: use isToolActive instead of gCurrentToolWidget
* Map window: use isToolActive instead of gCurrentToolWidget
* LandRights window: use isToolActive instead of gCurrentToolWidget
* Replace SceneryToolIsActive legacy function with calls to isToolActive
* ClearScenery window: use isToolActive instead of gCurrentToolWidget
* Scenery window: use isToolActive instead of gCurrentToolWidget
* Water window: use isToolActive instead of gCurrentToolWidget
* Land window: use isToolActive instead of gCurrentToolWidget
* Widget: replace WidgetIsActiveTool with isToolActive
* RideConstruction window: use isToolActive instead of gCurrentToolWidget
* Ride: use isToolActive instead of gCurrentToolWidget
* TrackDesignPlace window: use isToolActive instead of gCurrentToolWidget
* StaffList window: use isToolActive instead of gCurrentToolWidget
* ViewClipping window: use isToolActive instead of gCurrentToolWidget
* PatrolArea window: use isToolActive instead of gCurrentToolWidget
* TileInspector window: use isToolActive instead of gCurrentToolWidget
* Park window: use isToolActive instead of gCurrentToolWidget
2024-08-05 10:47:36 +02:00
Gymnasiast
9294a58e98 Change TrackDescriptor field names to lowerCamelCase 2024-08-03 12:51:25 +02:00
Duncan
a07b56a655 Move Viewport functions into Ui (#22454)
* Move viewport functions into ui

* Move footpath function to ui

* Don't include viewport in footpath.h

* Include missing includes
2024-08-02 06:01:31 +01:00
Aaron van Geffen
e782635498 RideConstruction: move virtual floor to UI counterpart (#22428) 2024-07-31 22:01:34 +02:00
Aaron van Geffen
89ccda19ce Move WindowRideConstructionUpdateActiveElements out of _legacy.cpp 2024-07-31 20:12:23 +02:00
mrmbernardi
9ed5c63857 Rename Location.hpp constants (#22385) 2024-07-26 10:23:25 +02:00
lewyche
62467199ed Fix #22265: Track button doesn't stay pressed 2024-07-25 09:44:11 +02:00
Aaron van Geffen
3d5c19de08 Drop Localisation.h include where not required 2024-07-13 13:33:32 +02:00
Gymnasiast
2c7d2fff7c Move track design appearance to its own struct 2024-07-02 22:35:19 +02:00
Aaron van Geffen
15ee05dfb0 Rename kNumOrthogonalDirections constant 2024-07-01 17:29:37 +02:00
Arnold Zhou
4975e79bac Close #22171: Make track section navigation buttons holdable 2024-06-26 08:33:14 +02:00