Commit Graph
491 Commits
Author SHA1 Message Date
Basssiiie 8ebb607fc4 Fix #21632: Crash when loading custom image larger than 300 by 300 pixels (#26934)
Fixes #21632: a few crashes that can occur when loading a custom image via plugins.

- Catch `std::exception` instead of `std::runtime_error` because the 300x300 check throws a [`std::invalid_argument`](https://github.com/OpenRCT2/OpenRCT2/blob/11da390704950cd30f1275c392140480908183a0/src/openrct2/drawing/ImageImporter.cpp#L34) exception and `std::exception` is the base class of both (`std::runtime_error` is not).
- Replaced a few asserts with `std::runtime_error`s as well, because the test script supplied in the issue was tripping over those as well.

Now instead of crashing the game or throwing an assert, they log nice readable errors to the console for plugin developers.
2026-08-16 10:58:51 +00:00
Harry Hopkinson b95d24bb68 Remove openrct2-ui/windows includes 2026-08-11 22:57:19 +01:00
Harry Hopkinson e75c1dde15 Remove openrct2-ui/scripting includes 2026-08-11 22:16:10 +01:00
Aaron van Geffen 15b36d6ced Introduce dedicated header for window-related enum types (#26883) 2026-08-07 19:53:17 +02:00
Gymnasiast 228c4bfb34 Rename CursorNames to kCursorNames 2026-08-07 06:57:39 +02:00
Gymnasiast 78fb8d73bb Rename members of ScenarioSource 2026-08-07 06:57:38 +02:00
Gymnasiast 1c4daab873 Rename members of Palette 2026-08-07 06:57:36 +02:00
Gymnasiast d0db940bde Rename members of ImportMode 2026-08-07 06:57:36 +02:00
Gymnasiast e89ab11a6a Rename members of PixelDataPaletteKind 2026-08-07 06:57:35 +02:00
Gymnasiast 5a0aa69409 Rename members of PixelDataKind 2026-08-07 06:57:35 +02:00
Gymnasiast 3a36fc1c0a Rename members of TitleScript 2026-08-07 06:57:34 +02:00
Gymnasiast 45007c1865 Rename members of CursorID 2026-08-07 06:57:34 +02:00
Gymnasiast 8c3ad47b92 Rename members of CustomToolbarMenuItemKind 2026-08-07 06:57:34 +02:00
Gymnasiast 1e2817a5e1 Rename members of ColumnSortOrder 2026-08-07 06:57:34 +02:00
Gymnasiast 1b63339ef7 Rename members of ScrollbarType 2026-08-07 06:57:34 +02:00
Gymnasiast e1f2c365c1 Rename members of PluginType 2026-08-02 20:08:35 +02:00
Michael Steenbeek 0284f9cda6 Refactor dropdown flag to FlagHolder, reverse "stay open" flag (#26855) 2026-08-02 19:22:52 +02:00
Harry Hopkinson df2a210fd8 Rework openrct2/drawing includes (#26815) 2026-07-21 17:00:55 +02:00
Aaron van Geffen bd3d24b181 Add clarification around GameLoadInit calls 2026-06-27 14:59:08 +02:00
SunsetFiandTulio Leao c5a7f3091f Fix plugin-driven list view not invalidated on setting change (#26350)
* Fix: Plugin-driven list view not invalidated on setting changes

* fix: tweak list view invalidation conditions

* fix: WindowUpdateScrollWidgets needs reference, not pointer

* Add changelog entry

---------

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2026-06-06 18:30:50 +00:00
Marino Rottier 6c6acd527b Rename TileElementBase members (#26522)
* Rename TileElementBase members to camelCase

* Rename RCT12TileElementBase and RCT12TileElement members to camelCase
2026-05-17 13:21:16 +00:00
Marino Rottier 66e1411d84 Rename EntityBase and EntitySpriteData members (#26520)
* Rename EntitySpriteData members to camelCase

* Rename EntityBase members to camelCase
2026-05-17 11:21:59 +00:00
Basssiiieandguysv ce9470971c Expose show/hideGridlines to scripting more safely (#24879)
Co-authored-by: guysv <sviryguy@gmail.com>
2026-04-18 03:37:11 +00:00
Basssiiie cee8fcbee6 Remove some unused includes and simplify some others (#26317) 2026-04-03 23:04:34 +02:00
Michał Janiszewski 02c18b61b6 Fix #26300: Image data has its type incorrectly validated (#26302) 2026-04-02 06:59:39 +02:00
Michael Bernardi e0c531f362 Fix potential null deref warning 2026-04-01 02:28:59 +11:00
Michael Bernardi 7aa5a067d1 Review fixes 2026-04-01 02:19:02 +11:00
Michael Bernardi 99dee55494 Fix JSDrawCustomImage using wrong ctx 2026-04-01 02:19:01 +11:00
Michael Bernardi 421530c3ea Use class prototypes for all script types. 2026-04-01 02:19:01 +11:00
16cd1c07ff Swap Duktape for quickjs-ng
Co-authored-by: Basssiiie <Basssiiie@users.noreply.github.com>
Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2026-04-01 02:18:36 +11:00
Gymnasiast 2e7e429516 Replace drawText* calls that pass STR_STRING + formatter 2026-03-26 17:10:50 +01:00
Gymnasiast 49fa735600 Do not run drawText* through formatter if there are no arguments 2026-03-26 16:00:06 +01:00
Aaron van Geffen 8ed4b34907 Move includes out of Drawing.h and into their actual users 2026-03-26 12:55:37 +01:00
Gymnasiast a5c32ab60c Rename DrawText* to drawText* 2026-03-25 23:16:25 +01:00
Gymnasiast 2398d91fb2 Rename DrawTextBasic() to DrawText() 2026-03-25 23:15:49 +01:00
Gymnasiast 5620437c99 Rename functions in Drawing.String.h to adhere to code style rules 2026-03-25 23:14:57 +01:00
Gymnasiast 800e656c4b Merge TTFGetStringWidth and GfxGetStringWidth 2026-03-25 23:14:57 +01:00
Gymnasiast df1564c9cd Namespace Drawing.String.cpp, declare its functions in Drawing.String.h 2026-03-25 23:14:57 +01:00
Gymnasiast 38adb756ee Make DrawText() internal again 2026-03-22 13:21:15 +01:00
Gymnasiast f999cab0a7 Stop using common formatter for window captions 2026-03-03 14:47:00 +01:00
Gymnasiast 1292cb1a3a Use Widget::setString() instead of manual string setting 2026-03-03 14:46:59 +01:00
matheusvb3 b4903577ed Remove global using namespace declarative in header files 2026-03-01 13:33:21 +01:00
matheusvb3 7270b33dde Resolve function declaration and definition parameter name mismatch (#26094) 2026-02-24 22:49:07 +01:00
Michael Steenbeek 4878894a7e Use PaletteIndex in RenderTarget (#25948) 2026-02-07 23:41:40 +01:00
matheusvb3 416a005b88 Replace uses of .size() or .length() with .empty() when appropriate (#25950) 2026-02-05 13:14:12 +01:00
Gymnasiast a80fa16c20 Refactor ImportFlags into FlagHolder 2026-01-31 14:00:52 +01:00
Michael Steenbeek 343c7a70d7 Change colour to a strong enum (#25873) 2026-01-28 10:06:45 +01:00
Michael Steenbeek 3e4261323a Rename some palette indices (#25843) 2026-01-18 21:24:45 +00:00
Gymnasiast e46d2eba9e Move colour map to its own file 2026-01-17 18:46:54 +01:00
Gymnasiast 04a3d02023 Rename members of ColourShadeMap 2026-01-16 19:25:58 +01:00