private static void WriteObjects(IList <KeyValuePair <string, GMObject> > _data, Stream _s, IFF _iff) { WriteDataKVP(_data, _s, _iff, delegate(KeyValuePair <string, GMObject> _kvp, Stream __s, IFF __iff, long __index) { __s.PatchOffset(__index); __iff.AddString(__s, _kvp.Key); GMObject value = _kvp.Value; __s.WriteInteger(value.SpriteIndex); __s.WriteBoolean(value.Visible); __s.WriteBoolean(value.Solid); __s.WriteInteger(value.Depth); __s.WriteBoolean(value.Persistent); __s.WriteInteger(value.Parent); __s.WriteInteger(value.Mask); Console.WriteLine("DEBUG:\nOBJECT EVENTS: " + value.Events.ToString()); WriteDataList(value.Events, __s, __iff, delegate(IList <KeyValuePair <int, GMEvent> > _list, Stream ___s, IFF ___iff, long ___index) { ___s.PatchOffset(___index); WriteDataList(_list, ___s, ___iff, delegate(KeyValuePair <int, GMEvent> _entry, Stream ____s, IFF ____iff, long ____index) { ____s.PatchOffset(____index); ____s.WriteInteger(_entry.Key); WriteGMEvent(_entry.Value, ____s, ____iff); }); }); }); }
public void RemoveDND() { if (!DNDRemoved) { DNDRemoved = true; foreach (KeyValuePair <string, GMObject> @object in Objects) { GMObject value = @object.Value; if (value != null) { foreach (IList <KeyValuePair <int, GMEvent> > @event in value.Events) { using (IEnumerator <KeyValuePair <int, GMEvent> > enumerator3 = @event.GetEnumerator()) { while (enumerator3.MoveNext()) { RemoveEventDND(_ev: enumerator3.Current.Value, _name: @object.Key); } } } } } foreach (KeyValuePair <string, GMTimeLine> timeLine in TimeLines) { GMTimeLine value3 = timeLine.Value; if (value3 != null) { using (IEnumerator <KeyValuePair <int, GMEvent> > enumerator5 = value3.Entries.GetEnumerator()) { while (enumerator5.MoveNext()) { RemoveEventDND(_ev: enumerator5.Current.Value, _name: timeLine.Key); } } } } } }
public void Object_Load(Stream _s) { int num = _s.ReadInteger(); int num2 = _s.ReadInteger(); for (int i = 0; i < num2; i++) { Stream stream = _s; if (num == 800) { stream = _s.ReadStreamC(); } bool flag = stream.ReadBoolean(); KeyValuePair <string, GMObject> item = default(KeyValuePair <string, GMObject>); if (flag) { string key = stream.ReadString(); GMObject value = new GMObject(this, stream); item = new KeyValuePair <string, GMObject>(key, value); } Objects.Add(item); } }