public override void Serialise(MfcSerialiser archive) { base.Serialise(archive); archive.SerialiseUInt16((ushort)(HasTransparency ? 1 : 0)); archive.SerialiseUInt16((ushort)Mipmaps.Count); foreach (var mipmap in Mipmaps) { archive.SerialiseUInt16((ushort)mipmap.ImageDimensions.Height); archive.SerialiseUInt16((ushort)mipmap.ImageDimensionsMinusOne.Height); archive.SerialiseUInt16((ushort)mipmap.ImageDimensions.Width); archive.SerialiseUInt16((ushort)mipmap.ImageDimensionsMinusOne.Width); archive.SerialiseUInt16((ushort)mipmap.Level); archive.SerialiseUInt32((uint)mipmap.ImageData.Length); archive.SerialiseBytes(mipmap.ImageData); var spanCounts = from s in mipmap.PixelSpans select s.Count; archive.SerialiseUInt32((uint)spanCounts.Sum()); foreach (var spanList in mipmap.PixelSpans) { archive.SerialiseUInt16((ushort)spanList.Count); foreach (var pixelSpan in spanList) { archive.SerialiseUInt16(pixelSpan.StartIndex); archive.SerialiseUInt16(pixelSpan.EndIndex); } } archive.SerialiseObjectNoHeader(new TrailingBytes()); } }
public override void Serialise(MfcSerialiser archive) { base.Serialise(archive); archive.SerialiseUInt16(X); archive.SerialiseUInt16(Y); archive.SerialiseUInt16((ushort)FacingDirection); archive.SerialiseUInt16(Z); archive.SerialiseObjectNoHeader(new TrailingBytes()); }
public override void Serialise(MfcSerialiser archive) { base.Serialise(archive); archive.SerialiseUInt16(X1); archive.SerialiseUInt16(Y1); archive.SerialiseUInt16(X2); archive.SerialiseUInt16(Y2); archive.SerialiseObjectNoHeader(new TrailingBytes()); }
public override void Serialise(MfcSerialiser archive) { foreach (var colour in Palette) { archive.SerialiseByte(colour.R); archive.SerialiseByte(colour.G); archive.SerialiseByte(colour.B); archive.SerialiseByte(0); /* Never any alpha, transparency is handled by PixelSpans */ } archive.SerialiseBuggyList(Textures, 0); archive.SerialiseObjectNoHeader(new TrailingBytes()); }
public override void Serialise(MfcSerialiser archive) { base.Serialise(archive); archive.SerialiseUInt16(unknown01); archive.SerialiseUInt16(unknown02); archive.SerialiseUInt16(unknown03); archive.SerialiseUInt16(unknown04); archive.SerialiseUInt16(0); archive.SerialiseBytes(new byte[8]); archive.SerialiseBytes(new byte[8]); archive.SerialiseObjectNoHeader(new TrailingBytes()); }
public override void Serialise(MfcSerialiser archive) { archive.SerialiseUInt16(MinY); archive.SerialiseUInt16(MinX); archive.SerialiseUInt16(MaxX); archive.SerialiseUInt16(MaxY); ushort hack = 0; archive.SerialiseBuggyList(Geometry, hack); archive.SerialiseUInt16(0); hack += (ushort)Geometry.Count; archive.SerialiseBuggyList(Locations, hack); hack += (ushort)Locations.Count; archive.SerialiseBuggyList(Bsp, hack); }
public override void Serialise(MfcSerialiser archive) { base.Serialise(archive); archive.SerialiseString(LeftTopTexture); archive.SerialiseString(RightTopTexture); archive.SerialiseString(LeftWallTexture); archive.SerialiseString(RightWallTexture); archive.SerialiseString(LeftBottomTexture); archive.SerialiseString(RightBottomTexture); archive.SerialiseUInt16(BottomZ); archive.SerialiseUInt16(TopZ); archive.SerialiseUInt16(unknown16); archive.SerialiseUInt16(unknown17); archive.SerialiseByte(LeftTextureIsTransparent); archive.SerialiseByte(RightTextureIsTransparent); archive.SerialiseByte(EnableCollision); archive.SerialiseUInt16(unknown21); archive.SerialiseByte(unknown22); archive.SerialiseUInt16(LeftTextureOffset); archive.SerialiseUInt16(RightTextureOffset); }
public override void Serialise(MfcSerialiser archive) { archive.SerialiseUInt16(0); }
public override void Serialise(MfcSerialiser archive) { archive.SerialiseString(Name); archive.SerialiseObjectNoHeader(new TrailingBytes()); }
public abstract void Serialise(MfcSerialiser archive);