/// <summary> /// The serialise. /// </summary> /// <param name="serialise"> /// The serialise. /// </param> public void Serialise(IwSerialise serialise) { serialise.Vec3(ref this.center); if (serialise.IsReading()) { int r = 0; serialise.Int32(ref r); this.radius = r; } else { int r = (int)this.radius; serialise.Int32(ref r); } }
private void ReadChildGroups(IwSerialise iwSerialise) { byte num = 0; iwSerialise.UInt8(ref num); while (num > 0) { string path = string.Empty; iwSerialise.String(ref path); if (!string.IsNullOrEmpty(path)) { this.childGroups.Add(this.resManager.LoadGroup(path, false)); } { uint value = 0; iwSerialise.UInt32(ref value); } { int value = 0x00001000; iwSerialise.Int32(ref value); } { uint value = 0xd9794596; iwSerialise.UInt32(ref value); var f = iwSerialise.ClassRegistry.Get(value); } --num; } }
/// <summary> /// The serialise len str z. /// </summary> /// <param name="serialise"> /// The serialise. /// </param> /// <param name="str"> /// The str. /// </param> /// <exception cref="NotImplementedException"> /// </exception> public static void SerialiseLenStrZ(IwSerialise serialise, ref string str) { if (serialise.IsReading()) { int len = 0; serialise.Int32(ref len); byte[] b = new byte[len + 1]; serialise.Serialise(ref b); str = Encoding.ASCII.GetString(b); } else { throw new NotImplementedException(); } }
public override void Serialise(IwSerialise serialise) { base.Serialise(serialise); { int value = 0; serialise.Int32(ref value); } { byte value = 2; //1b=3 serialise.UInt8(ref value); } { Vector3 value = Vector3.Zero; serialise.SVec3(ref value); } { byte value = 1; serialise.UInt8(ref value); } { uint value = 3; //1b=1 serialise.UInt32(ref value); } { uint value = 2; //1b=1 num of bones? serialise.UInt32(ref value); } //1b=1 one more uint32? { bool value = true; serialise.Bool(ref value); } SerialiseMappedData(serialise); //1b-none // by number of bones { // 0x1d38b3fd Quaternion value = Quaternion.Identity; serialise.SQuat(ref value); } { // 0xa272adcf Quaternion value = Quaternion.Identity; serialise.SQuat(ref value); } }
/// <summary> /// The serialise. /// </summary> /// <param name="serialise"> /// The serialise. /// </param> /// <exception cref="NotImplementedException"> /// </exception> /// <exception cref="NotImplementedException"> /// </exception> public void Serialise(IwSerialise serialise) { SerialiseLenStr(serialise, ref this.name); serialise.UInt32(ref this.type); serialise.Int32(ref this.arraySize); serialise.UInt32(ref this.flags); if (serialise.IsReading()) { if (this.IsFloat) { this.floatData = new float[this.arraySize * this.NumberOfComponents]; serialise.Serialise(ref this.floatData); } else { throw new NotImplementedException(); } } else { throw new NotImplementedException(); } }