From bb1df52da8be0322d5f04ddd371dc3c68eb3812a Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Sun, 21 Dec 2014 18:26:40 +0000 Subject: CREDITS: Add credits for Sfinx translation to English --- gui/credits.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'gui') diff --git a/gui/credits.h b/gui/credits.h index 5b33797a63..0610609983 100644 --- a/gui/credits.h +++ b/gui/credits.h @@ -630,6 +630,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", -- cgit v1.2.3 From 192c3df6a1b65a5e08b5fd0e2a82792393240378 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 27 Dec 2014 02:20:51 +0200 Subject: CREDITS: Update the credits for the ZVISION engine --- gui/credits.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gui') diff --git a/gui/credits.h b/gui/credits.h index 0610609983..c7d9199db9 100644 --- a/gui/credits.h +++ b/gui/credits.h @@ -324,6 +324,8 @@ static const char *credits[] = { "", "C1""ZVision", "C0""Adrian Astley", +"C0""Filippos Karapetis", +"C0""Anton Yarcev", "", "", "C1""Backend Teams", -- cgit v1.2.3 From dd347dec83e0d074585cdfd99aa93a17da94ccd4 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 28 Dec 2014 16:57:00 +0200 Subject: DEBUGGER: Extend the md5 and md5mac commands to handle any chunk length This will be useful in matching the MD5 checksums with what the advanced detector returns --- gui/debugger.cpp | 56 ++++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 42 insertions(+), 14 deletions(-) (limited to 'gui') 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 \n"); + debugPrintf("md5 [-n length] \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] \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 \n"); + debugPrintf("md5mac [-n length] \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] \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(); -- cgit v1.2.3 From bbfff93c6455247d9875003cdfd18c09d0c30e0f Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 29 Dec 2014 14:56:02 +0100 Subject: GUI: Do not overwrite write protected saves in grid based save dialog. This fixes overwriting of, for example, autosaves in the grid based save load dialog when using "New Save". --- gui/saveload-dialog.cpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'gui') 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; + } } } -- cgit v1.2.3 From 124459784987ece0088e829d3ce354997e9d6bb6 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Sun, 18 Jan 2015 02:24:25 +0000 Subject: JANITORIAL: Update copyright year --- gui/about.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gui') 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.", -- cgit v1.2.3 From b5ac3ecb1f25b2d47fd99a3c4fd3b1cddcb695c6 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 5 Mar 2015 01:08:02 +0100 Subject: CREDITS: Mention skristiansson for his initial SDL2 support work. --- gui/credits.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gui') diff --git a/gui/credits.h b/gui/credits.h index c7d9199db9..12e75b01fc 100644 --- a/gui/credits.h +++ b/gui/credits.h @@ -694,6 +694,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", -- cgit v1.2.3 From 16ba21259b2aaf3b9ee9acae2e0aba95df1dea36 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Sat, 21 Mar 2015 17:35:47 +0100 Subject: GUI: Adjust x and y to handleMouseWheel() for consistency This means x and y has the same meaning as in the other handlers, e.g. handleMouseUp(). Though as far as I can tell, these coordinates aren't actually used anywhere at the moment. --- gui/dialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gui') 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) { -- cgit v1.2.3 From c37d4af516b65771b1580ac8cbb03759d04f00c2 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Sat, 21 Mar 2015 17:41:44 +0100 Subject: GUI: Fix bug #6813, "GUI: Tooltips eat keypresses" The tooltip isn't really interested in any keyboard and mouse events, other than as a signal to close itself, so pass them back to the parent dialog. From what I understand, the tooltip isn't part of the dialog, so there should be no risk of going into an infinite loop here. --- gui/Tooltip.cpp | 2 ++ gui/Tooltip.h | 33 +++++++++++++++++++++++++++------ 2 files changed, 29 insertions(+), 6 deletions(-) (limited to 'gui') 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; -- cgit v1.2.3 From 22dbf00e33a72810cf47daa3f4ed4f356f549313 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Thu, 25 Jun 2015 21:37:09 +0100 Subject: GUI: Mark "Mass Add..." and "Record..." for translation. --- gui/launcher.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gui') 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 } -- cgit v1.2.3 From 66fb4b828ba841b47b3e0cd4e15e00107744f691 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Thu, 25 Jun 2015 21:39:18 +0100 Subject: I18N: Synchronize translation template file with current code --- gui/themes/translations.dat | Bin 470115 -> 462718 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'gui') diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat index bfa33d4feb..d470a4c65d 100644 Binary files a/gui/themes/translations.dat and b/gui/themes/translations.dat differ -- cgit v1.2.3 From fd8ac7ea79441b5c4a85234e2e875444d47f3f79 Mon Sep 17 00:00:00 2001 From: David Russo Date: Sat, 16 May 2015 19:24:31 +0100 Subject: ZVISION: Change mentions of ZVision to Z-Vision To match official documentation (e.g. game manual, credits). --- gui/credits.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gui') diff --git a/gui/credits.h b/gui/credits.h index 12e75b01fc..5b1607a3e5 100644 --- a/gui/credits.h +++ b/gui/credits.h @@ -322,7 +322,7 @@ 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", @@ -846,7 +846,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.", -- cgit v1.2.3 From 2fa1ce51dd3cb00eef289094fe9f660c237254bc Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 20 May 2015 00:21:45 +0200 Subject: GUI: Simplify OPL option code a bit. --- gui/options.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'gui') 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); -- cgit v1.2.3 From c46f0d2b70e95d37f82acb16f2f31ba771b051e9 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Sun, 12 Jul 2015 13:59:20 +0100 Subject: CREDITS: Update credits (run 'make credits') --- gui/credits.h | 1 - 1 file changed, 1 deletion(-) (limited to 'gui') diff --git a/gui/credits.h b/gui/credits.h index 5b1607a3e5..7ae12bf599 100644 --- a/gui/credits.h +++ b/gui/credits.h @@ -582,7 +582,6 @@ static const char *credits[] = { "C1""German", "C0""Simon Sawatzki", "C0""Lothar Serra Mari", -"C2""(retired)", "", "C1""Hungarian", "C0""Alex Bevilacqua", -- cgit v1.2.3 From 4261e07995c4f8649604e9f31d97a1effb99b294 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Sun, 12 Jul 2015 14:14:26 +0100 Subject: I18N: Regenerate translations data file --- gui/themes/translations.dat | Bin 462718 -> 466386 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'gui') diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat index d470a4c65d..b93ee09287 100644 Binary files a/gui/themes/translations.dat and b/gui/themes/translations.dat differ -- cgit v1.2.3