diff options
author | Sven Hesse | 2009-07-24 21:31:00 +0000 |
---|---|---|
committer | Sven Hesse | 2009-07-24 21:31:00 +0000 |
commit | adc537161a048939c995475707f70cbe9c34b720 (patch) | |
tree | b35ad12482678964dc14a68f124bf5d7961d4726 /engines/gob | |
parent | 44fb798a3af69ec7e983b60011d8153b804168ba (diff) | |
download | scummvm-rg350-adc537161a048939c995475707f70cbe9c34b720.tar.gz scummvm-rg350-adc537161a048939c995475707f70cbe9c34b720.tar.bz2 scummvm-rg350-adc537161a048939c995475707f70cbe9c34b720.zip |
Adding subtitle support to Woodruff
svn-id: r42705
Diffstat (limited to 'engines/gob')
-rw-r--r-- | engines/gob/detection.cpp | 50 | ||||
-rw-r--r-- | engines/gob/draw.h | 2 | ||||
-rw-r--r-- | engines/gob/draw_v2.cpp | 6 | ||||
-rw-r--r-- | engines/gob/gob.cpp | 4 | ||||
-rw-r--r-- | engines/gob/gob.h | 2 | ||||
-rw-r--r-- | engines/gob/scenery.cpp | 5 | ||||
-rw-r--r-- | engines/gob/videoplayer.cpp | 3 |
7 files changed, 45 insertions, 27 deletions
diff --git a/engines/gob/detection.cpp b/engines/gob/detection.cpp index 61c17b16f8..8e5867b46d 100644 --- a/engines/gob/detection.cpp +++ b/engines/gob/detection.cpp @@ -2750,7 +2750,7 @@ static const GOBGameDescription gameDescriptions[] = { EN_GRB, kPlatformPC, ADGF_NO_FLAGS, - GUIO_NOSUBTITLES | GUIO_NOSPEECH + GUIO_NOSPEECH }, kGameTypeWoodruff, kFeatures640, @@ -2764,7 +2764,7 @@ static const GOBGameDescription gameDescriptions[] = { DE_DEU, kPlatformPC, ADGF_NO_FLAGS, - GUIO_NOSUBTITLES | GUIO_NOSPEECH + GUIO_NOSPEECH }, kGameTypeWoodruff, kFeatures640, @@ -2778,7 +2778,7 @@ static const GOBGameDescription gameDescriptions[] = { FR_FRA, kPlatformPC, ADGF_NO_FLAGS, - GUIO_NOSUBTITLES | GUIO_NOSPEECH + GUIO_NOSPEECH }, kGameTypeWoodruff, kFeatures640, @@ -2792,7 +2792,7 @@ static const GOBGameDescription gameDescriptions[] = { IT_ITA, kPlatformPC, ADGF_NO_FLAGS, - GUIO_NOSUBTITLES | GUIO_NOSPEECH + GUIO_NOSPEECH }, kGameTypeWoodruff, kFeatures640, @@ -2806,7 +2806,7 @@ static const GOBGameDescription gameDescriptions[] = { ES_ESP, kPlatformPC, ADGF_NO_FLAGS, - GUIO_NOSUBTITLES | GUIO_NOSPEECH + GUIO_NOSPEECH }, kGameTypeWoodruff, kFeatures640, @@ -2820,7 +2820,7 @@ static const GOBGameDescription gameDescriptions[] = { EN_GRB, kPlatformPC, ADGF_NO_FLAGS, - GUIO_NOSUBTITLES | GUIO_NOSPEECH + GUIO_NOSPEECH }, kGameTypeWoodruff, kFeatures640, @@ -2834,7 +2834,7 @@ static const GOBGameDescription gameDescriptions[] = { DE_DEU, kPlatformPC, ADGF_NO_FLAGS, - GUIO_NOSUBTITLES | GUIO_NOSPEECH + GUIO_NOSPEECH }, kGameTypeWoodruff, kFeatures640, @@ -2848,7 +2848,7 @@ static const GOBGameDescription gameDescriptions[] = { FR_FRA, kPlatformPC, ADGF_NO_FLAGS, - GUIO_NOSUBTITLES | GUIO_NOSPEECH + GUIO_NOSPEECH }, kGameTypeWoodruff, kFeatures640, @@ -2862,7 +2862,7 @@ static const GOBGameDescription gameDescriptions[] = { IT_ITA, kPlatformPC, ADGF_NO_FLAGS, - GUIO_NOSUBTITLES | GUIO_NOSPEECH + GUIO_NOSPEECH }, kGameTypeWoodruff, kFeatures640, @@ -2876,7 +2876,7 @@ static const GOBGameDescription gameDescriptions[] = { ES_ESP, kPlatformPC, ADGF_NO_FLAGS, - GUIO_NOSUBTITLES | GUIO_NOSPEECH + GUIO_NOSPEECH }, kGameTypeWoodruff, kFeatures640, @@ -2890,7 +2890,7 @@ static const GOBGameDescription gameDescriptions[] = { DE_DEU, kPlatformPC, ADGF_NO_FLAGS, - GUIO_NOSUBTITLES | GUIO_NOSPEECH + GUIO_NOSPEECH }, kGameTypeWoodruff, kFeatures640, @@ -2904,7 +2904,7 @@ static const GOBGameDescription gameDescriptions[] = { ES_ESP, kPlatformPC, ADGF_NO_FLAGS, - GUIO_NOSUBTITLES | GUIO_NOSPEECH + GUIO_NOSPEECH }, kGameTypeWoodruff, kFeatures640, @@ -2918,7 +2918,7 @@ static const GOBGameDescription gameDescriptions[] = { EN_GRB, kPlatformPC, ADGF_NO_FLAGS, - GUIO_NOSUBTITLES | GUIO_NOSPEECH + GUIO_NOSPEECH }, kGameTypeWoodruff, kFeatures640, @@ -2932,7 +2932,7 @@ static const GOBGameDescription gameDescriptions[] = { DE_DEU, kPlatformPC, ADGF_NO_FLAGS, - GUIO_NOSUBTITLES | GUIO_NOSPEECH + GUIO_NOSPEECH }, kGameTypeWoodruff, kFeatures640, @@ -2946,7 +2946,7 @@ static const GOBGameDescription gameDescriptions[] = { FR_FRA, kPlatformPC, ADGF_NO_FLAGS, - GUIO_NOSUBTITLES | GUIO_NOSPEECH + GUIO_NOSPEECH }, kGameTypeWoodruff, kFeatures640, @@ -2960,7 +2960,7 @@ static const GOBGameDescription gameDescriptions[] = { IT_ITA, kPlatformPC, ADGF_NO_FLAGS, - GUIO_NOSUBTITLES | GUIO_NOSPEECH + GUIO_NOSPEECH }, kGameTypeWoodruff, kFeatures640, @@ -2974,7 +2974,7 @@ static const GOBGameDescription gameDescriptions[] = { IT_ITA, kPlatformPC, ADGF_NO_FLAGS, - GUIO_NOSUBTITLES | GUIO_NOSPEECH + GUIO_NOSPEECH }, kGameTypeWoodruff, kFeatures640, @@ -2988,7 +2988,7 @@ static const GOBGameDescription gameDescriptions[] = { DE_DEU, kPlatformPC, ADGF_NO_FLAGS, - GUIO_NOSUBTITLES | GUIO_NOSPEECH + GUIO_NOSPEECH }, kGameTypeWoodruff, kFeatures640, @@ -3002,7 +3002,7 @@ static const GOBGameDescription gameDescriptions[] = { FR_FRA, kPlatformPC, ADGF_NO_FLAGS, - GUIO_NOSUBTITLES | GUIO_NOSPEECH + GUIO_NOSPEECH }, kGameTypeWoodruff, kFeatures640, @@ -3016,7 +3016,7 @@ static const GOBGameDescription gameDescriptions[] = { EN_GRB, kPlatformPC, ADGF_NO_FLAGS, - GUIO_NOSUBTITLES | GUIO_NOSPEECH + GUIO_NOSPEECH }, kGameTypeWoodruff, kFeatures640, @@ -3030,7 +3030,7 @@ static const GOBGameDescription gameDescriptions[] = { DE_DEU, kPlatformPC, ADGF_NO_FLAGS, - GUIO_NOSUBTITLES | GUIO_NOSPEECH + GUIO_NOSPEECH }, kGameTypeWoodruff, kFeatures640, @@ -3044,7 +3044,7 @@ static const GOBGameDescription gameDescriptions[] = { FR_FRA, kPlatformPC, ADGF_NO_FLAGS, - GUIO_NOSUBTITLES | GUIO_NOSPEECH + GUIO_NOSPEECH }, kGameTypeWoodruff, kFeatures640, @@ -3058,7 +3058,7 @@ static const GOBGameDescription gameDescriptions[] = { IT_ITA, kPlatformPC, ADGF_NO_FLAGS, - GUIO_NOSUBTITLES | GUIO_NOSPEECH + GUIO_NOSPEECH }, kGameTypeWoodruff, kFeatures640, @@ -3072,7 +3072,7 @@ static const GOBGameDescription gameDescriptions[] = { ES_ESP, kPlatformPC, ADGF_NO_FLAGS, - GUIO_NOSUBTITLES | GUIO_NOSPEECH + GUIO_NOSPEECH }, kGameTypeWoodruff, kFeatures640, @@ -3086,7 +3086,7 @@ static const GOBGameDescription gameDescriptions[] = { PL_POL, kPlatformPC, ADGF_NO_FLAGS, - GUIO_NOSUBTITLES | GUIO_NOSPEECH + GUIO_NOSPEECH }, kGameTypeWoodruff, kFeatures640, diff --git a/engines/gob/draw.h b/engines/gob/draw.h index ba32df0c3e..b41cb1abad 100644 --- a/engines/gob/draw.h +++ b/engines/gob/draw.h @@ -39,7 +39,7 @@ namespace Gob { #define RENDERFLAG_USEDELTAS 0x0010 #define RENDERFLAG_UNKNOWN 0x0080 #define RENDERFLAG_NOBLITINVALIDATED 0x0200 -#define RENDERFLAG_SKIPOPTIONALTEXT 0x0400 +#define RENDERFLAG_NOSUBTITLES 0x0400 #define RENDERFLAG_FROMSPLIT 0x0800 #define RENDERFLAG_DOUBLECOORDS 0x1000 diff --git a/engines/gob/draw_v2.cpp b/engines/gob/draw_v2.cpp index 8fe70589a7..9b7a536759 100644 --- a/engines/gob/draw_v2.cpp +++ b/engines/gob/draw_v2.cpp @@ -216,7 +216,7 @@ void Draw_v2::printTotText(int16 id) { dataPtr = textItem->getData(); ptr = dataPtr; - if ((_renderFlags & RENDERFLAG_SKIPOPTIONALTEXT) && (ptr[1] & 0x80)) { + if ((ptr[1] & 0x80) && !_vm->subtitles()) { delete textItem; return; } @@ -449,6 +449,10 @@ void Draw_v2::printTotText(int16 id) { ptr++; offX = destX + (int16)READ_LE_UINT16(ptr); offY = destY + (int16)READ_LE_UINT16(ptr + 2); + if (_renderFlags & RENDERFLAG_DOUBLECOORDS) { + offX += (int16)READ_LE_UINT16(ptr); + offY += (int16)READ_LE_UINT16(ptr + 2); + } ptr += 4; break; diff --git a/engines/gob/gob.cpp b/engines/gob/gob.cpp index fa4f04eab8..13f306fff1 100644 --- a/engines/gob/gob.cpp +++ b/engines/gob/gob.cpp @@ -213,6 +213,10 @@ bool GobEngine::isDemo() const { return (isSCNDemo() || isBATDemo()); } +bool GobEngine::subtitles() const { + return ConfMan.getBool("subtitles"); +} + Common::Error GobEngine::run() { if (!initGameParts()) { GUIErrorMessage("GobEngine::init(): Unknown version of game engine"); diff --git a/engines/gob/gob.h b/engines/gob/gob.h index 02f6af51bf..297b6b1b2b 100644 --- a/engines/gob/gob.h +++ b/engines/gob/gob.h @@ -221,6 +221,8 @@ public: bool is800x600() const; bool isDemo() const; + bool subtitles() const; + GobEngine(OSystem *syst); virtual ~GobEngine(); diff --git a/engines/gob/scenery.cpp b/engines/gob/scenery.cpp index 7a4b8ad868..0780a85b04 100644 --- a/engines/gob/scenery.cpp +++ b/engines/gob/scenery.cpp @@ -632,6 +632,11 @@ void Scenery::updateAnim(int16 layer, int16 frame, int16 animation, int16 flags, _vm->_vidPlayer->slotPlay(obj.videoSlot - 1); } + // Subtitle + Graphics::CoktelVideo::State state = _vm->_vidPlayer->getState(obj.videoSlot - 1); + if (state.flags & Graphics::CoktelVideo::kStateSpeech) + _vm->_draw->printTotText(state.speechId); + destX = 0; destY = 0; left = *(obj.pPosX); diff --git a/engines/gob/videoplayer.cpp b/engines/gob/videoplayer.cpp index f708729fd8..621171b18b 100644 --- a/engines/gob/videoplayer.cpp +++ b/engines/gob/videoplayer.cpp @@ -711,6 +711,9 @@ void VideoPlayer::playFrame(int16 frame, int16 breakKey, _vm->_video->retrace(); } + // Subtitle + if (state.flags & Graphics::CoktelVideo::kStateSpeech) + _vm->_draw->printTotText(state.speechId); if (modifiedPal && ((palCmd == 2) || (palCmd == 4))) _vm->_palAnim->fade(_vm->_global->_pPaletteDesc, -2, 0); |