public void Write(IoWriter io) { io.WriteInt32(Flags); io.WriteInt32(Unknown); io.WriteVariableLengthPascalString(Label); io.WriteVariableLengthPascalString(Comment); io.WriteByte(RangeEnabled); io.WriteInt16(LowRange); io.WriteInt16(HighRange); }
public void Save(IoWriter io) { io.WriteInt32(Unknown1); io.WriteInt32(Version); if (Version == 0xA) { io.WriteInt32(Unknown3); } io.WriteNullTerminatedString(Name); if (Name.Length % 2 == 0) { io.WriteByte(0); } io.WriteInt32(MysteryZero); io.WriteInt32(PersonMode); if (PersonMode > 0) { var size = (Version == 0x4) ? 0xa0 : 0x200; int pdi = 0; for (int i = 0; i < size; i += 2) { if (pdi >= 88) { io.WriteInt16(0); } else { io.WriteInt16(PersonData[pdi++]); } } } io.WriteInt16(NeighbourID); io.WriteUInt32(GUID); io.WriteInt32(UnknownNegOne); io.WriteInt32(Relationships.Count); foreach (var rel in Relationships) { io.WriteInt32(1); //keycount (1) io.WriteInt32(rel.Key); io.WriteInt32(rel.Value.Count); foreach (var val in rel.Value) { io.WriteInt32(val); } } }
public void Write(IoWriter io) { io.WriteUInt16((ushort)Type); io.WriteUInt16(Unknown); io.WriteInt16(Width); io.WriteInt16(Height); io.WriteInt16(X); io.WriteInt16(Y); io.WriteInt16(CommentSize); io.WriteInt16(TruePointer); io.WriteInt16(Special); io.WriteInt32(FalsePointer); io.WriteCString(Comment); if (Comment.Length % 2 == 0) { io.WriteByte(0xCD); //padding to 2 byte align } io.WriteInt32(TrailingZero); }