aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.common3
-rw-r--r--NEWS5
-rw-r--r--backends/audiocd/audiocd.h2
-rw-r--r--backends/fs/abstract-fs.h2
-rw-r--r--backends/keymapper/keymapper.h2
-rw-r--r--backends/platform/maemo/debian/changelog10
-rw-r--r--common/archive.cpp6
-rw-r--r--common/archive.h6
-rwxr-xr-xconfigure4
-rw-r--r--dists/redhat/scummvm.spec2
-rw-r--r--dists/redhat/scummvm.spec.in2
-rw-r--r--dists/scummvm.rc3
-rw-r--r--dists/scummvm.rc.in3
-rw-r--r--engines/agi/wagparser.cpp2
-rw-r--r--engines/hopkins/hopkins.cpp40
-rw-r--r--engines/lure/menu.cpp3
-rw-r--r--engines/mohawk/livingbooks.cpp12
-rw-r--r--engines/neverhood/entity.h16
-rw-r--r--engines/neverhood/microtiles.cpp4
-rw-r--r--engines/neverhood/modules/module1100.cpp2
-rw-r--r--engines/neverhood/modules/module2200.cpp3
-rw-r--r--engines/neverhood/modules/module2800.cpp2
-rw-r--r--engines/neverhood/neverhood.cpp2
-rw-r--r--engines/neverhood/sprite.h27
-rw-r--r--engines/saga/events.cpp3
-rw-r--r--engines/sci/engine/workarounds.cpp1
-rw-r--r--engines/scumm/he/intern_he.h1
-rw-r--r--engines/scumm/imuse/imuse.cpp52
-rw-r--r--engines/scumm/imuse/imuse_internal.h1
-rw-r--r--engines/scumm/imuse_digi/dimuse.cpp5
-rw-r--r--engines/sky/music/musicbase.cpp5
-rw-r--r--engines/testbed/midi.cpp2
-rw-r--r--engines/tinsel/detection.cpp2
-rw-r--r--engines/tinsel/detection_tables.h23
-rw-r--r--engines/tinsel/sound.cpp10
-rw-r--r--engines/tinsel/tinsel.h2
-rw-r--r--engines/tony/gfxengine.cpp9
-rw-r--r--engines/tony/mpal/mpal.cpp7
-rw-r--r--engines/wintermute/base/base_file_manager.cpp2
-rw-r--r--engines/wintermute/wintermute.cpp1
-rw-r--r--gui/options.cpp2
41 files changed, 168 insertions, 123 deletions
diff --git a/Makefile.common b/Makefile.common
index 6b23bd5b1c..aec033f0c7 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -265,6 +265,9 @@ endif
ifdef ENABLE_TEENAGENT
DIST_FILES_ENGINEDATA+=teenagent.dat
endif
+ifdef ENABLE_TONY
+DIST_FILES_ENGINEDATA+=tony.dat
+endif
ifdef ENABLE_TOON
DIST_FILES_ENGINEDATA+=toon.dat
endif
diff --git a/NEWS b/NEWS
index e52daeccd7..cf9a07e8cb 100644
--- a/NEWS
+++ b/NEWS
@@ -1,7 +1,10 @@
For a more comprehensive changelog of the latest experimental code, see:
https://github.com/scummvm/scummvm/commits/
-1.6.0 (????-??-??)
+1.7.0 (????-??-??)
+
+
+1.6.0 (2013-05-31)
New Games:
- Added support for 3 Skulls of the Toltecs.
- Added support for Eye of the Beholder.
diff --git a/backends/audiocd/audiocd.h b/backends/audiocd/audiocd.h
index 0afc6af991..76c3998862 100644
--- a/backends/audiocd/audiocd.h
+++ b/backends/audiocd/audiocd.h
@@ -110,7 +110,7 @@ public:
/**
* Initialize the specified CD drive for audio playback.
* @param drive the drive id
- * @return true if the CD drive was inited succesfully
+ * @return true if the CD drive was inited successfully
*/
virtual bool openCD(int drive) = 0;
diff --git a/backends/fs/abstract-fs.h b/backends/fs/abstract-fs.h
index 54e3958972..2b66a6e6e1 100644
--- a/backends/fs/abstract-fs.h
+++ b/backends/fs/abstract-fs.h
@@ -100,7 +100,7 @@ public:
* @param mode Mode to use while listing the directory.
* @param hidden Whether to include hidden files or not in the results.
*
- * @return true if succesful, false otherwise (e.g. when the directory does not exist).
+ * @return true if successful, false otherwise (e.g. when the directory does not exist).
*/
virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const = 0;
diff --git a/backends/keymapper/keymapper.h b/backends/keymapper/keymapper.h
index 1e8d1c08c3..a54a2acbdc 100644
--- a/backends/keymapper/keymapper.h
+++ b/backends/keymapper/keymapper.h
@@ -128,7 +128,7 @@ public:
* @param name name of the keymap to push
* @param transparent if true keymapper will iterate down the
* stack if it cannot find a key in the new map
- * @return true if succesful
+ * @return true if successful
*/
bool pushKeymap(const String& name, bool transparent = false);
diff --git a/backends/platform/maemo/debian/changelog b/backends/platform/maemo/debian/changelog
index ea44574e96..568edd0282 100644
--- a/backends/platform/maemo/debian/changelog
+++ b/backends/platform/maemo/debian/changelog
@@ -1,8 +1,14 @@
-scummvm (1.6.0~git) unstable; urgency=low
+scummvm (1.7.0~git) unstable; urgency=low
* Development snapshot
- -- Tarek Soliman <tsoliman@scummvm.org> Tue, 10 Jul 2012 23:02:00 -0500
+ -- Tarek Soliman <tsoliman@scummvm.org> Sat, 01 Jun 2013 21:03:52 -0500
+
+scummvm (1.6.0) unstable; urgency=low
+
+ * 1.6.0 release
+
+ -- Tarek Soliman <tsoliman@scummvm.org> Fri, 31 May 2013 23:02:00 -0500
scummvm (1.5.0) unstable; urgency=low
diff --git a/common/archive.cpp b/common/archive.cpp
index 1323f14805..57ebeb2ca6 100644
--- a/common/archive.cpp
+++ b/common/archive.cpp
@@ -118,7 +118,7 @@ void SearchSet::addDirectory(const String &name, const FSNode &dir, int priority
add(name, new FSDirectory(dir, depth, flat), priority);
}
-void SearchSet::addSubDirectoriesMatching(const FSNode &directory, String origPattern, bool ignoreCase, int priority) {
+void SearchSet::addSubDirectoriesMatching(const FSNode &directory, String origPattern, bool ignoreCase, int priority, int depth, bool flat) {
FSList subDirs;
if (!directory.getChildren(subDirs))
return;
@@ -161,9 +161,9 @@ void SearchSet::addSubDirectoriesMatching(const FSNode &directory, String origPa
}
if (nextPattern.empty())
- addDirectory(name, *i, priority);
+ addDirectory(name, *i, priority, depth, flat);
else
- addSubDirectoriesMatching(*i, nextPattern, ignoreCase, priority);
+ addSubDirectoriesMatching(*i, nextPattern, ignoreCase, priority, depth, flat);
}
}
}
diff --git a/common/archive.h b/common/archive.h
index ffd86d786d..2f9736f032 100644
--- a/common/archive.h
+++ b/common/archive.h
@@ -184,8 +184,8 @@ public:
* to assume that this method is using anything other than a simple case insensitive compare.
* Thus do not use any tokens like '*' or '?' in the "caselessName" parameter of this function!
*/
- void addSubDirectoryMatching(const FSNode &directory, const String &caselessName, int priority = 0) {
- addSubDirectoriesMatching(directory, caselessName, true, priority);
+ void addSubDirectoryMatching(const FSNode &directory, const String &caselessName, int priority = 0, int depth = 1, bool flat = false) {
+ addSubDirectoriesMatching(directory, caselessName, true, priority, depth, flat);
}
/**
@@ -208,7 +208,7 @@ public:
*
* @see Common::matchString
*/
- void addSubDirectoriesMatching(const FSNode &directory, String origPattern, bool ignoreCase, int priority = 0);
+ void addSubDirectoriesMatching(const FSNode &directory, String origPattern, bool ignoreCase, int priority = 0, int depth = 1, bool flat = false);
/**
* Remove an archive from the searchable set.
diff --git a/configure b/configure
index 5016a86239..dbd78d3f9d 100755
--- a/configure
+++ b/configure
@@ -2915,7 +2915,7 @@ case $_host_os in
amigaos* | cygwin* | dreamcast | ds | gamecube | mingw* | n64 | ps2 | ps3 | psp | wii | wince)
_posix=no
;;
- android | beos* | bsd* | darwin* | freebsd* | gph-linux | haiku* | hpux* | iphone | irix* | linux* | maemo | mint* | netbsd* | openbsd* | solaris* | sunos* | uclinux* | webos)
+ android | beos* | bsd* | darwin* | freebsd* | gnu* | gph-linux | haiku* | hpux* | iphone | irix*| k*bsd*-gnu* | linux* | maemo | mint* | netbsd* | openbsd* | solaris* | sunos* | uclinux* | webos)
_posix=yes
;;
os2-emx*)
@@ -3071,7 +3071,7 @@ POST_OBJS_FLAGS := -Wl,-no-whole-archive
'
;;
- linux*)
+ linux* | gnu* | k*bsd*-gnu*)
_plugin_prefix="lib"
_plugin_suffix=".so"
CXXFLAGS="$CXXFLAGS -fPIC"
diff --git a/dists/redhat/scummvm.spec b/dists/redhat/scummvm.spec
index 823b74df5e..33622ffb9b 100644
--- a/dists/redhat/scummvm.spec
+++ b/dists/redhat/scummvm.spec
@@ -72,6 +72,7 @@ install -m644 -D dists/engine-data/sky.cpt %{buildroot}%{_datadir}/scummvm/sky.c
install -m644 -D dists/engine-data/drascula.dat %{buildroot}%{_datadir}/scummvm/drascula.dat
install -m644 -D dists/engine-data/teenagent.dat %{buildroot}%{_datadir}/scummvm/teenagent.dat
install -m644 -D dists/engine-data/hugo.dat %{buildroot}%{_datadir}/scummvm/hugo.dat
+install -m644 -D dists/engine-data/tony.dat %{buildroot}%{_datadir}/scummvm/tony.dat
install -m644 -D dists/engine-data/toon.dat %{buildroot}%{_datadir}/scummvm/toon.dat
desktop-file-install --vendor scummvm --dir=%{buildroot}/%{_datadir}/applications dists/scummvm.desktop
@@ -111,6 +112,7 @@ fi
%{_datadir}/scummvm/drascula.dat
%{_datadir}/scummvm/teenagent.dat
%{_datadir}/scummvm/hugo.dat
+%{_datadir}/scummvm/tony.dat
%{_datadir}/scummvm/toon.dat
%{_mandir}/man6/scummvm.6*
diff --git a/dists/redhat/scummvm.spec.in b/dists/redhat/scummvm.spec.in
index 9dbd8add5b..5db2807d0e 100644
--- a/dists/redhat/scummvm.spec.in
+++ b/dists/redhat/scummvm.spec.in
@@ -72,6 +72,7 @@ install -m644 -D dists/engine-data/sky.cpt %{buildroot}%{_datadir}/scummvm/sky.c
install -m644 -D dists/engine-data/drascula.dat %{buildroot}%{_datadir}/scummvm/drascula.dat
install -m644 -D dists/engine-data/teenagent.dat %{buildroot}%{_datadir}/scummvm/teenagent.dat
install -m644 -D dists/engine-data/hugo.dat %{buildroot}%{_datadir}/scummvm/hugo.dat
+install -m644 -D dists/engine-data/tony.dat %{buildroot}%{_datadir}/scummvm/tony.dat
install -m644 -D dists/engine-data/toon.dat %{buildroot}%{_datadir}/scummvm/toon.dat
desktop-file-install --vendor scummvm --dir=%{buildroot}/%{_datadir}/applications dists/scummvm.desktop
@@ -111,6 +112,7 @@ fi
%{_datadir}/scummvm/drascula.dat
%{_datadir}/scummvm/teenagent.dat
%{_datadir}/scummvm/hugo.dat
+%{_datadir}/scummvm/tony.dat
%{_datadir}/scummvm/toon.dat
%{_mandir}/man6/scummvm.6*
diff --git a/dists/scummvm.rc b/dists/scummvm.rc
index 56848be9e9..f3fa14c95a 100644
--- a/dists/scummvm.rc
+++ b/dists/scummvm.rc
@@ -44,6 +44,9 @@ sky.cpt FILE "dists/engine-data/sky.cpt"
#if ENABLE_TEENAGENT == STATIC_PLUGIN
teenagent.dat FILE "dists/engine-data/teenagent.dat"
#endif
+#if ENABLE_TONY == STATIC_PLUGIN
+tony.dat FILE "dists/engine-data/tony.dat"
+#endif
#if ENABLE_TOON == STATIC_PLUGIN
toon.dat FILE "dists/engine-data/toon.dat"
#endif
diff --git a/dists/scummvm.rc.in b/dists/scummvm.rc.in
index 4bbfb47116..b7a87f4e3d 100644
--- a/dists/scummvm.rc.in
+++ b/dists/scummvm.rc.in
@@ -44,6 +44,9 @@ sky.cpt FILE "dists/engine-data/sky.cpt"
#if ENABLE_TEENAGENT == STATIC_PLUGIN
teenagent.dat FILE "dists/engine-data/teenagent.dat"
#endif
+#if ENABLE_TONY == STATIC_PLUGIN
+tony.dat FILE "dists/engine-data/tony.dat"
+#endif
#if ENABLE_TOON == STATIC_PLUGIN
toon.dat FILE "dists/engine-data/toon.dat"
#endif
diff --git a/engines/agi/wagparser.cpp b/engines/agi/wagparser.cpp
index 8dee6545c0..644ca7c103 100644
--- a/engines/agi/wagparser.cpp
+++ b/engines/agi/wagparser.cpp
@@ -178,7 +178,7 @@ bool WagFileParser::parse(const Common::FSNode &node) {
_parsedOk = false; // We haven't parsed the file yet
stream = node.createReadStream(); // Open the file
- if (stream) { // Check that opening the file was succesful
+ if (stream) { // Check that opening the file was successful
if (checkWagVersion(*stream)) { // Check that WinAGI version string is valid
// It seems we've got a valid *.wag file so let's parse its properties from the start.
stream->seek(0); // Rewind the stream
diff --git a/engines/hopkins/hopkins.cpp b/engines/hopkins/hopkins.cpp
index 11d60c50c6..407f264116 100644
--- a/engines/hopkins/hopkins.cpp
+++ b/engines/hopkins/hopkins.cpp
@@ -156,12 +156,7 @@ bool HopkinsEngine::runWin95Demo() {
_events->_rateCounter = 0;
_globals->_eventMode = EVENTMODE_IGNORE;
_globals->_speed = 1;
-
- for (int i = 1; i < 50; i++) {
- _graphicsMan->copySurface(_graphicsMan->_backBuffer, 0, 0, 640, 440, _graphicsMan->_frontBuffer, 0, 0);
- _events->refreshScreenAndEvents();
- }
-
+ _events->delay(500);
_globals->_eventMode = EVENTMODE_DEFAULT;
if (_events->_rateCounter > 475)
_globals->_speed = 2;
@@ -402,14 +397,27 @@ bool HopkinsEngine::runWin95Demo() {
break;
case 151:
- _soundMan->playSound(28);
- _globals->_eventMode = EVENTMODE_ALT; // CHECKME!
- _graphicsMan->clearScreen();
- _graphicsMan->clearPalette();
- _graphicsMan->loadImage("njour3a");
- _graphicsMan->fadeInLong();
- _events->delay(5000);
- _graphicsMan->fadeOutLong();
+ if (_fileIO->fileExists("JOUR3A.ANM")) {
+ // The Polish demo uses the animation file than the complete versions
+ _soundMan->playSound(16);
+ _globals->_eventMode = EVENTMODE_IGNORE;
+
+ _graphicsMan->clearScreen();
+ _graphicsMan->clearPalette();
+ _graphicsMan->_fadingFl = true;
+ _animMan->playAnim("JOUR3A.ANM", "JOUR3A.ANM", 12, 12, 2000);
+ } else {
+ // The other demos only display a nag screen
+ _soundMan->playSound(28);
+ _globals->_eventMode = EVENTMODE_ALT; // CHECKME!
+ _graphicsMan->clearScreen();
+ _graphicsMan->clearPalette();
+ _graphicsMan->loadImage("njour3a");
+ _graphicsMan->fadeInLong();
+ _events->delay(5000);
+ _graphicsMan->fadeOutLong();
+ }
+
_globals->_exitId = 300;
_globals->_eventMode = EVENTMODE_DEFAULT;
break;
@@ -1634,8 +1642,8 @@ void HopkinsEngine::playIntro() {
_graphicsMan->setColorPercentage(253, 100, 100, 100);
_graphicsMan->setColorPercentage(251, 100, 100, 100);
_graphicsMan->setColorPercentage(254, 0, 0, 0);
- for (int i = 0; i <= 4; i++)
- _events->refreshScreenAndEvents();
+
+ _events->delay(500);
_globals->_eventMode = EVENTMODE_IGNORE;
_graphicsMan->fadeInLong();
diff --git a/engines/lure/menu.cpp b/engines/lure/menu.cpp
index 93deecdcd6..7564ce91a0 100644
--- a/engines/lure/menu.cpp
+++ b/engines/lure/menu.cpp
@@ -47,6 +47,7 @@ MenuRecord::MenuRecord(const MenuRecordBounds *bounds, int numParams, ...) {
va_start(params, numParams);
for (int index = 0; index < _numEntries; ++index)
_entries[index] = va_arg(params, const char *);
+ va_end(params);
// Store position data
_hsxstart = bounds->left; _hsxend = bounds->right;
@@ -458,7 +459,7 @@ Action PopupMenu::Show(int numEntries, Action *actions) {
strList[index] = stringList.getString(*actionPtr++);
uint16 result = Show(numEntries, strList);
- delete strList;
+ Memory::dealloc(strList);
if (result == 0xffff) return NONE;
else return actions[result];
}
diff --git a/engines/mohawk/livingbooks.cpp b/engines/mohawk/livingbooks.cpp
index f80dbfacbd..efa0dd3fd3 100644
--- a/engines/mohawk/livingbooks.cpp
+++ b/engines/mohawk/livingbooks.cpp
@@ -148,16 +148,10 @@ MohawkEngine_LivingBooks::MohawkEngine_LivingBooks(OSystem *syst, const MohawkGa
const Common::FSNode gameDataDir(ConfMan.get("path"));
// Rugrats
- const Common::FSNode ProgPath = gameDataDir.getChild("program");
- if (ProgPath.exists())
- SearchMan.addDirectory(ProgPath.getPath(), ProgPath, 0, 2);
- const Common::FSNode RugPath = gameDataDir.getChild("Rugrats Adventure Game");
- if (RugPath.exists())
- SearchMan.addDirectory(RugPath.getPath(), RugPath, 0, 2);
+ SearchMan.addSubDirectoryMatching(gameDataDir, "program", 0, 2);
+ SearchMan.addSubDirectoryMatching(gameDataDir, "Rugrats Adventure Game", 0, 2);
// CarmenTQ
- const Common::FSNode CTQPath = gameDataDir.getChild("95instal");
- if (CTQPath.exists())
- SearchMan.addDirectory(CTQPath.getPath(), CTQPath, 0, 4);
+ SearchMan.addSubDirectoryMatching(gameDataDir, "95instal", 0, 4);
}
MohawkEngine_LivingBooks::~MohawkEngine_LivingBooks() {
diff --git a/engines/neverhood/entity.h b/engines/neverhood/entity.h
index fb8941ae43..cba1bb9a7f 100644
--- a/engines/neverhood/entity.h
+++ b/engines/neverhood/entity.h
@@ -60,14 +60,18 @@ protected:
// TODO: Disable heavy debug stuff in release mode
#define SetUpdateHandler(handler) \
- _updateHandlerCb = static_cast <void (Entity::*)(void)> (handler); \
- debug(5, "SetUpdateHandler(" #handler ")"); \
- _updateHandlerCbName = #handler
+ do { \
+ _updateHandlerCb = static_cast <void (Entity::*)(void)> (handler); \
+ debug(5, "SetUpdateHandler(" #handler ")"); \
+ _updateHandlerCbName = #handler; \
+ } while (0)
#define SetMessageHandler(handler) \
- _messageHandlerCb = static_cast <uint32 (Entity::*)(int messageNum, const MessageParam &param, Entity *sender)> (handler); \
- debug(5, "SetMessageHandler(" #handler ")"); \
- _messageHandlerCbName = #handler
+ do { \
+ _messageHandlerCb = static_cast <uint32 (Entity::*)(int messageNum, const MessageParam &param, Entity *sender)> (handler); \
+ debug(5, "SetMessageHandler(" #handler ")"); \
+ _messageHandlerCbName = #handler; \
+ } while (0)
const uint kMaxSoundResources = 16;
diff --git a/engines/neverhood/microtiles.cpp b/engines/neverhood/microtiles.cpp
index e19be52b5a..3dd6475046 100644
--- a/engines/neverhood/microtiles.cpp
+++ b/engines/neverhood/microtiles.cpp
@@ -118,8 +118,6 @@ RectangleList *MicroTileArray::getRectangles() {
for (y = 0; y < _tilesH; ++y) {
for (x = 0; x < _tilesW; ++x) {
-
- int start;
int finish = 0;
BoundingBox boundingBox = _tiles[i];
@@ -132,8 +130,6 @@ RectangleList *MicroTileArray::getRectangles() {
y0 = (y * TileSize) + TileY0(boundingBox);
y1 = (y * TileSize) + TileY1(boundingBox);
- start = i;
-
if (TileX1(boundingBox) == TileSize - 1 && x != _tilesW - 1) { // check if the tile continues
while (!finish) {
++x;
diff --git a/engines/neverhood/modules/module1100.cpp b/engines/neverhood/modules/module1100.cpp
index 5a5e52e5b0..c4d90b5562 100644
--- a/engines/neverhood/modules/module1100.cpp
+++ b/engines/neverhood/modules/module1100.cpp
@@ -465,7 +465,7 @@ uint32 Scene1105::handleMessage(int messageNum, const MessageParam &param, Entit
_backgroundIndex = 15;
SetUpdateHandler(&Scene1105::upClosePanel);
} else
- _isPanelOpen = true;
+ _isClosePanelDone = true;
_leaveResult = 0;
}
}
diff --git a/engines/neverhood/modules/module2200.cpp b/engines/neverhood/modules/module2200.cpp
index 2b3b26fa65..4f2d9e8fd2 100644
--- a/engines/neverhood/modules/module2200.cpp
+++ b/engines/neverhood/modules/module2200.cpp
@@ -683,7 +683,7 @@ static const uint32 kSsScene2202PuzzleCubeFileHashes2[] = {
SsScene2202PuzzleCube::SsScene2202PuzzleCube(NeverhoodEngine *vm, Scene *parentScene, int16 cubePosition, int16 cubeSymbol)
: StaticSprite(vm, 900), _parentScene(parentScene), _cubeSymbol(cubeSymbol), _cubePosition(cubePosition), _isMoving(false) {
- int surfacePriority;
+ int surfacePriority;
SetUpdateHandler(&SsScene2202PuzzleCube::update);
SetMessageHandler(&SsScene2202PuzzleCube::handleMessage);
@@ -693,6 +693,7 @@ SsScene2202PuzzleCube::SsScene2202PuzzleCube(NeverhoodEngine *vm, Scene *parentS
surfacePriority = 300;
else
surfacePriority = 500;
+ debug(1, "TODO: Unused SurfacePriority: %d", surfacePriority);
loadSprite(kSsScene2202PuzzleCubeFileHashes2[_cubeSymbol], kSLFCenteredDrawOffset | kSLFSetPosition | kSLFDefCollisionBoundsOffset, 0,
kSsScene2202PuzzleCubePoints[_cubePosition].x, kSsScene2202PuzzleCubePoints[_cubePosition].y);
loadSound(0, 0x40958621);
diff --git a/engines/neverhood/modules/module2800.cpp b/engines/neverhood/modules/module2800.cpp
index 183de8e6b2..26df0aefa5 100644
--- a/engines/neverhood/modules/module2800.cpp
+++ b/engines/neverhood/modules/module2800.cpp
@@ -1929,8 +1929,6 @@ Scene2806::Scene2806(NeverhoodEngine *vm, Module *parentModule, int which)
Sprite *tempSprite;
- which = 3;
-
SetMessageHandler(&Scene2806::handleMessage);
SetUpdateHandler(&Scene2806::update);
diff --git a/engines/neverhood/neverhood.cpp b/engines/neverhood/neverhood.cpp
index 42fe1176b4..6b27343d03 100644
--- a/engines/neverhood/neverhood.cpp
+++ b/engines/neverhood/neverhood.cpp
@@ -90,7 +90,7 @@ Common::Error NeverhoodEngine::run() {
_res->addArchive("t.blb");
}
- CursorMan.showMouse(true);
+ CursorMan.showMouse(false);
_soundMan = new SoundMan(this);
_audioResourceMan = new AudioResourceMan(this);
diff --git a/engines/neverhood/sprite.h b/engines/neverhood/sprite.h
index 80da1768bd..1d17bf0e70 100644
--- a/engines/neverhood/sprite.h
+++ b/engines/neverhood/sprite.h
@@ -30,9 +30,24 @@
namespace Neverhood {
-#define SetSpriteUpdate(callback) _spriteUpdateCb = static_cast <void (Sprite::*)(void)> (callback); debug(2, "SetSpriteUpdate(" #callback ")"); _spriteUpdateCbName = #callback
-#define SetFilterX(callback) _filterXCb = static_cast <int16 (Sprite::*)(int16)> (callback); debug(2, "SetFilterX(" #callback ")")
-#define SetFilterY(callback) _filterYCb = static_cast <int16 (Sprite::*)(int16)> (callback); debug(2, "SetFilterY(" #callback ")")
+#define SetSpriteUpdate(callback) \
+ do { \
+ _spriteUpdateCb = static_cast <void (Sprite::*)(void)> (callback); \
+ debug(2, "SetSpriteUpdate(" #callback ")"); \
+ _spriteUpdateCbName = #callback; \
+ } while (0)
+
+#define SetFilterX(callback) \
+ do { \
+ _filterXCb = static_cast <int16 (Sprite::*)(int16)> (callback); \
+ debug(2, "SetFilterX(" #callback ")"); \
+ } while (0)
+
+#define SetFilterY(callback) \
+ do { \
+ _filterYCb = static_cast <int16 (Sprite::*)(int16)> (callback); \
+ debug(2, "SetFilterY(" #callback ")"); \
+ } while (0)
const int16 kDefPosition = -32768;
@@ -113,7 +128,11 @@ protected:
#define AnimationCallback(callback) static_cast <void (AnimatedSprite::*)()> (callback)
#define GotoState(callback) gotoState(static_cast <void (AnimatedSprite::*)()> (callback))
-#define NextState(callback) _nextStateCb = static_cast <void (AnimatedSprite::*)(void)> (callback); debug(2, "NextState(" #callback ")"); _nextStateCbName = #callback
+#define NextState(callback) \
+ do { \
+ _nextStateCb = static_cast <void (AnimatedSprite::*)(void)> (callback); \
+ debug(2, "NextState(" #callback ")"); _nextStateCbName = #callback; \
+ } while (0)
#define FinalizeState(callback) setFinalizeState(static_cast <void (AnimatedSprite::*)()> (callback));
const int STICK_LAST_FRAME = -2;
diff --git a/engines/saga/events.cpp b/engines/saga/events.cpp
index d98cef0740..c5842f4998 100644
--- a/engines/saga/events.cpp
+++ b/engines/saga/events.cpp
@@ -533,6 +533,7 @@ int Events::handleOneShot(Event *event) {
default:
break;
}
+ break;
#ifdef ENABLE_IHNM
case kCutawayEvent:
switch (event->op) {
@@ -545,6 +546,7 @@ int Events::handleOneShot(Event *event) {
default:
break;
}
+ break;
#endif
case kActorEvent:
switch (event->op) {
@@ -554,6 +556,7 @@ int Events::handleOneShot(Event *event) {
default:
break;
}
+ break;
default:
break;
}
diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp
index 6af6326042..6f0b34b457 100644
--- a/engines/sci/engine/workarounds.cpp
+++ b/engines/sci/engine/workarounds.cpp
@@ -249,6 +249,7 @@ const SciWorkaroundEntry kDoSoundFade_workarounds[] = {
{ GID_KQ6, 105, 989, 0, "globalSound", "fade", -1, 0, { WORKAROUND_STILLCALL, 0 } }, // floppy: during intro, parameter 4 is an object
{ GID_KQ6, 460, 989, 0, "globalSound2", "fade", -1, 0, { WORKAROUND_STILLCALL, 0 } }, // after pulling the black widow's web on the isle of wonder, parameter 4 is an object - bug #3034567
{ GID_QFG4, -1, 64989, 0, "longSong", "fade", -1, 0, { WORKAROUND_STILLCALL, 0 } }, // CD version: many places, parameter 4 is an object (longSong)
+ { GID_SQ5, 800, 989, 0, "sq5Music1", "fade", -1, 0, { WORKAROUND_STILLCALL, 0 } }, // when cutting the wrong part of Goliath with the laser - bug #3614145
SCI_WORKAROUNDENTRY_TERMINATOR
};
diff --git a/engines/scumm/he/intern_he.h b/engines/scumm/he/intern_he.h
index fc5e4bcdf0..a674288775 100644
--- a/engines/scumm/he/intern_he.h
+++ b/engines/scumm/he/intern_he.h
@@ -628,7 +628,6 @@ public:
void parseEvents();
- bool _quit;
OSystem *_syst;
GameSettings _game;
diff --git a/engines/scumm/imuse/imuse.cpp b/engines/scumm/imuse/imuse.cpp
index a875702383..12ebfef9b7 100644
--- a/engines/scumm/imuse/imuse.cpp
+++ b/engines/scumm/imuse/imuse.cpp
@@ -46,7 +46,6 @@ namespace Scumm {
IMuseInternal::IMuseInternal() :
_native_mt32(false),
_enable_gs(false),
- _sc55(false),
_midi_adlib(NULL),
_midi_native(NULL),
_sysex(NULL),
@@ -495,12 +494,9 @@ uint32 IMuseInternal::property(int prop, uint32 value) {
case IMuse::PROP_GS:
_enable_gs = (value > 0);
- // If True Roland MT-32 is not selected, run in GM or GS mode.
- // If it is selected, change the Roland GS synth to MT-32 mode.
- if (_midi_native && !_native_mt32)
- initGM(_midi_native);
- else if (_midi_native && _native_mt32 && _enable_gs) {
- _sc55 = true;
+ // GS Mode emulates MT-32 on a GS device, so _native_mt32 should always be true
+ if (_midi_native && _enable_gs) {
+ _native_mt32 = true;
initGM(_midi_native);
}
break;
@@ -1499,7 +1495,7 @@ void IMuseInternal::initGM(MidiDriver *midi) {
if (_enable_gs) {
// All GS devices recognize the GS Reset command,
- // even with Roland's ID. It is impractical to
+ // even using Roland's ID. It is impractical to
// support other manufacturers' devices for
// further GS settings, as there are limitless
// numbers of them out there that would each
@@ -1513,30 +1509,28 @@ void IMuseInternal::initGM(MidiDriver *midi) {
midi->sysEx(buffer, 9);
debug(2, "GS SysEx: GS Reset");
_system->delayMillis(200);
+
+ // Set global Master Tune to 442.0kHz, as on the MT-32
+ memcpy(&buffer[4], "\x40\x00\x00\x00\x04\x04\x0F\x29", 8);
+ midi->sysEx(buffer, 12);
+ debug(2, "GS SysEx: Master Tune set to 442.0kHz");
- if (_sc55) {
- // This mode is for GS devices that support an MT-32-compatible
- // Map, such as the Roland Sound Canvas line of modules. It
- // will allow them to work with True MT-32 mode, but will
- // obviously still ignore MT-32 SysEx (and thus custom
- // instruments).
-
- // Set Channels 1-16 to SC-55 Map, then CM-64/32L Variation
- for (i = 0; i < 16; ++i) {
- midi->send((127 << 16) | (0 << 8) | (0xB0 | i));
- midi->send((1 << 16) | (32 << 8) | (0xB0 | i));
- midi->send((0 << 16) | (0 << 8) | (0xC0 | i));
- }
- debug(2, "GS Program Change: CM-64/32L Map Selected");
-
- // Set Percussion Channel to SC-55 Map (CC#32, 01H), then
- // Switch Drum Map to CM-64/32L (MT-32 Compatible Drums)
- midi->getPercussionChannel()->controlChange(0, 0);
- midi->getPercussionChannel()->controlChange(32, 1);
- midi->send(127 << 8 | 0xC0 | 9);
- debug(2, "GS Program Change: Drum Map is CM-64/32L");
+ // Note: All Roland GS devices support CM-64/32L maps
+ // Set Channels 1-16 to SC-55 Map, then CM-64/32L Variation
+ for (i = 0; i < 16; ++i) {
+ midi->send((127 << 16) | (0 << 8) | (0xB0 | i));
+ midi->send((1 << 16) | (32 << 8) | (0xB0 | i));
+ midi->send((0 << 16) | (0 << 8) | (0xC0 | i));
}
+ debug(2, "GS Program Change: CM-64/32L Map Selected");
+
+ // Set Percussion Channel to SC-55 Map (CC#32, 01H), then
+ // Switch Drum Map to CM-64/32L (MT-32 Compatible Drums)
+ midi->getPercussionChannel()->controlChange(0, 0);
+ midi->getPercussionChannel()->controlChange(32, 1);
+ midi->send(127 << 8 | 0xC0 | 9);
+ debug(2, "GS Program Change: Drum Map is CM-64/32L");
// Set Master Chorus to 0. The MT-32 has no chorus capability.
memcpy(&buffer[4], "\x40\x01\x3A\x00\x05", 5);
diff --git a/engines/scumm/imuse/imuse_internal.h b/engines/scumm/imuse/imuse_internal.h
index 6be564a517..d17d4ed28b 100644
--- a/engines/scumm/imuse/imuse_internal.h
+++ b/engines/scumm/imuse/imuse_internal.h
@@ -390,7 +390,6 @@ class IMuseInternal : public IMuse {
protected:
bool _native_mt32;
bool _enable_gs;
- bool _sc55;
MidiDriver *_midi_adlib;
MidiDriver *_midi_native;
TimerCallbackInfo _timer_info_adlib;
diff --git a/engines/scumm/imuse_digi/dimuse.cpp b/engines/scumm/imuse_digi/dimuse.cpp
index eb3717494f..a737539c44 100644
--- a/engines/scumm/imuse_digi/dimuse.cpp
+++ b/engines/scumm/imuse_digi/dimuse.cpp
@@ -275,9 +275,12 @@ void IMuseDigital::callback() {
feedSize &= ~1;
if (channels == 2)
feedSize &= ~3;
- } else {
+ } else if (bits == 8) {
if (channels == 2)
feedSize &= ~1;
+ } else {
+ warning("IMuseDigita::callback: Unexpected sample width, %d bits", bits);
+ continue;
}
if (feedSize == 0)
diff --git a/engines/sky/music/musicbase.cpp b/engines/sky/music/musicbase.cpp
index b388afdb13..944edb1fdc 100644
--- a/engines/sky/music/musicbase.cpp
+++ b/engines/sky/music/musicbase.cpp
@@ -44,9 +44,9 @@ MusicBase::~MusicBase() {
}
void MusicBase::loadSection(uint8 pSection) {
- Common::StackLock lock(_mutex);
if (_currentMusic)
stopMusicInternal();
+ Common::StackLock lock(_mutex);
free(_musicData);
_currentSection = pSection;
_musicData = _skyDisk->loadFile(_driverFileBase + FILES_PER_SECTION * pSection);
@@ -70,13 +70,14 @@ bool MusicBase::musicIsPlaying() {
}
void MusicBase::stopMusic() {
- Common::StackLock lock(_mutex);
stopMusicInternal();
}
void MusicBase::stopMusicInternal() {
_mixer->stopHandle(_musicHandle);
+ Common::StackLock lock(_mutex);
+
for (uint8 cnt = 0; cnt < _numberOfChannels; cnt++)
delete _channels[cnt];
_numberOfChannels = 0;
diff --git a/engines/testbed/midi.cpp b/engines/testbed/midi.cpp
index 70ede406d5..33fab03a5e 100644
--- a/engines/testbed/midi.cpp
+++ b/engines/testbed/midi.cpp
@@ -103,7 +103,7 @@ TestExitStatus MidiTests::playMidiMusic() {
return kTestFailed;
}
- Testsuite::logDetailedPrintf("Info! Midi: Succesfully opened the driver\n");
+ Testsuite::logDetailedPrintf("Info! Midi: Successfully opened the driver\n");
Common::MemoryWriteStreamDynamic ws(DisposeAfterUse::YES);
loadMusicInMemory(&ws);
diff --git a/engines/tinsel/detection.cpp b/engines/tinsel/detection.cpp
index 2e4be33e53..a7ba8b28cb 100644
--- a/engines/tinsel/detection.cpp
+++ b/engines/tinsel/detection.cpp
@@ -67,7 +67,7 @@ bool TinselEngine::getIsADGFDemo() const {
return (bool)(_gameDescription->desc.flags & ADGF_DEMO);
}
-bool TinselEngine::isCD() const {
+bool TinselEngine::isV1CD() const {
return (bool)(_gameDescription->desc.flags & ADGF_CD);
}
diff --git a/engines/tinsel/detection_tables.h b/engines/tinsel/detection_tables.h
index f05f39b319..a945672da2 100644
--- a/engines/tinsel/detection_tables.h
+++ b/engines/tinsel/detection_tables.h
@@ -34,6 +34,8 @@ static const TinselGameDescription gameDescriptions[] = {
// TINSEL_V2: The Discworld 2 game used this updated version of the Tinsel 1 engine,
// and as far as we know there aren't any variations of this engine.
+ // ==== Discworld 1 early (TinselV0) entries ==============================
+
{ // Floppy Demo V0 from http://www.adventure-treff.de/specials/dl_demos.php
{
"dw",
@@ -51,6 +53,8 @@ static const TinselGameDescription gameDescriptions[] = {
TINSEL_V0,
},
+ // ==== Discworld 1 entries ===============================================
+
{ // CD Demo V1 version, with *.gra files
{
"dw",
@@ -553,6 +557,9 @@ static const TinselGameDescription gameDescriptions[] = {
TINSEL_V1,
},
+ // ==== Discworld 2 entries ===============================================
+ // Note: All Discworld 2 versions are CD only, therefore we don't add the ADGF_CD flag
+
{ // English Discworld 2 demo
{
"dw2",
@@ -564,7 +571,7 @@ static const TinselGameDescription gameDescriptions[] = {
},
Common::EN_ANY,
Common::kPlatformDOS,
- ADGF_DEMO | ADGF_CD,
+ ADGF_DEMO,
GUIO1(GUIO_NOASPECT)
},
GID_DW2,
@@ -584,7 +591,7 @@ static const TinselGameDescription gameDescriptions[] = {
},
Common::EN_GRB,
Common::kPlatformDOS,
- ADGF_CD,
+ ADGF_NO_FLAGS,
GUIO1(GUIO_NOASPECT)
},
GID_DW2,
@@ -604,7 +611,7 @@ static const TinselGameDescription gameDescriptions[] = {
},
Common::EN_USA,
Common::kPlatformDOS,
- ADGF_CD,
+ ADGF_NO_FLAGS,
GUIO1(GUIO_NOASPECT)
},
GID_DW2,
@@ -624,7 +631,7 @@ static const TinselGameDescription gameDescriptions[] = {
},
Common::FR_FRA,
Common::kPlatformDOS,
- ADGF_CD,
+ ADGF_NO_FLAGS,
GUIO1(GUIO_NOASPECT)
},
GID_DW2,
@@ -644,7 +651,7 @@ static const TinselGameDescription gameDescriptions[] = {
},
Common::DE_DEU,
Common::kPlatformDOS,
- ADGF_CD,
+ ADGF_NO_FLAGS,
GUIO1(GUIO_NOASPECT)
},
GID_DW2,
@@ -665,7 +672,7 @@ static const TinselGameDescription gameDescriptions[] = {
},
Common::IT_ITA,
Common::kPlatformDOS,
- ADGF_CD,
+ ADGF_NO_FLAGS,
GUIO1(GUIO_NOASPECT)
},
GID_DW2,
@@ -685,7 +692,7 @@ static const TinselGameDescription gameDescriptions[] = {
},
Common::ES_ESP,
Common::kPlatformDOS,
- ADGF_CD,
+ ADGF_NO_FLAGS,
GUIO1(GUIO_NOASPECT)
},
GID_DW2,
@@ -706,7 +713,7 @@ static const TinselGameDescription gameDescriptions[] = {
},
Common::RU_RUS,
Common::kPlatformDOS,
- ADGF_CD,
+ ADGF_NO_FLAGS,
GUIO1(GUIO_NOASPECT)
},
GID_DW2,
diff --git a/engines/tinsel/sound.cpp b/engines/tinsel/sound.cpp
index cadc754de6..416ee74127 100644
--- a/engines/tinsel/sound.cpp
+++ b/engines/tinsel/sound.cpp
@@ -75,7 +75,7 @@ SoundManager::~SoundManager() {
// playSample for DiscWorld 1
bool SoundManager::playSample(int id, Audio::Mixer::SoundType type, Audio::SoundHandle *handle) {
// Floppy version has no sample file.
- if (!_vm->isCD())
+ if (!_vm->isV1CD())
return false;
// no sample driver?
@@ -207,10 +207,6 @@ void SoundManager::playDW1MacMusic(Common::File &s, uint32 length) {
bool SoundManager::playSample(int id, int sub, bool bLooped, int x, int y, int priority,
Audio::Mixer::SoundType type, Audio::SoundHandle *handle) {
- // Floppy version has no sample file
- if (!_vm->isCD())
- return false;
-
// no sample driver?
if (!_vm->_mixer->isReady())
return false;
@@ -501,8 +497,8 @@ void SoundManager::showSoundError(const char *errorMsg, const char *soundFile) {
* Opens and inits all sound sample files.
*/
void SoundManager::openSampleFiles() {
- // Floppy and demo versions have no sample files, except for the Discworld 2 demo
- if (!_vm->isCD())
+ // V1 Floppy and V0 demo versions have no sample files
+ if (TinselV0 || (TinselV1 && !_vm->isV1CD()))
return;
TinselFile f;
diff --git a/engines/tinsel/tinsel.h b/engines/tinsel/tinsel.h
index ec504b69cd..56fed3007f 100644
--- a/engines/tinsel/tinsel.h
+++ b/engines/tinsel/tinsel.h
@@ -184,7 +184,7 @@ public:
uint32 getFlags() const;
Common::Platform getPlatform() const;
bool getIsADGFDemo() const;
- bool isCD() const;
+ bool isV1CD() const;
const char *getSampleIndex(LANGUAGE lang);
const char *getSampleFile(LANGUAGE lang);
diff --git a/engines/tony/gfxengine.cpp b/engines/tony/gfxengine.cpp
index cb27e20ab1..7bb25f59b9 100644
--- a/engines/tony/gfxengine.cpp
+++ b/engines/tony/gfxengine.cpp
@@ -530,7 +530,10 @@ void RMGfxEngine::disableMouse() {
#define TONY_SAVEGAME_VERSION 8
void RMGfxEngine::saveState(const Common::String &fn, byte *curThumb, const Common::String &name) {
- Common::OutSaveFile *f;
+ Common::OutSaveFile *f = g_system->getSavefileManager()->openForSaving(fn);
+ if (f == NULL)
+ return;
+
byte *state;
char buf[4];
RMPoint tp = _tony.position();
@@ -549,10 +552,6 @@ void RMGfxEngine::saveState(const Common::String &fn, byte *curThumb, const Comm
buf[2] = 'S';
buf[3] = TONY_SAVEGAME_VERSION;
- f = g_system->getSavefileManager()->openForSaving(fn);
- if (f == NULL)
- return;
-
f->write(buf, 4);
f->writeUint32LE(thumbsize);
f->write(curThumb, thumbsize);
diff --git a/engines/tony/mpal/mpal.cpp b/engines/tony/mpal/mpal.cpp
index 1a24c5a576..1de5c6850c 100644
--- a/engines/tony/mpal/mpal.cpp
+++ b/engines/tony/mpal/mpal.cpp
@@ -521,14 +521,15 @@ static LpItem getItemData(uint32 nOrdItem) {
dat += dim;
}
- // Check if we've got to the end of the file
int i = READ_LE_UINT16(dat);
- if (i != 0xABCD)
- return NULL;
globalUnlock(hDat);
globalFree(hDat);
+ // Check if we've got to the end of the file
+ if (i != 0xABCD)
+ return NULL;
+
return ret;
}
diff --git a/engines/wintermute/base/base_file_manager.cpp b/engines/wintermute/base/base_file_manager.cpp
index 4c7c31562d..7d59b03684 100644
--- a/engines/wintermute/base/base_file_manager.cpp
+++ b/engines/wintermute/base/base_file_manager.cpp
@@ -192,7 +192,7 @@ bool BaseFileManager::registerPackages() {
Common::FSList files;
for (Common::FSList::iterator it = _packagePaths.begin(); it != _packagePaths.end(); ++it) {
debugC(kWintermuteDebugFileAccess, "Should register folder: %s %s", (*it).getPath().c_str(), (*it).getName().c_str());
- if ((*it).getChildren(files, Common::FSNode::kListFilesOnly)) {
+ if (!(*it).getChildren(files, Common::FSNode::kListFilesOnly)) {
warning("getChildren() failed for path: %s", (*it).getDisplayName().c_str());
}
for (Common::FSList::iterator fileIt = files.begin(); fileIt != files.end(); ++fileIt) {
diff --git a/engines/wintermute/wintermute.cpp b/engines/wintermute/wintermute.cpp
index 89a6f1b3e0..92381742de 100644
--- a/engines/wintermute/wintermute.cpp
+++ b/engines/wintermute/wintermute.cpp
@@ -292,7 +292,6 @@ bool WintermuteEngine::getGameInfo(const Common::FSList &fslist, Common::String
Common::SeekableReadStream *stream = nullptr;
// Quick-fix, instead of possibly breaking the persistence-system, let's just roll with it
BaseFileManager *fileMan = new BaseFileManager(Common::UNK_LANG, true);
- fileMan->registerPackages(fslist);
stream = fileMan->openFile("startup.settings", false, false);
// The process is as follows: Check the "GAME=" tag in startup.settings, to decide where the
diff --git a/gui/options.cpp b/gui/options.cpp
index fb57c15d98..a9fdc19274 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -887,7 +887,7 @@ void OptionsDialog::addMT32Controls(GuiObject *boss, const Common::String &prefi
_mt32Checkbox = new CheckboxWidget(boss, prefix + "mcMt32Checkbox", _c("True Roland MT-32 (no GM emulation)", "lowres"), _("Check if you want to use your real hardware Roland-compatible sound device connected to your computer"));
// GS Extensions setting
- _enableGSCheckbox = new CheckboxWidget(boss, prefix + "mcGSCheckbox", _("Roland GS Mode (disable GM mapping)"), _("Turns off General MIDI mapping for games with Roland MT-32 soundtrack"));
+ _enableGSCheckbox = new CheckboxWidget(boss, prefix + "mcGSCheckbox", _("Roland GS Device (enable MT-32 mappings)"), _("Check if you want to enable patch mappings to emulate an MT-32 on a Roland GS device"));
const MusicPlugin::List p = MusicMan.getPlugins();
// Make sure the null device is the first one in the list to avoid undesired