diff options
author | Willem Jan Palenstijn | 2015-07-22 22:37:40 +0200 |
---|---|---|
committer | Willem Jan Palenstijn | 2015-07-22 22:43:42 +0200 |
commit | 6ec9c81b575f13b2c4b30aeac592ebf2557b5890 (patch) | |
tree | 503d50902bad2d800165593039d08d5ccf0c98ab /gui | |
parent | 5ec05f6b647c5ea41418be7ed19ad381f97cabd8 (diff) | |
parent | 4e5c8d35f7e133e2e72a846fdbd54900c91eeb73 (diff) | |
download | scummvm-rg350-6ec9c81b575f13b2c4b30aeac592ebf2557b5890.tar.gz scummvm-rg350-6ec9c81b575f13b2c4b30aeac592ebf2557b5890.tar.bz2 scummvm-rg350-6ec9c81b575f13b2c4b30aeac592ebf2557b5890.zip |
Merge branch 'master' into mm
Conflicts:
engines/access/access.cpp
engines/access/asurface.h
engines/access/bubble_box.cpp
engines/access/bubble_box.h
engines/access/martian/martian_game.cpp
engines/access/player.cpp
engines/access/player.h
engines/access/resources.cpp
engines/access/screen.cpp
engines/access/screen.h
engines/access/sound.cpp
engines/access/sound.h
Diffstat (limited to 'gui')
-rw-r--r-- | gui/Tooltip.cpp | 2 | ||||
-rw-r--r-- | gui/Tooltip.h | 33 | ||||
-rw-r--r-- | gui/about.cpp | 2 | ||||
-rw-r--r-- | gui/credits.h | 21 | ||||
-rw-r--r-- | gui/debugger.cpp | 56 | ||||
-rw-r--r-- | gui/dialog.cpp | 2 | ||||
-rw-r--r-- | gui/launcher.cpp | 4 | ||||
-rw-r--r-- | gui/options.cpp | 6 | ||||
-rw-r--r-- | gui/saveload-dialog.cpp | 17 | ||||
-rw-r--r-- | gui/themes/translations.dat | bin | 470115 -> 466386 bytes |
10 files changed, 108 insertions, 35 deletions
diff --git a/gui/Tooltip.cpp b/gui/Tooltip.cpp index e5f06bcafe..ba313ee34f 100644 --- a/gui/Tooltip.cpp +++ b/gui/Tooltip.cpp @@ -40,6 +40,8 @@ Tooltip::Tooltip() : void Tooltip::setup(Dialog *parent, Widget *widget, int x, int y) { assert(widget->hasTooltip()); + _parent = parent; + _maxWidth = g_gui.xmlEval()->getVar("Globals.Tooltip.MaxWidth", 100); _xdelta = g_gui.xmlEval()->getVar("Globals.Tooltip.XDelta", 0); _ydelta = g_gui.xmlEval()->getVar("Globals.Tooltip.YDelta", 0); diff --git a/gui/Tooltip.h b/gui/Tooltip.h index f83fc40966..58b6d8a429 100644 --- a/gui/Tooltip.h +++ b/gui/Tooltip.h @@ -32,6 +32,9 @@ namespace GUI { class Widget; class Tooltip : public Dialog { +private: + Dialog *_parent; + public: Tooltip(); @@ -39,12 +42,30 @@ public: void drawDialog(); protected: - virtual void handleMouseDown(int x, int y, int button, int clickCount) { close(); } - virtual void handleMouseUp(int x, int y, int button, int clickCount) { close(); } - virtual void handleMouseWheel(int x, int y, int direction) { close(); } - virtual void handleKeyDown(Common::KeyState state) { close(); } - virtual void handleKeyUp(Common::KeyState state) { close(); } - virtual void handleMouseMoved(int x, int y, int button) { close(); } + virtual void handleMouseDown(int x, int y, int button, int clickCount) { + close(); + _parent->handleMouseDown(x + (getAbsX() - _parent->getAbsX()), y + (getAbsY() - _parent->getAbsY()), button, clickCount); + } + virtual void handleMouseUp(int x, int y, int button, int clickCount) { + close(); + _parent->handleMouseUp(x + (getAbsX() - _parent->getAbsX()), y + (getAbsY() - _parent->getAbsY()), button, clickCount); + } + virtual void handleMouseWheel(int x, int y, int direction) { + close(); + _parent->handleMouseWheel(x + (getAbsX() - _parent->getAbsX()), y + (getAbsX() - _parent->getAbsX()), direction); + } + virtual void handleKeyDown(Common::KeyState state) { + close(); + _parent->handleKeyDown(state); + } + virtual void handleKeyUp(Common::KeyState state) { + close(); + _parent->handleKeyUp(state); + } + virtual void handleMouseMoved(int x, int y, int button) { + close(); + _parent->handleMouseMoved(x + (getAbsX() - _parent->getAbsX()), y + (getAbsY() - _parent->getAbsY()), button); + } int _maxWidth; int _xdelta, _ydelta; diff --git a/gui/about.cpp b/gui/about.cpp index b25efc1cd0..daec2b7e48 100644 --- a/gui/about.cpp +++ b/gui/about.cpp @@ -57,7 +57,7 @@ enum { static const char *copyright_text[] = { "", -"C0""Copyright (C) 2001-2014 The ScummVM Team", +"C0""Copyright (C) 2001-2015 The ScummVM Team", "C0""http://www.scummvm.org", "", "C0""ScummVM is the legal property of its developers, whose names are too numerous to list here. Please refer to the COPYRIGHT file distributed with this binary.", diff --git a/gui/credits.h b/gui/credits.h index 5b33797a63..7ae12bf599 100644 --- a/gui/credits.h +++ b/gui/credits.h @@ -322,8 +322,10 @@ static const char *credits[] = { "C0""Einar Johan T. S\370m\345en", "C0""Tobia Tesan", "", -"C1""ZVision", +"C1""Z-Vision", "C0""Adrian Astley", +"C0""Filippos Karapetis", +"C0""Anton Yarcev", "", "", "C1""Backend Teams", @@ -580,7 +582,6 @@ static const char *credits[] = { "C1""German", "C0""Simon Sawatzki", "C0""Lothar Serra Mari", -"C2""(retired)", "", "C1""Hungarian", "C0""Alex Bevilacqua", @@ -630,6 +631,18 @@ static const char *credits[] = { "C0""Alejandro G\363mez de la Mu\361oza", "C2""Soltys Spanish translation", "", +"C1""CGE2", +"A0""Arnaud Boutonne", +"C0""Arnaud Boutonn\351", +"C2""Sfinx English translation", +"C0""Thierry Crozat", +"C2""Sfinx English translation", +"A0""Peter Bozso", +"C0""Peter Bozs\363", +"C2""Sfinx English translation editor", +"C0""Ryan Clark", +"C2""Sfinx English translation editor", +"", "C1""Drascula", "C0""Thierry Crozat", "C2""Improve French translation", @@ -680,6 +693,8 @@ static const char *credits[] = { "C2""Several Pegasus Prime patches", "C0""Andreas Karlsson", "C2""Initial port for SymbianOS", +"C0""Stefan Kristiansson", +"C2""Initial work on SDL2 support", "C0""Claudio Matsuoka", "C2""Daily Linux builds", "C0""Thomas Mayer", @@ -830,7 +845,7 @@ static const char *credits[] = { "C0""James Woodcock", "C2""Soundtrack enhancements", "C0""Anton Yartsev", -"C2""For the original re-implementation of the ZVision engine", +"C2""For the original re-implementation of the Z-Vision engine", "C0""Tony Warriner and everyone at Revolution Software Ltd. for sharing with us the source of some of their brilliant games, allowing us to release Beneath a Steel Sky as freeware... and generally being supportive above and beyond the call of duty.", "C0""", "C0""John Passfield and Steve Stamatiadis for sharing the source of their classic title, Flight of the Amazon Queen and also being incredibly supportive.", diff --git a/gui/debugger.cpp b/gui/debugger.cpp index 216bd626fe..466681e89d 100644 --- a/gui/debugger.cpp +++ b/gui/debugger.cpp @@ -522,11 +522,25 @@ struct ArchiveMemberLess { bool Debugger::cmdMd5(int argc, const char **argv) { if (argc < 2) { - debugPrintf("md5 <filename | pattern>\n"); + debugPrintf("md5 [-n length] <filename | pattern>\n"); } else { + uint32 length = 0; + uint paramOffset = 0; + + // If the user supplied an -n parameter, set the bytes to read + if (!strcmp(argv[1], "-n")) { + // Make sure that we have at least two more parameters + if (argc < 4) { + debugPrintf("md5 [-n length] <filename | pattern>\n"); + return true; + } + length = atoi(argv[2]); + paramOffset = 2; + } + // Assume that spaces are part of a single filename. - Common::String filename = argv[1]; - for (int i = 2; i < argc; i++) { + Common::String filename = argv[1 + paramOffset]; + for (int i = 2 + paramOffset; i < argc; i++) { filename = filename + " " + argv[i]; } Common::ArchiveMemberList list; @@ -536,9 +550,9 @@ bool Debugger::cmdMd5(int argc, const char **argv) { } else { sort(list.begin(), list.end(), ArchiveMemberLess()); for (Common::ArchiveMemberList::iterator iter = list.begin(); iter != list.end(); ++iter) { - Common::ReadStream *stream = (*iter)->createReadStream(); - Common::String md5 = Common::computeStreamMD5AsString(*stream, 0); - debugPrintf("%s %s\n", md5.c_str(), (*iter)->getDisplayName().c_str()); + Common::SeekableReadStream *stream = (*iter)->createReadStream(); + Common::String md5 = Common::computeStreamMD5AsString(*stream, length); + debugPrintf("%s %s %d\n", md5.c_str(), (*iter)->getDisplayName().c_str(), stream->size()); delete stream; } } @@ -548,11 +562,25 @@ bool Debugger::cmdMd5(int argc, const char **argv) { bool Debugger::cmdMd5Mac(int argc, const char **argv) { if (argc < 2) { - debugPrintf("md5mac <base filename>\n"); + debugPrintf("md5mac [-n length] <base filename>\n"); } else { + uint32 length = 0; + uint paramOffset = 0; + + // If the user supplied an -n parameter, set the bytes to read + if (!strcmp(argv[1], "-n")) { + // Make sure that we have at least two more parameters + if (argc < 4) { + debugPrintf("md5mac [-n length] <base filename>\n"); + return true; + } + length = atoi(argv[2]); + paramOffset = 2; + } + // Assume that spaces are part of a single filename. - Common::String filename = argv[1]; - for (int i = 2; i < argc; i++) { + Common::String filename = argv[1 + paramOffset]; + for (int i = 2 + paramOffset; i < argc; i++) { filename = filename + " " + argv[i]; } Common::MacResManager macResMan; @@ -568,13 +596,13 @@ bool Debugger::cmdMd5Mac(int argc, const char **argv) { } else { // The resource fork is probably the most relevant one. if (macResMan.hasResFork()) { - Common::String md5 = macResMan.computeResForkMD5AsString(0); - debugPrintf("%s %s (resource)\n", md5.c_str(), macResMan.getBaseFileName().c_str()); + Common::String md5 = macResMan.computeResForkMD5AsString(length); + debugPrintf("%s %s (resource) %d\n", md5.c_str(), macResMan.getBaseFileName().c_str(), macResMan.getResForkDataSize()); } if (macResMan.hasDataFork()) { - Common::ReadStream *stream = macResMan.getDataFork(); - Common::String md5 = Common::computeStreamMD5AsString(*stream, 0); - debugPrintf("%s %s (data)\n", md5.c_str(), macResMan.getBaseFileName().c_str()); + Common::SeekableReadStream *stream = macResMan.getDataFork(); + Common::String md5 = Common::computeStreamMD5AsString(*stream, length); + debugPrintf("%s %s (data) %d\n", md5.c_str(), macResMan.getBaseFileName().c_str(), stream->size()); } } macResMan.close(); diff --git a/gui/dialog.cpp b/gui/dialog.cpp index fa4e508494..315c24e9bf 100644 --- a/gui/dialog.cpp +++ b/gui/dialog.cpp @@ -219,7 +219,7 @@ void Dialog::handleMouseWheel(int x, int y, int direction) { if (!w) w = _focusedWidget; if (w) - w->handleMouseWheel(x, y, direction); + w->handleMouseWheel(x - (w->getAbsX() - _x), y - (w->getAbsY() - _y), direction); } void Dialog::handleKeyDown(Common::KeyState state) { diff --git a/gui/launcher.cpp b/gui/launcher.cpp index 4496c11a3d..5abf0aba26 100644 --- a/gui/launcher.cpp +++ b/gui/launcher.cpp @@ -1156,9 +1156,9 @@ void LauncherDialog::updateButtons() { _loadButton->setEnabled(en); _loadButton->draw(); } - switchButtonsText(_addButton, "~A~dd Game...", "Mass Add..."); + switchButtonsText(_addButton, "~A~dd Game...", _s("Mass Add...")); #ifdef ENABLE_EVENTRECORDER - switchButtonsText(_loadButton, "~L~oad...", "Record..."); + switchButtonsText(_loadButton, "~L~oad...", _s("Record...")); #endif } diff --git a/gui/options.cpp b/gui/options.cpp index 726b89d437..ba247e5f15 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -445,11 +445,9 @@ void OptionsDialog::close() { if (_oplPopUp) { if (_enableAudioSettings) { - const OPL::Config::EmulatorDescription *ed = OPL::Config::getAvailable(); - while (ed->name && ed->id != (int)_oplPopUp->getSelectedTag()) - ++ed; + const OPL::Config::EmulatorDescription *ed = OPL::Config::findDriver(_oplPopUp->getSelectedTag()); - if (ed->name) + if (ed) ConfMan.set("opl_driver", ed->name, _domain); else ConfMan.removeKey("opl_driver", _domain); diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp index 339ec95c50..a333c5fe57 100644 --- a/gui/saveload-dialog.cpp +++ b/gui/saveload-dialog.cpp @@ -654,16 +654,25 @@ void SaveLoadChooserGrid::open() { // In case there was a gap found use the slot. if (lastSlot + 1 < curSlot) { - _nextFreeSaveSlot = lastSlot + 1; - break; + // Check that the save slot can be used for user saves. + SaveStateDescriptor desc = _metaEngine->querySaveMetaInfos(_target.c_str(), lastSlot + 1); + if (!desc.getWriteProtectedFlag()) { + _nextFreeSaveSlot = lastSlot + 1; + break; + } } lastSlot = curSlot; } // Use the next available slot otherwise. - if (_nextFreeSaveSlot == -1 && lastSlot + 1 < _metaEngine->getMaximumSaveSlot()) { - _nextFreeSaveSlot = lastSlot + 1; + const int maxSlot = _metaEngine->getMaximumSaveSlot(); + for (int i = lastSlot; _nextFreeSaveSlot == -1 && i < maxSlot; ++i) { + // Check that the save slot can be used for user saves. + SaveStateDescriptor desc = _metaEngine->querySaveMetaInfos(_target.c_str(), i + 1); + if (!desc.getWriteProtectedFlag()) { + _nextFreeSaveSlot = i + 1; + } } } diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat Binary files differindex bfa33d4feb..b93ee09287 100644 --- a/gui/themes/translations.dat +++ b/gui/themes/translations.dat |