示例#1
0
        protected override void Parse(Stream s)
        {
            BinaryReader r = new BinaryReader(s);

            base.Parse(s);

            this.unknown2                       = r.ReadUInt32();
            this.common                         = new Common(requestedApiVersion, OnResourceChanged, s);
            this.wallType                       = (Wall)r.ReadUInt32();
            this.partitionType                  = (Partition)r.ReadUInt32();
            this.partitionFlags                 = (PartitionFlagsType)r.ReadUInt32();
            this.verticalSpanType               = (VerticalSpan)r.ReadUInt32();
            this.partitionsBlockedFlags         = (PartitionsBlockedFlagsType)r.ReadUInt32();
            this.adjacentPartitionsBlockedFlags = (PartitionsBlockedFlagsType)r.ReadUInt32();
            this.partitionToolMode              = (PartitionTool)r.ReadUInt32();
            this.toolUsageFlags                 = (ToolUsageFlagsType)r.ReadUInt32();
            this.defaultPatternIndex            = r.ReadUInt32();
            this.wallThicknessType              = (WallThickness)r.ReadUInt32();

            list = new TGIBlockList(OnResourceChanged, s, tgiPosn, tgiSize);

            if (checking)
            {
                if (this.GetType().Equals(typeof(WallCatalogResource)) && s.Position != s.Length)
                {
                    throw new InvalidDataException(String.Format("Data stream length 0x{0:X8} is {1:X8} bytes longer than expected at {2:X8}",
                                                                 s.Length, s.Length - s.Position, s.Position));
                }
            }
        }
示例#2
0
 public WallCatalogResource(int APIversion,
                            uint version,
                            uint unknown2,
                            Common common,
                            Wall wallType,
                            Partition partitionType,
                            PartitionFlagsType partitionFlags,
                            VerticalSpan verticalSpanType,
                            PartitionsBlockedFlagsType partitionsBlockedFlags,
                            PartitionsBlockedFlagsType adjacentPartitionsBlockedFlags,
                            PartitionTool partitionToolMode,
                            ToolUsageFlagsType toolUsageFlags,
                            uint defaultPatternIndex,
                            WallThickness wallThicknessType,
                            TGIBlockList ltgib)
     : base(APIversion, version, common, ltgib)
 {
     this.unknown2                       = unknown2;
     this.wallType                       = wallType;
     this.partitionType                  = partitionType;
     this.partitionFlags                 = partitionFlags;
     this.verticalSpanType               = verticalSpanType;
     this.partitionsBlockedFlags         = partitionsBlockedFlags;
     this.adjacentPartitionsBlockedFlags = adjacentPartitionsBlockedFlags;
     this.partitionToolMode              = partitionToolMode;
     this.toolUsageFlags                 = toolUsageFlags;
     this.defaultPatternIndex            = defaultPatternIndex;
     this.wallThicknessType              = wallThicknessType;
 }
示例#3
0
 public WallCatalogResource(int APIversion,
     uint version,
     uint unknown2,
     Common common,
     Wall wallType,
     Partition partitionType,
     PartitionFlagsType partitionFlags,
     VerticalSpan verticalSpanType,
     PartitionsBlockedFlagsType partitionsBlockedFlags,
     PartitionsBlockedFlagsType adjacentPartitionsBlockedFlags,
     PartitionTool partitionToolMode,
     ToolUsageFlagsType toolUsageFlags,
     uint defaultPatternIndex,
     WallThickness wallThicknessType,
     TGIBlockList ltgib)
     : base(APIversion, version, common, ltgib)
 {
     this.unknown2 = unknown2;
     this.wallType = wallType;
     this.partitionType = partitionType;
     this.partitionFlags = partitionFlags;
     this.verticalSpanType = verticalSpanType;
     this.partitionsBlockedFlags = partitionsBlockedFlags;
     this.adjacentPartitionsBlockedFlags = adjacentPartitionsBlockedFlags;
     this.partitionToolMode = partitionToolMode;
     this.toolUsageFlags = toolUsageFlags;
     this.defaultPatternIndex = defaultPatternIndex;
     this.wallThicknessType = wallThicknessType;
 }
示例#4
0
        protected override void Parse(Stream s)
        {
            BinaryReader r = new BinaryReader(s);
            base.Parse(s);

            this.unknown2 = r.ReadUInt32();
            this.common = new Common(requestedApiVersion, OnResourceChanged, s);
            this.wallType = (Wall)r.ReadUInt32();
            this.partitionType = (Partition)r.ReadUInt32();
            this.partitionFlags = (PartitionFlagsType)r.ReadUInt32();
            this.verticalSpanType = (VerticalSpan)r.ReadUInt32();
            this.partitionsBlockedFlags = (PartitionsBlockedFlagsType)r.ReadUInt32();
            this.adjacentPartitionsBlockedFlags = (PartitionsBlockedFlagsType)r.ReadUInt32();
            this.partitionToolMode = (PartitionTool)r.ReadUInt32();
            this.toolUsageFlags = (ToolUsageFlagsType)r.ReadUInt32();
            this.defaultPatternIndex = r.ReadUInt32();
            this.wallThicknessType = (WallThickness)r.ReadUInt32();

            list = new TGIBlockList(OnResourceChanged, s, tgiPosn, tgiSize);

            if (checking) if (this.GetType().Equals(typeof(WallCatalogResource)) && s.Position != s.Length)
                    throw new InvalidDataException(String.Format("Data stream length 0x{0:X8} is {1:X8} bytes longer than expected at {2:X8}",
                        s.Length, s.Length - s.Position, s.Position));
        }