示例#1
0
 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;
 }
示例#2
0
 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);
 }
示例#3
0
 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);
 }
示例#4
0
        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);
        }
示例#5
0
 public void SwapEnd()
 {
     Name = new MetaHash(MetaTypes.SwapBytes(Name.Hash));
     var b = Bounds; b.SwapEnd(); Bounds = b;
 }
示例#6
0
 public void SwapEnd()
 {
     itypName      = new MetaHash(MetaTypes.SwapBytes(itypName.Hash));
     manifestFlags = MetaTypes.SwapBytes(manifestFlags);
     var d = itypDepArray; d.SwapEnd(); itypDepArray = d;
 }