mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 14:18:37 +00:00
SHERLOCK: Use a bit more MenuMode and SaveMode
This commit is contained in:
parent
85081b7702
commit
456e0c584f
@ -260,12 +260,12 @@ void SaveManager::highlightButtons(int btnIndex) {
|
||||
|
||||
screen.buttonPrint(Common::Point(ENV_POINTS[0][2], CONTROLS_Y), color, 1, "Exit");
|
||||
|
||||
if ((btnIndex == 1) || ((_envMode == 1) && (btnIndex != 2)))
|
||||
if ((btnIndex == 1) || ((_envMode == SAVEMODE_LOAD) && (btnIndex != 2)))
|
||||
screen.buttonPrint(Common::Point(ENV_POINTS[1][2], CONTROLS_Y), COMMAND_HIGHLIGHTED, true, "Load");
|
||||
else
|
||||
screen.buttonPrint(Common::Point(ENV_POINTS[1][2], CONTROLS_Y), COMMAND_FOREGROUND, true, "Load");
|
||||
|
||||
if ((btnIndex == 2) || ((_envMode == 2) && (btnIndex != 1)))
|
||||
if ((btnIndex == 2) || ((_envMode == SAVEMODE_SAVE) && (btnIndex != 1)))
|
||||
screen.buttonPrint(Common::Point(ENV_POINTS[2][2], CONTROLS_Y), COMMAND_HIGHLIGHTED, true, "Save");
|
||||
else
|
||||
screen.buttonPrint(Common::Point(ENV_POINTS[2][2], CONTROLS_Y), COMMAND_FOREGROUND, true, "Save");
|
||||
|
@ -150,7 +150,7 @@ void Scene::selectScene() {
|
||||
|
||||
loadScene(sceneFile);
|
||||
|
||||
// If the fade style was changed from running amovie, then reset it
|
||||
// If the fade style was changed from running a movie, then reset it
|
||||
if (_tempFadeStyle) {
|
||||
screen._fadeStyle = _tempFadeStyle;
|
||||
_tempFadeStyle = 0;
|
||||
|
@ -36,22 +36,22 @@ namespace Sherlock {
|
||||
#define VGA_COLOR_TRANS(x) ((x) * 255 / 63)
|
||||
|
||||
enum {
|
||||
INFO_BLACK = 1,
|
||||
INFO_FOREGROUND = 11,
|
||||
INFO_BACKGROUND = 1,
|
||||
BORDER_COLOR = 237,
|
||||
INV_FOREGROUND = 14,
|
||||
INV_BACKGROUND = 1,
|
||||
COMMAND_HIGHLIGHTED = 10,
|
||||
COMMAND_FOREGROUND = 15,
|
||||
COMMAND_BACKGROUND = 4,
|
||||
COMMAND_NULL = 248,
|
||||
BUTTON_TOP = 233,
|
||||
BUTTON_MIDDLE = 244,
|
||||
BUTTON_BOTTOM = 248,
|
||||
TALK_FOREGROUND = 12,
|
||||
TALK_NULL = 16,
|
||||
PEN_COLOR = 250
|
||||
INFO_BLACK = 1,
|
||||
INFO_FOREGROUND = 11,
|
||||
INFO_BACKGROUND = 1,
|
||||
BORDER_COLOR = 237,
|
||||
INV_FOREGROUND = 14,
|
||||
INV_BACKGROUND = 1,
|
||||
COMMAND_HIGHLIGHTED = 10,
|
||||
COMMAND_FOREGROUND = 15,
|
||||
COMMAND_BACKGROUND = 4,
|
||||
COMMAND_NULL = 248,
|
||||
BUTTON_TOP = 233,
|
||||
BUTTON_MIDDLE = 244,
|
||||
BUTTON_BOTTOM = 248,
|
||||
TALK_FOREGROUND = 12,
|
||||
TALK_NULL = 16,
|
||||
PEN_COLOR = 250
|
||||
};
|
||||
|
||||
class SherlockEngine;
|
||||
|
@ -146,7 +146,7 @@ void Talk::talkTo(const Common::String &filename) {
|
||||
}
|
||||
|
||||
// Save the ui mode temporarily and switch to talk mode
|
||||
int savedMode = ui._menuMode;
|
||||
MenuMode savedMode = ui._menuMode;
|
||||
ui._menuMode = TALK_MODE;
|
||||
|
||||
// Turn on the Exit option
|
||||
@ -183,7 +183,7 @@ void Talk::talkTo(const Common::String &filename) {
|
||||
|
||||
// Restore any pressed button
|
||||
if (!ui._windowOpen && savedMode != STD_MODE)
|
||||
ui.restoreButton(savedMode - 1);
|
||||
ui.restoreButton((int)(savedMode - 1));
|
||||
|
||||
// Clear the ui counter so that anything displayed on the info line
|
||||
// before the window was opened isn't cleared
|
||||
@ -258,6 +258,9 @@ void Talk::talkTo(const Common::String &filename) {
|
||||
events._pressed = events._released = events._oldButtons = 0;
|
||||
abortFlag = true;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -389,7 +389,7 @@ void UserInterface::handleInput() {
|
||||
doMainControl();
|
||||
}
|
||||
|
||||
if (pt.y < CONTROLS_Y && events._pressed && _oldTemp != (_menuMode - 1) && _oldKey != -1)
|
||||
if (pt.y < CONTROLS_Y && events._pressed && _oldTemp != (int)(_menuMode - 1) && _oldKey != -1)
|
||||
restoreButton(_oldTemp);
|
||||
}
|
||||
}
|
||||
@ -438,7 +438,7 @@ void UserInterface::pushButton(int num) {
|
||||
void UserInterface::toggleButton(int num) {
|
||||
Screen &screen = *_vm->_screen;
|
||||
|
||||
if (_menuMode != (num + 1)) {
|
||||
if (_menuMode != (MenuMode)(num + 1)) {
|
||||
_menuMode = (MenuMode)(num + 1);
|
||||
_oldKey = COMMANDS[num];
|
||||
_oldTemp = num;
|
||||
@ -700,7 +700,7 @@ void UserInterface::doEnvControl() {
|
||||
if (mousePos.y > (CONTROLS_Y + 11 + _selector * 10) && mousePos.y < (CONTROLS_Y + 21 + _selector * 10))
|
||||
found1 = 1;
|
||||
|
||||
if (_selector + saves._savegameIndex - 1 < MAX_SAVEGAME_SLOTS + (saves._envMode != 1))
|
||||
if (_selector + saves._savegameIndex - 1 < MAX_SAVEGAME_SLOTS + (saves._envMode != SAVEMODE_LOAD))
|
||||
_selector = _selector + saves._savegameIndex - 1;
|
||||
else
|
||||
_selector = -1;
|
||||
@ -734,7 +734,7 @@ void UserInterface::doEnvControl() {
|
||||
} else if (_key >= '1' && _key <= '9') {
|
||||
_keyboardInput = true;
|
||||
_selector = _key - '1';
|
||||
if (_selector >= MAX_SAVEGAME_SLOTS + (saves._envMode == 1 ? 0 : 1))
|
||||
if (_selector >= MAX_SAVEGAME_SLOTS + (saves._envMode == SAVEMODE_LOAD ? 0 : 1))
|
||||
_selector = -1;
|
||||
|
||||
if (saves.checkGameOnScreen(_selector))
|
||||
|
Loading…
Reference in New Issue
Block a user