示例#1
0
        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());
        }
        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());
        }