public ReadBytes ( int num ) : byte[] | ||
num | int | Number of bytes to read. |
return | byte[] |
/// <summary> /// Reads a SPR2 chunk from a stream. /// </summary> /// <param name="version">Version of the SPR2 that this frame belongs to.</param> /// <param name="stream">A IOBuffer object used to read a SPR2 chunk.</param> public void Read(uint version, IoBuffer io, uint guessedSize) { Version = version; if (version == 1001) { var spriteVersion = io.ReadUInt32(); var spriteSize = io.ReadUInt32(); if (IffFile.RETAIN_CHUNK_DATA) ReadDeferred(1001, io); else ToDecode = io.ReadBytes(spriteSize); } else { if (IffFile.RETAIN_CHUNK_DATA) ReadDeferred(1000, io); else ToDecode = io.ReadBytes(guessedSize); } }