Brandan

Untitled

Aug 12th, 2014
294
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Dim reader As New BinaryReader(File.Open(filepath, FileMode.Open))
  2. reader.BaseStream.Position = &H14043 ' Move reader to position 0x14043
  3. For i As Integer = 0 To 2000 - 1
  4.    Dim object_reader As New BinaryReader(New MemoryStream(reader.ReadBytes(55))) ' Read 55 bytes
  5.    Dim Model_Type = CType(object_reader.ReadByte, Models.Model_Type) ' Read the first byte (01)
  6.    Dim Type_Num = object_reader.ReadByte ' Read the second byte (02)
  7.    Dim Owner As Models.Tribe = object_reader.ReadSByte ' Read SBYTE (03)
  8.    Dim X = object_reader.ReadInt16 ' Read SWORD
  9.    Dim Y = object_reader.ReadInt16 ' Read SWORD
  10. Next
RAW Paste Data