Commit Graph

15 Commits

Author SHA1 Message Date
abcdefg30
6a31b1f9f3 Update the copyright header year 2022-05-28 00:35:10 -05:00
penev92
0d24ccc47a Fixed unnecessary zero-length array allocations
Changed all currently present zero-length array allocations in the codebase to use `Array.Empty` instead.
2022-01-20 22:10:28 +01:00
Andre Mohren
6810469634 Updated copyright years. 2021-06-29 18:33:21 -05:00
teinarss
10676be377 Replace F extension with string interpolation 2021-05-08 22:20:59 +02:00
Paul Chote
0c52d275fa Add TransparentIndex to PaletteFromFile. 2021-03-20 17:15:56 +01:00
teinarss
4a1e4f3e16 Use expression body syntax 2021-03-07 13:00:52 +00: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
Paul Chote
1cc1f93fb0 Rename Platform.GameDir to Platform.EngineDir. 2020-11-24 17:53:48 +01:00
Paul Chote
888915b53b Use Platform.GameDir explicitly in hardcoded paths. 2020-11-22 16:42:46 +01:00
Paul Chote
1111ce4754 Add support for 32 bit BGRA sprites. 2020-01-17 16:49:58 +01:00
abcdefg30
23b3c237b7 Update the year numbers in all license headers to 2020 2020-01-05 17:00:34 +00:00
Paul Chote
82fade25a6 Replace Sheet.AsBitmap with Sheet.AsPng. 2019-02-24 14:02:19 +01:00
abcdefg30
cadbd0d9ab Change the year number in all cs headers from 2018 to 2019 2019-01-26 23:15:21 +01:00
Andre Mohren
b1a44086a0 Removed unused using directives. 2018-11-17 17:23:22 +00:00
Paul Chote
952f41b4e4 Add --dump-sequence-sheets Utility command.
This can be used to debug and optimize the texture
data that is uploaded to VRAM.
2018-04-30 02:05:43 +02:00