Commit Graph
109 Commits
Author SHA1 Message Date
Michael Steenbeek 583b4ed0e6 Replace GfxDrawStringNoFormatting() (#19414)
* Replace GfxDrawStringNoFormatting()

* Unwrap static DrawText overload
2023-02-15 22:44:22 +00:00
Silent 0763fd5a78 Fix GfxWrapString potentially corrupting the in/out buffer
Fixes a consistent assertion when displaying "Cannot start construction"
in Japanese, but it has potential fix countless other crashes
related to string wrapping/display.
2023-02-14 09:50:05 +01:00
Duncan e09f27df3c Rename snake_case Class names (Remaining Bits) (#19237)
* Rename snake_case Class names

* Clang format

* Fix build issues
2023-01-21 19:57:17 +00:00
Duncan 859b071ddc Rename classes with snakes OpenRCT2/A*-F* (#19215)
* Rename classes with snakes OpenRCT2/A*-F*

* Clang format files
2023-01-19 08:16:44 +00:00
Hielke Morsink 0762fcb601 Rename snake_case functions in OpenRCT2/util folder 2023-01-18 22:44:13 +01:00
Michael Steenbeekandduncanspumpkin 12874f2af7 Replace format_string(4) with OpenRCT2::FormatStringLegacy() (#19190)
Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2023-01-17 21:56:30 +01:00
Hielke Morsinkandduncanspumpkin 6b7dc8fcdb Rename snake_case functions in openrct2/src folder
Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2023-01-17 13:24:51 +01:00
Michael Steenbeek b4480b344e Rename snake_case functions from localisation folder 2023-01-16 23:12:35 +00:00
Hielke Morsink 6dafbbfb65 Rename global window functions to TitleCase (#19167) 2023-01-16 20:13:42 +00:00
Duncan 7f5934cc95 Remove snake_case from second chunk of Drawing (#19166) 2023-01-16 18:52:17 +00:00
Duncan 8a8d3105f3 Remove snake_case from first chunk of Drawing (#19164)
* Remove snake_case from first chunk of Drawing

* Address formatting
2023-01-16 13:50:43 +00:00
Tulio Leao 07d5f73f5d Fix bitwise operation between different enumeration types
On C++20 doing bitwise operation between different enumeration types
is deprecated.
2023-01-10 22:48:06 +00:00
James103 73738bbdc8 Replace 2022 with 2023 in copyright headers
Replace all instances of the year 2022 with 2023 in all copyright headers
2023-01-01 11:58:01 +01:00
Gymnasiast 38f7c2a159 Allow using ImageId in widgets directly 2022-12-31 15:18:22 +01:00
Gymnasiast 162b01204d Rename rct_widget to Widget 2022-12-31 15:18:22 +01:00
Gymnasiast b97ee766d5 Refactor out IMAGE_TYPE_REMAP from widgets 2022-12-31 15:16:07 +01:00
Hielke Morsink 31dd4bf604 Use lower-case u integral suffix 2022-10-29 16:33:05 +02:00
Gymnasiast 14f9a75e0a Refactor FontSpriteBase and font size into FontStyle 2022-10-19 11:59:26 +02:00
Gymnasiast 89cd86da4d Fix #18290: Ride and plug-in window colours not appearing 2022-10-11 14:44:07 +02:00
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 cedccf9b0e Use const ImageId in drawing functions 2022-09-29 21:17:15 +02: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 c8605a8763 Refactor window functions to take references 2 2022-07-31 17:23:15 +02:00
Michael Steenbeek 0f2cf23318 Safely look up widget for drawing 2022-03-10 01:01:59 +01:00
Ted John b775832d01 Refactor window flags to be read with the helper methods 2022-02-13 23:09:42 +00:00
Ted John 05b589fb93 Remove custom window widget limit 2022-02-13 23:09:42 +00: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
frutiemax adb692b74e Forward declare Formatter 2021-12-30 12:17:51 -05:00
Ted John 2f20dc029e Fix drawing of disabled zoom buttons 2021-12-12 11:48:49 +01: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 5b9b52c028 Use (const) references to scrolls where possible 2021-10-01 15:21:01 +02:00
Hielke Morsink 6de1868ad8 Use (const) references to widgets where possible
Note: The change from `w->widgets[WIDX_ENTRY_PRICE]` to `entryPriceWidget` is intended.
2021-10-01 15:21:00 +02:00
Hielke Morsink 94144bcd89 Remove some dead code
Reported by clang
clang-analyzer-deadcode.DeadStores
2021-09-30 10:40:32 +02:00
Michael Steenbeek a5a63f839a Allow passing ImageId into gfx_draw_sprite() 2021-03-23 11:58:09 +01:00
Gymnasiast 7fd049c22e Remove last remnants of gCurrentFontSpriteBase 2021-02-28 00:26:53 +01:00
Gymnasiast c40701d997 Make gfx_draw_string() take a TextPaint argument 2021-02-28 00:26:20 +01:00
Gymnasiast 503273793a Remove gCurrentFontSpriteBase from some functions 2021-02-28 00:26:20 +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
Gymnasiast 2477933c51 Turn font sprite base into a strong enum 2021-02-28 00:23:00 +01:00
Ted John d64bd60278 Fix CI errors 2021-02-24 22:54:53 +00:00
Ted John c2183989a5 Allow spinners to be clicked and held 2021-02-24 22:37:31 +00:00
ζeh Matt 9ff2138f3f Remove unused variable gCurrentFontFlags 2021-01-30 16:46:22 +01:00
Ted John 2fdf91874c Implement centred labels 2021-01-29 17:50:32 +00:00