protected override void ExtractSubRecords(BetterReader reader, GameID gameID, uint size) { var bytes = reader.ReadBytes((int)size); var name = string.Empty; using (var stream = new BetterMemoryReader(bytes)) { var end = stream.Length; while (stream.Position < end) { name = stream.ReadString(4); switch (name) { case "EDID": EDID = new STRSubRecord(); EDID.Deserialize(stream, name); break; case "OBND": OBND = new OBNDSubRecord(); OBND.Deserialize(stream, name); break; case "MODL": MODL = new STRSubRecord(); MODL.Deserialize(stream, name); break; case "MODB": MODB = new BytesSubRecord(); MODB.Deserialize(stream, name); break; case "MODT": MODT = new BytesSubRecord(); MODT.Deserialize(stream, name); break; case "MODS": MODS = new MODSSubRecord(); MODS.Deserialize(stream, name); break; case "MODD": MODD = new MODDSubRecord(); MODD.Deserialize(stream, name); break; default: var rest = stream.ReadUInt16(); stream.ReadBytes(rest); break; } } } }
protected override void ExtractSubRecords(BetterReader reader, GameID gameID, uint size) { var bytes = reader.ReadBytes((int)size); var name = string.Empty; using (var stream = new BetterMemoryReader(bytes)) { var end = stream.Length; while (stream.Position < end) { name = stream.ReadString(4); switch (name) { case "EDID": EDID = new STRSubRecord(); EDID.Deserialize(stream, name); break; case "QSTI": var qsti = new FormID(); qsti.Deserialize(stream, name); QSTI.Add(qsti); break; case "QSTR": var qstr = new FormID(); qstr.Deserialize(stream, name); QSTR.Add(qstr); break; case "FULL": FULL = new STRSubRecord(); FULL.Deserialize(stream, name); break; case "PNAM": PNAM = new FloatSubRecord(); PNAM.Deserialize(stream, name); break; case "DATA": DATA = new DIAL_DATASubRecord(); DATA.Deserialize(stream, name); break; default: break; } } } }
protected override void ExtractSubRecords(BetterReader reader, GameID gameId, uint size) { var endRead = reader.Position + size; var name = string.Empty; while (reader.Position < endRead) { name = reader.ReadString(4); switch (name) { case "HEDR": Header = new HEDRSubRecord(); Header.Deserialize(reader, name); break; case "OFST": Offset = new BytesSubRecord(); Offset.Deserialize(reader, name); break; case "DELE": DELE = new BytesSubRecord(); DELE.Deserialize(reader, name); break; case "CNAM": Author = new STRSubRecord(); Author.Deserialize(reader, name); break; case "SNAM": Description = new STRSubRecord(); Description.Deserialize(reader, name); break; case "MAST": Master = new STRSubRecord(); Master.Deserialize(reader, name); break; case "DATA": FileSize = new UInt64SubRecord(); FileSize.Deserialize(reader, name); break; default: var dSize = reader.ReadInt16(); reader.ReadBytes(dSize); break; } } }
protected override void ExtractSubRecords(BetterReader reader, GameID gameID, uint size) { var bytes = reader.ReadBytes((int)size); var name = string.Empty; using (var stream = new BetterMemoryReader(bytes)) { var end = stream.Length; while (stream.Position < end) { name = stream.ReadString(4); switch (name) { case "EDID": EDID = new STRSubRecord(); EDID.Deserialize(stream, name); break; case "DATA": switch (EDID.Value[0]) { case 's': DATA = new STRSubRecord(); ((STRSubRecord)DATA).Deserialize(stream, name); break; case 'f': DATA = new FloatSubRecord(); ((FloatSubRecord)DATA).Deserialize(stream, name); break; default: DATA = new UInt32SubRecord(); ((UInt32SubRecord)DATA).Deserialize(stream, name); break; } break; } } } }
protected override void ExtractSubRecords(BetterReader reader, GameID gameID, uint size) { var bytes = reader.ReadBytes((int)size); var name = string.Empty; using (var stream = new BetterMemoryReader(bytes)) { var end = stream.Length; while (stream.Position < end) { name = stream.ReadString(4); switch (name) { case "EDID": EDID = new STRSubRecord(); EDID.Deserialize(stream, name); break; case "FULL": FULL = new STRSubRecord(); FULL.Deserialize(stream, name); break; case "DATA": DATA = new CELL_DATASubRecord(); DATA.Deserialize(stream, name); break; case "XCLL": XCLL = new BytesSubRecord(); XCLL.Deserialize(stream, name); break; case "XCMT": XCMT = new ByteSubRecord(); XCMT.Deserialize(stream, name); break; case "XGLB": XGLB = new UInt32SubRecord(); XGLB.Deserialize(stream, name); break; case "XRNK": XRNK = new UInt32SubRecord(); XRNK.Deserialize(stream, name); break; case "XCLW": XCLW = new FloatSubRecord(); XCLW.Deserialize(stream, name); break; case "XCLC": XCLC = new Vector2iSubRecord(); XCLC.Deserialize(stream, name); break; case "XCLR": XCLR = new FormID(); XCLR.Deserialize(stream, name); break; case "XCIM": XCIM = new FormID(); XCIM.Deserialize(stream, name); break; case "XEZN": XEZN = new FormID(); XEZN.Deserialize(stream, name); break; case "XCCM": XCCM = new FormID(); XCCM.Deserialize(stream, name); break; case "XCWT": XCWT = new FormID(); XCWT.Deserialize(stream, name); break; case "XOWN": XOWN = new FormID(); XOWN.Deserialize(stream, name); break; case "XCAS": XCAS = new FormID(); XCAS.Deserialize(stream, name); break; case "XCMO": XCMO = new FormID(); XCMO.Deserialize(stream, name); break; default: var rest = stream.ReadUInt16(); stream.ReadBytes(rest); break; } } } }
protected override void ExtractSubRecords(BetterReader reader, GameID gameID, uint size) { var bytes = reader.ReadBytes((int)size); var name = string.Empty; using (var stream = new BetterMemoryReader(bytes)) { var end = stream.Length; while (stream.Position < end) { name = stream.ReadString(4); switch (name) { case "EDID": EDID = new STRSubRecord(); EDID.Deserialize(stream, name); break; case "FULL": FULL = new STRSubRecord(); FULL.Deserialize(stream, name); break; case "OBND": OBND = new OBNDSubRecord(); OBND.Deserialize(stream, name); break; case "MODL": MODL = new STRSubRecord(); MODL.Deserialize(stream, name); break; case "ACBS": ACBS = new ACBSSubRecord(); ACBS.Deserialize(stream, name); break; case "SNAM": var snam = new SNAMSubRecord(); snam.Deserialize(stream, name); SNAM.Add(snam); break; case "INAM": INAM = new FormID(); INAM.Deserialize(stream, name); break; case "VTCK": VTCK = new FormID(); VTCK.Deserialize(stream, name); break; case "TPLT": TPLT = new FormID(); TPLT.Deserialize(stream, name); break; case "RNAM": RNAM = new FormID(); RNAM.Deserialize(stream, name); break; case "EITM": EITM = new FormID(); EITM.Deserialize(stream, name); break; case "SCRI": SCRI = new FormID(); SCRI.Deserialize(stream, name); break; case "PKID": var pkid = new FormID(); pkid.Deserialize(stream, name); PKID.Add(pkid); break; case "CNAM": CNAM = new FormID(); CNAM.Deserialize(stream, name); break; case "PNAM": var pnam = new FormID(); pnam.Deserialize(stream, name); PNAM.Add(pnam); break; case "HNAM": HNAM = new FormID(); HNAM.Deserialize(stream, name); break; case "ENAM": ENAM = new FormID(); ENAM.Deserialize(stream, name); break; case "ZNAM": ZNAM = new FormID(); ZNAM.Deserialize(stream, name); break; default: var rest = stream.ReadUInt16(); stream.ReadBytes(rest); break; } } } }
protected override void ExtractSubRecords(BetterReader reader, GameID gameID, uint size) { var bytes = reader.ReadBytes((int)size); var name = string.Empty; using (var stream = new BetterMemoryReader(bytes)) { var end = stream.Length; while (stream.Position < end) { name = stream.ReadString(4); switch (name) { case "EDID": EDID = new STRSubRecord(); EDID.Deserialize(stream, name); break; case "NAME": NAME = new FormID(); NAME.Deserialize(stream, name); break; case "XLOC": XLOC = new REFR_XLOCSubRecord(); XLOC.Deserialize(stream, name); break; case "XOWN": XOWN = new FormID(); XOWN.Deserialize(stream, name); break; case "XLKR": XLKR = new FormID(); XLKR.Deserialize(stream, name); break; case "DATA": DATA = new PosAndRotSubRecord(); DATA.Deserialize(stream, name); break; case "XSCL": XSCL = new FloatSubRecord(); XSCL.Deserialize(stream, name); break; case "XTEL": XTEL = new REFR_XTELSubRecord(); XTEL.Deserialize(stream, name); break; case "XNDP": XNDP = new REFR_XNDPSubRecord(); XNDP.Deserialize(stream, name); break; case "XLTW": XLTW = new FormID(); XLTW.Deserialize(stream, name); break; case "XRDS": XRDS = new FloatSubRecord(); XRDS.Deserialize(stream, name); break; case "XEMI": XEMI = new FormID(); XEMI.Deserialize(stream, name); break; case "XPWR": var xpwr = new REFR_XPWRSubRecord(); xpwr.Deserialize(stream, name); XPWR.Add(xpwr); break; case "XPRD": XPRD = new FloatSubRecord(); XPRD.Deserialize(stream, name); break; case "XPPA": var xppaSize = stream.ReadUInt16(); var xppaData = stream.ReadBytes(Convert.ToInt32(xppaSize)); XPPA = true; if (xppaData.Length > 0) { break; } break; case "INAM": INAM = new FormID(); INAM.Deserialize(stream, name); break; case "SCHR": SCHR = new SCHRSubRecord(); SCHR.Deserialize(stream, name); break; case "TNAM": TNAM = new BytesSubRecord(); TNAM.Deserialize(stream, name); break; case "XMBO": XMBO = new REFR_XMBOSubRecord(); XMBO.Deserialize(stream, name); break; case "XPRM": XPRM = new REFR_XPRMSubRecord(); XPRM.Deserialize(stream, name); break; case "XRMR": XRMR = new REFR_XRMRSubRecord(); XRMR.Deserialize(stream, name); break; case "XLRM": XLRM = new FormID(); XLRM.Deserialize(stream, name); break; case "XACT": XACT = new REFR_XACTSubRecord(); XACT.Deserialize(stream, name); break; case "ONAM": var onamSize = stream.ReadUInt16(); var onamData = stream.ReadBytes(Convert.ToInt32(onamSize)); ONAM = true; if (onamData.Length > 0) { break; } break; case "XRGD": XRGD = new BytesSubRecord(); XRGD.Deserialize(stream, name); break; case "XHLP": XHLP = new FloatSubRecord(); XHLP.Deserialize(stream, name); break; case "XSED": XSED = new ByteSubRecord(); XSED.Deserialize(stream, name); break; case "XPOD": XPOD = new REFR_XPODSubRecord(); XPOD.Deserialize(stream, name); break; case "XRDO": XRDO = new REFR_XRDOSubRecord(); XRDO.Deserialize(stream, name); break; case "XAPD": XAPD = new ByteSubRecord(); XAPD.Deserialize(stream, name); break; case "XAPR": var xapr = new REFR_XAPRSubRecord(); xapr.Deserialize(stream, name); XAPR.Add(xapr); if (XAPR.Count > 1) { break; } break; case "XESP": XESP = new REFR_XESPSubRecord(); XESP.Deserialize(stream, name); break; case "XLCM": XLCM = new UInt32SubRecord(); XLCM.Deserialize(stream, name); break; case "XCNT": XCNT = new UInt32SubRecord(); XCNT.Deserialize(stream, name); break; case "XTRI": XTRI = new REFR_XTRISubRecord(); XTRI.Deserialize(stream, name); break; case "XOCP": XOCP = new BytesSubRecord(); XOCP.Deserialize(stream, name); break; case "XAMT": XAMT = new FormID(); XAMT.Deserialize(stream, name); break; case "XAMC": XAMC = new UInt32SubRecord(); XAMC.Deserialize(stream, name); break; case "XRAD": XRAD = new FloatSubRecord(); XRAD.Deserialize(stream, name); break; case "XIBS": var xibsSize = stream.ReadUInt16(); var xibsData = stream.ReadBytes(xibsSize); XIBS = true; break; case "XTRG": XTRG = new FormID(); XTRG.Deserialize(stream, name); break; case "XORD": XORD = new BytesSubRecord(); XORD.Deserialize(stream, name); break; case "XMBP": var xmbpSize = stream.ReadUInt16(); var xmbpData = stream.ReadBytes(xmbpSize); XMBP = true; break; case "XMBR": XMBR = new FormID(); XMBR.Deserialize(stream, name); break; case "XCLP": XCLP = new BytesSubRecord(); XCLP.Deserialize(stream, name); break; case "XMRK": var xmrkSize = stream.ReadUInt16(); var xmrkData = stream.ReadBytes(xmrkSize); XMRK = true; break; case "FNAM": FNAM = new REFR_FNAMSubRecord(); FNAM.Deserialize(stream, name); break; case "FULL": FULL = new STRSubRecord(); FULL.Deserialize(stream, name); break; case "SCDA": SCDA = new BytesSubRecord(); SCDA.Deserialize(stream, name); break; case "SCRO": SCRO = new BytesSubRecord(); SCRO.Deserialize(stream, name); break; case "XLOD": XLOD = new BytesSubRecord(); XLOD.Deserialize(stream, name); break; case "RCLR": RCLR = new BytesSubRecord(); RCLR.Deserialize(stream, name); break; case "XRGB": XRGB = new BytesSubRecord(); XRGB.Deserialize(stream, name); break; default: var rest = stream.ReadUInt16(); stream.ReadBytes(rest); break; } } } }
protected override void ExtractSubRecords(BetterReader reader, GameID gameID, uint size) { var bytes = reader.ReadBytes((int)size); var name = string.Empty; using (var stream = new BetterMemoryReader(bytes)) { var end = stream.Length; while (stream.Position < end) { name = stream.ReadString(4); switch (name) { case "DATA": DATA = new INFO_DATASubRecord(); DATA.Deserialize(stream, name); break; case "QSTI": QSTI = new FormID(); QSTI.Deserialize(stream, name); break; case "TRDT": var trdt = new INFO_TRDTSubrecord(); trdt.Deserialize(stream, name); Responses = new INFO_ResponseSubRecordCollection(); Responses.TRDT = trdt; break; case "NAM1": var nam1 = new STRSubRecord(); nam1.Deserialize(stream, name); Responses.NAM1 = nam1; break; case "NAM2": var nam2 = new STRSubRecord(); nam2.Deserialize(stream, name); Responses.NAM2 = nam2; break; case "NAM3": var nam3 = new STRSubRecord(); nam3.Deserialize(stream, name); Responses.NAM3 = nam3; break; case "TCLT": var tclt = new FormID(); tclt.Deserialize(stream, name); TCLT.Add(tclt); break; case "TCLF": var tclf = new FormID(); tclf.Deserialize(stream, name); TCLF.Add(tclf); break; default: var rest = stream.ReadUInt16(); stream.ReadBytes(rest); break; } } } }
protected override void ExtractSubRecords(BetterReader reader, GameID gameID, uint size) { var bytes = reader.ReadBytes((int)size); var name = string.Empty; using (var stream = new BetterMemoryReader(bytes)) { var end = stream.Length; while (stream.Position < end) { name = stream.ReadString(4); switch (name) { case "EDID": EDID = new STRSubRecord(); EDID.Deserialize(stream, name); break; case "NAME": NAME = new FormID(); NAME.Deserialize(stream, name); break; case "XEZN": XEZN = new FormID(); XEZN.Deserialize(stream, name); break; case "INAM": INAM = new FormID(); INAM.Deserialize(stream, name); break; case "TNAM": TNAM = new FormID(); TNAM.Deserialize(stream, name); break; case "XMRC": XMRC = new FormID(); XMRC.Deserialize(stream, name); break; case "XLKR": XLKR = new FormID(); XLKR.Deserialize(stream, name); break; case "XEMI": XEMI = new FormID(); XEMI.Deserialize(stream, name); break; case "XMBR": XMBR = new FormID(); XMBR.Deserialize(stream, name); break; case "DATA": DATA = new PosAndRotSubRecord(); DATA.Deserialize(stream, name); break; default: var rest = stream.ReadUInt16(); stream.ReadBytes(rest); break; } } } }
protected override void ExtractSubRecords(BetterReader reader, GameID gameID, uint size) { var bytes = reader.ReadBytes((int)size); var name = string.Empty; using (var stream = new BetterMemoryReader(bytes)) { var end = stream.Length; while (stream.Position < end) { name = stream.ReadString(4); switch (name) { case "EDID": EDID = new STRSubRecord(); EDID.Deserialize(stream, name); break; case "FULL": FULL = new STRSubRecord(); FULL.Deserialize(stream, name); break; case "WNAM": WNAM = new FormID(); WNAM.Deserialize(stream, name); break; case "CNAM": CNAM = new FormID(); CNAM.Deserialize(stream, name); break; case "NAM2": NAM2 = new FormID(); NAM2.Deserialize(stream, name); break; case "NAM3": NAM3 = new FormID(); NAM3.Deserialize(stream, name); break; case "NAM4": NAM4 = new FloatSubRecord(); NAM4.Deserialize(stream, name); break; case "DNAM": DNAM = new WRLD_DNAMSubRecord(); DNAM.Deserialize(stream, name); break; case "ICON": ICON = new STRSubRecord(); ICON.Deserialize(stream, name); break; case "MNAM": MNAM = new WRLD_MNAMSubRecord(); MNAM.Deserialize(stream, name); break; case "ONAM": ONAM = new WRLD_ONAMSubRecord(); ONAM.Deserialize(stream, name); break; case "INAM": INAM = new FormID(); INAM.Deserialize(stream, name); break; case "DATA": DATA = new WRLD_DATASubRecord(); DATA.Deserialize(stream, name); break; case "NAM0": NAM0 = new Vector2fSubRecord(); NAM0.Deserialize(stream, name); break; case "NAM9": NAM9 = new Vector2fSubRecord(); NAM9.Deserialize(stream, name); break; case "NNAM": NNAM = new STRSubRecord(); NNAM.Deserialize(stream, name); break; case "XNAM": XNAM = new STRSubRecord(); XNAM.Deserialize(stream, name); break; case "XXXX": //var xxxxSize = stream.ReadUInt16(); //var xxxxData = stream.ReadBytes(xxxxSize); //var xxxxDataStr = System.Text.Encoding.ASCII.GetString(xxxxData); XXXX = new UInt32SubRecord(); XXXX.Deserialize(stream, name); break; case "OFST": var ofstSize = Convert.ToInt32(stream.ReadUInt16()); if (ofstSize == 0) { ofstSize = Convert.ToInt32(XXXX.Value); } var ofstData = stream.ReadBytes(ofstSize); break; case "XEZN": XEZN = new FormID(); XEZN.Deserialize(stream, name); break; case "PNAM": PNAM = new WRLD_PNAMSubRecord(); PNAM.Deserialize(stream, name); break; case "ZNAM": ZNAM = new FormID(); ZNAM.Deserialize(stream, name); break; default: var rest = stream.ReadUInt16(); stream.ReadBytes(rest); break; } } } }