made palette shadowindex configurable

This commit is contained in:
Matthias Mailänder
2012-06-26 23:21:30 +02:00
committed by Chris Forbes
parent 007b2c5434
commit c75c72b525
14 changed files with 62 additions and 36 deletions

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2012 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
@@ -19,7 +19,7 @@ namespace OpenRA.Mods.RA
public readonly string Name = null;
public readonly string Tileset = null;
public readonly string Filename = null;
public readonly bool Transparent = true;
public readonly int[] ShadowIndex = { };
public object Create(ActorInitializer init) { return new PaletteFromFile(init.world, this); }
}
@@ -37,7 +37,7 @@ namespace OpenRA.Mods.RA
public void InitPalette( WorldRenderer wr )
{
if( info.Tileset == null || info.Tileset.ToLowerInvariant() == world.Map.Tileset.ToLowerInvariant() )
wr.AddPalette( info.Name, new Palette( FileSystem.Open( info.Filename ), info.Transparent ) );
wr.AddPalette( info.Name, new Palette( FileSystem.Open( info.Filename ), info.ShadowIndex ) );
}
}
}