add support for compressed packages (zip); strip unnecessary SharpZipLib dll. req reference to WindowsBase for System.IO.Packaging support (apparently Mono has it)
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System.Drawing;
|
||||
using OpenRA.FileFormats;
|
||||
using OpenRA.Traits;
|
||||
|
||||
@@ -30,4 +31,30 @@ namespace OpenRA.Mods.RA
|
||||
wr.AddPalette(info.Name, new Palette(pal, new ShroudPaletteRemap(info.IsFog)));
|
||||
}
|
||||
}
|
||||
|
||||
class ShroudPaletteRemap : IPaletteRemap
|
||||
{
|
||||
bool isFog;
|
||||
|
||||
public ShroudPaletteRemap(bool isFog) { this.isFog = isFog; }
|
||||
public Color GetRemappedColor(Color original, int index)
|
||||
{
|
||||
if (isFog)
|
||||
return new[] {
|
||||
Color.Transparent, Color.Green,
|
||||
Color.Blue, Color.Yellow,
|
||||
Color.FromArgb(128,0,0,0),
|
||||
Color.FromArgb(128,0,0,0),
|
||||
Color.FromArgb(128,0,0,0),
|
||||
Color.FromArgb(64,0,0,0)}[index % 8];
|
||||
else
|
||||
return new[] {
|
||||
Color.Transparent, Color.Green,
|
||||
Color.Blue, Color.Yellow,
|
||||
Color.Black,
|
||||
Color.FromArgb(128,0,0,0),
|
||||
Color.Transparent,
|
||||
Color.Transparent}[index % 8];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user