git-svn-id: svn://svn.ijw.co.nz/svn/OpenRa@1307 993157c7-ee19-0410-b2c4-bb4e9862e678
This commit is contained in:
@@ -43,14 +43,12 @@ namespace OpenRa.FileFormats
|
||||
Width = int.Parse(map.GetValue("Width", "0"));
|
||||
Height = int.Parse(map.GetValue("Height", "0"));
|
||||
|
||||
UnpackTileData(ReadMapPack(file));
|
||||
UnpackTileData( ReadPackedSection( file.GetSection( "MapPack" ) ) );
|
||||
ReadTrees(file);
|
||||
}
|
||||
|
||||
static MemoryStream ReadMapPack(IniFile file)
|
||||
static MemoryStream ReadPackedSection(IniSection mapPackSection)
|
||||
{
|
||||
IniSection mapPackSection = file.GetSection("MapPack");
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (int i = 1; ; i++)
|
||||
{
|
||||
@@ -120,6 +118,14 @@ namespace OpenRa.FileFormats
|
||||
}
|
||||
}
|
||||
|
||||
void UnpackOverlayData( MemoryStream ms )
|
||||
{
|
||||
for( int i = 0 ; i < 128 ; i++ )
|
||||
for( int j = 0 ; j < 128 ; j++ )
|
||||
MapTiles[ j, i ].overlay = ReadByte( ms );
|
||||
|
||||
}
|
||||
|
||||
void ReadTrees( IniFile file )
|
||||
{
|
||||
IniSection terrain = file.GetSection( "TERRAIN" );
|
||||
|
||||
Reference in New Issue
Block a user