aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorMax Horn2003-05-31 21:42:33 +0000
committerMax Horn2003-05-31 21:42:33 +0000
commitac02e3d0d0d2fe2414e8e0cb5553ef835265c00a (patch)
tree04cd394947dbda7d10ef1b4f5eaec77b3a6175da /scumm
parent7ffb40e61b3ab0bb14d3315636710963fa406c4e (diff)
downloadscummvm-rg350-ac02e3d0d0d2fe2414e8e0cb5553ef835265c00a.tar.gz
scummvm-rg350-ac02e3d0d0d2fe2414e8e0cb5553ef835265c00a.tar.bz2
scummvm-rg350-ac02e3d0d0d2fe2414e8e0cb5553ef835265c00a.zip
cleanup
svn-id: r8194
Diffstat (limited to 'scumm')
-rw-r--r--scumm/script_v6.cpp86
-rw-r--r--scumm/script_v8.cpp10
2 files changed, 36 insertions, 60 deletions
diff --git a/scumm/script_v6.cpp b/scumm/script_v6.cpp
index 47e3fd4182..63766119a0 100644
--- a/scumm/script_v6.cpp
+++ b/scumm/script_v6.cpp
@@ -3072,62 +3072,44 @@ void Scumm_v6::decodeParseString(int m, int n) {
case 74:
_string[m].no_talk_anim = true;
break;
- case 75:{
- _messagePtr = _scriptPointer;
-
- if ((_messagePtr[0] == '/') && (_gameId == GID_DIG)) {
- char pointer[20];
- int i, j;
-
- _scriptPointer += resStrLen(_scriptPointer)+ 1;
- translateText(_messagePtr, _transText);
- for (i = 0, j = 0; (_messagePtr[i] != '/' || j == 0) && j < 19; i++) {
- if (_messagePtr[i] != '/')
- pointer[j++] = _messagePtr[i];
- }
- pointer[j] = 0;
+ case 75:
+ _messagePtr = _scriptPointer;
+ _scriptPointer += resStrLen(_scriptPointer)+ 1;
+
+ if ((_messagePtr[0] == '/') && (_gameId == GID_DIG)) {
+ char pointer[20];
+ int i, j;
+
+ translateText(_messagePtr, _transText);
+ for (i = 0, j = 0; (_messagePtr[i] != '/' || j == 0) && j < 19; i++) {
+ if (_messagePtr[i] != '/')
+ pointer[j++] = _messagePtr[i];
+ }
+ pointer[j] = 0;
- // Stop any talking that's still going on
- if (_sound->_talkChannel > -1)
- _mixer->stop(_sound->_talkChannel);
+ // Stop any talking that's still going on
+ if (_sound->_talkChannel > -1)
+ _mixer->stop(_sound->_talkChannel);
- _sound->_talkChannel = _sound->playBundleSound(pointer);
- _messagePtr = _transText;
+ _sound->_talkChannel = _sound->playBundleSound(pointer);
+ _messagePtr = _transText;
+ }
- switch (m) {
- case 0:
- actorTalk();
- break;
- case 1:
- drawString(1);
- break;
- case 2:
- unkMessage1();
- break;
- case 3:
- unkMessage2();
- break;
- }
- return;
- } else {
- switch (m) {
- case 0:
- actorTalk();
- break;
- case 1:
- drawString(1);
- break;
- case 2:
- unkMessage1();
- break;
- case 3:
- unkMessage2();
- break;
- }
- _scriptPointer = _messagePtr;
- return;
- }
+ switch (m) {
+ case 0:
+ actorTalk();
+ break;
+ case 1:
+ drawString(1);
+ break;
+ case 2:
+ unkMessage1();
+ break;
+ case 3:
+ unkMessage2();
+ break;
}
+ return;
case 0xFE:
setStringVars(m);
if (n)
diff --git a/scumm/script_v8.cpp b/scumm/script_v8.cpp
index aff7085c81..2f228ed851 100644
--- a/scumm/script_v8.cpp
+++ b/scumm/script_v8.cpp
@@ -451,7 +451,6 @@ void Scumm_v8::writeVar(uint var, int value) {
void Scumm_v8::decodeParseString(int m, int n) {
byte b;
- bool containsSpeech;
b = fetchScriptByte();
@@ -500,14 +499,12 @@ void Scumm_v8::decodeParseString(int m, int n) {
break;
case 0xD1:
_messagePtr = _scriptPointer;
-
- containsSpeech = (_messagePtr[0] == '/');
+ _scriptPointer += resStrLen(_scriptPointer)+ 1;
- if (containsSpeech) {
+ if (_messagePtr[0] == '/') {
char pointer[20];
int i, j;
- _scriptPointer += resStrLen(_scriptPointer) + 1;
translateText(_messagePtr, _transText);
for (i = 0, j = 0; (_messagePtr[i] != '/' || j == 0) && j < 19; i++) {
if (_messagePtr[i] != '/')
@@ -547,9 +544,6 @@ void Scumm_v8::decodeParseString(int m, int n) {
}
break;
}
-
- if (!containsSpeech)
- _scriptPointer = _messagePtr;
break;
// case 0xD2: // SO_PRINT_WRAP Set print wordwrap
// error("decodeParseString: SO_PRINT_MUMBLE");