Commit Graph

20 Commits

Author SHA1 Message Date
RoosterDragon
f4af5c1764 Fix CA1852 2023-06-06 11:51:47 +03:00
RoosterDragon
8a285f9b19 Fix IDE0090 2023-04-08 16:51:51 +03:00
Gustas
157d1b32dc Use null propagation 2023-02-27 08:36:47 +02:00
abcdefg30
5bf7fe852c Remove the copyright year numbers 2023-01-11 11:58:54 +02:00
abcdefg30
6a31b1f9f3 Update the copyright header year 2022-05-28 00:35:10 -05:00
penev92
bf332b6619 Fixed fields missing the readonly modifier 2022-01-22 18:47:06 +00:00
abcdefg30
b8ba1b36fe Don't throw an exception when creating a hardware cursor fails 2021-08-14 17:11:34 +01:00
Paul Chote
70892a6661 Change DrawSprite calls to provide scales instead of sizes.
This allows us to remove a hacky workaround for calculating
depth offsets when sprites have size.Z == 0.
2021-07-25 00:32:17 +02:00
Andre Mohren
6810469634 Updated copyright years. 2021-06-29 18:33:21 -05:00
Paul Chote
dacacdf130 Remove global fallback to software cursors on error.
We now only fall back for the specific cursors that failed.
2021-05-30 12:01:44 +02:00
teinarss
10676be377 Replace F extension with string interpolation 2021-05-08 22:20:59 +02:00
Paul Chote
62fa3b7c9c Rename SpriteFrameType enums. 2020-12-25 18:51:25 +01:00
Paul Chote
ce09b402d0 Fix definition and use of non-indexed sprite color channels.
Our SpriteFrameType names refer to the byte channel order rather than
the bit order, meaning that SpriteFrameType.BGRA corresponds to the
standard Color.ToArgb() etc byte order when the (little-endian) integer
is read as 4 individual bytes.

The previous code did not account for the fact that non-indexed Png
uses big-endian storage for its RGBA colours, and that SheetBuilder
had the color channels incorrectly swapped to match and cancel this out.

New SpriteFrameType enums are introduced to distinguish between BGRA
(little-endian) and RGBA (big-endian) formats, and also for 24bit data
without alpha. The channel swizzling / alpha creation is now handled
when copying into the texture atlas, removing the need for non-png
ISpriteLoader implementations to allocate an additional temporary array
and reorder the channels during load.
2020-12-25 18:51:25 +01:00
RoosterDragon
6eaf51d450 CursorManager avoids use of BitConverter.
Avoid allocating a small temp array via BitConverter.GetBytes, and instead use bitwise ops to isolate the components of the color.
2020-10-20 22:53:32 +02:00
Paul Chote
6388a6bff4 Add Graphics.UIScale setting to modify UI size. 2020-02-04 19:56:15 +01:00
Paul Chote
bd4724842c Fix software cursor rendering at fractional scales. 2020-01-26 20:22:49 +01:00
Paul Chote
f730b55255 Move hardware cursor control to hidden DisableHardwareCursors setting. 2020-01-26 17:11:45 +01:00
Paul Chote
370f7a44fa Restore cursor doubling for "default" cursor. 2020-01-26 17:11:45 +01:00
Paul Chote
f7e5111123 Apply cursor doubling setting without requiring a restart. 2020-01-26 17:11:45 +01:00
Paul Chote
847db5e59b Merge HardwareCursor and SoftwareCursor into CursorManager. 2020-01-26 17:11:45 +01:00