diff --git a/docs/index.html b/docs/index.html index 437f1a532..bb4bb95be 100644 --- a/docs/index.html +++ b/docs/index.html @@ -4358,7 +4358,7 @@ Randomize TIA - Randomizes TIA registers on the startup + Randomize TIA registers when loading a ROM -plr.tiarandom
-dev.tiarandom diff --git a/src/debugger/gui/DebuggerDialog.cxx b/src/debugger/gui/DebuggerDialog.cxx index 444ce3260..f3a853f40 100644 --- a/src/debugger/gui/DebuggerDialog.cxx +++ b/src/debugger/gui/DebuggerDialog.cxx @@ -285,7 +285,7 @@ void DebuggerDialog::handleCommand(CommandSender* sender, int cmd, getDynamicBounds(w, h); myOptions = make_unique(instance(), parent(), this, w, h, - Menu::AppMode::debugger); + OptionsMenu::AppMode::debugger); } myOptions->open(); diff --git a/src/emucore/EventHandler.cxx b/src/emucore/EventHandler.cxx index 24e1e3dc7..b1ac76bc2 100644 --- a/src/emucore/EventHandler.cxx +++ b/src/emucore/EventHandler.cxx @@ -58,7 +58,7 @@ #include "DebuggerParser.hxx" #endif #ifdef GUI_SUPPORT - #include "Menu.hxx" + #include "OptionsMenu.hxx" #include "CommandMenu.hxx" #include "HighScoresMenu.hxx" #include "MessageMenu.hxx" @@ -3034,7 +3034,7 @@ void EventHandler::setState(EventHandlerState state) #ifdef GUI_SUPPORT case EventHandlerState::OPTIONSMENU: - myOverlay = &myOSystem.menu(); + myOverlay = &myOSystem.optionsMenu(); enableTextEvents(true); break; @@ -3083,11 +3083,11 @@ void EventHandler::setState(EventHandlerState state) } // Inform various subsystems about the new state - myOSystem.stateChanged(myState); - myOSystem.frameBuffer().stateChanged(myState); - myOSystem.frameBuffer().setCursorState(); + myOSystem.stateChanged(myState); // does nothing + myOSystem.frameBuffer().stateChanged(myState); // ignores state + myOSystem.frameBuffer().setCursorState(); // en/disables cursor for UI and emulation states if(myOSystem.hasConsole()) - myOSystem.console().stateChanged(myState); + myOSystem.console().stateChanged(myState); // does nothing // Sometimes an extraneous mouse motion event is generated // after a state change, which should be supressed diff --git a/src/emucore/FrameBuffer.cxx b/src/emucore/FrameBuffer.cxx index 70e29f6cf..917ed5c66 100644 --- a/src/emucore/FrameBuffer.cxx +++ b/src/emucore/FrameBuffer.cxx @@ -51,7 +51,7 @@ #include "ConsoleFont.hxx" #include "ConsoleBFont.hxx" #include "Launcher.hxx" - #include "Menu.hxx" + #include "OptionsMenu.hxx" #include "CommandMenu.hxx" #include "HighScoresMenu.hxx" #include "MessageMenu.hxx" @@ -379,19 +379,19 @@ void FrameBuffer::update(UpdateMode mode) #ifdef GUI_SUPPORT case EventHandlerState::OPTIONSMENU: { - myOSystem.menu().tick(); - redraw |= myOSystem.menu().needsRedraw(); + myOSystem.optionsMenu().tick(); + redraw |= myOSystem.optionsMenu().needsRedraw(); if(redraw) { clear(); myTIASurface->render(true); - myOSystem.menu().draw(forceRedraw); + myOSystem.optionsMenu().draw(forceRedraw); } else if(rerender) { clear(); myTIASurface->render(true); - myOSystem.menu().render(); + myOSystem.optionsMenu().render(); } break; // EventHandlerState::OPTIONSMENU } diff --git a/src/emucore/OSystem.cxx b/src/emucore/OSystem.cxx index 19e34795f..29394acd1 100644 --- a/src/emucore/OSystem.cxx +++ b/src/emucore/OSystem.cxx @@ -31,7 +31,7 @@ #include "Debugger.hxx" #endif #ifdef GUI_SUPPORT - #include "Menu.hxx" + #include "OptionsMenu.hxx" #include "CommandMenu.hxx" #include "HighScoresMenu.hxx" #include "MessageMenu.hxx" @@ -177,7 +177,7 @@ bool OSystem::initialize(const Settings::Options& options) #ifdef GUI_SUPPORT // Create various subsystems (menu and launcher GUI objects, etc) - myMenu = make_unique(*this); + myOptionsMenu = make_unique(*this); myCommandMenu = make_unique(*this); myHighScoresManager = make_unique(*this); myHighScoresMenu = make_unique(*this); diff --git a/src/emucore/OSystem.hxx b/src/emucore/OSystem.hxx index 014fd0696..ec7a15e53 100644 --- a/src/emucore/OSystem.hxx +++ b/src/emucore/OSystem.hxx @@ -40,7 +40,7 @@ class AudioSettings; class CommandMenu; class HighScoresMenu; class Launcher; - class Menu; + class OptionsMenu; class MessageMenu; class PlusRomsMenu; class TimeMachine; @@ -200,11 +200,11 @@ class OSystem #ifdef GUI_SUPPORT /** - Get the settings menu of the system. + Get the option menu of the system. - @return The settings menu object + @return The option menu object */ - Menu& menu() const { return *myMenu; } + OptionsMenu& optionsMenu() const { return *myOptionsMenu; } /** Get the command menu of the system. @@ -516,8 +516,8 @@ class OSystem #endif #ifdef GUI_SUPPORT - // Pointer to the Menu object - unique_ptr myMenu; + // Pointer to the OptionMenu object + unique_ptr myOptionsMenu; // Pointer to the CommandMenu object unique_ptr myCommandMenu; diff --git a/src/gui/Dialog.cxx b/src/gui/Dialog.cxx index 8239a4887..c615ed8fb 100644 --- a/src/gui/Dialog.cxx +++ b/src/gui/Dialog.cxx @@ -23,7 +23,7 @@ #include "FrameBuffer.hxx" #include "FBSurface.hxx" #include "Font.hxx" -#include "Menu.hxx" +#include "OptionsMenu.hxx" #include "Dialog.hxx" #include "Widget.hxx" #include "TabWidget.hxx" diff --git a/src/gui/HighScoresDialog.cxx b/src/gui/HighScoresDialog.cxx index 8349f804e..cdfeaf58e 100644 --- a/src/gui/HighScoresDialog.cxx +++ b/src/gui/HighScoresDialog.cxx @@ -98,7 +98,7 @@ static constexpr std::array NEXT_GFX_LARGE = { // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - HighScoresDialog::HighScoresDialog(OSystem& osystem, DialogContainer& parent, int max_w, int max_h, - Menu::AppMode mode) + OptionsMenu::AppMode mode) : Dialog(osystem, parent, osystem.frameBuffer().font(), "High Scores"), _max_w{max_w}, _max_h{max_h}, @@ -219,7 +219,7 @@ HighScoresDialog::~HighScoresDialog() void HighScoresDialog::loadConfig() { // Enable blending (only once is necessary) - if (myMode == Menu::AppMode::emulator && !surface().attributes().blending) + if (myMode == OptionsMenu::AppMode::emulator && !surface().attributes().blending) { surface().attributes().blending = true; surface().attributes().blendalpha = 90; @@ -314,7 +314,7 @@ void HighScoresDialog::handleCommand(CommandSender* sender, int cmd, int data, i saveConfig(); [[fallthrough]]; case kCloseCmd: - if(myMode != Menu::AppMode::emulator) + if(myMode != OptionsMenu::AppMode::emulator) close(); else instance().eventHandler().leaveMenuMode(); diff --git a/src/gui/HighScoresDialog.hxx b/src/gui/HighScoresDialog.hxx index c1b60b04f..530088632 100644 --- a/src/gui/HighScoresDialog.hxx +++ b/src/gui/HighScoresDialog.hxx @@ -28,7 +28,7 @@ namespace GUI { } class Serializer; -#include "Menu.hxx" +#include "OptionsMenu.hxx" #include "Dialog.hxx" #include "HighScoresManager.hxx" #include "json_lib.hxx" @@ -47,7 +47,7 @@ class HighScoresDialog : public Dialog static constexpr uInt32 NUM_RANKS = 10; HighScoresDialog(OSystem& osystem, DialogContainer& parent, - int max_w, int max_h, Menu::AppMode mode); + int max_w, int max_h, OptionsMenu::AppMode mode); ~HighScoresDialog() override; protected: @@ -110,7 +110,7 @@ class HighScoresDialog : public Dialog StaticTextWidget* myMD5Widget{nullptr}; StaticTextWidget* myCheckSumWidget{nullptr}; - Menu::AppMode myMode{Menu::AppMode::emulator}; + OptionsMenu::AppMode myMode{OptionsMenu::AppMode::emulator}; private: // Following constructors and assignment operators not supported diff --git a/src/gui/HighScoresMenu.cxx b/src/gui/HighScoresMenu.cxx index fade474e4..9ca4d0b29 100644 --- a/src/gui/HighScoresMenu.cxx +++ b/src/gui/HighScoresMenu.cxx @@ -38,7 +38,7 @@ Dialog* HighScoresMenu::baseDialog() if (myHighScoresDialog == nullptr) myHighScoresDialog = new HighScoresDialog(myOSystem, *this, FBMinimum::Width, FBMinimum::Height, - Menu::AppMode::emulator); + OptionsMenu::AppMode::emulator); return myHighScoresDialog; } diff --git a/src/gui/LauncherDialog.cxx b/src/gui/LauncherDialog.cxx index 051f70eb8..c97d47791 100644 --- a/src/gui/LauncherDialog.cxx +++ b/src/gui/LauncherDialog.cxx @@ -926,10 +926,10 @@ void LauncherDialog::openSettings() // Create an options dialog, similar to the in-game one if (instance().settings().getBool("basic_settings")) myDialog = make_unique(instance(), parent(), - _w, _h, Menu::AppMode::launcher); + _w, _h, OptionsMenu::AppMode::launcher); else myDialog = make_unique(instance(), parent(), this, _w, _h, - Menu::AppMode::launcher); + OptionsMenu::AppMode::launcher); myDialog->open(); } @@ -938,7 +938,7 @@ void LauncherDialog::openHighScores() { // Create an high scores dialog, similar to the in-game one myDialog = make_unique(instance(), parent(), _w, _h, - Menu::AppMode::launcher); + OptionsMenu::AppMode::launcher); myDialog->open(); } diff --git a/src/gui/MinUICommandDialog.cxx b/src/gui/MinUICommandDialog.cxx index c98cb5675..e58094b53 100644 --- a/src/gui/MinUICommandDialog.cxx +++ b/src/gui/MinUICommandDialog.cxx @@ -321,14 +321,14 @@ void MinUICommandDialog::openSettings() if (instance().settings().getBool("basic_settings")) { myDialog = make_unique(instance(), parent(), - 1280, 720, Menu::AppMode::launcher); + 1280, 720, OptionsMenu::AppMode::launcher); myDialog->open(); } else { myDialog = make_unique(instance(), parent(), this, FBMinimum::Width, FBMinimum::Height, - Menu::AppMode::launcher); + OptionsMenu::AppMode::launcher); myDialog->open(); } } @@ -337,6 +337,6 @@ void MinUICommandDialog::openSettings() void MinUICommandDialog::openHighscores() { myDialog = make_unique(instance(), parent(), - 1280, 720, Menu::AppMode::emulator); + 1280, 720, OptionsMenu::AppMode::emulator); myDialog->open(); } diff --git a/src/gui/OptionsDialog.cxx b/src/gui/OptionsDialog.cxx index 8b3972b3b..646be5220 100644 --- a/src/gui/OptionsDialog.cxx +++ b/src/gui/OptionsDialog.cxx @@ -37,7 +37,7 @@ #include "OptionsDialog.hxx" #include "Launcher.hxx" #include "Settings.hxx" -#include "Menu.hxx" +#include "OptionsMenu.hxx" #ifdef CHEATCODE_SUPPORT #include "CheatCodeDialog.hxx" @@ -47,13 +47,13 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OptionsDialog::OptionsDialog(OSystem& osystem, DialogContainer& parent, - GuiObject* boss, int max_w, int max_h, Menu::AppMode mode) + GuiObject* boss, int max_w, int max_h, OptionsMenu::AppMode mode) : Dialog(osystem, parent, osystem.frameBuffer().font(), "Options"), myBoss{boss}, myMode{mode} { // do not show basic settings options in debugger - bool minSettings = osystem.settings().getBool("minimal_ui") && mode != Menu::AppMode::debugger; + bool minSettings = osystem.settings().getBool("minimal_ui") && mode != OptionsMenu::AppMode::debugger; const int buttonHeight = Dialog::buttonHeight(), VBORDER = Dialog::vBorder(), HBORDER = Dialog::hBorder(), @@ -138,7 +138,7 @@ OptionsDialog::OptionsDialog(OSystem& osystem, DialogContainer& parent, addToFocusList(wid); // Certain buttons are disabled depending on mode - if(myMode == Menu::AppMode::launcher) + if(myMode == OptionsMenu::AppMode::launcher) { myCheatCodeButton->clearFlags(Widget::FLAG_ENABLED); } @@ -186,7 +186,7 @@ void OptionsDialog::handleCommand(CommandSender* sender, int cmd, case kBasSetCmd: // enable basic settings instance().settings().setValue("basic_settings", true); - if (myMode != Menu::AppMode::emulator) + if (myMode != OptionsMenu::AppMode::emulator) close(); else instance().eventHandler().leaveMenuMode(); @@ -297,7 +297,7 @@ void OptionsDialog::handleCommand(CommandSender* sender, int cmd, break; case kExitCmd: - if(myMode != Menu::AppMode::emulator) + if(myMode != OptionsMenu::AppMode::emulator) close(); else instance().eventHandler().leaveMenuMode(); diff --git a/src/gui/OptionsDialog.hxx b/src/gui/OptionsDialog.hxx index 4bc747667..ce16245c6 100644 --- a/src/gui/OptionsDialog.hxx +++ b/src/gui/OptionsDialog.hxx @@ -23,14 +23,14 @@ class DialogContainer; class GuiObject; class OSystem; -#include "Menu.hxx" +#include "OptionsMenu.hxx" #include "Dialog.hxx" class OptionsDialog : public Dialog { public: OptionsDialog(OSystem& osystem, DialogContainer& parent, GuiObject* boss, - int max_w, int max_h, Menu::AppMode mode); + int max_w, int max_h, OptionsMenu::AppMode mode); ~OptionsDialog() override; private: @@ -46,7 +46,7 @@ class OptionsDialog : public Dialog GuiObject* myBoss{nullptr}; // Indicates if this dialog is used for global (vs. in-game) settings - Menu::AppMode myMode{Menu::AppMode::emulator}; + OptionsMenu::AppMode myMode{OptionsMenu::AppMode::emulator}; enum { kBasSetCmd = 'BAST', diff --git a/src/gui/Menu.cxx b/src/gui/OptionsMenu.cxx similarity index 93% rename from src/gui/Menu.cxx rename to src/gui/OptionsMenu.cxx index dee439419..f12c6bed9 100644 --- a/src/gui/Menu.cxx +++ b/src/gui/OptionsMenu.cxx @@ -22,23 +22,23 @@ #include "OSystem.hxx" #include "FrameBuffer.hxx" #include "bspf.hxx" -#include "Menu.hxx" +#include "OptionsMenu.hxx" // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Menu::Menu(OSystem& osystem) +OptionsMenu::OptionsMenu(OSystem& osystem) : DialogContainer(osystem) { } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Menu::~Menu() +OptionsMenu::~OptionsMenu() { delete stellaSettingDialog; stellaSettingDialog = nullptr; delete optionsDialog; optionsDialog = nullptr; } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Dialog* Menu::baseDialog() +Dialog* OptionsMenu::baseDialog() { if (myOSystem.settings().getBool("basic_settings")) { diff --git a/src/gui/Menu.hxx b/src/gui/OptionsMenu.hxx similarity index 76% rename from src/gui/Menu.hxx rename to src/gui/OptionsMenu.hxx index f1d76492a..3329d18ca 100644 --- a/src/gui/Menu.hxx +++ b/src/gui/OptionsMenu.hxx @@ -15,8 +15,8 @@ // this file, and for a DISCLAIMER OF ALL WARRANTIES. //============================================================================ -#ifndef MENU_HXX -#define MENU_HXX +#ifndef OPTIONS_MENU_HXX +#define OPTIONS_MENU_HXX class OSystem; class StellaSettingsDialog; @@ -29,7 +29,7 @@ class OptionsDialog; @author Stephen Anthony */ -class Menu : public DialogContainer +class OptionsMenu : public DialogContainer { public: // Current Stella mode @@ -38,8 +38,8 @@ class Menu : public DialogContainer /** Create a new menu stack */ - explicit Menu(OSystem& osystem); - ~Menu() override; + explicit OptionsMenu(OSystem& osystem); + ~OptionsMenu() override; private: Dialog* baseDialog() override; @@ -48,11 +48,11 @@ class Menu : public DialogContainer private: // Following constructors and assignment operators not supported - Menu() = delete; - Menu(const Menu&) = delete; - Menu(Menu&&) = delete; - Menu& operator=(const Menu&) = delete; - Menu& operator=(Menu&&) = delete; + OptionsMenu() = delete; + OptionsMenu(const OptionsMenu&) = delete; + OptionsMenu(OptionsMenu&&) = delete; + OptionsMenu& operator=(const OptionsMenu&) = delete; + OptionsMenu& operator=(OptionsMenu&&) = delete; }; #endif diff --git a/src/gui/StellaSettingsDialog.cxx b/src/gui/StellaSettingsDialog.cxx index 46efdc497..604b836d0 100644 --- a/src/gui/StellaSettingsDialog.cxx +++ b/src/gui/StellaSettingsDialog.cxx @@ -30,7 +30,7 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - StellaSettingsDialog::StellaSettingsDialog(OSystem& osystem, DialogContainer& parent, - int max_w, int max_h, Menu::AppMode mode) + int max_w, int max_h, OptionsMenu::AppMode mode) : Dialog(osystem, parent, osystem.frameBuffer().font(), "Basic settings"), myMode{mode} { @@ -351,7 +351,7 @@ void StellaSettingsDialog::handleCommand(CommandSender* sender, int cmd, saveConfig(); [[fallthrough]]; case GuiObject::kCloseCmd: - if (myMode != Menu::AppMode::emulator) + if (myMode != OptionsMenu::AppMode::emulator) close(); else instance().eventHandler().leaveMenuMode(); @@ -363,7 +363,7 @@ void StellaSettingsDialog::handleCommand(CommandSender* sender, int cmd, case kConfirmSwitchCmd: instance().settings().setValue("basic_settings", false); - if (myMode != Menu::AppMode::emulator) + if (myMode != OptionsMenu::AppMode::emulator) close(); else instance().eventHandler().leaveMenuMode(); diff --git a/src/gui/StellaSettingsDialog.hxx b/src/gui/StellaSettingsDialog.hxx index 1a93deb7f..a0349eb12 100644 --- a/src/gui/StellaSettingsDialog.hxx +++ b/src/gui/StellaSettingsDialog.hxx @@ -21,7 +21,7 @@ class PopUpWidget; #include "Props.hxx" -#include "Menu.hxx" +#include "OptionsMenu.hxx" #include "Dialog.hxx" #if defined(RETRON77) @@ -39,7 +39,7 @@ class StellaSettingsDialog : public Dialog { public: StellaSettingsDialog(OSystem& osystem, DialogContainer& parent, - int max_w, int max_h, Menu::AppMode mode); + int max_w, int max_h, OptionsMenu::AppMode mode); ~StellaSettingsDialog() override; private: @@ -103,7 +103,7 @@ class StellaSettingsDialog : public Dialog #endif // Indicates if this dialog is used for global (vs. in-game) settings - Menu::AppMode myMode{Menu::AppMode::emulator}; + OptionsMenu::AppMode myMode{OptionsMenu::AppMode::emulator}; enum { kAdvancedSettings = 'SSad', diff --git a/src/gui/VideoAudioDialog.cxx b/src/gui/VideoAudioDialog.cxx index b9cb91c56..f1ebade27 100644 --- a/src/gui/VideoAudioDialog.cxx +++ b/src/gui/VideoAudioDialog.cxx @@ -23,7 +23,6 @@ #include "Cart.hxx" #include "CartDPC.hxx" #include "Dialog.hxx" -#include "Menu.hxx" #include "OSystem.hxx" #include "EditTextWidget.hxx" #include "PopUpWidget.hxx" diff --git a/src/gui/module.mk b/src/gui/module.mk index a4500b412..8234e89ee 100644 --- a/src/gui/module.mk +++ b/src/gui/module.mk @@ -30,12 +30,12 @@ MODULE_OBJS := \ src/gui/Launcher.o \ src/gui/ListWidget.o \ src/gui/LoggerDialog.o \ - src/gui/Menu.o \ src/gui/MessageBox.o \ src/gui/MessageDialog.o \ src/gui/MessageMenu.o \ src/gui/MinUICommandDialog.o\ src/gui/OptionsDialog.o \ + src/gui/OptionMenu.o \ src/gui/PlusRomsMenu.o\ src/gui/PlusRomsSetupDialog.o\ src/gui/PopUpWidget.o \ diff --git a/src/windows/Stella.vcxproj b/src/windows/Stella.vcxproj index 78adadda1..918b927cf 100755 --- a/src/windows/Stella.vcxproj +++ b/src/windows/Stella.vcxproj @@ -981,7 +981,7 @@ - + @@ -2096,7 +2096,7 @@ - + diff --git a/src/windows/Stella.vcxproj.filters b/src/windows/Stella.vcxproj.filters index 764734d65..773e9a088 100644 --- a/src/windows/Stella.vcxproj.filters +++ b/src/windows/Stella.vcxproj.filters @@ -423,7 +423,7 @@ Source Files\gui - + Source Files\gui @@ -1505,7 +1505,7 @@ Header Files\gui - + Header Files\gui