aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock
diff options
context:
space:
mode:
authorPaul Gilbert2015-05-18 20:43:26 -0400
committerPaul Gilbert2015-05-18 20:43:26 -0400
commit8d426ca46435426c925007b08c933fdccdd75fa8 (patch)
tree27eb643c7f5a3846f66a0f15dd58ebcc0dda1a43 /engines/sherlock
parent19d93325b1ccda2d02d708cbef20a49786f38d2b (diff)
downloadscummvm-rg350-8d426ca46435426c925007b08c933fdccdd75fa8.tar.gz
scummvm-rg350-8d426ca46435426c925007b08c933fdccdd75fa8.tar.bz2
scummvm-rg350-8d426ca46435426c925007b08c933fdccdd75fa8.zip
SHERLOCK: Added more of the game options to the Engine tab
Diffstat (limited to 'engines/sherlock')
-rw-r--r--engines/sherlock/detection.cpp45
-rw-r--r--engines/sherlock/detection_tables.h3
-rw-r--r--engines/sherlock/inventory.cpp2
-rw-r--r--engines/sherlock/saveload.cpp2
-rw-r--r--engines/sherlock/settings.cpp8
-rw-r--r--engines/sherlock/sherlock.cpp9
-rw-r--r--engines/sherlock/talk.cpp6
-rw-r--r--engines/sherlock/user_interface.cpp8
-rw-r--r--engines/sherlock/user_interface.h2
9 files changed, 63 insertions, 22 deletions
diff --git a/engines/sherlock/detection.cpp b/engines/sherlock/detection.cpp
index e69887b5c7..096eb9f46e 100644
--- a/engines/sherlock/detection.cpp
+++ b/engines/sherlock/detection.cpp
@@ -60,6 +60,10 @@ static const PlainGameDescriptor sherlockGames[] = {
#define GAMEOPTION_ORIGINAL_SAVES GUIO_GAMEOPTIONS1
+#define GAMEOPTION_FADE_STYLE GUIO_GAMEOPTIONS2
+#define GAMEOPTION_HELP_STYLE GUIO_GAMEOPTIONS3
+#define GAMEOPTION_PORTRAITS_ON GUIO_GAMEOPTIONS4
+#define GAMEOPTION_WINDOW_STYLE GUIO_GAMEOPTIONS5
static const ADExtraGuiOptionsMap optionsList[] = {
{
@@ -72,9 +76,50 @@ static const ADExtraGuiOptionsMap optionsList[] = {
}
},
+ {
+ GAMEOPTION_FADE_STYLE,
+ {
+ _s("Pixellated scene transitions"),
+ _s("When changing scenes, a randomized pixel transition is done"),
+ "fade_style",
+ true
+ }
+ },
+
+ {
+ GAMEOPTION_HELP_STYLE,
+ {
+ _s("Don't show hotspots when moving mouse"),
+ _s("Only show hotspot names after you actually click on a hotspot or action button"),
+ "help_style",
+ false
+ }
+ },
+
+ {
+ GAMEOPTION_PORTRAITS_ON,
+ {
+ _s("Show character portraits"),
+ _s("Show portraits for the characters when conversing"),
+ "portraits_on",
+ true
+ }
+ },
+
+ {
+ GAMEOPTION_WINDOW_STYLE,
+ {
+ _s("Slide dialogs into view"),
+ _s("Slide UI dialogs into view, rather than simply showing them immediately"),
+ "window_style",
+ true
+ }
+ },
+
AD_EXTRA_GUI_OPTIONS_TERMINATOR
};
+
#include "sherlock/detection_tables.h"
class SherlockMetaEngine : public AdvancedMetaEngine {
diff --git a/engines/sherlock/detection_tables.h b/engines/sherlock/detection_tables.h
index 3960836f82..a13231d3fc 100644
--- a/engines/sherlock/detection_tables.h
+++ b/engines/sherlock/detection_tables.h
@@ -33,7 +33,8 @@ static const SherlockGameDescription gameDescriptions[] = {
Common::EN_ANY,
Common::kPlatformDOS,
ADGF_UNSTABLE,
- GUIO2(GUIO_NOSPEECH, GAMEOPTION_ORIGINAL_SAVES)
+ GUIO6(GUIO_NOSPEECH, GAMEOPTION_ORIGINAL_SAVES, GAMEOPTION_FADE_STYLE, GAMEOPTION_HELP_STYLE,
+ GAMEOPTION_PORTRAITS_ON, GAMEOPTION_WINDOW_STYLE)
},
GType_SerratedScalpel,
},
diff --git a/engines/sherlock/inventory.cpp b/engines/sherlock/inventory.cpp
index 283164c534..d41e4b9b3e 100644
--- a/engines/sherlock/inventory.cpp
+++ b/engines/sherlock/inventory.cpp
@@ -255,7 +255,7 @@ void Inventory::drawInventory(InvNewMode mode) {
putInv(SLAM_DONT_DISPLAY);
if (tempMode != INVENTORY_DONT_DISPLAY) {
- if (!ui._windowStyle) {
+ if (!ui._slideWindows) {
screen.slamRect(Common::Rect(0, CONTROLS_Y1, SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT));
} else {
ui.summonWindow(false, CONTROLS_Y1);
diff --git a/engines/sherlock/saveload.cpp b/engines/sherlock/saveload.cpp
index 0ac25a2f1a..6fb1dcc448 100644
--- a/engines/sherlock/saveload.cpp
+++ b/engines/sherlock/saveload.cpp
@@ -98,7 +98,7 @@ void SaveManager::drawInterface() {
INV_FOREGROUND, "%s", _savegames[idx].c_str());
}
- if (!ui._windowStyle) {
+ if (!ui._slideWindows) {
screen.slamRect(Common::Rect(0, CONTROLS_Y, SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT));
} else {
ui.summonWindow();
diff --git a/engines/sherlock/settings.cpp b/engines/sherlock/settings.cpp
index ffa1f056de..b4110d593c 100644
--- a/engines/sherlock/settings.cpp
+++ b/engines/sherlock/settings.cpp
@@ -108,7 +108,7 @@ void Settings::drawInteface(bool flag) {
screen.makeButton(Common::Rect(SETUP_POINTS[8][0], SETUP_POINTS[8][1], SETUP_POINTS[8][2], SETUP_POINTS[8][1] + 10),
SETUP_POINTS[8][3] - screen.stringWidth(tempStr) / 2, tempStr);
- tempStr = Common::String::format("Windows %s", ui._windowStyle ? "Slide" : "Appear");
+ tempStr = Common::String::format("Windows %s", ui._slideWindows ? "Slide" : "Appear");
screen.makeButton(Common::Rect(SETUP_POINTS[9][0], SETUP_POINTS[9][1], SETUP_POINTS[9][2], SETUP_POINTS[9][1] + 10),
SETUP_POINTS[9][3] - screen.stringWidth(tempStr) / 2, tempStr);
@@ -123,7 +123,7 @@ void Settings::drawInteface(bool flag) {
// Show the window immediately, or slide it on-screen
if (!flag) {
- if (!ui._windowStyle) {
+ if (!ui._slideWindows) {
screen.slamRect(Common::Rect(0, CONTROLS_Y1, SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT));
} else {
ui.summonWindow(true, CONTROLS_Y1);
@@ -189,7 +189,7 @@ int Settings::drawButtons(const Common::Point &pt, int _key) {
screen.buttonPrint(Common::Point(SETUP_POINTS[idx][3], SETUP_POINTS[idx][1]), color, true, tempStr);
break;
case 9:
- tempStr = Common::String::format("Windows %s", SETUP_STRS3[ui._windowStyle]);
+ tempStr = Common::String::format("Windows %s", SETUP_STRS3[ui._slideWindows]);
screen.buttonPrint(Common::Point(SETUP_POINTS[idx][3], SETUP_POINTS[idx][1]), color, true, tempStr);
break;
case 10:
@@ -322,7 +322,7 @@ void Settings::show(SherlockEngine *vm) {
if ((found == 9 && events._released) || ui._key == 'W') {
// Window style
- ui._windowStyle ^= 1;
+ ui._slideWindows = !ui._slideWindows;
updateConfig = true;
settings.drawInteface(true);
}
diff --git a/engines/sherlock/sherlock.cpp b/engines/sherlock/sherlock.cpp
index eb80fb6e3b..bd8dcb69ee 100644
--- a/engines/sherlock/sherlock.cpp
+++ b/engines/sherlock/sherlock.cpp
@@ -230,16 +230,11 @@ void SherlockEngine::loadConfig() {
syncSoundSettings();
ConfMan.registerDefault("font", 1);
- ConfMan.registerDefault("fade_style", true);
- ConfMan.registerDefault("help_style", false);
- ConfMan.registerDefault("window_style", 1);
- ConfMan.registerDefault("portraits_on", true);
- ConfMan.registerDefault("originalsaveload", false);
_screen->setFont(ConfMan.getInt("font"));
_screen->_fadeStyle = ConfMan.getBool("fade_style");
_ui->_helpStyle = ConfMan.getBool("help_style");
- _ui->_windowStyle = ConfMan.getInt("window_style");
+ _ui->_slideWindows = ConfMan.getBool("window_style");
_people->_portraitsOn = ConfMan.getBool("portraits_on");
}
@@ -254,7 +249,7 @@ void SherlockEngine::saveConfig() {
ConfMan.setInt("font", _screen->fontNumber());
ConfMan.setBool("fade_style", _screen->_fadeStyle);
ConfMan.setBool("help_style", _ui->_helpStyle);
- ConfMan.setInt("window_style", _ui->_windowStyle);
+ ConfMan.setBool("window_style", _ui->_slideWindows);
ConfMan.setBool("portraits_on", _people->_portraitsOn);
ConfMan.flushToDisk();
diff --git a/engines/sherlock/talk.cpp b/engines/sherlock/talk.cpp
index 78b52bc7a5..ec7e63e835 100644
--- a/engines/sherlock/talk.cpp
+++ b/engines/sherlock/talk.cpp
@@ -387,7 +387,7 @@ void Talk::talkTo(const Common::String &filename) {
} else {
screen.buttonPrint(Common::Point(119, CONTROLS_Y), color, false, "Exit");
- if (!ui._windowStyle) {
+ if (!ui._slideWindows) {
screen.slamRect(Common::Rect(0, CONTROLS_Y,
SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT));
} else {
@@ -534,7 +534,7 @@ void Talk::talk(int objNum) {
displayTalk(false);
ui._selector = ui._oldSelector = -1;
- if (!ui._windowStyle) {
+ if (!ui._slideWindows) {
screen.slamRect(Common::Rect(0, CONTROLS_Y, SHERLOCK_SCREEN_WIDTH,
SHERLOCK_SCREEN_HEIGHT));
} else {
@@ -1577,7 +1577,7 @@ void Talk::doScript(const Common::String &script) {
// Open window if it wasn't already open, and text has already been printed
if ((openTalkWindow && wait) || (openTalkWindow && str[0] >= SWITCH_SPEAKER && str[0] != CARRIAGE_RETURN)) {
- if (!ui._windowStyle) {
+ if (!ui._slideWindows) {
screen.slamRect(Common::Rect(0, CONTROLS_Y, SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT));
} else {
ui.summonWindow();
diff --git a/engines/sherlock/user_interface.cpp b/engines/sherlock/user_interface.cpp
index ffcbddb920..1607c727eb 100644
--- a/engines/sherlock/user_interface.cpp
+++ b/engines/sherlock/user_interface.cpp
@@ -109,7 +109,7 @@ UserInterface::UserInterface(SherlockEngine *vm) : _vm(vm) {
_selector = _oldSelector = -1;
_windowBounds = Common::Rect(0, CONTROLS_Y1, SHERLOCK_SCREEN_WIDTH - 1,
SHERLOCK_SCREEN_HEIGHT - 1);
- _windowStyle = 1; // Sliding windows
+ _slideWindows = true;
_find = 0;
_oldUse = 0;
_endKeyActive = true;
@@ -1999,7 +1999,7 @@ void UserInterface::printObjectDesc(const Common::String &str, bool firstTime) {
}
if (firstTime) {
- if (!_windowStyle) {
+ if (!_slideWindows) {
screen.slamRect(Common::Rect(0, CONTROLS_Y,
SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT));
} else {
@@ -2094,10 +2094,10 @@ void UserInterface::banishWindow(bool slideUp) {
Screen &screen = *_vm->_screen;
if (_windowOpen) {
- if (slideUp || !_windowStyle) {
+ if (slideUp || !_slideWindows) {
// Slide window down
// Only slide the window if the window style allows it
- if (_windowStyle) {
+ if (_slideWindows) {
for (int idx = 2; idx < (SHERLOCK_SCREEN_HEIGHT - CONTROLS_Y); idx += 2) {
// Shift the window down by 2 lines
byte *pSrc = (byte *)screen._backBuffer1.getBasePtr(0, CONTROLS_Y + idx - 2);
diff --git a/engines/sherlock/user_interface.h b/engines/sherlock/user_interface.h
index 2ff60715e3..fdaa323e5e 100644
--- a/engines/sherlock/user_interface.h
+++ b/engines/sherlock/user_interface.h
@@ -122,7 +122,7 @@ public:
bool _endKeyActive;
int _invLookFlag;
int _temp1;
- int _windowStyle;
+ bool _slideWindows;
bool _helpStyle;
public:
UserInterface(SherlockEngine *vm);