Commit Graph

15 Commits

Author SHA1 Message Date
Oliver Brakmann
8442dc4bf0 Fixed missing ships when importing legacy RA maps 2015-06-07 15:45:16 +02:00
Matthias Mailänder
b4a67f412e fix missing dispose on stream in LegacyMapImporter 2015-05-25 16:08:52 +02:00
abcdefg30
8d2307db83 Convert the float health percentage to an int one 2015-05-01 14:16:19 +02:00
Paul Chote
4b1f541f34 Reorganize actor and smudge loading.
The actor and smudge definitions are now stored
as raw MiniYamlNodes in the map.  It is now the
responsibility of the consumers to parse these
into real objects.
2015-04-30 07:06:14 +12:00
penev92
2402b56da7 Reorganize PlayerReference loading to enable upgrade rules for them.
The PlayerReference definitions are now stored
as raw MiniYamlNodes in the map.
2015-04-26 23:16:20 +03:00
David Jiménez
f15f1e41e8 Made int2 struct immutable 2015-03-20 13:54:01 +01: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
abcdefg30
98aed777d0 Improved legacy map import
Health: 1 and Facing: 0 will be omitted.
2015-01-04 13:06:05 +01:00
Hellhake
fa72e04042 Remove BOM 2015-01-01 22:51:12 +01:00
Paul Chote
2ed594fd86 Introduce map Visibility field.
This replaces the Selectable, UseAsShellmap, and special-cased Type = "Mission" fields.
2014-12-23 09:08:00 +13:00
Oliver Brakmann
e342619ac7 Add video support to legacy map importer
This enables the map importer to map the .ini video definitions to ours.

The mapping generally is as follows:

Intro => BackgroundInfo
Brief => Briefing
Action => GameStart
Win => GameWon
Lose => GameLost

An issue in some Red Alert maps means that this mapping is not always
quite correct. In those maps that do not have a 'Brief' video defined
(scg03a is an example), Westwood has assigned the video that should
probaby have been the 'Action' video to the 'Intro' slot instead. I can
only assume that that was done due to some limitation in the original
game code. Mappers will have to correct that assignment manually in
those cases.
2014-12-18 18:59:42 +01:00
Paul Chote
ecd3809bc2 Fix a collection of whitespace-style issues in Mods.Common. 2014-12-14 17:06:43 +13:00
Alexander Fast
08890b0994 Added IUtilityCommand and move default commands into Mods.Common. 2014-09-21 10:15:50 +12:00