Commit Graph

578 Commits

Author SHA1 Message Date
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 d5f79b7972
Replace gfx_draw_string_centred() with DrawTextBasic() 2021-02-28 00:23:00 +01:00
Gymnasiast a4747b9c8c
Fix initial value of SpriteBase 2021-02-28 00:23:00 +01:00
Gymnasiast 4d9c278ebc
Unify calls to DrawTextBasic 2021-02-28 00:23:00 +01:00
Gymnasiast 13e7ec6e8e
Allow passing TextPaint to DrawTextBasic() 2021-02-28 00:23:00 +01:00
Gymnasiast ac1e9abb56
Create constructors for TextPaint 2021-02-28 00:23:00 +01:00
Gymnasiast c296c35f39
Use colour_t for colours enum 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
Gymnasiast 582037bbf3
Create enum class for text underline 2021-02-28 00:23:00 +01:00
Ted John 49b677780f
Merge pull request #14171 from IntelOrca/plugin/custom-widget
* Add API for getting network traffic statistics.
* Add API for creating custom widgets.
* Add API for drawing graphics for custom widgets.
* Add click event to spinners and allow them to be held down.
2021-02-27 01:31:00 +00:00
Michael Steenbeek 08f07e6135
Reduce usage of gCurrentFontSpriteBase (#14178) 2021-02-26 15:39:20 +01:00
Ted John c1b0df5de6 Improve graphics plugin API 2021-02-24 22:37:31 +00:00
Ted John e7adf19f62
Merge pull request #14059 from IntelOrca/improve-viewport-filter-flags
[Plugin] Add optional filter to custom tools
2021-02-19 20:33:27 +00:00
Michael Steenbeek 7274c6a7e7
Remove some unused symbols 2021-02-18 21:15:50 +01:00
Ted John 762b6ee816 Refactor viewport interaction flags and add plugin API 2021-02-18 18:10:29 +00:00
Matt c30bd1266f
Refactor IStream::ReadArray to return unique_ptr 2021-02-12 19:30:53 +02:00
ζeh Matt 9ff2138f3f
Remove unused variable gCurrentFontFlags 2021-01-30 16:46:22 +01:00
Mathias Gibbens b1e5a11bf3
Several more spelling fixes (#13752)
Signed-off-by: Mathias Gibbens <mathias@calenhad.com>

Co-authored-by: Mathias Gibbens <mathias@calenhad.com>
2021-01-10 18:23:35 +00:00
Michael Steenbeek 1da6ae6b51
Merge pull request #13710 from skdltmxn/refactor/string_view
Refactor/string view
2021-01-10 13:37:01 +01:00
ζeh Matt 011588b01e
Move window update out of variable frame updates (#13704) 2021-01-10 09:36:34 -03:00
skdltmxn c093a50f3f Refactor to use string_view more properly 2021-01-07 01:52:10 +09:00
Michael Steenbeek b21f8284ac
Merge pull request #13669 from ZehMatt/enhancements/banner-limit
Refactor logic to allow to draw 256 banners at the same time
2021-01-03 23:02:31 +01:00
Karthik NS ae637bf088
Close #13623: Refactor LightFXQualifier to use strong enum 2021-01-03 14:03:13 +01:00
Matt 5bbc07847c
Remove unused field 2021-01-02 16:43:17 +02:00
Matt 474ed67696
Initialize scrolling text sprites without a copy from original 2021-01-02 16:43:17 +02:00
Matt 95551b0504
Use correct type 2021-01-02 16:43:17 +02:00
Matt 7dfe0b02a6
Add ScrollingText.h 2021-01-02 16:43:17 +02:00
Matt 9d473bbfbe
Refactor logic to allow to draw 256 banners at the same time 2021-01-02 16:43:17 +02:00
Michael Steenbeek ac2057775e
Change standard palette colours for indices 1-9 2020-12-30 20:07:14 +01:00
Dennis Devriendt 3073cca6aa
Close #13624: Refactor ViewportInteractionItem to use strong enum (#13657)
* Closes #13624: Refactor ViewportInteractionItem to use strong enum
2020-12-29 15:09:15 -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
Ted John 5a90cd4163 Apply a few more code review comments 2020-11-27 18:54:58 +00:00
Ted John 503a383301 Do not format characters in text input 2020-11-27 18:54:57 +00:00
Ted John ec03ce5317 Improve handling of braces 2020-11-27 18:54:57 +00:00
Ted John dfcd8a4bbc Apply code review comments 2020-11-27 18:54:57 +00:00
Ted John 167aaac633 Fix TTF issues 2020-11-27 18:54:57 +00:00
Ted John 92fcdfbd9b Fix GCC compiler errors 2020-11-27 18:54:57 +00:00
Ted John b6a688e540 Refactor format tokens 2020-11-27 18:54:57 +00:00
Ted John 157c984d4c Fix more string functions 2020-11-27 18:54:56 +00:00
Ted John 80537832e9 Implement MOVE_X and INLINE_SPRITE 2020-11-27 18:54:56 +00:00
Ted John c6152efa4e Fix scrolling text 2020-11-27 18:54:56 +00:00
Ted John 2f7c1aab14 Start eradicating old format codes 2020-11-27 18:54:56 +00:00
Ghlen Nagels 8c55d1ea9f
Close #12446: Refactor WEATHER to use strong enum (#13434) 2020-11-22 17:34:30 +00:00
Łukasz Pękalski 6e5105ab3b refactor: ObjectType to use strong enum
enum renaming complete
2020-11-11 16:07:01 +01:00
Hielke Morsink f0c1ea1d37
Split declarations and definitions to improve compile times when editing (#13332)
* Split FileStream declarations and definitions

* Split JobPool declarations and definitions

* Split StringBuilder declarations and definitions

* Split StringReader declarations and definitions

* Split ZoomLevel declarations and definitions

* Fix missing include in FileClassifier.cpp

* Remove pragma once from source files

* Fix missing include in StringBuilder.h

* Update Xcode project

* Fix compilation of tests

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
2020-11-07 12:42:04 +00:00
Duncan 88b73d8716
Refactor add 3d light follow on from #13281 (#13333)
Close #12406

Co-authored-by: rpstester <32249806+rpstester@users.noreply.github.com>

Co-authored-by: rpstester <32249806+rpstester@users.noreply.github.com>
2020-11-04 11:24:56 +00:00
Duncan 214f6992dd
Rename to TitleCase and name LastAttachedPS (#13260) 2020-10-22 18:13:54 +01:00
Haven Kim 4bce329a40
Fix #12940: Windows cause issues with snow drawing (#13238)
Windows' left value inside of cosine function is causing glitch-feel
movement for snows but in fact, x_start can simply modified by another magic
numbers.
2020-10-19 18:58:47 +02:00
Julia Pinheiro 8800c32e52
Close #12404: Refactor DRAWING_ENGINE to use strong enum (#13070) 2020-10-02 22:41:30 -03:00
Michael Steenbeek 4a79e9305f
Replace gfx_draw_string_right() with DrawTextBasic (#12966) 2020-09-18 21:39:00 -03:00
Matt 38e03ae45d
Use the Formatter for News items 2020-09-17 22:14:36 +03:00
Matt 2639349925
Move storage into Formatter class and refactor usage 2020-09-17 22:14:36 +03:00
Brett c9de4f49fe
Add snow as a weather type
Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
2020-09-14 21:58:00 +02:00
Gymnasiast 31d20cefb2
Rename rain to weather where appropriate
Co-authored-by: Brett Penzer <brettpenzer123@live.co.uk>
2020-09-14 21:57:54 +02:00
Michael Steenbeek cf5b48a9dd
Rename Rain.{cpp,h} to Weather.{cpp,h} (#12914) 2020-09-12 19:32:26 -03:00
Gymnasiast c83ddefe47
Convert remaining C-style casts to C++-style ones 2020-09-10 21:36:20 +02:00
tellovishous 96945183f5
Add stroke to lowercase 'L' to differentiate from capital 'I' (#12890)
The problem with many sans-serif fonts, such as those in RCT2, is that it can be difficult to tell between a lowercase L and an uppercase I, and can be visually ambiguous. What I've done is add a small stroke to the bottom of the lowercase L's so that it will stand out better when it's used next to capital I's.
2020-09-10 20:07:12 +02:00
Gymnasiast d140dd72c6
Remove const void* overload from DrawTextEllipsised() 2020-09-10 18:13:13 +02:00
Gymnasiast b788a099b5
Replace gfx_draw_string_clipped() calls with DrawTextEllipsised 2020-09-10 18:13:13 +02:00
Hielke Morsink 96d1db97e0
Fix: Unused variable warning because of if constexpr (#12871)
This moves the variable in question to the scope where it gets used. Since it's a reference, this shouldn't be a performance hit.
2020-09-06 22:22:49 +02:00
Gymnasiast d5ff5712b9
Add drawing code for the Esperanto characters 2020-09-05 22:58:00 +02:00
Ted John 3a0bff4b93 Add comment about remX, remY 2020-08-28 01:30:17 +01:00
Ted John 65e3d20156 Refactor drawing 2020-08-28 01:30:15 +01:00
Ted John 7f0510e444 Fix sub pixel clip issues with OpenGL 2020-08-28 01:29:59 +01:00
Ted John f51ad862c9 Refactor window drawing 2020-08-28 01:29:59 +01:00
Ted John 25581fa4ef Share blit methods between BMP and RLE 2020-08-28 01:29:59 +01:00
Ted John f16a46b872 Refactor RLE minify 2020-08-28 01:29:59 +01:00
Ted John 1645c64e87 Implement RLE magnify 2020-08-28 01:29:59 +01:00
Ted John 247c950c60 Implement magnify for bitmap 2020-08-28 01:29:59 +01:00
Gymnasiast 17bac8c57b
Use colour_t 2020-08-26 15:38:27 +02:00
Gymnasiast 972e6e80ab
Allow passing Formatter to DrawTextBasic() and DrawTextEllipsised() 2020-08-26 15:08:42 +02:00
Gymnasiast 39bc73c394
Deprecate text draw functions with 1:1 replacements 2020-08-26 14:53:59 +02:00
Gymnasiast 9a31a94128
Use const args in DrawTextEllipsised() 2020-08-26 14:49:28 +02:00
Gymnasiast ceace1a3ad
Remove draw_string_left_underline() 2020-08-26 14:47:47 +02:00
Gymnasiast f1caddc9fe
Remove draw_string_right_underline() 2020-08-26 14:46:37 +02:00
Gymnasiast 5f468da9cf
Remove draw_string_centred_underline() 2020-08-26 14:44:57 +02:00
Gymnasiast e1b778832b
Expose DrawTextBasic() and DrawTextEllipsised() 2020-08-26 14:44:30 +02:00
Łukasz Pękalski 399e0abe2e
Close #12497: Remove extra SPRITE_INDEX_NULL checks (#12601) 2020-08-08 09:12:52 -03:00
Matt 0dc43d66e4 Remove the use of INTERFACE macro and macro its self 2020-08-05 16:30:44 +02:00
Matt 30376085cf Include missing headers 2020-08-05 16:29:29 +02:00
Tom Parsons d9129bca0f
Fix #12405: Make LIGHTFX_LIGHT_TYPE a strong enum (LightType) (#12569)
* Fix #12405: Make LIGHTFX_LIGHT_TYPE a strong enum

* Fix #12405: Make LIGHTFX_LIGHT_TYPE a strong enum

- New strong enum LightType

- Remove unused enum members

- GetLightTypeSize and SetLightTypeSize modify size of light (0-3)

* actually save the change to lightType
2020-08-04 15:55:14 +01:00
frutiemax 2c350fa416
Part of #12097: Use ScreenRect in gfx_fill_rect_inset (#12284) 2020-08-01 00:51:29 -03:00
Duncan cd1d573c39
Pass the formatter directly to scrolling_text_setup 2020-07-31 12:31:26 +02:00
Michael Steenbeek 402570adb6
Refactor usage of TextPaint
Eliminating a global variable in the process.
2020-07-31 11:13:28 +02:00
Duncan c6e26267a4
Reduce the use of GET_VEHICLE (#12494)
* Start removing GET_VEHICLE macro use

* Further work

* Remove further GET_VEHICLE's

* Further removal of GET_VEHICLE

* Remove the last of GET_VEHICLE

* Fix testpaint

* Fix nullptr deref

* Make review changes

Also swapped in helper functions and used a standard patern for iterating the train cars

* Further simplify loops for train cars
2020-07-31 07:48:27 +01:00
wdarvin 95b4bca3d0
Close #12448: Refactor RAIN_LEVEL to use strong enum (#12488)
* Close #12448: Refactor RAIN_LEVEL to use strong enum

* Refactor to remove enum suffix
2020-07-28 17:19:45 +01:00
Michael Steenbeek 41162cc22f
Fix: bad kerning on lowercase 'j' character (original bug) 2020-07-26 23:19:16 +02:00
frutiemax 6598ae14aa Close #12457: Rename INTRO_STATE to use PascalCase 2020-07-26 09:32:53 -04:00
frutiemax 0f1788d273 Part of #12457: Refactor INTRO_STATE to use strong enum 2020-07-26 09:25:29 -04:00
0ro8lu 4416565e47
Close #12269: remove goto from x8_drawing_engine (#12274)
Refactored the function into a separate get dirty rows function.
2020-07-22 11:51:41 +01:00
Aaron van Geffen 7b5087f057
Update copyright year to 2020 2020-07-21 15:04:34 +02:00
Gymnasiast cf664c8340
Close #11971: Replace ride groups with new ride types 2020-07-17 00:19:49 +02:00
frutiemax c474f2ddc0
Close #12096: Use only ScreenRect on gfx_fill_rect (#12280) 2020-07-15 22:34:57 -03:00
Thamara Andrade 0fb2a6216c
Close #12099: Use ScreenLine on gfx_draw_line (#12143) 2020-07-12 18:50:52 -03:00
frutiemax 29e6db982b
Part of #12096: Prefer ScreenRect on gfx_fill_rect (#12187) 2020-07-09 23:32:38 -03:00
frutiemax bf2b8073cb
Part of #12096: ScreenRect for gfx_fill_rect in libopenrct2 (#12109) 2020-07-08 14:07:26 -03:00
frutiemax 280a21fa30
Fix #12095: Use ScreenRect on gfx_set_dirty_blocks (#12106) 2020-07-08 13:16:24 -03:00
Tulio Leao 59236443ba Make StaticLayout::Draw use ScreenCoordsXY 2020-07-08 10:15:02 -03:00
Tulio Leao dabde880cd Make DrawTextEllipsisedCompat use ScreenCoordsXY 2020-07-08 10:13:03 -03:00