Commit Graph

103 Commits

Author SHA1 Message Date
Michael Steenbeek 6fe19878f6
More ImageId cleanup (#18258)
* Remove more usages of uint32 image indices

* Remove unused gfx_get_sprite_size()

* Remove uint32 images from text drawing

* Remove now-unused ImageId overload

* Default-initialise ttfRunIndex

* Suppress false-alarm GCC error
2022-10-10 19:42:40 +01: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
Gymnasiast a088537b65
Rename rct_widgetindex to WidgetIndex 2022-08-21 18:49:23 +02: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
Gymnasiast d3fd31c611
Rename rct_string_id to StringId 2022-07-31 22:30:13 +02:00
Hielke Morsink a258008bef
Refactor window functions to take references 4 2022-07-31 17:23:16 +02:00
Hielke Morsink 523bb8136e
Refactor window functions to take references 3 2022-07-31 17:23:16 +02:00
Hielke Morsink 76c1bc8980
Refactor window functions to take references 1 2022-07-31 17:23:15 +02:00
ζeh Matt d7f5003943
Introduce EntityId and refactor everything 2022-02-16 18:56:39 +02:00
Ted John da89a4e413
Remove rct_window::enabled_widgets (#16643)
`enabled_widgets` was used to enable input for widgets. However I do not recall anywhere this being used to specifically disable a widget which doesn't use the dedicated `disabled_widgets` flag. I don't think there is any purpose in keeping this, so I have removed all uses of it.
2022-02-13 23:06:19 +00:00
GalBr cb83d8ff05
Fix #14674: Recent Messages only shows at most 6 or 7 notifications 2022-02-11 21:47:08 +01:00
frutiemax adb692b74e Forward declare Formatter 2021-12-30 12:17:51 -05:00
ζeh Matt c4ad5fcd15
Adjust includes 2021-11-26 21:01:44 +02:00
ζeh Matt 9f23449ffb
Move Staff/Guest/Peep to entity 2021-11-26 18:26:19 +02:00
Duncan 90d2be3ddd
Clang tidy Part 3: Ui Project Enum Names (#15986)
* Enum constant case

* Apply enum names clang tidy

* Rename scoped enum missed by clang-tidy
2021-11-26 14:25:34 +00:00
ζeh Matt 56e78d5733
Merge pull request #15985 from ZehMatt/refactor/entities2
Refactor Sprite to Entity
2021-11-25 12:53:50 -08:00
ζeh Matt 7c726e2a0c
Fix includes 2021-11-24 16:48:33 +02:00
Duncan bb2c7dbaca
Clang tidy Part 1: Ui Project Function Names (#15956)
* Add NOLINT around STL using classes and vendor functions

* Apply clang-tidy to ui project function names

* Undo scripting clang-format

* Upper case OpenRCT2 and RCT2
2021-11-23 13:18:07 +00:00
Hielke Morsink 9dd9b27db4
Make WIDGETS_END constexpr 2021-09-26 11:11:42 +02:00
Hielke Morsink 4b4b3333d6
Remove unnecessary else blocks 2021-09-16 18:31:12 +02:00
ζeh Matt 59a6c34db4
Make use of std::optional strict 2021-09-13 20:02:32 +03:00
Hielke Morsink e54dc7e466
Use consistent left-shift notation for widgets (#14956) 2021-06-26 14:23:15 +02:00
ζeh Matt 751c419594
Minor cleanups (#14954)
* Fix uninitialized variables in InputManager

* Use constexpr for const values

* Add break statements instead of implicit fallthrough

* Default initialize variables in Cheats window

* Default initialize variables in News window

* Default initialize window event pointers
2021-06-26 01:43:05 -03:00
Duncan 39fcc5d078
Split up Sprite header (#14764)
* Remove fields from rct_sprite union

* more header fun

* Fix guest include
2021-05-29 06:01:32 +01:00
Duncan 8eabdf8c8f
Split guest and staff peep variables (#14462)
* Split guest and staff peep variables

* Move variable location

* Increment network version

* Update replays
2021-04-18 17:48:21 +01:00
Jacob Caudill 86e9fe6f19
Close #13788: Refactor News to new Window framework (#14404)
* Refactor News for new Window framework
2021-04-12 08:53:06 -03:00
Duncan 977d05ba29
Entity type5: Remove peep assigned type (#14380)
* Remove users of AssignedPeepType

* Remove AssignedPeepType

Field no longer required due to changes to EntityType

* Move enum to the RCT12 header

* Increment network version

* Update replays
2021-03-24 08:54:05 +00:00
Michael Steenbeek a5a63f839a
Allow passing ImageId into gfx_draw_sprite() 2021-03-23 11:58:09 +01:00
Gymnasiast 50da55eaf3
Fix #14212: Multiline news messages are shown incorrectly 2021-03-02 22:48:33 +01:00
Gymnasiast 826f6c7442
Reduce usage of gCurrentFontSpriteBase 2021-02-28 00:25:30 +01:00
Gymnasiast 3e536e2711
Change gfx_draw_string_*_wrapped() to DrawTextWrapped() 2021-02-28 00:23:01 +01:00
Gymnasiast e2ebc9d43b
Replace gfx_draw_string_left() with DrawTextBasic() 2021-02-28 00:23:00 +01:00
Ted John 19f0d8dfe9
Fix #13842: News is imported incorrectly 2021-01-20 12:35:11 +01:00
ffrogman 7ed1804e61
Fix #12410: Refactor WINDOW_WIDGET_TYPES to use strong enum (#13453)
* Fix #12410: Refactor WINDOW_WIDGET_TYPES to use strong enum
2020-11-27 00:14:20 -03:00
pizza2004 2015acd4c0
Refactor UI/Interface Window to Title Case (#13367) 2020-11-04 04:52:23 +00:00
pizza2004 a5607da09d
Refactor Widget to TitleCase (#13355) 2020-11-03 18:29:22 -03:00
Tulio Leao 32c2b7d449
Merge pull request #13122 from vjavs/strong-enum/PeepSpriteType
Refactor PeepSpriteType to use strong enum
2020-10-08 23:48:45 -03:00
Vinicius Sa 80718f1774
Use helper function GetPeepAnimation
It's intended to retrieve a rct_peep_animation_entry from the global
array g_peep_animation_entries, given PeepSpriteType and
PeepActionSpriteType as parameters.
2020-10-07 17:34:25 -03:00
Vinicius Sa 4d28901cb0
Refactor PeepSpriteType to use strong enum
Issue: 12396
2020-10-07 17:34:21 -03:00
Matt 091145037e
Move the audio code into OpenRCT2 namespace 2020-10-07 00:34:42 +03:00
Duncan 2063aea5ef
Remove common format formatter where possible (#13034)
* Remove common format formatter where possible

Eventually should have it limited to tooltips, window titles and widget args

* Remove remaining paint functions using common

* Remove misuse of gCommonFormatArgs
2020-09-30 22:42:04 +01:00
Aaron van Geffen d27e14f45b
Compact, statically initialized syntax for event lists (#12973) 2020-09-28 20:36:15 +02:00
frutiemax af591c834b
Part of #12097: Use ScreenRect on gfx_fill_rect_inset (1) (#12938)
* Part of #12097: Use ScreenRect on gfx_fill_rect_inset (1)

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-09-16 00:02:22 -03:00
Tulio Leao 731a93dc39
Create WindowColour enum for widget definition calls (#12722)
* Make MakeWidget* functions take enum colour

* Make windows A-D use WindowColour enum

* Make windows E-G use WindowColour enum

* Make windows I-M use WindowColour enum

* Make windows N-P use WindowColour enum

* Make windows R-S use WindowColour enum

* Make windows T use WindowColour enum

* Make windows V-W use WindowColour enum
2020-08-28 23:31:31 -03:00
ryan-bello cc2bb33892 changed enum STAFF_TYPE to strong enum StaffType, moved it to Peep.h 2020-08-17 22:59:02 -04:00
ryan-bello 54a33cbde8 renamed StaffType to AssignedStaffType 2020-08-17 20:16:09 -04:00
pizza2004 d217dfa9b9
Refactor NewsItem into namespace and Pascal Case (#12511) 2020-08-02 23:14:00 -03:00
pizza2004 a3edeabb5c Refactor NEWS_FLAG_* to use strong enum 2020-07-28 12:54:31 -06:00
pizza2004 c2b11a9582 Close #12398: Refactor NEWS_TYPE_* to use strong enum 2020-07-28 12:54:31 -06:00
pizza2004 cee7f8d34c Close #12397: Refactor NEWS_ITEM_* to use strong enum 2020-07-28 12:54:18 -06:00