Commit Graph

40 Commits

Author SHA1 Message Date
Paul Chote
53db1230ab Move default tileset parsing to Mods.Common. 2021-01-11 21:57:55 +01:00
Paul Chote
995c33a942 Remove Ruleset.TileSet. 2021-01-11 21:57:55 +01: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
teinarss
27f1a7ab27 Use out var syntax 2020-08-19 18:11:07 +01:00
teinarss
19b02875c7 Use Tuple syntax 2020-08-15 10:37:10 +01:00
teinarss
f87ba1d8a4 Update SP maps with transformable trees 2020-07-20 14:05:52 +02:00
Paul Chote
70cb0d2924 Improve TS map importer and reimport classic maps. 2020-07-13 14:02:02 +02:00
Paul Chote
a2269e7ee7 Convert (Dynamic)FacingInit, (Dynamic)TurretFacingInit to WAngle. 2020-07-08 20:38:30 +02:00
Paul Chote
5f588561b6 Rewrite TS minimap rendering:
* Rename LeftColor and RightColor to MinColor and MaxColor
  These are mapped from LowRadarColor and HighRadarColor in
  the original inis, and appear to be used to set the bounding
  values for selecting a random colour, NOT for left/right
  pixels (which caused noticeably wrong banding).

* Adjust brightness based on terrain height.
  MinHeightColorBrightness and MaxHeightColorBrightness
  were chosen by trial/error to match the original
  map preview rendering.
2020-07-07 22:12:22 +02:00
Matthias Mailänder
e361f7b246 The category field has been pluralized. 2020-04-19 15:21:10 +02:00
Matthias Mailänder
b0497b7505 Fix double whitespace. 2020-04-19 15:21:10 +02:00
Zimmermann Gyula
a894e31fa5 Remove now obsolete tileset palette entry. 2020-04-19 15:21:10 +02:00
abcdefg30
942dd0e5f7 Adapt the utility commands to import crates as well 2020-04-17 10:52:59 +02:00
abcdefg30
400102f3d3 Remove a TODO about grey nod colors 2020-04-17 10:52:59 +02:00
reaperrr
d835090d0b Move LCWCompression support to Mods.Cnc 2020-02-22 15:40:37 +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
3f06541b2b Move Shp conversion/remap commands to Mods.Cnc 2019-11-23 19:04:27 +01:00
Paul Chote
ebf2ce32c0 Make sure braces for multi-line statements are on their own lines. 2019-06-08 19:26:53 +02:00
Paul Chote
65856f3b0e Fix remaining semicolon spacing issues. 2019-06-08 18:46:03 +02:00
Paul Chote
674155a8dd Move ctor initializers to their own line. 2019-06-08 18:44:50 +02:00
Paul Chote
548de12e85 Add newlines after closing braces. 2019-06-08 13:20:14 +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
Andre Mohren
b1a44086a0 Removed unused using directives. 2018-11-17 17:23:22 +00:00
lawando
7dd64445fc Rename EmitInfantryOnSell and remove default actor type. 2018-06-02 15:37:35 +02:00
abcdefg30
df8e2f4be4 Fix the ts map importer saving default values for Health and Facing 2018-05-04 23:54:04 +02:00
Paul Chote
4f0aa89c01 Remove TileSet.Palette and PaletteFromCurrentTileset. 2018-04-08 21:14:29 +02:00
RoosterDragon
63810220e4 Improve some usages of Aggregate. 2018-03-18 16:44:17 +01:00
reaperrr
9107ca3bc1 Remove unused legacy IsWater flag
This was planned anyway, we had just forgotten about it when the last blocker was removed.
2018-02-22 11:51:10 +01:00
Arular101
8a60918841 Update copyright notice year to 2018 2018-01-17 00:47:34 +01:00
Matthias Mailänder
d17e414648 Fix the overlay to actor rule for crates 2017-09-22 13:04:29 +02:00
Matthias Mailänder
44cfa793df Don't import veinholedummy and correct it's index
as it is a Westwood hack we don't need to immitate.
There are already better ways to limit vein growth.
2017-09-22 13:04:29 +02:00
Paul Chote
ba7290cc2c Move classic-mod package loaders and support files to Mods.Cnc. 2017-05-29 12:41:28 +02:00
Paul Chote
df40d38b91 Rework read/write zip file loading/saving. 2017-05-29 12:20:32 +02:00
Paul Chote
0222ea675c Implement mod-defined package loaders. 2017-05-07 13:25:38 +01:00
reaperrr
bb9790c754 Move legacy map import commands into matching subfolder 2017-04-20 20:50:04 +02:00
reaperrr
709e2a26e1 Merge Mods.TS into Mods.Cnc 2017-02-02 21:20:31 +01:00