/// <summary> /// Initializes a new instance of the <see cref="NiStencilProperty"/> class. /// </summary> /// <param name="file">The file.</param> /// <param name="reader">The reader.</param> public NiStencilProperty(NiFile file, BinaryReader reader) : base(file, reader) { if (this.File.Header.Version <= eNifVersion.VER_10_0_1_2) { this.Flags = reader.ReadUInt16(); } if (this.File.Header.Version <= eNifVersion.VER_20_0_0_5) { this.IsStencilEnabled = reader.ReadBoolean(Version); this.StencilFunction = (eStencilCompareMode)reader.ReadUInt32(); this.StencilRef = reader.ReadUInt32(); this.StencilMask = reader.ReadUInt32(); this.FailAction = (eStencilAction)reader.ReadUInt32(); this.ZFailAction = (eStencilAction)reader.ReadUInt32(); this.PassAction = (eStencilAction)reader.ReadUInt32(); this.FaceDrawMode = (eFaceDrawMode)reader.ReadUInt32(); } if (this.File.Header.Version >= eNifVersion.VER_20_1_0_3) { this.Flags = reader.ReadUInt16(); this.StencilRef = reader.ReadUInt32(); this.StencilMask = reader.ReadUInt32(); } }