public PaletteWindow(GbaManager.GbaManager gbaManager) { InitializeComponent(); gbaManager.OnCpuUpdate += Update; Width = Width & (~15); Height = Height & (~15); }
public SpriteWindow(GbaManager.GbaManager gbaManager) { InitializeComponent(); _bitmap = new Bitmap(128, 128, PixelFormat.Format32bppRgb); spriteDisplay.Image = _bitmap; Refresh(); gbaManager.OnCpuUpdate += Update; }
public void Shutdown() { _gbaManager.Close(); _gbaManager = null; _soundPlayer?.Dispose(); _disassembly?.Close(); _palette?.Close(); _sprites?.Close(); _device.Dispose(); }
public MainWindow() { InitializeComponent(); _gbaManager = new GbaManager.GbaManager(); // Initialize the sound subsystem if (EnableSound.Checked) { _soundPlayer = new SoundPlayer(this, _gbaManager.AudioMixer, 2); _soundPlayer.Resume(); } // Initialize the video subsystem GetRenderTypeFromOptions(); SetRenderType(_rendererType); _width = 240 * 2; _height = 160 * 2; ClientSize = new Size(_width, _height + MainMenu.Height + StatusStrip.Height); var timer = new Timer { Interval = 50 }; timer.Tick += UpdateFps; timer.Enabled = true; _biosFilename = "C:\\Documents and Settings\\Administrator\\My Documents\\Visual Studio\\Projects\\GarboDev\\gbabios.bin"; if (OptionsUseBios.Checked) { LoadBios(); } OptionsSkipBios.Checked = _gbaManager.SkipBios; OptionsLimitFps.Checked = _gbaManager.LimitFps; }