diff options
Diffstat (limited to 'gui')
| -rw-r--r-- | gui/Actions.cpp | 19 | ||||
| -rw-r--r-- | gui/ThemeEngine.h | 4 | ||||
| -rw-r--r-- | gui/ThemeParser.cpp | 40 | ||||
| -rw-r--r-- | gui/about.cpp | 2 | ||||
| -rw-r--r-- | gui/browser.h | 6 | ||||
| -rw-r--r-- | gui/browser_osx.mm | 3 | ||||
| -rw-r--r-- | gui/console.cpp | 27 | ||||
| -rw-r--r-- | gui/console.h | 10 | ||||
| -rw-r--r-- | gui/credits.h | 30 | ||||
| -rw-r--r-- | gui/debugger.cpp | 5 | ||||
| -rw-r--r-- | gui/debugger.h | 2 | ||||
| -rw-r--r-- | gui/launcher.cpp | 8 | ||||
| -rw-r--r-- | gui/options.cpp | 59 | ||||
| -rw-r--r-- | gui/options.h | 1 | ||||
| -rw-r--r-- | gui/themes/default.inc | 6 | ||||
| -rw-r--r-- | gui/themes/scummclassic.zip | bin | 73968 -> 13474 bytes | |||
| -rw-r--r-- | gui/themes/scummclassic/THEMERC | 2 | ||||
| -rw-r--r-- | gui/themes/scummclassic/classic_layout.stx | 3 | ||||
| -rw-r--r-- | gui/themes/scummclassic/classic_layout_lowres.stx | 3 | ||||
| -rw-r--r-- | gui/themes/scummmodern.zip | bin | 181827 -> 56615 bytes | |||
| -rw-r--r-- | gui/themes/scummmodern/THEMERC | 2 | ||||
| -rw-r--r-- | gui/themes/scummmodern/scummmodern_layout.stx | 3 | ||||
| -rw-r--r-- | gui/themes/scummmodern/scummmodern_layout_lowres.stx | 3 |
23 files changed, 149 insertions, 89 deletions
diff --git a/gui/Actions.cpp b/gui/Actions.cpp index 809188dfef..f44479a5a8 100644 --- a/gui/Actions.cpp +++ b/gui/Actions.cpp @@ -25,12 +25,12 @@ #include "gui/Actions.h" #include "gui/message.h" -#include "scumm/scumm.h" #include "common/config-manager.h" #ifdef _WIN32_WCE #include "backends/platform/wince/CEActionsPocket.h" #include "backends/platform/wince/CEActionsSmartphone.h" + #include "backends/platform/wince/CEDevice.h" #elif defined(__SYMBIAN32__) #include "backends/platform/symbian/src/SymbianActions.h" #endif @@ -42,8 +42,7 @@ Actions* Actions::Instance() { } Actions::Actions() : - _mapping_active(false), _initialized(false) -{ + _mapping_active(false), _initialized(false) { } @@ -95,7 +94,7 @@ bool Actions::mappingActive() { bool Actions::performMapped(unsigned int keyCode, bool pushed) { int i; - for (i=0; i<size(); i++) { + for (i = 0; i < size(); ++i) { if (_action_mapping[i] == keyCode && _action_enabled[i]) return perform((ActionType)i, pushed); } @@ -112,7 +111,7 @@ bool Actions::loadMapping() { return false; tempo = ConfMan.get("action_mapping", domain()).c_str(); if (tempo && strlen(tempo)) { - for (i=0; i<size(); i++) { + for (i = 0; i < size(); ++i) { char x[7]; int j; memset(x, 0, sizeof(x)); @@ -121,8 +120,7 @@ bool Actions::loadMapping() { _action_mapping[i] = j; } return true; - } - else + } else return false; } @@ -131,7 +129,7 @@ bool Actions::saveMapping() { int i; tempo[0] = '\0'; ConfMan.setInt("action_mapping_version", version(), domain()); - for (i=0; i<size(); i++) { + for (i = 0; i < size(); ++i) { char x[10]; sprintf(x, "%.4x ", _action_mapping[i]); strcat(tempo, x); @@ -149,7 +147,7 @@ unsigned int Actions::getMapping(ActionType action) { void Actions::setMapping(ActionType action, unsigned int keyCode) { int i; - for (i=0; i<size(); i++) { + for (i = 0; i < size(); ++i) { if (_action_mapping[i] == keyCode) _action_mapping[i] = 0; } @@ -157,8 +155,7 @@ void Actions::setMapping(ActionType action, unsigned int keyCode) { _action_mapping[action] = keyCode; } -Key& Actions::getKeyAction(ActionType action) -{ +Key& Actions::getKeyAction(ActionType action) { return _key_action[action]; } diff --git a/gui/ThemeEngine.h b/gui/ThemeEngine.h index 948ef21023..a2517bb8e0 100644 --- a/gui/ThemeEngine.h +++ b/gui/ThemeEngine.h @@ -32,12 +32,11 @@ #include "graphics/surface.h" #include "graphics/font.h" -#define SCUMMVM_THEME_VERSION_STR "SCUMMVM_STX0.8" +#define SCUMMVM_THEME_VERSION_STR "SCUMMVM_STX0.8.2" namespace Graphics { struct DrawStep; class VectorRenderer; - class Font; } namespace GUI { @@ -53,7 +52,6 @@ class ThemeEval; class ThemeItem; class ThemeParser; - /** * DrawData sets enumeration. * Each DD set corresponds to the actual looks diff --git a/gui/ThemeParser.cpp b/gui/ThemeParser.cpp index b9a0c583b0..0daf2528dd 100644 --- a/gui/ThemeParser.cpp +++ b/gui/ThemeParser.cpp @@ -195,7 +195,7 @@ bool ThemeParser::parserCallback_text_color(ParserNode *node) { if (_palette.contains(node->values["color"])) getPaletteColor(node->values["color"], red, green, blue); - else if (!parseIntegerKey(node->values["color"].c_str(), 3, &red, &green, &blue)) + else if (!parseIntegerKey(node->values["color"], 3, &red, &green, &blue)) return parserError("Error parsing color value for text color definition."); if (!_theme->addTextColor(colorId, red, green, blue)) @@ -216,10 +216,10 @@ bool ThemeParser::parserCallback_cursor(ParserNode *node) { int spotx, spoty, scale; - if (!parseIntegerKey(node->values["hotspot"].c_str(), 2, &spotx, &spoty)) + if (!parseIntegerKey(node->values["hotspot"], 2, &spotx, &spoty)) return parserError("Error parsing cursor Hot Spot coordinates."); - if (!parseIntegerKey(node->values["scale"].c_str(), 1, &scale)) + if (!parseIntegerKey(node->values["scale"], 1, &scale)) return parserError("Error parsing cursor scale."); if (!_theme->createCursor(node->values["file"], spotx, spoty, scale)) @@ -286,7 +286,7 @@ bool ThemeParser::parserCallback_color(ParserNode *node) { int red, green, blue; - if (parseIntegerKey(node->values["rgb"].c_str(), 3, &red, &green, &blue) == false || + if (parseIntegerKey(node->values["rgb"], 3, &red, &green, &blue) == false || red < 0 || red > 255 || green < 0 || green > 255 || blue < 0 || blue > 255) return parserError("Error parsing RGB values for palette color '%s'", name.c_str());\ @@ -387,7 +387,7 @@ bool ThemeParser::parseDrawStep(ParserNode *stepNode, Graphics::DrawStep *drawst */ #define __PARSER_ASSIGN_INT(struct_name, key_name, force) \ if (stepNode->values.contains(key_name)) { \ - if (!parseIntegerKey(stepNode->values[key_name].c_str(), 1, &x)) \ + if (!parseIntegerKey(stepNode->values[key_name], 1, &x)) \ return parserError("Error parsing key value for '%s'.", key_name); \ \ drawstep->struct_name = x; \ @@ -411,7 +411,7 @@ bool ThemeParser::parseDrawStep(ParserNode *stepNode, Graphics::DrawStep *drawst red = _palette[val].r; \ green = _palette[val].g; \ blue = _palette[val].b; \ - } else if (parseIntegerKey(val.c_str(), 3, &red, &green, &blue) == false || \ + } else if (parseIntegerKey(val, 3, &red, &green, &blue) == false || \ red < 0 || red > 255 || green < 0 || green > 255 || blue < 0 || blue > 255) \ return parserError("Error parsing color struct '%s'", val.c_str());\ \ @@ -481,7 +481,7 @@ bool ThemeParser::parseDrawStep(ParserNode *stepNode, Graphics::DrawStep *drawst drawstep->autoWidth = false; val = stepNode->values["width"]; - if (parseIntegerKey(val.c_str(), 1, &x)) + if (parseIntegerKey(val, 1, &x)) drawstep->w = x; else if (val == "height") drawstep->w = -1; @@ -490,7 +490,7 @@ bool ThemeParser::parseDrawStep(ParserNode *stepNode, Graphics::DrawStep *drawst if (stepNode->values.contains("xpos")) { val = stepNode->values["xpos"]; - if (parseIntegerKey(val.c_str(), 1, &x)) + if (parseIntegerKey(val, 1, &x)) drawstep->x = x; else if (val == "center") drawstep->xAlign = Graphics::DrawStep::kVectorAlignCenter; @@ -509,7 +509,7 @@ bool ThemeParser::parseDrawStep(ParserNode *stepNode, Graphics::DrawStep *drawst drawstep->autoHeight = false; val = stepNode->values["height"]; - if (parseIntegerKey(val.c_str(), 1, &x)) + if (parseIntegerKey(val, 1, &x)) drawstep->h = x; else if (val == "width") drawstep->h = -1; @@ -518,7 +518,7 @@ bool ThemeParser::parseDrawStep(ParserNode *stepNode, Graphics::DrawStep *drawst if (stepNode->values.contains("ypos")) { val = stepNode->values["ypos"]; - if (parseIntegerKey(val.c_str(), 1, &x)) + if (parseIntegerKey(val, 1, &x)) drawstep->y = x; else if (val == "center") drawstep->yAlign = Graphics::DrawStep::kVectorAlignCenter; @@ -569,7 +569,7 @@ bool ThemeParser::parserCallback_def(ParserNode *node) { if (_theme->getEvaluator()->hasVar(node->values["value"]) == true) value = _theme->getEvaluator()->getVar(node->values["value"]); - else if (!parseIntegerKey(node->values["value"].c_str(), 1, &value)) + else if (!parseIntegerKey(node->values["value"], 1, &value)) return parserError("Invalid definition for '%s'.", var.c_str()); _theme->getEvaluator()->setVar(var, value); @@ -608,7 +608,7 @@ bool ThemeParser::parserCallback_widget(ParserNode *node) { if (_theme->getEvaluator()->hasVar(node->values["width"]) == true) width = _theme->getEvaluator()->getVar(node->values["width"]); - else if (!parseIntegerKey(node->values["width"].c_str(), 1, &width)) + else if (!parseIntegerKey(node->values["width"], 1, &width)) return parserError("Corrupted width value in key for %s", var.c_str()); } @@ -616,7 +616,7 @@ bool ThemeParser::parserCallback_widget(ParserNode *node) { if (_theme->getEvaluator()->hasVar(node->values["height"]) == true) height = _theme->getEvaluator()->getVar(node->values["height"]); - else if (!parseIntegerKey(node->values["height"].c_str(), 1, &height)) + else if (!parseIntegerKey(node->values["height"], 1, &height)) return parserError("Corrupted height value in key for %s", var.c_str()); } @@ -651,7 +651,7 @@ bool ThemeParser::parserCallback_dialog(ParserNode *node) { } if (node->values.contains("inset")) { - if (!parseIntegerKey(node->values["inset"].c_str(), 1, &inset)) + if (!parseIntegerKey(node->values["inset"], 1, &inset)) return false; } @@ -682,7 +682,7 @@ bool ThemeParser::parserCallback_layout(ParserNode *node) { int spacing = -1; if (node->values.contains("spacing")) { - if (!parseIntegerKey(node->values["spacing"].c_str(), 1, &spacing)) + if (!parseIntegerKey(node->values["spacing"], 1, &spacing)) return false; } @@ -697,7 +697,7 @@ bool ThemeParser::parserCallback_layout(ParserNode *node) { if (node->values.contains("padding")) { int paddingL, paddingR, paddingT, paddingB; - if (!parseIntegerKey(node->values["padding"].c_str(), 4, &paddingL, &paddingR, &paddingT, &paddingB)) + if (!parseIntegerKey(node->values["padding"], 4, &paddingL, &paddingR, &paddingT, &paddingB)) return false; _theme->getEvaluator()->addPadding(paddingL, paddingR, paddingT, paddingB); @@ -713,7 +713,7 @@ bool ThemeParser::parserCallback_space(ParserNode *node) { if (_theme->getEvaluator()->hasVar(node->values["size"])) size = _theme->getEvaluator()->getVar(node->values["size"]); - else if (!parseIntegerKey(node->values["size"].c_str(), 1, &size)) + else if (!parseIntegerKey(node->values["size"], 1, &size)) return parserError("Invalid value for Spacing size."); } @@ -734,7 +734,7 @@ bool ThemeParser::parseCommonLayoutProps(ParserNode *node, const Common::String if (node->values.contains("size")) { int width, height; - if (!parseIntegerKey(node->values["size"].c_str(), 2, &width, &height)) { + if (!parseIntegerKey(node->values["size"], 2, &width, &height)) { Common::StringTokenizer tokenizer(node->values["size"], " ,"); Common::String wtoken, htoken; char *parseEnd; @@ -779,7 +779,7 @@ bool ThemeParser::parseCommonLayoutProps(ParserNode *node, const Common::String if (node->values.contains("pos")) { int x, y; - if (!parseIntegerKey(node->values["pos"].c_str(), 2, &x, &y)) { + if (!parseIntegerKey(node->values["pos"], 2, &x, &y)) { Common::StringTokenizer tokenizer(node->values["pos"], " ,"); Common::String xpos, ypos; char *parseEnd; @@ -835,7 +835,7 @@ bool ThemeParser::parseCommonLayoutProps(ParserNode *node, const Common::String if (node->values.contains("padding")) { int paddingL, paddingR, paddingT, paddingB; - if (!parseIntegerKey(node->values["padding"].c_str(), 4, &paddingL, &paddingR, &paddingT, &paddingB)) + if (!parseIntegerKey(node->values["padding"], 4, &paddingL, &paddingR, &paddingT, &paddingB)) return false; _theme->getEvaluator()->setVar(var + "Padding.Left", paddingL); diff --git a/gui/about.cpp b/gui/about.cpp index 3caab084ca..86d28b4f61 100644 --- a/gui/about.cpp +++ b/gui/about.cpp @@ -93,7 +93,7 @@ AboutDialog::AboutDialog() version += gScummVMVersion; _lines.push_back(version); - Common::String date = Common::String::printf(_("(built on %s)"), gScummVMBuildDate); + Common::String date = Common::String::format(_("(built on %s)"), gScummVMBuildDate); _lines.push_back("C2" + date); for (i = 0; i < ARRAYSIZE(copyright_text); i++) diff --git a/gui/browser.h b/gui/browser.h index 8dc7eda43a..1fef041a5a 100644 --- a/gui/browser.h +++ b/gui/browser.h @@ -29,10 +29,6 @@ #include "common/str.h" #include "common/fs.h" -#ifdef MACOSX -#include <Carbon/Carbon.h> -#endif - namespace GUI { class ListWidget; @@ -54,7 +50,7 @@ public: protected: #ifdef MACOSX - CFStringRef _titleRef; + const void *_titleRef; #else ListWidget *_fileList; StaticTextWidget *_currentPath; diff --git a/gui/browser_osx.mm b/gui/browser_osx.mm index a3a09b8ed2..ea77e16c04 100644 --- a/gui/browser_osx.mm +++ b/gui/browser_osx.mm @@ -22,6 +22,9 @@ * $Id$ */ +// Disable symbol overrides so that we can use system headers +#define FORBIDDEN_SYMBOL_ALLOW_ALL + #include "gui/browser.h" #include "gui/GuiManager.h" #include "gui/ListWidget.h" diff --git a/gui/console.cpp b/gui/console.cpp index a53e97888b..ca3726c857 100644 --- a/gui/console.cpp +++ b/gui/console.cpp @@ -487,7 +487,7 @@ void ConsoleDialog::defaultKeyDownHandler(Common::KeyState &state) { for (int i = _promptEndPos - 1; i >= _currentPos; i--) buffer(i + 1) = buffer(i); _promptEndPos++; - putchar((byte)state.ascii); + printChar((byte)state.ascii); scrollToCurrent(); } } @@ -498,7 +498,7 @@ void ConsoleDialog::insertIntoPrompt(const char* str) { buffer(i + l) = buffer(i); for (unsigned int j = 0; j < l; ++j) { _promptEndPos++; - putcharIntern(str[j]); + printCharIntern(str[j]); } } @@ -620,7 +620,7 @@ void ConsoleDialog::historyScroll(int direction) { else idx = _historyIndex; for (int i = 0; i < kLineBufferSize && _history[idx][i] != '\0'; i++) - putcharIntern(_history[idx][i]); + printCharIntern(_history[idx][i]); _promptEndPos = _currentPos; // Ensure once more the caret is visible (in case of very long history entries) @@ -659,38 +659,33 @@ void ConsoleDialog::updateScrollBuffer() { _scrollBar->recalc(); } -int ConsoleDialog::printf(const char *format, ...) { +int ConsoleDialog::printFormat(int dummy, const char *format, ...) { va_list argptr; va_start(argptr, format); - int count = this->vprintf(format, argptr); + int count = this->vprintFormat(dummy, format, argptr); va_end (argptr); return count; } -int ConsoleDialog::vprintf(const char *format, va_list argptr) { +int ConsoleDialog::vprintFormat(int dummy, const char *format, va_list argptr) { char buf[2048]; -#if defined(WIN32) - int count = _vsnprintf(buf, sizeof(buf), format, argptr); -#elif defined(__SYMBIAN32__) - int count = vsprintf(buf, format, argptr); -#else int count = vsnprintf(buf, sizeof(buf), format, argptr); -#endif + buf[sizeof(buf)-1] = 0; // ensure termination print(buf); return count; } -void ConsoleDialog::putchar(int c) { +void ConsoleDialog::printChar(int c) { if (_caretVisible) drawCaret(true); - putcharIntern(c); + printCharIntern(c); drawLine(pos2line(_currentPos)); } -void ConsoleDialog::putcharIntern(int c) { +void ConsoleDialog::printCharIntern(int c) { if (c == '\n') nextLine(); else { @@ -708,7 +703,7 @@ void ConsoleDialog::print(const char *str) { drawCaret(true); while (*str) - putcharIntern(*str++); + printCharIntern(*str++); draw(); } diff --git a/gui/console.h b/gui/console.h index bf44bdbe17..52762b065f 100644 --- a/gui/console.h +++ b/gui/console.h @@ -143,10 +143,10 @@ public: void handleKeyDown(Common::KeyState state); void handleCommand(CommandSender *sender, uint32 cmd, uint32 data); - int printf(const char *format, ...) GCC_PRINTF(2, 3); - int vprintf(const char *format, va_list argptr); -#undef putchar - void putchar(int c); + int printFormat(int dummy, const char *format, ...) GCC_PRINTF(3, 4); + int vprintFormat(int dummy, const char *format, va_list argptr); + + void printChar(int c); void setInputCallback(InputCallbackProc proc, void *refCon) { _callbackProc = proc; @@ -172,7 +172,7 @@ protected: void drawLine(int line, bool restoreBg = true); void drawCaret(bool erase); - void putcharIntern(int c); + void printCharIntern(int c); void insertIntoPrompt(const char *str); void print(const char *str); void updateScrollBuffer(); diff --git a/gui/credits.h b/gui/credits.h index b469645217..d54e280a37 100644 --- a/gui/credits.h +++ b/gui/credits.h @@ -81,6 +81,13 @@ static const char *credits[] = { "C0""Jonathan Gray", "C2""(retired)", "", +"C1""Broken Sword 2.5", +"C0""Eugene Sandulenko", +"C0""Filippos Karapetis", +"C0""Max Horn", +"C0""Paul Gilbert", +"C0""Torbj\366rn Andersson", +"", "C1""Cinematique evo 1", "C0""Vincent Hamm", "C2""(retired)", @@ -119,6 +126,11 @@ static const char *credits[] = { "C0""Scott Thomas", "C0""Jordi Vilalta Prat", "", +"C1""Hugo", +"C0""Arnaud Boutonn\351", +"C0""Oystein Eftevaag", +"C0""Eugene Sandulenko", +"", "C1""Kyra", "C0""Torbj\366rn Andersson", "C2""VQA Player", @@ -127,6 +139,11 @@ static const char *credits[] = { "C0""Gregory Montoir", "C0""Johannes Schickel", "", +"C1""Last Express", +"C0""Matthew Hoops", +"C0""Jordi Vilalta Prat", +"C0""Julien Templier", +"", "C1""Lure", "C0""Paul Gilbert", "", @@ -181,6 +198,9 @@ static const char *credits[] = { "C0""Filippos Karapetis", "C0""Joost Peters", "", +"C1""Toon", +"C0""Sylvain Dupont", +"", "C1""Touch\351", "C0""Gregory Montoir", "", @@ -195,7 +215,7 @@ static const char *credits[] = { "C1""Dreamcast", "C0""Marcus Comstedt", "", -"C1""GP2X", +"C1""GPH Devices (GP2X, GP2XWiz & Caanoo)", "C0""John Willis", "", "C1""iPhone", @@ -213,6 +233,9 @@ static const char *credits[] = { "C1""Nintendo DS", "C0""Neil Millstone", "", +"C1""OpenPandora", +"C0""John Willis", +"", "C1""PocketPC / WinCE", "C0""Nicolas Bacca", "C2""(retired)", @@ -245,6 +268,7 @@ static const char *credits[] = { "C0""Max Horn", "C2""Backend & Engine APIs, file API, sound mixer, audiostreams, data structures, etc.", "C0""Eugene Sandulenko", +"C0""Johannes Schickel", "", "C1""GUI", "C0""Vicent Marti", @@ -278,7 +302,7 @@ static const char *credits[] = { "C0""Thierry Crozat", "C2""Numerous contributions to documentation", "C0""Joachim Eberhard", -"C2""Numerous contributions to documentation", +"C2""Numerous contributions to documentation (retired)", "C0""Matthew Hoops", "C2""Wiki editor", "", @@ -580,5 +604,7 @@ static const char *credits[] = { "C0""", "C0""David P. Gray from Gray Design Associate for sharing the source code of the Hugo trilogy.", "C0""", +"C0""Broken Sword 2.5 team for providing sources of their engine and their great support.", +"C0""", "", }; diff --git a/gui/debugger.cpp b/gui/debugger.cpp index 9bd3b35915..8c10154334 100644 --- a/gui/debugger.cpp +++ b/gui/debugger.cpp @@ -23,6 +23,9 @@ * */ +// NB: This is really only necessary if USE_READLINE is defined +#define FORBIDDEN_SYMBOL_ALLOW_ALL + #include "common/debug.h" #include "common/debug-channels.h" #include "common/system.h" @@ -78,7 +81,7 @@ int Debugger::DebugPrintf(const char *format, ...) { va_start(argptr, format); int count; #ifndef USE_TEXT_CONSOLE - count = _debuggerDialog->vprintf(format, argptr); + count = _debuggerDialog->vprintFormat(1, format, argptr); #else count = ::vprintf(format, argptr); #endif diff --git a/gui/debugger.h b/gui/debugger.h index 6f06befdf1..4bac2e1f03 100644 --- a/gui/debugger.h +++ b/gui/debugger.h @@ -41,7 +41,7 @@ public: Debugger(); virtual ~Debugger(); - int DebugPrintf(const char *format, ...); + int DebugPrintf(const char *format, ...) GCC_PRINTF(2, 3); /** * The onFrame() method should be invoked by the engine at regular diff --git a/gui/launcher.cpp b/gui/launcher.cpp index 63d3ba6954..adbc418e87 100644 --- a/gui/launcher.cpp +++ b/gui/launcher.cpp @@ -341,7 +341,8 @@ void EditGameDialog::open() { e = ConfMan.hasKey("gfx_mode", _domain) || ConfMan.hasKey("render_mode", _domain) || ConfMan.hasKey("fullscreen", _domain) || - ConfMan.hasKey("aspect_ratio", _domain); + ConfMan.hasKey("aspect_ratio", _domain) || + ConfMan.hasKey("disable_dithering", _domain); _globalGraphicsOverride->setState(e); e = ConfMan.hasKey("music_driver", _domain) || @@ -922,7 +923,12 @@ void LauncherDialog::loadGame(int item) { gameId = _domains[item]; const EnginePlugin *plugin = 0; + +#if defined(ONE_PLUGIN_AT_A_TIME) && defined(DYNAMIC_MODULES) + EngineMan.findGameOnePluginAtATime(gameId, &plugin); +#else EngineMan.findGame(gameId, &plugin); +#endif String target = _domains[item]; target.toLowercase(); diff --git a/gui/options.cpp b/gui/options.cpp index e7888cf095..2562ed64fa 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -98,6 +98,7 @@ void OptionsDialog::init() { _renderModePopUp = 0; _fullscreenCheckbox = 0; _aspectCheckbox = 0; + _disableDitheringCheckbox = 0; _enableAudioSettings = false; _midiPopUp = 0; _oplPopUp = 0; @@ -192,6 +193,7 @@ void OptionsDialog::open() { // Aspect ratio setting _aspectCheckbox->setState(ConfMan.getBool("aspect_ratio", _domain)); #endif // SMALL_SCREEN_DEVICE + _disableDitheringCheckbox->setState(ConfMan.getBool("disable_dithering", _domain)); } // Audio options @@ -213,14 +215,8 @@ void OptionsDialog::open() { } if (_multiMidiCheckbox) { - if (!loadMusicDeviceSetting(_gmDevicePopUp, "gm_device")) { - if (_domain.equals(Common::ConfigManager::kApplicationDomain)) { - if (!loadMusicDeviceSetting(_gmDevicePopUp, Common::String(), MT_GM)) - _gmDevicePopUp->setSelected(0); - } else { - _gmDevicePopUp->setSelected(0); - } - } + if (!loadMusicDeviceSetting(_gmDevicePopUp, "gm_device")) + _gmDevicePopUp->setSelected(0); // Multi midi setting _multiMidiCheckbox->setState(ConfMan.getBool("multi_midi", _domain)); @@ -244,14 +240,8 @@ void OptionsDialog::open() { // MT-32 options if (_mt32DevicePopUp) { - if (!loadMusicDeviceSetting(_mt32DevicePopUp, "mt32_device")) { - if (_domain.equals(Common::ConfigManager::kApplicationDomain)) { - if (!loadMusicDeviceSetting(_mt32DevicePopUp, Common::String(), MT_MT32)) - _mt32DevicePopUp->setSelected(0); - } else { - _mt32DevicePopUp->setSelected(0); - } - } + if (!loadMusicDeviceSetting(_mt32DevicePopUp, "mt32_device")) + _mt32DevicePopUp->setSelected(0); // Native mt32 setting _mt32Checkbox->setState(ConfMan.getBool("native_mt32", _domain)); @@ -309,6 +299,7 @@ void OptionsDialog::close() { if (_enableGraphicSettings) { ConfMan.setBool("fullscreen", _fullscreenCheckbox->getState(), _domain); ConfMan.setBool("aspect_ratio", _aspectCheckbox->getState(), _domain); + ConfMan.setBool("disable_dithering", _disableDitheringCheckbox->getState(), _domain); bool isSet = false; @@ -332,6 +323,7 @@ void OptionsDialog::close() { } else { ConfMan.removeKey("fullscreen", _domain); ConfMan.removeKey("aspect_ratio", _domain); + ConfMan.removeKey("disable_dithering", _domain); ConfMan.removeKey("gfx_mode", _domain); ConfMan.removeKey("render_mode", _domain); } @@ -518,6 +510,7 @@ void OptionsDialog::setGraphicSettingsState(bool enabled) { _fullscreenCheckbox->setEnabled(enabled); _aspectCheckbox->setEnabled(enabled); #endif + _disableDitheringCheckbox->setEnabled(enabled); } void OptionsDialog::setAudioSettingsState(bool enabled) { @@ -657,6 +650,7 @@ void OptionsDialog::addGraphicControls(GuiObject *boss, const Common::String &pr // Aspect ratio checkbox _aspectCheckbox = new CheckboxWidget(boss, prefix + "grAspectCheckbox", _("Aspect ratio correction"), _("Correct aspect ratio for 320x200 games")); + _disableDitheringCheckbox = new CheckboxWidget(boss, prefix + "grDisableDitheringCheckbox", _("Disable EGA dithering"), _("Disable dithering in EGA games")); _enableGraphicSettings = true; } @@ -679,7 +673,7 @@ void OptionsDialog::addAudioControls(GuiObject *boss, const Common::String &pref const uint32 deviceGuiOption = MidiDriver::musicType2GUIO(d->getMusicType()); if ((_domain == Common::ConfigManager::kApplicationDomain && d->getMusicType() != MT_TOWNS // global dialog - skip useless FM-Towns, C64, Amiga, AppleIIGS options there - && d->getMusicType() != MT_C64 && d->getMusicType() != MT_AMIGA && d->getMusicType() != MT_APPLEIIGS) + && d->getMusicType() != MT_C64 && d->getMusicType() != MT_AMIGA && d->getMusicType() != MT_APPLEIIGS && d->getMusicType() != MT_PC98) || (_domain != Common::ConfigManager::kApplicationDomain && !(_guioptions & allFlags)) // No flags are specified || (_guioptions & deviceGuiOption) // flag is present // HACK/FIXME: For now we have to show GM devices, even when the game only has GUIO_MIDIMT32 set, @@ -719,13 +713,25 @@ void OptionsDialog::addMIDIControls(GuiObject *boss, const Common::String &prefi // Populate const MusicPlugin::List p = MusicMan.getPlugins(); + // Make sure the null device is the first one in the list to avoid undesired + // auto detection for users who don't have a saved setting yet. for (MusicPlugin::List::const_iterator m = p.begin(); m != p.end(); ++m) { MusicDevices i = (**m)->getDevices(); for (MusicDevices::iterator d = i.begin(); d != i.end(); ++d) { - if (d->getMusicType() >= MT_GM || d->getMusicDriverId() == "auto") { + if (d->getMusicDriverId() == "null") + _gmDevicePopUp->appendEntry(_("Don't use General MIDI music"), d->getHandle()); + } + } + // Now we add the other devices. + for (MusicPlugin::List::const_iterator m = p.begin(); m != p.end(); ++m) { + MusicDevices i = (**m)->getDevices(); + for (MusicDevices::iterator d = i.begin(); d != i.end(); ++d) { + if (d->getMusicType() >= MT_GM) { if (d->getMusicType() != MT_MT32) _gmDevicePopUp->appendEntry(d->getCompleteName(), d->getHandle()); - } + } else if (d->getMusicDriverId() == "auto") { + _gmDevicePopUp->appendEntry(_("Use first available device"), d->getHandle()); + } } } @@ -769,12 +775,23 @@ void OptionsDialog::addMT32Controls(GuiObject *boss, const Common::String &prefi _enableGSCheckbox = new CheckboxWidget(boss, prefix + "mcGSCheckbox", _("Enable Roland GS Mode"), _("Turns off General MIDI mapping for games with Roland MT-32 soundtrack")); const MusicPlugin::List p = MusicMan.getPlugins(); + // Make sure the null device is the first one in the list to avoid undesired + // auto detection for users who don't have a saved setting yet. + for (MusicPlugin::List::const_iterator m = p.begin(); m != p.end(); ++m) { + MusicDevices i = (**m)->getDevices(); + for (MusicDevices::iterator d = i.begin(); d != i.end(); ++d) { + if (d->getMusicDriverId() == "null") + _mt32DevicePopUp->appendEntry(_("Don't use Roland MT-32 music"), d->getHandle()); + } + } + // Now we add the other devices. for (MusicPlugin::List::const_iterator m = p.begin(); m != p.end(); ++m) { MusicDevices i = (**m)->getDevices(); for (MusicDevices::iterator d = i.begin(); d != i.end(); ++d) { - if (d->getMusicType() >= MT_GM || d->getMusicDriverId() == "auto") { + if (d->getMusicType() >= MT_GM) _mt32DevicePopUp->appendEntry(d->getCompleteName(), d->getHandle()); - } + else if (d->getMusicDriverId() == "auto") + _mt32DevicePopUp->appendEntry(_("Use first available device"), d->getHandle()); } } diff --git a/gui/options.h b/gui/options.h index c05f263d00..0d9ea117b3 100644 --- a/gui/options.h +++ b/gui/options.h @@ -96,6 +96,7 @@ private: PopUpWidget *_gfxPopUp; CheckboxWidget *_fullscreenCheckbox; CheckboxWidget *_aspectCheckbox; + CheckboxWidget *_disableDitheringCheckbox; StaticTextWidget *_renderModePopUpDesc; PopUpWidget *_renderModePopUp; diff --git a/gui/themes/default.inc b/gui/themes/default.inc index 46ac4a1365..363ab0bbe2 100644 --- a/gui/themes/default.inc +++ b/gui/themes/default.inc @@ -177,6 +177,9 @@ "<widget name='grFullscreenCheckbox' " "type='Checkbox' " "/> " +"<widget name='grDisableDitheringCheckbox' " +"type='Checkbox' " +"/> " "</layout> " "</dialog> " "<dialog name='GlobalOptions_Audio' overlays='Dialog.GlobalOptions.TabWidget'> " @@ -969,6 +972,9 @@ "<widget name='grFullscreenCheckbox' " "type='Checkbox' " "/> " +"<widget name='grDisableDitheringCheckbox' " +"type='Checkbox' " +"/> " "</layout> " "</dialog> " "<dialog name='GlobalOptions_Audio' overlays='Dialog.GlobalOptions.TabWidget'> " diff --git a/gui/themes/scummclassic.zip b/gui/themes/scummclassic.zip Binary files differindex 2507572e40..756b77d4b9 100644 --- a/gui/themes/scummclassic.zip +++ b/gui/themes/scummclassic.zip diff --git a/gui/themes/scummclassic/THEMERC b/gui/themes/scummclassic/THEMERC index c913ff6078..f0276969fe 100644 --- a/gui/themes/scummclassic/THEMERC +++ b/gui/themes/scummclassic/THEMERC @@ -1 +1 @@ -[SCUMMVM_STX0.8:ScummVM Classic Theme:No Author] +[SCUMMVM_STX0.8.2:ScummVM Classic Theme:No Author] diff --git a/gui/themes/scummclassic/classic_layout.stx b/gui/themes/scummclassic/classic_layout.stx index 74b8bf4b2c..7804a8c821 100644 --- a/gui/themes/scummclassic/classic_layout.stx +++ b/gui/themes/scummclassic/classic_layout.stx @@ -218,6 +218,9 @@ <widget name = 'grFullscreenCheckbox' type = 'Checkbox' /> + <widget name = 'grDisableDitheringCheckbox' + type = 'Checkbox' + /> </layout> </dialog> diff --git a/gui/themes/scummclassic/classic_layout_lowres.stx b/gui/themes/scummclassic/classic_layout_lowres.stx index 65083f4bce..419c388fc8 100644 --- a/gui/themes/scummclassic/classic_layout_lowres.stx +++ b/gui/themes/scummclassic/classic_layout_lowres.stx @@ -216,6 +216,9 @@ <widget name = 'grFullscreenCheckbox' type = 'Checkbox' /> + <widget name = 'grDisableDitheringCheckbox' + type = 'Checkbox' + /> </layout> </dialog> diff --git a/gui/themes/scummmodern.zip b/gui/themes/scummmodern.zip Binary files differindex 1023e82ff9..0a97511052 100644 --- a/gui/themes/scummmodern.zip +++ b/gui/themes/scummmodern.zip diff --git a/gui/themes/scummmodern/THEMERC b/gui/themes/scummmodern/THEMERC index 34495f71fa..b8f41fc207 100644 --- a/gui/themes/scummmodern/THEMERC +++ b/gui/themes/scummmodern/THEMERC @@ -1 +1 @@ -[SCUMMVM_STX0.8:ScummVM Modern Theme:No Author] +[SCUMMVM_STX0.8.2:ScummVM Modern Theme:No Author] diff --git a/gui/themes/scummmodern/scummmodern_layout.stx b/gui/themes/scummmodern/scummmodern_layout.stx index 51f1ce6c6f..c00d0c961c 100644 --- a/gui/themes/scummmodern/scummmodern_layout.stx +++ b/gui/themes/scummmodern/scummmodern_layout.stx @@ -233,6 +233,9 @@ <widget name = 'grFullscreenCheckbox' type = 'Checkbox' /> + <widget name = 'grDisableDitheringCheckbox' + type = 'Checkbox' + /> </layout> </dialog> diff --git a/gui/themes/scummmodern/scummmodern_layout_lowres.stx b/gui/themes/scummmodern/scummmodern_layout_lowres.stx index bd7b5fd8ea..e464c99011 100644 --- a/gui/themes/scummmodern/scummmodern_layout_lowres.stx +++ b/gui/themes/scummmodern/scummmodern_layout_lowres.stx @@ -214,6 +214,9 @@ <widget name = 'grFullscreenCheckbox' type = 'Checkbox' /> + <widget name = 'grDisableDitheringCheckbox' + type = 'Checkbox' + /> </layout> </dialog> |
