[Scummvm-git-logs] scummvm master -> 44430288f36ff3f774cd68f6df93ef57fd0b79e9
dreammaster
noreply at scummvm.org
Sat Aug 8 07:07:26 UTC 2026
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
44430288f3 MADS: NEBULAR: Fix warnings in Mac Rex code
Commit: 44430288f36ff3f774cd68f6df93ef57fd0b79e9
https://github.com/scummvm/scummvm/commit/44430288f36ff3f774cd68f6df93ef57fd0b79e9
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-08-08T17:07:17+10:00
Commit Message:
MADS: NEBULAR: Fix warnings in Mac Rex code
Changed paths:
engines/mads/nebular/mac_menus.cpp
engines/mads/nebular/mac_menus.h
diff --git a/engines/mads/nebular/mac_menus.cpp b/engines/mads/nebular/mac_menus.cpp
index 9a0bbdb6ed5..1623185ccb6 100644
--- a/engines/mads/nebular/mac_menus.cpp
+++ b/engines/mads/nebular/mac_menus.cpp
@@ -257,8 +257,8 @@ void MacNebularMenu::updateState() {
setItemState(getMenuItem(kWindowMenu, 2), true, true);
}
-void MacNebularMenu::dispatchCommand(int command) {
- switch (command) {
+void MacNebularMenu::dispatchCommand(int commandId) {
+ switch (commandId) {
case kFileOpen:
if (_engine.canLoadGameStateCurrently(nullptr))
_engine.loadGameDialog();
@@ -294,14 +294,14 @@ void MacNebularMenu::dispatchCommand(int command) {
case kFadeSmooth:
case kFadeMedium:
case kFadeFast:
- kernel_screen_fade = command - kFadeSmooth;
+ kernel_screen_fade = commandId - kFadeSmooth;
config_file.screen_fade = kernel_screen_fade;
ConfMan.setInt("screen_fade", kernel_screen_fade);
ConfMan.flushToDisk();
break;
case kStoryNaughty:
case kStoryNice:
- config_file.naughtiness = command == kStoryNaughty ? NAUGHTY : NICE;
+ config_file.naughtiness = commandId == kStoryNaughty ? NAUGHTY : NICE;
ConfMan.setBool("naughtiness", config_file.naughtiness == NAUGHTY);
ConfMan.flushToDisk();
break;
@@ -330,9 +330,9 @@ bool MacNebularMenu::processEvent(Common::Event &event) {
updateState();
const bool handled = _windowManager->processEvent(event);
if (_pendingCommand != -1) {
- const int command = _pendingCommand;
+ const int commandId = _pendingCommand;
_pendingCommand = -1;
- dispatchCommand(command);
+ dispatchCommand(commandId);
}
return handled;
}
@@ -346,9 +346,9 @@ void MacNebularMenu::draw() {
_menu->draw(&_screen, true);
}
-void MacNebularMenu::menuCallback(int command, Common::String &, void *data) {
+void MacNebularMenu::menuCallback(int commandId, Common::String &, void *data) {
MacNebularMenu *menus = (MacNebularMenu *)data;
- menus->_pendingCommand = command;
+ menus->_pendingCommand = commandId;
menus->_menu->closeMenu();
}
diff --git a/engines/mads/nebular/mac_menus.h b/engines/mads/nebular/mac_menus.h
index ed52e7b9e38..62ff1902f28 100644
--- a/engines/mads/nebular/mac_menus.h
+++ b/engines/mads/nebular/mac_menus.h
@@ -32,7 +32,7 @@ class String;
namespace Graphics {
class MacMenu;
struct MacMenuItem;
-class MacMenuSubMenu;
+struct MacMenuSubMenu;
class MacWindowManager;
class ManagedSurface;
}
@@ -54,14 +54,14 @@ private:
bool _paletteValid = false;
int _pendingCommand = -1;
- static void menuCallback(int command, Common::String &name, void *data);
+ static void menuCallback(int commandId, Common::String &name, void *data);
bool loadMenuResource(uint16 resourceID,
Graphics::MacMenuSubMenu *parent = nullptr, int parentItem = -1);
Graphics::MacMenuItem *getMenuItem(int menu, int item) const;
Graphics::MacMenuItem *getSubMenuItem(int menu, int parentItem, int item) const;
void setItemState(Graphics::MacMenuItem *item, bool enabled, bool checked);
void updateState();
- void dispatchCommand(int command);
+ void dispatchCommand(int commandId);
void syncPalette();
public:
More information about the Scummvm-git-logs
mailing list