public override void LoadState(System.IO.BinaryReader stream) { base.LoadState(stream); irq_enabled = stream.ReadBoolean(); irq_counter = stream.ReadInt32(); odd = stream.ReadBoolean(); }
public FileHeader(System.IO.BinaryReader br) { majorVersion = 0; minorVersion = 0; stringCount = 0; infoCount = 0; ruleCount = 0; layoutOptions = new LayoutOptions(); byte[] magicCode = br.ReadBytes(4); if (magicCode[0] != 'K' && magicCode[1] != 'M' && magicCode[2] != 'K' && magicCode[3] != 'L') { throw new Exception("Invalid KeyMagic keyboard layout file."); } majorVersion = br.ReadByte(); minorVersion = br.ReadByte(); if (majorVersion == 1 && minorVersion > 4) { throw new Exception("Cannot load this keyboard layout file because this is newer version of keyboard layout file."); } stringCount = br.ReadInt16(); if (majorVersion == 1 && minorVersion > 3) { infoCount = br.ReadInt16(); } ruleCount = br.ReadInt16(); layoutOptions.trackCaps = br.ReadBoolean(); layoutOptions.autoBksp = br.ReadBoolean(); layoutOptions.eat = br.ReadBoolean(); layoutOptions.posBased = br.ReadBoolean(); }
public void SetDataFrom(System.IO.BinaryReader reader) { CorrelationId = new Guid(reader.ReadString()); Port = reader.ReadInt32(); NUnitTestRunner = reader.ReadString(); MsTestRunner = reader.ReadString(); LoggingEnabled = reader.ReadBoolean(); StartedPaused = reader.ReadBoolean(); }
public override void LoadState(System.IO.BinaryReader stream) { base.LoadState(stream); flag_r = stream.ReadBoolean(); flag_m = stream.ReadBoolean(); nt_reg0 = stream.ReadInt32(); nt_reg1 = stream.ReadInt32(); temp = stream.ReadInt32(); }
public override object Deserialize(System.IO.BinaryReader binaryReader) { bool hasValue = binaryReader.ReadBoolean (); if (!hasValue) return null; int typeID = binaryReader.ReadByte (); switch (typeID) { case 1: return binaryReader.ReadBoolean (); case 2: return binaryReader.ReadByte (); case 128: return binaryReader.ReadSByte (); case 3: return binaryReader.ReadInt16 (); case 129: return binaryReader.ReadUInt16 (); case 4: return binaryReader.ReadInt32 (); case 130: return binaryReader.ReadUInt32 (); case 5: return binaryReader.ReadInt64 (); case 131: return binaryReader.ReadUInt64 (); case 9: return binaryReader.ReadDouble (); case 16: return binaryReader.ReadString (); case 144: return binaryReader.ReadChar (); case 24: return new DateTime (binaryReader.ReadInt64 ()); case 32: return new Guid (binaryReader.ReadBytes (16)); case 36: return binaryReader.ReadBytes (binaryReader.ReadInt32 ()); case 37: { int count = binaryReader.ReadInt32 (); string[] r = new string[count]; for (int n = 0; n != count; n++) r [n] = binaryReader.ReadString (); return r; } case 38: { int count = binaryReader.ReadInt32 (); long[] r = new long[count]; for (int n = 0; n != count; n++) r [n] = binaryReader.ReadInt64 (); return r; } default: throw new Exception (string.Format ("Serialization for type <{0}> is not supported", typeID)); } }
public override void LoadState(System.IO.BinaryReader stream) { base.LoadState(stream); prescaler = stream.ReadInt32(); irq_counter = stream.ReadInt32(); irq_mode_cycle = stream.ReadBoolean(); irq_reload = stream.ReadInt32(); irq_enable = stream.ReadBoolean(); irq_enable_on_ak = stream.ReadBoolean(); }
public override void LoadState(System.IO.BinaryReader stream) { base.LoadState(stream); flag_c = stream.ReadBoolean(); flag_p = stream.ReadBoolean(); address_8001 = stream.ReadInt32(); for (int i = 0; i < chr_reg.Length; i++) chr_reg[i] = stream.ReadInt32(); for (int i = 0; i < prg_reg.Length; i++) prg_reg[i] = stream.ReadInt32(); }
public override int loadbody(System.IO.BinaryReader br) { long pos = br.BaseStream.Position; MeshName = br.ReadPackString(); TextureName = br.ReadPackString(); ShadowCaster = br.ReadBoolean();; ShadowReceiver = br.ReadBoolean(); Transparent = br.ReadBoolean(); SelfIlmn = br.ReadBoolean(); return Convert.ToInt32(br.BaseStream.Position - pos); }
public override void LoadState(System.IO.BinaryReader stream) { base.LoadState(stream); prg_mode = stream.ReadBoolean(); prg_reg0 = stream.ReadByte(); for (int i = 0; i < chr_Reg.Length; i++) chr_Reg[i] = stream.ReadInt32(); irq_reload = stream.ReadInt32(); irq_counter = stream.ReadInt32(); prescaler = stream.ReadInt32(); irq_mode_cycle = stream.ReadBoolean(); irq_enable = stream.ReadBoolean(); irq_enable_on_ak = stream.ReadBoolean(); }
public Lesson(System.IO.BinaryReader reader) { DayIndex = reader.ReadByte(); PeriodIndex = reader.ReadByte(); YearIndex = reader.ReadByte(); FormIndex = reader.ReadByte(); TeacherAbbreviation = reader.ReadString(); SubjectAbbreviation = reader.ReadString(); RoomCode = reader.ReadString(); homeworkAmount = reader.ReadByte(); invisible = reader.ReadBoolean(); locked = reader.ReadBoolean(); }
public override void LoadState(System.IO.BinaryReader stream) { base.LoadState(stream); flag_c = stream.ReadBoolean(); flag_p = stream.ReadBoolean(); address_8001 = stream.ReadInt32(); for (int i = 0; i < chr_reg.Length; i++) chr_reg[i] = stream.ReadInt32(); prg_reg = stream.ReadInt32(); irq_enabled = stream.ReadBoolean(); irq_counter = stream.ReadByte(); old_irq_counter = stream.ReadInt32(); irq_reload = stream.ReadByte(); irq_clear = stream.ReadBoolean(); }
public override void Deserialize(System.IO.BinaryReader reader) { base.Deserialize(reader); Stop = reader.ReadBoolean(); NextMarker = reader.ReadString(); }
public override void Deserialize(System.IO.BinaryReader reader) { base.Deserialize(reader); Respawn = reader.ReadBoolean(); RespawnTime = reader.ReadInt32(); }
public override void Deserialize(System.IO.BinaryReader reader) { base.Deserialize(reader); ParticleTemplate = new Particle(); ParticleTemplate.Template = true; ParticleTemplate.Color = new Color(reader.ReadByte(), reader.ReadByte(), reader.ReadByte(), reader.ReadByte()); ParticleTemplate.Texture = Texture2D.FromStream(Engine.graphicsDevice, System.IO.File.OpenRead(reader.ReadString())); ParticleTemplate.Velocity = new Vector2(reader.ReadSingle(), reader.ReadSingle()); ParticleTemplate.FadeColor = new Color(reader.ReadByte(), reader.ReadByte(), reader.ReadByte(), reader.ReadByte()); ParticleTemplate.FadeStartTime = reader.ReadInt32(); ParticleTemplate.FadeTime = reader.ReadInt32(); ParticleTemplate.Rotation = reader.ReadInt32(); ParticleTemplate.RotationSpeed = reader.ReadInt32(); InitialVelocity = new Vector2(reader.ReadSingle(), reader.ReadSingle()); InitialRandom = new Vector2(reader.ReadSingle(), reader.ReadSingle()); Time = reader.ReadInt32(); Amount = reader.ReadInt32(); StartEnabled = reader.ReadBoolean(); }
public virtual void Load(System.IO.BinaryReader br) { position = SerializationUtils.ReadVector3(br); rotation = SerializationUtils.ReadVector3(br); energy = br.ReadByte(); destroyed = br.ReadBoolean(); }
public override void LoadState(System.IO.BinaryReader stream) { base.LoadState(stream); address_8001 = stream.ReadInt32(); prg_a = stream.ReadBoolean(); prg_reg = stream.ReadByte(); }
public override void LoadState(System.IO.BinaryReader stream) { base.LoadState(stream); SRAM_PRG_Page = stream.ReadInt32(); irqEnable = stream.ReadBoolean(); irqCounter = stream.ReadInt32(); }
public override void LoadState(System.IO.BinaryReader stream) { base.LoadState(stream); DipSwitchNumber = stream.ReadInt32(); stream.Read(reg, 0, reg.Length); shift = stream.ReadByte(); buffer = stream.ReadByte(); flag_p = stream.ReadBoolean(); flag_s = stream.ReadBoolean(); flag_o = stream.ReadBoolean(); reg_a = stream.ReadInt32(); reg_b = stream.ReadInt32(); irq_control = stream.ReadBoolean(); initialized = stream.ReadBoolean(); irq_counter = stream.ReadInt32(); dipswitches = stream.ReadInt32(); }
public EndGameAction(System.IO.BinaryReader reader) { this.hasCheckmate = reader.ReadBoolean(); if (this.hasCheckmate) this.looser = (PlayerColor)reader.ReadByte(); else this.stalemateReason = (StalemateReason)reader.ReadByte(); }
/// <summary> /// Load state /// </summary> /// <param name="stream">The stream that should be used to read data</param> public virtual void LoadState(System.IO.BinaryReader stream) { Enabled = stream.ReadBoolean(); Volume = stream.ReadByte(); dutyStep = stream.ReadInt32(); freqTimer = stream.ReadInt32(); frequency = stream.ReadInt32(); cycles = stream.ReadInt32(); }
protected override void readData(System.IO.BinaryReader DataInput) { this.sfxID = IPAddress.NetworkToHostOrder(DataInput.ReadInt32()); this.posX = IPAddress.NetworkToHostOrder(DataInput.ReadInt32()); this.posY = DataInput.ReadByte() & 255; this.posZ = IPAddress.NetworkToHostOrder(DataInput.ReadInt32()); this.auxData = IPAddress.NetworkToHostOrder(DataInput.ReadInt32()); this.disableRelativeVolume = DataInput.ReadBoolean(); }
public override void Deserialize(System.IO.BinaryReader reader) { base.Deserialize(reader); Texture = reader.ReadString(); Tiled = reader.ReadBoolean(); Blending = new Color(reader.ReadByte(), reader.ReadByte(), reader.ReadByte()); }
protected override void readData(System.IO.BinaryReader DataInput) { this.xCh = IPAddress.NetworkToHostOrder(DataInput.ReadInt32()); this.zCh = IPAddress.NetworkToHostOrder(DataInput.ReadInt32()); this.includeInitialize = DataInput.ReadBoolean(); this.yChMin = IPAddress.NetworkToHostOrder(DataInput.ReadInt16()); this.yChMax = IPAddress.NetworkToHostOrder(DataInput.ReadInt16()); this.tempLength = IPAddress.NetworkToHostOrder(DataInput.ReadInt32()); DataInput.ReadBytes(this.tempLength); }
public void LoadStateBinary(System.IO.BinaryReader reader) { int length = reader.ReadInt32(); byte[] data = reader.ReadBytes(length); LoadCoreBinary(data); // other variables IsLagFrame = reader.ReadBoolean(); LagCount = reader.ReadInt32(); Frame = reader.ReadInt32(); }
/// <summary> /// Load state /// </summary> /// <param name="stream">The stream that should be used to read data</param> public void LoadState(System.IO.BinaryReader stream) { AccumRate = stream.ReadByte(); accumClock = stream.ReadInt32(); accumulationRegister = stream.ReadByte(); frequency = stream.ReadInt32(); freqTimer = stream.ReadInt32(); cycles = stream.ReadInt32(); enabled = stream.ReadBoolean(); }
protected internal override void Deserialize(System.IO.BinaryReader br) { CarId = br.ReadByte(); IsConnected = br.ReadBoolean(); CarModel = readStringW(br); CarSkin = readStringW(br); DriverName = readStringW(br); DriverTeam = readStringW(br); DriverGuid = readStringW(br); }
/// <summary> /// Load state /// </summary> /// <param name="stream">The stream that should be used to read data</param> public void LoadState(System.IO.BinaryReader stream) { dutyForm = stream.ReadInt32(); dutyStep = stream.ReadInt32(); enabled = stream.ReadBoolean(); mode = stream.ReadBoolean(); volume = stream.ReadByte(); freqTimer = stream.ReadInt32(); frequency = stream.ReadInt32(); cycles = stream.ReadInt32(); }
public override void LoadState(System.IO.BinaryReader stream) { base.LoadState(stream); for (int i = 0; i < prg_reg.Length; i++) prg_reg[i] = stream.ReadInt32(); for (int i = 0; i < chr_reg.Length; i++) chr_reg[i] = stream.ReadInt32(); irqRelaod = stream.ReadInt32(); irqCounter = stream.ReadInt32(); irqEnable = stream.ReadBoolean(); irqMask = stream.ReadInt32(); }
public void LoadStateBinary(System.IO.BinaryReader reader) { CheckDisposed(); int len = reader.ReadInt32(); if (len != SaveStateBuff.Length) throw new InvalidOperationException("Unexpected savestate buffer length!"); reader.Read(SaveStateBuff, 0, SaveStateBuff.Length); LibQuickNES.ThrowStringError(QN.qn_state_load(Context, SaveStateBuff, SaveStateBuff.Length)); // other variables IsLagFrame = reader.ReadBoolean(); LagCount = reader.ReadInt32(); Frame = reader.ReadInt32(); }
public Platform(System.IO.BinaryReader r) : base(r) { // 7 Set material materialPreset = (Material.Preset)r.ReadByte(); // 8 Set IsLadder IsLadder = r.ReadBoolean(); // Set other data origin = new Vector2((baseTexture.Width / 2) - ((baseTexture.Width / 2) % 8), (baseTexture.Height / 2) - ((baseTexture.Height / 2) % 8)); SetMaterial(materialPreset); identifier = SaveFileManager.SaveTypeIdentifier.Platform; }