public void Sync(IComponentSerializer ser) { if (ser.IsReader) { int option = 0; ser.Sync(nameof(_scannerOptions), ref option); _scannerOptions = (ScannerOptions)option; } else { int option = (int)_scannerOptions; ser.Sync(nameof(_scannerOptions), ref option); } ser.Sync(nameof(_isVBlank), ref _isVBlank); ser.Sync(nameof(_framebuffer), ref _framebuffer, false); ser.Sync(nameof(_isTextInversed), ref _isTextInversed); ser.Sync(nameof(_cyclesPerVBlank), ref _cyclesPerVBlank); ser.Sync(nameof(_cyclesPerVBlankPreset), ref _cyclesPerVBlankPreset); ser.Sync(nameof(_cyclesPerVSync), ref _cyclesPerVSync); ser.Sync(nameof(_cyclesPerFlash), ref _cyclesPerFlash); ser.Sync(nameof(_vCountPreset), ref _vCountPreset); ser.Sync(nameof(_vLineLeaveVBlank), ref _vLineLeaveVBlank); ser.Sync(nameof(_charSet), ref _charSet, false); ser.Sync(nameof(_isCellDirty), ref _isCellDirty, false); ser.Sync(nameof(_isMonochrome), ref _isMonochrome); }
public void Sync(IComponentSerializer ser) { ser.Sync(nameof(_clockEnabled), ref _clockEnabled); ser.Sync(nameof(_writeEnabled), ref _writeEnabled); _clockRegister.Sync(ser); _comparisonRegister.Sync(ser); }
public void Sync(IComponentSerializer ser) { ser.Sync(nameof(_isHigh), ref _isHigh); ser.Sync(nameof(_highCycles), ref _highCycles); ser.Sync(nameof(_totalCycles), ref _totalCycles); ser.Sync(nameof(_lastCycles), ref _lastCycles); }
public DocumentTrackingRequest(IComponentSerializer serializaer) : base(serializaer) { _document = new CompositeComponent("DOCUMENTO"); _registry = new CompositeComponent("REGISTRO"); _document.AddComponent(_registry); }
public CancelDocumentRequest(IComponentSerializer serializaer) : base(serializaer) { _cancelNode = new CompositeComponent("CANCELA"); _registryNode = new CompositeComponent("REGISTRO"); _cancelNode.AddComponent(_registryNode); }
public override void OnSerialize(IComponentSerializer s) { s.Serialize(nameof(movementVector), movementVector); s.Serialize(nameof(movementFactor), movementFactor); s.Serialize(nameof(period), period); s.Serialize(nameof(Node.Position), Node.Position); s.Serialize(nameof(Node.Rotation), Node.Rotation); }
public DocumentInformationRequest(IComponentSerializer serializaer) : base(serializaer) { _document = new CompositeComponent("DOCUMENTO"); _registry = new CompositeComponent("REGISTRO"); _header = new CompositeComponent("CABECERA"); _registry.AddComponent(_header); _document.AddComponent(_registry); }
public override void Sync(IComponentSerializer ser) { ser.Sync(nameof(_trackBuffer), ref _trackBuffer, false); ser.Sync(nameof(_trackOffset), ref _trackOffset); ser.Sync(nameof(_primaryBuffer), ref _primaryBuffer, false); ser.Sync(nameof(_secondaryBuffer), ref _secondaryBuffer, false); ser.Sync(nameof(_sectorSkew), ref _sectorSkew, false); base.Sync(ser); }
public void Sync(IComponentSerializer ser) { ser.Sync(nameof(_trackLoaded), ref _trackLoaded); ser.Sync(nameof(_trackChanged), ref _trackChanged); ser.Sync(nameof(_trackNumber), ref _trackNumber); ser.Sync(nameof(_trackOffset), ref _trackOffset); ser.Sync(nameof(_trackData), ref _trackData, false); // TODO: save the delta, this is saving the rom into save states _disk?.Sync(ser); }
public void Serialize(uint entityID, ITypeSafeDictionary dictionary, ISerializationData serializationData , int serializationType) { IComponentSerializer <T> componentSerializer = _serializers[serializationType]; var safeDictionary = (ITypeSafeDictionary <T>)dictionary; if (safeDictionary.TryFindIndex(entityID, out uint index) == false) { throw new ECSException("Entity Serialization failed"); } ref T val = ref safeDictionary.GetDirectValueByRef(index);
// ReSharper disable once UnusedMember.Global public void Sync(IComponentSerializer ser) { if (ser.IsReader) { int[] usedDelta = new int[0]; int[] usedType = new int[0]; int[] freeDelta = new int[0]; int[] freeType = new int[0]; ser.Sync("UsedDelta", ref usedDelta, false); ser.Sync("UsedType", ref usedType, false); ser.Sync("FreeDelta", ref freeDelta, false); ser.Sync("FreeType", ref freeType, false); _used.Clear(); for (int i = 0; i < usedDelta.Length; i++) { var e = new MachineEvent(usedDelta[i], (EventCallbacks)usedType[i]); _used.AddLast(new LinkedListNode <MachineEvent>(e)); } _free.Clear(); for (int i = 0; i < freeDelta.Length; i++) { var e = new MachineEvent(freeDelta[i], (EventCallbacks)freeType[i]); _free.AddLast(new LinkedListNode <MachineEvent>(e)); } } else { var usedDelta = _used.Select(u => u.Delta).ToArray(); var usedType = _used.Select(u => (int)u.Type).ToArray(); var freeDelta = _free.Select(f => f.Delta).ToArray(); var freeType = _free.Select(f => (int)f.Type).ToArray(); ser.Sync("UsedDelta", ref usedDelta, false); ser.Sync("UsedType", ref usedType, false); ser.Sync("FreeDelta", ref freeDelta, false); ser.Sync("FreeType", ref freeType, false); } }
public void Sync(IComponentSerializer ser) { ser.Sync(nameof(_is65C02), ref _is65C02); ser.Sync(nameof(_multiplier), ref _multiplier); ser.Sync(nameof(_ra), ref _ra); ser.Sync(nameof(_rx), ref _rx); ser.Sync(nameof(_ry), ref _ry); ser.Sync(nameof(_rs), ref _rs); ser.Sync(nameof(_rp), ref _rp); ser.Sync(nameof(_rpc), ref _rpc); ser.Sync(nameof(_ea), ref _ea); ser.Sync(nameof(_cc), ref _cc); ser.Sync(nameof(_opCode), ref _opCode); ser.Sync(nameof(_cycles), ref _cycles); if (!ser.IsReader) { // A way to set the action callback Is65C02 = _is65C02; } }
public override void OnSerialize(IComponentSerializer s) { s.Serialize(nameof(RotationSpeed), RotationSpeed); s.Serialize(nameof(Node.Position), Node.Position); s.Serialize(nameof(Node.Rotation), Node.Rotation); }
public void Sync(IComponentSerializer ser) { ser.Sync(nameof(_data), ref _data); ser.Sync(nameof(_mask), ref _mask); }
public BaseRequest(IComponentSerializer serializaer, string rootName = "BODY") { _serializer = serializaer; _root = new CompositeComponent(rootName); }
public override void OnSerialize(IComponentSerializer s) { s.Serialize(nameof(Color), Color); }
public virtual void Sync(IComponentSerializer ser) { ser.Sync(nameof(Data), ref Data, false); ser.Sync(nameof(IsWriteProtected), ref IsWriteProtected); }
public virtual void OnSerialize(IComponentSerializer serializer) { }
public ContextSerializer(IComponentSerializer componentSerializer, EcsSerializationConfig ecsSerializationConfig) { _componentSerializer = componentSerializer; _ecsSerializationConfig = ecsSerializationConfig; }
public ComposedComponentSerializer() { _serializers = new IComponentSerializer <T> [2]; _serializers[0] = new X(); _serializers[1] = new Y(); }
public static bool SerializeSafe <T> (this IComponentSerializer <T> componentSerializer, in T value, ISerializationData serializationData)
public override void OnSerialize(IComponentSerializer s) { s.Serialize(nameof(Color), Color); }