Custom tilesize support for editor
This commit is contained in:
@@ -19,13 +19,16 @@ namespace OpenRA.FileFormats
|
||||
|
||||
public Terrain( Stream stream, int size )
|
||||
{
|
||||
System.Console.WriteLine("Loading tile with expected size {0}",size);
|
||||
// Try loading as a cnc .tem
|
||||
BinaryReader reader = new BinaryReader( stream );
|
||||
int Width = reader.ReadUInt16();
|
||||
int Height = reader.ReadUInt16();
|
||||
|
||||
System.Console.WriteLine("Actual size {0}x{1}",Width,Height);
|
||||
|
||||
if( Width != size || Height != size )
|
||||
throw new InvalidDataException( string.Format( "Expected tile of size {0}x{1}, got {1}x{2]", size, size, Width, Height ) );
|
||||
throw new InvalidDataException( "Expected tile of size {0}x{0}, got {1}x{2]".F(size, Width, Height ) );
|
||||
|
||||
/*NumTiles = */reader.ReadUInt16();
|
||||
/*Zero1 = */reader.ReadUInt16();
|
||||
|
||||
Reference in New Issue
Block a user