Example #1
0
        public override Common.ZIO LoadStory(byte[] storyBytes)
        {
            z_memory = new ZMemory();
            z_memory.LoadStory(storyBytes);

            if (z_memory.Header.VersionNumber != 3)
                throw new Exception(String.Format("Not a Version 3 Story File.  Version byte indicates: {0}", z_memory.Header.VersionNumber));

            if (!Initialized)
                Initialize();

            // Handle Version 3 Stuff
            byte b = z_memory.Header.Flags1;

            b &= 0x87;  // Tandy bit off, Status Line Available, Upper window not available, Fixed Width font

            z_memory.PutByte(0x01, b);

            return z_io;
        }
Example #2
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="mem">Reference to the active ZMemory</param>
 public ZInstruction(ZMemory mem)
 {
     InitializeOps();
     m_memory = mem;
 }
Example #3
0
 /// <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);
 }
Example #4
0
 /// <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);
 }
Example #5
0
 public ZHeader(ZMemory mem)
     : base(mem)
 {
 }