/// <summary> /// Write a 32-bit pointer value in this position, for an object /// </summary> public void WritePointer(GMSerializable obj) { if (obj == null) { // This object doesn't exist, so it will never have a pointer value... Write(0); return; } // Add this location to a list for this object List <int> pending; if (PendingPointerWrites.TryGetValue(obj, out pending)) { pending.Add(Offset); } else { PendingPointerWrites.Add(obj, new List <int> { Offset }); } // Placeholder pointer value, will be overwritten in the future Write(0xBADD0660); }
/// <summary> /// Sets the current offset to be the pointer location for the specified object /// </summary> public void WriteObjectPointer(GMSerializable obj) { PointerOffsets.Add(obj, Offset); }
public AssetRef(string name, int dataIndex, GMSerializable dataAsset = null) { Name = name; DataIndex = dataIndex; DataAsset = dataAsset; }