aboutsummaryrefslogtreecommitdiff
path: root/scumm/script_v2.cpp
diff options
context:
space:
mode:
authorMax Horn2003-05-04 01:10:45 +0000
committerMax Horn2003-05-04 01:10:45 +0000
commit3b77249ab073515832eb8b2d628ba71d9fd1655c (patch)
treedb68b407906052b44411322bf2c0905d769d2f5b /scumm/script_v2.cpp
parent781564d4019f036b9b96f164fcb9c00b93aa5b97 (diff)
downloadscummvm-rg350-3b77249ab073515832eb8b2d628ba71d9fd1655c.tar.gz
scummvm-rg350-3b77249ab073515832eb8b2d628ba71d9fd1655c.tar.bz2
scummvm-rg350-3b77249ab073515832eb8b2d628ba71d9fd1655c.zip
cleanup; got rid of o2_printEgo
svn-id: r7300
Diffstat (limited to 'scumm/script_v2.cpp')
-rw-r--r--scumm/script_v2.cpp22
1 files changed, 8 insertions, 14 deletions
diff --git a/scumm/script_v2.cpp b/scumm/script_v2.cpp
index a216533c4e..3248150bb8 100644
--- a/scumm/script_v2.cpp
+++ b/scumm/script_v2.cpp
@@ -303,7 +303,7 @@ void Scumm_v2::setupOpcodes() {
OPCODE(o5_getActorMoving),
OPCODE(o2_setState02),
/* D8 */
- OPCODE(o2_printEgo),
+ OPCODE(o5_printEgo),
OPCODE(o2_doSentence),
OPCODE(o5_add),
OPCODE(o2_setBitVar),
@@ -832,14 +832,11 @@ void Scumm_v2::o2_doSentence() {
}
}
-void Scumm_v2::o2_printEgo() {
- //_actorToPrintStrFor = (unsigned char)_vars[VAR_EGO];
- //_messagePtr = _scriptPointer;
-
- char buffer[256]; // FIXME
- char *ptr = buffer;
- char c;
- while ((c = *_scriptPointer++)) {
+void Scumm_v2::decodeParseString() {
+ byte buffer[256]; // FIXME
+ byte *ptr = buffer;
+ byte c;
+ while ((c = fetchScriptByte())) {
if (c & 0x80) {
*ptr++ = c & 0x7f;
*ptr++ = ' ';
@@ -852,17 +849,14 @@ void Scumm_v2::o2_printEgo() {
*ptr++ = c;
if (c > 3) {
*ptr++ = 0;
- *ptr++ = *_scriptPointer++;
+ *ptr++ = fetchScriptByte();
}
} else
*ptr++ = c;
}
*ptr = 0;
- printf("o2_printEgo(%s)\n", buffer);
-
- //_messagePtr = addMessageToStack(_messagePtr);
- //_scriptPointer = _messagePtr;
+ printf("TODO: Scumm_v2::decodeParseString(\"%s\")\n", buffer);
}
void Scumm_v2::o2_ifClassOfIs() {