MOAR PERF

git-svn-id: svn://svn.ijw.co.nz/svn/OpenRa@1956 993157c7-ee19-0410-b2c4-bb4e9862e678
This commit is contained in:
chrisf
2008-03-25 02:07:15 +00:00
parent f218d212ff
commit b77a116f60
7 changed files with 98 additions and 123 deletions

View File

@@ -72,7 +72,7 @@ namespace OpenRa.FileFormats
byte[] dest = new byte[8192];
byte[] src = reader.ReadBytes((int)length);
int actualLength = Format80.DecodeInto(new MemoryStream(src), dest);
int actualLength = Format80.DecodeInto(src, dest);
chunks.Add(dest);
}
@@ -113,7 +113,7 @@ namespace OpenRa.FileFormats
for( int i = 0 ; i < 128 ; i++ )
for( int j = 0 ; j < 128 ; j++ )
{
MapTiles[ j, i ].image = ReadByte( ms );
MapTiles[j, i].image = (byte)ms.ReadByte();// ReadByte(ms);
if( MapTiles[ j, i ].tile == 0xff || MapTiles[ j, i ].tile == 0xffff )
MapTiles[ j, i ].image = (byte)( i % 4 + ( j % 4 ) * 4 );
}