Beispiel #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);
        }
Beispiel #2
0
        private void loadFromStream(Stream input)
        {
            this.version = StreamHelpers.ReadValueU32(input);
            uint count = StreamHelpers.ReadValueU32(input);

            for (int i = 0; i < count; i++)
            {
                ulong  instanceId = StreamHelpers.ReadValueU64(input);
                uint   nameLength = StreamHelpers.ReadValueU32(input);
                string nameMap    = StreamHelpers.ReadStringASCII(input, nameLength);

                this.entries.Add(instanceId, nameMap);
            }
        }
        private void loadFromStream(Stream input)
        {
            BinaryReader reader = new BinaryReader(input);

            this.version = StreamHelpers.ReadValueU32(input);
            this.offSize.Load(input);
            this.materialList        = new CatalogResource.MaterialList();
            this.materialList.typeId = 0x319E4F1D;
            this.materialList.Load(input);
            if (this.version >= 0x16)
            {
                reader.ReadString();
            }
            this.common.Load(input);

            this.unkDword1 = StreamHelpers.ReadValueU32(input);
            this.unkByte   = StreamHelpers.ReadValueU8(input);
            this.unkDword2 = StreamHelpers.ReadValueU32(input);
            this.unkByte2  = StreamHelpers.ReadValueU8(input);
            this.unkByte3  = StreamHelpers.ReadValueU8(input);
            this.unk4Byte  = StreamHelpers.ReadValueU32(input);
            this.index1    = StreamHelpers.ReadValueU32(input);
            this.unkDword3 = StreamHelpers.ReadValueU32(input);
            this.unkDword4 = StreamHelpers.ReadValueU32(input);
            this.unkDword5 = StreamHelpers.ReadValueU32(input);
            this.unkDword6 = StreamHelpers.ReadValueU32(input);
            this.unkDword7 = StreamHelpers.ReadValueU32(input);

            this.count1 = StreamHelpers.ReadValueU8(input);
            for (int i = 0; i < count1; i++)
            {
                WallMask wm = new WallMask();
                wm = StreamHelpers.ReadStructure <WallMask>(input);
                this.wallMasks.Add(wm);
            }
            this.unkByte               = StreamHelpers.ReadValueU8(input);
            this.index2                = StreamHelpers.ReadValueU32(input);
            this.hash                  = StreamHelpers.ReadValueU32(input);
            this.roomFlags             = StreamHelpers.ReadValueU32(input);
            this.functionCategoryFlags = StreamHelpers.ReadValueU32(input);
            this.subCategoryFlags      = StreamHelpers.ReadValueU64(input);
            this.subRoomFlags          = StreamHelpers.ReadValueU64(input);
            this.buildCategoryFlags    = StreamHelpers.ReadValueU32(input);
            this.index3                = StreamHelpers.ReadValueU32(input);
            this.unkDword              = StreamHelpers.ReadValueU32(input);
            this.materialGroup1        = MadScience.Helpers.stripControlFromString(reader.ReadString());
            this.materialGroup2        = MadScience.Helpers.stripControlFromString(reader.ReadString());
        }