protected void UnserializeLua(System.IO.BinaryReader reader) { id = reader.ReadUInt32(); version = reader.ReadByte(); byteorder = (Endian)reader.ReadByte(); intsz = reader.ReadByte(); sztsz = reader.ReadByte(); instsz = reader.ReadByte(); operandbits = reader.ReadByte(); bits1 = reader.ReadByte(); bits2 = reader.ReadByte(); bits3 = reader.ReadByte(); nrsz = reader.ReadByte(); sample = reader.ReadBytes(sample.Length); root.Unserialize(reader); }
internal void Unserialize(System.IO.BinaryReader reader) { contants.Clear(); functions.Clear(); codes.Clear(); srcln.Clear(); local.Clear(); upval.Clear(); name = ObjLua.ReadString(reader); linedef = reader.ReadUInt32(); nups = reader.ReadByte(); argc = reader.ReadByte(); isinout = reader.ReadByte(); stacksz = reader.ReadByte(); uint linenfosz = reader.ReadUInt32(); for (uint i = 0; i < linenfosz; i++) { ObjLuaSourceLine item = new ObjLuaSourceLine(this); item.Unserialize(reader); srcln.Add(item); } uint locvarsz = reader.ReadUInt32(); for (uint i = 0; i < locvarsz; i++) { ObjLuaLocalVar item = new ObjLuaLocalVar(this); item.Unserialize(reader); local.Add(item); } uint upvalsz = reader.ReadUInt32(); for (uint i = 0; i < upvalsz; i++) { ObjLuaUpValue item = new ObjLuaUpValue(this); item.Unserialize(reader); upval.Add(item); } uint constsz = reader.ReadUInt32(); for (uint i = 0; i < constsz; i++) { ObjLuaConstant item = new ObjLuaConstant(this); item.Unserialize(reader); contants.Add(item); } uint fncsz = reader.ReadUInt32(); for (uint i = 0; i < fncsz; i++) { ObjLuaFunction item = new ObjLuaFunction(this.parent); item.Unserialize(reader); functions.Add(item); } uint codesz = reader.ReadUInt32(); for (uint i = 0; i < codesz; i++) { ObjLuaCode item = ObjLuaCode.Unserialize(reader, this); codes.Add(item); } }