diff --git a/components/esm4/common.hpp b/components/esm4/common.hpp index 8f37bfb8d4..a50151b10a 100644 --- a/components/esm4/common.hpp +++ b/components/esm4/common.hpp @@ -176,687 +176,6 @@ namespace ESM4 REC_MSET = fourCC("MSET") // Media Set }; - enum SubRecordTypes - { - SUB_ACBS = fourCC("ACBS"), - SUB_ACEC = fourCC("ACEC"), // TES5 Dawnguard - SUB_ACEP = fourCC("ACEP"), // TES5 Dawnguard - SUB_ACID = fourCC("ACID"), // TES5 Dawnguard - SUB_ACPR = fourCC("ACPR"), // TES5 - SUB_ACSR = fourCC("ACSR"), // TES5 Dawnguard - SUB_ACTV = fourCC("ACTV"), // FO4 - SUB_ACUN = fourCC("ACUN"), // TES5 Dawnguard - SUB_AHCF = fourCC("AHCF"), - SUB_AHCM = fourCC("AHCM"), - SUB_AIDT = fourCC("AIDT"), - SUB_ALCA = fourCC("ALCA"), // TES5 - SUB_ALCC = fourCC("ALCC"), // FO4 - SUB_ALCL = fourCC("ALCL"), // TES5 - SUB_ALCO = fourCC("ALCO"), // TES5 - SUB_ALCS = fourCC("ALCS"), // FO4 - SUB_ALDI = fourCC("ALDI"), // FO4 - SUB_ALDN = fourCC("ALDN"), // TES5 - SUB_ALEA = fourCC("ALEA"), // TES5 - SUB_ALED = fourCC("ALED"), // TES5 - SUB_ALEQ = fourCC("ALEQ"), // TES5 - SUB_ALFA = fourCC("ALFA"), // TES5 - SUB_ALFC = fourCC("ALFC"), // TES5 - SUB_ALFD = fourCC("ALFD"), // TES5 - SUB_ALFE = fourCC("ALFE"), // TES5 - SUB_ALFI = fourCC("ALFI"), // TES5 - SUB_ALFL = fourCC("ALFL"), // TES5 - SUB_ALFR = fourCC("ALFR"), // TES5 - SUB_ALFV = fourCC("ALFV"), // FO4 - SUB_ALID = fourCC("ALID"), // TES5 - SUB_ALLA = fourCC("ALLA"), // FO4 - SUB_ALLS = fourCC("ALLS"), // TES5 - SUB_ALMI = fourCC("ALMI"), // FO4 - SUB_ALNA = fourCC("ALNA"), // TES5 - SUB_ALNT = fourCC("ALNT"), // TES5 - SUB_ALPC = fourCC("ALPC"), // TES5 - SUB_ALRT = fourCC("ALRT"), // TES5 - SUB_ALSP = fourCC("ALSP"), // TES5 - SUB_ALST = fourCC("ALST"), // TES5 - SUB_ALUA = fourCC("ALUA"), // TES5 - SUB_ANAM = fourCC("ANAM"), - SUB_AOR2 = fourCC("AOR2"), // FO4 - SUB_APPR = fourCC("APPR"), // FO4 - SUB_ATKD = fourCC("ATKD"), - SUB_ATKE = fourCC("ATKE"), - SUB_ATKR = fourCC("ATKR"), - SUB_ATKS = fourCC("ATKS"), // FO4 - SUB_ATKT = fourCC("ATKT"), // FO4 - SUB_ATKW = fourCC("ATKW"), // FO4 - SUB_ATTN = fourCC("ATTN"), // FO4 - SUB_ATTR = fourCC("ATTR"), - SUB_ATTX = fourCC("ATTX"), // FO4 - SUB_ATXT = fourCC("ATXT"), - SUB_AVFL = fourCC("AVFL"), // FO4 - SUB_AVSK = fourCC("AVSK"), // TES5 - SUB_BAMT = fourCC("BAMT"), - SUB_BCLF = fourCC("BCLF"), // FO4 - SUB_BIDS = fourCC("BIDS"), - SUB_BIPL = fourCC("BIPL"), // FO3 - SUB_BMCT = fourCC("BMCT"), - SUB_BMDT = fourCC("BMDT"), - SUB_BMMP = fourCC("BMMP"), // FO4 - SUB_BNAM = fourCC("BNAM"), - SUB_BOD2 = fourCC("BOD2"), - SUB_BODT = fourCC("BODT"), - SUB_BPND = fourCC("BPND"), - SUB_BPNI = fourCC("BPNI"), - SUB_BPNN = fourCC("BPNN"), - SUB_BPNT = fourCC("BPNT"), - SUB_BPTN = fourCC("BPTN"), - SUB_BRUS = fourCC("BRUS"), // FONV - SUB_BSIZ = fourCC("BSIZ"), // FO4 - SUB_BSMB = fourCC("BSMB"), // FO4 - SUB_BSMP = fourCC("BSMP"), // FO4 - SUB_BSMS = fourCC("BSMS"), // FO4 - SUB_BTXT = fourCC("BTXT"), - SUB_CDIX = fourCC("CDIX"), // FO4 - SUB_CIS1 = fourCC("CIS1"), // TES5 - SUB_CIS2 = fourCC("CIS2"), // TES5 - SUB_CITC = fourCC("CITC"), // TES5 - SUB_CLSZ = fourCC("CLSZ"), // FO4 - SUB_CNAM = fourCC("CNAM"), - SUB_CNTO = fourCC("CNTO"), - SUB_COCT = fourCC("COCT"), - SUB_COED = fourCC("COED"), - SUB_CRDT = fourCC("CRDT"), - SUB_CRGR = fourCC("CRGR"), // TES5 - SUB_CRIF = fourCC("CRIF"), - SUB_CRIS = fourCC("CRIS"), // FO4 - SUB_CRVA = fourCC("CRVA"), // TES5 - SUB_CS2D = fourCC("CS2D"), // FO4 - SUB_CS2E = fourCC("CS2E"), // FO4 - SUB_CS2F = fourCC("CS2F"), // FO4 - SUB_CS2H = fourCC("CS2H"), // FO4 - SUB_CS2K = fourCC("CS2K"), // FO4 - SUB_CSCR = fourCC("CSCR"), - SUB_CSCV = fourCC("CSCV"), // FO4 - SUB_CSDC = fourCC("CSDC"), - SUB_CSDI = fourCC("CSDI"), - SUB_CSDT = fourCC("CSDT"), - SUB_CSFL = fourCC("CSFL"), // TES5 - SUB_CSGD = fourCC("CSGD"), // TES5 - SUB_CSLR = fourCC("CSLR"), // TES5 - SUB_CSMD = fourCC("CSMD"), // TES5 - SUB_CSME = fourCC("CSME"), // TES5 - SUB_CSRA = fourCC("CSRA"), // FO4 - SUB_CTDA = fourCC("CTDA"), - SUB_CTDT = fourCC("CTDT"), - SUB_CUSD = fourCC("CUSD"), // FO4 - SUB_CVPA = fourCC("CVPA"), // FO4 - SUB_DALC = fourCC("DALC"), // FO3 - SUB_DAMA = fourCC("DAMA"), // FO4 - SUB_DAMC = fourCC("DAMC"), // FO4 - SUB_DAT2 = fourCC("DAT2"), // FONV - SUB_DATA = fourCC("DATA"), - SUB_DELE = fourCC("DELE"), - SUB_DEMO = fourCC("DEMO"), // TES5 - SUB_DESC = fourCC("DESC"), - SUB_DEST = fourCC("DEST"), - SUB_DEVA = fourCC("DEVA"), // TES5 - SUB_DFTF = fourCC("DFTF"), - SUB_DFTM = fourCC("DFTM"), - SUB_DMAX = fourCC("DMAX"), // TES5 - SUB_DMDC = fourCC("DMDC"), // FO4 - SUB_DMDL = fourCC("DMDL"), - SUB_DMDS = fourCC("DMDS"), - SUB_DMDT = fourCC("DMDT"), - SUB_DMIN = fourCC("DMIN"), // TES5 - SUB_DNAM = fourCC("DNAM"), - SUB_DODT = fourCC("DODT"), - SUB_DOFT = fourCC("DOFT"), - SUB_DPLT = fourCC("DPLT"), - SUB_DSTA = fourCC("DSTA"), // FO4 - SUB_DSTD = fourCC("DSTD"), - SUB_DSTF = fourCC("DSTF"), - SUB_DTGT = fourCC("DTGT"), // FO4 - SUB_DTID = fourCC("DTID"), // FO4 - SUB_EAMT = fourCC("EAMT"), - SUB_ECOR = fourCC("ECOR"), - SUB_EDID = fourCC("EDID"), - SUB_EFID = fourCC("EFID"), - SUB_EFIT = fourCC("EFIT"), - SUB_EFSD = fourCC("EFSD"), // FONV DeadMoney - SUB_EITM = fourCC("EITM"), - SUB_ENAM = fourCC("ENAM"), - SUB_ENIT = fourCC("ENIT"), - SUB_EPF2 = fourCC("EPF2"), - SUB_EPF3 = fourCC("EPF3"), - SUB_EPFB = fourCC("EPFB"), // FO4 - SUB_EPFD = fourCC("EPFD"), - SUB_EPFT = fourCC("EPFT"), - SUB_ESCE = fourCC("ESCE"), - SUB_ETYP = fourCC("ETYP"), - SUB_FCHT = fourCC("FCHT"), // TES5 - SUB_FCPL = fourCC("FCPL"), // FO4 - SUB_FFFF = fourCC("FFFF"), - SUB_FGGA = fourCC("FGGA"), - SUB_FGGS = fourCC("FGGS"), - SUB_FGTS = fourCC("FGTS"), - SUB_FIMD = fourCC("FIMD"), // FO4 - SUB_FLMV = fourCC("FLMV"), - SUB_FLTR = fourCC("FLTR"), // TES5 - SUB_FLTV = fourCC("FLTV"), - SUB_FMIN = fourCC("FMIN"), // FO4 - SUB_FMRI = fourCC("FMRI"), // FO4 - SUB_FMRN = fourCC("FMRN"), // FO4 - SUB_FMRS = fourCC("FMRS"), // FO4 - SUB_FNAM = fourCC("FNAM"), - SUB_FNMK = fourCC("FNMK"), - SUB_FNPR = fourCC("FNPR"), - SUB_FPRT = fourCC("FPRT"), // TES5 - SUB_FTSF = fourCC("FTSF"), - SUB_FTSM = fourCC("FTSM"), - SUB_FTST = fourCC("FTST"), - SUB_FTYP = fourCC("FTYP"), // FO4 - SUB_FULL = fourCC("FULL"), - SUB_FVPA = fourCC("FVPA"), // FO4 - SUB_GNAM = fourCC("GNAM"), - SUB_GREE = fourCC("GREE"), // FO4 - SUB_GWOR = fourCC("GWOR"), // TES5 - SUB_HCLF = fourCC("HCLF"), - SUB_HCLR = fourCC("HCLR"), - SUB_HEAD = fourCC("HEAD"), - SUB_HEDR = fourCC("HEDR"), - SUB_HLTX = fourCC("HLTX"), // FO4 - SUB_HNAM = fourCC("HNAM"), - SUB_HTID = fourCC("HTID"), // TES5 - SUB_ICO2 = fourCC("ICO2"), - SUB_ICON = fourCC("ICON"), - SUB_IDLA = fourCC("IDLA"), - SUB_IDLB = fourCC("IDLB"), // FO3 - SUB_IDLC = fourCC("IDLC"), - SUB_IDLF = fourCC("IDLF"), - SUB_IDLT = fourCC("IDLT"), - SUB_IMPF = fourCC("IMPF"), // FO3 Anchorage - SUB_IMPS = fourCC("IMPS"), // FO3 Anchorage - SUB_IMSP = fourCC("IMSP"), // TES5 - SUB_INAM = fourCC("INAM"), - SUB_INCC = fourCC("INCC"), - SUB_INDX = fourCC("INDX"), - SUB_INFC = fourCC("INFC"), // FONV - SUB_INFX = fourCC("INFX"), // FONV - SUB_INRD = fourCC("INRD"), // FO4 - SUB_INTT = fourCC("INTT"), // FO4 - SUB_INTV = fourCC("INTV"), - SUB_IOVR = fourCC("IOVR"), // FO4 - SUB_ISIZ = fourCC("ISIZ"), // FO4 - SUB_ITID = fourCC("ITID"), // FO4 - SUB_ITMC = fourCC("ITMC"), // FO4 - SUB_ITME = fourCC("ITME"), // FO4 - SUB_ITMS = fourCC("ITMS"), // FO4 - SUB_ITXT = fourCC("ITXT"), - SUB_JAIL = fourCC("JAIL"), // TES5 - SUB_JNAM = fourCC("JNAM"), // FONV - SUB_JOUT = fourCC("JOUT"), // TES5 - SUB_KFFZ = fourCC("KFFZ"), - SUB_KNAM = fourCC("KNAM"), - SUB_KSIZ = fourCC("KSIZ"), - SUB_KWDA = fourCC("KWDA"), - SUB_LCEC = fourCC("LCEC"), // TES5 - SUB_LCEP = fourCC("LCEP"), // TES5 - SUB_LCID = fourCC("LCID"), // TES5 - SUB_LCPR = fourCC("LCPR"), // TES5 - SUB_LCSR = fourCC("LCSR"), // TES5 - SUB_LCUN = fourCC("LCUN"), // TES5 - SUB_LFSD = fourCC("LFSD"), // FO4 - SUB_LFSP = fourCC("LFSP"), // FO4 - SUB_LLCT = fourCC("LLCT"), - SUB_LLKC = fourCC("LLKC"), // FO4 - SUB_LNAM = fourCC("LNAM"), - SUB_LTMP = fourCC("LTMP"), - SUB_LTPC = fourCC("LTPC"), // FO4 - SUB_LTPT = fourCC("LTPT"), // FO4 - SUB_LVLD = fourCC("LVLD"), - SUB_LVLF = fourCC("LVLF"), - SUB_LVLG = fourCC("LVLG"), // FO3 - SUB_LVLM = fourCC("LVLM"), // FO4 - SUB_LVLO = fourCC("LVLO"), - SUB_LVSG = fourCC("LVSG"), // FO4 - SUB_MASE = fourCC("MASE"), // FO4 - SUB_MAST = fourCC("MAST"), - SUB_MCHT = fourCC("MCHT"), // TES5 - SUB_MDOB = fourCC("MDOB"), - SUB_MHDT = fourCC("MHDT"), - SUB_MIC2 = fourCC("MIC2"), - SUB_MICO = fourCC("MICO"), - SUB_MLSI = fourCC("MLSI"), // FO4 - SUB_MMRK = fourCC("MMRK"), // FONV - SUB_MNAM = fourCC("MNAM"), - SUB_MO2B = fourCC("MO2B"), - SUB_MO2C = fourCC("MO2C"), // FO4 - SUB_MO2F = fourCC("MO2F"), // FO4 - SUB_MO2S = fourCC("MO2S"), - SUB_MO2T = fourCC("MO2T"), - SUB_MO3B = fourCC("MO3B"), - SUB_MO3C = fourCC("MO3C"), // FO4 - SUB_MO3F = fourCC("MO3F"), // FO4 - SUB_MO3S = fourCC("MO3S"), // FO3 - SUB_MO3T = fourCC("MO3T"), - SUB_MO4B = fourCC("MO4B"), - SUB_MO4C = fourCC("MO4C"), // FO4 - SUB_MO4F = fourCC("MO4F"), // FO4 - SUB_MO4S = fourCC("MO4S"), - SUB_MO4T = fourCC("MO4T"), - SUB_MO5C = fourCC("MO5C"), // FO4 - SUB_MO5F = fourCC("MO5F"), // FO4 - SUB_MO5S = fourCC("MO5S"), // TES5 - SUB_MO5T = fourCC("MO5T"), - SUB_MOD2 = fourCC("MOD2"), - SUB_MOD3 = fourCC("MOD3"), - SUB_MOD4 = fourCC("MOD4"), - SUB_MOD5 = fourCC("MOD5"), - SUB_MODB = fourCC("MODB"), - SUB_MODC = fourCC("MODC"), // FO4 - SUB_MODD = fourCC("MODD"), // FO3 - SUB_MODF = fourCC("MODF"), // FO4 - SUB_MODL = fourCC("MODL"), - SUB_MODQ = fourCC("MODQ"), // FO4 - SUB_MODS = fourCC("MODS"), - SUB_MODT = fourCC("MODT"), - SUB_MOSD = fourCC("MOSD"), // FO3 - SUB_MPAI = fourCC("MPAI"), - SUB_MPAV = fourCC("MPAV"), - SUB_MPCD = fourCC("MPCD"), // FO4 - SUB_MPGN = fourCC("MPGN"), // FO4 - SUB_MPGS = fourCC("MPGS"), // FO4 - SUB_MPPC = fourCC("MPPC"), // FO4 - SUB_MPPF = fourCC("MPPF"), // FO4 - SUB_MPPI = fourCC("MPPI"), // FO4 - SUB_MPPK = fourCC("MPPK"), // FO4 - SUB_MPPM = fourCC("MPPM"), // FO4 - SUB_MPPN = fourCC("MPPN"), // FO4 - SUB_MPPT = fourCC("MPPT"), // FO4 - SUB_MPRT = fourCC("MPRT"), // TES5 - SUB_MRSV = fourCC("MRSV"), // FO4 - SUB_MSDK = fourCC("MSDK"), // FO4 - SUB_MSDV = fourCC("MSDV"), // FO4 - SUB_MSID = fourCC("MSID"), // FO4 - SUB_MSM0 = fourCC("MSM0"), // FO4 - SUB_MSM1 = fourCC("MSM1"), // FO4 - SUB_MTNM = fourCC("MTNM"), - SUB_MTYP = fourCC("MTYP"), - SUB_MWD1 = fourCC("MWD1"), // FONV - SUB_MWD2 = fourCC("MWD2"), // FONV - SUB_MWD3 = fourCC("MWD3"), // FONV - SUB_MWD4 = fourCC("MWD4"), // FONV - SUB_MWD5 = fourCC("MWD5"), // FONV - SUB_MWD6 = fourCC("MWD6"), // FONV - SUB_MWD7 = fourCC("MWD7"), // FONV - SUB_MWGT = fourCC("MWGT"), // FO4 - SUB_NAM0 = fourCC("NAM0"), - SUB_NAM1 = fourCC("NAM1"), - SUB_NAM2 = fourCC("NAM2"), - SUB_NAM3 = fourCC("NAM3"), - SUB_NAM4 = fourCC("NAM4"), - SUB_NAM5 = fourCC("NAM5"), - SUB_NAM6 = fourCC("NAM6"), - SUB_NAM7 = fourCC("NAM7"), - SUB_NAM8 = fourCC("NAM8"), - SUB_NAM9 = fourCC("NAM9"), - SUB_NAMA = fourCC("NAMA"), - SUB_NAME = fourCC("NAME"), - SUB_NETO = fourCC("NETO"), // FO4 - SUB_NEXT = fourCC("NEXT"), // FO3 - SUB_NIFT = fourCC("NIFT"), - SUB_NIFZ = fourCC("NIFZ"), - SUB_NNAM = fourCC("NNAM"), - SUB_NNGS = fourCC("NNGS"), // FO4 - SUB_NNGT = fourCC("NNGT"), // FO4 - SUB_NNUS = fourCC("NNUS"), // FO4 - SUB_NNUT = fourCC("NNUT"), // FO4 - SUB_NONE = fourCC("NONE"), // FO4 - SUB_NPOS = fourCC("NPOS"), // FO4 - SUB_NPOT = fourCC("NPOT"), // FO4 - SUB_NQUS = fourCC("NQUS"), // FO4 - SUB_NQUT = fourCC("NQUT"), // FO4 - SUB_NTOP = fourCC("NTOP"), // FO4 - SUB_NTRM = fourCC("NTRM"), // FO4 - SUB_NULL = fourCC("NULL"), - SUB_NVCA = fourCC("NVCA"), // FO3 - SUB_NVCI = fourCC("NVCI"), // FO3 - SUB_NVDP = fourCC("NVDP"), // FO3 - SUB_NVER = fourCC("NVER"), - SUB_NVEX = fourCC("NVEX"), // FO3 - SUB_NVGD = fourCC("NVGD"), // FO3 - SUB_NVMI = fourCC("NVMI"), - SUB_NVNM = fourCC("NVNM"), - SUB_NVPP = fourCC("NVPP"), - SUB_NVSI = fourCC("NVSI"), - SUB_NVTR = fourCC("NVTR"), // FO3 - SUB_NVVX = fourCC("NVVX"), // FO3 - SUB_OBND = fourCC("OBND"), - SUB_OBTE = fourCC("OBTE"), // FO4 - SUB_OBTF = fourCC("OBTF"), // FO4 - SUB_OBTS = fourCC("OBTS"), // FO4 - SUB_OCOR = fourCC("OCOR"), // TES5 - SUB_OFST = fourCC("OFST"), // TES4 only? - SUB_ONAM = fourCC("ONAM"), - SUB_PCMB = fourCC("PCMB"), // FO4 - SUB_PDTO = fourCC("PDTO"), - SUB_PFIG = fourCC("PFIG"), - SUB_PFO2 = fourCC("PFO2"), // TES5 - SUB_PFOR = fourCC("PFOR"), // TES5 - SUB_PFPC = fourCC("PFPC"), - SUB_PFRN = fourCC("PFRN"), // FO4 - SUB_PGAG = fourCC("PGAG"), - SUB_PGRI = fourCC("PGRI"), - SUB_PGRL = fourCC("PGRL"), - SUB_PGRP = fourCC("PGRP"), - SUB_PGRR = fourCC("PGRR"), - SUB_PHTN = fourCC("PHTN"), - SUB_PHWT = fourCC("PHWT"), - SUB_PKAM = fourCC("PKAM"), // FO3 - SUB_PKC2 = fourCC("PKC2"), // TES5 - SUB_PKCU = fourCC("PKCU"), // TES5 - SUB_PKD2 = fourCC("PKD2"), // FO3 - SUB_PKDD = fourCC("PKDD"), // FO3 - SUB_PKDT = fourCC("PKDT"), - SUB_PKE2 = fourCC("PKE2"), // FO3 - SUB_PKED = fourCC("PKED"), // FO3 - SUB_PKFD = fourCC("PKFD"), // FO3 - SUB_PKID = fourCC("PKID"), - SUB_PKPT = fourCC("PKPT"), // FO3 - SUB_PKW3 = fourCC("PKW3"), // FO3 - SUB_PLCN = fourCC("PLCN"), // TES5 - SUB_PLD2 = fourCC("PLD2"), // FO3 - SUB_PLDT = fourCC("PLDT"), - SUB_PLVD = fourCC("PLVD"), // TES5 - SUB_PNAM = fourCC("PNAM"), - SUB_POBA = fourCC("POBA"), // FO3 - SUB_POCA = fourCC("POCA"), // FO3 - SUB_POEA = fourCC("POEA"), // FO3 - SUB_PRCB = fourCC("PRCB"), // TES5 - SUB_PRKC = fourCC("PRKC"), - SUB_PRKE = fourCC("PRKE"), - SUB_PRKF = fourCC("PRKF"), - SUB_PRKR = fourCC("PRKR"), - SUB_PRKZ = fourCC("PRKZ"), - SUB_PRPS = fourCC("PRPS"), // FO4 - SUB_PSDT = fourCC("PSDT"), - SUB_PTD2 = fourCC("PTD2"), // FO3 - SUB_PTDA = fourCC("PTDA"), // TES5 - SUB_PTDT = fourCC("PTDT"), - SUB_PTOP = fourCC("PTOP"), // FO4 - SUB_PTRN = fourCC("PTRN"), // FO4 - SUB_PUID = fourCC("PUID"), // FO3 - SUB_QNAM = fourCC("QNAM"), - SUB_QOBJ = fourCC("QOBJ"), // FO3 - SUB_QSDT = fourCC("QSDT"), - SUB_QSTA = fourCC("QSTA"), - SUB_QSTI = fourCC("QSTI"), - SUB_QSTR = fourCC("QSTR"), - SUB_QTGL = fourCC("QTGL"), // TES5 - SUB_QTOP = fourCC("QTOP"), // FO4 - SUB_QUAL = fourCC("QUAL"), - SUB_RADR = fourCC("RADR"), // FO4 - SUB_RAGA = fourCC("RAGA"), - SUB_RBPC = fourCC("RBPC"), // FO4 - SUB_RCEC = fourCC("RCEC"), // TES5 - SUB_RCIL = fourCC("RCIL"), // FONV - SUB_RCLR = fourCC("RCLR"), - SUB_RCPR = fourCC("RCPR"), // TES5 Dawnguard - SUB_RCSR = fourCC("RCSR"), // TES5 - SUB_RCUN = fourCC("RCUN"), // TES5 - SUB_RDAT = fourCC("RDAT"), - SUB_RDGS = fourCC("RDGS"), - SUB_RDID = fourCC("RDID"), // FONV - SUB_RDMD = fourCC("RDMD"), // TES4 only? - SUB_RDMO = fourCC("RDMO"), - SUB_RDMP = fourCC("RDMP"), - SUB_RDOT = fourCC("RDOT"), - SUB_RDSA = fourCC("RDSA"), - SUB_RDSB = fourCC("RDSB"), // FONV - SUB_RDSD = fourCC("RDSD"), // TES4 only? - SUB_RDSI = fourCC("RDSI"), // FONV - SUB_RDWT = fourCC("RDWT"), - SUB_REPL = fourCC("REPL"), // FO3 - SUB_REPT = fourCC("REPT"), // FO4 - SUB_RLDM = fourCC("RLDM"), // FO4 - SUB_RNAM = fourCC("RNAM"), - SUB_RNMV = fourCC("RNMV"), - SUB_RPLD = fourCC("RPLD"), - SUB_RPLI = fourCC("RPLI"), - SUB_RPRF = fourCC("RPRF"), - SUB_RPRM = fourCC("RPRM"), - SUB_RVIS = fourCC("RVIS"), // FO4 - SUB_SADD = fourCC("SADD"), // FO4 - SUB_SAKD = fourCC("SAKD"), // FO4 - SUB_SAPT = fourCC("SAPT"), // FO4 - SUB_SCDA = fourCC("SCDA"), - SUB_SCHD = fourCC("SCHD"), - SUB_SCHR = fourCC("SCHR"), - SUB_SCIT = fourCC("SCIT"), - SUB_SCQS = fourCC("SCQS"), // FO4 - SUB_SCRI = fourCC("SCRI"), - SUB_SCRN = fourCC("SCRN"), - SUB_SCRO = fourCC("SCRO"), - SUB_SCRV = fourCC("SCRV"), // FONV - SUB_SCTX = fourCC("SCTX"), - SUB_SCVR = fourCC("SCVR"), // FONV - SUB_SDSC = fourCC("SDSC"), - SUB_SGNM = fourCC("SGNM"), // FO4 - SUB_SHRT = fourCC("SHRT"), - SUB_SLCP = fourCC("SLCP"), - SUB_SLSD = fourCC("SLSD"), // FONV - SUB_SNAM = fourCC("SNAM"), - SUB_SNDD = fourCC("SNDD"), - SUB_SNDX = fourCC("SNDX"), - SUB_SNMV = fourCC("SNMV"), - SUB_SOFT = fourCC("SOFT"), - SUB_SOUL = fourCC("SOUL"), - SUB_SPCT = fourCC("SPCT"), - SUB_SPED = fourCC("SPED"), - SUB_SPIT = fourCC("SPIT"), - SUB_SPLO = fourCC("SPLO"), - SUB_SPMV = fourCC("SPMV"), // TES5 - SUB_SPOR = fourCC("SPOR"), - SUB_SRAC = fourCC("SRAC"), // FO4 - SUB_SRAF = fourCC("SRAF"), // FO4 - SUB_SSPN = fourCC("SSPN"), // FO4 - SUB_STCP = fourCC("STCP"), // FO4 - SUB_STKD = fourCC("STKD"), // FO4 - SUB_STOL = fourCC("STOL"), // TES5 - SUB_STOP = fourCC("STOP"), // FO4 - SUB_STSC = fourCC("STSC"), // FO4 - SUB_SWMV = fourCC("SWMV"), - SUB_TCFU = fourCC("TCFU"), // FONV - SUB_TCLF = fourCC("TCLF"), - SUB_TCLT = fourCC("TCLT"), - SUB_TDUM = fourCC("TDUM"), // FONV - SUB_TEND = fourCC("TEND"), // FO4 - SUB_TETI = fourCC("TETI"), // FO4 - SUB_TIAS = fourCC("TIAS"), - SUB_TIFC = fourCC("TIFC"), // TES5 - SUB_TINC = fourCC("TINC"), - SUB_TIND = fourCC("TIND"), - SUB_TINI = fourCC("TINI"), - SUB_TINL = fourCC("TINL"), - SUB_TINP = fourCC("TINP"), - SUB_TINT = fourCC("TINT"), - SUB_TINV = fourCC("TINV"), - SUB_TIQS = fourCC("TIQS"), // FO4 - SUB_TIRS = fourCC("TIRS"), - SUB_TNAM = fourCC("TNAM"), - SUB_TPIC = fourCC("TPIC"), - SUB_TPLT = fourCC("TPLT"), - SUB_TPTA = fourCC("TPTA"), // FO4 - SUB_TRDA = fourCC("TRDA"), // FO4 - SUB_TRDT = fourCC("TRDT"), - SUB_TSCE = fourCC("TSCE"), // FO4 - SUB_TTEB = fourCC("TTEB"), // FO4 - SUB_TTEC = fourCC("TTEC"), // FO4 - SUB_TTED = fourCC("TTED"), // FO4 - SUB_TTEF = fourCC("TTEF"), // FO4 - SUB_TTET = fourCC("TTET"), // FO4 - SUB_TTGE = fourCC("TTGE"), // FO4 - SUB_TTGP = fourCC("TTGP"), // FO4 - SUB_TVDT = fourCC("TVDT"), - SUB_TWAT = fourCC("TWAT"), // TES5 - SUB_TX00 = fourCC("TX00"), - SUB_TX01 = fourCC("TX01"), - SUB_TX02 = fourCC("TX02"), - SUB_TX03 = fourCC("TX03"), - SUB_TX04 = fourCC("TX04"), - SUB_TX05 = fourCC("TX05"), - SUB_TX06 = fourCC("TX06"), - SUB_TX07 = fourCC("TX07"), - SUB_UNAM = fourCC("UNAM"), - SUB_UNES = fourCC("UNES"), - SUB_UNWP = fourCC("UNWP"), // FO4 - SUB_VANM = fourCC("VANM"), // FONV - SUB_VATS = fourCC("VATS"), // FONV - SUB_VCLR = fourCC("VCLR"), - SUB_VENC = fourCC("VENC"), // TES5 - SUB_VEND = fourCC("VEND"), // TES5 - SUB_VENV = fourCC("VENV"), // TES5 - SUB_VHGT = fourCC("VHGT"), - SUB_VISI = fourCC("VISI"), // FO4 - SUB_VMAD = fourCC("VMAD"), - SUB_VNAM = fourCC("VNAM"), - SUB_VNML = fourCC("VNML"), - SUB_VTCK = fourCC("VTCK"), - SUB_VTEX = fourCC("VTEX"), - SUB_VTXT = fourCC("VTXT"), - SUB_WAIT = fourCC("WAIT"), // TES5 - SUB_WAMD = fourCC("WAMD"), // FO4 - SUB_WBDT = fourCC("WBDT"), - SUB_WCTR = fourCC("WCTR"), - SUB_WGDR = fourCC("WGDR"), // FO4 - SUB_WKMV = fourCC("WKMV"), - SUB_WLEV = fourCC("WLEV"), // FO4 - SUB_WLST = fourCC("WLST"), - SUB_WMAP = fourCC("WMAP"), // FO4 - SUB_WMI1 = fourCC("WMI1"), // FONV - SUB_WMI2 = fourCC("WMI2"), // FONV - SUB_WMI3 = fourCC("WMI3"), // FONV - SUB_WMS1 = fourCC("WMS1"), // FONV - SUB_WMS2 = fourCC("WMS2"), // FONV - SUB_WNAM = fourCC("WNAM"), - SUB_WNM1 = fourCC("WNM1"), // FONV - SUB_WNM2 = fourCC("WNM2"), // FONV - SUB_WNM3 = fourCC("WNM3"), // FONV - SUB_WNM4 = fourCC("WNM4"), // FONV - SUB_WNM5 = fourCC("WNM5"), // FONV - SUB_WNM6 = fourCC("WNM6"), // FONV - SUB_WNM7 = fourCC("WNM7"), // FONV - SUB_WZMD = fourCC("WZMD"), // FO4 - SUB_XACT = fourCC("XACT"), - SUB_XALP = fourCC("XALP"), - SUB_XAMC = fourCC("XAMC"), // FO3 - SUB_XAMT = fourCC("XAMT"), // FO3 - SUB_XAPD = fourCC("XAPD"), - SUB_XAPR = fourCC("XAPR"), - SUB_XASP = fourCC("XASP"), // FO4 - SUB_XATO = fourCC("XATO"), // FONV - SUB_XATP = fourCC("XATP"), // FO4 - SUB_XATR = fourCC("XATR"), - SUB_XBSD = fourCC("XBSD"), // FO4 - SUB_XCAS = fourCC("XCAS"), - SUB_XCCM = fourCC("XCCM"), - SUB_XCCP = fourCC("XCCP"), - SUB_XCET = fourCC("XCET"), // FO3 - SUB_XCGD = fourCC("XCGD"), - SUB_XCHG = fourCC("XCHG"), // thievery.exp - SUB_XCIM = fourCC("XCIM"), - SUB_XCLC = fourCC("XCLC"), - SUB_XCLL = fourCC("XCLL"), - SUB_XCLP = fourCC("XCLP"), // FO3 - SUB_XCLR = fourCC("XCLR"), - SUB_XCLW = fourCC("XCLW"), - SUB_XCMO = fourCC("XCMO"), - SUB_XCMT = fourCC("XCMT"), // TES4 only? - SUB_XCNT = fourCC("XCNT"), - SUB_XCRI = fourCC("XCRI"), // FO4 - SUB_XCVL = fourCC("XCVL"), - SUB_XCVR = fourCC("XCVR"), - SUB_XCWT = fourCC("XCWT"), - SUB_XCZA = fourCC("XCZA"), - SUB_XCZC = fourCC("XCZC"), - SUB_XCZR = fourCC("XCZR"), // TES5 - SUB_XDCR = fourCC("XDCR"), // FO3 - SUB_XEMI = fourCC("XEMI"), - SUB_XESP = fourCC("XESP"), - SUB_XEZN = fourCC("XEZN"), - SUB_XFVC = fourCC("XFVC"), - SUB_XGDR = fourCC("XGDR"), // FO4 - SUB_XGLB = fourCC("XGLB"), - SUB_XHLP = fourCC("XHLP"), // FO3 - SUB_XHLT = fourCC("XHLT"), // Unofficial Oblivion Patch - SUB_XHOR = fourCC("XHOR"), - SUB_XHRS = fourCC("XHRS"), - SUB_XHTW = fourCC("XHTW"), - SUB_XIBS = fourCC("XIBS"), // FO3 - SUB_XILL = fourCC("XILL"), - SUB_XILW = fourCC("XILW"), // FO4 - SUB_XIS2 = fourCC("XIS2"), - SUB_XLCM = fourCC("XLCM"), - SUB_XLCN = fourCC("XLCN"), - SUB_XLIB = fourCC("XLIB"), - SUB_XLIG = fourCC("XLIG"), - SUB_XLKR = fourCC("XLKR"), - SUB_XLKT = fourCC("XLKT"), // FO4 - SUB_XLOC = fourCC("XLOC"), - SUB_XLOD = fourCC("XLOD"), - SUB_XLRL = fourCC("XLRL"), - SUB_XLRM = fourCC("XLRM"), - SUB_XLRT = fourCC("XLRT"), - SUB_XLTW = fourCC("XLTW"), - SUB_XLYR = fourCC("XLYR"), // FO4 - SUB_XMBO = fourCC("XMBO"), - SUB_XMBP = fourCC("XMBP"), - SUB_XMBR = fourCC("XMBR"), - SUB_XMRC = fourCC("XMRC"), - SUB_XMRK = fourCC("XMRK"), - SUB_XMSP = fourCC("XMSP"), // FO4 - SUB_XNAM = fourCC("XNAM"), - SUB_XNDP = fourCC("XNDP"), - SUB_XOCP = fourCC("XOCP"), - SUB_XORD = fourCC("XORD"), // FO3 - SUB_XOWN = fourCC("XOWN"), - SUB_XPCI = fourCC("XPCI"), - SUB_XPDD = fourCC("XPDD"), // FO4 - SUB_XPLK = fourCC("XPLK"), // FO4 - SUB_XPOD = fourCC("XPOD"), - SUB_XPPA = fourCC("XPPA"), - SUB_XPRD = fourCC("XPRD"), - SUB_XPRI = fourCC("XPRI"), // FO4 - SUB_XPRM = fourCC("XPRM"), - SUB_XPTL = fourCC("XPTL"), - SUB_XPWR = fourCC("XPWR"), - SUB_XRAD = fourCC("XRAD"), // FO3 - SUB_XRDO = fourCC("XRDO"), // FO3 - SUB_XRDS = fourCC("XRDS"), - SUB_XRFG = fourCC("XRFG"), // FO4 - SUB_XRGB = fourCC("XRGB"), - SUB_XRGD = fourCC("XRGD"), - SUB_XRMR = fourCC("XRMR"), - SUB_XRNK = fourCC("XRNK"), // TES4 only? - SUB_XRTM = fourCC("XRTM"), - SUB_XSCL = fourCC("XSCL"), - SUB_XSED = fourCC("XSED"), - SUB_XSPC = fourCC("XSPC"), - SUB_XSRD = fourCC("XSRD"), // FONV - SUB_XSRF = fourCC("XSRF"), // FONV - SUB_XTEL = fourCC("XTEL"), - SUB_XTNM = fourCC("XTNM"), - SUB_XTRG = fourCC("XTRG"), - SUB_XTRI = fourCC("XTRI"), - SUB_XWCN = fourCC("XWCN"), - SUB_XWCS = fourCC("XWCS"), - SUB_XWCU = fourCC("XWCU"), - SUB_XWEM = fourCC("XWEM"), - SUB_XWPG = fourCC("XWPG"), // FO4 - SUB_XWPN = fourCC("XWPN"), // FO4 - SUB_XXXX = fourCC("XXXX"), - SUB_YNAM = fourCC("YNAM"), - SUB_ZNAM = fourCC("ZNAM"), - }; - // Based on http://www.uesp.net/wiki/Tes5Mod:Mod_File_Format#Records enum RecordFlag { diff --git a/components/esm4/loadachr.cpp b/components/esm4/loadachr.cpp index dc181dda4b..6ccdc0a8c7 100644 --- a/components/esm4/loadachr.cpp +++ b/components/esm4/loadachr.cpp @@ -42,22 +42,22 @@ void ESM4::ActorCharacter::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_FULL: + case ESM::fourCC("FULL"): reader.getZString(mFullName); break; - case ESM4::SUB_NAME: + case ESM::fourCC("NAME"): reader.getFormId(mBaseObj); break; - case ESM4::SUB_DATA: + case ESM::fourCC("DATA"): reader.get(mPos); break; - case ESM4::SUB_XSCL: + case ESM::fourCC("XSCL"): reader.get(mScale); break; - case ESM4::SUB_XOWN: + case ESM::fourCC("XOWN"): { switch (subHdr.dataSize) { @@ -78,57 +78,57 @@ void ESM4::ActorCharacter::load(ESM4::Reader& reader) } break; } - case ESM4::SUB_XESP: + case ESM::fourCC("XESP"): reader.getFormId(mEsp.parent); reader.get(mEsp.flags); break; - case ESM4::SUB_XCNT: + case ESM::fourCC("XCNT"): { reader.get(mCount); break; } - case ESM4::SUB_XRGD: // ragdoll - case ESM4::SUB_XRGB: // ragdoll biped - case ESM4::SUB_XHRS: // horse formId - case ESM4::SUB_XMRC: // merchant container formId + case ESM::fourCC("XRGD"): // ragdoll + case ESM::fourCC("XRGB"): // ragdoll biped + case ESM::fourCC("XHRS"): // horse formId + case ESM::fourCC("XMRC"): // merchant container formId // TES5 - case ESM4::SUB_XAPD: // activation parent - case ESM4::SUB_XAPR: // active parent - case ESM4::SUB_XEZN: // encounter zone - case ESM4::SUB_XHOR: - case ESM4::SUB_XLCM: // levelled creature - case ESM4::SUB_XLCN: // location - case ESM4::SUB_XLKR: // location route? - case ESM4::SUB_XLRT: // location type + case ESM::fourCC("XAPD"): // activation parent + case ESM::fourCC("XAPR"): // active parent + case ESM::fourCC("XEZN"): // encounter zone + case ESM::fourCC("XHOR"): + case ESM::fourCC("XLCM"): // levelled creature + case ESM::fourCC("XLCN"): // location + case ESM::fourCC("XLKR"): // location route? + case ESM::fourCC("XLRT"): // location type // - case ESM4::SUB_XPRD: - case ESM4::SUB_XPPA: - case ESM4::SUB_INAM: - case ESM4::SUB_PDTO: + case ESM::fourCC("XPRD"): + case ESM::fourCC("XPPA"): + case ESM::fourCC("INAM"): + case ESM::fourCC("PDTO"): // - case ESM4::SUB_XIS2: - case ESM4::SUB_XPCI: // formId - case ESM4::SUB_XLOD: - case ESM4::SUB_VMAD: - case ESM4::SUB_XLRL: // Unofficial Skyrim Patch - case ESM4::SUB_XRDS: // FO3 - case ESM4::SUB_XIBS: // FO3 - case ESM4::SUB_SCHR: // FO3 - case ESM4::SUB_TNAM: // FO3 - case ESM4::SUB_XATO: // FONV - case ESM4::SUB_MNAM: // FO4 - case ESM4::SUB_XATP: // FO4 - case ESM4::SUB_XEMI: // FO4 - case ESM4::SUB_XFVC: // FO4 - case ESM4::SUB_XHLT: // FO4 - case ESM4::SUB_XHTW: // FO4 - case ESM4::SUB_XLKT: // FO4 - case ESM4::SUB_XLYR: // FO4 - case ESM4::SUB_XMBR: // FO4 - case ESM4::SUB_XMSP: // FO4 - case ESM4::SUB_XPLK: // FO4 - case ESM4::SUB_XRFG: // FO4 - case ESM4::SUB_XRNK: // FO4 + case ESM::fourCC("XIS2"): + case ESM::fourCC("XPCI"): // formId + case ESM::fourCC("XLOD"): + case ESM::fourCC("VMAD"): + case ESM::fourCC("XLRL"): // Unofficial Skyrim Patch + case ESM::fourCC("XRDS"): // FO3 + case ESM::fourCC("XIBS"): // FO3 + case ESM::fourCC("SCHR"): // FO3 + case ESM::fourCC("TNAM"): // FO3 + case ESM::fourCC("XATO"): // FONV + case ESM::fourCC("MNAM"): // FO4 + case ESM::fourCC("XATP"): // FO4 + case ESM::fourCC("XEMI"): // FO4 + case ESM::fourCC("XFVC"): // FO4 + case ESM::fourCC("XHLT"): // FO4 + case ESM::fourCC("XHTW"): // FO4 + case ESM::fourCC("XLKT"): // FO4 + case ESM::fourCC("XLYR"): // FO4 + case ESM::fourCC("XMBR"): // FO4 + case ESM::fourCC("XMSP"): // FO4 + case ESM::fourCC("XPLK"): // FO4 + case ESM::fourCC("XRFG"): // FO4 + case ESM::fourCC("XRNK"): // FO4 reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadacti.cpp b/components/esm4/loadacti.cpp index 74eaff2dab..0609e4e1bf 100644 --- a/components/esm4/loadacti.cpp +++ b/components/esm4/loadacti.cpp @@ -41,69 +41,69 @@ void ESM4::Activator::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_FULL: + case ESM::fourCC("FULL"): reader.getLocalizedString(mFullName); break; - case ESM4::SUB_MODL: + case ESM::fourCC("MODL"): reader.getZString(mModel); break; - case ESM4::SUB_SCRI: + case ESM::fourCC("SCRI"): reader.getFormId(mScriptId); break; - case ESM4::SUB_SNAM: + case ESM::fourCC("SNAM"): reader.getFormId(mLoopingSound); break; - case ESM4::SUB_VNAM: + case ESM::fourCC("VNAM"): reader.getFormId(mActivationSound); break; - case ESM4::SUB_MODB: + case ESM::fourCC("MODB"): reader.get(mBoundRadius); break; - case ESM4::SUB_INAM: + case ESM::fourCC("INAM"): reader.getFormId(mRadioTemplate); break; // FONV - case ESM4::SUB_RNAM: + case ESM::fourCC("RNAM"): reader.getFormId(mRadioStation); break; - case ESM4::SUB_XATO: + case ESM::fourCC("XATO"): reader.getZString(mActivationPrompt); break; // FONV - case ESM4::SUB_MODT: // Model data - case ESM4::SUB_MODC: - case ESM4::SUB_MODS: - case ESM4::SUB_MODF: // Model data end - case ESM4::SUB_DAMC: // Destructible - case ESM4::SUB_DEST: - case ESM4::SUB_DMDC: - case ESM4::SUB_DMDL: - case ESM4::SUB_DMDT: - case ESM4::SUB_DMDS: - case ESM4::SUB_DSTA: - case ESM4::SUB_DSTD: - case ESM4::SUB_DSTF: // Destructible end - case ESM4::SUB_FNAM: - case ESM4::SUB_KNAM: - case ESM4::SUB_KSIZ: - case ESM4::SUB_KWDA: - case ESM4::SUB_OBND: - case ESM4::SUB_PNAM: - case ESM4::SUB_VMAD: - case ESM4::SUB_WNAM: - case ESM4::SUB_CTDA: - case ESM4::SUB_CIS1: - case ESM4::SUB_CIS2: - case ESM4::SUB_CITC: - case ESM4::SUB_NVNM: - case ESM4::SUB_ATTX: // FO4 - case ESM4::SUB_FTYP: // FO4 - case ESM4::SUB_NTRM: // FO4 - case ESM4::SUB_PTRN: // FO4 - case ESM4::SUB_PRPS: // FO4 - case ESM4::SUB_RADR: // FO4 - case ESM4::SUB_STCP: // FO4 + case ESM::fourCC("MODT"): // Model data + case ESM::fourCC("MODC"): + case ESM::fourCC("MODS"): + case ESM::fourCC("MODF"): // Model data end + case ESM::fourCC("DAMC"): // Destructible + case ESM::fourCC("DEST"): + case ESM::fourCC("DMDC"): + case ESM::fourCC("DMDL"): + case ESM::fourCC("DMDT"): + case ESM::fourCC("DMDS"): + case ESM::fourCC("DSTA"): + case ESM::fourCC("DSTD"): + case ESM::fourCC("DSTF"): // Destructible end + case ESM::fourCC("FNAM"): + case ESM::fourCC("KNAM"): + case ESM::fourCC("KSIZ"): + case ESM::fourCC("KWDA"): + case ESM::fourCC("OBND"): + case ESM::fourCC("PNAM"): + case ESM::fourCC("VMAD"): + case ESM::fourCC("WNAM"): + case ESM::fourCC("CTDA"): + case ESM::fourCC("CIS1"): + case ESM::fourCC("CIS2"): + case ESM::fourCC("CITC"): + case ESM::fourCC("NVNM"): + case ESM::fourCC("ATTX"): // FO4 + case ESM::fourCC("FTYP"): // FO4 + case ESM::fourCC("NTRM"): // FO4 + case ESM::fourCC("PTRN"): // FO4 + case ESM::fourCC("PRPS"): // FO4 + case ESM::fourCC("RADR"): // FO4 + case ESM::fourCC("STCP"): // FO4 reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadalch.cpp b/components/esm4/loadalch.cpp index 1ecfda25e8..4a289ab760 100644 --- a/components/esm4/loadalch.cpp +++ b/components/esm4/loadalch.cpp @@ -42,35 +42,35 @@ void ESM4::Potion::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_FULL: + case ESM::fourCC("FULL"): reader.getLocalizedString(mFullName); break; - case ESM4::SUB_MODL: + case ESM::fourCC("MODL"): reader.getZString(mModel); break; - case ESM4::SUB_ICON: + case ESM::fourCC("ICON"): reader.getZString(mIcon); break; - case ESM4::SUB_MICO: + case ESM::fourCC("MICO"): reader.getZString(mMiniIcon); break; // FO3 - case ESM4::SUB_DATA: + case ESM::fourCC("DATA"): reader.get(mData); break; - case ESM4::SUB_SCRI: + case ESM::fourCC("SCRI"): reader.getFormId(mScriptId); break; - case ESM4::SUB_MODB: + case ESM::fourCC("MODB"): reader.get(mBoundRadius); break; - case ESM4::SUB_SCIT: + case ESM::fourCC("SCIT"): reader.get(mEffect); reader.adjustFormId(mEffect.formId); break; - case ESM4::SUB_ENIT: + case ESM::fourCC("ENIT"): if (subHdr.dataSize == 8) // TES4 { reader.get(&mItem, 8); @@ -82,36 +82,36 @@ void ESM4::Potion::load(ESM4::Reader& reader) reader.adjustFormId(mItem.withdrawl); reader.adjustFormId(mItem.sound); break; - case ESM4::SUB_YNAM: + case ESM::fourCC("YNAM"): reader.getFormId(mPickUpSound); break; - case ESM4::SUB_ZNAM: + case ESM::fourCC("ZNAM"): reader.getFormId(mDropSound); break; - case ESM4::SUB_MODT: // Model data - case ESM4::SUB_MODC: - case ESM4::SUB_MODS: - case ESM4::SUB_MODF: // Model data end - case ESM4::SUB_EFID: - case ESM4::SUB_EFIT: - case ESM4::SUB_CTDA: - case ESM4::SUB_KSIZ: - case ESM4::SUB_KWDA: - case ESM4::SUB_OBND: - case ESM4::SUB_ETYP: // FO3 - case ESM4::SUB_DESC: - case ESM4::SUB_DAMC: // Destructible - case ESM4::SUB_DEST: - case ESM4::SUB_DMDC: - case ESM4::SUB_DMDL: - case ESM4::SUB_DMDT: - case ESM4::SUB_DMDS: - case ESM4::SUB_DSTA: - case ESM4::SUB_DSTD: - case ESM4::SUB_DSTF: // Destructible end - case ESM4::SUB_DNAM: // FO4 - case ESM4::SUB_PTRN: // FO4 - case ESM4::SUB_CUSD: // FO4 + case ESM::fourCC("MODT"): // Model data + case ESM::fourCC("MODC"): + case ESM::fourCC("MODS"): + case ESM::fourCC("MODF"): // Model data end + case ESM::fourCC("EFID"): + case ESM::fourCC("EFIT"): + case ESM::fourCC("CTDA"): + case ESM::fourCC("KSIZ"): + case ESM::fourCC("KWDA"): + case ESM::fourCC("OBND"): + case ESM::fourCC("ETYP"): // FO3 + case ESM::fourCC("DESC"): + case ESM::fourCC("DAMC"): // Destructible + case ESM::fourCC("DEST"): + case ESM::fourCC("DMDC"): + case ESM::fourCC("DMDL"): + case ESM::fourCC("DMDT"): + case ESM::fourCC("DMDS"): + case ESM::fourCC("DSTA"): + case ESM::fourCC("DSTD"): + case ESM::fourCC("DSTF"): // Destructible end + case ESM::fourCC("DNAM"): // FO4 + case ESM::fourCC("PTRN"): // FO4 + case ESM::fourCC("CUSD"): // FO4 reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadaloc.cpp b/components/esm4/loadaloc.cpp index 690684df7c..1b3bfd7e5b 100644 --- a/components/esm4/loadaloc.cpp +++ b/components/esm4/loadaloc.cpp @@ -42,34 +42,34 @@ void ESM4::MediaLocationController::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_FULL: + case ESM::fourCC("FULL"): reader.getZString(mFullName); break; - case ESM4::SUB_GNAM: + case ESM::fourCC("GNAM"): reader.getFormId(mBattleSets.emplace_back()); break; - case ESM4::SUB_LNAM: + case ESM::fourCC("LNAM"): reader.getFormId(mLocationSets.emplace_back()); break; - case ESM4::SUB_YNAM: + case ESM::fourCC("YNAM"): reader.getFormId(mEnemySets.emplace_back()); break; - case ESM4::SUB_HNAM: + case ESM::fourCC("HNAM"): reader.getFormId(mNeutralSets.emplace_back()); break; - case ESM4::SUB_XNAM: + case ESM::fourCC("XNAM"): reader.getFormId(mFriendSets.emplace_back()); break; - case ESM4::SUB_ZNAM: + case ESM::fourCC("ZNAM"): reader.getFormId(mAllySets.emplace_back()); break; - case ESM4::SUB_RNAM: + case ESM::fourCC("RNAM"): reader.getFormId(mConditionalFaction); break; - case ESM4::SUB_NAM1: + case ESM::fourCC("NAM1"): { reader.get(mMediaFlags); std::uint8_t flags = mMediaFlags.loopingOptions; @@ -77,21 +77,21 @@ void ESM4::MediaLocationController::load(ESM4::Reader& reader) mMediaFlags.factionNotFound = flags & 0x0F; // WARN: overwriting data break; } - case ESM4::SUB_NAM4: + case ESM::fourCC("NAM4"): reader.get(mLocationDelay); break; - case ESM4::SUB_NAM7: + case ESM::fourCC("NAM7"): reader.get(mRetriggerDelay); break; - case ESM4::SUB_NAM5: + case ESM::fourCC("NAM5"): reader.get(mDayStart); break; - case ESM4::SUB_NAM6: + case ESM::fourCC("NAM6"): reader.get(mNightStart); break; - case ESM4::SUB_NAM2: // always 0? 4 bytes - case ESM4::SUB_NAM3: // always 0? 4 bytes - case ESM4::SUB_FNAM: // always 0? 4 bytes + case ESM::fourCC("NAM2"): // always 0? 4 bytes + case ESM::fourCC("NAM3"): // always 0? 4 bytes + case ESM::fourCC("FNAM"): // always 0? 4 bytes { #if 0 std::vector mDataBuf(subHdr.dataSize); diff --git a/components/esm4/loadammo.cpp b/components/esm4/loadammo.cpp index 8c5bc45c85..39c42fc83f 100644 --- a/components/esm4/loadammo.cpp +++ b/components/esm4/loadammo.cpp @@ -41,13 +41,13 @@ void ESM4::Ammunition::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_FULL: + case ESM::fourCC("FULL"): reader.getLocalizedString(mFullName); break; - case ESM4::SUB_DATA: + case ESM::fourCC("DATA"): switch (subHdr.dataSize) { case 18: // TES4 @@ -86,7 +86,7 @@ void ESM4::Ammunition::load(ESM4::Reader& reader) break; } break; - case ESM4::SUB_DAT2: + case ESM::fourCC("DAT2"): if (subHdr.dataSize == 20) { reader.get(mData.mProjPerShot); @@ -100,71 +100,71 @@ void ESM4::Ammunition::load(ESM4::Reader& reader) reader.skipSubRecordData(); } break; - case ESM4::SUB_DNAM: + case ESM::fourCC("DNAM"): reader.getFormId(mData.mProjectile); reader.get(mData.mFlags); mData.mFlags &= 0xFF; reader.get(mData.mDamage); reader.get(mData.mHealth); break; - case ESM4::SUB_ICON: + case ESM::fourCC("ICON"): reader.getZString(mIcon); break; - case ESM4::SUB_MICO: + case ESM::fourCC("MICO"): reader.getZString(mMiniIcon); break; // FO3 - case ESM4::SUB_MODL: + case ESM::fourCC("MODL"): reader.getZString(mModel); break; - case ESM4::SUB_ANAM: + case ESM::fourCC("ANAM"): reader.get(mEnchantmentPoints); break; - case ESM4::SUB_ENAM: + case ESM::fourCC("ENAM"): reader.getFormId(mEnchantment); break; - case ESM4::SUB_MODB: + case ESM::fourCC("MODB"): reader.get(mBoundRadius); break; - case ESM4::SUB_DESC: + case ESM::fourCC("DESC"): reader.getLocalizedString(mText); break; - case ESM4::SUB_YNAM: + case ESM::fourCC("YNAM"): reader.getFormId(mPickUpSound); break; - case ESM4::SUB_ZNAM: + case ESM::fourCC("ZNAM"): reader.getFormId(mDropSound); break; - case ESM4::SUB_ONAM: + case ESM::fourCC("ONAM"): reader.getLocalizedString(mShortName); break; - case ESM4::SUB_QNAM: // FONV + case ESM::fourCC("QNAM"): // FONV reader.getLocalizedString(mAbbrev); break; - case ESM4::SUB_RCIL: + case ESM::fourCC("RCIL"): reader.getFormId(mAmmoEffects.emplace_back()); break; - case ESM4::SUB_SCRI: + case ESM::fourCC("SCRI"): reader.getFormId(mScript); break; - case ESM4::SUB_MODT: // Model data - case ESM4::SUB_MODC: - case ESM4::SUB_MODS: - case ESM4::SUB_MODF: // Model data end - case ESM4::SUB_OBND: - case ESM4::SUB_KSIZ: - case ESM4::SUB_KWDA: - case ESM4::SUB_DAMC: // Destructible - case ESM4::SUB_DEST: - case ESM4::SUB_DMDC: - case ESM4::SUB_DMDL: - case ESM4::SUB_DMDT: - case ESM4::SUB_DMDS: - case ESM4::SUB_DSTA: - case ESM4::SUB_DSTD: - case ESM4::SUB_DSTF: // Destructible end - case ESM4::SUB_PTRN: // FO4 - case ESM4::SUB_NAM1: // FO4 casing model data - case ESM4::SUB_NAM2: // + case ESM::fourCC("MODT"): // Model data + case ESM::fourCC("MODC"): + case ESM::fourCC("MODS"): + case ESM::fourCC("MODF"): // Model data end + case ESM::fourCC("OBND"): + case ESM::fourCC("KSIZ"): + case ESM::fourCC("KWDA"): + case ESM::fourCC("DAMC"): // Destructible + case ESM::fourCC("DEST"): + case ESM::fourCC("DMDC"): + case ESM::fourCC("DMDL"): + case ESM::fourCC("DMDT"): + case ESM::fourCC("DMDS"): + case ESM::fourCC("DSTA"): + case ESM::fourCC("DSTD"): + case ESM::fourCC("DSTF"): // Destructible end + case ESM::fourCC("PTRN"): // FO4 + case ESM::fourCC("NAM1"): // FO4 casing model data + case ESM::fourCC("NAM2"): // reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadanio.cpp b/components/esm4/loadanio.cpp index fa440f5ace..a8156eef2b 100644 --- a/components/esm4/loadanio.cpp +++ b/components/esm4/loadanio.cpp @@ -41,25 +41,25 @@ void ESM4::AnimObject::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_MODL: + case ESM::fourCC("MODL"): reader.getZString(mModel); break; - case ESM4::SUB_BNAM: + case ESM::fourCC("BNAM"): reader.getZString(mUnloadEvent); break; - case ESM4::SUB_DATA: + case ESM::fourCC("DATA"): reader.getFormId(mIdleAnim); break; - case ESM4::SUB_MODB: + case ESM::fourCC("MODB"): reader.get(mBoundRadius); break; - case ESM4::SUB_MODT: // Model data - case ESM4::SUB_MODC: - case ESM4::SUB_MODS: - case ESM4::SUB_MODF: // Model data end + case ESM::fourCC("MODT"): // Model data + case ESM::fourCC("MODC"): + case ESM::fourCC("MODS"): + case ESM::fourCC("MODF"): // Model data end reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadappa.cpp b/components/esm4/loadappa.cpp index 45e12739b9..8c74d020a6 100644 --- a/components/esm4/loadappa.cpp +++ b/components/esm4/loadappa.cpp @@ -41,13 +41,13 @@ void ESM4::Apparatus::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_FULL: + case ESM::fourCC("FULL"): reader.getLocalizedString(mFullName); break; - case ESM4::SUB_DATA: + case ESM::fourCC("DATA"): if (reader.esmVersion() == ESM::VER_094 || reader.esmVersion() == ESM::VER_170) { reader.get(mData.value); @@ -61,24 +61,24 @@ void ESM4::Apparatus::load(ESM4::Reader& reader) reader.get(mData.quality); } break; - case ESM4::SUB_ICON: + case ESM::fourCC("ICON"): reader.getZString(mIcon); break; - case ESM4::SUB_MODL: + case ESM::fourCC("MODL"): reader.getZString(mModel); break; - case ESM4::SUB_SCRI: + case ESM::fourCC("SCRI"): reader.getFormId(mScriptId); break; - case ESM4::SUB_MODB: + case ESM::fourCC("MODB"): reader.get(mBoundRadius); break; - case ESM4::SUB_DESC: + case ESM::fourCC("DESC"): reader.getLocalizedString(mText); break; - case ESM4::SUB_MODT: - case ESM4::SUB_OBND: - case ESM4::SUB_QUAL: + case ESM::fourCC("MODT"): + case ESM::fourCC("OBND"): + case ESM::fourCC("QUAL"): reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadarma.cpp b/components/esm4/loadarma.cpp index 2bb6240ee8..a1a1a10845 100644 --- a/components/esm4/loadarma.cpp +++ b/components/esm4/loadarma.cpp @@ -43,39 +43,39 @@ void ESM4::ArmorAddon::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_MOD2: + case ESM::fourCC("MOD2"): reader.getZString(mModelMale); break; - case ESM4::SUB_MOD3: + case ESM::fourCC("MOD3"): reader.getZString(mModelFemale); break; - case ESM4::SUB_MOD4: - case ESM4::SUB_MOD5: + case ESM::fourCC("MOD4"): + case ESM::fourCC("MOD5"): { std::string model; reader.getZString(model); break; } - case ESM4::SUB_NAM0: + case ESM::fourCC("NAM0"): reader.getFormId(mTextureMale); break; - case ESM4::SUB_NAM1: + case ESM::fourCC("NAM1"): reader.getFormId(mTextureFemale); break; - case ESM4::SUB_RNAM: + case ESM::fourCC("RNAM"): reader.getFormId(mRacePrimary); break; - case ESM4::SUB_MODL: + case ESM::fourCC("MODL"): if ((esmVer == ESM::VER_094 || esmVer == ESM::VER_170) && subHdr.dataSize == 4) // TES5 reader.getFormId(mRaces.emplace_back()); else reader.skipSubRecordData(); // FIXME: this should be mModelMale for FO3/FONV break; - case ESM4::SUB_BODT: // body template + case ESM::fourCC("BODT"): // body template reader.get(mBodyTemplate.bodyPart); reader.get(mBodyTemplate.flags); reader.get(mBodyTemplate.unknown1); // probably padding @@ -83,7 +83,7 @@ void ESM4::ArmorAddon::load(ESM4::Reader& reader) reader.get(mBodyTemplate.unknown3); // probably padding reader.get(mBodyTemplate.type); break; - case ESM4::SUB_BOD2: // TES5+ + case ESM::fourCC("BOD2"): // TES5+ reader.get(mBodyTemplate.bodyPart); mBodyTemplate.flags = 0; mBodyTemplate.unknown1 = 0; // probably padding @@ -94,7 +94,7 @@ void ESM4::ArmorAddon::load(ESM4::Reader& reader) reader.get(mBodyTemplate.type); break; - case ESM4::SUB_DNAM: + case ESM::fourCC("DNAM"): if (subHdr.dataSize == 12) { std::uint16_t unknownInt16; @@ -111,40 +111,40 @@ void ESM4::ArmorAddon::load(ESM4::Reader& reader) else reader.skipSubRecordData(); break; - case ESM4::SUB_MO2T: // FIXME: should group with MOD2 - case ESM4::SUB_MO2S: // FIXME: should group with MOD2 - case ESM4::SUB_MO2C: // FIXME: should group with MOD2 - case ESM4::SUB_MO2F: // FIXME: should group with MOD2 - case ESM4::SUB_MO3T: // FIXME: should group with MOD3 - case ESM4::SUB_MO3S: // FIXME: should group with MOD3 - case ESM4::SUB_MO3C: // FIXME: should group with MOD3 - case ESM4::SUB_MO3F: // FIXME: should group with MOD3 - case ESM4::SUB_MOSD: // FO3 // FIXME: should group with MOD3 - case ESM4::SUB_MO4T: // FIXME: should group with MOD4 - case ESM4::SUB_MO4S: // FIXME: should group with MOD4 - case ESM4::SUB_MO4C: // FIXME: should group with MOD4 - case ESM4::SUB_MO4F: // FIXME: should group with MOD4 - case ESM4::SUB_MO5T: - case ESM4::SUB_MO5S: - case ESM4::SUB_MO5C: - case ESM4::SUB_MO5F: - case ESM4::SUB_NAM2: // txst formid male - case ESM4::SUB_NAM3: // txst formid female - case ESM4::SUB_SNDD: // footset sound formid - case ESM4::SUB_BMDT: // FO3 - case ESM4::SUB_DATA: // FO3 - case ESM4::SUB_ETYP: // FO3 - case ESM4::SUB_FULL: // FO3 - case ESM4::SUB_ICO2: // FO3 // female - case ESM4::SUB_ICON: // FO3 // male - case ESM4::SUB_MODT: // FO3 // FIXME: should group with MODL - case ESM4::SUB_MODS: // FO3 // FIXME: should group with MODL - case ESM4::SUB_MODD: // FO3 // FIXME: should group with MODL - case ESM4::SUB_OBND: // FO3 - case ESM4::SUB_BSMB: // FO4 - case ESM4::SUB_BSMP: // FO4 - case ESM4::SUB_BSMS: // FO4 - case ESM4::SUB_ONAM: // FO4 + case ESM::fourCC("MO2T"): // FIXME: should group with MOD2 + case ESM::fourCC("MO2S"): // FIXME: should group with MOD2 + case ESM::fourCC("MO2C"): // FIXME: should group with MOD2 + case ESM::fourCC("MO2F"): // FIXME: should group with MOD2 + case ESM::fourCC("MO3T"): // FIXME: should group with MOD3 + case ESM::fourCC("MO3S"): // FIXME: should group with MOD3 + case ESM::fourCC("MO3C"): // FIXME: should group with MOD3 + case ESM::fourCC("MO3F"): // FIXME: should group with MOD3 + case ESM::fourCC("MOSD"): // FO3 // FIXME: should group with MOD3 + case ESM::fourCC("MO4T"): // FIXME: should group with MOD4 + case ESM::fourCC("MO4S"): // FIXME: should group with MOD4 + case ESM::fourCC("MO4C"): // FIXME: should group with MOD4 + case ESM::fourCC("MO4F"): // FIXME: should group with MOD4 + case ESM::fourCC("MO5T"): + case ESM::fourCC("MO5S"): + case ESM::fourCC("MO5C"): + case ESM::fourCC("MO5F"): + case ESM::fourCC("NAM2"): // txst formid male + case ESM::fourCC("NAM3"): // txst formid female + case ESM::fourCC("SNDD"): // footset sound formid + case ESM::fourCC("BMDT"): // FO3 + case ESM::fourCC("DATA"): // FO3 + case ESM::fourCC("ETYP"): // FO3 + case ESM::fourCC("FULL"): // FO3 + case ESM::fourCC("ICO2"): // FO3 // female + case ESM::fourCC("ICON"): // FO3 // male + case ESM::fourCC("MODT"): // FO3 // FIXME: should group with MODL + case ESM::fourCC("MODS"): // FO3 // FIXME: should group with MODL + case ESM::fourCC("MODD"): // FO3 // FIXME: should group with MODL + case ESM::fourCC("OBND"): // FO3 + case ESM::fourCC("BSMB"): // FO4 + case ESM::fourCC("BSMP"): // FO4 + case ESM::fourCC("BSMS"): // FO4 + case ESM::fourCC("ONAM"): // FO4 reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadarmo.cpp b/components/esm4/loadarmo.cpp index 572cbd6ecd..dc926f7a01 100644 --- a/components/esm4/loadarmo.cpp +++ b/components/esm4/loadarmo.cpp @@ -41,13 +41,13 @@ void ESM4::Armor::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_FULL: + case ESM::fourCC("FULL"): reader.getLocalizedString(mFullName); break; - case ESM4::SUB_DATA: + case ESM::fourCC("DATA"): { switch (subHdr.dataSize) { @@ -69,12 +69,12 @@ void ESM4::Armor::load(ESM4::Reader& reader) } break; } - case ESM4::SUB_INDX: // FO4 + case ESM::fourCC("INDX"): // FO4 { reader.get(currentIndex); break; } - case ESM4::SUB_MODL: + case ESM::fourCC("MODL"): { if (subHdr.dataSize == 4) { @@ -97,28 +97,28 @@ void ESM4::Armor::load(ESM4::Reader& reader) break; } - case ESM4::SUB_MOD2: + case ESM::fourCC("MOD2"): reader.getZString(mModelMaleWorld); break; - case ESM4::SUB_MOD3: + case ESM::fourCC("MOD3"): reader.getZString(mModelFemale); break; - case ESM4::SUB_MOD4: + case ESM::fourCC("MOD4"): reader.getZString(mModelFemaleWorld); break; - case ESM4::SUB_ICON: + case ESM::fourCC("ICON"): reader.getZString(mIconMale); break; - case ESM4::SUB_MICO: + case ESM::fourCC("MICO"): reader.getZString(mMiniIconMale); break; - case ESM4::SUB_ICO2: + case ESM::fourCC("ICO2"): reader.getZString(mIconFemale); break; - case ESM4::SUB_MIC2: + case ESM::fourCC("MIC2"): reader.getZString(mMiniIconFemale); break; - case ESM4::SUB_BMDT: + case ESM::fourCC("BMDT"): if (subHdr.dataSize == 8) // FO3 { reader.get(mArmorFlags); @@ -133,7 +133,7 @@ void ESM4::Armor::load(ESM4::Reader& reader) mGeneralFlags |= TYPE_TES4; } break; - case ESM4::SUB_BODT: + case ESM::fourCC("BODT"): { reader.get(mArmorFlags); uint32_t flags = 0; @@ -146,7 +146,7 @@ void ESM4::Armor::load(ESM4::Reader& reader) mGeneralFlags |= TYPE_TES5; break; } - case ESM4::SUB_BOD2: + case ESM::fourCC("BOD2"): // FO4, TES5 if (subHdr.dataSize == 4 || subHdr.dataSize == 8) { @@ -163,75 +163,75 @@ void ESM4::Armor::load(ESM4::Reader& reader) reader.skipSubRecordData(); } break; - case ESM4::SUB_SCRI: + case ESM::fourCC("SCRI"): reader.getFormId(mScriptId); break; - case ESM4::SUB_ANAM: + case ESM::fourCC("ANAM"): reader.get(mEnchantmentPoints); break; - case ESM4::SUB_ENAM: + case ESM::fourCC("ENAM"): reader.getFormId(mEnchantment); break; - case ESM4::SUB_MODB: + case ESM::fourCC("MODB"): reader.get(mBoundRadius); break; - case ESM4::SUB_DESC: + case ESM::fourCC("DESC"): reader.getLocalizedString(mText); break; - case ESM4::SUB_YNAM: + case ESM::fourCC("YNAM"): reader.getFormId(mPickUpSound); break; - case ESM4::SUB_ZNAM: + case ESM::fourCC("ZNAM"): reader.getFormId(mDropSound); break; - case ESM4::SUB_MODT: - case ESM4::SUB_MO2B: - case ESM4::SUB_MO3B: - case ESM4::SUB_MO4B: - case ESM4::SUB_MO2T: - case ESM4::SUB_MO2S: - case ESM4::SUB_MO3T: - case ESM4::SUB_MO4T: - case ESM4::SUB_MO4S: - case ESM4::SUB_OBND: - case ESM4::SUB_RNAM: // race formid - case ESM4::SUB_KSIZ: - case ESM4::SUB_KWDA: - case ESM4::SUB_TNAM: - case ESM4::SUB_DNAM: - case ESM4::SUB_BAMT: - case ESM4::SUB_BIDS: - case ESM4::SUB_ETYP: - case ESM4::SUB_BMCT: - case ESM4::SUB_EAMT: - case ESM4::SUB_EITM: - case ESM4::SUB_VMAD: - case ESM4::SUB_REPL: // FO3 - case ESM4::SUB_BIPL: // FO3 - case ESM4::SUB_MODD: // FO3 - case ESM4::SUB_MOSD: // FO3 - case ESM4::SUB_MODS: // FO3 - case ESM4::SUB_MO3S: // FO3 - case ESM4::SUB_BNAM: // FONV - case ESM4::SUB_SNAM: // FONV - case ESM4::SUB_DAMC: // Destructible - case ESM4::SUB_DEST: - case ESM4::SUB_DMDC: - case ESM4::SUB_DMDL: - case ESM4::SUB_DMDT: - case ESM4::SUB_DMDS: - case ESM4::SUB_DSTA: - case ESM4::SUB_DSTD: - case ESM4::SUB_DSTF: // Destructible end - case ESM4::SUB_APPR: // FO4 - case ESM4::SUB_DAMA: // FO4 - case ESM4::SUB_FNAM: // FO4 - case ESM4::SUB_INRD: // FO4 - case ESM4::SUB_PTRN: // FO4 - case ESM4::SUB_OBTE: // FO4 object template start - case ESM4::SUB_OBTF: - case ESM4::SUB_OBTS: - case ESM4::SUB_STOP: // FO4 object template end + case ESM::fourCC("MODT"): + case ESM::fourCC("MO2B"): + case ESM::fourCC("MO3B"): + case ESM::fourCC("MO4B"): + case ESM::fourCC("MO2T"): + case ESM::fourCC("MO2S"): + case ESM::fourCC("MO3T"): + case ESM::fourCC("MO4T"): + case ESM::fourCC("MO4S"): + case ESM::fourCC("OBND"): + case ESM::fourCC("RNAM"): // race formid + case ESM::fourCC("KSIZ"): + case ESM::fourCC("KWDA"): + case ESM::fourCC("TNAM"): + case ESM::fourCC("DNAM"): + case ESM::fourCC("BAMT"): + case ESM::fourCC("BIDS"): + case ESM::fourCC("ETYP"): + case ESM::fourCC("BMCT"): + case ESM::fourCC("EAMT"): + case ESM::fourCC("EITM"): + case ESM::fourCC("VMAD"): + case ESM::fourCC("REPL"): // FO3 + case ESM::fourCC("BIPL"): // FO3 + case ESM::fourCC("MODD"): // FO3 + case ESM::fourCC("MOSD"): // FO3 + case ESM::fourCC("MODS"): // FO3 + case ESM::fourCC("MO3S"): // FO3 + case ESM::fourCC("BNAM"): // FONV + case ESM::fourCC("SNAM"): // FONV + case ESM::fourCC("DAMC"): // Destructible + case ESM::fourCC("DEST"): + case ESM::fourCC("DMDC"): + case ESM::fourCC("DMDL"): + case ESM::fourCC("DMDT"): + case ESM::fourCC("DMDS"): + case ESM::fourCC("DSTA"): + case ESM::fourCC("DSTD"): + case ESM::fourCC("DSTF"): // Destructible end + case ESM::fourCC("APPR"): // FO4 + case ESM::fourCC("DAMA"): // FO4 + case ESM::fourCC("FNAM"): // FO4 + case ESM::fourCC("INRD"): // FO4 + case ESM::fourCC("PTRN"): // FO4 + case ESM::fourCC("OBTE"): // FO4 object template start + case ESM::fourCC("OBTF"): + case ESM::fourCC("OBTS"): + case ESM::fourCC("STOP"): // FO4 object template end reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadaspc.cpp b/components/esm4/loadaspc.cpp index d79df9d8ef..e8fe9d3b34 100644 --- a/components/esm4/loadaspc.cpp +++ b/components/esm4/loadaspc.cpp @@ -41,35 +41,35 @@ void ESM4::AcousticSpace::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_ANAM: + case ESM::fourCC("ANAM"): reader.get(mEnvironmentType); break; - case ESM4::SUB_SNAM: + case ESM::fourCC("SNAM"): reader.getFormId(mAmbientLoopSounds.emplace_back()); break; - case ESM4::SUB_RDAT: + case ESM::fourCC("RDAT"): reader.getFormId(mSoundRegion); break; - case ESM4::SUB_INAM: + case ESM::fourCC("INAM"): reader.get(mIsInterior); break; - case ESM4::SUB_XTRI: + case ESM::fourCC("XTRI"): std::uint8_t isInterior; reader.get(isInterior); mIsInterior = isInterior; break; - case ESM4::SUB_WNAM: + case ESM::fourCC("WNAM"): { // usually 0 for FONV (maybe # of close Actors for Walla to trigger) (4 bytes) // Weather attenuation in FO4 (2 bytes) reader.skipSubRecordData(); break; } - case ESM4::SUB_BNAM: // TES5 reverb formid - case ESM4::SUB_OBND: + case ESM::fourCC("BNAM"): // TES5 reverb formid + case ESM::fourCC("OBND"): reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadbook.cpp b/components/esm4/loadbook.cpp index f2842e5313..cef942074a 100644 --- a/components/esm4/loadbook.cpp +++ b/components/esm4/loadbook.cpp @@ -42,16 +42,16 @@ void ESM4::Book::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_FULL: + case ESM::fourCC("FULL"): reader.getLocalizedString(mFullName); break; - case ESM4::SUB_DESC: + case ESM::fourCC("DESC"): reader.getLocalizedString(mText); break; - case ESM4::SUB_DATA: + case ESM::fourCC("DATA"): { switch (subHdr.dataSize) { @@ -82,53 +82,53 @@ void ESM4::Book::load(ESM4::Reader& reader) } break; } - case ESM4::SUB_ICON: + case ESM::fourCC("ICON"): reader.getZString(mIcon); break; - case ESM4::SUB_MODL: + case ESM::fourCC("MODL"): reader.getZString(mModel); break; - case ESM4::SUB_SCRI: + case ESM::fourCC("SCRI"): reader.getFormId(mScriptId); break; - case ESM4::SUB_ANAM: + case ESM::fourCC("ANAM"): reader.get(mEnchantmentPoints); break; - case ESM4::SUB_ENAM: + case ESM::fourCC("ENAM"): reader.getFormId(mEnchantment); break; - case ESM4::SUB_MODB: + case ESM::fourCC("MODB"): reader.get(mBoundRadius); break; - case ESM4::SUB_YNAM: + case ESM::fourCC("YNAM"): reader.getFormId(mPickUpSound); break; - case ESM4::SUB_ZNAM: + case ESM::fourCC("ZNAM"): reader.getFormId(mDropSound); break; - case ESM4::SUB_MODT: // Model data - case ESM4::SUB_MODC: - case ESM4::SUB_MODS: - case ESM4::SUB_MODF: // Model data end - case ESM4::SUB_OBND: - case ESM4::SUB_KSIZ: - case ESM4::SUB_KWDA: - case ESM4::SUB_CNAM: - case ESM4::SUB_INAM: - case ESM4::SUB_VMAD: - case ESM4::SUB_DAMC: // Destructible - case ESM4::SUB_DEST: - case ESM4::SUB_DMDC: - case ESM4::SUB_DMDL: - case ESM4::SUB_DMDT: - case ESM4::SUB_DMDS: - case ESM4::SUB_DSTA: - case ESM4::SUB_DSTD: - case ESM4::SUB_DSTF: // Destructible end - case ESM4::SUB_DNAM: // FO4 - case ESM4::SUB_FIMD: // FO4 - case ESM4::SUB_MICO: // FO4 - case ESM4::SUB_PTRN: // FO4 + case ESM::fourCC("MODT"): // Model data + case ESM::fourCC("MODC"): + case ESM::fourCC("MODS"): + case ESM::fourCC("MODF"): // Model data end + case ESM::fourCC("OBND"): + case ESM::fourCC("KSIZ"): + case ESM::fourCC("KWDA"): + case ESM::fourCC("CNAM"): + case ESM::fourCC("INAM"): + case ESM::fourCC("VMAD"): + case ESM::fourCC("DAMC"): // Destructible + case ESM::fourCC("DEST"): + case ESM::fourCC("DMDC"): + case ESM::fourCC("DMDL"): + case ESM::fourCC("DMDT"): + case ESM::fourCC("DMDS"): + case ESM::fourCC("DSTA"): + case ESM::fourCC("DSTD"): + case ESM::fourCC("DSTF"): // Destructible end + case ESM::fourCC("DNAM"): // FO4 + case ESM::fourCC("FIMD"): // FO4 + case ESM::fourCC("MICO"): // FO4 + case ESM::fourCC("PTRN"): // FO4 reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadbptd.cpp b/components/esm4/loadbptd.cpp index 509eadfcf1..5ff3b5908b 100644 --- a/components/esm4/loadbptd.cpp +++ b/components/esm4/loadbptd.cpp @@ -56,56 +56,56 @@ void ESM4::BodyPartData::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_FULL: + case ESM::fourCC("FULL"): reader.getLocalizedString(mFullName); break; - case ESM4::SUB_MODL: + case ESM::fourCC("MODL"): reader.getZString(mModel); break; - case ESM4::SUB_BPTN: + case ESM::fourCC("BPTN"): reader.getLocalizedString(bodyPart.mPartName); break; - case ESM4::SUB_BPNN: + case ESM::fourCC("BPNN"): reader.getZString(bodyPart.mNodeName); break; - case ESM4::SUB_BPNT: + case ESM::fourCC("BPNT"): reader.getZString(bodyPart.mVATSTarget); break; - case ESM4::SUB_BPNI: + case ESM::fourCC("BPNI"): reader.getZString(bodyPart.mIKStartNode); break; - case ESM4::SUB_BPND: + case ESM::fourCC("BPND"): if (subHdr.dataSize == sizeof(bodyPart.mData)) reader.get(bodyPart.mData); // FIXME: FO4 else reader.skipSubRecordData(); break; - case ESM4::SUB_NAM1: + case ESM::fourCC("NAM1"): reader.getZString(bodyPart.mLimbReplacementModel); break; - case ESM4::SUB_NAM4: // FIXME: assumed occurs last + case ESM::fourCC("NAM4"): // FIXME: assumed occurs last reader.getZString(bodyPart.mGoreEffectsTarget); // target bone mBodyParts.push_back(bodyPart); // FIXME: possible without copying? bodyPart.clear(); break; - case ESM4::SUB_NAM5: - case ESM4::SUB_RAGA: // ragdoll - case ESM4::SUB_MODT: // Model data - case ESM4::SUB_MODC: - case ESM4::SUB_MODS: - case ESM4::SUB_MODF: // Model data end - case ESM4::SUB_BNAM: // FO4 - case ESM4::SUB_CNAM: // FO4 - case ESM4::SUB_DNAM: // FO4 - case ESM4::SUB_ENAM: // FO4 - case ESM4::SUB_FNAM: // FO4 - case ESM4::SUB_INAM: // FO4 - case ESM4::SUB_JNAM: // FO4 - case ESM4::SUB_NAM2: // FO4 + case ESM::fourCC("NAM5"): + case ESM::fourCC("RAGA"): // ragdoll + case ESM::fourCC("MODT"): // Model data + case ESM::fourCC("MODC"): + case ESM::fourCC("MODS"): + case ESM::fourCC("MODF"): // Model data end + case ESM::fourCC("BNAM"): // FO4 + case ESM::fourCC("CNAM"): // FO4 + case ESM::fourCC("DNAM"): // FO4 + case ESM::fourCC("ENAM"): // FO4 + case ESM::fourCC("FNAM"): // FO4 + case ESM::fourCC("INAM"): // FO4 + case ESM::fourCC("JNAM"): // FO4 + case ESM::fourCC("NAM2"): // FO4 reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadcell.cpp b/components/esm4/loadcell.cpp index 0091ab0bd6..8106c1637f 100644 --- a/components/esm4/loadcell.cpp +++ b/components/esm4/loadcell.cpp @@ -78,7 +78,7 @@ void ESM4::Cell::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): { if (!reader.getZString(mEditorId)) throw std::runtime_error("CELL EDID data read error"); @@ -89,7 +89,7 @@ void ESM4::Cell::load(ESM4::Reader& reader) #endif break; } - case ESM4::SUB_XCLC: + case ESM::fourCC("XCLC"): { //(X, Y) grid location of the cell followed by flags. Always in // exterior cells and never in interior cells. @@ -114,10 +114,10 @@ void ESM4::Cell::load(ESM4::Reader& reader) break; } - case ESM4::SUB_FULL: + case ESM::fourCC("FULL"): reader.getLocalizedString(mFullName); break; - case ESM4::SUB_DATA: + case ESM::fourCC("DATA"): { if (subHdr.dataSize == 2) reader.get(mCellFlags); @@ -131,7 +131,7 @@ void ESM4::Cell::load(ESM4::Reader& reader) } break; } - case ESM4::SUB_XCLR: // for exterior cells + case ESM::fourCC("XCLR"): // for exterior cells { mRegions.resize(subHdr.dataSize / sizeof(ESM::FormId32)); for (std::vector::iterator it = mRegions.begin(); it != mRegions.end(); ++it) @@ -145,7 +145,7 @@ void ESM4::Cell::load(ESM4::Reader& reader) } break; } - case ESM4::SUB_XOWN: + case ESM::fourCC("XOWN"): { switch (subHdr.dataSize) { @@ -166,19 +166,19 @@ void ESM4::Cell::load(ESM4::Reader& reader) } break; } - case ESM4::SUB_XGLB: + case ESM::fourCC("XGLB"): reader.getFormId(mGlobal); break; // Oblivion only? - case ESM4::SUB_XCCM: + case ESM::fourCC("XCCM"): reader.getFormId(mClimate); break; - case ESM4::SUB_XCWT: + case ESM::fourCC("XCWT"): reader.getFormId(mWater); break; - case ESM4::SUB_XCLW: + case ESM::fourCC("XCLW"): reader.get(mWaterHeight); break; - case ESM4::SUB_XCLL: + case ESM::fourCC("XCLL"): { switch (subHdr.dataSize) { @@ -197,45 +197,45 @@ void ESM4::Cell::load(ESM4::Reader& reader) } break; } - case ESM4::SUB_XCMT: + case ESM::fourCC("XCMT"): reader.get(mMusicType); break; // Oblivion only? - case ESM4::SUB_LTMP: + case ESM::fourCC("LTMP"): reader.getFormId(mLightingTemplate); break; - case ESM4::SUB_LNAM: + case ESM::fourCC("LNAM"): reader.get(mLightingTemplateFlags); break; // seems to always follow LTMP - case ESM4::SUB_XCMO: + case ESM::fourCC("XCMO"): reader.getFormId(mMusic); break; - case ESM4::SUB_XCAS: + case ESM::fourCC("XCAS"): reader.getFormId(mAcousticSpace); break; - case ESM4::SUB_TVDT: - case ESM4::SUB_MHDT: - case ESM4::SUB_XCGD: - case ESM4::SUB_XNAM: - case ESM4::SUB_XLCN: - case ESM4::SUB_XWCS: - case ESM4::SUB_XWCU: - case ESM4::SUB_XWCN: - case ESM4::SUB_XCIM: - case ESM4::SUB_XEZN: - case ESM4::SUB_XWEM: - case ESM4::SUB_XILL: - case ESM4::SUB_XRNK: - case ESM4::SUB_XCET: // FO3 - case ESM4::SUB_IMPF: // FO3 Zeta - case ESM4::SUB_CNAM: // FO4 - case ESM4::SUB_PCMB: // FO4 - case ESM4::SUB_RVIS: // FO4 - case ESM4::SUB_VISI: // FO4 - case ESM4::SUB_XGDR: // FO4 - case ESM4::SUB_XILW: // FO4 - case ESM4::SUB_XCRI: // FO4 - case ESM4::SUB_XPRI: // FO4 - case ESM4::SUB_ZNAM: // FO4 + case ESM::fourCC("TVDT"): + case ESM::fourCC("MHDT"): + case ESM::fourCC("XCGD"): + case ESM::fourCC("XNAM"): + case ESM::fourCC("XLCN"): + case ESM::fourCC("XWCS"): + case ESM::fourCC("XWCU"): + case ESM::fourCC("XWCN"): + case ESM::fourCC("XCIM"): + case ESM::fourCC("XEZN"): + case ESM::fourCC("XWEM"): + case ESM::fourCC("XILL"): + case ESM::fourCC("XRNK"): + case ESM::fourCC("XCET"): // FO3 + case ESM::fourCC("IMPF"): // FO3 Zeta + case ESM::fourCC("CNAM"): // FO4 + case ESM::fourCC("PCMB"): // FO4 + case ESM::fourCC("RVIS"): // FO4 + case ESM::fourCC("VISI"): // FO4 + case ESM::fourCC("XGDR"): // FO4 + case ESM::fourCC("XILW"): // FO4 + case ESM::fourCC("XCRI"): // FO4 + case ESM::fourCC("XPRI"): // FO4 + case ESM::fourCC("ZNAM"): // FO4 reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadclas.cpp b/components/esm4/loadclas.cpp index 7d232a0aa1..e80b36849e 100644 --- a/components/esm4/loadclas.cpp +++ b/components/esm4/loadclas.cpp @@ -41,21 +41,21 @@ void ESM4::Class::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_FULL: + case ESM::fourCC("FULL"): reader.getLocalizedString(mFullName); break; - case ESM4::SUB_DESC: + case ESM::fourCC("DESC"): reader.getLocalizedString(mDesc); break; - case ESM4::SUB_ICON: + case ESM::fourCC("ICON"): reader.getZString(mIcon); break; - case ESM4::SUB_DATA: - case ESM4::SUB_ATTR: - case ESM4::SUB_PRPS: + case ESM::fourCC("DATA"): + case ESM::fourCC("ATTR"): + case ESM::fourCC("PRPS"): reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadclfm.cpp b/components/esm4/loadclfm.cpp index bc887cd15c..b7157877c7 100644 --- a/components/esm4/loadclfm.cpp +++ b/components/esm4/loadclfm.cpp @@ -41,22 +41,22 @@ void ESM4::Colour::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_FULL: + case ESM::fourCC("FULL"): reader.getLocalizedString(mFullName); break; - case ESM4::SUB_CNAM: + case ESM::fourCC("CNAM"): reader.get(mColour.red); reader.get(mColour.green); reader.get(mColour.blue); reader.get(mColour.custom); break; - case ESM4::SUB_FNAM: + case ESM::fourCC("FNAM"): reader.get(mPlayable); break; - case ESM4::SUB_CTDA: + case ESM::fourCC("CTDA"): reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadclot.cpp b/components/esm4/loadclot.cpp index c67ac3df6b..48999adb18 100644 --- a/components/esm4/loadclot.cpp +++ b/components/esm4/loadclot.cpp @@ -41,55 +41,55 @@ void ESM4::Clothing::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_FULL: + case ESM::fourCC("FULL"): reader.getZString(mFullName); break; - case ESM4::SUB_DATA: + case ESM::fourCC("DATA"): reader.get(mData); break; - case ESM4::SUB_BMDT: + case ESM::fourCC("BMDT"): reader.get(mClothingFlags); break; - case ESM4::SUB_SCRI: + case ESM::fourCC("SCRI"): reader.getFormId(mScriptId); break; - case ESM4::SUB_ENAM: + case ESM::fourCC("ENAM"): reader.getFormId(mEnchantment); break; - case ESM4::SUB_ANAM: + case ESM::fourCC("ANAM"): reader.get(mEnchantmentPoints); break; - case ESM4::SUB_MODB: + case ESM::fourCC("MODB"): reader.get(mBoundRadius); break; - case ESM4::SUB_MODL: + case ESM::fourCC("MODL"): reader.getZString(mModelMale); break; - case ESM4::SUB_MOD2: + case ESM::fourCC("MOD2"): reader.getZString(mModelMaleWorld); break; - case ESM4::SUB_MOD3: + case ESM::fourCC("MOD3"): reader.getZString(mModelFemale); break; - case ESM4::SUB_MOD4: + case ESM::fourCC("MOD4"): reader.getZString(mModelFemaleWorld); break; - case ESM4::SUB_ICON: + case ESM::fourCC("ICON"): reader.getZString(mIconMale); break; - case ESM4::SUB_ICO2: + case ESM::fourCC("ICO2"): reader.getZString(mIconFemale); break; - case ESM4::SUB_MODT: - case ESM4::SUB_MO2B: - case ESM4::SUB_MO3B: - case ESM4::SUB_MO4B: - case ESM4::SUB_MO2T: - case ESM4::SUB_MO3T: - case ESM4::SUB_MO4T: + case ESM::fourCC("MODT"): + case ESM::fourCC("MO2B"): + case ESM::fourCC("MO3B"): + case ESM::fourCC("MO4B"): + case ESM::fourCC("MO2T"): + case ESM::fourCC("MO3T"): + case ESM::fourCC("MO4T"): reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadcont.cpp b/components/esm4/loadcont.cpp index d650678093..a41b06cdd8 100644 --- a/components/esm4/loadcont.cpp +++ b/components/esm4/loadcont.cpp @@ -41,17 +41,17 @@ void ESM4::Container::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_FULL: + case ESM::fourCC("FULL"): reader.getLocalizedString(mFullName); break; - case ESM4::SUB_DATA: + case ESM::fourCC("DATA"): reader.get(mDataFlags); reader.get(mWeight); break; - case ESM4::SUB_CNTO: + case ESM::fourCC("CNTO"): { static InventoryItem inv; // FIXME: use unique_ptr here? reader.get(inv); @@ -59,47 +59,47 @@ void ESM4::Container::load(ESM4::Reader& reader) mInventory.push_back(inv); break; } - case ESM4::SUB_MODL: + case ESM::fourCC("MODL"): reader.getZString(mModel); break; - case ESM4::SUB_SNAM: + case ESM::fourCC("SNAM"): reader.getFormId(mOpenSound); break; - case ESM4::SUB_QNAM: + case ESM::fourCC("QNAM"): reader.getFormId(mCloseSound); break; - case ESM4::SUB_SCRI: + case ESM::fourCC("SCRI"): reader.getFormId(mScriptId); break; - case ESM4::SUB_MODB: + case ESM::fourCC("MODB"): reader.get(mBoundRadius); break; - case ESM4::SUB_MODT: // Model data - case ESM4::SUB_MODC: - case ESM4::SUB_MODS: - case ESM4::SUB_MODF: // Model data end - case ESM4::SUB_VMAD: // TES5 only - case ESM4::SUB_OBND: // TES5 only - case ESM4::SUB_COCT: // TES5 only - case ESM4::SUB_COED: // TES5 only - case ESM4::SUB_DAMC: // Destructible - case ESM4::SUB_DEST: - case ESM4::SUB_DMDC: - case ESM4::SUB_DMDL: - case ESM4::SUB_DMDT: - case ESM4::SUB_DMDS: - case ESM4::SUB_DSTA: - case ESM4::SUB_DSTD: - case ESM4::SUB_DSTF: // Destructible end - case ESM4::SUB_KSIZ: - case ESM4::SUB_KWDA: - case ESM4::SUB_ONAM: - case ESM4::SUB_RNAM: // FONV - case ESM4::SUB_TNAM: - case ESM4::SUB_FTYP: // FO4 - case ESM4::SUB_NTRM: // FO4 - case ESM4::SUB_PRPS: // FO4 - case ESM4::SUB_PTRN: // FO4 + case ESM::fourCC("MODT"): // Model data + case ESM::fourCC("MODC"): + case ESM::fourCC("MODS"): + case ESM::fourCC("MODF"): // Model data end + case ESM::fourCC("VMAD"): // TES5 only + case ESM::fourCC("OBND"): // TES5 only + case ESM::fourCC("COCT"): // TES5 only + case ESM::fourCC("COED"): // TES5 only + case ESM::fourCC("DAMC"): // Destructible + case ESM::fourCC("DEST"): + case ESM::fourCC("DMDC"): + case ESM::fourCC("DMDL"): + case ESM::fourCC("DMDT"): + case ESM::fourCC("DMDS"): + case ESM::fourCC("DSTA"): + case ESM::fourCC("DSTD"): + case ESM::fourCC("DSTF"): // Destructible end + case ESM::fourCC("KSIZ"): + case ESM::fourCC("KWDA"): + case ESM::fourCC("ONAM"): + case ESM::fourCC("RNAM"): // FONV + case ESM::fourCC("TNAM"): + case ESM::fourCC("FTYP"): // FO4 + case ESM::fourCC("NTRM"): // FO4 + case ESM::fourCC("PRPS"): // FO4 + case ESM::fourCC("PTRN"): // FO4 reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadcrea.cpp b/components/esm4/loadcrea.cpp index 0c07eb92e3..532bd5acdb 100644 --- a/components/esm4/loadcrea.cpp +++ b/components/esm4/loadcrea.cpp @@ -45,16 +45,16 @@ void ESM4::Creature::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_FULL: + case ESM::fourCC("FULL"): reader.getZString(mFullName); break; - case ESM4::SUB_MODL: + case ESM::fourCC("MODL"): reader.getZString(mModel); break; - case ESM4::SUB_CNTO: + case ESM::fourCC("CNTO"): { static InventoryItem inv; // FIXME: use unique_ptr here? reader.get(inv); @@ -62,76 +62,76 @@ void ESM4::Creature::load(ESM4::Reader& reader) mInventory.push_back(inv); break; } - case ESM4::SUB_SPLO: + case ESM::fourCC("SPLO"): reader.getFormId(mSpell.emplace_back()); break; - case ESM4::SUB_PKID: + case ESM::fourCC("PKID"): reader.getFormId(mAIPackages.emplace_back()); break; - case ESM4::SUB_SNAM: + case ESM::fourCC("SNAM"): reader.get(mFaction); reader.adjustFormId(mFaction.faction); break; - case ESM4::SUB_INAM: + case ESM::fourCC("INAM"): reader.getFormId(mDeathItem); break; - case ESM4::SUB_SCRI: + case ESM::fourCC("SCRI"): reader.getFormId(mScriptId); break; - case ESM4::SUB_AIDT: + case ESM::fourCC("AIDT"): if (subHdr.dataSize == 20) // FO3 reader.skipSubRecordData(); else reader.get(mAIData); // 12 bytes break; - case ESM4::SUB_ACBS: + case ESM::fourCC("ACBS"): // if (esmVer == ESM::VER_094 || esmVer == ESM::VER_170 || mIsFONV) if (subHdr.dataSize == 24) reader.get(mBaseConfig); else reader.get(&mBaseConfig, 16); // TES4 break; - case ESM4::SUB_DATA: + case ESM::fourCC("DATA"): if (subHdr.dataSize == 17) // FO3 reader.skipSubRecordData(); else reader.get(mData); break; - case ESM4::SUB_ZNAM: + case ESM::fourCC("ZNAM"): reader.getFormId(mCombatStyle); break; - case ESM4::SUB_CSCR: + case ESM::fourCC("CSCR"): reader.getFormId(mSoundBase); break; - case ESM4::SUB_CSDI: + case ESM::fourCC("CSDI"): reader.getFormId(mSound); break; - case ESM4::SUB_CSDC: + case ESM::fourCC("CSDC"): reader.get(mSoundChance); break; - case ESM4::SUB_BNAM: + case ESM::fourCC("BNAM"): reader.get(mBaseScale); break; - case ESM4::SUB_TNAM: + case ESM::fourCC("TNAM"): reader.get(mTurningSpeed); break; - case ESM4::SUB_WNAM: + case ESM::fourCC("WNAM"): reader.get(mFootWeight); break; - case ESM4::SUB_MODB: + case ESM::fourCC("MODB"): reader.get(mBoundRadius); break; - case ESM4::SUB_NAM0: + case ESM::fourCC("NAM0"): reader.getZString(mBloodSpray); break; - case ESM4::SUB_NAM1: + case ESM::fourCC("NAM1"): reader.getZString(mBloodDecal); break; - case ESM4::SUB_NIFZ: + case ESM::fourCC("NIFZ"): if (!reader.getZeroTerminatedStringArray(mNif)) throw std::runtime_error("CREA NIFZ data read error"); break; - case ESM4::SUB_NIFT: + case ESM::fourCC("NIFT"): { if (subHdr.dataSize != 4) // FIXME: FO3 { @@ -147,33 +147,33 @@ void ESM4::Creature::load(ESM4::Reader& reader) Log(Debug::Verbose) << "CREA NIFT " << mId << ", non-zero " << nift; break; } - case ESM4::SUB_KFFZ: + case ESM::fourCC("KFFZ"): if (!reader.getZeroTerminatedStringArray(mKf)) throw std::runtime_error("CREA KFFZ data read error"); break; - case ESM4::SUB_TPLT: + case ESM::fourCC("TPLT"): reader.getFormId(mBaseTemplate); break; // FO3 - case ESM4::SUB_PNAM: // FO3/FONV/TES5 + case ESM::fourCC("PNAM"): // FO3/FONV/TES5 reader.getFormId(mBodyParts.emplace_back()); break; - case ESM4::SUB_MODT: - case ESM4::SUB_RNAM: - case ESM4::SUB_CSDT: - case ESM4::SUB_OBND: // FO3 - case ESM4::SUB_EAMT: // FO3 - case ESM4::SUB_VTCK: // FO3 - case ESM4::SUB_NAM4: // FO3 - case ESM4::SUB_NAM5: // FO3 - case ESM4::SUB_CNAM: // FO3 - case ESM4::SUB_LNAM: // FO3 - case ESM4::SUB_EITM: // FO3 - case ESM4::SUB_DEST: // FO3 - case ESM4::SUB_DSTD: // FO3 - case ESM4::SUB_DSTF: // FO3 - case ESM4::SUB_DMDL: // FO3 - case ESM4::SUB_DMDT: // FO3 - case ESM4::SUB_COED: // FO3 + case ESM::fourCC("MODT"): + case ESM::fourCC("RNAM"): + case ESM::fourCC("CSDT"): + case ESM::fourCC("OBND"): // FO3 + case ESM::fourCC("EAMT"): // FO3 + case ESM::fourCC("VTCK"): // FO3 + case ESM::fourCC("NAM4"): // FO3 + case ESM::fourCC("NAM5"): // FO3 + case ESM::fourCC("CNAM"): // FO3 + case ESM::fourCC("LNAM"): // FO3 + case ESM::fourCC("EITM"): // FO3 + case ESM::fourCC("DEST"): // FO3 + case ESM::fourCC("DSTD"): // FO3 + case ESM::fourCC("DSTF"): // FO3 + case ESM::fourCC("DMDL"): // FO3 + case ESM::fourCC("DMDT"): // FO3 + case ESM::fourCC("COED"): // FO3 reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loaddial.cpp b/components/esm4/loaddial.cpp index 19e1099482..3ed9b79e0a 100644 --- a/components/esm4/loaddial.cpp +++ b/components/esm4/loaddial.cpp @@ -42,19 +42,19 @@ void ESM4::Dialogue::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_FULL: + case ESM::fourCC("FULL"): reader.getLocalizedString(mTopicName); break; - case ESM4::SUB_QSTI: + case ESM::fourCC("QSTI"): reader.getFormId(mQuests.emplace_back()); break; - case ESM4::SUB_QSTR: // Seems never used in TES4 + case ESM::fourCC("QSTR"): // Seems never used in TES4 reader.getFormId(mQuestsRemoved.emplace_back()); break; - case ESM4::SUB_DATA: + case ESM::fourCC("DATA"): { if (subHdr.dataSize == 4) // TES5 { @@ -74,20 +74,20 @@ void ESM4::Dialogue::load(ESM4::Reader& reader) break; } - case ESM4::SUB_PNAM: + case ESM::fourCC("PNAM"): reader.get(mPriority); break; // FO3/FONV - case ESM4::SUB_TDUM: + case ESM::fourCC("TDUM"): reader.getZString(mTextDumb); break; // FONV - case ESM4::SUB_SCRI: - case ESM4::SUB_INFC: // FONV info connection - case ESM4::SUB_INFX: // FONV info index - case ESM4::SUB_QNAM: // TES5 - case ESM4::SUB_BNAM: // TES5 - case ESM4::SUB_SNAM: // TES5 - case ESM4::SUB_TIFC: // TES5 - case ESM4::SUB_KNAM: // FO4 + case ESM::fourCC("SCRI"): + case ESM::fourCC("INFC"): // FONV info connection + case ESM::fourCC("INFX"): // FONV info index + case ESM::fourCC("QNAM"): // TES5 + case ESM::fourCC("BNAM"): // TES5 + case ESM::fourCC("SNAM"): // TES5 + case ESM::fourCC("TIFC"): // TES5 + case ESM::fourCC("KNAM"): // FO4 reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loaddobj.cpp b/components/esm4/loaddobj.cpp index 50135fc7a1..9c0c193f81 100644 --- a/components/esm4/loaddobj.cpp +++ b/components/esm4/loaddobj.cpp @@ -44,10 +44,10 @@ void ESM4::DefaultObj::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; // "DefaultObjectManager" - case ESM4::SUB_DATA: + case ESM::fourCC("DATA"): reader.getFormId(mData.stimpack); reader.getFormId(mData.superStimpack); reader.getFormId(mData.radX); @@ -87,7 +87,7 @@ void ESM4::DefaultObj::load(ESM4::Reader& reader) reader.getFormId(mData.cateyeMobileEffectNYI); } break; - case ESM4::SUB_DNAM: + case ESM::fourCC("DNAM"): reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loaddoor.cpp b/components/esm4/loaddoor.cpp index 7fe38b6b7a..10171085c3 100644 --- a/components/esm4/loaddoor.cpp +++ b/components/esm4/loaddoor.cpp @@ -41,57 +41,57 @@ void ESM4::Door::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_FULL: + case ESM::fourCC("FULL"): reader.getLocalizedString(mFullName); break; - case ESM4::SUB_MODL: + case ESM::fourCC("MODL"): reader.getZString(mModel); break; - case ESM4::SUB_SCRI: + case ESM::fourCC("SCRI"): reader.getFormId(mScriptId); break; - case ESM4::SUB_SNAM: + case ESM::fourCC("SNAM"): reader.getFormId(mOpenSound); break; - case ESM4::SUB_ANAM: + case ESM::fourCC("ANAM"): reader.getFormId(mCloseSound); break; - case ESM4::SUB_BNAM: + case ESM::fourCC("BNAM"): reader.getFormId(mLoopSound); break; - case ESM4::SUB_FNAM: + case ESM::fourCC("FNAM"): reader.get(mDoorFlags); break; - case ESM4::SUB_TNAM: + case ESM::fourCC("TNAM"): reader.getFormId(mRandomTeleport); break; - case ESM4::SUB_MODB: + case ESM::fourCC("MODB"): reader.get(mBoundRadius); break; - case ESM4::SUB_MODT: // Model data - case ESM4::SUB_MODC: - case ESM4::SUB_MODS: - case ESM4::SUB_MODF: // Model data end - case ESM4::SUB_OBND: - case ESM4::SUB_VMAD: - case ESM4::SUB_DAMC: // Destructible - case ESM4::SUB_DEST: - case ESM4::SUB_DMDC: - case ESM4::SUB_DMDL: - case ESM4::SUB_DMDT: - case ESM4::SUB_DMDS: - case ESM4::SUB_DSTA: - case ESM4::SUB_DSTD: - case ESM4::SUB_DSTF: // Destructible end - case ESM4::SUB_KSIZ: - case ESM4::SUB_KWDA: - case ESM4::SUB_CNAM: // FO4 - case ESM4::SUB_NTRM: // FO4 - case ESM4::SUB_ONAM: // FO4 - case ESM4::SUB_PTRN: // FO4 + case ESM::fourCC("MODT"): // Model data + case ESM::fourCC("MODC"): + case ESM::fourCC("MODS"): + case ESM::fourCC("MODF"): // Model data end + case ESM::fourCC("OBND"): + case ESM::fourCC("VMAD"): + case ESM::fourCC("DAMC"): // Destructible + case ESM::fourCC("DEST"): + case ESM::fourCC("DMDC"): + case ESM::fourCC("DMDL"): + case ESM::fourCC("DMDT"): + case ESM::fourCC("DMDS"): + case ESM::fourCC("DSTA"): + case ESM::fourCC("DSTD"): + case ESM::fourCC("DSTF"): // Destructible end + case ESM::fourCC("KSIZ"): + case ESM::fourCC("KWDA"): + case ESM::fourCC("CNAM"): // FO4 + case ESM::fourCC("NTRM"): // FO4 + case ESM::fourCC("ONAM"): // FO4 + case ESM::fourCC("PTRN"): // FO4 reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadeyes.cpp b/components/esm4/loadeyes.cpp index 28f6d33c6e..7e356889d9 100644 --- a/components/esm4/loadeyes.cpp +++ b/components/esm4/loadeyes.cpp @@ -41,16 +41,16 @@ void ESM4::Eyes::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_FULL: + case ESM::fourCC("FULL"): reader.getLocalizedString(mFullName); break; - case ESM4::SUB_ICON: + case ESM::fourCC("ICON"): reader.getZString(mIcon); break; - case ESM4::SUB_DATA: + case ESM::fourCC("DATA"): reader.get(mData); break; default: diff --git a/components/esm4/loadflor.cpp b/components/esm4/loadflor.cpp index 69f1c82b13..164f97eff1 100644 --- a/components/esm4/loadflor.cpp +++ b/components/esm4/loadflor.cpp @@ -41,53 +41,53 @@ void ESM4::Flora::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_FULL: + case ESM::fourCC("FULL"): reader.getLocalizedString(mFullName); break; - case ESM4::SUB_MODL: + case ESM::fourCC("MODL"): reader.getZString(mModel); break; - case ESM4::SUB_SCRI: + case ESM::fourCC("SCRI"): reader.getFormId(mScriptId); break; - case ESM4::SUB_PFIG: + case ESM::fourCC("PFIG"): reader.getFormId(mIngredient); break; - case ESM4::SUB_PFPC: + case ESM::fourCC("PFPC"): reader.get(mPercentHarvest); break; - case ESM4::SUB_SNAM: + case ESM::fourCC("SNAM"): reader.getFormId(mSound); break; - case ESM4::SUB_MODB: + case ESM::fourCC("MODB"): reader.get(mBoundRadius); break; - case ESM4::SUB_MODT: // Model data - case ESM4::SUB_MODC: - case ESM4::SUB_MODS: - case ESM4::SUB_MODF: // Model data end - case ESM4::SUB_FNAM: - case ESM4::SUB_OBND: - case ESM4::SUB_KSIZ: - case ESM4::SUB_KWDA: - case ESM4::SUB_PNAM: - case ESM4::SUB_RNAM: - case ESM4::SUB_VMAD: - case ESM4::SUB_DAMC: // Destructible - case ESM4::SUB_DEST: - case ESM4::SUB_DMDC: - case ESM4::SUB_DMDL: - case ESM4::SUB_DMDT: - case ESM4::SUB_DMDS: - case ESM4::SUB_DSTA: - case ESM4::SUB_DSTD: - case ESM4::SUB_DSTF: // Destructible end - case ESM4::SUB_PRPS: // FO4 - case ESM4::SUB_PTRN: // FO4 - case ESM4::SUB_ATTX: // FO4 + case ESM::fourCC("MODT"): // Model data + case ESM::fourCC("MODC"): + case ESM::fourCC("MODS"): + case ESM::fourCC("MODF"): // Model data end + case ESM::fourCC("FNAM"): + case ESM::fourCC("OBND"): + case ESM::fourCC("KSIZ"): + case ESM::fourCC("KWDA"): + case ESM::fourCC("PNAM"): + case ESM::fourCC("RNAM"): + case ESM::fourCC("VMAD"): + case ESM::fourCC("DAMC"): // Destructible + case ESM::fourCC("DEST"): + case ESM::fourCC("DMDC"): + case ESM::fourCC("DMDL"): + case ESM::fourCC("DMDT"): + case ESM::fourCC("DMDS"): + case ESM::fourCC("DSTA"): + case ESM::fourCC("DSTD"): + case ESM::fourCC("DSTF"): // Destructible end + case ESM::fourCC("PRPS"): // FO4 + case ESM::fourCC("PTRN"): // FO4 + case ESM::fourCC("ATTX"): // FO4 reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadflst.cpp b/components/esm4/loadflst.cpp index 9da17bc84b..4acf4d28d2 100644 --- a/components/esm4/loadflst.cpp +++ b/components/esm4/loadflst.cpp @@ -41,13 +41,13 @@ void ESM4::FormIdList::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_FULL: + case ESM::fourCC("FULL"): reader.getLocalizedString(mFullName); break; - case ESM4::SUB_LNAM: + case ESM::fourCC("LNAM"): reader.getFormId(mObjects.emplace_back()); break; default: diff --git a/components/esm4/loadfurn.cpp b/components/esm4/loadfurn.cpp index 41ddca07a2..75dc3751a6 100644 --- a/components/esm4/loadfurn.cpp +++ b/components/esm4/loadfurn.cpp @@ -41,10 +41,10 @@ void ESM4::Furniture::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_FULL: + case ESM::fourCC("FULL"): { std::string name; reader.getLocalizedString(name); @@ -53,65 +53,65 @@ void ESM4::Furniture::load(ESM4::Reader& reader) mFullName = std::move(name); break; } - case ESM4::SUB_MODL: + case ESM::fourCC("MODL"): reader.getZString(mModel); break; - case ESM4::SUB_SCRI: + case ESM::fourCC("SCRI"): reader.getFormId(mScriptId); break; - case ESM4::SUB_MNAM: + case ESM::fourCC("MNAM"): reader.get(mActiveMarkerFlags); break; - case ESM4::SUB_MODB: + case ESM::fourCC("MODB"): reader.get(mBoundRadius); break; - case ESM4::SUB_MODT: // Model data - case ESM4::SUB_MODC: - case ESM4::SUB_MODS: - case ESM4::SUB_MODF: // Model data end - case ESM4::SUB_DAMC: // Destructible - case ESM4::SUB_DEST: - case ESM4::SUB_DMDC: - case ESM4::SUB_DMDL: - case ESM4::SUB_DMDT: - case ESM4::SUB_DMDS: - case ESM4::SUB_DSTA: - case ESM4::SUB_DSTD: - case ESM4::SUB_DSTF: // Destructible end - case ESM4::SUB_ENAM: - case ESM4::SUB_FNAM: - case ESM4::SUB_FNMK: - case ESM4::SUB_FNPR: - case ESM4::SUB_KNAM: - case ESM4::SUB_KSIZ: - case ESM4::SUB_KWDA: - case ESM4::SUB_NAM0: - case ESM4::SUB_OBND: - case ESM4::SUB_PNAM: - case ESM4::SUB_VMAD: - case ESM4::SUB_WBDT: - case ESM4::SUB_XMRK: - case ESM4::SUB_PRPS: - case ESM4::SUB_CTDA: - case ESM4::SUB_CIS1: - case ESM4::SUB_CIS2: - case ESM4::SUB_APPR: // FO4 - case ESM4::SUB_ATTX: // FO4 - case ESM4::SUB_CITC: // FO4 - case ESM4::SUB_CNTO: // FO4 - case ESM4::SUB_COCT: // FO4 - case ESM4::SUB_COED: // FO4 - case ESM4::SUB_FTYP: // FO4 - case ESM4::SUB_NAM1: // FO4 - case ESM4::SUB_NTRM: // FO4 - case ESM4::SUB_NVNM: // FO4 - case ESM4::SUB_PTRN: // FO4 - case ESM4::SUB_SNAM: // FO4 - case ESM4::SUB_WNAM: // FO4 - case ESM4::SUB_OBTE: // FO4 object template start - case ESM4::SUB_OBTF: - case ESM4::SUB_OBTS: - case ESM4::SUB_STOP: // FO4 object template end + case ESM::fourCC("MODT"): // Model data + case ESM::fourCC("MODC"): + case ESM::fourCC("MODS"): + case ESM::fourCC("MODF"): // Model data end + case ESM::fourCC("DAMC"): // Destructible + case ESM::fourCC("DEST"): + case ESM::fourCC("DMDC"): + case ESM::fourCC("DMDL"): + case ESM::fourCC("DMDT"): + case ESM::fourCC("DMDS"): + case ESM::fourCC("DSTA"): + case ESM::fourCC("DSTD"): + case ESM::fourCC("DSTF"): // Destructible end + case ESM::fourCC("ENAM"): + case ESM::fourCC("FNAM"): + case ESM::fourCC("FNMK"): + case ESM::fourCC("FNPR"): + case ESM::fourCC("KNAM"): + case ESM::fourCC("KSIZ"): + case ESM::fourCC("KWDA"): + case ESM::fourCC("NAM0"): + case ESM::fourCC("OBND"): + case ESM::fourCC("PNAM"): + case ESM::fourCC("VMAD"): + case ESM::fourCC("WBDT"): + case ESM::fourCC("XMRK"): + case ESM::fourCC("PRPS"): + case ESM::fourCC("CTDA"): + case ESM::fourCC("CIS1"): + case ESM::fourCC("CIS2"): + case ESM::fourCC("APPR"): // FO4 + case ESM::fourCC("ATTX"): // FO4 + case ESM::fourCC("CITC"): // FO4 + case ESM::fourCC("CNTO"): // FO4 + case ESM::fourCC("COCT"): // FO4 + case ESM::fourCC("COED"): // FO4 + case ESM::fourCC("FTYP"): // FO4 + case ESM::fourCC("NAM1"): // FO4 + case ESM::fourCC("NTRM"): // FO4 + case ESM::fourCC("NVNM"): // FO4 + case ESM::fourCC("PTRN"): // FO4 + case ESM::fourCC("SNAM"): // FO4 + case ESM::fourCC("WNAM"): // FO4 + case ESM::fourCC("OBTE"): // FO4 object template start + case ESM::fourCC("OBTF"): + case ESM::fourCC("OBTS"): + case ESM::fourCC("STOP"): // FO4 object template end reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadglob.cpp b/components/esm4/loadglob.cpp index 436f3e34ae..4349bcb072 100644 --- a/components/esm4/loadglob.cpp +++ b/components/esm4/loadglob.cpp @@ -41,16 +41,16 @@ void ESM4::GlobalVariable::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; case ESM::fourCC("XALG"): // FO76 reader.get(mExtraFlags2); break; - case ESM4::SUB_FNAM: + case ESM::fourCC("FNAM"): reader.get(mType); break; - case ESM4::SUB_FLTV: + case ESM::fourCC("FLTV"): reader.get(mValue); break; case ESM::fourCC("NTWK"): // FO76 diff --git a/components/esm4/loadgmst.cpp b/components/esm4/loadgmst.cpp index f22ed5848d..0b2df075f2 100644 --- a/components/esm4/loadgmst.cpp +++ b/components/esm4/loadgmst.cpp @@ -67,10 +67,10 @@ namespace ESM4 const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_DATA: + case ESM::fourCC("DATA"): mData = readData(mId, mEditorId, reader); break; default: diff --git a/components/esm4/loadgras.cpp b/components/esm4/loadgras.cpp index ebcdde04a1..8514b3aa0a 100644 --- a/components/esm4/loadgras.cpp +++ b/components/esm4/loadgras.cpp @@ -41,23 +41,23 @@ void ESM4::Grass::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_MODL: + case ESM::fourCC("MODL"): reader.getZString(mModel); break; - case ESM4::SUB_DATA: + case ESM::fourCC("DATA"): reader.get(mData); break; - case ESM4::SUB_MODB: + case ESM::fourCC("MODB"): reader.get(mBoundRadius); break; - case ESM4::SUB_MODT: // Model data - case ESM4::SUB_MODC: - case ESM4::SUB_MODS: - case ESM4::SUB_MODF: // Model data end - case ESM4::SUB_OBND: + case ESM::fourCC("MODT"): // Model data + case ESM::fourCC("MODC"): + case ESM::fourCC("MODS"): + case ESM::fourCC("MODF"): // Model data end + case ESM::fourCC("OBND"): reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadhair.cpp b/components/esm4/loadhair.cpp index 3ab983d6b6..f3e5a8a1c3 100644 --- a/components/esm4/loadhair.cpp +++ b/components/esm4/loadhair.cpp @@ -41,25 +41,25 @@ void ESM4::Hair::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_FULL: + case ESM::fourCC("FULL"): reader.getZString(mFullName); break; - case ESM4::SUB_MODL: + case ESM::fourCC("MODL"): reader.getZString(mModel); break; - case ESM4::SUB_ICON: + case ESM::fourCC("ICON"): reader.getZString(mIcon); break; - case ESM4::SUB_DATA: + case ESM::fourCC("DATA"): reader.get(mData); break; - case ESM4::SUB_MODB: + case ESM::fourCC("MODB"): reader.get(mBoundRadius); break; - case ESM4::SUB_MODT: + case ESM::fourCC("MODT"): reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadhdpt.cpp b/components/esm4/loadhdpt.cpp index c560ff5fac..9b7e27bdf9 100644 --- a/components/esm4/loadhdpt.cpp +++ b/components/esm4/loadhdpt.cpp @@ -45,32 +45,32 @@ void ESM4::HeadPart::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; case ESM::fourCC("XALG"): // FO76 reader.get(mExtraFlags2); break; - case ESM4::SUB_FULL: + case ESM::fourCC("FULL"): reader.getLocalizedString(mFullName); break; - case ESM4::SUB_DATA: + case ESM::fourCC("DATA"): reader.get(mData); break; - case ESM4::SUB_MODL: + case ESM::fourCC("MODL"): reader.getZString(mModel); break; - case ESM4::SUB_HNAM: + case ESM::fourCC("HNAM"): reader.getFormId(mExtraParts.emplace_back()); break; - case ESM4::SUB_NAM0: // TES5 + case ESM::fourCC("NAM0"): // TES5 { std::uint32_t value; reader.get(value); type = value; break; } - case ESM4::SUB_NAM1: // TES5 + case ESM::fourCC("NAM1"): // TES5 { std::string file; reader.getZString(file); @@ -87,29 +87,29 @@ void ESM4::HeadPart::load(ESM4::Reader& reader) mTriFile[*type] = std::move(file); break; } - case ESM4::SUB_TNAM: + case ESM::fourCC("TNAM"): reader.getFormId(mBaseTexture); break; - case ESM4::SUB_CNAM: + case ESM::fourCC("CNAM"): reader.getFormId(mColor); break; - case ESM4::SUB_RNAM: + case ESM::fourCC("RNAM"): reader.getFormId(mValidRaces.emplace_back()); break; - case ESM4::SUB_PNAM: + case ESM::fourCC("PNAM"): reader.get(mType); break; - case ESM4::SUB_MODT: // Model data - case ESM4::SUB_MODC: - case ESM4::SUB_MODS: - case ESM4::SUB_MODF: + case ESM::fourCC("MODT"): // Model data + case ESM::fourCC("MODC"): + case ESM::fourCC("MODS"): + case ESM::fourCC("MODF"): case ESM::fourCC("ENLM"): case ESM::fourCC("XFLG"): case ESM::fourCC("ENLT"): case ESM::fourCC("ENLS"): case ESM::fourCC("AUUV"): case ESM::fourCC("MODD"): // Model data end - case ESM4::SUB_CTDA: + case ESM::fourCC("CTDA"): reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadidle.cpp b/components/esm4/loadidle.cpp index 310c43b2e1..18a408f053 100644 --- a/components/esm4/loadidle.cpp +++ b/components/esm4/loadidle.cpp @@ -41,16 +41,16 @@ void ESM4::IdleAnimation::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_DNAM: + case ESM::fourCC("DNAM"): reader.getZString(mCollision); break; - case ESM4::SUB_ENAM: + case ESM::fourCC("ENAM"): reader.getZString(mEvent); break; - case ESM4::SUB_ANAM: + case ESM::fourCC("ANAM"): { switch (subHdr.dataSize) { @@ -74,21 +74,21 @@ void ESM4::IdleAnimation::load(ESM4::Reader& reader) } break; } - case ESM4::SUB_MODL: + case ESM::fourCC("MODL"): reader.getZString(mModel); break; - case ESM4::SUB_MODB: + case ESM::fourCC("MODB"): reader.get(mBoundRadius); break; - case ESM4::SUB_CTDA: // formId - case ESM4::SUB_CTDT: - case ESM4::SUB_CIS1: - case ESM4::SUB_CIS2: - case ESM4::SUB_DATA: - case ESM4::SUB_MODD: - case ESM4::SUB_MODS: - case ESM4::SUB_MODT: - case ESM4::SUB_GNAM: // FO4 + case ESM::fourCC("CTDA"): // formId + case ESM::fourCC("CTDT"): + case ESM::fourCC("CIS1"): + case ESM::fourCC("CIS2"): + case ESM::fourCC("DATA"): + case ESM::fourCC("MODD"): + case ESM::fourCC("MODS"): + case ESM::fourCC("MODT"): + case ESM::fourCC("GNAM"): // FO4 reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadidlm.cpp b/components/esm4/loadidlm.cpp index 3f1ed9518c..0aec281c6c 100644 --- a/components/esm4/loadidlm.cpp +++ b/components/esm4/loadidlm.cpp @@ -43,13 +43,13 @@ void ESM4::IdleMarker::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_IDLF: + case ESM::fourCC("IDLF"): reader.get(mIdleFlags); break; - case ESM4::SUB_IDLC: + case ESM::fourCC("IDLC"): if (subHdr.dataSize != 1) // FO3 can have 4? { reader.skipSubRecordData(); @@ -58,10 +58,10 @@ void ESM4::IdleMarker::load(ESM4::Reader& reader) reader.get(mIdleCount); break; - case ESM4::SUB_IDLT: + case ESM::fourCC("IDLT"): reader.get(mIdleTimer); break; - case ESM4::SUB_IDLA: + case ESM::fourCC("IDLA"): { bool isFONV = esmVer == ESM::VER_132 || esmVer == ESM::VER_133 || esmVer == ESM::VER_134; if (esmVer == ESM::VER_094 || isFONV) // FO3? 4 or 8 bytes @@ -75,17 +75,17 @@ void ESM4::IdleMarker::load(ESM4::Reader& reader) reader.getFormId(value); break; } - case ESM4::SUB_MODL: + case ESM::fourCC("MODL"): reader.getZString(mModel); break; - case ESM4::SUB_OBND: // object bounds - case ESM4::SUB_KSIZ: - case ESM4::SUB_KWDA: - case ESM4::SUB_MODT: // Model data - case ESM4::SUB_MODC: - case ESM4::SUB_MODS: - case ESM4::SUB_MODF: // Model data end - case ESM4::SUB_QNAM: + case ESM::fourCC("OBND"): // object bounds + case ESM::fourCC("KSIZ"): + case ESM::fourCC("KWDA"): + case ESM::fourCC("MODT"): // Model data + case ESM::fourCC("MODC"): + case ESM::fourCC("MODS"): + case ESM::fourCC("MODF"): // Model data end + case ESM::fourCC("QNAM"): reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadimod.cpp b/components/esm4/loadimod.cpp index 0359f6d23b..76f51357a3 100644 --- a/components/esm4/loadimod.cpp +++ b/components/esm4/loadimod.cpp @@ -43,53 +43,53 @@ void ESM4::ItemMod::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_FULL: + case ESM::fourCC("FULL"): reader.getLocalizedString(mFullName); break; - case ESM4::SUB_MODL: + case ESM::fourCC("MODL"): reader.getZString(mModel); break; - case ESM4::SUB_MODB: + case ESM::fourCC("MODB"): reader.get(mBoundRadius); break; - case ESM4::SUB_DESC: + case ESM::fourCC("DESC"): reader.getLocalizedString(mText); break; - case ESM4::SUB_ICON: + case ESM::fourCC("ICON"): reader.getZString(mIcon); break; - case ESM4::SUB_MICO: + case ESM::fourCC("MICO"): reader.getZString(mMiniIcon); break; - case ESM4::SUB_SCRI: + case ESM::fourCC("SCRI"): reader.getFormId(mScriptId); break; - case ESM4::SUB_YNAM: + case ESM::fourCC("YNAM"): reader.getFormId(mPickUpSound); break; - case ESM4::SUB_ZNAM: + case ESM::fourCC("ZNAM"): reader.getFormId(mDropSound); break; - case ESM4::SUB_DATA: + case ESM::fourCC("DATA"): reader.get(mData.mValue); reader.get(mData.mWeight); break; - case ESM4::SUB_OBND: - case ESM4::SUB_MODT: // Model data - case ESM4::SUB_MODS: - case ESM4::SUB_MODD: // Model data end - case ESM4::SUB_DAMC: // Destructible - case ESM4::SUB_DEST: - case ESM4::SUB_DMDC: - case ESM4::SUB_DMDL: - case ESM4::SUB_DMDT: - case ESM4::SUB_DMDS: - case ESM4::SUB_DSTA: - case ESM4::SUB_DSTD: - case ESM4::SUB_DSTF: // Destructible end + case ESM::fourCC("OBND"): + case ESM::fourCC("MODT"): // Model data + case ESM::fourCC("MODS"): + case ESM::fourCC("MODD"): // Model data end + case ESM::fourCC("DAMC"): // Destructible + case ESM::fourCC("DEST"): + case ESM::fourCC("DMDC"): + case ESM::fourCC("DMDL"): + case ESM::fourCC("DMDT"): + case ESM::fourCC("DMDS"): + case ESM::fourCC("DSTA"): + case ESM::fourCC("DSTD"): + case ESM::fourCC("DSTF"): // Destructible end reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadinfo.cpp b/components/esm4/loadinfo.cpp index 1b001c1665..266bdb086c 100644 --- a/components/esm4/loadinfo.cpp +++ b/components/esm4/loadinfo.cpp @@ -49,13 +49,13 @@ void ESM4::DialogInfo::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_QSTI: + case ESM::fourCC("QSTI"): reader.getFormId(mQuest); break; // FormId quest id - case ESM4::SUB_SNDD: + case ESM::fourCC("SNDD"): reader.getFormId(mSound); break; // FO3 (not used in FONV?) - case ESM4::SUB_TRDT: + case ESM::fourCC("TRDT"): { if (subHdr.dataSize == 16) // TES4 reader.get(&mResponseData, 16); @@ -70,16 +70,16 @@ void ESM4::DialogInfo::load(ESM4::Reader& reader) break; } - case ESM4::SUB_NAM1: + case ESM::fourCC("NAM1"): reader.getLocalizedString(mResponse); break; // response text - case ESM4::SUB_NAM2: + case ESM::fourCC("NAM2"): reader.getZString(mNotes); break; // actor notes - case ESM4::SUB_NAM3: + case ESM::fourCC("NAM3"): reader.getZString(mEdits); break; // not in TES4 - case ESM4::SUB_CTDA: // FIXME: how to detect if 1st/2nd param is a formid? + case ESM::fourCC("CTDA"): // FIXME: how to detect if 1st/2nd param is a formid? { if (subHdr.dataSize == 24) // TES4 reader.get(&mTargetCondition, 24); @@ -105,7 +105,7 @@ void ESM4::DialogInfo::load(ESM4::Reader& reader) break; } - case ESM4::SUB_SCHR: + case ESM::fourCC("SCHR"): { if (!ignore) reader.get(mScript.scriptHeader); @@ -114,16 +114,16 @@ void ESM4::DialogInfo::load(ESM4::Reader& reader) break; } - case ESM4::SUB_SCDA: + case ESM::fourCC("SCDA"): reader.skipSubRecordData(); break; // compiled script data - case ESM4::SUB_SCTX: + case ESM::fourCC("SCTX"): reader.getString(mScript.scriptSource); break; - case ESM4::SUB_SCRO: + case ESM::fourCC("SCRO"): reader.getFormId(mScript.globReference); break; - case ESM4::SUB_SLSD: + case ESM::fourCC("SLSD"): { localVar.clear(); reader.get(localVar.index); @@ -136,7 +136,7 @@ void ESM4::DialogInfo::load(ESM4::Reader& reader) break; } - case ESM4::SUB_SCVR: // assumed always pair with SLSD + case ESM::fourCC("SCVR"): // assumed always pair with SLSD { reader.getZString(localVar.variableName); @@ -144,7 +144,7 @@ void ESM4::DialogInfo::load(ESM4::Reader& reader) break; } - case ESM4::SUB_SCRV: + case ESM::fourCC("SCRV"): { std::uint32_t index; reader.get(index); @@ -153,13 +153,13 @@ void ESM4::DialogInfo::load(ESM4::Reader& reader) break; } - case ESM4::SUB_NEXT: // FO3/FONV marker for next script header + case ESM::fourCC("NEXT"): // FO3/FONV marker for next script header { ignore = true; break; } - case ESM4::SUB_DATA: // always 3 for TES4 ? + case ESM::fourCC("DATA"): // always 3 for TES4 ? { if (subHdr.dataSize == 4) // FO3/FONV { @@ -171,48 +171,48 @@ void ESM4::DialogInfo::load(ESM4::Reader& reader) reader.skipSubRecordData(); // FIXME break; } - case ESM4::SUB_NAME: // FormId add topic (not always present) - case ESM4::SUB_CTDT: // older version of CTDA? 20 bytes - case ESM4::SUB_SCHD: // 28 bytes - case ESM4::SUB_TCLT: // FormId choice - case ESM4::SUB_TCLF: // FormId - case ESM4::SUB_PNAM: // TES4 DLC - case ESM4::SUB_TPIC: // TES4 DLC - case ESM4::SUB_ANAM: // FO3 speaker formid - case ESM4::SUB_DNAM: // FO3 speech challenge - case ESM4::SUB_KNAM: // FO3 formid - case ESM4::SUB_LNAM: // FONV - case ESM4::SUB_TCFU: // FONV - case ESM4::SUB_TIFC: // TES5 - case ESM4::SUB_TWAT: // TES5 - case ESM4::SUB_CIS1: // TES5 - case ESM4::SUB_CIS2: // TES5 - case ESM4::SUB_CNAM: // TES5 - case ESM4::SUB_ENAM: // TES5 - case ESM4::SUB_EDID: // TES5 - case ESM4::SUB_VMAD: // TES5 - case ESM4::SUB_BNAM: // TES5 - case ESM4::SUB_SNAM: // TES5 - case ESM4::SUB_ONAM: // TES5 - case ESM4::SUB_QNAM: // TES5 for mScript - case ESM4::SUB_RNAM: // TES5 - case ESM4::SUB_ALFA: // FO4 - case ESM4::SUB_GNAM: // FO4 - case ESM4::SUB_GREE: // FO4 - case ESM4::SUB_INAM: // FO4 - case ESM4::SUB_INCC: // FO4 - case ESM4::SUB_INTV: // FO4 - case ESM4::SUB_IOVR: // FO4 - case ESM4::SUB_MODQ: // FO4 - case ESM4::SUB_NAM0: // FO4 - case ESM4::SUB_NAM4: // FO4 - case ESM4::SUB_NAM9: // FO4 - case ESM4::SUB_SRAF: // FO4 - case ESM4::SUB_TIQS: // FO4 - case ESM4::SUB_TNAM: // FO4 - case ESM4::SUB_TRDA: // FO4 - case ESM4::SUB_TSCE: // FO4 - case ESM4::SUB_WZMD: // FO4 + case ESM::fourCC("NAME"): // FormId add topic (not always present) + case ESM::fourCC("CTDT"): // older version of CTDA? 20 bytes + case ESM::fourCC("SCHD"): // 28 bytes + case ESM::fourCC("TCLT"): // FormId choice + case ESM::fourCC("TCLF"): // FormId + case ESM::fourCC("PNAM"): // TES4 DLC + case ESM::fourCC("TPIC"): // TES4 DLC + case ESM::fourCC("ANAM"): // FO3 speaker formid + case ESM::fourCC("DNAM"): // FO3 speech challenge + case ESM::fourCC("KNAM"): // FO3 formid + case ESM::fourCC("LNAM"): // FONV + case ESM::fourCC("TCFU"): // FONV + case ESM::fourCC("TIFC"): // TES5 + case ESM::fourCC("TWAT"): // TES5 + case ESM::fourCC("CIS1"): // TES5 + case ESM::fourCC("CIS2"): // TES5 + case ESM::fourCC("CNAM"): // TES5 + case ESM::fourCC("ENAM"): // TES5 + case ESM::fourCC("EDID"): // TES5 + case ESM::fourCC("VMAD"): // TES5 + case ESM::fourCC("BNAM"): // TES5 + case ESM::fourCC("SNAM"): // TES5 + case ESM::fourCC("ONAM"): // TES5 + case ESM::fourCC("QNAM"): // TES5 for mScript + case ESM::fourCC("RNAM"): // TES5 + case ESM::fourCC("ALFA"): // FO4 + case ESM::fourCC("GNAM"): // FO4 + case ESM::fourCC("GREE"): // FO4 + case ESM::fourCC("INAM"): // FO4 + case ESM::fourCC("INCC"): // FO4 + case ESM::fourCC("INTV"): // FO4 + case ESM::fourCC("IOVR"): // FO4 + case ESM::fourCC("MODQ"): // FO4 + case ESM::fourCC("NAM0"): // FO4 + case ESM::fourCC("NAM4"): // FO4 + case ESM::fourCC("NAM9"): // FO4 + case ESM::fourCC("SRAF"): // FO4 + case ESM::fourCC("TIQS"): // FO4 + case ESM::fourCC("TNAM"): // FO4 + case ESM::fourCC("TRDA"): // FO4 + case ESM::fourCC("TSCE"): // FO4 + case ESM::fourCC("WZMD"): // FO4 reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadingr.cpp b/components/esm4/loadingr.cpp index d0b81fd4a1..64103058e5 100644 --- a/components/esm4/loadingr.cpp +++ b/components/esm4/loadingr.cpp @@ -42,10 +42,10 @@ void ESM4::Ingredient::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_FULL: + case ESM::fourCC("FULL"): { if (mFullName.empty()) { @@ -64,7 +64,7 @@ void ESM4::Ingredient::load(ESM4::Reader& reader) break; } } - case ESM4::SUB_DATA: + case ESM::fourCC("DATA"): { // if (reader.esmVersion() == ESM::VER_094 || reader.esmVersion() == ESM::VER_170) if (subHdr.dataSize == 8) // FO3 is size 4 even though VER_094 @@ -74,49 +74,49 @@ void ESM4::Ingredient::load(ESM4::Reader& reader) break; } - case ESM4::SUB_ICON: + case ESM::fourCC("ICON"): reader.getZString(mIcon); break; - case ESM4::SUB_MODL: + case ESM::fourCC("MODL"): reader.getZString(mModel); break; - case ESM4::SUB_SCRI: + case ESM::fourCC("SCRI"): reader.getFormId(mScriptId); break; - case ESM4::SUB_ENIT: + case ESM::fourCC("ENIT"): reader.get(mEnchantment); break; - case ESM4::SUB_MODB: + case ESM::fourCC("MODB"): reader.get(mBoundRadius); break; - case ESM4::SUB_SCIT: + case ESM::fourCC("SCIT"): { reader.get(mEffect); reader.adjustFormId(mEffect.formId); break; } - case ESM4::SUB_MODT: // Model data - case ESM4::SUB_MODC: - case ESM4::SUB_MODS: - case ESM4::SUB_MODF: // Model data end - case ESM4::SUB_EFID: - case ESM4::SUB_EFIT: - case ESM4::SUB_OBND: - case ESM4::SUB_KSIZ: - case ESM4::SUB_KWDA: - case ESM4::SUB_VMAD: - case ESM4::SUB_YNAM: - case ESM4::SUB_ZNAM: - case ESM4::SUB_ETYP: // FO3 - case ESM4::SUB_DAMC: // Destructible - case ESM4::SUB_DEST: - case ESM4::SUB_DMDC: - case ESM4::SUB_DMDL: - case ESM4::SUB_DMDT: - case ESM4::SUB_DMDS: - case ESM4::SUB_DSTA: - case ESM4::SUB_DSTD: - case ESM4::SUB_DSTF: // Destructible end + case ESM::fourCC("MODT"): // Model data + case ESM::fourCC("MODC"): + case ESM::fourCC("MODS"): + case ESM::fourCC("MODF"): // Model data end + case ESM::fourCC("EFID"): + case ESM::fourCC("EFIT"): + case ESM::fourCC("OBND"): + case ESM::fourCC("KSIZ"): + case ESM::fourCC("KWDA"): + case ESM::fourCC("VMAD"): + case ESM::fourCC("YNAM"): + case ESM::fourCC("ZNAM"): + case ESM::fourCC("ETYP"): // FO3 + case ESM::fourCC("DAMC"): // Destructible + case ESM::fourCC("DEST"): + case ESM::fourCC("DMDC"): + case ESM::fourCC("DMDL"): + case ESM::fourCC("DMDT"): + case ESM::fourCC("DMDS"): + case ESM::fourCC("DSTA"): + case ESM::fourCC("DSTD"): + case ESM::fourCC("DSTF"): // Destructible end { reader.skipSubRecordData(); break; diff --git a/components/esm4/loadkeym.cpp b/components/esm4/loadkeym.cpp index 9b0c280b8b..b430f7ce3d 100644 --- a/components/esm4/loadkeym.cpp +++ b/components/esm4/loadkeym.cpp @@ -41,54 +41,54 @@ void ESM4::Key::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_FULL: + case ESM::fourCC("FULL"): reader.getLocalizedString(mFullName); break; - case ESM4::SUB_MODL: + case ESM::fourCC("MODL"): reader.getZString(mModel); break; - case ESM4::SUB_ICON: + case ESM::fourCC("ICON"): reader.getZString(mIcon); break; - case ESM4::SUB_MICO: + case ESM::fourCC("MICO"): reader.getZString(mMiniIcon); break; // FO3 - case ESM4::SUB_DATA: + case ESM::fourCC("DATA"): reader.get(mData); break; - case ESM4::SUB_SCRI: + case ESM::fourCC("SCRI"): reader.getFormId(mScriptId); break; - case ESM4::SUB_MODB: + case ESM::fourCC("MODB"): reader.get(mBoundRadius); break; - case ESM4::SUB_YNAM: + case ESM::fourCC("YNAM"): reader.getFormId(mPickUpSound); break; - case ESM4::SUB_ZNAM: + case ESM::fourCC("ZNAM"): reader.getFormId(mDropSound); break; - case ESM4::SUB_MODT: // Model data - case ESM4::SUB_MODC: - case ESM4::SUB_MODS: - case ESM4::SUB_MODF: // Model data end - case ESM4::SUB_KSIZ: - case ESM4::SUB_KWDA: - case ESM4::SUB_OBND: - case ESM4::SUB_VMAD: - case ESM4::SUB_DAMC: // Destructible - case ESM4::SUB_DEST: - case ESM4::SUB_DMDC: - case ESM4::SUB_DMDL: - case ESM4::SUB_DMDT: - case ESM4::SUB_DMDS: - case ESM4::SUB_DSTA: - case ESM4::SUB_DSTD: - case ESM4::SUB_DSTF: // Destructible end - case ESM4::SUB_PTRN: // FO4 + case ESM::fourCC("MODT"): // Model data + case ESM::fourCC("MODC"): + case ESM::fourCC("MODS"): + case ESM::fourCC("MODF"): // Model data end + case ESM::fourCC("KSIZ"): + case ESM::fourCC("KWDA"): + case ESM::fourCC("OBND"): + case ESM::fourCC("VMAD"): + case ESM::fourCC("DAMC"): // Destructible + case ESM::fourCC("DEST"): + case ESM::fourCC("DMDC"): + case ESM::fourCC("DMDL"): + case ESM::fourCC("DMDT"): + case ESM::fourCC("DMDS"): + case ESM::fourCC("DSTA"): + case ESM::fourCC("DSTD"): + case ESM::fourCC("DSTF"): // Destructible end + case ESM::fourCC("PTRN"): // FO4 reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadland.cpp b/components/esm4/loadland.cpp index 2215b56dd1..53fb1de083 100644 --- a/components/esm4/loadland.cpp +++ b/components/esm4/loadland.cpp @@ -65,18 +65,18 @@ void ESM4::Land::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_DATA: + case ESM::fourCC("DATA"): { reader.get(mLandFlags); break; } - case ESM4::SUB_VNML: // vertex normals, 33x33x(1+1+1) = 3267 + case ESM::fourCC("VNML"): // vertex normals, 33x33x(1+1+1) = 3267 { reader.get(mVertNorm); mDataTypes |= LAND_VNML; break; } - case ESM4::SUB_VHGT: // vertex height gradient, 4+33x33+3 = 4+1089+3 = 1096 + case ESM::fourCC("VHGT"): // vertex height gradient, 4+33x33+3 = 4+1089+3 = 1096 { #if 0 reader.get(mHeightMap.heightOffset); @@ -88,13 +88,13 @@ void ESM4::Land::load(ESM4::Reader& reader) mDataTypes |= LAND_VHGT; break; } - case ESM4::SUB_VCLR: // vertex colours, 24bit RGB, 33x33x(1+1+1) = 3267 + case ESM::fourCC("VCLR"): // vertex colours, 24bit RGB, 33x33x(1+1+1) = 3267 { reader.get(mVertColr); mDataTypes |= LAND_VCLR; break; } - case ESM4::SUB_BTXT: + case ESM::fourCC("BTXT"): { BTXT base; if (reader.getExact(base)) @@ -112,7 +112,7 @@ void ESM4::Land::load(ESM4::Reader& reader) } break; } - case ESM4::SUB_ATXT: + case ESM::fourCC("ATXT"): { if (currentAddQuad != -1) { @@ -144,7 +144,7 @@ void ESM4::Land::load(ESM4::Reader& reader) currentAddQuad = layer.texture.quadrant; break; } - case ESM4::SUB_VTXT: + case ESM::fourCC("VTXT"): { if (currentAddQuad == -1) throw std::runtime_error("VTXT without ATXT found"); @@ -177,7 +177,7 @@ void ESM4::Land::load(ESM4::Reader& reader) // std::cout << "VTXT: count " << std::dec << count << std::endl; break; } - case ESM4::SUB_VTEX: // only in Oblivion? + case ESM::fourCC("VTEX"): // only in Oblivion? { const std::uint16_t count = reader.subRecordHeader().dataSize / sizeof(ESM::FormId32); if ((reader.subRecordHeader().dataSize % sizeof(ESM::FormId32)) != 0) @@ -191,7 +191,7 @@ void ESM4::Land::load(ESM4::Reader& reader) } break; } - case ESM4::SUB_MPCD: // FO4 + case ESM::fourCC("MPCD"): // FO4 reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadlgtm.cpp b/components/esm4/loadlgtm.cpp index 0959be10a2..ce895ea5b8 100644 --- a/components/esm4/loadlgtm.cpp +++ b/components/esm4/loadlgtm.cpp @@ -44,10 +44,10 @@ void ESM4::LightingTemplate::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_DATA: + case ESM::fourCC("DATA"): if (subHdr.dataSize == 36) // TES4 reader.get(&mLighting, 36); if (subHdr.dataSize == 40) // FO3/FONV @@ -60,7 +60,7 @@ void ESM4::LightingTemplate::load(ESM4::Reader& reader) else reader.skipSubRecordData(); // throw? break; - case ESM4::SUB_DALC: // TES5 + case ESM::fourCC("DALC"): // TES5 reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadligh.cpp b/components/esm4/loadligh.cpp index 0848ee8435..a0d467bafc 100644 --- a/components/esm4/loadligh.cpp +++ b/components/esm4/loadligh.cpp @@ -40,13 +40,13 @@ void ESM4::Light::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_FULL: + case ESM::fourCC("FULL"): reader.getLocalizedString(mFullName); break; - case ESM4::SUB_DATA: + case ESM::fourCC("DATA"): { if (subHdr.dataSize != 32 && subHdr.dataSize != 48 && subHdr.dataSize != 64) { @@ -78,47 +78,47 @@ void ESM4::Light::load(ESM4::Reader& reader) reader.get(mData.weight); break; } - case ESM4::SUB_MODL: + case ESM::fourCC("MODL"): reader.getZString(mModel); break; - case ESM4::SUB_ICON: + case ESM::fourCC("ICON"): reader.getZString(mIcon); break; - case ESM4::SUB_SCRI: + case ESM::fourCC("SCRI"): reader.getFormId(mScriptId); break; - case ESM4::SUB_SNAM: + case ESM::fourCC("SNAM"): reader.getFormId(mSound); break; - case ESM4::SUB_MODB: + case ESM::fourCC("MODB"): reader.get(mBoundRadius); break; - case ESM4::SUB_FNAM: + case ESM::fourCC("FNAM"): reader.get(mFade); break; - case ESM4::SUB_MODT: // Model data - case ESM4::SUB_MODC: - case ESM4::SUB_MODS: - case ESM4::SUB_MODF: // Model data end - case ESM4::SUB_OBND: - case ESM4::SUB_VMAD: - case ESM4::SUB_DAMC: // Destructible - case ESM4::SUB_DEST: - case ESM4::SUB_DMDC: - case ESM4::SUB_DMDL: - case ESM4::SUB_DMDT: - case ESM4::SUB_DMDS: - case ESM4::SUB_DSTA: - case ESM4::SUB_DSTD: - case ESM4::SUB_DSTF: // Destructible end - case ESM4::SUB_KSIZ: - case ESM4::SUB_KWDA: - case ESM4::SUB_LNAM: // FO4 - case ESM4::SUB_MICO: // FO4 - case ESM4::SUB_NAM0: // FO4 - case ESM4::SUB_PRPS: // FO4 - case ESM4::SUB_PTRN: // FO4 - case ESM4::SUB_WGDR: // FO4 + case ESM::fourCC("MODT"): // Model data + case ESM::fourCC("MODC"): + case ESM::fourCC("MODS"): + case ESM::fourCC("MODF"): // Model data end + case ESM::fourCC("OBND"): + case ESM::fourCC("VMAD"): + case ESM::fourCC("DAMC"): // Destructible + case ESM::fourCC("DEST"): + case ESM::fourCC("DMDC"): + case ESM::fourCC("DMDL"): + case ESM::fourCC("DMDT"): + case ESM::fourCC("DMDS"): + case ESM::fourCC("DSTA"): + case ESM::fourCC("DSTD"): + case ESM::fourCC("DSTF"): // Destructible end + case ESM::fourCC("KSIZ"): + case ESM::fourCC("KWDA"): + case ESM::fourCC("LNAM"): // FO4 + case ESM::fourCC("MICO"): // FO4 + case ESM::fourCC("NAM0"): // FO4 + case ESM::fourCC("PRPS"): // FO4 + case ESM::fourCC("PTRN"): // FO4 + case ESM::fourCC("WGDR"): // FO4 reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadltex.cpp b/components/esm4/loadltex.cpp index 9b2d12034f..a8b6c9ec81 100644 --- a/components/esm4/loadltex.cpp +++ b/components/esm4/loadltex.cpp @@ -41,10 +41,10 @@ void ESM4::LandTexture::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_HNAM: + case ESM::fourCC("HNAM"): { switch (subHdr.dataSize) { @@ -61,22 +61,22 @@ void ESM4::LandTexture::load(ESM4::Reader& reader) } break; } - case ESM4::SUB_ICON: + case ESM::fourCC("ICON"): reader.getZString(mTextureFile); break; // Oblivion only? - case ESM4::SUB_SNAM: + case ESM::fourCC("SNAM"): reader.get(mTextureSpecular); break; - case ESM4::SUB_GNAM: + case ESM::fourCC("GNAM"): reader.getFormId(mGrass.emplace_back()); break; - case ESM4::SUB_TNAM: + case ESM::fourCC("TNAM"): reader.getFormId(mTexture); break; // TES5, FO4 - case ESM4::SUB_MNAM: + case ESM::fourCC("MNAM"): reader.getFormId(mMaterial); break; // TES5, FO4 - case ESM4::SUB_INAM: + case ESM::fourCC("INAM"): reader.get(mMaterialFlags); break; // SSE default: diff --git a/components/esm4/loadlvlc.cpp b/components/esm4/loadlvlc.cpp index b1a0a0f241..8ce2497bcc 100644 --- a/components/esm4/loadlvlc.cpp +++ b/components/esm4/loadlvlc.cpp @@ -41,22 +41,22 @@ void ESM4::LevelledCreature::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_SCRI: + case ESM::fourCC("SCRI"): reader.getFormId(mScriptId); break; - case ESM4::SUB_TNAM: + case ESM::fourCC("TNAM"): reader.getFormId(mTemplate); break; - case ESM4::SUB_LVLD: + case ESM::fourCC("LVLD"): reader.get(mChanceNone); break; - case ESM4::SUB_LVLF: + case ESM::fourCC("LVLF"): reader.get(mLvlCreaFlags); break; - case ESM4::SUB_LVLO: + case ESM::fourCC("LVLO"): { static LVLO lvlo; if (subHdr.dataSize != 12) @@ -83,7 +83,7 @@ void ESM4::LevelledCreature::load(ESM4::Reader& reader) mLvlObject.push_back(lvlo); break; } - case ESM4::SUB_OBND: // FO3 + case ESM::fourCC("OBND"): // FO3 reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadlvli.cpp b/components/esm4/loadlvli.cpp index cab8db4a21..51e3e33a55 100644 --- a/components/esm4/loadlvli.cpp +++ b/components/esm4/loadlvli.cpp @@ -41,20 +41,20 @@ void ESM4::LevelledItem::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_LVLD: + case ESM::fourCC("LVLD"): reader.get(mChanceNone); break; - case ESM4::SUB_LVLF: + case ESM::fourCC("LVLF"): reader.get(mLvlItemFlags); mHasLvlItemFlags = true; break; - case ESM4::SUB_DATA: + case ESM::fourCC("DATA"): reader.get(mData); break; - case ESM4::SUB_LVLO: + case ESM::fourCC("LVLO"): { static LVLO lvlo; if (subHdr.dataSize != 12) @@ -76,14 +76,14 @@ void ESM4::LevelledItem::load(ESM4::Reader& reader) mLvlObject.push_back(lvlo); break; } - case ESM4::SUB_LLCT: - case ESM4::SUB_OBND: // FO3/FONV - case ESM4::SUB_COED: // FO3/FONV - case ESM4::SUB_LVLG: // FO3/FONV - case ESM4::SUB_LLKC: // FO4 - case ESM4::SUB_LVLM: // FO4 - case ESM4::SUB_LVSG: // FO4 - case ESM4::SUB_ONAM: // FO4 + case ESM::fourCC("LLCT"): + case ESM::fourCC("OBND"): // FO3/FONV + case ESM::fourCC("COED"): // FO3/FONV + case ESM::fourCC("LVLG"): // FO3/FONV + case ESM::fourCC("LLKC"): // FO4 + case ESM::fourCC("LVLM"): // FO4 + case ESM::fourCC("LVSG"): // FO4 + case ESM::fourCC("ONAM"): // FO4 reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadlvln.cpp b/components/esm4/loadlvln.cpp index febdcbeca9..6633d6ad7b 100644 --- a/components/esm4/loadlvln.cpp +++ b/components/esm4/loadlvln.cpp @@ -42,22 +42,22 @@ void ESM4::LevelledNpc::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_MODL: + case ESM::fourCC("MODL"): reader.getZString(mModel); break; - case ESM4::SUB_LLCT: + case ESM::fourCC("LLCT"): reader.get(mListCount); break; - case ESM4::SUB_LVLD: + case ESM::fourCC("LVLD"): reader.get(mChanceNone); break; - case ESM4::SUB_LVLF: + case ESM::fourCC("LVLF"): reader.get(mLvlActorFlags); break; - case ESM4::SUB_LVLO: + case ESM::fourCC("LVLO"): { static LVLO lvlo; if (subHdr.dataSize != 12) @@ -89,15 +89,15 @@ void ESM4::LevelledNpc::load(ESM4::Reader& reader) mLvlObject.push_back(lvlo); break; } - case ESM4::SUB_COED: // owner - case ESM4::SUB_OBND: // object bounds - case ESM4::SUB_MODT: // Model data - case ESM4::SUB_MODC: - case ESM4::SUB_MODS: - case ESM4::SUB_MODF: // Model data end - case ESM4::SUB_LLKC: // FO4 - case ESM4::SUB_LVLG: // FO4 - case ESM4::SUB_LVLM: // FO4 + case ESM::fourCC("COED"): // owner + case ESM::fourCC("OBND"): // object bounds + case ESM::fourCC("MODT"): // Model data + case ESM::fourCC("MODC"): + case ESM::fourCC("MODS"): + case ESM::fourCC("MODF"): // Model data end + case ESM::fourCC("LLKC"): // FO4 + case ESM::fourCC("LVLG"): // FO4 + case ESM::fourCC("LVLM"): // FO4 reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadmato.cpp b/components/esm4/loadmato.cpp index 13d5e7d83d..6d45b689ba 100644 --- a/components/esm4/loadmato.cpp +++ b/components/esm4/loadmato.cpp @@ -41,18 +41,18 @@ void ESM4::Material::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_MODL: + case ESM::fourCC("MODL"): reader.getZString(mModel); break; - case ESM4::SUB_DNAM: - case ESM4::SUB_DATA: - case ESM4::SUB_MODT: // Model data - case ESM4::SUB_MODC: - case ESM4::SUB_MODS: - case ESM4::SUB_MODF: // Model data end + case ESM::fourCC("DNAM"): + case ESM::fourCC("DATA"): + case ESM::fourCC("MODT"): // Model data + case ESM::fourCC("MODC"): + case ESM::fourCC("MODS"): + case ESM::fourCC("MODF"): // Model data end reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadmisc.cpp b/components/esm4/loadmisc.cpp index 6dfd69148d..b27e38f055 100644 --- a/components/esm4/loadmisc.cpp +++ b/components/esm4/loadmisc.cpp @@ -41,58 +41,58 @@ void ESM4::MiscItem::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_FULL: + case ESM::fourCC("FULL"): reader.getLocalizedString(mFullName); break; - case ESM4::SUB_MODL: + case ESM::fourCC("MODL"): reader.getZString(mModel); break; - case ESM4::SUB_ICON: + case ESM::fourCC("ICON"): reader.getZString(mIcon); break; - case ESM4::SUB_MICO: + case ESM::fourCC("MICO"): reader.getZString(mMiniIcon); break; // FO3 - case ESM4::SUB_SCRI: + case ESM::fourCC("SCRI"): reader.getFormId(mScriptId); break; - case ESM4::SUB_DATA: + case ESM::fourCC("DATA"): reader.get(mData); break; - case ESM4::SUB_MODB: + case ESM::fourCC("MODB"): reader.get(mBoundRadius); break; - case ESM4::SUB_YNAM: + case ESM::fourCC("YNAM"): reader.getFormId(mPickUpSound); break; - case ESM4::SUB_ZNAM: + case ESM::fourCC("ZNAM"): reader.getFormId(mDropSound); break; - case ESM4::SUB_MODT: // Model data - case ESM4::SUB_MODC: - case ESM4::SUB_MODS: - case ESM4::SUB_MODF: // Model data end - case ESM4::SUB_KSIZ: - case ESM4::SUB_KWDA: - case ESM4::SUB_OBND: - case ESM4::SUB_VMAD: - case ESM4::SUB_RNAM: // FONV - case ESM4::SUB_DAMC: // Destructible - case ESM4::SUB_DEST: - case ESM4::SUB_DMDC: - case ESM4::SUB_DMDL: - case ESM4::SUB_DMDT: - case ESM4::SUB_DMDS: - case ESM4::SUB_DSTA: - case ESM4::SUB_DSTD: - case ESM4::SUB_DSTF: // Destructible end - case ESM4::SUB_CDIX: // FO4 - case ESM4::SUB_CVPA: // FO4 - case ESM4::SUB_FIMD: // FO4 - case ESM4::SUB_PTRN: // FO4 + case ESM::fourCC("MODT"): // Model data + case ESM::fourCC("MODC"): + case ESM::fourCC("MODS"): + case ESM::fourCC("MODF"): // Model data end + case ESM::fourCC("KSIZ"): + case ESM::fourCC("KWDA"): + case ESM::fourCC("OBND"): + case ESM::fourCC("VMAD"): + case ESM::fourCC("RNAM"): // FONV + case ESM::fourCC("DAMC"): // Destructible + case ESM::fourCC("DEST"): + case ESM::fourCC("DMDC"): + case ESM::fourCC("DMDL"): + case ESM::fourCC("DMDT"): + case ESM::fourCC("DMDS"): + case ESM::fourCC("DSTA"): + case ESM::fourCC("DSTD"): + case ESM::fourCC("DSTF"): // Destructible end + case ESM::fourCC("CDIX"): // FO4 + case ESM::fourCC("CVPA"): // FO4 + case ESM::fourCC("FIMD"): // FO4 + case ESM::fourCC("PTRN"): // FO4 reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadmset.cpp b/components/esm4/loadmset.cpp index e15c508bc1..f7c088c47f 100644 --- a/components/esm4/loadmset.cpp +++ b/components/esm4/loadmset.cpp @@ -41,91 +41,91 @@ void ESM4::MediaSet::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_FULL: + case ESM::fourCC("FULL"): reader.getZString(mFullName); break; - case ESM4::SUB_NAM1: + case ESM::fourCC("NAM1"): reader.get(mSetType); break; - case ESM4::SUB_PNAM: + case ESM::fourCC("PNAM"): reader.get(mEnabled); break; - case ESM4::SUB_NAM2: + case ESM::fourCC("NAM2"): reader.getZString(mSet2); break; - case ESM4::SUB_NAM3: + case ESM::fourCC("NAM3"): reader.getZString(mSet3); break; - case ESM4::SUB_NAM4: + case ESM::fourCC("NAM4"): reader.getZString(mSet4); break; - case ESM4::SUB_NAM5: + case ESM::fourCC("NAM5"): reader.getZString(mSet5); break; - case ESM4::SUB_NAM6: + case ESM::fourCC("NAM6"): reader.getZString(mSet6); break; - case ESM4::SUB_NAM7: + case ESM::fourCC("NAM7"): reader.getZString(mSet7); break; - case ESM4::SUB_HNAM: + case ESM::fourCC("HNAM"): reader.getFormId(mSoundIntro); break; - case ESM4::SUB_INAM: + case ESM::fourCC("INAM"): reader.getFormId(mSoundOutro); break; - case ESM4::SUB_NAM8: + case ESM::fourCC("NAM8"): reader.get(mLevel8); break; - case ESM4::SUB_NAM9: + case ESM::fourCC("NAM9"): reader.get(mLevel9); break; - case ESM4::SUB_NAM0: + case ESM::fourCC("NAM0"): reader.get(mLevel0); break; - case ESM4::SUB_ANAM: + case ESM::fourCC("ANAM"): reader.get(mLevelA); break; - case ESM4::SUB_BNAM: + case ESM::fourCC("BNAM"): reader.get(mLevelB); break; - case ESM4::SUB_CNAM: + case ESM::fourCC("CNAM"): reader.get(mLevelC); break; - case ESM4::SUB_JNAM: + case ESM::fourCC("JNAM"): reader.get(mBoundaryDayOuter); break; - case ESM4::SUB_KNAM: + case ESM::fourCC("KNAM"): reader.get(mBoundaryDayMiddle); break; - case ESM4::SUB_LNAM: + case ESM::fourCC("LNAM"): reader.get(mBoundaryDayInner); break; - case ESM4::SUB_MNAM: + case ESM::fourCC("MNAM"): reader.get(mBoundaryNightOuter); break; - case ESM4::SUB_NNAM: + case ESM::fourCC("NNAM"): reader.get(mBoundaryNightMiddle); break; - case ESM4::SUB_ONAM: + case ESM::fourCC("ONAM"): reader.get(mBoundaryNightInner); break; - case ESM4::SUB_DNAM: + case ESM::fourCC("DNAM"): reader.get(mTime1); break; - case ESM4::SUB_ENAM: + case ESM::fourCC("ENAM"): reader.get(mTime2); break; - case ESM4::SUB_FNAM: + case ESM::fourCC("FNAM"): reader.get(mTime3); break; - case ESM4::SUB_GNAM: + case ESM::fourCC("GNAM"): reader.get(mTime4); break; - case ESM4::SUB_DATA: + case ESM::fourCC("DATA"): reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadmstt.cpp b/components/esm4/loadmstt.cpp index 14091e96f0..3e0cc9ea2d 100644 --- a/components/esm4/loadmstt.cpp +++ b/components/esm4/loadmstt.cpp @@ -41,41 +41,41 @@ void ESM4::MovableStatic::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_FULL: + case ESM::fourCC("FULL"): reader.getLocalizedString(mFullName); break; - case ESM4::SUB_MODL: + case ESM::fourCC("MODL"): reader.getZString(mModel); break; - case ESM4::SUB_DATA: + case ESM::fourCC("DATA"): reader.get(mData); break; - case ESM4::SUB_SNAM: + case ESM::fourCC("SNAM"): reader.getFormId(mLoopingSound); break; - case ESM4::SUB_DAMC: // Destructible - case ESM4::SUB_DEST: - case ESM4::SUB_DMDC: - case ESM4::SUB_DMDL: - case ESM4::SUB_DMDT: - case ESM4::SUB_DMDS: - case ESM4::SUB_DSTA: - case ESM4::SUB_DSTD: - case ESM4::SUB_DSTF: // Destructible end - case ESM4::SUB_OBND: // object bounds - case ESM4::SUB_KSIZ: - case ESM4::SUB_KWDA: - case ESM4::SUB_VMAD: - case ESM4::SUB_MODT: // Model data - case ESM4::SUB_MODC: - case ESM4::SUB_MODS: - case ESM4::SUB_MODF: // Model data end - case ESM4::SUB_MODB: - case ESM4::SUB_PRPS: - case ESM4::SUB_PTRN: // FO4 + case ESM::fourCC("DAMC"): // Destructible + case ESM::fourCC("DEST"): + case ESM::fourCC("DMDC"): + case ESM::fourCC("DMDL"): + case ESM::fourCC("DMDT"): + case ESM::fourCC("DMDS"): + case ESM::fourCC("DSTA"): + case ESM::fourCC("DSTD"): + case ESM::fourCC("DSTF"): // Destructible end + case ESM::fourCC("OBND"): // object bounds + case ESM::fourCC("KSIZ"): + case ESM::fourCC("KWDA"): + case ESM::fourCC("VMAD"): + case ESM::fourCC("MODT"): // Model data + case ESM::fourCC("MODC"): + case ESM::fourCC("MODS"): + case ESM::fourCC("MODF"): // Model data end + case ESM::fourCC("MODB"): + case ESM::fourCC("PRPS"): + case ESM::fourCC("PTRN"): // FO4 reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadmusc.cpp b/components/esm4/loadmusc.cpp index 47ed71b2cf..a06b4dc81c 100644 --- a/components/esm4/loadmusc.cpp +++ b/components/esm4/loadmusc.cpp @@ -43,16 +43,16 @@ void ESM4::Music::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_FNAM: + case ESM::fourCC("FNAM"): reader.getZString(mMusicFile); break; - case ESM4::SUB_ANAM: // FONV float (attenuation in db? loop if positive?) - case ESM4::SUB_WNAM: // TES5 - case ESM4::SUB_PNAM: // TES5 - case ESM4::SUB_TNAM: // TES5 + case ESM::fourCC("ANAM"): // FONV float (attenuation in db? loop if positive?) + case ESM::fourCC("WNAM"): // TES5 + case ESM::fourCC("PNAM"): // TES5 + case ESM::fourCC("TNAM"): // TES5 reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadnavi.cpp b/components/esm4/loadnavi.cpp index 5b73af606e..47befbf268 100644 --- a/components/esm4/loadnavi.cpp +++ b/components/esm4/loadnavi.cpp @@ -241,13 +241,13 @@ void ESM4::Navigation::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: // seems to be unused? + case ESM::fourCC("EDID"): // seems to be unused? { if (!reader.getZString(mEditorId)) throw std::runtime_error("NAVI EDID data read error"); break; } - case ESM4::SUB_NVPP: + case ESM::fourCC("NVPP"): { // FIXME: FO4 updates the format if (reader.hasFormVersion() && (esmVer == ESM::VER_095 || esmVer == ESM::VER_100)) @@ -330,14 +330,14 @@ void ESM4::Navigation::load(ESM4::Reader& reader) } break; } - case ESM4::SUB_NVER: + case ESM::fourCC("NVER"): { std::uint32_t version; // always the same? (0x0c) reader.get(version); // TODO: store this or use it for merging? // std::cout << "NAVI version " << std::dec << version << std::endl; break; } - case ESM4::SUB_NVMI: // multiple + case ESM::fourCC("NVMI"): // multiple { // Can only read TES4 navmesh data // Note FO4 FIXME above @@ -353,8 +353,8 @@ void ESM4::Navigation::load(ESM4::Reader& reader) mNavMeshInfo.push_back(nvmi); break; } - case ESM4::SUB_NVSI: // from Dawnguard onwards - case ESM4::SUB_NVCI: // FO3 + case ESM::fourCC("NVSI"): // from Dawnguard onwards + case ESM::fourCC("NVCI"): // FO3 { reader.skipSubRecordData(); // FIXME: break; diff --git a/components/esm4/loadnavm.cpp b/components/esm4/loadnavm.cpp index 828fd77ca1..ebe6a7dbbb 100644 --- a/components/esm4/loadnavm.cpp +++ b/components/esm4/loadnavm.cpp @@ -209,7 +209,7 @@ void ESM4::NavMesh::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_NVNM: + case ESM::fourCC("NVNM"): { // See FIXME in ESM4::Navigation::load. // FO4 updates the format @@ -224,19 +224,19 @@ void ESM4::NavMesh::load(ESM4::Reader& reader) mData.push_back(nvnm); // FIXME try swap break; } - case ESM4::SUB_ONAM: - case ESM4::SUB_PNAM: - case ESM4::SUB_NNAM: - case ESM4::SUB_NVER: // FO3 - case ESM4::SUB_DATA: // FO3 - case ESM4::SUB_NVVX: // FO3 - case ESM4::SUB_NVTR: // FO3 - case ESM4::SUB_NVCA: // FO3 - case ESM4::SUB_NVDP: // FO3 - case ESM4::SUB_NVGD: // FO3 - case ESM4::SUB_NVEX: // FO3 - case ESM4::SUB_EDID: // FO3 - case ESM4::SUB_MNAM: // FO4 + case ESM::fourCC("ONAM"): + case ESM::fourCC("PNAM"): + case ESM::fourCC("NNAM"): + case ESM::fourCC("NVER"): // FO3 + case ESM::fourCC("DATA"): // FO3 + case ESM::fourCC("NVVX"): // FO3 + case ESM::fourCC("NVTR"): // FO3 + case ESM::fourCC("NVCA"): // FO3 + case ESM::fourCC("NVDP"): // FO3 + case ESM::fourCC("NVGD"): // FO3 + case ESM::fourCC("NVEX"): // FO3 + case ESM::fourCC("EDID"): // FO3 + case ESM::fourCC("MNAM"): // FO4 reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadnote.cpp b/components/esm4/loadnote.cpp index 9c1b4b3140..aee7909e88 100644 --- a/components/esm4/loadnote.cpp +++ b/components/esm4/loadnote.cpp @@ -41,41 +41,41 @@ void ESM4::Note::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_FULL: + case ESM::fourCC("FULL"): reader.getLocalizedString(mFullName); break; - case ESM4::SUB_MODL: + case ESM::fourCC("MODL"): reader.getZString(mModel); break; - case ESM4::SUB_ICON: + case ESM::fourCC("ICON"): reader.getZString(mIcon); break; - case ESM4::SUB_MODB: + case ESM::fourCC("MODB"): reader.get(mBoundRadius); break; - case ESM4::SUB_YNAM: + case ESM::fourCC("YNAM"): reader.getFormId(mPickUpSound); break; - case ESM4::SUB_ZNAM: + case ESM::fourCC("ZNAM"): reader.getFormId(mDropSound); break; - case ESM4::SUB_DATA: - case ESM4::SUB_MODT: // Model data - case ESM4::SUB_MODC: - case ESM4::SUB_MODS: - case ESM4::SUB_MODF: // Model data end - case ESM4::SUB_ONAM: - case ESM4::SUB_SNAM: - case ESM4::SUB_TNAM: - case ESM4::SUB_XNAM: - case ESM4::SUB_OBND: - case ESM4::SUB_VMAD: - case ESM4::SUB_DNAM: // FO4 - case ESM4::SUB_PNAM: // FO4 - case ESM4::SUB_PTRN: // FO4 + case ESM::fourCC("DATA"): + case ESM::fourCC("MODT"): // Model data + case ESM::fourCC("MODC"): + case ESM::fourCC("MODS"): + case ESM::fourCC("MODF"): // Model data end + case ESM::fourCC("ONAM"): + case ESM::fourCC("SNAM"): + case ESM::fourCC("TNAM"): + case ESM::fourCC("XNAM"): + case ESM::fourCC("OBND"): + case ESM::fourCC("VMAD"): + case ESM::fourCC("DNAM"): // FO4 + case ESM::fourCC("PNAM"): // FO4 + case ESM::fourCC("PTRN"): // FO4 reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadnpc.cpp b/components/esm4/loadnpc.cpp index 885263d67b..9b8a1679ef 100644 --- a/components/esm4/loadnpc.cpp +++ b/components/esm4/loadnpc.cpp @@ -48,16 +48,16 @@ void ESM4::Npc::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_MODL: + case ESM::fourCC("MODL"): reader.getZString(mModel); break; // not for TES5, see Race - case ESM4::SUB_FULL: + case ESM::fourCC("FULL"): reader.getLocalizedString(mFullName); break; - case ESM4::SUB_CNTO: + case ESM::fourCC("CNTO"): { static InventoryItem inv; // FIXME: use unique_ptr here? reader.get(inv); @@ -65,13 +65,13 @@ void ESM4::Npc::load(ESM4::Reader& reader) mInventory.push_back(inv); break; } - case ESM4::SUB_SPLO: + case ESM::fourCC("SPLO"): reader.getFormId(mSpell.emplace_back()); break; - case ESM4::SUB_PKID: + case ESM::fourCC("PKID"): reader.getFormId(mAIPackages.emplace_back()); break; - case ESM4::SUB_SNAM: + case ESM::fourCC("SNAM"): { // FO4, FO76 if (subHdr.dataSize == 5) @@ -81,27 +81,27 @@ void ESM4::Npc::load(ESM4::Reader& reader) reader.adjustFormId(mFaction.faction); break; } - case ESM4::SUB_RNAM: + case ESM::fourCC("RNAM"): reader.getFormId(mRace); break; - case ESM4::SUB_CNAM: + case ESM::fourCC("CNAM"): reader.getFormId(mClass); break; - case ESM4::SUB_HNAM: + case ESM::fourCC("HNAM"): reader.getFormId(mHair); break; // not for TES5 - case ESM4::SUB_ENAM: + case ESM::fourCC("ENAM"): reader.getFormId(mEyes); break; // - case ESM4::SUB_INAM: + case ESM::fourCC("INAM"): reader.getFormId(mDeathItem); break; - case ESM4::SUB_SCRI: + case ESM::fourCC("SCRI"): reader.getFormId(mScriptId); break; // - case ESM4::SUB_AIDT: + case ESM::fourCC("AIDT"): { if (subHdr.dataSize != 12) { @@ -112,7 +112,7 @@ void ESM4::Npc::load(ESM4::Reader& reader) reader.get(mAIData); // TES4 break; } - case ESM4::SUB_ACBS: + case ESM::fourCC("ACBS"): { switch (subHdr.dataSize) { @@ -129,7 +129,7 @@ void ESM4::Npc::load(ESM4::Reader& reader) } break; } - case ESM4::SUB_DATA: + case ESM::fourCC("DATA"): { if (subHdr.dataSize == 0) break; @@ -140,19 +140,19 @@ void ESM4::Npc::load(ESM4::Reader& reader) reader.skipSubRecordData(); break; } - case ESM4::SUB_ZNAM: + case ESM::fourCC("ZNAM"): reader.getFormId(mCombatStyle); break; - case ESM4::SUB_CSCR: + case ESM::fourCC("CSCR"): reader.getFormId(mSoundBase); break; - case ESM4::SUB_CSDI: + case ESM::fourCC("CSDI"): reader.getFormId(mSound); break; - case ESM4::SUB_CSDC: + case ESM::fourCC("CSDC"): reader.get(mSoundChance); break; - case ESM4::SUB_WNAM: + case ESM::fourCC("WNAM"): { // FIXME: should be read into mWornArmor for FO4 if (reader.esmVersion() == ESM::VER_094 || reader.esmVersion() == ESM::VER_170) @@ -161,10 +161,10 @@ void ESM4::Npc::load(ESM4::Reader& reader) reader.get(mFootWeight); break; } - case ESM4::SUB_MODB: + case ESM::fourCC("MODB"): reader.get(mBoundRadius); break; - case ESM4::SUB_KFFZ: + case ESM::fourCC("KFFZ"): { // Seems to be only below 3, and only happens 3 times while loading TES4: // Forward_SheogorathWithCane.kf @@ -174,10 +174,10 @@ void ESM4::Npc::load(ESM4::Reader& reader) throw std::runtime_error("NPC_ KFFZ data read error"); break; } - case ESM4::SUB_LNAM: + case ESM::fourCC("LNAM"): reader.get(mHairLength); break; - case ESM4::SUB_HCLR: + case ESM::fourCC("HCLR"): { reader.get(mHairColour.red); reader.get(mHairColour.green); @@ -186,10 +186,10 @@ void ESM4::Npc::load(ESM4::Reader& reader) break; } - case ESM4::SUB_TPLT: + case ESM::fourCC("TPLT"): reader.getFormId(mBaseTemplate); break; - case ESM4::SUB_FGGS: + case ESM::fourCC("FGGS"): { mSymShapeModeCoefficients.resize(50); for (std::size_t i = 0; i < 50; ++i) @@ -197,7 +197,7 @@ void ESM4::Npc::load(ESM4::Reader& reader) break; } - case ESM4::SUB_FGGA: + case ESM::fourCC("FGGA"): { mAsymShapeModeCoefficients.resize(30); for (std::size_t i = 0; i < 30; ++i) @@ -205,7 +205,7 @@ void ESM4::Npc::load(ESM4::Reader& reader) break; } - case ESM4::SUB_FGTS: + case ESM::fourCC("FGTS"): { mSymTextureModeCoefficients.resize(50); for (std::size_t i = 0; i < 50; ++i) @@ -213,122 +213,122 @@ void ESM4::Npc::load(ESM4::Reader& reader) break; } - case ESM4::SUB_FNAM: + case ESM::fourCC("FNAM"): { reader.get(mFgRace); // std::cout << "race " << mEditorId << " " << mRace << std::endl; // FIXME // std::cout << "fg race " << mEditorId << " " << mFgRace << std::endl; // FIXME break; } - case ESM4::SUB_PNAM: // FO3/FONV/TES5 + case ESM::fourCC("PNAM"): // FO3/FONV/TES5 reader.getFormId(mHeadParts.emplace_back()); break; - case ESM4::SUB_HCLF: // TES5 hair colour + case ESM::fourCC("HCLF"): // TES5 hair colour { reader.getFormId(mHairColourId); break; } - case ESM4::SUB_BCLF: + case ESM::fourCC("BCLF"): { reader.getFormId(mBeardColourId); break; } - case ESM4::SUB_COCT: // TES5 + case ESM::fourCC("COCT"): // TES5 { std::uint32_t count; reader.get(count); break; } - case ESM4::SUB_DOFT: + case ESM::fourCC("DOFT"): reader.getFormId(mDefaultOutfit); break; - case ESM4::SUB_SOFT: + case ESM::fourCC("SOFT"): reader.getFormId(mSleepOutfit); break; - case ESM4::SUB_DPLT: + case ESM::fourCC("DPLT"): reader.getFormId(mDefaultPkg); break; // AI package list - case ESM4::SUB_DAMC: // Destructible - case ESM4::SUB_DEST: - case ESM4::SUB_DMDC: - case ESM4::SUB_DMDL: - case ESM4::SUB_DMDT: - case ESM4::SUB_DMDS: - case ESM4::SUB_DSTA: - case ESM4::SUB_DSTD: - case ESM4::SUB_DSTF: // Destructible end - case ESM4::SUB_NAM6: // height mult - case ESM4::SUB_NAM7: // weight mult - case ESM4::SUB_ATKR: - case ESM4::SUB_CRIF: - case ESM4::SUB_CSDT: - case ESM4::SUB_DNAM: - case ESM4::SUB_ECOR: - case ESM4::SUB_ANAM: - case ESM4::SUB_ATKD: - case ESM4::SUB_ATKE: - case ESM4::SUB_FTST: - case ESM4::SUB_KSIZ: - case ESM4::SUB_KWDA: - case ESM4::SUB_NAM5: - case ESM4::SUB_NAM8: - case ESM4::SUB_NAM9: - case ESM4::SUB_NAMA: - case ESM4::SUB_OBND: - case ESM4::SUB_PRKR: - case ESM4::SUB_PRKZ: - case ESM4::SUB_QNAM: - case ESM4::SUB_SPCT: - case ESM4::SUB_TIAS: - case ESM4::SUB_TINC: - case ESM4::SUB_TINI: - case ESM4::SUB_TINV: - case ESM4::SUB_VMAD: - case ESM4::SUB_VTCK: - case ESM4::SUB_GNAM: - case ESM4::SUB_SHRT: - case ESM4::SUB_SPOR: - case ESM4::SUB_EAMT: // FO3 - case ESM4::SUB_NAM4: // FO3 - case ESM4::SUB_COED: // FO3 - case ESM4::SUB_APPR: // FO4 - case ESM4::SUB_ATKS: // FO4 - case ESM4::SUB_ATKT: // FO4 - case ESM4::SUB_ATKW: // FO4 - case ESM4::SUB_ATTX: // FO4 - case ESM4::SUB_FTYP: // FO4 - case ESM4::SUB_LTPT: // FO4 - case ESM4::SUB_LTPC: // FO4 - case ESM4::SUB_MWGT: // FO4 - case ESM4::SUB_NTRM: // FO4 - case ESM4::SUB_PFRN: // FO4 - case ESM4::SUB_PRPS: // FO4 - case ESM4::SUB_PTRN: // FO4 - case ESM4::SUB_STCP: // FO4 - case ESM4::SUB_TETI: // FO4 - case ESM4::SUB_TEND: // FO4 - case ESM4::SUB_TPTA: // FO4 - case ESM4::SUB_OBTE: // FO4 object template start - case ESM4::SUB_OBTF: // - case ESM4::SUB_OBTS: // - case ESM4::SUB_STOP: // FO4 object template end - case ESM4::SUB_OCOR: // FO4 new package lists start - case ESM4::SUB_GWOR: // - case ESM4::SUB_FCPL: // - case ESM4::SUB_RCLR: // FO4 new package lists end - case ESM4::SUB_CS2D: // FO4 actor sound subrecords - case ESM4::SUB_CS2E: // - case ESM4::SUB_CS2F: // - case ESM4::SUB_CS2H: // - case ESM4::SUB_CS2K: // FO4 actor sound subrecords end - case ESM4::SUB_MSDK: // FO4 morph subrecords start - case ESM4::SUB_MSDV: // - case ESM4::SUB_MRSV: // - case ESM4::SUB_FMRI: // - case ESM4::SUB_FMRS: // - case ESM4::SUB_FMIN: // FO4 morph subrecords end + case ESM::fourCC("DAMC"): // Destructible + case ESM::fourCC("DEST"): + case ESM::fourCC("DMDC"): + case ESM::fourCC("DMDL"): + case ESM::fourCC("DMDT"): + case ESM::fourCC("DMDS"): + case ESM::fourCC("DSTA"): + case ESM::fourCC("DSTD"): + case ESM::fourCC("DSTF"): // Destructible end + case ESM::fourCC("NAM6"): // height mult + case ESM::fourCC("NAM7"): // weight mult + case ESM::fourCC("ATKR"): + case ESM::fourCC("CRIF"): + case ESM::fourCC("CSDT"): + case ESM::fourCC("DNAM"): + case ESM::fourCC("ECOR"): + case ESM::fourCC("ANAM"): + case ESM::fourCC("ATKD"): + case ESM::fourCC("ATKE"): + case ESM::fourCC("FTST"): + case ESM::fourCC("KSIZ"): + case ESM::fourCC("KWDA"): + case ESM::fourCC("NAM5"): + case ESM::fourCC("NAM8"): + case ESM::fourCC("NAM9"): + case ESM::fourCC("NAMA"): + case ESM::fourCC("OBND"): + case ESM::fourCC("PRKR"): + case ESM::fourCC("PRKZ"): + case ESM::fourCC("QNAM"): + case ESM::fourCC("SPCT"): + case ESM::fourCC("TIAS"): + case ESM::fourCC("TINC"): + case ESM::fourCC("TINI"): + case ESM::fourCC("TINV"): + case ESM::fourCC("VMAD"): + case ESM::fourCC("VTCK"): + case ESM::fourCC("GNAM"): + case ESM::fourCC("SHRT"): + case ESM::fourCC("SPOR"): + case ESM::fourCC("EAMT"): // FO3 + case ESM::fourCC("NAM4"): // FO3 + case ESM::fourCC("COED"): // FO3 + case ESM::fourCC("APPR"): // FO4 + case ESM::fourCC("ATKS"): // FO4 + case ESM::fourCC("ATKT"): // FO4 + case ESM::fourCC("ATKW"): // FO4 + case ESM::fourCC("ATTX"): // FO4 + case ESM::fourCC("FTYP"): // FO4 + case ESM::fourCC("LTPT"): // FO4 + case ESM::fourCC("LTPC"): // FO4 + case ESM::fourCC("MWGT"): // FO4 + case ESM::fourCC("NTRM"): // FO4 + case ESM::fourCC("PFRN"): // FO4 + case ESM::fourCC("PRPS"): // FO4 + case ESM::fourCC("PTRN"): // FO4 + case ESM::fourCC("STCP"): // FO4 + case ESM::fourCC("TETI"): // FO4 + case ESM::fourCC("TEND"): // FO4 + case ESM::fourCC("TPTA"): // FO4 + case ESM::fourCC("OBTE"): // FO4 object template start + case ESM::fourCC("OBTF"): // + case ESM::fourCC("OBTS"): // + case ESM::fourCC("STOP"): // FO4 object template end + case ESM::fourCC("OCOR"): // FO4 new package lists start + case ESM::fourCC("GWOR"): // + case ESM::fourCC("FCPL"): // + case ESM::fourCC("RCLR"): // FO4 new package lists end + case ESM::fourCC("CS2D"): // FO4 actor sound subrecords + case ESM::fourCC("CS2E"): // + case ESM::fourCC("CS2F"): // + case ESM::fourCC("CS2H"): // + case ESM::fourCC("CS2K"): // FO4 actor sound subrecords end + case ESM::fourCC("MSDK"): // FO4 morph subrecords start + case ESM::fourCC("MSDV"): // + case ESM::fourCC("MRSV"): // + case ESM::fourCC("FMRI"): // + case ESM::fourCC("FMRS"): // + case ESM::fourCC("FMIN"): // FO4 morph subrecords end reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadotft.cpp b/components/esm4/loadotft.cpp index b980de4a8c..a5fec9b002 100644 --- a/components/esm4/loadotft.cpp +++ b/components/esm4/loadotft.cpp @@ -41,10 +41,10 @@ void ESM4::Outfit::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_INAM: + case ESM::fourCC("INAM"): { mInventory.resize(subHdr.dataSize / sizeof(ESM::FormId32)); for (ESM::FormId& formId : mInventory) diff --git a/components/esm4/loadpack.cpp b/components/esm4/loadpack.cpp index ab75598121..5d81e38f43 100644 --- a/components/esm4/loadpack.cpp +++ b/components/esm4/loadpack.cpp @@ -42,10 +42,10 @@ void ESM4::AIPackage::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_PKDT: + case ESM::fourCC("PKDT"): { if (subHdr.dataSize != sizeof(PKDT) && subHdr.dataSize == 4) { @@ -60,7 +60,7 @@ void ESM4::AIPackage::load(ESM4::Reader& reader) break; } - case ESM4::SUB_PSDT: // reader.get(mSchedule); break; + case ESM::fourCC("PSDT"): // reader.get(mSchedule); break; { if (subHdr.dataSize != sizeof(mSchedule)) reader.skipSubRecordData(); // FIXME: @@ -69,7 +69,7 @@ void ESM4::AIPackage::load(ESM4::Reader& reader) break; } - case ESM4::SUB_PLDT: + case ESM::fourCC("PLDT"): { if (subHdr.dataSize != sizeof(mLocation)) reader.skipSubRecordData(); // FIXME: @@ -82,7 +82,7 @@ void ESM4::AIPackage::load(ESM4::Reader& reader) break; } - case ESM4::SUB_PTDT: + case ESM::fourCC("PTDT"): { if (subHdr.dataSize != sizeof(mTarget)) reader.skipSubRecordData(); // FIXME: FO3 @@ -95,7 +95,7 @@ void ESM4::AIPackage::load(ESM4::Reader& reader) break; } - case ESM4::SUB_CTDA: + case ESM::fourCC("CTDA"): { if (subHdr.dataSize != sizeof(CTDA)) { @@ -112,55 +112,55 @@ void ESM4::AIPackage::load(ESM4::Reader& reader) break; } - case ESM4::SUB_CTDT: // always 20 for TES4 - case ESM4::SUB_TNAM: // FO3 - case ESM4::SUB_INAM: // FO3 - case ESM4::SUB_CNAM: // FO3 - case ESM4::SUB_SCHR: // FO3 - case ESM4::SUB_POBA: // FO3 - case ESM4::SUB_POCA: // FO3 - case ESM4::SUB_POEA: // FO3 - case ESM4::SUB_SCTX: // FO3 - case ESM4::SUB_SCDA: // FO3 - case ESM4::SUB_SCRO: // FO3 - case ESM4::SUB_IDLA: // FO3 - case ESM4::SUB_IDLC: // FO3 - case ESM4::SUB_IDLF: // FO3 - case ESM4::SUB_IDLT: // FO3 - case ESM4::SUB_PKDD: // FO3 - case ESM4::SUB_PKD2: // FO3 - case ESM4::SUB_PKPT: // FO3 - case ESM4::SUB_PKED: // FO3 - case ESM4::SUB_PKE2: // FO3 - case ESM4::SUB_PKAM: // FO3 - case ESM4::SUB_PUID: // FO3 - case ESM4::SUB_PKW3: // FO3 - case ESM4::SUB_PTD2: // FO3 - case ESM4::SUB_PLD2: // FO3 - case ESM4::SUB_PKFD: // FO3 - case ESM4::SUB_SLSD: // FO3 - case ESM4::SUB_SCVR: // FO3 - case ESM4::SUB_SCRV: // FO3 - case ESM4::SUB_IDLB: // FO3 - case ESM4::SUB_ANAM: // TES5 - case ESM4::SUB_BNAM: // TES5 - case ESM4::SUB_FNAM: // TES5 - case ESM4::SUB_PNAM: // TES5 - case ESM4::SUB_QNAM: // TES5 - case ESM4::SUB_UNAM: // TES5 - case ESM4::SUB_XNAM: // TES5 - case ESM4::SUB_PDTO: // TES5 - case ESM4::SUB_PTDA: // TES5 - case ESM4::SUB_PFOR: // TES5 - case ESM4::SUB_PFO2: // TES5 - case ESM4::SUB_PRCB: // TES5 - case ESM4::SUB_PKCU: // TES5 - case ESM4::SUB_PKC2: // TES5 - case ESM4::SUB_CITC: // TES5 - case ESM4::SUB_CIS1: // TES5 - case ESM4::SUB_CIS2: // TES5 - case ESM4::SUB_VMAD: // TES5 - case ESM4::SUB_TPIC: // TES5 + case ESM::fourCC("CTDT"): // always 20 for TES4 + case ESM::fourCC("TNAM"): // FO3 + case ESM::fourCC("INAM"): // FO3 + case ESM::fourCC("CNAM"): // FO3 + case ESM::fourCC("SCHR"): // FO3 + case ESM::fourCC("POBA"): // FO3 + case ESM::fourCC("POCA"): // FO3 + case ESM::fourCC("POEA"): // FO3 + case ESM::fourCC("SCTX"): // FO3 + case ESM::fourCC("SCDA"): // FO3 + case ESM::fourCC("SCRO"): // FO3 + case ESM::fourCC("IDLA"): // FO3 + case ESM::fourCC("IDLC"): // FO3 + case ESM::fourCC("IDLF"): // FO3 + case ESM::fourCC("IDLT"): // FO3 + case ESM::fourCC("PKDD"): // FO3 + case ESM::fourCC("PKD2"): // FO3 + case ESM::fourCC("PKPT"): // FO3 + case ESM::fourCC("PKED"): // FO3 + case ESM::fourCC("PKE2"): // FO3 + case ESM::fourCC("PKAM"): // FO3 + case ESM::fourCC("PUID"): // FO3 + case ESM::fourCC("PKW3"): // FO3 + case ESM::fourCC("PTD2"): // FO3 + case ESM::fourCC("PLD2"): // FO3 + case ESM::fourCC("PKFD"): // FO3 + case ESM::fourCC("SLSD"): // FO3 + case ESM::fourCC("SCVR"): // FO3 + case ESM::fourCC("SCRV"): // FO3 + case ESM::fourCC("IDLB"): // FO3 + case ESM::fourCC("ANAM"): // TES5 + case ESM::fourCC("BNAM"): // TES5 + case ESM::fourCC("FNAM"): // TES5 + case ESM::fourCC("PNAM"): // TES5 + case ESM::fourCC("QNAM"): // TES5 + case ESM::fourCC("UNAM"): // TES5 + case ESM::fourCC("XNAM"): // TES5 + case ESM::fourCC("PDTO"): // TES5 + case ESM::fourCC("PTDA"): // TES5 + case ESM::fourCC("PFOR"): // TES5 + case ESM::fourCC("PFO2"): // TES5 + case ESM::fourCC("PRCB"): // TES5 + case ESM::fourCC("PKCU"): // TES5 + case ESM::fourCC("PKC2"): // TES5 + case ESM::fourCC("CITC"): // TES5 + case ESM::fourCC("CIS1"): // TES5 + case ESM::fourCC("CIS2"): // TES5 + case ESM::fourCC("VMAD"): // TES5 + case ESM::fourCC("TPIC"): // TES5 reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadpgrd.cpp b/components/esm4/loadpgrd.cpp index 12cbf6f28b..4246e7517e 100644 --- a/components/esm4/loadpgrd.cpp +++ b/components/esm4/loadpgrd.cpp @@ -44,10 +44,10 @@ void ESM4::Pathgrid::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_DATA: + case ESM::fourCC("DATA"): reader.get(mData); break; - case ESM4::SUB_PGRP: + case ESM::fourCC("PGRP"): { std::size_t numNodes = subHdr.dataSize / sizeof(PGRP); if (numNodes != std::size_t(mData)) // keep gcc quiet @@ -66,7 +66,7 @@ void ESM4::Pathgrid::load(ESM4::Reader& reader) break; } - case ESM4::SUB_PGRR: + case ESM::fourCC("PGRR"): { static PGRR link; @@ -91,7 +91,7 @@ void ESM4::Pathgrid::load(ESM4::Reader& reader) break; } - case ESM4::SUB_PGRI: + case ESM::fourCC("PGRI"): { std::size_t numForeign = subHdr.dataSize / sizeof(PGRI); mForeign.resize(numForeign); @@ -103,7 +103,7 @@ void ESM4::Pathgrid::load(ESM4::Reader& reader) break; } - case ESM4::SUB_PGRL: + case ESM::fourCC("PGRL"): { static PGRL objLink; reader.getFormId(objLink.object); @@ -118,7 +118,7 @@ void ESM4::Pathgrid::load(ESM4::Reader& reader) break; } - case ESM4::SUB_PGAG: + case ESM::fourCC("PGAG"): { #if 0 std::vector mDataBuf(subHdr.dataSize); diff --git a/components/esm4/loadpgre.cpp b/components/esm4/loadpgre.cpp index 4e473bd47a..123d2c967a 100644 --- a/components/esm4/loadpgre.cpp +++ b/components/esm4/loadpgre.cpp @@ -43,51 +43,51 @@ void ESM4::PlacedGrenade::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_NAME: - case ESM4::SUB_XEZN: - case ESM4::SUB_XRGD: - case ESM4::SUB_XRGB: - case ESM4::SUB_XPRD: - case ESM4::SUB_XPPA: - case ESM4::SUB_INAM: - case ESM4::SUB_TNAM: - case ESM4::SUB_XOWN: - case ESM4::SUB_XRNK: - case ESM4::SUB_XCNT: - case ESM4::SUB_XRDS: - case ESM4::SUB_XHLP: - case ESM4::SUB_XPWR: - case ESM4::SUB_XDCR: - case ESM4::SUB_XLKR: - case ESM4::SUB_XLKT: // FO4 - case ESM4::SUB_XCLP: - case ESM4::SUB_XAPD: - case ESM4::SUB_XAPR: - case ESM4::SUB_XATO: - case ESM4::SUB_XESP: - case ESM4::SUB_XEMI: - case ESM4::SUB_XMBR: - case ESM4::SUB_XIBS: - case ESM4::SUB_XSCL: - case ESM4::SUB_DATA: - case ESM4::SUB_VMAD: - case ESM4::SUB_MNAM: // FO4 - case ESM4::SUB_XAMC: // FO4 - case ESM4::SUB_XASP: // FO4 - case ESM4::SUB_XATP: // FO4 - case ESM4::SUB_XCVR: // FO4 - case ESM4::SUB_XFVC: // FO4 - case ESM4::SUB_XHTW: // FO4 - case ESM4::SUB_XIS2: // FO4 - case ESM4::SUB_XLOD: // FO4 - case ESM4::SUB_XLRL: // FO4 - case ESM4::SUB_XLRT: // FO4 - case ESM4::SUB_XLYR: // FO4 - case ESM4::SUB_XMSP: // FO4 - case ESM4::SUB_XRFG: // FO4 + case ESM::fourCC("NAME"): + case ESM::fourCC("XEZN"): + case ESM::fourCC("XRGD"): + case ESM::fourCC("XRGB"): + case ESM::fourCC("XPRD"): + case ESM::fourCC("XPPA"): + case ESM::fourCC("INAM"): + case ESM::fourCC("TNAM"): + case ESM::fourCC("XOWN"): + case ESM::fourCC("XRNK"): + case ESM::fourCC("XCNT"): + case ESM::fourCC("XRDS"): + case ESM::fourCC("XHLP"): + case ESM::fourCC("XPWR"): + case ESM::fourCC("XDCR"): + case ESM::fourCC("XLKR"): + case ESM::fourCC("XLKT"): // FO4 + case ESM::fourCC("XCLP"): + case ESM::fourCC("XAPD"): + case ESM::fourCC("XAPR"): + case ESM::fourCC("XATO"): + case ESM::fourCC("XESP"): + case ESM::fourCC("XEMI"): + case ESM::fourCC("XMBR"): + case ESM::fourCC("XIBS"): + case ESM::fourCC("XSCL"): + case ESM::fourCC("DATA"): + case ESM::fourCC("VMAD"): + case ESM::fourCC("MNAM"): // FO4 + case ESM::fourCC("XAMC"): // FO4 + case ESM::fourCC("XASP"): // FO4 + case ESM::fourCC("XATP"): // FO4 + case ESM::fourCC("XCVR"): // FO4 + case ESM::fourCC("XFVC"): // FO4 + case ESM::fourCC("XHTW"): // FO4 + case ESM::fourCC("XIS2"): // FO4 + case ESM::fourCC("XLOD"): // FO4 + case ESM::fourCC("XLRL"): // FO4 + case ESM::fourCC("XLRT"): // FO4 + case ESM::fourCC("XLYR"): // FO4 + case ESM::fourCC("XMSP"): // FO4 + case ESM::fourCC("XRFG"): // FO4 reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadpwat.cpp b/components/esm4/loadpwat.cpp index 339ae63daf..33a2c86546 100644 --- a/components/esm4/loadpwat.cpp +++ b/components/esm4/loadpwat.cpp @@ -43,12 +43,12 @@ void ESM4::PlaceableWater::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_OBND: - case ESM4::SUB_MODL: - case ESM4::SUB_DNAM: + case ESM::fourCC("OBND"): + case ESM::fourCC("MODL"): + case ESM::fourCC("DNAM"): reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadqust.cpp b/components/esm4/loadqust.cpp index b7f9b33db9..27c23d92f1 100644 --- a/components/esm4/loadqust.cpp +++ b/components/esm4/loadqust.cpp @@ -42,16 +42,16 @@ void ESM4::Quest::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_FULL: + case ESM::fourCC("FULL"): reader.getZString(mQuestName); break; - case ESM4::SUB_ICON: + case ESM::fourCC("ICON"): reader.getZString(mFileName); break; // TES4 (none in FO3/FONV) - case ESM4::SUB_DATA: + case ESM::fourCC("DATA"): { if (subHdr.dataSize == 2) // TES4 { @@ -66,10 +66,10 @@ void ESM4::Quest::load(ESM4::Reader& reader) break; } - case ESM4::SUB_SCRI: + case ESM::fourCC("SCRI"): reader.getFormId(mQuestScript); break; - case ESM4::SUB_CTDA: // FIXME: how to detect if 1st/2nd param is a formid? + case ESM::fourCC("CTDA"): // FIXME: how to detect if 1st/2nd param is a formid? { if (subHdr.dataSize == 24) // TES4 { @@ -95,80 +95,80 @@ void ESM4::Quest::load(ESM4::Reader& reader) break; } - case ESM4::SUB_SCHR: + case ESM::fourCC("SCHR"): reader.get(mScript.scriptHeader); break; - case ESM4::SUB_SCDA: + case ESM::fourCC("SCDA"): reader.skipSubRecordData(); break; // compiled script data - case ESM4::SUB_SCTX: + case ESM::fourCC("SCTX"): reader.getString(mScript.scriptSource); break; - case ESM4::SUB_SCRO: + case ESM::fourCC("SCRO"): reader.getFormId(mScript.globReference); break; - case ESM4::SUB_INDX: - case ESM4::SUB_QSDT: - case ESM4::SUB_CNAM: - case ESM4::SUB_QSTA: - case ESM4::SUB_NNAM: // FO3 - case ESM4::SUB_QOBJ: // FO3 - case ESM4::SUB_NAM0: // FO3 - case ESM4::SUB_ANAM: // TES5 - case ESM4::SUB_DNAM: // TES5 - case ESM4::SUB_ENAM: // TES5 - case ESM4::SUB_FNAM: // TES5 - case ESM4::SUB_NEXT: // TES5 - case ESM4::SUB_ALCA: // TES5 - case ESM4::SUB_ALCL: // TES5 - case ESM4::SUB_ALCO: // TES5 - case ESM4::SUB_ALDN: // TES5 - case ESM4::SUB_ALEA: // TES5 - case ESM4::SUB_ALED: // TES5 - case ESM4::SUB_ALEQ: // TES5 - case ESM4::SUB_ALFA: // TES5 - case ESM4::SUB_ALFC: // TES5 - case ESM4::SUB_ALFD: // TES5 - case ESM4::SUB_ALFE: // TES5 - case ESM4::SUB_ALFI: // TES5 - case ESM4::SUB_ALFL: // TES5 - case ESM4::SUB_ALFR: // TES5 - case ESM4::SUB_ALID: // TES5 - case ESM4::SUB_ALLS: // TES5 - case ESM4::SUB_ALNA: // TES5 - case ESM4::SUB_ALNT: // TES5 - case ESM4::SUB_ALPC: // TES5 - case ESM4::SUB_ALRT: // TES5 - case ESM4::SUB_ALSP: // TES5 - case ESM4::SUB_ALST: // TES5 - case ESM4::SUB_ALUA: // TES5 - case ESM4::SUB_CIS1: // TES5 - case ESM4::SUB_CIS2: // TES5 - case ESM4::SUB_CNTO: // TES5 - case ESM4::SUB_COCT: // TES5 - case ESM4::SUB_ECOR: // TES5 - case ESM4::SUB_FLTR: // TES5 - case ESM4::SUB_KNAM: // TES5 - case ESM4::SUB_KSIZ: // TES5 - case ESM4::SUB_KWDA: // TES5 - case ESM4::SUB_QNAM: // TES5 - case ESM4::SUB_QTGL: // TES5 - case ESM4::SUB_SPOR: // TES5 - case ESM4::SUB_VMAD: // TES5 - case ESM4::SUB_VTCK: // TES5 - case ESM4::SUB_ALCC: // FO4 - case ESM4::SUB_ALCS: // FO4 - case ESM4::SUB_ALDI: // FO4 - case ESM4::SUB_ALFV: // FO4 - case ESM4::SUB_ALLA: // FO4 - case ESM4::SUB_ALMI: // FO4 - case ESM4::SUB_GNAM: // FO4 - case ESM4::SUB_GWOR: // FO4 - case ESM4::SUB_LNAM: // FO4 - case ESM4::SUB_NAM2: // FO4 - case ESM4::SUB_OCOR: // FO4 - case ESM4::SUB_SNAM: // FO4 - case ESM4::SUB_XNAM: // FO4 + case ESM::fourCC("INDX"): + case ESM::fourCC("QSDT"): + case ESM::fourCC("CNAM"): + case ESM::fourCC("QSTA"): + case ESM::fourCC("NNAM"): // FO3 + case ESM::fourCC("QOBJ"): // FO3 + case ESM::fourCC("NAM0"): // FO3 + case ESM::fourCC("ANAM"): // TES5 + case ESM::fourCC("DNAM"): // TES5 + case ESM::fourCC("ENAM"): // TES5 + case ESM::fourCC("FNAM"): // TES5 + case ESM::fourCC("NEXT"): // TES5 + case ESM::fourCC("ALCA"): // TES5 + case ESM::fourCC("ALCL"): // TES5 + case ESM::fourCC("ALCO"): // TES5 + case ESM::fourCC("ALDN"): // TES5 + case ESM::fourCC("ALEA"): // TES5 + case ESM::fourCC("ALED"): // TES5 + case ESM::fourCC("ALEQ"): // TES5 + case ESM::fourCC("ALFA"): // TES5 + case ESM::fourCC("ALFC"): // TES5 + case ESM::fourCC("ALFD"): // TES5 + case ESM::fourCC("ALFE"): // TES5 + case ESM::fourCC("ALFI"): // TES5 + case ESM::fourCC("ALFL"): // TES5 + case ESM::fourCC("ALFR"): // TES5 + case ESM::fourCC("ALID"): // TES5 + case ESM::fourCC("ALLS"): // TES5 + case ESM::fourCC("ALNA"): // TES5 + case ESM::fourCC("ALNT"): // TES5 + case ESM::fourCC("ALPC"): // TES5 + case ESM::fourCC("ALRT"): // TES5 + case ESM::fourCC("ALSP"): // TES5 + case ESM::fourCC("ALST"): // TES5 + case ESM::fourCC("ALUA"): // TES5 + case ESM::fourCC("CIS1"): // TES5 + case ESM::fourCC("CIS2"): // TES5 + case ESM::fourCC("CNTO"): // TES5 + case ESM::fourCC("COCT"): // TES5 + case ESM::fourCC("ECOR"): // TES5 + case ESM::fourCC("FLTR"): // TES5 + case ESM::fourCC("KNAM"): // TES5 + case ESM::fourCC("KSIZ"): // TES5 + case ESM::fourCC("KWDA"): // TES5 + case ESM::fourCC("QNAM"): // TES5 + case ESM::fourCC("QTGL"): // TES5 + case ESM::fourCC("SPOR"): // TES5 + case ESM::fourCC("VMAD"): // TES5 + case ESM::fourCC("VTCK"): // TES5 + case ESM::fourCC("ALCC"): // FO4 + case ESM::fourCC("ALCS"): // FO4 + case ESM::fourCC("ALDI"): // FO4 + case ESM::fourCC("ALFV"): // FO4 + case ESM::fourCC("ALLA"): // FO4 + case ESM::fourCC("ALMI"): // FO4 + case ESM::fourCC("GNAM"): // FO4 + case ESM::fourCC("GWOR"): // FO4 + case ESM::fourCC("LNAM"): // FO4 + case ESM::fourCC("NAM2"): // FO4 + case ESM::fourCC("OCOR"): // FO4 + case ESM::fourCC("SNAM"): // FO4 + case ESM::fourCC("XNAM"): // FO4 reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadrace.cpp b/components/esm4/loadrace.cpp index 7434a7f87f..02f6f953b4 100644 --- a/components/esm4/loadrace.cpp +++ b/components/esm4/loadrace.cpp @@ -52,7 +52,7 @@ void ESM4::Race::load(ESM4::Reader& reader) // std::cout << "RACE " << ESM::printName(subHdr.typeId) << std::endl; switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): { reader.getZString(mEditorId); // TES4 @@ -73,10 +73,10 @@ void ESM4::Race::load(ESM4::Reader& reader) // Imperial 0x00000907 break; } - case ESM4::SUB_FULL: + case ESM::fourCC("FULL"): reader.getLocalizedString(mFullName); break; - case ESM4::SUB_DESC: + case ESM::fourCC("DESC"): { if (subHdr.dataSize == 1) // FO3? { @@ -87,10 +87,10 @@ void ESM4::Race::load(ESM4::Reader& reader) reader.getLocalizedString(mDesc); break; } - case ESM4::SUB_SPLO: // bonus spell formid (TES5 may have SPCT and multiple SPLO) + case ESM::fourCC("SPLO"): // bonus spell formid (TES5 may have SPCT and multiple SPLO) reader.getFormId(mBonusSpells.emplace_back()); break; - case ESM4::SUB_DATA: // ?? different length for TES5 + case ESM::fourCC("DATA"): // ?? different length for TES5 { // DATA:size 128 // 0f 0f ff 00 ff 00 ff 00 ff 00 ff 00 ff 00 00 00 @@ -210,14 +210,14 @@ void ESM4::Race::load(ESM4::Reader& reader) #endif break; } - case ESM4::SUB_DNAM: + case ESM::fourCC("DNAM"): { reader.getFormId(mDefaultHair[0]); // male reader.getFormId(mDefaultHair[1]); // female break; } - case ESM4::SUB_CNAM: + case ESM::fourCC("CNAM"): // CNAM SNAM VNAM // Sheogorath 0x0 0000 98 2b 10011000 00101011 // Golden Saint 0x3 0011 26 46 00100110 01000110 @@ -238,13 +238,13 @@ void ESM4::Race::load(ESM4::Reader& reader) reader.skipSubRecordData(); break; } - case ESM4::SUB_PNAM: + case ESM::fourCC("PNAM"): reader.get(mFaceGenMainClamp); break; // 0x40A00000 = 5.f - case ESM4::SUB_UNAM: + case ESM::fourCC("UNAM"): reader.get(mFaceGenFaceClamp); break; // 0x40400000 = 3.f - case ESM4::SUB_ATTR: // Only in TES4? + case ESM::fourCC("ATTR"): // Only in TES4? { if (subHdr.dataSize == 2) // FO3? { @@ -276,7 +276,7 @@ void ESM4::Race::load(ESM4::Reader& reader) // | | // +-------------+ // - case ESM4::SUB_NAM0: // start marker head data /* 1 */ + case ESM::fourCC("NAM0"): // start marker head data /* 1 */ { curr_part = 0; // head part @@ -296,7 +296,7 @@ void ESM4::Race::load(ESM4::Reader& reader) currentIndex = 0xffffffff; break; } - case ESM4::SUB_INDX: + case ESM::fourCC("INDX"): { reader.get(currentIndex); // FIXME: below check is rather useless @@ -313,7 +313,7 @@ void ESM4::Race::load(ESM4::Reader& reader) break; } - case ESM4::SUB_MODL: + case ESM::fourCC("MODL"): { if (currentIndex == 0xffffffff) { @@ -350,10 +350,10 @@ void ESM4::Race::load(ESM4::Reader& reader) break; } - case ESM4::SUB_MODB: + case ESM::fourCC("MODB"): reader.skipSubRecordData(); break; // always 0x0000? - case ESM4::SUB_ICON: + case ESM::fourCC("ICON"): { if (currentIndex == 0xffffffff) { @@ -379,7 +379,7 @@ void ESM4::Race::load(ESM4::Reader& reader) break; } // - case ESM4::SUB_NAM1: // start marker body data /* 4 */ + case ESM::fourCC("NAM1"): // start marker body data /* 4 */ { if (isFO3 || isFONV) @@ -406,14 +406,14 @@ void ESM4::Race::load(ESM4::Reader& reader) break; } - case ESM4::SUB_MNAM: + case ESM::fourCC("MNAM"): isMale = true; break; /* 2, 5, 7 */ - case ESM4::SUB_FNAM: + case ESM::fourCC("FNAM"): isMale = false; break; /* 3, 6, 8 */ // - case ESM4::SUB_HNAM: + case ESM::fourCC("HNAM"): { // FIXME: this is a texture name in FO4 if (subHdr.dataSize % sizeof(ESM::FormId32) != 0) @@ -428,7 +428,7 @@ void ESM4::Race::load(ESM4::Reader& reader) break; } - case ESM4::SUB_ENAM: + case ESM::fourCC("ENAM"): { std::size_t numEyeChoices = subHdr.dataSize / sizeof(ESM::FormId32); mEyeChoices.resize(numEyeChoices); @@ -437,7 +437,7 @@ void ESM4::Race::load(ESM4::Reader& reader) break; } - case ESM4::SUB_FGGS: + case ESM::fourCC("FGGS"): { if (isMale || isTES4) { @@ -454,7 +454,7 @@ void ESM4::Race::load(ESM4::Reader& reader) break; } - case ESM4::SUB_FGGA: + case ESM::fourCC("FGGA"): { if (isMale || isTES4) { @@ -471,7 +471,7 @@ void ESM4::Race::load(ESM4::Reader& reader) break; } - case ESM4::SUB_FGTS: + case ESM::fourCC("FGTS"): { if (isMale || isTES4) { @@ -489,12 +489,12 @@ void ESM4::Race::load(ESM4::Reader& reader) break; } // - case ESM4::SUB_SNAM: // skipping...2 // only in TES4? + case ESM::fourCC("SNAM"): // skipping...2 // only in TES4? { reader.skipSubRecordData(); break; } - case ESM4::SUB_XNAM: + case ESM::fourCC("XNAM"): { ESM::FormId race; std::int32_t adjustment; @@ -504,7 +504,7 @@ void ESM4::Race::load(ESM4::Reader& reader) break; } - case ESM4::SUB_VNAM: + case ESM::fourCC("VNAM"): { if (subHdr.dataSize == 8) // TES4 { @@ -528,7 +528,7 @@ void ESM4::Race::load(ESM4::Reader& reader) break; } // - case ESM4::SUB_ANAM: // TES5 + case ESM::fourCC("ANAM"): // TES5 { if (isMale) reader.getZString(mModelMale); @@ -536,10 +536,10 @@ void ESM4::Race::load(ESM4::Reader& reader) reader.getZString(mModelFemale); break; } - case ESM4::SUB_KSIZ: + case ESM::fourCC("KSIZ"): reader.get(mNumKeywords); break; - case ESM4::SUB_KWDA: + case ESM::fourCC("KWDA"): { ESM::FormId formid; for (unsigned int i = 0; i < mNumKeywords; ++i) @@ -547,13 +547,13 @@ void ESM4::Race::load(ESM4::Reader& reader) break; } // - case ESM4::SUB_WNAM: // ARMO FormId + case ESM::fourCC("WNAM"): // ARMO FormId { reader.getFormId(mSkin); // std::cout << mEditorId << " skin " << formIdToString(mSkin) << std::endl; // FIXME break; } - case ESM4::SUB_BODT: // body template + case ESM::fourCC("BODT"): // body template { reader.get(mBodyTemplate.bodyPart); reader.get(mBodyTemplate.flags); @@ -564,7 +564,7 @@ void ESM4::Race::load(ESM4::Reader& reader) break; } - case ESM4::SUB_BOD2: + case ESM::fourCC("BOD2"): { if (subHdr.dataSize == 8 || subHdr.dataSize == 4) // TES5, FO4 { @@ -584,7 +584,7 @@ void ESM4::Race::load(ESM4::Reader& reader) break; } - case ESM4::SUB_HEAD: // TES5 + case ESM::fourCC("HEAD"): // TES5 { ESM::FormId formId; reader.getFormId(formId); @@ -611,7 +611,7 @@ void ESM4::Race::load(ESM4::Reader& reader) break; } - case ESM4::SUB_NAM3: // start of hkx model + case ESM::fourCC("NAM3"): // start of hkx model { curr_part = 3; // for TES5 NAM3 indicates the start of hkx model @@ -651,7 +651,7 @@ void ESM4::Race::load(ESM4::Reader& reader) // ManakinRace // ManakinRace // ManakinRace FX0 - case ESM4::SUB_NAME: // TES5 biped object names (x32) + case ESM::fourCC("NAME"): // TES5 biped object names (x32) { std::string name; reader.getZString(name); @@ -659,112 +659,112 @@ void ESM4::Race::load(ESM4::Reader& reader) break; } - case ESM4::SUB_MTNM: // movement type - case ESM4::SUB_ATKD: // attack data - case ESM4::SUB_ATKE: // attach event - case ESM4::SUB_GNAM: // body part data - case ESM4::SUB_NAM4: // material type - case ESM4::SUB_NAM5: // unarmed impact? - case ESM4::SUB_LNAM: // close loot sound - case ESM4::SUB_QNAM: // equipment slot formid - case ESM4::SUB_HCLF: // default hair colour - case ESM4::SUB_UNES: // unarmed equipment slot formid - case ESM4::SUB_TINC: - case ESM4::SUB_TIND: - case ESM4::SUB_TINI: - case ESM4::SUB_TINL: - case ESM4::SUB_TINP: - case ESM4::SUB_TINT: - case ESM4::SUB_TINV: - case ESM4::SUB_TIRS: - case ESM4::SUB_PHWT: - case ESM4::SUB_AHCF: - case ESM4::SUB_AHCM: - case ESM4::SUB_MPAI: - case ESM4::SUB_MPAV: - case ESM4::SUB_DFTF: - case ESM4::SUB_DFTM: - case ESM4::SUB_FLMV: - case ESM4::SUB_FTSF: - case ESM4::SUB_FTSM: - case ESM4::SUB_MTYP: - case ESM4::SUB_NAM7: - case ESM4::SUB_NAM8: - case ESM4::SUB_PHTN: - case ESM4::SUB_RNAM: - case ESM4::SUB_RNMV: - case ESM4::SUB_RPRF: - case ESM4::SUB_RPRM: - case ESM4::SUB_SNMV: - case ESM4::SUB_SPCT: - case ESM4::SUB_SPED: - case ESM4::SUB_SWMV: - case ESM4::SUB_WKMV: - case ESM4::SUB_SPMV: - case ESM4::SUB_ATKR: - case ESM4::SUB_CTDA: - case ESM4::SUB_CIS1: - case ESM4::SUB_CIS2: - case ESM4::SUB_MODT: // Model data - case ESM4::SUB_MODC: - case ESM4::SUB_MODS: - case ESM4::SUB_MODF: // Model data end + case ESM::fourCC("MTNM"): // movement type + case ESM::fourCC("ATKD"): // attack data + case ESM::fourCC("ATKE"): // attach event + case ESM::fourCC("GNAM"): // body part data + case ESM::fourCC("NAM4"): // material type + case ESM::fourCC("NAM5"): // unarmed impact? + case ESM::fourCC("LNAM"): // close loot sound + case ESM::fourCC("QNAM"): // equipment slot formid + case ESM::fourCC("HCLF"): // default hair colour + case ESM::fourCC("UNES"): // unarmed equipment slot formid + case ESM::fourCC("TINC"): + case ESM::fourCC("TIND"): + case ESM::fourCC("TINI"): + case ESM::fourCC("TINL"): + case ESM::fourCC("TINP"): + case ESM::fourCC("TINT"): + case ESM::fourCC("TINV"): + case ESM::fourCC("TIRS"): + case ESM::fourCC("PHWT"): + case ESM::fourCC("AHCF"): + case ESM::fourCC("AHCM"): + case ESM::fourCC("MPAI"): + case ESM::fourCC("MPAV"): + case ESM::fourCC("DFTF"): + case ESM::fourCC("DFTM"): + case ESM::fourCC("FLMV"): + case ESM::fourCC("FTSF"): + case ESM::fourCC("FTSM"): + case ESM::fourCC("MTYP"): + case ESM::fourCC("NAM7"): + case ESM::fourCC("NAM8"): + case ESM::fourCC("PHTN"): + case ESM::fourCC("RNAM"): + case ESM::fourCC("RNMV"): + case ESM::fourCC("RPRF"): + case ESM::fourCC("RPRM"): + case ESM::fourCC("SNMV"): + case ESM::fourCC("SPCT"): + case ESM::fourCC("SPED"): + case ESM::fourCC("SWMV"): + case ESM::fourCC("WKMV"): + case ESM::fourCC("SPMV"): + case ESM::fourCC("ATKR"): + case ESM::fourCC("CTDA"): + case ESM::fourCC("CIS1"): + case ESM::fourCC("CIS2"): + case ESM::fourCC("MODT"): // Model data + case ESM::fourCC("MODC"): + case ESM::fourCC("MODS"): + case ESM::fourCC("MODF"): // Model data end // - case ESM4::SUB_YNAM: // FO3 - case ESM4::SUB_NAM2: // FO3 - case ESM4::SUB_VTCK: // FO3 - case ESM4::SUB_MODD: // FO3 - case ESM4::SUB_ONAM: // FO3 - case ESM4::SUB_APPR: // FO4 - case ESM4::SUB_ATKS: // FO4 - case ESM4::SUB_ATKT: // FO4 - case ESM4::SUB_ATKW: // FO4 - case ESM4::SUB_BMMP: // FO4 - case ESM4::SUB_BSMB: // FO4 - case ESM4::SUB_BSMP: // FO4 - case ESM4::SUB_BSMS: // FO4 - - case ESM4::SUB_FMRI: // FO4 - case ESM4::SUB_FMRN: // FO4 - case ESM4::SUB_HLTX: // FO4 - case ESM4::SUB_MLSI: // FO4 - case ESM4::SUB_MPGN: // FO4 - case ESM4::SUB_MPGS: // FO4 - case ESM4::SUB_MPPC: // FO4 - case ESM4::SUB_MPPF: // FO4 - case ESM4::SUB_MPPI: // FO4 - case ESM4::SUB_MPPK: // FO4 - case ESM4::SUB_MPPM: // FO4 - case ESM4::SUB_MPPN: // FO4 - case ESM4::SUB_MPPT: // FO4 - case ESM4::SUB_MSID: // FO4 - case ESM4::SUB_MSM0: // FO4 - case ESM4::SUB_MSM1: // FO4 - case ESM4::SUB_NNAM: // FO4 - case ESM4::SUB_NTOP: // FO4 - case ESM4::SUB_PRPS: // FO4 - case ESM4::SUB_PTOP: // FO4 - case ESM4::SUB_QSTI: // FO4 - case ESM4::SUB_RBPC: // FO4 - case ESM4::SUB_SADD: // FO4 - case ESM4::SUB_SAKD: // FO4 - case ESM4::SUB_SAPT: // FO4 - case ESM4::SUB_SGNM: // FO4 - case ESM4::SUB_SRAC: // FO4 - case ESM4::SUB_SRAF: // FO4 - case ESM4::SUB_STCP: // FO4 - case ESM4::SUB_STKD: // FO4 - case ESM4::SUB_TETI: // FO4 - case ESM4::SUB_TTEB: // FO4 - case ESM4::SUB_TTEC: // FO4 - case ESM4::SUB_TTED: // FO4 - case ESM4::SUB_TTEF: // FO4 - case ESM4::SUB_TTET: // FO4 - case ESM4::SUB_TTGE: // FO4 - case ESM4::SUB_TTGP: // FO4 - case ESM4::SUB_UNWP: // FO4 - case ESM4::SUB_WMAP: // FO4 - case ESM4::SUB_ZNAM: // FO4 + case ESM::fourCC("YNAM"): // FO3 + case ESM::fourCC("NAM2"): // FO3 + case ESM::fourCC("VTCK"): // FO3 + case ESM::fourCC("MODD"): // FO3 + case ESM::fourCC("ONAM"): // FO3 + case ESM::fourCC("APPR"): // FO4 + case ESM::fourCC("ATKS"): // FO4 + case ESM::fourCC("ATKT"): // FO4 + case ESM::fourCC("ATKW"): // FO4 + case ESM::fourCC("BMMP"): // FO4 + case ESM::fourCC("BSMB"): // FO4 + case ESM::fourCC("BSMP"): // FO4 + case ESM::fourCC("BSMS"): // FO4 + + case ESM::fourCC("FMRI"): // FO4 + case ESM::fourCC("FMRN"): // FO4 + case ESM::fourCC("HLTX"): // FO4 + case ESM::fourCC("MLSI"): // FO4 + case ESM::fourCC("MPGN"): // FO4 + case ESM::fourCC("MPGS"): // FO4 + case ESM::fourCC("MPPC"): // FO4 + case ESM::fourCC("MPPF"): // FO4 + case ESM::fourCC("MPPI"): // FO4 + case ESM::fourCC("MPPK"): // FO4 + case ESM::fourCC("MPPM"): // FO4 + case ESM::fourCC("MPPN"): // FO4 + case ESM::fourCC("MPPT"): // FO4 + case ESM::fourCC("MSID"): // FO4 + case ESM::fourCC("MSM0"): // FO4 + case ESM::fourCC("MSM1"): // FO4 + case ESM::fourCC("NNAM"): // FO4 + case ESM::fourCC("NTOP"): // FO4 + case ESM::fourCC("PRPS"): // FO4 + case ESM::fourCC("PTOP"): // FO4 + case ESM::fourCC("QSTI"): // FO4 + case ESM::fourCC("RBPC"): // FO4 + case ESM::fourCC("SADD"): // FO4 + case ESM::fourCC("SAKD"): // FO4 + case ESM::fourCC("SAPT"): // FO4 + case ESM::fourCC("SGNM"): // FO4 + case ESM::fourCC("SRAC"): // FO4 + case ESM::fourCC("SRAF"): // FO4 + case ESM::fourCC("STCP"): // FO4 + case ESM::fourCC("STKD"): // FO4 + case ESM::fourCC("TETI"): // FO4 + case ESM::fourCC("TTEB"): // FO4 + case ESM::fourCC("TTEC"): // FO4 + case ESM::fourCC("TTED"): // FO4 + case ESM::fourCC("TTEF"): // FO4 + case ESM::fourCC("TTET"): // FO4 + case ESM::fourCC("TTGE"): // FO4 + case ESM::fourCC("TTGP"): // FO4 + case ESM::fourCC("UNWP"): // FO4 + case ESM::fourCC("WMAP"): // FO4 + case ESM::fourCC("ZNAM"): // FO4 reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadrefr.cpp b/components/esm4/loadrefr.cpp index fb26e39546..5ac3a5f077 100644 --- a/components/esm4/loadrefr.cpp +++ b/components/esm4/loadrefr.cpp @@ -46,26 +46,26 @@ void ESM4::Reference::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_FULL: + case ESM::fourCC("FULL"): reader.getLocalizedString(mFullName); break; - case ESM4::SUB_NAME: + case ESM::fourCC("NAME"): { ESM::FormId BaseId; reader.getFormId(BaseId); mBaseObj = BaseId; break; } - case ESM4::SUB_DATA: + case ESM::fourCC("DATA"): reader.get(mPos); break; - case ESM4::SUB_XSCL: + case ESM::fourCC("XSCL"): reader.get(mScale); break; - case ESM4::SUB_XOWN: + case ESM::fourCC("XOWN"): { switch (subHdr.dataSize) { @@ -86,13 +86,13 @@ void ESM4::Reference::load(ESM4::Reader& reader) } break; } - case ESM4::SUB_XGLB: + case ESM::fourCC("XGLB"): reader.getFormId(mGlobal); break; - case ESM4::SUB_XRNK: + case ESM::fourCC("XRNK"): reader.get(mFactionRank); break; - case ESM4::SUB_XESP: + case ESM::fourCC("XESP"): { reader.getFormId(mEsp.parent); reader.get(mEsp.flags); @@ -100,7 +100,7 @@ void ESM4::Reference::load(ESM4::Reader& reader) // << ", 0x" << std::hex << (mEsp.flags & 0xff) << std::endl;// FIXME break; } - case ESM4::SUB_XTEL: + case ESM::fourCC("XTEL"): { switch (subHdr.dataSize) { @@ -125,7 +125,7 @@ void ESM4::Reference::load(ESM4::Reader& reader) } break; } - case ESM4::SUB_XSED: + case ESM::fourCC("XSED"): { // 1 or 4 bytes if (subHdr.dataSize == 1) @@ -147,7 +147,7 @@ void ESM4::Reference::load(ESM4::Reader& reader) reader.skipSubRecordData(); break; } - case ESM4::SUB_XLOD: + case ESM::fourCC("XLOD"): { // 12 bytes if (subHdr.dataSize == 12) @@ -168,7 +168,7 @@ void ESM4::Reference::load(ESM4::Reader& reader) reader.skipSubRecordData(); break; } - case ESM4::SUB_XACT: + case ESM::fourCC("XACT"): { if (subHdr.dataSize == 4) { @@ -182,7 +182,7 @@ void ESM4::Reference::load(ESM4::Reader& reader) reader.skipSubRecordData(); break; } - case ESM4::SUB_XRTM: // formId + case ESM::fourCC("XRTM"): // formId { // seems like another ref, e.g. 00064583 has base object 00000034 which is "XMarkerHeading" // e.g. some are doors (prob. quest related) @@ -199,7 +199,7 @@ void ESM4::Reference::load(ESM4::Reader& reader) // std::cout << "REFR " << mEditorId << " XRTM : " << formIdToString(marker) << std::endl;// FIXME break; } - case ESM4::SUB_TNAM: // reader.get(mMapMarker); break; + case ESM::fourCC("TNAM"): // reader.get(mMapMarker); break; { if (subHdr.dataSize != sizeof(mMapMarker)) // reader.skipSubRecordData(); // FIXME: FO3 @@ -209,26 +209,26 @@ void ESM4::Reference::load(ESM4::Reader& reader) break; } - case ESM4::SUB_XMRK: + case ESM::fourCC("XMRK"): mIsMapMarker = true; break; // all have mBaseObj 0x00000010 "MapMarker" - case ESM4::SUB_FNAM: + case ESM::fourCC("FNAM"): { // std::cout << "REFR " << ESM::printName(subHdr.typeId) << " skipping..." // << subHdr.dataSize << std::endl; reader.skipSubRecordData(); break; } - case ESM4::SUB_XTRG: // formId + case ESM::fourCC("XTRG"): // formId { reader.getFormId(mTargetRef); // std::cout << "REFR XRTG : " << formIdToString(id) << std::endl;// FIXME break; } - case ESM4::SUB_CNAM: + case ESM::fourCC("CNAM"): reader.getFormId(mAudioLocation); break; // FONV - case ESM4::SUB_XRDO: // FO3 + case ESM::fourCC("XRDO"): // FO3 { // FIXME: completely different meaning in FO4 reader.get(mRadio.rangeRadius); @@ -238,14 +238,14 @@ void ESM4::Reference::load(ESM4::Reader& reader) break; } - case ESM4::SUB_SCRO: // FO3 + case ESM::fourCC("SCRO"): // FO3 { reader.getFormId(sid); // if (mFormId == 0x0016b74B) // std::cout << "REFR SCRO : " << formIdToString(sid) << std::endl;// FIXME break; } - case ESM4::SUB_XLOC: + case ESM::fourCC("XLOC"): { mIsLocked = true; std::int8_t dummy; // FIXME: very poor code @@ -268,97 +268,97 @@ void ESM4::Reference::load(ESM4::Reader& reader) break; } - case ESM4::SUB_XCNT: + case ESM::fourCC("XCNT"): { reader.get(mCount); break; } // lighting - case ESM4::SUB_LNAM: // lighting template formId - case ESM4::SUB_XLIG: // struct, FOV, fade, etc - case ESM4::SUB_XEMI: // LIGH formId - case ESM4::SUB_XRDS: // Radius or Radiance - case ESM4::SUB_XRGB: - case ESM4::SUB_XRGD: // tangent data? - case ESM4::SUB_XALP: // alpha cutoff + case ESM::fourCC("LNAM"): // lighting template formId + case ESM::fourCC("XLIG"): // struct, FOV, fade, etc + case ESM::fourCC("XEMI"): // LIGH formId + case ESM::fourCC("XRDS"): // Radius or Radiance + case ESM::fourCC("XRGB"): + case ESM::fourCC("XRGD"): // tangent data? + case ESM::fourCC("XALP"): // alpha cutoff // - case ESM4::SUB_XPCI: // formId - case ESM4::SUB_XLCM: - case ESM4::SUB_ONAM: - case ESM4::SUB_VMAD: - case ESM4::SUB_XPRM: - case ESM4::SUB_INAM: - case ESM4::SUB_PDTO: - case ESM4::SUB_SCHR: - case ESM4::SUB_SCTX: - case ESM4::SUB_XAPD: - case ESM4::SUB_XAPR: - case ESM4::SUB_XCVL: - case ESM4::SUB_XCZA: - case ESM4::SUB_XCZC: - case ESM4::SUB_XEZN: - case ESM4::SUB_XFVC: - case ESM4::SUB_XHTW: - case ESM4::SUB_XIS2: - case ESM4::SUB_XLCN: - case ESM4::SUB_XLIB: - case ESM4::SUB_XLKR: - case ESM4::SUB_XLRM: - case ESM4::SUB_XLRT: - case ESM4::SUB_XLTW: - case ESM4::SUB_XMBO: - case ESM4::SUB_XMBP: - case ESM4::SUB_XMBR: - case ESM4::SUB_XNDP: - case ESM4::SUB_XOCP: - case ESM4::SUB_XPOD: - case ESM4::SUB_XPTL: - case ESM4::SUB_XPPA: - case ESM4::SUB_XPRD: - case ESM4::SUB_XPWR: - case ESM4::SUB_XRMR: - case ESM4::SUB_XSPC: - case ESM4::SUB_XTNM: - case ESM4::SUB_XTRI: - case ESM4::SUB_XWCN: - case ESM4::SUB_XWCU: - case ESM4::SUB_XATR: - case ESM4::SUB_XHLT: // Unofficial Oblivion Patch - case ESM4::SUB_XCHG: // thievery.exp - case ESM4::SUB_XHLP: // FO3 - case ESM4::SUB_XAMT: // FO3 - case ESM4::SUB_XAMC: // FO3 - case ESM4::SUB_XRAD: // FO3 - case ESM4::SUB_XIBS: // FO3 - case ESM4::SUB_XORD: // FO3 - case ESM4::SUB_XCLP: // FO3 - case ESM4::SUB_SCDA: // FO3 - case ESM4::SUB_RCLR: // FO3 - case ESM4::SUB_BNAM: // FONV - case ESM4::SUB_MMRK: // FONV - case ESM4::SUB_MNAM: // FONV - case ESM4::SUB_NNAM: // FONV - case ESM4::SUB_XATO: // FONV - case ESM4::SUB_SCRV: // FONV - case ESM4::SUB_SCVR: // FONV - case ESM4::SUB_SLSD: // FONV - case ESM4::SUB_XSRF: // FONV - case ESM4::SUB_XSRD: // FONV - case ESM4::SUB_WMI1: // FONV - case ESM4::SUB_XLRL: // Unofficial Skyrim Patch - case ESM4::SUB_XASP: // FO4 - case ESM4::SUB_XATP: // FO4 - case ESM4::SUB_XBSD: // FO4 - case ESM4::SUB_XCVR: // FO4 - case ESM4::SUB_XCZR: // FO4 - case ESM4::SUB_XLKT: // FO4 - case ESM4::SUB_XLYR: // FO4 - case ESM4::SUB_XMSP: // FO4 - case ESM4::SUB_XPDD: // FO4 - case ESM4::SUB_XPLK: // FO4 - case ESM4::SUB_XRFG: // FO4 - case ESM4::SUB_XWPG: // FO4 - case ESM4::SUB_XWPN: // FO4 + case ESM::fourCC("XPCI"): // formId + case ESM::fourCC("XLCM"): + case ESM::fourCC("ONAM"): + case ESM::fourCC("VMAD"): + case ESM::fourCC("XPRM"): + case ESM::fourCC("INAM"): + case ESM::fourCC("PDTO"): + case ESM::fourCC("SCHR"): + case ESM::fourCC("SCTX"): + case ESM::fourCC("XAPD"): + case ESM::fourCC("XAPR"): + case ESM::fourCC("XCVL"): + case ESM::fourCC("XCZA"): + case ESM::fourCC("XCZC"): + case ESM::fourCC("XEZN"): + case ESM::fourCC("XFVC"): + case ESM::fourCC("XHTW"): + case ESM::fourCC("XIS2"): + case ESM::fourCC("XLCN"): + case ESM::fourCC("XLIB"): + case ESM::fourCC("XLKR"): + case ESM::fourCC("XLRM"): + case ESM::fourCC("XLRT"): + case ESM::fourCC("XLTW"): + case ESM::fourCC("XMBO"): + case ESM::fourCC("XMBP"): + case ESM::fourCC("XMBR"): + case ESM::fourCC("XNDP"): + case ESM::fourCC("XOCP"): + case ESM::fourCC("XPOD"): + case ESM::fourCC("XPTL"): + case ESM::fourCC("XPPA"): + case ESM::fourCC("XPRD"): + case ESM::fourCC("XPWR"): + case ESM::fourCC("XRMR"): + case ESM::fourCC("XSPC"): + case ESM::fourCC("XTNM"): + case ESM::fourCC("XTRI"): + case ESM::fourCC("XWCN"): + case ESM::fourCC("XWCU"): + case ESM::fourCC("XATR"): + case ESM::fourCC("XHLT"): // Unofficial Oblivion Patch + case ESM::fourCC("XCHG"): // thievery.exp + case ESM::fourCC("XHLP"): // FO3 + case ESM::fourCC("XAMT"): // FO3 + case ESM::fourCC("XAMC"): // FO3 + case ESM::fourCC("XRAD"): // FO3 + case ESM::fourCC("XIBS"): // FO3 + case ESM::fourCC("XORD"): // FO3 + case ESM::fourCC("XCLP"): // FO3 + case ESM::fourCC("SCDA"): // FO3 + case ESM::fourCC("RCLR"): // FO3 + case ESM::fourCC("BNAM"): // FONV + case ESM::fourCC("MMRK"): // FONV + case ESM::fourCC("MNAM"): // FONV + case ESM::fourCC("NNAM"): // FONV + case ESM::fourCC("XATO"): // FONV + case ESM::fourCC("SCRV"): // FONV + case ESM::fourCC("SCVR"): // FONV + case ESM::fourCC("SLSD"): // FONV + case ESM::fourCC("XSRF"): // FONV + case ESM::fourCC("XSRD"): // FONV + case ESM::fourCC("WMI1"): // FONV + case ESM::fourCC("XLRL"): // Unofficial Skyrim Patch + case ESM::fourCC("XASP"): // FO4 + case ESM::fourCC("XATP"): // FO4 + case ESM::fourCC("XBSD"): // FO4 + case ESM::fourCC("XCVR"): // FO4 + case ESM::fourCC("XCZR"): // FO4 + case ESM::fourCC("XLKT"): // FO4 + case ESM::fourCC("XLYR"): // FO4 + case ESM::fourCC("XMSP"): // FO4 + case ESM::fourCC("XPDD"): // FO4 + case ESM::fourCC("XPLK"): // FO4 + case ESM::fourCC("XRFG"): // FO4 + case ESM::fourCC("XWPG"): // FO4 + case ESM::fourCC("XWPN"): // FO4 // if (mFormId == 0x0007e90f) // XPRM XPOD // if (mBaseObj == 0x17) //XPRM XOCP occlusion plane data XMBO bound half extents reader.skipSubRecordData(); diff --git a/components/esm4/loadregn.cpp b/components/esm4/loadregn.cpp index 2f10ea22d8..c8cc9663d9 100644 --- a/components/esm4/loadregn.cpp +++ b/components/esm4/loadregn.cpp @@ -41,22 +41,22 @@ void ESM4::Region::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_RCLR: + case ESM::fourCC("RCLR"): reader.get(mColour); break; - case ESM4::SUB_WNAM: + case ESM::fourCC("WNAM"): reader.getFormId(mWorldId); break; - case ESM4::SUB_ICON: + case ESM::fourCC("ICON"): reader.getZString(mShader); break; - case ESM4::SUB_RPLI: + case ESM::fourCC("RPLI"): reader.get(mEdgeFalloff); break; - case ESM4::SUB_RPLD: + case ESM::fourCC("RPLD"): { mRPLD.resize(subHdr.dataSize / sizeof(std::uint32_t)); for (std::vector::iterator it = mRPLD.begin(); it != mRPLD.end(); ++it) @@ -71,10 +71,10 @@ void ESM4::Region::load(ESM4::Reader& reader) break; } - case ESM4::SUB_RDAT: + case ESM::fourCC("RDAT"): reader.get(mData); break; - case ESM4::SUB_RDMP: + case ESM::fourCC("RDMP"): { if (mData.type != RDAT_Map) throw std::runtime_error("REGN unexpected data type"); @@ -83,7 +83,7 @@ void ESM4::Region::load(ESM4::Reader& reader) } // FO3 only 2: DemoMegatonSound and DC01 (both 0 RDMD) // FONV none - case ESM4::SUB_RDMD: // music type; 0 default, 1 public, 2 dungeon + case ESM::fourCC("RDMD"): // music type; 0 default, 1 public, 2 dungeon { #if 0 int dummy; @@ -94,14 +94,14 @@ void ESM4::Region::load(ESM4::Reader& reader) #endif break; } - case ESM4::SUB_RDMO: // not seen in FO3/FONV? + case ESM::fourCC("RDMO"): // not seen in FO3/FONV? { // std::cout << "REGN " << ESM::printName(subHdr.typeId) << " skipping..." // << subHdr.dataSize << std::endl; reader.skipSubRecordData(); break; } - case ESM4::SUB_RDSD: // Possibly the same as RDSA + case ESM::fourCC("RDSD"): // Possibly the same as RDSA { if (mData.type != RDAT_Sound) throw std::runtime_error( @@ -114,16 +114,16 @@ void ESM4::Region::load(ESM4::Reader& reader) break; } - case ESM4::SUB_RDGS: // Only in Oblivion? (ToddTestRegion1) // formId - case ESM4::SUB_RDSA: - case ESM4::SUB_RDWT: // formId - case ESM4::SUB_RDOT: // formId - case ESM4::SUB_RDID: // FONV - case ESM4::SUB_RDSB: // FONV - case ESM4::SUB_RDSI: // FONV - case ESM4::SUB_NVMI: // TES5 - case ESM4::SUB_ANAM: // FO4 - case ESM4::SUB_RLDM: // FO4 + case ESM::fourCC("RDGS"): // Only in Oblivion? (ToddTestRegion1) // formId + case ESM::fourCC("RDSA"): + case ESM::fourCC("RDWT"): // formId + case ESM::fourCC("RDOT"): // formId + case ESM::fourCC("RDID"): // FONV + case ESM::fourCC("RDSB"): // FONV + case ESM::fourCC("RDSI"): // FONV + case ESM::fourCC("NVMI"): // TES5 + case ESM::fourCC("ANAM"): // FO4 + case ESM::fourCC("RLDM"): // FO4 // RDAT skipping... following is a map // RDMP skipping... map name // diff --git a/components/esm4/loadroad.cpp b/components/esm4/loadroad.cpp index 8a33ab1c1d..3e33acbc7b 100644 --- a/components/esm4/loadroad.cpp +++ b/components/esm4/loadroad.cpp @@ -45,7 +45,7 @@ void ESM4::Road::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_PGRP: + case ESM::fourCC("PGRP"): { std::size_t numNodes = subHdr.dataSize / sizeof(PGRP); @@ -57,7 +57,7 @@ void ESM4::Road::load(ESM4::Reader& reader) break; } - case ESM4::SUB_PGRR: + case ESM::fourCC("PGRR"): { static PGRR link; static RDRP linkPt; diff --git a/components/esm4/loadsbsp.cpp b/components/esm4/loadsbsp.cpp index a874331dab..c9450492b8 100644 --- a/components/esm4/loadsbsp.cpp +++ b/components/esm4/loadsbsp.cpp @@ -41,10 +41,10 @@ void ESM4::SubSpace::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_DNAM: + case ESM::fourCC("DNAM"): { reader.get(mDimension.x); reader.get(mDimension.y); diff --git a/components/esm4/loadscol.cpp b/components/esm4/loadscol.cpp index dea900fe17..00775edaa5 100644 --- a/components/esm4/loadscol.cpp +++ b/components/esm4/loadscol.cpp @@ -43,22 +43,22 @@ void ESM4::StaticCollection::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_FULL: + case ESM::fourCC("FULL"): reader.getLocalizedString(mFullName); break; - case ESM4::SUB_OBND: - case ESM4::SUB_MODL: // Model data start - case ESM4::SUB_MODT: - case ESM4::SUB_MODC: - case ESM4::SUB_MODS: - case ESM4::SUB_MODF: // Model data end - case ESM4::SUB_ONAM: - case ESM4::SUB_DATA: - case ESM4::SUB_FLTR: // FO4 - case ESM4::SUB_PTRN: // FO4 + case ESM::fourCC("OBND"): + case ESM::fourCC("MODL"): // Model data start + case ESM::fourCC("MODT"): + case ESM::fourCC("MODC"): + case ESM::fourCC("MODS"): + case ESM::fourCC("MODF"): // Model data end + case ESM::fourCC("ONAM"): + case ESM::fourCC("DATA"): + case ESM::fourCC("FLTR"): // FO4 + case ESM::fourCC("PTRN"): // FO4 reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadscpt.cpp b/components/esm4/loadscpt.cpp index b4071ed21d..12953b4609 100644 --- a/components/esm4/loadscpt.cpp +++ b/components/esm4/loadscpt.cpp @@ -43,12 +43,12 @@ void ESM4::Script::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): { reader.getZString(mEditorId); break; } - case ESM4::SUB_SCHR: + case ESM::fourCC("SCHR"): { // For debugging only #if 0 @@ -73,12 +73,12 @@ void ESM4::Script::load(ESM4::Reader& reader) #endif break; } - case ESM4::SUB_SCTX: + case ESM::fourCC("SCTX"): reader.getString(mScript.scriptSource); // if (mEditorId == "CTrapLogs01SCRIPT") // std::cout << mScript.scriptSource << std::endl; break; - case ESM4::SUB_SCDA: // compiled script data + case ESM::fourCC("SCDA"): // compiled script data { // For debugging only #if 0 @@ -112,10 +112,10 @@ void ESM4::Script::load(ESM4::Reader& reader) #endif break; } - case ESM4::SUB_SCRO: + case ESM::fourCC("SCRO"): reader.getFormId(mScript.globReference); break; - case ESM4::SUB_SLSD: + case ESM::fourCC("SLSD"): { localVar.clear(); reader.get(localVar.index); @@ -128,11 +128,11 @@ void ESM4::Script::load(ESM4::Reader& reader) break; } - case ESM4::SUB_SCVR: // assumed always pair with SLSD + case ESM::fourCC("SCVR"): // assumed always pair with SLSD reader.getZString(localVar.variableName); mScript.localVarData.push_back(localVar); break; - case ESM4::SUB_SCRV: + case ESM::fourCC("SCRV"): { std::uint32_t index; reader.get(index); diff --git a/components/esm4/loadscrl.cpp b/components/esm4/loadscrl.cpp index 954ddf4e36..f88854f8db 100644 --- a/components/esm4/loadscrl.cpp +++ b/components/esm4/loadscrl.cpp @@ -41,40 +41,40 @@ void ESM4::Scroll::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_FULL: + case ESM::fourCC("FULL"): reader.getLocalizedString(mFullName); break; - case ESM4::SUB_DESC: + case ESM::fourCC("DESC"): reader.getLocalizedString(mText); break; - case ESM4::SUB_DATA: + case ESM::fourCC("DATA"): reader.get(mData.value); reader.get(mData.weight); break; - case ESM4::SUB_MODL: + case ESM::fourCC("MODL"): reader.getZString(mModel); break; - case ESM4::SUB_YNAM: + case ESM::fourCC("YNAM"): reader.getFormId(mPickUpSound); break; - case ESM4::SUB_ZNAM: + case ESM::fourCC("ZNAM"): reader.getFormId(mDropSound); break; - // case ESM4::SUB_MODB: reader.get(mBoundRadius); break; - case ESM4::SUB_OBND: - case ESM4::SUB_CTDA: - case ESM4::SUB_EFID: - case ESM4::SUB_EFIT: - case ESM4::SUB_ETYP: - case ESM4::SUB_KSIZ: - case ESM4::SUB_KWDA: - case ESM4::SUB_MDOB: - case ESM4::SUB_MODT: - case ESM4::SUB_SPIT: - case ESM4::SUB_CIS2: + // case ESM::fourCC("MODB"): reader.get(mBoundRadius); break; + case ESM::fourCC("OBND"): + case ESM::fourCC("CTDA"): + case ESM::fourCC("EFID"): + case ESM::fourCC("EFIT"): + case ESM::fourCC("ETYP"): + case ESM::fourCC("KSIZ"): + case ESM::fourCC("KWDA"): + case ESM::fourCC("MDOB"): + case ESM::fourCC("MODT"): + case ESM::fourCC("SPIT"): + case ESM::fourCC("CIS2"): reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadsgst.cpp b/components/esm4/loadsgst.cpp index c4284eb9bc..d93709f537 100644 --- a/components/esm4/loadsgst.cpp +++ b/components/esm4/loadsgst.cpp @@ -42,10 +42,10 @@ void ESM4::SigilStone::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_FULL: + case ESM::fourCC("FULL"): { if (mFullName.empty()) { @@ -62,34 +62,34 @@ void ESM4::SigilStone::load(ESM4::Reader& reader) } break; } - case ESM4::SUB_DATA: + case ESM::fourCC("DATA"): { reader.get(mData.uses); reader.get(mData.value); reader.get(mData.weight); break; } - case ESM4::SUB_MODL: + case ESM::fourCC("MODL"): reader.getZString(mModel); break; - case ESM4::SUB_ICON: + case ESM::fourCC("ICON"): reader.getZString(mIcon); break; - case ESM4::SUB_SCRI: + case ESM::fourCC("SCRI"): reader.getFormId(mScriptId); break; - case ESM4::SUB_MODB: + case ESM::fourCC("MODB"): reader.get(mBoundRadius); break; - case ESM4::SUB_SCIT: + case ESM::fourCC("SCIT"): { reader.get(mEffect); reader.adjustFormId(mEffect.formId); break; } - case ESM4::SUB_MODT: - case ESM4::SUB_EFID: - case ESM4::SUB_EFIT: + case ESM::fourCC("MODT"): + case ESM::fourCC("EFID"): + case ESM::fourCC("EFIT"): { reader.skipSubRecordData(); break; diff --git a/components/esm4/loadslgm.cpp b/components/esm4/loadslgm.cpp index 635b73312e..cb16f36857 100644 --- a/components/esm4/loadslgm.cpp +++ b/components/esm4/loadslgm.cpp @@ -41,38 +41,38 @@ void ESM4::SoulGem::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_FULL: + case ESM::fourCC("FULL"): reader.getLocalizedString(mFullName); break; - case ESM4::SUB_MODL: + case ESM::fourCC("MODL"): reader.getZString(mModel); break; - case ESM4::SUB_ICON: + case ESM::fourCC("ICON"): reader.getZString(mIcon); break; - case ESM4::SUB_DATA: + case ESM::fourCC("DATA"): reader.get(mData); break; - case ESM4::SUB_SCRI: + case ESM::fourCC("SCRI"): reader.getFormId(mScriptId); break; - case ESM4::SUB_SOUL: + case ESM::fourCC("SOUL"): reader.get(mSoul); break; - case ESM4::SUB_SLCP: + case ESM::fourCC("SLCP"): reader.get(mSoulCapacity); break; - case ESM4::SUB_MODB: + case ESM::fourCC("MODB"): reader.get(mBoundRadius); break; - case ESM4::SUB_MODT: - case ESM4::SUB_KSIZ: - case ESM4::SUB_KWDA: - case ESM4::SUB_NAM0: - case ESM4::SUB_OBND: + case ESM::fourCC("MODT"): + case ESM::fourCC("KSIZ"): + case ESM::fourCC("KWDA"): + case ESM::fourCC("NAM0"): + case ESM::fourCC("OBND"): reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadsndr.cpp b/components/esm4/loadsndr.cpp index 830cdfdc54..21ed9f93e4 100644 --- a/components/esm4/loadsndr.cpp +++ b/components/esm4/loadsndr.cpp @@ -41,10 +41,10 @@ void ESM4::SoundReference::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_CTDA: + case ESM::fourCC("CTDA"): reader.get(&mTargetCondition, 20); reader.get(mTargetCondition.runOn); reader.get(mTargetCondition.reference); @@ -52,22 +52,22 @@ void ESM4::SoundReference::load(ESM4::Reader& reader) reader.adjustFormId(mTargetCondition.reference); reader.skipSubRecordData(4); // unknown break; - case ESM4::SUB_GNAM: + case ESM::fourCC("GNAM"): reader.getFormId(mSoundCategory); break; - case ESM4::SUB_SNAM: + case ESM::fourCC("SNAM"): reader.getFormId(mSoundId); break; - case ESM4::SUB_ONAM: + case ESM::fourCC("ONAM"): reader.getFormId(mOutputModel); break; - case ESM4::SUB_ANAM: + case ESM::fourCC("ANAM"): reader.getZString(mSoundFile); break; - case ESM4::SUB_LNAM: + case ESM::fourCC("LNAM"): reader.get(mLoopInfo); break; - case ESM4::SUB_BNAM: + case ESM::fourCC("BNAM"): { if (subHdr.dataSize == 6) reader.get(mData); @@ -77,16 +77,16 @@ void ESM4::SoundReference::load(ESM4::Reader& reader) reader.skipSubRecordData(); break; } - case ESM4::SUB_CIS1: - case ESM4::SUB_CIS2: - case ESM4::SUB_CNAM: // CRC32 hash - case ESM4::SUB_DNAM: // FO4 - case ESM4::SUB_FNAM: // unknown - case ESM4::SUB_INTV: // FO4 - case ESM4::SUB_ITMC: // FO4 - case ESM4::SUB_ITME: // FO4 - case ESM4::SUB_ITMS: // FO4 - case ESM4::SUB_NNAM: // FO4 + case ESM::fourCC("CIS1"): + case ESM::fourCC("CIS2"): + case ESM::fourCC("CNAM"): // CRC32 hash + case ESM::fourCC("DNAM"): // FO4 + case ESM::fourCC("FNAM"): // unknown + case ESM::fourCC("INTV"): // FO4 + case ESM::fourCC("ITMC"): // FO4 + case ESM::fourCC("ITME"): // FO4 + case ESM::fourCC("ITMS"): // FO4 + case ESM::fourCC("NNAM"): // FO4 reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadsoun.cpp b/components/esm4/loadsoun.cpp index a5ae005fe2..4fc3b6609f 100644 --- a/components/esm4/loadsoun.cpp +++ b/components/esm4/loadsoun.cpp @@ -41,16 +41,16 @@ void ESM4::Sound::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_FNAM: + case ESM::fourCC("FNAM"): reader.getZString(mSoundFile); break; - case ESM4::SUB_SNDX: + case ESM::fourCC("SNDX"): reader.get(mData); break; - case ESM4::SUB_SNDD: + case ESM::fourCC("SNDD"): if (subHdr.dataSize == 8) reader.get(&mData, 8); else @@ -59,13 +59,13 @@ void ESM4::Sound::load(ESM4::Reader& reader) reader.get(mExtra); } break; - case ESM4::SUB_OBND: // TES5 only - case ESM4::SUB_SDSC: // TES5 only - case ESM4::SUB_ANAM: // FO3 - case ESM4::SUB_GNAM: // FO3 - case ESM4::SUB_HNAM: // FO3 - case ESM4::SUB_RNAM: // FONV - case ESM4::SUB_REPT: // FO4 + case ESM::fourCC("OBND"): // TES5 only + case ESM::fourCC("SDSC"): // TES5 only + case ESM::fourCC("ANAM"): // FO3 + case ESM::fourCC("GNAM"): // FO3 + case ESM::fourCC("HNAM"): // FO3 + case ESM::fourCC("RNAM"): // FONV + case ESM::fourCC("REPT"): // FO4 reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadstat.cpp b/components/esm4/loadstat.cpp index e3b51633cf..9d85374ae4 100644 --- a/components/esm4/loadstat.cpp +++ b/components/esm4/loadstat.cpp @@ -41,19 +41,19 @@ void ESM4::Static::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_FULL: + case ESM::fourCC("FULL"): reader.getLocalizedString(mFullName); break; - case ESM4::SUB_MODL: + case ESM::fourCC("MODL"): reader.getZString(mModel); break; - case ESM4::SUB_MODB: + case ESM::fourCC("MODB"): reader.get(mBoundRadius); break; - case ESM4::SUB_MODT: + case ESM::fourCC("MODT"): { // version is only availabe in TES5 (seems to be 27 or 28?) // if (reader.esmVersion() == ESM::VER_094 || reader.esmVersion() == ESM::VER_170) @@ -72,7 +72,7 @@ void ESM4::Static::load(ESM4::Reader& reader) } break; } - case ESM4::SUB_MNAM: + case ESM::fourCC("MNAM"): { for (std::string& level : mLOD) { @@ -84,18 +84,18 @@ void ESM4::Static::load(ESM4::Reader& reader) } break; } - case ESM4::SUB_MODC: // More model data - case ESM4::SUB_MODS: - case ESM4::SUB_MODF: // Model data end - case ESM4::SUB_OBND: - case ESM4::SUB_DNAM: - case ESM4::SUB_BRUS: // FONV - case ESM4::SUB_RNAM: // FONV - case ESM4::SUB_FTYP: // FO4 - case ESM4::SUB_NVNM: // FO4 - case ESM4::SUB_PRPS: // FO4 - case ESM4::SUB_PTRN: // FO4 - case ESM4::SUB_VMAD: // FO4 + case ESM::fourCC("MODC"): // More model data + case ESM::fourCC("MODS"): + case ESM::fourCC("MODF"): // Model data end + case ESM::fourCC("OBND"): + case ESM::fourCC("DNAM"): + case ESM::fourCC("BRUS"): // FONV + case ESM::fourCC("RNAM"): // FONV + case ESM::fourCC("FTYP"): // FO4 + case ESM::fourCC("NVNM"): // FO4 + case ESM::fourCC("PRPS"): // FO4 + case ESM::fourCC("PTRN"): // FO4 + case ESM::fourCC("VMAD"): // FO4 reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadtact.cpp b/components/esm4/loadtact.cpp index ad5efb9fbf..453df85504 100644 --- a/components/esm4/loadtact.cpp +++ b/components/esm4/loadtact.cpp @@ -41,44 +41,44 @@ void ESM4::TalkingActivator::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_FULL: + case ESM::fourCC("FULL"): reader.getLocalizedString(mFullName); break; - case ESM4::SUB_SCRI: + case ESM::fourCC("SCRI"): reader.getFormId(mScriptId); break; - case ESM4::SUB_VNAM: + case ESM::fourCC("VNAM"): reader.getFormId(mVoiceType); break; - case ESM4::SUB_SNAM: + case ESM::fourCC("SNAM"): reader.getFormId(mLoopSound); break; - case ESM4::SUB_INAM: + case ESM::fourCC("INAM"): reader.getFormId(mRadioTemplate); break; // FONV - case ESM4::SUB_MODL: + case ESM::fourCC("MODL"): reader.getZString(mModel); break; - case ESM4::SUB_DAMC: // Destructible - case ESM4::SUB_DEST: - case ESM4::SUB_DMDC: - case ESM4::SUB_DMDL: - case ESM4::SUB_DMDT: - case ESM4::SUB_DMDS: - case ESM4::SUB_DSTA: - case ESM4::SUB_DSTD: - case ESM4::SUB_DSTF: // Destructible end - case ESM4::SUB_FNAM: - case ESM4::SUB_PNAM: - case ESM4::SUB_MODT: // Model data - case ESM4::SUB_MODC: - case ESM4::SUB_MODS: - case ESM4::SUB_MODF: // Model data end - case ESM4::SUB_OBND: - case ESM4::SUB_VMAD: + case ESM::fourCC("DAMC"): // Destructible + case ESM::fourCC("DEST"): + case ESM::fourCC("DMDC"): + case ESM::fourCC("DMDL"): + case ESM::fourCC("DMDT"): + case ESM::fourCC("DMDS"): + case ESM::fourCC("DSTA"): + case ESM::fourCC("DSTD"): + case ESM::fourCC("DSTF"): // Destructible end + case ESM::fourCC("FNAM"): + case ESM::fourCC("PNAM"): + case ESM::fourCC("MODT"): // Model data + case ESM::fourCC("MODC"): + case ESM::fourCC("MODS"): + case ESM::fourCC("MODF"): // Model data end + case ESM::fourCC("OBND"): + case ESM::fourCC("VMAD"): reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadterm.cpp b/components/esm4/loadterm.cpp index 39f26391e8..1fb8ef117d 100644 --- a/components/esm4/loadterm.cpp +++ b/components/esm4/loadterm.cpp @@ -41,73 +41,73 @@ void ESM4::Terminal::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_FULL: + case ESM::fourCC("FULL"): reader.getLocalizedString(mFullName); break; - case ESM4::SUB_DESC: + case ESM::fourCC("DESC"): reader.getLocalizedString(mText); break; - case ESM4::SUB_SCRI: + case ESM::fourCC("SCRI"): reader.getFormId(mScriptId); break; - case ESM4::SUB_PNAM: + case ESM::fourCC("PNAM"): reader.getFormId(mPasswordNote); break; - case ESM4::SUB_SNAM: + case ESM::fourCC("SNAM"): if (subHdr.dataSize == 4) reader.getFormId(mSound); // FIXME: FO4 sound marker params else reader.skipSubRecordData(); break; - case ESM4::SUB_MODL: + case ESM::fourCC("MODL"): reader.getZString(mModel); break; - case ESM4::SUB_RNAM: + case ESM::fourCC("RNAM"): reader.getZString(mResultText); break; - case ESM4::SUB_DNAM: // difficulty - case ESM4::SUB_ANAM: // flags - case ESM4::SUB_CTDA: - case ESM4::SUB_CIS1: - case ESM4::SUB_CIS2: - case ESM4::SUB_INAM: - case ESM4::SUB_ITXT: // Menu Item - case ESM4::SUB_MODT: // Model data - case ESM4::SUB_MODC: - case ESM4::SUB_MODS: - case ESM4::SUB_MODF: // Model data end - case ESM4::SUB_SCDA: - case ESM4::SUB_SCHR: - case ESM4::SUB_SCRO: - case ESM4::SUB_SCRV: - case ESM4::SUB_SCTX: - case ESM4::SUB_SCVR: - case ESM4::SUB_SLSD: - case ESM4::SUB_TNAM: - case ESM4::SUB_OBND: - case ESM4::SUB_VMAD: - case ESM4::SUB_KSIZ: - case ESM4::SUB_KWDA: - case ESM4::SUB_BSIZ: // FO4 - case ESM4::SUB_BTXT: // FO4 - case ESM4::SUB_COCT: // FO4 - case ESM4::SUB_CNTO: // FO4 - case ESM4::SUB_FNAM: // FO4 - case ESM4::SUB_ISIZ: // FO4 - case ESM4::SUB_ITID: // FO4 - case ESM4::SUB_MNAM: // FO4 - case ESM4::SUB_NAM0: // FO4 - case ESM4::SUB_PRPS: // FO4 - case ESM4::SUB_PTRN: // FO4 - case ESM4::SUB_UNAM: // FO4 - case ESM4::SUB_VNAM: // FO4 - case ESM4::SUB_WBDT: // FO4 - case ESM4::SUB_WNAM: // FO4 - case ESM4::SUB_XMRK: // FO4 + case ESM::fourCC("DNAM"): // difficulty + case ESM::fourCC("ANAM"): // flags + case ESM::fourCC("CTDA"): + case ESM::fourCC("CIS1"): + case ESM::fourCC("CIS2"): + case ESM::fourCC("INAM"): + case ESM::fourCC("ITXT"): // Menu Item + case ESM::fourCC("MODT"): // Model data + case ESM::fourCC("MODC"): + case ESM::fourCC("MODS"): + case ESM::fourCC("MODF"): // Model data end + case ESM::fourCC("SCDA"): + case ESM::fourCC("SCHR"): + case ESM::fourCC("SCRO"): + case ESM::fourCC("SCRV"): + case ESM::fourCC("SCTX"): + case ESM::fourCC("SCVR"): + case ESM::fourCC("SLSD"): + case ESM::fourCC("TNAM"): + case ESM::fourCC("OBND"): + case ESM::fourCC("VMAD"): + case ESM::fourCC("KSIZ"): + case ESM::fourCC("KWDA"): + case ESM::fourCC("BSIZ"): // FO4 + case ESM::fourCC("BTXT"): // FO4 + case ESM::fourCC("COCT"): // FO4 + case ESM::fourCC("CNTO"): // FO4 + case ESM::fourCC("FNAM"): // FO4 + case ESM::fourCC("ISIZ"): // FO4 + case ESM::fourCC("ITID"): // FO4 + case ESM::fourCC("MNAM"): // FO4 + case ESM::fourCC("NAM0"): // FO4 + case ESM::fourCC("PRPS"): // FO4 + case ESM::fourCC("PTRN"): // FO4 + case ESM::fourCC("UNAM"): // FO4 + case ESM::fourCC("VNAM"): // FO4 + case ESM::fourCC("WBDT"): // FO4 + case ESM::fourCC("WNAM"): // FO4 + case ESM::fourCC("XMRK"): // FO4 reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadtes4.cpp b/components/esm4/loadtes4.cpp index 0cbf91c52e..19db9b9d09 100644 --- a/components/esm4/loadtes4.cpp +++ b/components/esm4/loadtes4.cpp @@ -41,7 +41,7 @@ void ESM4::Header::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_HEDR: + case ESM::fourCC("HEDR"): { if (!reader.getExact(mData.version) || !reader.getExact(mData.records) || !reader.getExact(mData.nextObjectId)) @@ -51,13 +51,13 @@ void ESM4::Header::load(ESM4::Reader& reader) throw std::runtime_error("TES4 HEDR data size mismatch"); break; } - case ESM4::SUB_CNAM: + case ESM::fourCC("CNAM"): reader.getZString(mAuthor); break; - case ESM4::SUB_SNAM: + case ESM::fourCC("SNAM"): reader.getZString(mDesc); break; - case ESM4::SUB_MAST: // multiple + case ESM::fourCC("MAST"): // multiple { ESM::MasterData m; if (!reader.getZString(m.name)) @@ -68,7 +68,7 @@ void ESM4::Header::load(ESM4::Reader& reader) mMaster.push_back(m); break; } - case ESM4::SUB_DATA: + case ESM::fourCC("DATA"): { if (mMaster.empty()) throw std::runtime_error( @@ -78,7 +78,7 @@ void ESM4::Header::load(ESM4::Reader& reader) throw std::runtime_error("TES4 DATA data read error"); break; } - case ESM4::SUB_ONAM: + case ESM::fourCC("ONAM"): { mOverrides.resize(subHdr.dataSize / sizeof(ESM::FormId32)); for (ESM::FormId& mOverride : mOverrides) @@ -95,11 +95,11 @@ void ESM4::Header::load(ESM4::Reader& reader) } break; } - case ESM4::SUB_INTV: - case ESM4::SUB_INCC: - case ESM4::SUB_OFST: // Oblivion only? - case ESM4::SUB_DELE: // Oblivion only? - case ESM4::SUB_TNAM: // Fallout 4 (CK only) + case ESM::fourCC("INTV"): + case ESM::fourCC("INCC"): + case ESM::fourCC("OFST"): // Oblivion only? + case ESM::fourCC("DELE"): // Oblivion only? + case ESM::fourCC("TNAM"): // Fallout 4 (CK only) case ESM::fourCC("MMSB"): // Fallout 76 reader.skipSubRecordData(); break; diff --git a/components/esm4/loadtree.cpp b/components/esm4/loadtree.cpp index 9290ae79c4..c433f11564 100644 --- a/components/esm4/loadtree.cpp +++ b/components/esm4/loadtree.cpp @@ -41,29 +41,29 @@ void ESM4::Tree::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_MODL: + case ESM::fourCC("MODL"): reader.getZString(mModel); break; - case ESM4::SUB_ICON: + case ESM::fourCC("ICON"): reader.getZString(mLeafTexture); break; - case ESM4::SUB_MODB: + case ESM::fourCC("MODB"): reader.get(mBoundRadius); break; - case ESM4::SUB_MODT: // Model data - case ESM4::SUB_MODC: - case ESM4::SUB_MODS: - case ESM4::SUB_MODF: // Model data end - case ESM4::SUB_CNAM: - case ESM4::SUB_BNAM: - case ESM4::SUB_SNAM: - case ESM4::SUB_FULL: - case ESM4::SUB_OBND: - case ESM4::SUB_PFIG: - case ESM4::SUB_PFPC: + case ESM::fourCC("MODT"): // Model data + case ESM::fourCC("MODC"): + case ESM::fourCC("MODS"): + case ESM::fourCC("MODF"): // Model data end + case ESM::fourCC("CNAM"): + case ESM::fourCC("BNAM"): + case ESM::fourCC("SNAM"): + case ESM::fourCC("FULL"): + case ESM::fourCC("OBND"): + case ESM::fourCC("PFIG"): + case ESM::fourCC("PFPC"): reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadtxst.cpp b/components/esm4/loadtxst.cpp index 3b5f04f265..69d48cc049 100644 --- a/components/esm4/loadtxst.cpp +++ b/components/esm4/loadtxst.cpp @@ -41,37 +41,37 @@ void ESM4::TextureSet::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; case ESM::fourCC("FLTR"): // FO76 reader.getZString(mFilter); break; - case ESM4::SUB_TX00: + case ESM::fourCC("TX00"): reader.getZString(mDiffuse); break; - case ESM4::SUB_TX01: + case ESM::fourCC("TX01"): reader.getZString(mNormalMap); break; - case ESM4::SUB_TX02: + case ESM::fourCC("TX02"): // This is a "wrinkle map" in FO4/76 reader.getZString(mEnvMask); break; - case ESM4::SUB_TX03: + case ESM::fourCC("TX03"): // This is a glow map in FO4/76 reader.getZString(mToneMap); break; - case ESM4::SUB_TX04: + case ESM::fourCC("TX04"): // This is a height map in FO4/76 reader.getZString(mDetailMap); break; - case ESM4::SUB_TX05: + case ESM::fourCC("TX05"): reader.getZString(mEnvMap); break; - case ESM4::SUB_TX06: + case ESM::fourCC("TX06"): reader.getZString(mMultiLayer); break; - case ESM4::SUB_TX07: + case ESM::fourCC("TX07"): // This is a "smooth specular" map in FO4/76 reader.getZString(mSpecular); break; @@ -84,14 +84,14 @@ void ESM4::TextureSet::load(ESM4::Reader& reader) case ESM::fourCC("TX10"): // FO76 reader.getZString(mFlow); break; - case ESM4::SUB_DNAM: + case ESM::fourCC("DNAM"): reader.get(mDataFlags); break; - case ESM4::SUB_MNAM: + case ESM::fourCC("MNAM"): reader.getZString(mMaterial); break; - case ESM4::SUB_DODT: // Decal data - case ESM4::SUB_OBND: // object bounds + case ESM::fourCC("DODT"): // Decal data + case ESM::fourCC("OBND"): // object bounds case ESM::fourCC("OPDS"): // Object placement defaults, FO76 reader.skipSubRecordData(); break; diff --git a/components/esm4/loadweap.cpp b/components/esm4/loadweap.cpp index 2b80305690..81b0d4286a 100644 --- a/components/esm4/loadweap.cpp +++ b/components/esm4/loadweap.cpp @@ -43,13 +43,13 @@ void ESM4::Weapon::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_FULL: + case ESM::fourCC("FULL"): reader.getLocalizedString(mFullName); break; - case ESM4::SUB_DATA: + case ESM::fourCC("DATA"): { // if (reader.esmVersion() == ESM::VER_094 || reader.esmVersion() == ESM::VER_170) if (subHdr.dataSize == 10) // FO3 has 15 bytes even though VER_094 @@ -79,126 +79,126 @@ void ESM4::Weapon::load(ESM4::Reader& reader) } break; } - case ESM4::SUB_MODL: + case ESM::fourCC("MODL"): reader.getZString(mModel); break; - case ESM4::SUB_ICON: + case ESM::fourCC("ICON"): reader.getZString(mIcon); break; - case ESM4::SUB_MICO: + case ESM::fourCC("MICO"): reader.getZString(mMiniIcon); break; // FO3 - case ESM4::SUB_SCRI: + case ESM::fourCC("SCRI"): reader.getFormId(mScriptId); break; - case ESM4::SUB_ANAM: + case ESM::fourCC("ANAM"): reader.get(mEnchantmentPoints); break; - case ESM4::SUB_ENAM: + case ESM::fourCC("ENAM"): reader.getFormId(mEnchantment); break; - case ESM4::SUB_MODB: + case ESM::fourCC("MODB"): reader.get(mBoundRadius); break; - case ESM4::SUB_DESC: + case ESM::fourCC("DESC"): reader.getLocalizedString(mText); break; - case ESM4::SUB_YNAM: + case ESM::fourCC("YNAM"): reader.getFormId(mPickUpSound); break; - case ESM4::SUB_ZNAM: + case ESM::fourCC("ZNAM"): reader.getFormId(mDropSound); break; - case ESM4::SUB_MODT: // Model data - case ESM4::SUB_MODC: - case ESM4::SUB_MODS: - case ESM4::SUB_MODF: // Model data end - case ESM4::SUB_BAMT: - case ESM4::SUB_BIDS: - case ESM4::SUB_INAM: - case ESM4::SUB_CNAM: - case ESM4::SUB_CRDT: - case ESM4::SUB_DNAM: - case ESM4::SUB_EAMT: - case ESM4::SUB_EITM: - case ESM4::SUB_ETYP: - case ESM4::SUB_KSIZ: - case ESM4::SUB_KWDA: - case ESM4::SUB_NAM8: - case ESM4::SUB_NAM9: - case ESM4::SUB_OBND: - case ESM4::SUB_SNAM: - case ESM4::SUB_TNAM: - case ESM4::SUB_UNAM: - case ESM4::SUB_VMAD: - case ESM4::SUB_VNAM: - case ESM4::SUB_WNAM: - case ESM4::SUB_XNAM: // Dawnguard only? - case ESM4::SUB_NNAM: - case ESM4::SUB_NAM0: // FO3 - case ESM4::SUB_REPL: // FO3 - case ESM4::SUB_MOD2: // FO3 - case ESM4::SUB_MO2T: // FO3 - case ESM4::SUB_MO2S: // FO3 - case ESM4::SUB_NAM6: // FO3 - case ESM4::SUB_MOD4: // First person model data - case ESM4::SUB_MO4T: - case ESM4::SUB_MO4S: - case ESM4::SUB_MO4C: - case ESM4::SUB_MO4F: // First person model data end - case ESM4::SUB_BIPL: // FO3 - case ESM4::SUB_NAM7: // FO3 - case ESM4::SUB_MOD3: // FO3 - case ESM4::SUB_MO3T: // FO3 - case ESM4::SUB_MO3S: // FO3 - case ESM4::SUB_MODD: // FO3 - // case ESM4::SUB_MOSD: // FO3 - case ESM4::SUB_DAMC: // Destructible - case ESM4::SUB_DEST: - case ESM4::SUB_DMDC: - case ESM4::SUB_DMDL: - case ESM4::SUB_DMDT: - case ESM4::SUB_DMDS: - case ESM4::SUB_DSTA: - case ESM4::SUB_DSTD: - case ESM4::SUB_DSTF: // Destructible end - case ESM4::SUB_VATS: // FONV - case ESM4::SUB_VANM: // FONV - case ESM4::SUB_MWD1: // FONV - case ESM4::SUB_MWD2: // FONV - case ESM4::SUB_MWD3: // FONV - case ESM4::SUB_MWD4: // FONV - case ESM4::SUB_MWD5: // FONV - case ESM4::SUB_MWD6: // FONV - case ESM4::SUB_MWD7: // FONV - case ESM4::SUB_WMI1: // FONV - case ESM4::SUB_WMI2: // FONV - case ESM4::SUB_WMI3: // FONV - case ESM4::SUB_WMS1: // FONV - case ESM4::SUB_WMS2: // FONV - case ESM4::SUB_WNM1: // FONV - case ESM4::SUB_WNM2: // FONV - case ESM4::SUB_WNM3: // FONV - case ESM4::SUB_WNM4: // FONV - case ESM4::SUB_WNM5: // FONV - case ESM4::SUB_WNM6: // FONV - case ESM4::SUB_WNM7: // FONV - case ESM4::SUB_EFSD: // FONV DeadMoney - case ESM4::SUB_APPR: // FO4 - case ESM4::SUB_DAMA: // FO4 - case ESM4::SUB_FLTR: // FO4 - case ESM4::SUB_FNAM: // FO4 - case ESM4::SUB_INRD: // FO4 - case ESM4::SUB_LNAM: // FO4 - case ESM4::SUB_MASE: // FO4 - case ESM4::SUB_PTRN: // FO4 - case ESM4::SUB_STCP: // FO4 - case ESM4::SUB_WAMD: // FO4 - case ESM4::SUB_WZMD: // FO4 - case ESM4::SUB_OBTE: // FO4 object template start - case ESM4::SUB_OBTF: - case ESM4::SUB_OBTS: - case ESM4::SUB_STOP: // FO4 object template end + case ESM::fourCC("MODT"): // Model data + case ESM::fourCC("MODC"): + case ESM::fourCC("MODS"): + case ESM::fourCC("MODF"): // Model data end + case ESM::fourCC("BAMT"): + case ESM::fourCC("BIDS"): + case ESM::fourCC("INAM"): + case ESM::fourCC("CNAM"): + case ESM::fourCC("CRDT"): + case ESM::fourCC("DNAM"): + case ESM::fourCC("EAMT"): + case ESM::fourCC("EITM"): + case ESM::fourCC("ETYP"): + case ESM::fourCC("KSIZ"): + case ESM::fourCC("KWDA"): + case ESM::fourCC("NAM8"): + case ESM::fourCC("NAM9"): + case ESM::fourCC("OBND"): + case ESM::fourCC("SNAM"): + case ESM::fourCC("TNAM"): + case ESM::fourCC("UNAM"): + case ESM::fourCC("VMAD"): + case ESM::fourCC("VNAM"): + case ESM::fourCC("WNAM"): + case ESM::fourCC("XNAM"): // Dawnguard only? + case ESM::fourCC("NNAM"): + case ESM::fourCC("NAM0"): // FO3 + case ESM::fourCC("REPL"): // FO3 + case ESM::fourCC("MOD2"): // FO3 + case ESM::fourCC("MO2T"): // FO3 + case ESM::fourCC("MO2S"): // FO3 + case ESM::fourCC("NAM6"): // FO3 + case ESM::fourCC("MOD4"): // First person model data + case ESM::fourCC("MO4T"): + case ESM::fourCC("MO4S"): + case ESM::fourCC("MO4C"): + case ESM::fourCC("MO4F"): // First person model data end + case ESM::fourCC("BIPL"): // FO3 + case ESM::fourCC("NAM7"): // FO3 + case ESM::fourCC("MOD3"): // FO3 + case ESM::fourCC("MO3T"): // FO3 + case ESM::fourCC("MO3S"): // FO3 + case ESM::fourCC("MODD"): // FO3 + // case ESM::fourCC("MOSD"): // FO3 + case ESM::fourCC("DAMC"): // Destructible + case ESM::fourCC("DEST"): + case ESM::fourCC("DMDC"): + case ESM::fourCC("DMDL"): + case ESM::fourCC("DMDT"): + case ESM::fourCC("DMDS"): + case ESM::fourCC("DSTA"): + case ESM::fourCC("DSTD"): + case ESM::fourCC("DSTF"): // Destructible end + case ESM::fourCC("VATS"): // FONV + case ESM::fourCC("VANM"): // FONV + case ESM::fourCC("MWD1"): // FONV + case ESM::fourCC("MWD2"): // FONV + case ESM::fourCC("MWD3"): // FONV + case ESM::fourCC("MWD4"): // FONV + case ESM::fourCC("MWD5"): // FONV + case ESM::fourCC("MWD6"): // FONV + case ESM::fourCC("MWD7"): // FONV + case ESM::fourCC("WMI1"): // FONV + case ESM::fourCC("WMI2"): // FONV + case ESM::fourCC("WMI3"): // FONV + case ESM::fourCC("WMS1"): // FONV + case ESM::fourCC("WMS2"): // FONV + case ESM::fourCC("WNM1"): // FONV + case ESM::fourCC("WNM2"): // FONV + case ESM::fourCC("WNM3"): // FONV + case ESM::fourCC("WNM4"): // FONV + case ESM::fourCC("WNM5"): // FONV + case ESM::fourCC("WNM6"): // FONV + case ESM::fourCC("WNM7"): // FONV + case ESM::fourCC("EFSD"): // FONV DeadMoney + case ESM::fourCC("APPR"): // FO4 + case ESM::fourCC("DAMA"): // FO4 + case ESM::fourCC("FLTR"): // FO4 + case ESM::fourCC("FNAM"): // FO4 + case ESM::fourCC("INRD"): // FO4 + case ESM::fourCC("LNAM"): // FO4 + case ESM::fourCC("MASE"): // FO4 + case ESM::fourCC("PTRN"): // FO4 + case ESM::fourCC("STCP"): // FO4 + case ESM::fourCC("WAMD"): // FO4 + case ESM::fourCC("WZMD"): // FO4 + case ESM::fourCC("OBTE"): // FO4 object template start + case ESM::fourCC("OBTF"): + case ESM::fourCC("OBTS"): + case ESM::fourCC("STOP"): // FO4 object template end reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadwrld.cpp b/components/esm4/loadwrld.cpp index b29cb37eb5..d9bae15385 100644 --- a/components/esm4/loadwrld.cpp +++ b/components/esm4/loadwrld.cpp @@ -56,46 +56,46 @@ void ESM4::World::load(ESM4::Reader& reader) const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader(); switch (subHdr.typeId) { - case ESM4::SUB_EDID: + case ESM::fourCC("EDID"): reader.getZString(mEditorId); break; - case ESM4::SUB_FULL: + case ESM::fourCC("FULL"): reader.getLocalizedString(mFullName); break; - case ESM4::SUB_WCTR: // TES5+ + case ESM::fourCC("WCTR"): // TES5+ reader.get(mCenterCell); break; - case ESM4::SUB_WNAM: + case ESM::fourCC("WNAM"): reader.getFormId(mParent); break; - case ESM4::SUB_SNAM: + case ESM::fourCC("SNAM"): reader.get(mSound); break; // sound, Oblivion only? - case ESM4::SUB_ICON: + case ESM::fourCC("ICON"): reader.getZString(mMapFile); break; - case ESM4::SUB_CNAM: + case ESM::fourCC("CNAM"): reader.getFormId(mClimate); break; - case ESM4::SUB_NAM2: + case ESM::fourCC("NAM2"): reader.getFormId(mWater); break; - case ESM4::SUB_NAM0: + case ESM::fourCC("NAM0"): { reader.get(mMinX); reader.get(mMinY); break; } - case ESM4::SUB_NAM9: + case ESM::fourCC("NAM9"): { reader.get(mMaxX); reader.get(mMaxY); break; } - case ESM4::SUB_DATA: + case ESM::fourCC("DATA"): reader.get(mWorldFlags); break; - case ESM4::SUB_MNAM: + case ESM::fourCC("MNAM"): { reader.get(mMap.width); reader.get(mMap.height); @@ -113,7 +113,7 @@ void ESM4::World::load(ESM4::Reader& reader) break; } - case ESM4::SUB_DNAM: // defaults + case ESM::fourCC("DNAM"): // defaults { reader.get(mLandLevel); // -2700.f for TES5 reader.get(mWaterLevel); // -14000.f for TES5 @@ -135,37 +135,37 @@ void ESM4::World::load(ESM4::Reader& reader) // 00119D2E freeside\freeside_01.mp3 0012D94D FreesideNorthWorld (Freeside) // 00119D2E freeside\freeside_01.mp3 0012D94E FreesideFortWorld (Old Mormon Fort) // NOTE: FONV DefaultObjectManager has 00090908 "explore" as the default music - case ESM4::SUB_ZNAM: + case ESM::fourCC("ZNAM"): reader.getFormId(mMusic); break; - case ESM4::SUB_PNAM: + case ESM::fourCC("PNAM"): reader.get(mParentUseFlags); break; - case ESM4::SUB_OFST: - case ESM4::SUB_RNAM: // multiple - case ESM4::SUB_MHDT: - case ESM4::SUB_LTMP: - case ESM4::SUB_XEZN: - case ESM4::SUB_XLCN: - case ESM4::SUB_NAM3: - case ESM4::SUB_NAM4: - case ESM4::SUB_NAMA: - case ESM4::SUB_ONAM: - case ESM4::SUB_TNAM: - case ESM4::SUB_UNAM: - case ESM4::SUB_XWEM: - case ESM4::SUB_MODL: // Model data start - case ESM4::SUB_MODT: - case ESM4::SUB_MODC: - case ESM4::SUB_MODS: - case ESM4::SUB_MODF: // Model data end - case ESM4::SUB_INAM: // FO3 - case ESM4::SUB_NNAM: // FO3 - case ESM4::SUB_XNAM: // FO3 - case ESM4::SUB_IMPS: // FO3 Anchorage - case ESM4::SUB_IMPF: // FO3 Anchorage - case ESM4::SUB_CLSZ: // FO4 - case ESM4::SUB_WLEV: // FO4 + case ESM::fourCC("OFST"): + case ESM::fourCC("RNAM"): // multiple + case ESM::fourCC("MHDT"): + case ESM::fourCC("LTMP"): + case ESM::fourCC("XEZN"): + case ESM::fourCC("XLCN"): + case ESM::fourCC("NAM3"): + case ESM::fourCC("NAM4"): + case ESM::fourCC("NAMA"): + case ESM::fourCC("ONAM"): + case ESM::fourCC("TNAM"): + case ESM::fourCC("UNAM"): + case ESM::fourCC("XWEM"): + case ESM::fourCC("MODL"): // Model data start + case ESM::fourCC("MODT"): + case ESM::fourCC("MODC"): + case ESM::fourCC("MODS"): + case ESM::fourCC("MODF"): // Model data end + case ESM::fourCC("INAM"): // FO3 + case ESM::fourCC("NNAM"): // FO3 + case ESM::fourCC("XNAM"): // FO3 + case ESM::fourCC("IMPS"): // FO3 Anchorage + case ESM::fourCC("IMPF"): // FO3 Anchorage + case ESM::fourCC("CLSZ"): // FO4 + case ESM::fourCC("WLEV"): // FO4 reader.skipSubRecordData(); break; default: diff --git a/components/esm4/reader.cpp b/components/esm4/reader.cpp index a3ea438d65..9811cf6103 100644 --- a/components/esm4/reader.cpp +++ b/components/esm4/reader.cpp @@ -588,7 +588,7 @@ namespace ESM4 // Extended storage subrecord redefines the following subrecord's size. // Would need to redesign the loader to support that, so skip over both subrecords. - if (result && mCtx.subRecordHeader.typeId == ESM4::SUB_XXXX) + if (result && mCtx.subRecordHeader.typeId == ESM::fourCC("XXXX")) { std::uint32_t extDataSize; get(extDataSize); diff --git a/components/esm4/reader.hpp b/components/esm4/reader.hpp index 92dc00b96d..914fa4a647 100644 --- a/components/esm4/reader.hpp +++ b/components/esm4/reader.hpp @@ -335,7 +335,7 @@ namespace ESM4 // Get a subrecord of a particular type and data type template - bool getSubRecord(const ESM4::SubRecordTypes type, T& t) + bool getSubRecord(const std::uint32_t type, T& t) { ESM4::SubRecordHeader hdr; if (!getExact(hdr) || (hdr.typeId != type) || (hdr.dataSize != sizeof(T)))