Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- RootObject = new sol_object();
- using (var v = File.OpenRead(location))
- {
- BinaryReader2 br = new BinaryReader2(v);
- ///HEADER///
- br.ReadInt16();//padding
- br.ReadInt32();//file length
- br.ReadInt32();//TCSO
- br.ReadBytes(6);//padding
- RootObject.name = Encoding.ASCII.GetString(br.ReadBytes(br.ReadInt16()));//shared object name
- if (RootObject.name != "savedLines")
- throw new Exception("invalid root object");
- br.ReadInt32();//amf version, we only support 0
- ///items///
- List<sol_object> Objects = new List<sol_object>();
- while (v.Position != v.Length)
- {
- Objects.Add(readobject(br));
- br.ReadByte();
- }
- RootObject.data = Objects;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement