Exemplo n.º 1
0
        private void loadFromStream(Stream input)
        {
            this.magic1 = StreamHelpers.ReadValueU64(input);
            this.magic2 = StreamHelpers.ReadValueU64(input);

            this.headerSize = StreamHelpers.ReadValueU32(input);
            this.blank_1    = StreamHelpers.ReadValueU32(input);          // Blank
            this.blank_2    = StreamHelpers.ReadValueU32(input);          // Blank
            this.blank_3    = StreamHelpers.ReadValueU32(input);          // Blank

            this.version = StreamHelpers.ReadValueU32(input);

            this.dataSize = StreamHelpers.ReadValueU32(input);
            this.crc32    = StreamHelpers.ReadValueU32(input);
            this.unknown3 = StreamHelpers.ReadValueU32(input);

            for (int i = 0; i < 10; i++)
            {
                this.unkList.Add(StreamHelpers.ReadValueU32(input));
            }

            this.unknown4     = StreamHelpers.ReadValueU32(input);         // Always 2?
            this.scriptOffset = StreamHelpers.ReadValueU32(input);
            this.scriptSize   = StreamHelpers.ReadValueU32(input);

            // 4 more values... add to unkList
            for (int i = 0; i < 4; i++)
            {
                this.unkList.Add(StreamHelpers.ReadValueU32(input));
            }

            this.int1Offset    = StreamHelpers.ReadValueU32(input);
            this.int1Count     = StreamHelpers.ReadValueU32(input);
            this.int1EndOffset = StreamHelpers.ReadValueU32(input);

            // Knock one off int1Count
            this.int1Count--;

            this.unknown5 = StreamHelpers.ReadValueU32(input);

            // Int 1 seems to start with 1 based, not 0?
            // Always 4 then 0
            this.int1unk1 = StreamHelpers.ReadValueU32(input);
            this.int1unk2 = StreamHelpers.ReadValueU32(input);

            for (int i = 0; i < this.int1Count; i++)
            {
                RIGChunkInt1 rChunk = new RIGChunkInt1();
                rChunk.unk1 = StreamHelpers.ReadValueU32(input);
                rChunk.unk2 = StreamHelpers.ReadValueU64(input);
                this.int1.Add(rChunk);
            }

            // Extra value
            this.unknown6 = StreamHelpers.ReadValueU32(input);
        }
Exemplo n.º 2
0
        private void loadFromStream(Stream input)
        {
            this.magic1 = StreamHelpers.ReadValueU64(input);
            this.magic2 = StreamHelpers.ReadValueU64(input);

            this.headerSize = StreamHelpers.ReadValueU32(input);
            this.blank_1 = StreamHelpers.ReadValueU32(input); // Blank
            this.blank_2 = StreamHelpers.ReadValueU32(input); // Blank
            this.blank_3 = StreamHelpers.ReadValueU32(input); // Blank

            this.version = StreamHelpers.ReadValueU32(input);

            this.dataSize = StreamHelpers.ReadValueU32(input);
            this.crc32 = StreamHelpers.ReadValueU32(input);
            this.unknown3 = StreamHelpers.ReadValueU32(input);

            for (int i = 0; i < 10; i++)
            {
                this.unkList.Add(StreamHelpers.ReadValueU32(input));
            }

            this.unknown4 = StreamHelpers.ReadValueU32(input); // Always 2?
            this.scriptOffset = StreamHelpers.ReadValueU32(input);
            this.scriptSize = StreamHelpers.ReadValueU32(input);

            // 4 more values... add to unkList
            for (int i = 0; i < 4; i++)
            {
                this.unkList.Add(StreamHelpers.ReadValueU32(input));
            }

            this.int1Offset = StreamHelpers.ReadValueU32(input);
            this.int1Count = StreamHelpers.ReadValueU32(input);
            this.int1EndOffset = StreamHelpers.ReadValueU32(input);

            // Knock one off int1Count
            this.int1Count--;

            this.unknown5 = StreamHelpers.ReadValueU32(input);

            // Int 1 seems to start with 1 based, not 0?
            // Always 4 then 0
            this.int1unk1 = StreamHelpers.ReadValueU32(input);
            this.int1unk2 = StreamHelpers.ReadValueU32(input);

            for (int i = 0; i < this.int1Count; i++)
            {
                RIGChunkInt1 rChunk = new RIGChunkInt1();
                rChunk.unk1 = StreamHelpers.ReadValueU32(input);
                rChunk.unk2 = StreamHelpers.ReadValueU64(input);
                this.int1.Add(rChunk);
            }

            // Extra value
            this.unknown6 = StreamHelpers.ReadValueU32(input);
        }