Example #1
0
        public static byte[] GetByteArray(PsoFile pso, PsoStructureEntryInfo entry, int offset)
        {
            var aCount   = (entry.ReferenceKey >> 16) & 0x0000FFFF;
            var aBlockId = (int)entry.ReferenceKey & 0x0000FFFF;
            var block    = pso.GetBlock(aBlockId);

            if (block == null)
            {
                return(null);
            }

            //block.Offset

            return(null);
        }
        public override void Read(DataReader reader)
        {
            uint x = reader.ReadUInt32();

            this.Type            = (byte)((x & 0xFF000000) >> 24);
            this.EntriesCount    = (short)(x & 0xFFFF);
            this.Unk             = (byte)((x & 0x00FF0000) >> 16);
            this.StructureLength = reader.ReadInt32();
            this.Unk_Ch          = reader.ReadUInt32();

            Entries = new List <PsoStructureEntryInfo>();
            for (int i = 0; i < EntriesCount; i++)
            {
                var entry = new PsoStructureEntryInfo();
                entry.Read(reader);
                Entries.Add(entry);
            }
        }