aboutsummaryrefslogtreecommitdiff
path: root/scumm/saveload.cpp
diff options
context:
space:
mode:
authorGregory Montoir2005-11-02 21:47:44 +0000
committerGregory Montoir2005-11-02 21:47:44 +0000
commitc84d1ada32bb2093ee7a5d20a73b9c342eca4f11 (patch)
treec076ef2e604e2ca87ff2f03edd3cd36cfbe55d14 /scumm/saveload.cpp
parent5e75092decb10ee760d62e2b42272b70eda05e2e (diff)
downloadscummvm-rg350-c84d1ada32bb2093ee7a5d20a73b9c342eca4f11.tar.gz
scummvm-rg350-c84d1ada32bb2093ee7a5d20a73b9c342eca4f11.tar.bz2
scummvm-rg350-c84d1ada32bb2093ee7a5d20a73b9c342eca4f11.zip
To match the original v7/v8 interpreters, use BlastTexts to display the subtitles. This allows to fix the bug #1092993. As this is quite an important change, regressions may appear. You've been warned :)
svn-id: r19398
Diffstat (limited to 'scumm/saveload.cpp')
-rw-r--r--scumm/saveload.cpp27
1 files changed, 26 insertions, 1 deletions
diff --git a/scumm/saveload.cpp b/scumm/saveload.cpp
index 88fead21b9..282308c3e8 100644
--- a/scumm/saveload.cpp
+++ b/scumm/saveload.cpp
@@ -730,6 +730,7 @@ void ScummEngine::saveOrLoad(Serializer *s) {
MKLINE(ScummEngine, _charsetBufPos, sleInt16, VER(10)),
MKLINE(ScummEngine, _haveMsg, sleByte, VER(8)),
+ MKLINE(ScummEngine, _haveActorSpeechMsg, sleByte, VER(61)),
MKLINE(ScummEngine, _useTalkAnims, sleByte, VER(8)),
MKLINE(ScummEngine, _talkDelay, sleInt16, VER(8)),
@@ -952,6 +953,13 @@ void ScummEngine::saveOrLoad(Serializer *s) {
_system->warpMouse(_mouse.x, _mouse.y);
}
+ // Before V61, we re-used the _haveMsg flag to handle "alternative" speech
+ // sound files (see charset code 10).
+ if (s->isLoading() && s->getVersion() < VER(61)) {
+ _haveActorSpeechMsg = (_haveMsg != 0xFE);
+ _haveMsg = 0xFF;
+ }
+
//
// Save/load actors
//
@@ -1190,8 +1198,25 @@ void ScummEngine_v5::saveOrLoad(Serializer *s) {
void ScummEngine_v7::saveOrLoad(Serializer *s) {
ScummEngine::saveOrLoad(s);
- assert(_imuseDigital);
+ const SaveLoadEntry subtitleQueueEntries[] = {
+ MKARRAY(SubtitleText, text[0], sleByte, 256, VER(61)),
+ MKLINE(SubtitleText, charset, sleByte, VER(61)),
+ MKLINE(SubtitleText, color, sleByte, VER(61)),
+ MKLINE(SubtitleText, xpos, sleInt16, VER(61)),
+ MKLINE(SubtitleText, ypos, sleInt16, VER(61)),
+ MKLINE(SubtitleText, actorSpeechMsg, sleByte, VER(61)),
+ MKEND()
+ };
+
+ const SaveLoadEntry V7Entries[] = {
+ MKLINE(ScummEngine_v7, _subtitleQueuePos, sleInt32, VER(61)),
+ MKEND()
+ };
+
_imuseDigital->saveOrLoad(s);
+
+ s->saveLoadArrayOf(_subtitleQueue, ARRAYSIZE(_subtitleQueue), sizeof(_subtitleQueue[0]), subtitleQueueEntries);
+ s->saveLoadEntries(this, V7Entries);
}
#endif