public WorldScreenMap(DataViewForm parent, WorldScreenCollection worldScreenCollection)
        {
            _parentForm            = parent;
            _worldScreenCollection = worldScreenCollection;

            InitalizeData();
        }
Exemplo n.º 2
0
        public DataViewForm(int worldIndex, WorldScreenCollection worldScreens)
        {
            _worldScreens = worldScreens;
            _map          = new WorldScreenMap(this, worldScreens);


            LoadContentFiles(worldIndex);


            InitializeComponent();
            pictureBox1.Image = new Bitmap(pictureBox1.Width, pictureBox1.Height);
            pb_tiles.Image    = new Bitmap(pb_tiles.Width, pb_tiles.Height);
        }
Exemplo n.º 3
0
        public void LoadWorldScreenDataFromRomFile(string filePath)
        {
            _WorldScreenCollections    = new WorldScreenCollection[5];
            _WorldScreenCollections[0] = new WorldScreenCollection(0x39695, 131, 0xC02A, 15, 0xC211, 6, 0);
            _WorldScreenCollections[1] = new WorldScreenCollection(0x39EC5, 137, 0xC058, 16, 0xC241, 6, 1);
            _WorldScreenCollections[2] = new WorldScreenCollection(0x3A755, 153, 0xC089, 17, 0xC271, 6, 2);             //w3
            _WorldScreenCollections[3] = new WorldScreenCollection(0x3B0E5, 164, 0xC0BD, 22, 0xC2C1, 6, 3);             //w3
            _WorldScreenCollections[4] = new WorldScreenCollection(0x3BB25, 154, 0xC100, 19, 0xC301, 8, 4);             //w3

            //	_WorldScreenCollection[2] = new WorldScreenCollection(0x39695, 131, 0xC02A, 15, 0xC211, 10);
            //	_WorldScreenCollection[3] = new WorldScreenCollection(0x39695, 131, 0xC02A, 15, 0xC211, 10);
            //	_WorldScreenCollection[4] = new WorldScreenCollection(0x39695, 131, 0xC02A, 15, 0xC211, 10);
            foreach (WorldScreenCollection wc in _WorldScreenCollections)
            {
                FileStream fileStream = new FileStream(Properties.Settings.Default.OriginalRom, FileMode.Open);

                wc.LoadDataFromRomFile(ref fileStream);
                fileStream.Close();
            }
        }
Exemplo n.º 4
0
        public string ModifyRom()
        {
            bool[] error           = new bool[5];
            Random random          = new Random(Properties.Settings.Default.NewSeed);
            bool   timeDoorProblem = false;

            for (int i = 0; i < _WorldScreenCollections.Length; i++)
            {
                WorldScreenCollection wc = _WorldScreenCollections[i];

                error[i] = wc.Modify(i, random);

                if (wc.timeDoorProblem)
                {
                    timeDoorProblem = true;
                }
            }

            if (timeDoorProblem)
            {
                return("TimeDoor problem");
            }
            else if (error[0] == true || error[1] == true || error[2] == true || error[3] == true || error[4] == true)
            {
                return("Misc Problem");
            }
            else
            {
                if (CheckThatAllRequiredScreenContentsArePresent())
                {
                    return("success");
                }
                else
                {
                    return("***Requred content missing***");
                }
            }
        }