Exemplo n.º 1
0
 public ImageCreator(bool other, GameConsoles consoles, string name) : this(name)
 {
     InitializeComponent();
     Bitmap bit;
     if (consoles == GameConsoles.TG16)
     {
         if (other)
         {
             bit = new Bitmap(Properties.Resources.TGCD);
         }
         else
         {
             bit = new Bitmap(Properties.Resources.TG16);
         }
     }
     else
     {
         this.console = "GBC";
         if (other)
         {
             bit = new Bitmap(Properties.Resources.GBC);
         }
         else
         {
             bit = new Bitmap(Properties.Resources.newgameboy);
         }
     }
     bi.Frame = bit;
 }
Exemplo n.º 2
0
        public INJECTFRAME(GameConsoles console, GameConfig c)
        {
            mvm = FindResource("mvm") as MainViewModel;
            mvm.GameConfiguration.Console = console;

            InitializeComponent();
            this.console = console;
            if (console == GameConsoles.N64)
            {
                fLoadConfig.Content = new InjectFrames.Configurations.N64Config(c);
            }
            else if (console == GameConsoles.TG16)
            {
                fLoadConfig.Content = new InjectFrames.Configurations.TurboGrafX(c);
            }
            else if (console == GameConsoles.GBA)
            {
                fLoadConfig.Content = new InjectFrames.Configurations.GBA(c);
            }
            else if (console == GameConsoles.WII)
            {
                fLoadConfig.Content = new InjectFrames.Configurations.WiiConfig(c);
            }
            else if (console == GameConsoles.GCN)
            {
                fLoadConfig.Content = new InjectFrames.Configurations.GCConfig(c);
            }
            else
            {
                fLoadConfig.Content = new InjectFrames.Configurations.OtherConfigs(c);
            }

            fBaseFrame.Content = new InjectFrames.Bases.BaseContainerFrame(console);
        }
Exemplo n.º 3
0
        public INJECTFRAME(GameConsoles console)
        {
            mvm = FindResource("mvm") as MainViewModel;
            mvm.GameConfiguration.Console = console;

            InitializeComponent();
            this.console = console;
            if (console == GameConsoles.N64)
            {
                fLoadConfig.Content = new InjectFrames.Configurations.N64Config();
            }
            else if (console == GameConsoles.TG16)
            {
                fLoadConfig.Content = new InjectFrames.Configurations.TurboGrafX();
            }
            else if (console == GameConsoles.GBA)
            {
                fLoadConfig.Content = new InjectFrames.Configurations.GBA();
            }
            else if (console == GameConsoles.WII)
            {
                fLoadConfig.Content = new InjectFrames.Configurations.WiiConfig();
            }
            else if (console == GameConsoles.GCN)
            {
                fLoadConfig.Content = new InjectFrames.Configurations.GCConfig();
            }
            else
            {
                fLoadConfig.Content = new InjectFrames.Configurations.OtherConfigs();
            }
            mvm.injected2 = false;
            Console.WriteLine("GameConfig : " + mvm.GameConfiguration.Console.ToString());
            fBaseFrame.Content = new InjectFrames.Bases.BaseContainerFrame(console);
        }
Exemplo n.º 4
0
        public static void ExportFile(List <TKeys> precomp, GameConsoles console)
        {
            CheckAndFixFolder("bin\\keys");
            Stream     createConfigStream = new FileStream($@"bin\keys\{console.ToString().ToLower()}.vck", FileMode.Create, FileAccess.Write);
            GZipStream compressedStream   = new GZipStream(createConfigStream, CompressionMode.Compress);
            IFormatter formatter          = new BinaryFormatter();

            formatter.Serialize(compressedStream, precomp);
            compressedStream.Close();
            createConfigStream.Close();
        }
 public NonCustomBaseFrame(GameBases Base, GameConsoles console, bool existing, BaseContainerFrame bcf)
 {
     InitializeComponent();
     mvm       = (MainViewModel)FindResource("mvm");
     bc        = bcf;
     this.Base = Base;
     ex        = existing;
     consoles  = console;
     createConfig(Base, console);
     checkStuff(mvm.getInfoOfBase(Base));
 }
Exemplo n.º 6
0
        public static void ExportFile(List <GameBases> precomp, GameConsoles console)
        {
            CheckAndFixConfigFolder();
            Stream     createConfigStream = new FileStream($@"configs\bases.vcb{console.ToString().ToLower()}", FileMode.Create, FileAccess.Write);
            GZipStream compressedStream   = new GZipStream(createConfigStream, CompressionMode.Compress);
            IFormatter formatter          = new BinaryFormatter();

            formatter.Serialize(compressedStream, precomp);
            compressedStream.Close();
            createConfigStream.Close();
            ReadFromConfig($@"configs\bases.vcb{console.ToString().ToLower()}");
        }
Exemplo n.º 7
0
        public static void Write(TableOutput table, GameConsoles targetConsole = GameConsoles.Output)
        {
            PrintLine(table.Width, table.ForegroundColor, table.BackgroundColor, targetConsole);
            PrintRow(table.Width, table.BackgroundColor, table.ForegroundColor, targetConsole, table.Header.ToArray());
            PrintLine(table.Width, table.ForegroundColor, table.BackgroundColor, targetConsole);
            if (!table.Rows.Any())
            {
                PrintLine(table.Width, table.ForegroundColor, table.BackgroundColor, targetConsole);
            }

            foreach (var row in table.Rows)
            {
                PrintRow(table.Width, table.ForegroundColor, table.BackgroundColor, targetConsole, row.ToArray());
                PrintLine(table.Width, table.ForegroundColor, table.BackgroundColor, targetConsole);
            }
        }
Exemplo n.º 8
0
        public static void Write(ConsoleChar character, GameConsoles targetConsole = GameConsoles.Output)
        {
            ConsoleBuffer consoleBuffer;

            switch (targetConsole)
            {
            case GameConsoles.Events:
                consoleBuffer = potatoChipGame.Events;
                break;

            default:
                consoleBuffer = potatoChipGame.Output;
                break;
            }

            consoleBuffer.Write(character);
        }
 public CustomBaseFrame(GameBases Base, GameConsoles console, bool existing)
 {
     InitializeComponent();
     tbCode.Text          = "Code Folder not found";
     tbCode.Foreground    = new SolidColorBrush(Color.FromRgb(205, 50, 50));
     tbContent.Text       = "Content Folder not found";
     tbContent.Foreground = new SolidColorBrush(Color.FromRgb(205, 50, 50));
     tbMeta.Text          = "Meta Folder not found";
     tbMeta.Foreground    = new SolidColorBrush(Color.FromRgb(205, 50, 50));
     mvm   = (MainViewModel)FindResource("mvm");
     bases = Base;
     mvm.isCkeySet();
     this.existing = existing;
     this.console  = console;
     mvm.SetCBASE(this);
     if (mvm.Ckeys)
     {
         CK.Visibility  = Visibility.Hidden;
         path.IsEnabled = true;
     }
 }
        public BaseContainerFrame(GameConsoles console)
        {
            InitializeComponent();



            mvm = (MainViewModel)FindResource("mvm");

            mvm.GameConfiguration.Console = console;
            if (console == GameConsoles.GCN)
            {
                this.console = GameConsoles.WII;
            }
            else
            {
                this.console = console;
            }
            mvm.GetBases(this.console);
            mvm.bcf = this;
            if (console == GameConsoles.NES)
            {
                cbCombo.ToolTip = "We recommend Metal Slader Glory for NES Injection!";
            }
            if (console == GameConsoles.GBA)
            {
                cbCombo.ToolTip = "For RTC use RockMan EXE 4.5 as base";
            }
            if (console == GameConsoles.SNES)
            {
                cbCombo.ToolTip = "We recommend Kirby's Dream Land 3 for SNES Injection!";
            }
            if (console == GameConsoles.MSX)
            {
                cbCombo.ToolTip = "You need to try which base works best.\nNemesis has the best MSX compatibility and Goemon the best MSX2. \nBoth support MSX and MSX2 ROMs";
            }
        }
 public void ClearConsole(GameConsoles targetConsole = GameConsoles.Output)
 {
     throw new NotImplementedException();
 }
        private void SetTemplate(GameConsoles console)
        {
            Bitmap bit;
            switch (console)
            {
                case GameConsoles.NDS:
                    bit = new Bitmap(Properties.Resources.NDS);

                    this.console = "NDS";
                    break;
                case GameConsoles.N64:
                    bit = new Bitmap(Properties.Resources.N64);

                    break;
                case GameConsoles.NES:
                    bit = new Bitmap(Properties.Resources.NES);

                    break;
                case GameConsoles.GBA:
                    bit = new Bitmap(Properties.Resources.GBA);
                    this.console = "GBA";
                    break;
                case GameConsoles.WII:
                    bit = new Bitmap(Properties.Resources.WII);
                    this.console = "WII";
                    GameName1.Visibility = Visibility.Hidden;
                    GameName2.Visibility = Visibility.Hidden;
                    ReleaseYearLabel.Visibility = Visibility.Hidden;
                    RLDi.Visibility = Visibility.Hidden;
                    RLEn.Visibility = Visibility.Hidden;
                    ReleaseYear.Visibility = Visibility.Hidden;

                    PLDi.Visibility = Visibility.Hidden;
                    PLEn.Visibility = Visibility.Hidden;
                    Players.Visibility = Visibility.Hidden;

                    PlayerLabel.Visibility = Visibility.Hidden;
                    snesonly.Visibility = Visibility.Visible;
                    pal.Content = "Wii";
                    sntsc.Content = "WiiWare";
                    sfc.Content = "Homebrew";
                    altwii.Visibility = Visibility.Visible;
                    backupcons = "WII";
                    break;
                case GameConsoles.GCN:
                    bit = new Bitmap(Properties.Resources.GCN);
                    break;
                case GameConsoles.MSX:
                    bit = new Bitmap(Properties.Resources.MSX);
                    break;
                case GameConsoles.SNES:
                    bit = new Bitmap(Properties.Resources.SNES_PAL);
                    snesonly.Visibility = Visibility.Visible;
                    List<string> styles = new List<string>();
                    styles.Add("SNES - PAL");
                    styles.Add("SNES - NTSC");
                    styles.Add("Super Famicom");
                    combo.ItemsSource = styles;
                    combo.SelectedIndex = 0;
                    break;
                default:
                    bit = null;
                    break;
            }
            bi.Frame = bit;
        }
Exemplo n.º 13
0
 public TKFrame(GameConsoles c)
 {
     InitializeComponent();
     mvm = FindResource("mvm") as MainViewModel;
     mvm.getTempList(c);
 }
 private void createConfig(GameBases Base, GameConsoles console)
 {
     mvm.GameConfiguration.BaseRom = Base;
     mvm.GameConfiguration.Console = console;
 }
 public ImageCreator(GameConsoles console, string name) : this(name)
 {
     InitializeComponent();
     SetTemplate(console);
 }
Exemplo n.º 16
0
 public static void ClearConsole(GameConsoles targetConsole = GameConsoles.Output)
 {
     potatoChipGame.ClearConsole(targetConsole);
 }
Exemplo n.º 17
0
        public void checkForAdditionalFiles(GameConsoles console, string repoid)
        {
            if (!Directory.Exists(System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo")))
            {
                Directory.CreateDirectory(System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo"));
            }
            bool   ini      = false;
            bool   btsnd    = false;
            string inip     = "";
            string btsndp   = "";
            string exten    = "";
            string linkbase = "https://raw.githubusercontent.com/Flumpster/UWUVCI-Images/master/";

            if (console == GameConsoles.N64)
            {
                if (RemoteFileExists(linkbase + repoid + "/game.ini"))
                {
                    ini  = true;
                    inip = linkbase + repoid + "/game.ini";
                }
            }
            string[] ext = { "wav", "mp3", "btsnd" };
            foreach (var e in ext)
            {
                if (RemoteFileExists(linkbase + repoid + "/BootSound." + e))
                {
                    btsnd  = true;
                    btsndp = linkbase + repoid + "/BootSound." + e;
                    exten  = e;
                    break;
                }
            }
            if (ini || btsnd)
            {
                string extra = "There are more additional files found. Do you want to download those?";
                if (ini && !btsnd)
                {
                    extra = "There is an additional INI file available for Dowload. Do you want to dowload it?";
                }
                if (!ini && btsnd)
                {
                    extra = "There is an additional BootSound file available for Dowload. Do you want to dowload it?";
                }
                if (ini && btsnd)
                {
                    extra = "There is an adittional INI and BootSound file available for Dowload. Do you want to download those?";
                }
                MainViewModel  mvm = FindResource("mvm") as MainViewModel;
                Custom_Message cm  = new Custom_Message("Found additional Files", extra);
                try
                {
                    cm.Owner = mvm.mw;
                }
                catch (Exception)
                {
                }
                cm.ShowDialog();
                if (mvm.addi)
                {
                    var client = new WebClient();
                    if (ini)
                    {
                        client.DownloadFile(inip, System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo", "game.ini"));
                        (mvm.Thing as N64Config).ini.Text      = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo", "game.ini");
                        mvm.GameConfiguration.N64Stuff.INIPath = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo", "game.ini");
                    }
                    if (btsnd)
                    {
                        client.DownloadFile(btsndp, System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo", $"bootSound.{exten}"));
                        mvm.BootSound = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo", $"bootSound.{exten}");
                        switch (console)
                        {
                        case GameConsoles.NDS:
                            (mvm.Thing as OtherConfigs).sound.Text = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo", $"bootSound.{exten}");
                            break;

                        case GameConsoles.GBA:
                            (mvm.Thing as GBA).sound.Text = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo", $"bootSound.{exten}");
                            break;

                        case GameConsoles.N64:
                            (mvm.Thing as N64Config).sound.Text = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo", $"bootSound.{exten}");
                            break;

                        case GameConsoles.WII:
                            if (mvm.test == GameConsoles.GCN)
                            {
                                (mvm.Thing as GCConfig).sound.Text = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo", $"bootSound.{exten}");
                            }
                            else
                            {
                                (mvm.Thing as WiiConfig).sound.Text = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo", $"bootSound.{exten}");
                            }
                            break;
                        }
                    }
                    mvm.addi = false;
                }
            }
        }
Exemplo n.º 18
0
 private static void PrintLine(int width, PcmColor color, PcmColor backgroundColor, GameConsoles targetConsole = GameConsoles.Output)
 {
     WriteLine(new string('-', width), color, backgroundColor, targetConsole);
 }
Exemplo n.º 19
0
        public static void Write(string text, PcmColor color = null, PcmColor backgroundColor = null, GameConsoles targetConsole = GameConsoles.Output)
        {
            ConsoleBuffer consoleBuffer;

            switch (targetConsole)
            {
            case GameConsoles.Events:
                consoleBuffer = potatoChipGame.Events;
                break;

            default:
                consoleBuffer = potatoChipGame.Output;
                break;
            }
            foreach (var c in text)
            {
                consoleBuffer.Write(new ConsoleChar(c, color ?? PcmColor.White, backgroundColor ?? PcmColor.Black));
            }
        }
Exemplo n.º 20
0
        private static void PrintRow(int width, PcmColor color, PcmColor backgroundColor, GameConsoles targetConsole = GameConsoles.Output, params string[] columns)
        {
            var columnWidth = (width - columns.Length) / columns.Length;
            var row         = "|";

            foreach (var column in columns)
            {
                row += AlignCenter(column, columnWidth) + "|";
            }

            WriteLine(row, color, backgroundColor, targetConsole);
        }