private void Using_sb_asm_checkBox_CheckedChanged(object sender, EventArgs e)
        {
            Properties.Settings.Default.using_signboard_asm = using_sb_asm_checkBox.Checked;
            Properties.Settings.Default.Save();

            SpriteData.Load();
        }
Beispiel #2
0
        private void run(Filesystem fs)
        {
            ROM.load(fs);

            SpriteData.Load();
            if (Properties.Settings.Default.mdi)
            {
                new MdiParentForm().Show();
            }
            else
            {
                new LevelChooser().Show();
            }

            close = false;
            Close();
        }
Beispiel #3
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            string langDir      = System.IO.Path.Combine(Application.StartupPath, "Languages");
            string langFileName = System.IO.Path.Combine(langDir, Properties.Settings.Default.LanguageFile + ".ini");

            if (System.IO.File.Exists(langFileName))
            {
                System.IO.StreamReader rdr = new StreamReader(langFileName);
                LanguageManager.Load(rdr.ReadToEnd().Split('\n'));
                rdr.Close();
            }
            else
            {
                MessageBox.Show("File " + langFileName + " could not be found, so the language has defaulted to English.");
                LanguageManager.Load(Properties.Resources.English.Split('\n'));
            }

            string[] args = Environment.GetCommandLineArgs();

            if (args.Length == 2)
            {
                Console.Out.WriteLine("Loading ROM: " + args[1]);

                NitroROMFilesystem fs = new NitroROMFilesystem(args[1]);
                ROM.load(fs);

                SpriteData.Load();
                if (Properties.Settings.Default.mdi)
                {
                    new MdiParentForm().Show();
                }
                else
                {
                    new LevelChooser().Show();
                }
            }
            else
            {
                new StartForm().Show();
            }

            Application.Run();

            //string[] args = Environment.GetCommandLineArgs();


            /*
             *
             * if(args.Length > 2 && args[2] == "asmpatch")
             * {
             *                  PatchMaker pm = new PatchMaker(ROM.romfile.Directory);
             *                  pm.restore();
             *                  pm.generatePatch();
             * }
             * else if(args.Length > 2 && args[2] == "getcodeaddr")
             * {
             *                  PatchMaker pm = new PatchMaker(ROM.romfile.Directory);
             *                  pm.restore();
             *  Console.Out.WriteLine(String.Format("{0:X8}", pm.getCodeAddr()));
             * }*/
        }