Commit Graph

60 Commits

Author SHA1 Message Date
Harry-Hopkinson ef7d7575de Rename PALETTE_TOTAL_OFFSETS to kPaletteTotalOffsets 2024-04-26 17:55:23 +01:00
Duncan cb100db56e
Put a number of OpenRCT2::Ui items in the OpenRCT2::Ui namespace 2024-03-07 23:36:49 +01:00
James103 1d8dc111f1
Replace 2023 with 2024 in copyright headers (#21139)
Replace all instances of the year 2023 with 2024 in all copyright headers
2024-01-01 12:52:28 +01:00
Michael Bernardi 8c7d1d149a Added OpenGL TTF hinting 2023-12-08 01:13:17 +01:00
Gymnasiast 2941f6f7a5 Use dpi ref in misc drawing folder places 2023-04-11 22:57:25 +01:00
Matthias Moninger 5462c28b8c
Fix dereferencing nullptr for bad loaded g2 using OpenGL renderer (#19855) 2023-04-06 21:56:52 +02:00
kyphii 39790779bb
Extend color selection dropdown with more colors (#19446)
* Setup for extended palette

* Define order for color picker cells

* Init G2 Palettes in ColoursInitMaps

* Add Glass Palettes

* Use special sprite for Invisible color

* Set up new cheat for special colors

* Add glass palettes to palette_to_g1_offset

* Add entries for new colors in TranslucentWindowPalettes

* Finish implementation of special colors cheat

* Some cleanup

* New colors almost work

* Correct g2 palette loading indices

* Invisible color sprite displays properly

* Repaint works with large scenery and walls

* Prevent random shop items from overflowing to junk palettes

* More cleanup

* Fix glass palettes

* Add mapping of new colors to original colors for UI themes

* Fix junk palettes for random shop items

* Fix missing highlight color in software renderer

* Convert small scenery support flag to allow use of new colors

* Progress on displaying new colors in software renderer

* Fix invisible color scheme sprite

* Formatting cleanup

* Resolve comparison of integer expressions of different signedness

* Index g2 palette maps to fix visible chain lift

* Progress on fixing new colors in software renderer

* Fix station and support colors

* Fix dropdown selected index

* Get invisible color (mostly) working in software renderer

* Use forceBmp for palette resources

* Remove test function definition left in by mistake

* Remove some obsolete range checks for original color values

* Add changelog entry

* Reorder color dropdown based on NE user feedback

* Some cleanup

* Further cleanup

* Formatting

* Add include for GetPaletteMapIndexForColour

* Fix a couple things I broke

* Fix function placement

* Revert "Add include for GetPaletteMapIndexForColour"

This reverts commit 0af9611e6656d792adb7a36efe7dbf3387a4a759.

* Use color constants for color order list

* Make remappable colors contiguous

* turn off clang format for ordered color list

* Appease clang

* Use all colors for random shop item animation

* Improvements to palette map resources

* Fix chain lifts again + adjustments to a few colors

* Update changelog and contributors.md

* Revert changes to S4 and S6 importers which are no longer needed

* Bump network, plugin, and minimum park versions

* Revert "Progress on displaying new colors in software renderer"

This reverts commit 337602e4a7.

* Remove unnecessary comment

---------

Co-authored-by: Trevor Finney <8711258+finneyt@users.noreply.github.com>
2023-04-06 08:36:07 +01: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 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
Duncan 7f5934cc95
Remove snake_case from second chunk of Drawing (#19166) 2023-01-16 18:52:17 +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
Michał Janiszewski 3e4e8bccc5 Pass ImageId by value instead by const-ref
ImageId struct is 8-bytes large and can fit in CPU register. Passing it
by value lets compiler pass it in register instead of forcing to
reference it from memory.

In my tests this brings
[dome park](https://github.com/OpenRCT2/OpenRCT2/files/6134362/dome-export.zip)
benchgfx results from 42.16s down to 41.08s, or by 2.5%.
2022-11-12 00:06:05 +01:00
Hielke Morsink 31dd4bf604
Use lower-case u integral suffix 2022-10-29 16:33:05 +02: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
Ted John 5f9d03e9df
Refactor ImageId and use in more functions 2021-12-03 19:59:33 +01:00
Hielke Morsink 53d9bfa8b4
Update implicit zoom conversions 2021-12-01 00:08:35 +01:00
ζeh Matt 59a6c34db4
Make use of std::optional strict 2021-09-13 20:02:32 +03:00
Ted John 6e2b79a895
Get basic TTF support working in OpenGL
co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
2021-08-26 19:46:18 +03:00
Łukasz Pękalski 4adf745237
Close #12403: Refactor FILTER_PALETTE_ID to use strong enum (#13273) 2020-12-05 15:13:59 -03:00
Michał Janiszewski 0aaac728b5 Change GL_TEXTURE_RECTANGLE to NPOT GL_TEXTURE_2D
This improves GLES compatiblity due to missing rectangle textures, but
NPOT 2D ones being universally available.
2020-10-24 17:28:05 +02:00
Michał Janiszewski 16b3a96e66 Change palette size to PoT square 2020-10-24 17:28:05 +02:00
Ted John cf9e8022a0 Fix #12297: OpenGL renderer causing artifacts
Do not re-allocate texture memory if we don't need to and aren't going to restore the old pixels.
2020-07-26 18:46:23 +01:00
Aaron van Geffen 7b5087f057
Update copyright year to 2020 2020-07-21 15:04:34 +02:00
frutiemax f86931d8a0
Close #12019: Use ScreenCoordsXY on gfx_draw_sprite_software 2020-06-22 23:52:54 +02:00
frutiemax 4a17d1d64e
Fix #12020 - Use ScreenCoordsXY on gfx_draw_sprite_palette_set_software (#12028)
* Fix #12020 - Use ScreenCoordsXY on gfx_draw_sprite_palette_set_software

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-06-21 22:52:48 -03:00
Ted John d3f7ec4844 Create new PaletteMap type to replace byte pointers 2020-05-28 20:00:23 +01:00
Michał Janiszewski 5bfc41f49e
openrct2-ui cast fixes (#11348) 2020-04-19 14:08:22 +02:00
Tulio Leao abfd41c35f Use named casts in openrct2-ui/drawing 2020-03-28 17:18:21 -03:00
Matt d6c3373b5e
Remove unused parameter and minor cleanup 2020-02-15 21:28:28 +01:00
Tulio Leao 84928cb4ef Comment why GetOrLoadImageTexture returns BasicTextureInfo 2019-12-27 15:05:28 -03:00
Tom Lankhorst efea8856ed Clean up OpenGL engine.
Code de-duplication and improved namespacing.
2019-11-04 15:10:42 +01:00
Ted John c653f13552 Add tertiary colour to ImageId 2019-08-24 22:40:19 +01:00
Ted John 3925a6162d Start using ImageId 2019-08-24 18:35:40 +01:00
Ted John 15cb3e1889 Remove unnecessary new line characters from log calls (#9237) 2019-05-12 13:48:56 +02:00
Michael Steenbeek 42a1a8704d
Use empty() for vectors; clean up bool comparisons (#9118) 2019-04-20 20:39:47 +02:00
Matt ce9d252ce5 Use correct lock. 2019-03-31 15:50:55 +02:00
Matt 65ef018e4e Move paint_session_alloc and paint_session_free into Painter. 2019-03-31 15:50:55 +02:00
Matt 37c3809744 Implement partial multicore rendering 2019-03-31 15:50:55 +02:00
Aaron van Geffen 2af13904c5 Update copyright notices for 2019. (#8903) 2019-03-17 07:16:15 +00:00
ζeh Matt 65659e2ab6 Fix OpenGL renderer stuttering when loading new textures into atlas 2018-09-07 10:21:28 +02:00
clang-format d787872cbe Indent preprocessor directives 2018-07-23 16:00:23 +02:00
clang-format b02dfdbc93 Binpack function arguments together
Previously when the arguments of a function wouldn't fit on a single line, clang-format would put each argument on its own line instead. By enabling the binpack parameter setting, it tried to fit as many on one line as possible instead.

Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
2018-07-23 16:00:22 +02:00
clang-format 16720f0182 clang-format UI drawing 2018-07-23 16:00:13 +02:00
Michael Steenbeek 1b08fb4e69 Replace our own integer types with standard ones 2018-06-20 17:30:40 +02:00
Hielke Morsink 0cf256ac9e Ready copyright notice for clang-format
Clang-format sees the text behind `#pragma region` as code and formats it. Instead of stating the copyright and date there, it's now in the comment block right below it. The text "Copyright" is left in the `#pragma region` line, as clang-format sees it as a single identifier.

I took the opportunity to normalize the dates, and add the copyright notice to the source files where it was missing them (except for third-party and the generated resources.h file).
2018-06-15 14:07:34 +02:00
Michał Janiszewski 8b72c4f1ad Fix mismatched deleter in TextureCache (#7138) 2018-02-06 20:51:40 +00:00
Ted John df26354376 Fix drawing glyphs in OpenGL 2018-01-24 18:49:30 +00:00
Ted John cebe13984f Remove most of remaining memory functions from libopenrct2ui 2018-01-21 11:17:41 +00:00
ZehMatt d25c46ef93 Refactor image cache to fixed size. 2018-01-07 02:18:12 +00:00