public override Common.ZIO LoadStory(byte[] storyBytes) { z_memory = new ZMemory(); z_memory.LoadStory(storyBytes); if (z_memory.Header.VersionNumber != 5) throw new Exception(String.Format("Not a Version 5 Story File. Version byte indicates: {0}", z_memory.Header.VersionNumber)); if (!Initialized) Initialize(); // Handle Version 5 Stuff byte b = z_memory.Header.Flags1; //b |= 0x80; // Timed Keyboard input available (v4+) //b |= 0x40; // ?? //b |= 0x20; // Sound effects available (v6+) //b |= 0x10; // Monospace available (v4+) //b |= 0x08; // Italic available (v4+) //b |= 0x04; // Boldface available (v4+) //b |= 0x02; // Picture displaying available (v6+) //b |= 0x01; // Color Available (v5+) // Default: 0x010000 b &= 0x40; b |= 0x10; z_memory.PutByte(0x01, b); return z_io; }
/// <summary> /// Constructor. /// </summary> /// <param name="mem">Reference to the active ZMemory</param> public ZInstruction(ZMemory mem) : base(mem) { }
public ZHeader(ZMemory mem) : base(mem) { }
/// <summary> /// Constructor. Initializes the ZDictionary to the specified story file's dictionary location. (Supposedly, some /// games can have multiple dictionaries). /// </summary> /// <param name="mem">Active ZMemory object</param> /// <param name="dictionaryAddress">Address location of the specified dictionary</param> public ZDictionary(ZMemory mem, int dictionaryAddress) { m_memory = mem; Initialize(dictionaryAddress); }
/// <summary> /// Constructor. Initializes the ZDictionary to the default story file's dictionary location. /// </summary> /// <param name="mem">Active ZMemory object</param> public ZDictionary(ZMemory mem) { m_memory = mem; Initialize(m_memory.Header.DictionaryLocation); }