/// <summary> /// Creates an in-memory model of the scene header /// </summary> /// <param name="br">Binary reader containing the scene or room file</param> /// <param name="seek">offset to the start of the scene header</param> public void Load(BinaryReader br, long seek) { bool KeepReading = true; long seekBackTop; Offset = seek; seekBackTop = br.BaseStream.Position; br.BaseStream.Position = seek; while (KeepReading) { SceneWord command = new SceneWord(); br.Read(command, 0, 8); SetCommand(command, br.BaseStream.Position - 8); if ((HeaderCommands)command.Code == HeaderCommands.End) { KeepReading = false; } } br.BaseStream.Position = seekBackTop; if (HasAlternateHeaders()) { Alternate.HeaderListEndAddress = AltHeaderEnd(); Alternate.Initialize(br); } }