aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2004-03-01 06:23:25 +0000
committerEugene Sandulenko2004-03-01 06:23:25 +0000
commitd7f9be12fea17181e38486e71caf497adadcdc76 (patch)
tree39f949dcf8b6f823a44c37a9be1c4748c9a0a048
parent9e894f6bf39aaa9780fd3f27d68e0ce1b5886df8 (diff)
downloadscummvm-rg350-d7f9be12fea17181e38486e71caf497adadcdc76.tar.gz
scummvm-rg350-d7f9be12fea17181e38486e71caf497adadcdc76.tar.bz2
scummvm-rg350-d7f9be12fea17181e38486e71caf497adadcdc76.zip
Move decodeParseString to script_v7he.cpp where it really belongs to.
svn-id: r13109
-rw-r--r--scumm/intern.h4
-rw-r--r--scumm/script_v6he.cpp86
-rw-r--r--scumm/script_v7he.cpp86
3 files changed, 88 insertions, 88 deletions
diff --git a/scumm/intern.h b/scumm/intern.h
index 9f472177e9..16c4a53bf7 100644
--- a/scumm/intern.h
+++ b/scumm/intern.h
@@ -557,8 +557,6 @@ protected:
virtual void executeOpcode(byte i);
virtual const char *getOpcodeDesc(byte i);
- virtual void decodeParseString(int a, int b);
-
void redimArray(int arrayId, int newX, int newY, int d);
int readFileToArray(int slot, int32 size);
void writeFileFromArray(int slot, int resID);
@@ -615,6 +613,8 @@ protected:
virtual void executeOpcode(byte i);
virtual const char *getOpcodeDesc(byte i);
+ virtual void decodeParseString(int a, int b);
+
/* Version 7 script opcodes */
void o7_objectX();
void o7_objectY();
diff --git a/scumm/script_v6he.cpp b/scumm/script_v6he.cpp
index fc8adfcde3..0e5f5cab08 100644
--- a/scumm/script_v6he.cpp
+++ b/scumm/script_v6he.cpp
@@ -1291,90 +1291,4 @@ void ScummEngine_v6he::o6_unknownF9() {
warning("stub o6_unknownF9(\"%s\")", filename + r);
}
-void ScummEngine_v6he::decodeParseString(int m, int n) {
- byte b;
- int c;
-
- b = fetchScriptByte();
-
- switch (b) {
- case 65: // SO_AT
- _string[m].ypos = pop();
- _string[m].xpos = pop();
- _string[m].overhead = false;
- break;
- case 66: // SO_COLOR
- _string[m].color = pop();
- break;
- case 67: // SO_CLIPPED
- _string[m].right = pop();
- break;
- case 69: // SO_CENTER
- _string[m].center = true;
- _string[m].overhead = false;
- break;
- case 71: // SO_LEFT
- _string[m].center = false;
- _string[m].overhead = false;
- break;
- case 72: // SO_OVERHEAD
- _string[m].overhead = true;
- _string[m].no_talk_anim = false;
- break;
- case 73: // SO_SAY_VOICE
- error("decodeParseString: case 73");
- break;
- case 74: // SO_MUMBLE
- _string[m].no_talk_anim = true;
- break;
- case 75: // SO_TEXTSTRING
- _messagePtr = translateTextAndPlaySpeech(_scriptPointer);
- _scriptPointer += resStrLen(_scriptPointer)+ 1;
-
- switch (m) {
- case 0:
- actorTalk();
- break;
- case 1:
- drawString(1);
- break;
- case 2:
- unkMessage1();
- break;
- case 3:
- unkMessage2();
- break;
- }
- return;
- case 0xF9:
- c = pop();
- if (c == 1) {
- _string[m].color = pop();
- } else {
- push(c);
- int args[16];
- getStackList(args, ARRAYSIZE(args));
- }
- warning("decodeParseString case 0xF9 stub");
- return;
- case 0xFE:
- setStringVars(m);
- if (n)
- _actorToPrintStrFor = pop();
- return;
- case 0xFF:
- _string[m].t_xpos = _string[m].xpos;
- _string[m].t_ypos = _string[m].ypos;
- _string[m].t_center = _string[m].center;
- _string[m].t_overhead = _string[m].overhead;
- _string[m].t_no_talk_anim = _string[m].no_talk_anim;
- _string[m].t_right = _string[m].right;
- _string[m].t_color = _string[m].color;
- _string[m].t_charset = _string[m].charset;
- return;
- default:
- error("decodeParseString: default case 0x%x", b);
- }
-}
-
} // End of namespace Scumm
diff --git a/scumm/script_v7he.cpp b/scumm/script_v7he.cpp
index e83e8d67f0..e59edef276 100644
--- a/scumm/script_v7he.cpp
+++ b/scumm/script_v7he.cpp
@@ -406,4 +406,90 @@ void ScummEngine_v7he::o7_objectY() {
push(_objs[objnum].y_pos);
}
+void ScummEngine_v7he::decodeParseString(int m, int n) {
+ byte b;
+ int c;
+
+ b = fetchScriptByte();
+
+ switch (b) {
+ case 65: // SO_AT
+ _string[m].ypos = pop();
+ _string[m].xpos = pop();
+ _string[m].overhead = false;
+ break;
+ case 66: // SO_COLOR
+ _string[m].color = pop();
+ break;
+ case 67: // SO_CLIPPED
+ _string[m].right = pop();
+ break;
+ case 69: // SO_CENTER
+ _string[m].center = true;
+ _string[m].overhead = false;
+ break;
+ case 71: // SO_LEFT
+ _string[m].center = false;
+ _string[m].overhead = false;
+ break;
+ case 72: // SO_OVERHEAD
+ _string[m].overhead = true;
+ _string[m].no_talk_anim = false;
+ break;
+ case 73: // SO_SAY_VOICE
+ error("decodeParseString: case 73");
+ break;
+ case 74: // SO_MUMBLE
+ _string[m].no_talk_anim = true;
+ break;
+ case 75: // SO_TEXTSTRING
+ _messagePtr = translateTextAndPlaySpeech(_scriptPointer);
+ _scriptPointer += resStrLen(_scriptPointer)+ 1;
+
+ switch (m) {
+ case 0:
+ actorTalk();
+ break;
+ case 1:
+ drawString(1);
+ break;
+ case 2:
+ unkMessage1();
+ break;
+ case 3:
+ unkMessage2();
+ break;
+ }
+ return;
+ case 0xF9:
+ c = pop();
+ if (c == 1) {
+ _string[m].color = pop();
+ } else {
+ push(c);
+ int args[16];
+ getStackList(args, ARRAYSIZE(args));
+ }
+ warning("decodeParseString case 0xF9 stub");
+ return;
+ case 0xFE:
+ setStringVars(m);
+ if (n)
+ _actorToPrintStrFor = pop();
+ return;
+ case 0xFF:
+ _string[m].t_xpos = _string[m].xpos;
+ _string[m].t_ypos = _string[m].ypos;
+ _string[m].t_center = _string[m].center;
+ _string[m].t_overhead = _string[m].overhead;
+ _string[m].t_no_talk_anim = _string[m].no_talk_anim;
+ _string[m].t_right = _string[m].right;
+ _string[m].t_color = _string[m].color;
+ _string[m].t_charset = _string[m].charset;
+ return;
+ default:
+ error("decodeParseString: default case 0x%x", b);
+ }
+}
+
} // End of namespace Scumm