Advertisement
Guest User

Untitled

a guest
Sep 29th, 2016
275
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Function ReadCByte:Byte(Stream:TStream)
  2.     Local result:Byte = ReadByte(Stream)
  3.     Stream.Seek(Ceil(StreamPos(Stream) / 4) * 4)
  4.     Return result
  5. EndFunction
  6.  
  7. Function ReadCShort:Short(Stream:TStream)
  8.     Local result:Short = ReadShort(Stream)
  9.     Stream.Seek(Ceil(StreamPos(Stream) / 4) * 4)
  10.     Return result
  11. EndFunction
  12.  
  13. Function ReadCInt:Int(Stream:TStream)
  14.     Return ReadInt(Stream)
  15. EndFunction
  16.  
  17. Function ReadCFloat:Int(Stream:TStream)
  18.     Return ReadFloat(Stream)
  19. EndFunction
  20.  
  21. Function ReadCByteArray:Byte[] (Stream:TStream, Length:Int)
  22.     Local result:Byte[Length]
  23.     For Local i:Int = 0 Until result.Length
  24.          result[i] = ReadByte(Stream)
  25.     Next
  26.     Stream.Seek(Ceil(StreamPos(Stream) / 4) * 4)
  27.     Return result
  28. EndFunction
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement