Ejemplo n.º 1
0
        public void Load(string file)
        {
            if (!m_diskImage.LoadImage(file))
            {
                throw new IOException("Could not open disk image '" + file + "'.");
            }

            for (int i = 0; i < 4; ++i)
            {
                bool incNumCharacter = true;
                try
                {
                    Characters[NumberOfCharacters] = new Ultima1CharacterData();
                    Characters[NumberOfCharacters].Load(m_diskImage, i);
                }
                catch (Exception /*ex*/)
                {
                    incNumCharacter = false;
                }

                if (incNumCharacter)
                {
                    ++NumberOfCharacters;
                }
            }

            m_imageLoaded = true;
        }
Ejemplo n.º 2
0
        public Ultima1Data(IDiskImage image = null)
        {
            if (image == null)
            {
                m_diskImage = new DiskImage();
            }
            else
            {
                m_diskImage = image;
            }

            NumberOfCharacters = 0;
            Characters         = new Ultima1CharacterData[4];
            //for (int i = 0; i < 4; ++i)
            Characters[0] = new Ultima1CharacterData();
        }