diff options
author | Matthew Hoops | 2011-05-11 00:30:02 -0400 |
---|---|---|
committer | Matthew Hoops | 2011-05-11 00:30:28 -0400 |
commit | a1d41da096c0bcf502a85919cb1cb1ee471719c5 (patch) | |
tree | 8c51419daa486f1d4833757db4715dadab6c3497 /engines/gob | |
parent | accb0c2a5d0c9e7b353cda4b74f511a498ed8073 (diff) | |
parent | 33c3e19cea2a08fbf26ecbe940763e8ee1c37d28 (diff) | |
download | scummvm-rg350-a1d41da096c0bcf502a85919cb1cb1ee471719c5.tar.gz scummvm-rg350-a1d41da096c0bcf502a85919cb1cb1ee471719c5.tar.bz2 scummvm-rg350-a1d41da096c0bcf502a85919cb1cb1ee471719c5.zip |
Merge remote branch 'upstream/master' into t7g-ios
Conflicts:
audio/decoders/qdm2.h
common/util.cpp
engines/groovie/music.cpp
engines/groovie/resource.h
video/qt_decoder.cpp
video/qt_decoder.h
Diffstat (limited to 'engines/gob')
28 files changed, 62 insertions, 36 deletions
diff --git a/engines/gob/databases.cpp b/engines/gob/databases.cpp index 66a711e46e..94f641db4e 100644 --- a/engines/gob/databases.cpp +++ b/engines/gob/databases.cpp @@ -24,6 +24,7 @@ */ #include "common/file.h" +#include "common/textconsole.h" #include "gob/databases.h" diff --git a/engines/gob/dataio.cpp b/engines/gob/dataio.cpp index 78fc0ab3c1..aa2743b5ed 100644 --- a/engines/gob/dataio.cpp +++ b/engines/gob/dataio.cpp @@ -26,6 +26,7 @@ #include "common/endian.h" #include "common/types.h" #include "common/memstream.h" +#include "common/substream.h" #include "gob/gob.h" #include "gob/dataio.h" @@ -345,9 +346,8 @@ Common::SeekableReadStream *DataIO::getFile(File &file) { if (!file.archive->file.seek(file.offset)) return 0; - Common::SeekableReadStream *rawData = file.archive->file.readStream(file.size); - if (!rawData) - return 0; + Common::SeekableReadStream *rawData = + new Common::SafeSubReadStream(&file.archive->file, file.offset, file.offset + file.size); if (!file.packed) return rawData; diff --git a/engines/gob/dataio.h b/engines/gob/dataio.h index 6e12d15af8..f2b39aed09 100644 --- a/engines/gob/dataio.h +++ b/engines/gob/dataio.h @@ -33,7 +33,7 @@ #include "common/file.h" namespace Common { - class SeekableReadStream; +class SeekableReadStream; } namespace Gob { diff --git a/engines/gob/detection_tables.h b/engines/gob/detection_tables.h index b12fb81be1..832300f785 100644 --- a/engines/gob/detection_tables.h +++ b/engines/gob/detection_tables.h @@ -2278,6 +2278,20 @@ static const GOBGameDescription gameDescriptions[] = { kFeaturesAdLib, "disk0.stk", 0, 0 }, + { // Supplied by alex86r in bug report #3297633 + { + "fascination", + "VGA 3 disks edition", + AD_ENTRY1s("disk0.stk", "ab3dfdce43917bc806812959d692fc8f", 1061929), + IT_ITA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO_NOSUBTITLES | GUIO_NOSPEECH + }, + kGameTypeFascination, + kFeaturesAdLib, + "disk0.stk", 0, 0 + }, { { "fascination", @@ -3779,6 +3793,20 @@ static const GOBGameDescription gameDescriptions[] = { kFeatures640x480 | kFeaturesTrueColor, 0, 0, 0 }, + { // Supplied by alex86r in bug report #3297602 + { + "urban", + "", + AD_ENTRY1s("intro.stk", "4e4a3c017fe5475353bf94c455fe3efd", 1253448), + IT_ITA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO_NOSUBTITLES | GUIO_NOSPEECH + }, + kGameTypeUrban, + kFeatures640x480 | kFeaturesTrueColor, + 0, 0, 0 + }, { // Supplied by goodoldgeorg in bug report #2770340 { "urban", diff --git a/engines/gob/draw_v2.cpp b/engines/gob/draw_v2.cpp index 15a8f7ff8e..c07f8de69d 100644 --- a/engines/gob/draw_v2.cpp +++ b/engines/gob/draw_v2.cpp @@ -899,17 +899,12 @@ void Draw_v2::spriteOperation(int16 operation) { _spriteTop = spriteTop; _spriteRight = spriteRight; _spriteBottom = spriteBottom; - _destSpriteX = destSpriteX; + if (operation != DRAW_PRINTTEXT) + _destSpriteX = destSpriteX; _destSpriteY = destSpriteY; _destSurface = destSurface; _sourceSurface = sourceSurface; - if (operation == DRAW_PRINTTEXT) { - len = _fonts[_fontIndex]->getCharWidth(); - adjustCoords(1, &len, 0); - _destSpriteX += len * strlen(_textToPrint); - } - if ((_renderFlags & RENDERFLAG_USEDELTAS) && !deltaVeto) { if (_sourceSurface == kBackSurface) { _spriteLeft -= _backDeltaX; diff --git a/engines/gob/gob.cpp b/engines/gob/gob.cpp index 12914163c2..3d697d3693 100644 --- a/engines/gob/gob.cpp +++ b/engines/gob/gob.cpp @@ -24,14 +24,11 @@ */ #include "common/debug-channels.h" -#include "common/endian.h" -#include "common/events.h" #include "common/EventRecorder.h" #include "backends/audiocd/audiocd.h" #include "base/plugins.h" #include "common/config-manager.h" -#include "common/md5.h" #include "audio/mididrv.h" #include "gui/gui-manager.h" diff --git a/engines/gob/gob.h b/engines/gob/gob.h index 9bdbed45cf..4a928747b0 100644 --- a/engines/gob/gob.h +++ b/engines/gob/gob.h @@ -30,12 +30,14 @@ #include "common/system.h" #include "common/savefile.h" +#include "graphics/pixelformat.h" + #include "engines/engine.h" #include "gob/console.h" namespace GUI { - class StaticTextWidget; +class StaticTextWidget; } /** diff --git a/engines/gob/inter_v1.cpp b/engines/gob/inter_v1.cpp index 262fdc8045..8f1ff4c73f 100644 --- a/engines/gob/inter_v1.cpp +++ b/engines/gob/inter_v1.cpp @@ -23,9 +23,7 @@ * */ -#include "common/endian.h" #include "common/str.h" -#include "common/file.h" #include "gob/gob.h" #include "gob/inter.h" diff --git a/engines/gob/inter_v4.cpp b/engines/gob/inter_v4.cpp index 778387e52d..1da92b3766 100644 --- a/engines/gob/inter_v4.cpp +++ b/engines/gob/inter_v4.cpp @@ -23,9 +23,7 @@ * */ -#include "common/endian.h" #include "common/str.h" -#include "common/file.h" #include "gob/gob.h" #include "gob/inter.h" diff --git a/engines/gob/inter_v5.cpp b/engines/gob/inter_v5.cpp index 85b213ae66..f5e87bb936 100644 --- a/engines/gob/inter_v5.cpp +++ b/engines/gob/inter_v5.cpp @@ -23,9 +23,6 @@ * */ -#include "common/endian.h" -#include "common/file.h" - #include "gui/message.h" #include "gob/gob.h" diff --git a/engines/gob/inter_v6.cpp b/engines/gob/inter_v6.cpp index 06a06f4fb6..53ebfe7513 100644 --- a/engines/gob/inter_v6.cpp +++ b/engines/gob/inter_v6.cpp @@ -23,9 +23,7 @@ * */ -#include "common/endian.h" #include "common/str.h" -#include "common/file.h" #include "graphics/dither.h" #include "gob/gob.h" diff --git a/engines/gob/resources.h b/engines/gob/resources.h index 9921dc6e76..dec64f6b7c 100644 --- a/engines/gob/resources.h +++ b/engines/gob/resources.h @@ -29,7 +29,7 @@ #include "common/str.h" namespace Common { - class SeekableReadStream; +class SeekableReadStream; } namespace Gob { diff --git a/engines/gob/save/savefile.cpp b/engines/gob/save/savefile.cpp index d472ef600b..45cd2a2b7d 100644 --- a/engines/gob/save/savefile.cpp +++ b/engines/gob/save/savefile.cpp @@ -336,7 +336,7 @@ bool SavePartSprite::read(Common::ReadStream &stream) { // If it's in the current format, the true color flag has to be the same too if (!_oldFormat) - if (stream.readByte() != _trueColor) + if ((stream.readByte() != 0) != _trueColor) return false; // Sprite data diff --git a/engines/gob/save/savehandler.cpp b/engines/gob/save/savehandler.cpp index 8cb8274402..21102ae786 100644 --- a/engines/gob/save/savehandler.cpp +++ b/engines/gob/save/savehandler.cpp @@ -113,8 +113,8 @@ void SlotFileIndexed::buildIndex(byte *buffer, SavePartInfo &info, if (setLongest) { uint32 slot0Len; for (slot0Len = strlen((const char *) bufferStart); slot0Len < longest; slot0Len++) - buffer[slot0Len] = ' '; - buffer[slot0Len] = '\0'; + bufferStart[slot0Len] = ' '; + bufferStart[slot0Len] = '\0'; } } diff --git a/engines/gob/save/saveload.cpp b/engines/gob/save/saveload.cpp index 3508e58f16..e490509914 100644 --- a/engines/gob/save/saveload.cpp +++ b/engines/gob/save/saveload.cpp @@ -23,9 +23,6 @@ * */ -#include "common/endian.h" -#include "common/savefile.h" - #include "gob/gob.h" #include "gob/save/saveload.h" #include "gob/global.h" diff --git a/engines/gob/save/saveload_v6.cpp b/engines/gob/save/saveload_v6.cpp index 37ac08ebea..248fe0a93f 100644 --- a/engines/gob/save/saveload_v6.cpp +++ b/engines/gob/save/saveload_v6.cpp @@ -284,6 +284,9 @@ SaveLoad_v6::GameHandler::GameHandler(GobEngine *vm, const char *target, SaveLoad_v6::GameHandler::~GameHandler() { delete _slotFile; + + delete _reader; + delete _writer; } int32 SaveLoad_v6::GameHandler::getSize() { diff --git a/engines/gob/sound/adlib.cpp b/engines/gob/sound/adlib.cpp index f070bf14fa..4244df68e5 100644 --- a/engines/gob/sound/adlib.cpp +++ b/engines/gob/sound/adlib.cpp @@ -23,8 +23,10 @@ * */ +#include "common/debug.h" #include "common/file.h" #include "common/endian.h" +#include "common/textconsole.h" #include "gob/gob.h" #include "gob/sound/adlib.h" diff --git a/engines/gob/sound/bgatmosphere.cpp b/engines/gob/sound/bgatmosphere.cpp index 8850a727d3..b351d92275 100644 --- a/engines/gob/sound/bgatmosphere.cpp +++ b/engines/gob/sound/bgatmosphere.cpp @@ -23,8 +23,6 @@ * */ -#include "common/system.h" -#include "common/events.h" #include "common/EventRecorder.h" #include "gob/sound/bgatmosphere.h" diff --git a/engines/gob/sound/cdrom.cpp b/engines/gob/sound/cdrom.cpp index 4f3d783046..217aa9c18e 100644 --- a/engines/gob/sound/cdrom.cpp +++ b/engines/gob/sound/cdrom.cpp @@ -25,6 +25,7 @@ #include "common/endian.h" #include "common/str.h" +#include "common/textconsole.h" #include "common/util.h" #include "backends/audiocd/audiocd.h" diff --git a/engines/gob/sound/infogrames.cpp b/engines/gob/sound/infogrames.cpp index 6377b4e798..9fb7410740 100644 --- a/engines/gob/sound/infogrames.cpp +++ b/engines/gob/sound/infogrames.cpp @@ -23,6 +23,8 @@ * */ +#include "common/textconsole.h" + #include "gob/sound/infogrames.h" namespace Gob { diff --git a/engines/gob/sound/sounddesc.cpp b/engines/gob/sound/sounddesc.cpp index d33ea89147..cc1c6b1f6b 100644 --- a/engines/gob/sound/sounddesc.cpp +++ b/engines/gob/sound/sounddesc.cpp @@ -25,6 +25,8 @@ #include "common/util.h" #include "common/memstream.h" +#include "common/textconsole.h" + #include "audio/mixer.h" #include "audio/decoders/raw.h" #include "audio/decoders/wave.h" diff --git a/engines/gob/sound/soundmixer.cpp b/engines/gob/sound/soundmixer.cpp index b6082c577c..3b6b2e5d52 100644 --- a/engines/gob/sound/soundmixer.cpp +++ b/engines/gob/sound/soundmixer.cpp @@ -23,6 +23,8 @@ * */ +#include "common/util.h" + #include "gob/sound/soundmixer.h" #include "gob/sound/sounddesc.h" diff --git a/engines/gob/surface.cpp b/engines/gob/surface.cpp index c3e8cd9ff5..7bd8aae597 100644 --- a/engines/gob/surface.cpp +++ b/engines/gob/surface.cpp @@ -31,6 +31,8 @@ #include "common/frac.h" #include "graphics/primitives.h" +#include "graphics/pixelformat.h" +#include "graphics/surface.h" namespace Gob { diff --git a/engines/gob/surface.h b/engines/gob/surface.h index 3dea18e36e..b84927af70 100644 --- a/engines/gob/surface.h +++ b/engines/gob/surface.h @@ -34,7 +34,7 @@ #include "graphics/iff.h" namespace Common { - class SeekableReadStream; +class SeekableReadStream; } namespace Gob { diff --git a/engines/gob/totfile.h b/engines/gob/totfile.h index 211232f870..ce467425e2 100644 --- a/engines/gob/totfile.h +++ b/engines/gob/totfile.h @@ -29,7 +29,7 @@ #include "common/str.h" namespace Common { - class SeekableReadStream; +class SeekableReadStream; } namespace Gob { diff --git a/engines/gob/util.cpp b/engines/gob/util.cpp index 4d51b3d61f..787f85175a 100644 --- a/engines/gob/util.cpp +++ b/engines/gob/util.cpp @@ -36,6 +36,8 @@ #include "common/events.h" +#include "graphics/palette.h" + namespace Gob { Util::Util(GobEngine *vm) : _vm(vm) { diff --git a/engines/gob/video.cpp b/engines/gob/video.cpp index 444ff8ed9e..1d74a07bfc 100644 --- a/engines/gob/video.cpp +++ b/engines/gob/video.cpp @@ -29,6 +29,7 @@ #include "graphics/cursorman.h" #include "graphics/fontman.h" +#include "graphics/palette.h" #include "graphics/surface.h" #include "gob/gob.h" diff --git a/engines/gob/videoplayer.cpp b/engines/gob/videoplayer.cpp index 8222c99ef3..de149c9787 100644 --- a/engines/gob/videoplayer.cpp +++ b/engines/gob/videoplayer.cpp @@ -720,7 +720,7 @@ bool VideoPlayer::copyFrame(int slot, Surface &dest, if (!surface) return false; - Surface src(surface->w, surface->h, surface->bytesPerPixel, (byte *)surface->pixels); + Surface src(surface->w, surface->h, surface->format.bytesPerPixel, (byte *)surface->pixels); dest.blit(src, left, top, left + width - 1, top + height - 1, x, y, transp); return true; |