Commit Graph

41 Commits

Author SHA1 Message Date
teinarss
27f1a7ab27 Use out var syntax 2020-08-19 18:11:07 +01:00
atlimit8
f1e8f9c9d0 Fixed PNG frame count calculation
This fixes the order of operations and rounding issue, making it columns * rows.
2020-05-02 23:14:31 +02:00
Matthias Mailänder
c131728aa4 Give more context when crashing during .png sheet loading. 2020-05-02 13:26:06 -05:00
Paul Chote
522861e484 Support 32 bit png sprites. 2020-01-17 16:49:58 +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
reaperrr
4751b1a176 Move ShpTDLoader, LZO and XORDelta formats to Mods.Cnc
They're pretty much RA/TD-specific formats.
2019-12-08 19:43:51 +00:00
reaperrr
a74235bdbc Move ShpD2 and TmpRA/TD loaders to Mods.Cnc
Reducing the count of proprietary formats in Mods.Common.

Note: Moving ShpD2 to Mods.Cnc is intentional. RA/TD
use it for their original mouse shp files, and any D2(k) mod
will normally need Mods.Cnc anyway, while we can avoid
adding a Mods.D2k dependency to RA/TD this way.
2019-12-01 16:23:54 +01:00
Paul Chote
78a70be0d4 Fix and enable SA1133, SA1134 style rules. 2019-05-24 10:47:57 +02:00
Paul Chote
353db73381 Fix a collection of minor style violations.
This enables several new StyleCopAnalyzer rules to
be enabled immediately during migration.
2019-05-09 20:40:08 +02:00
Paul Chote
ab4a7e3558 Replace System.Drawing primitives with our own. 2019-03-04 18:26:42 +00:00
abcdefg30
cadbd0d9ab Change the year number in all cs headers from 2018 to 2019 2019-01-26 23:15:21 +01:00
Paul Chote
49b04221b2 Add palette checks for png sprites. 2019-01-08 21:20:06 +00:00
Andre Mohren
89051d40e8 Remove utf8 BOM. 2018-11-17 17:23:22 +00:00
Paul Chote
2ad8179672 Add PngSheetMetadata sprite metadata. 2018-10-28 20:55:40 +00:00
Paul Chote
eb61c45e14 Add EmbeddedSpritePalette sprite metadata. 2018-10-28 20:55:40 +00:00
Paul Chote
dee6d03626 Allow sprites to store custom metadata. 2018-10-28 20:55:40 +00:00
Andre Mohren
693b5a54af PNG spritesheet support, along with PaletteFromPng.
Cursor palette loader can now be specified via yaml.
2018-09-29 21:12:40 +02:00
Paul Chote
567ab47765 Revert ShpTD empty space trimming.
This reverts the following commits:
 * 1faae73c08f6971286b1f9929dd8aa03b52e198c
 * a7d39fc76d446efea8b4eb092c2b303ffc49189d
2018-08-04 19:56:24 +02:00
Paul Chote
d6682faeee Keep a 1px border around trimmed ShpTD data. 2018-07-23 17:02:50 +01:00
Paul Chote
8c0f4fde81 Fix newlines in C# files. 2018-07-01 11:08:32 +02:00
Paul Chote
dbf6937062 Trim empty space around edges of Shp(TD) frames.
This significantly cuts down the amount of texture
space allocated in VRAM.
2018-05-20 14:12:11 +02:00
Arular101
8a60918841 Update copyright notice year to 2018 2018-01-17 00:47:34 +01:00
Matthias Mailänder
5b16bb952f Count all zero images as valid. 2017-10-07 10:09:35 +02:00
Matthias Mailänder
a8288a38f8 Allow sprites with empty frames to pass the ShpTS checks. 2017-10-07 10:09:35 +02:00
Taryn Hill
43317e0f5d Update copyright notice year to 2017 2016-12-31 23:46:13 -06:00
Paul Chote
e71225496b Clarify GPL version. 2016-02-21 16:30:48 +00:00
Paul Chote
b396965fd9 Update licence header year. 2016-02-21 16:27:31 +00:00
Paul Chote
9f4b7097b2 Move WW compression formats into Mods.Common. 2016-01-07 21:07:43 +00:00
Paul Chote
33f3e5ad47 Rename WW-created compression formats. 2016-01-07 21:07:42 +00:00
RoosterDragon
bfe1804bf6 Fix some spellings. 2015-11-27 16:19:59 +00:00
Jacob Dufault
d9b39d15d4 Remove some unused using statements 2015-05-25 02:00:45 -07:00
RoosterDragon
82bea961ba Checked LINQ queries and collections for inefficiencies.
- Made Array.IndexOf available via extension method.
- Made ToHashSet extension method.
- Change collections queried often via Contains into sets.
- Avoid Count() extension if Count or Length property exist.
- Made Count() > 0 checks and variations calls to Any() instead.
- Don't call ToList/ToArray if there is no benefit to materializing the sequence.
- If the sequence does benefit from materialization, follow this general pattern:
  - Collection queried often via Contains use ToHashSet to speed up lookups.
  - Short lived variables use ToList. This is because ToArray requires an extra copy to output the final size.
  - Collections persisted into fields or for a long time use ToArray to minimize memory overhead.
2015-01-29 19:20:11 +00:00
abcdefg30
8ca61aa917 Updated all year numbers 2015-01-09 21:18:05 +01:00
RoosterDragon
a6cda967c2 Formatted all files.
Automatically formatted all files via VS. This generally corrects indentation, removes trailing whitespace and corrects misplaced tabs or spaces. Manually tweaked a few files where required.
2015-01-06 21:28:50 +00:00
Paul Chote
62c04b2793 Rewrite shp(ts) parsing to avoid offset issues. Fixes #6822. 2014-10-23 08:14:28 +13:00
Paul Chote
beb7a394a2 Move ShpD2 sprite loading into Mods.Common. 2014-10-07 09:55:50 +13:00
Paul Chote
37cedd88a2 Move TmpTD sprite loading into Mods.Common. 2014-10-07 09:55:49 +13:00
Paul Chote
997c79130a Move TmpRA sprite loading into Mods.Common. 2014-10-07 09:55:49 +13:00
Paul Chote
c798b306c4 Move ShpTS sprite loading into Mods.Common. 2014-10-07 09:55:49 +13:00
Paul Chote
d658643b73 Move ShpTD sprite loading into Mods.Common. 2014-10-07 09:55:49 +13:00