public void SwapEnd() { VersionNumber = MetaTypes.SwapBytes(VersionNumber); var r = RegionDefs; r.SwapEnd(); RegionDefs = r; var g = Groups; g.SwapEnd(); Groups = g; var i = InteriorNames; i.SwapEnd(); InteriorNames = i; }
public static uint[] GetUintArray(PsoFile pso, Array_uint arr) { uint[] uints = GetUintArrayRaw(pso, arr); if (uints == null) { return(null); } for (int i = 0; i < uints.Length; i++) { uints[i] = MetaTypes.SwapBytes(uints[i]); } return(uints); }
public static MetaHash[] GetHashArray(PsoFile pso, Array_uint arr) { uint[] uints = GetUintArrayRaw(pso, arr); if (uints == null) { return(null); } MetaHash[] hashes = new MetaHash[uints.Length]; for (int n = 0; n < uints.Length; n++) { hashes[n].Hash = MetaTypes.SwapBytes(uints[n]); } return(hashes); }
public static uint[] GetUintArrayRaw(PsoFile pso, Array_uint arr) { byte[] data = pso.DataSection.Data; var entryid = arr.Pointer & 0xFFF; if ((entryid == 0) || (entryid > pso.DataMapSection.EntriesCount)) { return(null); } var entryoffset = (arr.Pointer & 0xFFFFFF) >> 12; var arrentry = pso.DataMapSection.Entries[(int)entryid - 1]; int totoffset = arrentry.Offset + (int)entryoffset; uint[] readdata = ConvertDataArrayRaw <uint>(data, totoffset, arr.Count1); return(readdata); }
public void SwapEnd() { Name = new MetaHash(MetaTypes.SwapBytes(Name.Hash)); var b = Bounds; b.SwapEnd(); Bounds = b; }
public void SwapEnd() { itypName = new MetaHash(MetaTypes.SwapBytes(itypName.Hash)); manifestFlags = MetaTypes.SwapBytes(manifestFlags); var d = itypDepArray; d.SwapEnd(); itypDepArray = d; }