aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
Diffstat (limited to 'gui')
-rw-r--r--gui/ListWidget.cpp12
-rw-r--r--gui/ScrollBarWidget.cpp4
-rw-r--r--gui/ThemeEngine.h2
-rw-r--r--gui/browser.cpp2
-rw-r--r--gui/credits.h245
-rw-r--r--gui/debugger.cpp95
-rw-r--r--gui/debugger.h13
-rw-r--r--gui/options.cpp4
-rw-r--r--gui/themes/default.inc14
-rw-r--r--gui/themes/scummclassic.zipbin53307 -> 53291 bytes
-rw-r--r--gui/themes/scummclassic/THEMERC2
-rw-r--r--gui/themes/scummclassic/classic_layout.stx2
-rw-r--r--gui/themes/scummclassic/classic_layout_lowres.stx12
-rw-r--r--gui/themes/scummmodern.zipbin157995 -> 157979 bytes
-rw-r--r--gui/themes/scummmodern/THEMERC2
-rw-r--r--gui/themes/scummmodern/scummmodern_layout.stx2
-rw-r--r--gui/themes/scummmodern/scummmodern_layout_lowres.stx12
17 files changed, 262 insertions, 161 deletions
diff --git a/gui/ListWidget.cpp b/gui/ListWidget.cpp
index 3d4c10859f..7551acac48 100644
--- a/gui/ListWidget.cpp
+++ b/gui/ListWidget.cpp
@@ -24,6 +24,8 @@
#include "common/system.h"
#include "common/events.h"
+#include "common/frac.h"
+
#include "gui/ListWidget.h"
#include "gui/ScrollBarWidget.h"
#include "gui/dialog.h"
@@ -538,13 +540,15 @@ void ListWidget::reflowLayout() {
// of the list.
// We do a rough rounding on the decimal places of Entries Per Page,
// to add another entry even if it goes a tad over the padding.
- _entriesPerPage = ((_h - _topPadding - _bottomPadding) << 16) / kLineHeight;
+ frac_t entriesPerPage = intToFrac(_h - _topPadding - _bottomPadding) / kLineHeight;
- if ((uint)(_entriesPerPage & 0xFFFF) >= 0xF000)
- _entriesPerPage += (1 << 16);
+ // Our threshold before we add another entry is 0.9375 (0xF000 with FRAC_BITS being 16).
+ const frac_t threshold = intToFrac(15) / 16;
- _entriesPerPage >>= 16;
+ if ((frac_t)(entriesPerPage & FRAC_LO_MASK) >= threshold)
+ entriesPerPage += FRAC_ONE;
+ _entriesPerPage = fracToInt(entriesPerPage);
assert(_entriesPerPage > 0);
delete[] _textWidth;
diff --git a/gui/ScrollBarWidget.cpp b/gui/ScrollBarWidget.cpp
index 6e27535bfd..f6b36b3aa0 100644
--- a/gui/ScrollBarWidget.cpp
+++ b/gui/ScrollBarWidget.cpp
@@ -63,9 +63,9 @@ void ScrollBarWidget::handleMouseDown(int x, int y, int button, int clickCount)
_currentPos++;
_draggingPart = kDownArrowPart;
} else if (y < _sliderPos) {
- _currentPos -= _entriesPerPage;
+ _currentPos -= _entriesPerPage - 1;
} else if (y >= _sliderPos + _sliderHeight) {
- _currentPos += _entriesPerPage;
+ _currentPos += _entriesPerPage - 1;
} else {
_draggingPart = kSliderPart;
_sliderDeltaMouseDownPos = y - _sliderPos;
diff --git a/gui/ThemeEngine.h b/gui/ThemeEngine.h
index c5758392a7..d7527b61dd 100644
--- a/gui/ThemeEngine.h
+++ b/gui/ThemeEngine.h
@@ -32,7 +32,7 @@
#include "graphics/surface.h"
#include "graphics/fontman.h"
-#define SCUMMVM_THEME_VERSION_STR "SCUMMVM_STX0.5"
+#define SCUMMVM_THEME_VERSION_STR "SCUMMVM_STX0.6"
namespace Graphics {
struct DrawStep;
diff --git a/gui/browser.cpp b/gui/browser.cpp
index 48382e880b..f4719f4850 100644
--- a/gui/browser.cpp
+++ b/gui/browser.cpp
@@ -43,7 +43,7 @@ enum {
*/
BrowserDialog::BrowserDialog(const char *title, bool dirBrowser)
- : Dialog("browser") {
+ : Dialog("Browser") {
_titleRef = CFStringCreateWithCString(0, title, CFStringGetSystemEncoding());
_isDirBrowser = dirBrowser;
}
diff --git a/gui/credits.h b/gui/credits.h
index 172d44603d..5ddae4ea37 100644
--- a/gui/credits.h
+++ b/gui/credits.h
@@ -16,6 +16,12 @@ static const char *credits[] = {
"C1""Engine Teams",
"C1""SCUMM",
"C0""Torbj\366rn Andersson",
+"C0""James Brown",
+"C2""(retired)",
+"C0""Jonathan Gray",
+"C2""(retired)",
+"C0""Vincent Hamm",
+"C2""(retired)",
"C0""Max Horn",
"C0""Travis Howell",
"C0""Pawel Kolodziejski",
@@ -23,8 +29,12 @@ static const char *credits[] = {
"C0""Gregory Montoir",
"C0""Eugene Sandulenko",
"C2""FT INSANE, MM NES, MM C64, game detection, Herc/CGA",
+"C0""Ludvig Strigeus",
+"C2""(retired)",
"",
"C1""HE",
+"C0""Jonathan Gray",
+"C2""(retired)",
"C0""Travis Howell",
"C0""Gregory Montoir",
"C0""Eugene Sandulenko",
@@ -37,44 +47,65 @@ static const char *credits[] = {
"C0""Walter van Niftrik",
"C0""Kari Salminen",
"C0""Eugene Sandulenko",
+"C0""David Symonds",
+"C2""(retired)",
"",
"C1""AGOS",
"C0""Torbj\366rn Andersson",
"C0""Paul Gilbert",
"C0""Travis Howell",
+"C0""Oliver Kiehl",
+"C2""(retired)",
+"C0""Ludvig Strigeus",
+"C2""(retired)",
"",
"C1""BASS",
+"C0""Robert G\366ffringmann",
+"C2""(retired)",
+"C0""Oliver Kiehl",
+"C2""(retired)",
"C0""Joost Peters",
"",
"C1""Broken Sword 1",
+"C0""Fabio Battaglia",
+"C2""PSX version support",
+"C0""Robert G\366ffringmann",
+"C2""(retired)",
"",
"C1""Broken Sword 2",
"C0""Torbj\366rn Andersson",
+"C0""Fabio Battaglia",
+"C2""PSX version support",
+"C0""Jonathan Gray",
+"C2""(retired)",
"",
"C1""Cinematique evo 1",
"C0""Vincent Hamm",
-"C2""original CinE engine author",
+"C2""(retired)",
"C0""Pawel Kolodziejski",
"C0""Gregory Montoir",
+"C0""Kari Salminen",
"C0""Eugene Sandulenko",
"",
"C1""Cinematique evo 2",
-"C0""Vincent Hamm",
-"C2""original CruisE engine author",
"C0""Paul Gilbert",
+"C0""Vincent Hamm",
+"C2""(retired)",
"",
"C1""Drascula",
"C0""Filippos Karapetis",
"C0""Pawel Kolodziejski",
"",
"C1""FOTAQ",
+"C0""David Eriksson",
+"C2""(retired)",
"C0""Gregory Montoir",
"C0""Joost Peters",
"",
"C1""Gob",
"C0""Torbj\366rn Andersson",
+"C0""Arnaud Boutonn\351",
"C0""Sven Hesse",
-"C0""Willem Jan Palenstijn",
"C0""Eugene Sandulenko",
"",
"C1""Groovie",
@@ -108,7 +139,6 @@ static const char *credits[] = {
"",
"C1""SAGA",
"C0""Torbj\366rn Andersson",
-"C0""Sven Hesse",
"C0""Filippos Karapetis",
"C0""Andrew Kurushin",
"C0""Eugene Sandulenko",
@@ -119,11 +149,14 @@ static const char *credits[] = {
"C0""Max Horn",
"C0""Filippos Karapetis",
"C0""Walter van Niftrik",
+"C0""Willem Jan Palenstijn",
"C0""Jordi Vilalta Prat",
"C0""Lars Skovlund",
"",
"C1""Tinsel",
"C0""Torbj\366rn Andersson",
+"C0""Fabio Battaglia",
+"C2""PSX version support",
"C0""Paul Gilbert",
"C0""Sven Hesse",
"C0""Max Horn",
@@ -157,9 +190,13 @@ static const char *credits[] = {
"C0""Chris Apers",
"",
"C1""PocketPC / WinCE",
+"C0""Nicolas Bacca",
+"C2""(retired)",
"C0""Kostas Nakos",
"",
"C1""PlayStation 2",
+"C0""Robert G\366ffringmann",
+"C2""(retired)",
"C0""Max Lingua",
"",
"C1""PSP (PlayStation Portable)",
@@ -185,22 +222,28 @@ static const char *credits[] = {
"C0""Eugene Sandulenko",
"",
"C1""GUI",
+"C0""Vicent Marti",
"C0""Eugene Sandulenko",
"C0""Johannes Schickel",
"",
"C1""Miscellaneous",
"C0""David Corrales-Lopez",
-"C2""Filesystem access improvements (GSoC 2007 task)",
+"C2""Filesystem access improvements (GSoC 2007 task) (retired)",
"C0""Jerome Fisher",
-"C2""MT-32 emulator",
+"C2""MT-32 emulator (retired)",
+"C0""Benjamin Haisch",
+"C2""Heavily improved de-/encoder for DXA videos",
"C0""Jochen Hoenicke",
-"C2""Speaker & PCjr sound support, AdLib work",
+"C2""Speaker & PCjr sound support, AdLib work (retired)",
"C0""Chris Page",
-"C2""Return to launcher, savestate improvements, leak fixes, ... (GSoC 2008 task)",
+"C2""Return to launcher, savestate improvements, leak fixes, ... (GSoC 2008 task) (retired)",
"C0""Robin Watts",
"C2""ARM assembly routines for nice speedups on several ports; improvements to the sound mixer",
"",
"",
+"C1""Website (code)",
+"C0""Fredrik Wendel",
+"",
"C1""Website (content)",
"C0""All active team members",
"C0""",
@@ -211,126 +254,34 @@ static const char *credits[] = {
"C0""Matthew Hoops",
"C2""Wiki editor",
"",
-"C1""FreeSCI Contributors",
-"C0""Anders Baden Nielsen",
-"C2""PPC testing",
-"C0""Bas Zoetekouw",
-"C2""Man pages, debian package management, CVS maintenance",
-"C0""Carl Muckenhoupt",
-"C2""Sources to the SCI resource viewer tools that started it all",
-"C0""Chris Kehler",
-"C2""Makefile enhancements",
-"C0""Christoph Reichenbach",
-"C2""UN*X code, VM/Graphics/Sound/other infrastructure",
-"C0""Christopher T. Lansdown",
-"C2""Original CVS maintainer, Alpha compatibility fixes",
-"C0""Claudio Matsuoka",
-"C2""CVS snapshots, daily builds, BeOS and cygwin ports",
-"C0""Dark Minister",
-"C2""SCI research (bytecode and parser)",
-"C0""Dmitry Jemerov",
-"C2""Port to the Win32 platform, numerous bugfixes",
-"C0""Emmanuel Jeandel",
-"C2""Bugfixes and bug reports",
-"C0""Francois-R Boyer",
-"C2""MT-32 information and mapping code",
-"C0""George Reid",
-"C2""FreeBSD package management",
-"C0""Hubert Maier",
-"C2""AmigaOS 4 port",
-"C0""Hugues Valois",
-"C2""Game selection menu",
-"C0""Johannes Manhave",
-"C2""Document format translation",
-"C0""Jordi Vilalta",
-"C2""Numerous code and website clean-up patches",
-"C0""Lars Skovlund",
-"C2""Project maintenance, most documentation, bugfixes, SCI1 support",
-"C0""Magnus Reftel",
-"C2""Heap implementation, Python class viewer, bugfixes",
-"C0""Matt Hargett",
-"C2""Clean-ups, bugfixes, Hardcore QA, Win32",
-"C0""Max Horn",
-"C2""SetJump implementation",
-"C0""Paul David Doherty",
-"C2""Game version information",
-"C0""Petr Vyhnak",
-"C2""The DCL-INFLATE algorithm, many Win32 improvements",
-"C0""Rainer Canavan",
-"C2""IRIX MIDI driver and bug fixes",
-"C0""Rainer De Temple",
-"C2""SCI research",
-"C0""Ravi I.",
-"C2""SCI0 sound resource specification",
-"C0""Ruediger Hanke",
-"C2""Port to the MorphOS platform",
-"C0""Rune Orsval",
-"C2""Configuration file editor",
-"C0""Rickard Lind",
-"C2""MT32->GM MIDI mapping magic, sound research",
-"C0""Rink Springer",
-"C2""Port to the DOS platform, several bug fixes",
-"C0""Robey Pointer",
-"C2""Bug tracking system hosting",
-"C0""Sergey Lapin",
-"C2""Port of Carl's type 2 decompression code",
-"C0""Solomon Peachy",
-"C2""SDL ports and much of the sound subsystem",
-"C0""Vyacheslav Dikonov",
-"C2""Config script improvements",
-"C0""Walter van Niftrik",
-"C2""Ports to the Dreamcast and GP32 platforms",
-"C0""Xiaojun Chen",
-"C0""Sean Terrell",
-"C0""Special thanks to Prof. Dr. Gary Nutt for allowing the FreeSCI VM extension as a course project in his Advanced OS course",
-"C0""",
-"C0""Special thanks to Bob Heitman and Corey Cole for their support of FreeSCI",
-"C0""",
-"",
"C1""Retired Team Members",
-"C0""Tore Anderson",
-"C2""Former Debian GNU/Linux maintainer",
-"C0""Nicolas Bacca",
-"C2""Former WinCE porter",
"C0""Ralph Brorsen",
"C2""Help with GUI implementation",
"C0""Jamieson Christian",
"C2""iMUSE, MIDI, all things musical",
-"C0""David Eriksson",
-"C2""Engines: FOTAQ",
-"C0""Hans-J\366rg Frieden",
-"C2""Former AmigaOS 4 packager",
-"C0""Robert G\366ffringmann",
-"C2""Original PS2 porter; Engines: BASS, BS1",
-"C0""Jonathan Gray",
-"C2""Engines: SCUMM, HE, BS2",
-"C0""R\374diger Hanke",
-"C2""Port: MorphOS",
"C0""Felix Jakschitsch",
"C2""Zak256 reverse engineering",
-"C0""Oliver Kiehl",
-"C2""Engines: AGOS, BASS",
"C0""Mutwin Kraus",
"C2""Original MacOS porter",
"C0""Peter Moraliyski",
"C2""Port: GP32",
-"C0""Juha Niemim\344ki",
-"C2""Former AmigaOS 4 packager",
"C0""Jeremy Newman",
"C2""Former webmaster",
"C0""Lionel Ulmer",
"C2""Port: X11",
"C0""Won Star",
"C2""Former GP32 porter",
-"C0""David Symonds",
-"C2""Engines: AGI",
"",
"",
"C1""Other contributions",
"",
"C1""Packages",
"C1""AmigaOS 4",
+"C0""Hans-J\366rg Frieden",
+"C2""(retired)",
"C0""Hubert Maier",
+"C0""Juha Niemim\344ki",
+"C2""(retired)",
"",
"C1""Atari/FreeMiNT",
"C0""Keith Scroggins",
@@ -340,6 +291,8 @@ static const char *credits[] = {
"C0""Luc Schrijvers",
"",
"C1""Debian GNU/Linux",
+"C0""Tore Anderson",
+"C2""(retired)",
"C0""David Weinehall",
"",
"C1""Fedora / RedHat",
@@ -354,6 +307,8 @@ static const char *credits[] = {
"",
"C1""MorphOS",
"C0""Fabien Coeurjoly",
+"C0""R\374diger Hanke",
+"C2""(retired)",
"",
"C1""OS/2",
"C0""Paul Smedley",
@@ -399,8 +354,6 @@ static const char *credits[] = {
"C2""CinE engine objectification",
"C0""Thomas Fach-Pedersen",
"C2""ProTracker module player",
-"C0""Benjamin Haisch",
-"C2""Heavily improved de-/encoder for DXA videos",
"C0""Janne Huttunen",
"C2""V3 actor mask support, Dig/FT SMUSH audio",
"C0""Kov\341cs Endre J\341nos",
@@ -425,6 +378,8 @@ static const char *credits[] = {
"C2""Initial MI1 CD music support",
"C0""Quietust",
"C2""Sound support for Amiga SCUMM V2/V3 games, MM NES support",
+"C0""segra",
+"C2""Improved support for Apple II/C64 versions of MM",
"C0""Andreas R\366ver",
"C2""Broken Sword 1/2 MPEG2 cutscene support",
"C0""Edward Rudd",
@@ -434,6 +389,82 @@ static const char *credits[] = {
"C0""Andr\351 Souza",
"C2""SDL-based OpenGL renderer",
"",
+"C1""FreeSCI Contributors",
+"C0""Anders Baden Nielsen",
+"C2""PPC testing",
+"C0""Bas Zoetekouw",
+"C2""Man pages, debian package management, CVS maintenance",
+"C0""Carl Muckenhoupt",
+"C2""Sources to the SCI resource viewer tools that started it all",
+"C0""Chris Kehler",
+"C2""Makefile enhancements",
+"C0""Christoph Reichenbach",
+"C2""UN*X code, VM/Graphics/Sound/other infrastructure",
+"C0""Christopher T. Lansdown",
+"C2""Original CVS maintainer, Alpha compatibility fixes",
+"C0""Claudio Matsuoka",
+"C2""CVS snapshots, daily builds, BeOS and cygwin ports",
+"C0""Dark Minister",
+"C2""SCI research (bytecode and parser)",
+"C0""Dmitry Jemerov",
+"C2""Port to the Win32 platform, numerous bugfixes",
+"C0""Emmanuel Jeandel",
+"C2""Bugfixes and bug reports",
+"C0""Francois-R Boyer",
+"C2""MT-32 information and mapping code",
+"C0""George Reid",
+"C2""FreeBSD package management",
+"C0""Hubert Maier",
+"C2""AmigaOS 4 port",
+"C0""Hugues Valois",
+"C2""Game selection menu",
+"C0""Johannes Manhave",
+"C2""Document format translation",
+"C0""Jordi Vilalta",
+"C2""Numerous code and website clean-up patches",
+"C0""Lars Skovlund",
+"C2""Project maintenance, most documentation, bugfixes, SCI1 support",
+"C0""Magnus Reftel",
+"C2""Heap implementation, Python class viewer, bugfixes",
+"C0""Matt Hargett",
+"C2""Clean-ups, bugfixes, Hardcore QA, Win32",
+"C0""Max Horn",
+"C2""SetJump implementation",
+"C0""Paul David Doherty",
+"C2""Game version information",
+"C0""Petr Vyhnak",
+"C2""The DCL-INFLATE algorithm, many Win32 improvements",
+"C0""Rainer Canavan",
+"C2""IRIX MIDI driver and bug fixes",
+"C0""Rainer De Temple",
+"C2""SCI research",
+"C0""Ravi I.",
+"C2""SCI0 sound resource specification",
+"C0""Ruediger Hanke",
+"C2""Port to the MorphOS platform",
+"C0""Rune Orsval",
+"C2""Configuration file editor",
+"C0""Rickard Lind",
+"C2""MT32->GM MIDI mapping magic, sound research",
+"C0""Rink Springer",
+"C2""Port to the DOS platform, several bug fixes",
+"C0""Robey Pointer",
+"C2""Bug tracking system hosting",
+"C0""Sergey Lapin",
+"C2""Port of Carl's type 2 decompression code",
+"C0""Solomon Peachy",
+"C2""SDL ports and much of the sound subsystem",
+"C0""Vyacheslav Dikonov",
+"C2""Config script improvements",
+"C0""Walter van Niftrik",
+"C2""Ports to the Dreamcast and GP32 platforms",
+"C0""Xiaojun Chen",
+"C0""Sean Terrell",
+"C0""Special thanks to Prof. Dr. Gary Nutt for allowing the FreeSCI VM extension as a course project in his Advanced OS course.",
+"C0""",
+"C0""Special thanks to Bob Heitman and Corey Cole for their support of FreeSCI.",
+"C0""",
+"",
"C0""And to all the contributors, users, and beta testers we've missed. Thanks!",
"C0""",
"",
diff --git a/gui/debugger.cpp b/gui/debugger.cpp
index 181403484b..78ada04cd6 100644
--- a/gui/debugger.cpp
+++ b/gui/debugger.cpp
@@ -27,10 +27,14 @@
#include "common/system.h"
#include "gui/debugger.h"
-#if USE_CONSOLE
+#ifndef USE_TEXT_CONSOLE
#include "gui/console.h"
+#elif defined(USE_READLINE)
+ #include <readline/readline.h>
+ #include <readline/history.h>
#endif
+
namespace GUI {
Debugger::Debugger() {
@@ -39,9 +43,11 @@ Debugger::Debugger() {
_isAttached = false;
_errStr = NULL;
_firstTime = true;
+#ifndef USE_TEXT_CONSOLE
_debuggerDialog = new GUI::ConsoleDialog(1.0f, 0.67f);
_debuggerDialog->setInputCallback(debuggerInputCallback, this);
_debuggerDialog->setCompletionCallback(debuggerCompletionCallback, this);
+#endif
//DCmd_Register("continue", WRAP_METHOD(Debugger, Cmd_Exit));
DCmd_Register("exit", WRAP_METHOD(Debugger, Cmd_Exit));
@@ -55,7 +61,9 @@ Debugger::Debugger() {
}
Debugger::~Debugger() {
+#ifndef USE_TEXT_CONSOLE
delete _debuggerDialog;
+#endif
}
@@ -65,7 +73,7 @@ int Debugger::DebugPrintf(const char *format, ...) {
va_start(argptr, format);
int count;
-#if USE_CONSOLE
+#ifndef USE_TEXT_CONSOLE
count = _debuggerDialog->vprintf(format, argptr);
#else
count = ::vprintf(format, argptr);
@@ -112,9 +120,22 @@ void Debugger::onFrame() {
}
}
+#if defined(USE_TEXT_CONSOLE) && defined(USE_READLINE)
+namespace {
+Debugger *g_readline_debugger;
+
+char *readline_completionFunction(const char *text, int state) {
+ return g_readline_debugger->readlineComplete(text, state);
+}
+} // end of anonymous namespace
+#endif
+
// Main Debugger Loop
void Debugger::enter() {
-#if USE_CONSOLE
+ // TODO: Having three I/O methods #ifdef-ed in this file is not the
+ // cleanest approach to this...
+
+#ifndef USE_TEXT_CONSOLE
if (_firstTime) {
DebugPrintf("Debugger started, type 'exit' to return to the game.\n");
DebugPrintf("Type 'help' to see a little list of commands and variables.\n");
@@ -129,18 +150,28 @@ void Debugger::enter() {
_debuggerDialog->runModal();
#else
- // TODO: compared to the console input, this here is very bare bone.
- // For example, no support for tab completion and no history. At least
- // we should re-add (optional) support for the readline library.
- // Or maybe instead of choosing between a console dialog and stdio,
- // we should move that choice into the ConsoleDialog class - that is,
- // the console dialog code could be #ifdef'ed to not print to the dialog
- // but rather to stdio. This way, we could also reuse the command history
- // and tab completion of the console. It would still require a lot of
- // work, but at least no dependency on a 3rd party library...
-
printf("Debugger entered, please switch to this console for input.\n");
+#ifdef USE_READLINE
+ // TODO: add support for saving/loading history?
+
+ g_readline_debugger = this;
+ rl_completion_entry_function = &readline_completionFunction;
+
+ char *line_read = 0;
+ do {
+ free(line_read);
+ line_read = readline("debug> ");
+
+ if (line_read && line_read[0])
+ add_history(line_read);
+
+ } while (line_read && parseCommand(line_read));
+
+ free(line_read);
+ line_read = 0;
+
+#else
int i;
char buf[256];
@@ -156,6 +187,7 @@ void Debugger::enter() {
if (i == 0)
continue;
} while (parseCommand(buf));
+#endif
#endif
}
@@ -307,7 +339,8 @@ bool Debugger::tabComplete(const char *input, Common::String &completion) const
} else {
// take common prefix of previous match and this command
for (uint j = 0; j < completion.size(); j++) {
- if (completion[j] != i->_key[inputlen + j]) {
+ if (inputlen + j >= i->_key.size() ||
+ completion[j] != i->_key[inputlen + j]) {
completion = Common::String(completion.begin(), completion.begin() + j);
// If there is no unambiguous completion, abort
if (completion.empty())
@@ -325,6 +358,29 @@ bool Debugger::tabComplete(const char *input, Common::String &completion) const
return true;
}
+#if defined(USE_TEXT_CONSOLE) && defined(USE_READLINE)
+char *Debugger::readlineComplete(const char *input, int state) {
+ static CommandsMap::const_iterator iter;
+
+ // We assume that _cmds isn't changed between calls to readlineComplete,
+ // unless state is 0.
+ if (state == 0) {
+ iter = _cmds.begin();
+ } else {
+ ++iter;
+ }
+
+ for (; iter != _cmds.end(); ++iter) {
+ if (iter->_key.hasPrefix(input)) {
+ char *ret = (char *)malloc(iter->_key.size() + 1);
+ strcpy(ret, iter->_key.c_str());
+ return ret;
+ }
+ }
+ return 0;
+}
+#endif
+
// Variable registration function
void Debugger::DVar_Register(const Common::String &varname, void *pointer, int type, int optional) {
// TODO: Filter out duplicates
@@ -356,8 +412,15 @@ bool Debugger::Cmd_Exit(int argc, const char **argv) {
// Print a list of all registered commands (and variables, if any),
// nicely word-wrapped.
bool Debugger::Cmd_Help(int argc, const char **argv) {
-
+#ifndef USE_TEXT_CONSOLE
const int charsPerLine = _debuggerDialog->getCharsPerLine();
+#elif defined(USE_READLINE)
+ int charsPerLine, rows;
+ rl_get_screen_size(&rows, &charsPerLine);
+#else
+ // Can we do better?
+ const int charsPerLine = 80;
+#endif
int width, size;
uint i;
@@ -452,7 +515,7 @@ bool Debugger::Cmd_DebugFlagDisable(int argc, const char **argv) {
}
// Console handler
-#if USE_CONSOLE
+#ifndef USE_TEXT_CONSOLE
bool Debugger::debuggerInputCallback(GUI::ConsoleDialog *console, const char *input, void *refCon) {
Debugger *debugger = (Debugger *)refCon;
diff --git a/gui/debugger.h b/gui/debugger.h
index e84da594be..07fdddb808 100644
--- a/gui/debugger.h
+++ b/gui/debugger.h
@@ -32,10 +32,7 @@
namespace GUI {
-// Choose between text console or ScummConsole
-#define USE_CONSOLE 1
-
-#ifdef USE_CONSOLE
+#ifndef USE_TEXT_CONSOLE
class ConsoleDialog;
#endif
@@ -86,7 +83,9 @@ private:
bool _isAttached;
char *_errStr;
bool _firstTime;
+#ifndef USE_TEXT_CONSOLE
GUI::ConsoleDialog *_debuggerDialog;
+#endif
protected:
// Hook for subclasses: Called just before enter() is run
@@ -118,11 +117,15 @@ protected:
bool Cmd_DebugFlagEnable(int argc, const char **argv);
bool Cmd_DebugFlagDisable(int argc, const char **argv);
-#if USE_CONSOLE
+#ifndef USE_TEXT_CONSOLE
private:
static bool debuggerInputCallback(GUI::ConsoleDialog *console, const char *input, void *refCon);
static bool debuggerCompletionCallback(GUI::ConsoleDialog *console, const char *input, Common::String &completion, void *refCon);
+#elif defined(USE_READLINE)
+public:
+ char *readlineComplete(const char *input, int state);
#endif
+
};
} // End of namespace GUI
diff --git a/gui/options.cpp b/gui/options.cpp
index 5991a204e9..0d2d6e0120 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -68,8 +68,8 @@ enum {
static const char *savePeriodLabels[] = { "Never", "every 5 mins", "every 10 mins", "every 15 mins", "every 30 mins", 0 };
static const int savePeriodValues[] = { 0, 5 * 60, 10 * 60, 15 * 60, 30 * 60, -1 };
-static const char *outputRateLabels[] = { "<default>", "22 kHz", "8 kHz", "11kHz", "44 kHz", "48 kHz", 0 };
-static const int outputRateValues[] = { 0, 22050, 8000, 11025, 44100, 48000, -1 };
+static const char *outputRateLabels[] = { "<default>", "8 kHz", "11kHz", "22 kHz", "44 kHz", "48 kHz", 0 };
+static const int outputRateValues[] = { 0, 8000, 11025, 22050, 44100, 48000, -1 };
diff --git a/gui/themes/default.inc b/gui/themes/default.inc
index 0331c90fbb..64fb0e517a 100644
--- a/gui/themes/default.inc
+++ b/gui/themes/default.inc
@@ -1,5 +1,5 @@
"<?xml version = '1.0'?>"
-"<layout_info resolution='-320xY,-256x240'> "
+"<layout_info resolution='-320xY,-256x240,-Xx272'> "
"<globals> "
"<def var='Line.Height' value='16' /> "
"<def var='Font.Height' value='16' /> "
@@ -1492,7 +1492,7 @@
"</layout> "
"</dialog> "
"<dialog name='GameOptions_Graphics' overlays='Dialog.GlobalOptions.TabWidget'> "
-"<layout type='vertical' padding='16,16,16,16' spacing='8'> "
+"<layout type='vertical' padding='8,8,8,8' spacing='6'> "
"<widget name='EnableTabCheckbox' "
"type='Checkbox' "
"/> "
@@ -1500,7 +1500,7 @@
"</layout> "
"</dialog> "
"<dialog name='GameOptions_Audio' overlays='Dialog.GlobalOptions.TabWidget'> "
-"<layout type='vertical' padding='16,16,16,16' spacing='8'> "
+"<layout type='vertical' padding='8,8,8,8' spacing='6'> "
"<widget name='EnableTabCheckbox' "
"type='Checkbox' "
"/> "
@@ -1508,7 +1508,7 @@
"</layout> "
"</dialog> "
"<dialog name='GameOptions_MIDI' overlays='Dialog.GlobalOptions.TabWidget'> "
-"<layout type='vertical' padding='16,16,16,16' spacing='8'> "
+"<layout type='vertical' padding='8,8,8,8' spacing='6'> "
"<widget name='EnableTabCheckbox' "
"type='Checkbox' "
"/> "
@@ -1516,7 +1516,7 @@
"</layout> "
"</dialog> "
"<dialog name='GameOptions_Volume' overlays='Dialog.GlobalOptions.TabWidget'> "
-"<layout type='vertical' padding='16,16,16,16' spacing='8'> "
+"<layout type='vertical' padding='8,8,8,8' spacing='6'> "
"<widget name='EnableTabCheckbox' "
"type='Checkbox' "
"/> "
@@ -1524,7 +1524,7 @@
"</layout> "
"</dialog> "
"<dialog name='GameOptions_Game' overlays='Dialog.GameOptions.TabWidget' shading='dim'> "
-"<layout type='vertical' padding='16,16,16,16'> "
+"<layout type='vertical' padding='8,8,8,8'> "
"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'> "
"<widget name='Id' "
"width='35' "
@@ -1569,7 +1569,7 @@
"</layout> "
"</dialog> "
"<dialog name='GameOptions_Paths' overlays='Dialog.GameOptions.TabWidget' shading='dim'> "
-"<layout type='vertical' padding='16,16,16,16'> "
+"<layout type='vertical' padding='8,8,8,8'> "
"<layout type='horizontal' padding='0,0,0,0' spacing='16' center='true'> "
"<widget name='Savepath' "
"type='Button' "
diff --git a/gui/themes/scummclassic.zip b/gui/themes/scummclassic.zip
index ce21ea5487..0e1d8c539d 100644
--- a/gui/themes/scummclassic.zip
+++ b/gui/themes/scummclassic.zip
Binary files differ
diff --git a/gui/themes/scummclassic/THEMERC b/gui/themes/scummclassic/THEMERC
index 0593de00d4..4dc5cc5982 100644
--- a/gui/themes/scummclassic/THEMERC
+++ b/gui/themes/scummclassic/THEMERC
@@ -1 +1 @@
-[SCUMMVM_STX0.5:ScummVM Classic Theme:No Author]
+[SCUMMVM_STX0.6:ScummVM Classic Theme:No Author]
diff --git a/gui/themes/scummclassic/classic_layout.stx b/gui/themes/scummclassic/classic_layout.stx
index e886a1a2f0..029c7479ac 100644
--- a/gui/themes/scummclassic/classic_layout.stx
+++ b/gui/themes/scummclassic/classic_layout.stx
@@ -23,7 +23,7 @@
- $Id$
-
-->
-<layout_info resolution = '-320xY, -256x240'>
+<layout_info resolution = '-320xY, -256x240, -Xx272'>
<globals>
<def var = 'Line.Height' value = '16' />
<def var = 'Font.Height' value = '16' />
diff --git a/gui/themes/scummclassic/classic_layout_lowres.stx b/gui/themes/scummclassic/classic_layout_lowres.stx
index b4143964af..da56f0178a 100644
--- a/gui/themes/scummclassic/classic_layout_lowres.stx
+++ b/gui/themes/scummclassic/classic_layout_lowres.stx
@@ -454,7 +454,7 @@
</dialog>
<dialog name = 'GameOptions_Graphics' overlays = 'Dialog.GlobalOptions.TabWidget'>
- <layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
+ <layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '6'>
<widget name = 'EnableTabCheckbox'
type = 'Checkbox'
/>
@@ -463,7 +463,7 @@
</dialog>
<dialog name = 'GameOptions_Audio' overlays = 'Dialog.GlobalOptions.TabWidget'>
- <layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
+ <layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '6'>
<widget name = 'EnableTabCheckbox'
type = 'Checkbox'
/>
@@ -472,7 +472,7 @@
</dialog>
<dialog name = 'GameOptions_MIDI' overlays = 'Dialog.GlobalOptions.TabWidget'>
- <layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
+ <layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '6'>
<widget name = 'EnableTabCheckbox'
type = 'Checkbox'
/>
@@ -481,7 +481,7 @@
</dialog>
<dialog name = 'GameOptions_Volume' overlays = 'Dialog.GlobalOptions.TabWidget'>
- <layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
+ <layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '6'>
<widget name = 'EnableTabCheckbox'
type = 'Checkbox'
/>
@@ -490,7 +490,7 @@
</dialog>
<dialog name = 'GameOptions_Game' overlays = 'Dialog.GameOptions.TabWidget' shading = 'dim'>
- <layout type = 'vertical' padding = '16, 16, 16, 16'>
+ <layout type = 'vertical' padding = '8, 8, 8, 8'>
<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' center = 'true'>
<widget name = 'Id'
width = '35'
@@ -536,7 +536,7 @@
</dialog>
<dialog name = 'GameOptions_Paths' overlays = 'Dialog.GameOptions.TabWidget' shading = 'dim'>
- <layout type = 'vertical' padding = '16, 16, 16, 16'>
+ <layout type = 'vertical' padding = '8, 8, 8, 8'>
<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '16' center = 'true'>
<widget name = 'Savepath'
type = 'Button'
diff --git a/gui/themes/scummmodern.zip b/gui/themes/scummmodern.zip
index b38ee79e84..fb3a0b1c2d 100644
--- a/gui/themes/scummmodern.zip
+++ b/gui/themes/scummmodern.zip
Binary files differ
diff --git a/gui/themes/scummmodern/THEMERC b/gui/themes/scummmodern/THEMERC
index 32b51c573d..3fbbdf8d46 100644
--- a/gui/themes/scummmodern/THEMERC
+++ b/gui/themes/scummmodern/THEMERC
@@ -1 +1 @@
-[SCUMMVM_STX0.5:ScummVM Modern Theme:No Author]
+[SCUMMVM_STX0.6:ScummVM Modern Theme:No Author]
diff --git a/gui/themes/scummmodern/scummmodern_layout.stx b/gui/themes/scummmodern/scummmodern_layout.stx
index 8c13217c65..e6a01d12a1 100644
--- a/gui/themes/scummmodern/scummmodern_layout.stx
+++ b/gui/themes/scummmodern/scummmodern_layout.stx
@@ -23,7 +23,7 @@
- $Id$
-
-->
-<layout_info resolution = '-320xY, -256x240'>
+<layout_info resolution = '-320xY, -256x240, -Xx272'>
<globals>
<def var = 'Line.Height' value = '16' />
<def var = 'Font.Height' value = '16' />
diff --git a/gui/themes/scummmodern/scummmodern_layout_lowres.stx b/gui/themes/scummmodern/scummmodern_layout_lowres.stx
index 693efaaca9..c514ccc458 100644
--- a/gui/themes/scummmodern/scummmodern_layout_lowres.stx
+++ b/gui/themes/scummmodern/scummmodern_layout_lowres.stx
@@ -450,7 +450,7 @@
</dialog>
<dialog name = 'GameOptions_Graphics' overlays = 'Dialog.GlobalOptions.TabWidget'>
- <layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
+ <layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '6'>
<widget name = 'EnableTabCheckbox'
type = 'Checkbox'
/>
@@ -459,7 +459,7 @@
</dialog>
<dialog name = 'GameOptions_Audio' overlays = 'Dialog.GlobalOptions.TabWidget'>
- <layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
+ <layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '6'>
<widget name = 'EnableTabCheckbox'
type = 'Checkbox'
/>
@@ -468,7 +468,7 @@
</dialog>
<dialog name = 'GameOptions_MIDI' overlays = 'Dialog.GlobalOptions.TabWidget'>
- <layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
+ <layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '6'>
<widget name = 'EnableTabCheckbox'
type = 'Checkbox'
/>
@@ -477,7 +477,7 @@
</dialog>
<dialog name = 'GameOptions_Volume' overlays = 'Dialog.GlobalOptions.TabWidget'>
- <layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
+ <layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '6'>
<widget name = 'EnableTabCheckbox'
type = 'Checkbox'
/>
@@ -486,7 +486,7 @@
</dialog>
<dialog name = 'GameOptions_Game' overlays = 'Dialog.GameOptions.TabWidget' shading = 'dim'>
- <layout type = 'vertical' padding = '16, 16, 16, 16'>
+ <layout type = 'vertical' padding = '8, 8, 8, 8'>
<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' center = 'true'>
<widget name = 'Id'
width = '35'
@@ -532,7 +532,7 @@
</dialog>
<dialog name = 'GameOptions_Paths' overlays = 'Dialog.GameOptions.TabWidget' shading = 'dim'>
- <layout type = 'vertical' padding = '16, 16, 16, 16'>
+ <layout type = 'vertical' padding = '8, 8, 8, 8'>
<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '16' center = 'true'>
<widget name = 'Savepath'
type = 'Button'