Files
bsnes/ui/general/main-window.cpp
Tim Allen a7ffbd784b Update to release v000r08.
byuu says:

Changelog:
- rewrote sprite rendering, grabs first ten sprites, draws them in
  revere order of a: X-index, b: OAM appearance order
- simplified tile decoding to use less variables
- added MBC3 emulation (for now, RTC is always enabled)
- STOP can be broken via joypad IF, this may not be correct though (it
  may trigger even without P10-13 being modified)
- cleaned up all MBC emulation to use masks instead of ranges
- MBC2 uses 512-byte table now, ignores high 4-bits. Easier this way I guess
- tools menu temporarily has a console tracer enable option
- some other stuff

No real visible improvements :(
2011-01-04 21:42:27 +11:00

59 lines
1.6 KiB
C++
Executable File

MainWindow mainWindow;
void MainWindow::create() {
Window::create(128, 128, 160 * 2, 144 * 2, { GameBoy::Info::Name, " v", GameBoy::Info::Version });
setDefaultFont(application.proportionalFont);
setFont(application.proportionalFontBold);
system.create(*this, "System");
systemLoadCartridge.create(system, "Load Cartridge ...");
systemSeparator1.create(system);
systemPower.create(system, "Power Cycle");
settings.create(*this, "Settings");
settingsVideoSync.create(settings, "Synchronize Video");
settingsVideoSync.setChecked(true);
tools.create(*this, "Tools");
toolsTraceCPU.create(tools, "Trace CPU");
help.create(*this, "Help");
helpAbout.create(help, "About ...");
viewport.create(*this, 0, 0, 160 * 2, 144 * 2);
setMenuVisible(true);
setStatusVisible(true);
onClose = []() {
application.quit = true;
return false;
};
systemLoadCartridge.onTick = []() {
string filename = OS::fileOpen(mainWindow, "Game Boy cartridges\t*.gb,*.gbc", "/media/sdb1/root/gameboy_images/");
if(filename != "") utility.loadCartridge(filename);
};
systemPower.onTick = []() {
if(GameBoy::cartridge.loaded()) GameBoy::system.power();
};
settingsVideoSync.onTick = []() {
video.set(Video::Synchronize, mainWindow.settingsVideoSync.checked());
};
toolsTraceCPU.onTick = []() {
GameBoy::cpu.trace = mainWindow.toolsTraceCPU.checked();
};
helpAbout.onTick = []() {
MessageWindow::information(mainWindow, {
"bgameboy\n\n",
"Version: ", GameBoy::Info::Version, "\n",
"Author: byuu\n",
"Homepage: http://byuu.org/"
});
};
}