[Scummvm-cvs-logs] SF.net SVN: scummvm: [25396] scummvm/trunk/engines/scumm
cyx at users.sourceforge.net
cyx at users.sourceforge.net
Mon Feb 5 23:47:23 CET 2007
Revision: 25396
http://scummvm.svn.sourceforge.net/scummvm/?rev=25396&view=rev
Author: cyx
Date: 2007-02-05 14:47:22 -0800 (Mon, 05 Feb 2007)
Log Message:
-----------
'fixed' o_blastText and updated a comment
Modified Paths:
--------------
scummvm/trunk/engines/scumm/intern.h
scummvm/trunk/engines/scumm/script_v8.cpp
scummvm/trunk/engines/scumm/scumm.h
scummvm/trunk/engines/scumm/string.cpp
Modified: scummvm/trunk/engines/scumm/intern.h
===================================================================
--- scummvm/trunk/engines/scumm/intern.h 2007-02-05 19:48:12 UTC (rev 25395)
+++ scummvm/trunk/engines/scumm/intern.h 2007-02-05 22:47:22 UTC (rev 25396)
@@ -961,6 +961,8 @@
virtual void executeOpcode(byte i);
virtual const char *getOpcodeDesc(byte i);
+ virtual void printString(int m, const byte *msg);
+
virtual void scummLoop_handleSaveLoad();
virtual void setupScummVars();
Modified: scummvm/trunk/engines/scumm/script_v8.cpp
===================================================================
--- scummvm/trunk/engines/scumm/script_v8.cpp 2007-02-05 19:48:12 UTC (rev 25395)
+++ scummvm/trunk/engines/scumm/script_v8.cpp 2007-02-05 22:47:22 UTC (rev 25396)
@@ -499,12 +499,8 @@
_string[m].no_talk_anim = true;
break;
case 0xD1: // SO_PRINT_STRING
- if (m == 5)
- enqueueText(_scriptPointer, _string[m].xpos, _string[m].ypos, _string[m].color, _string[m].charset, _string[m].center);
- else
- printString(m, _scriptPointer);
+ printString(m, _scriptPointer);
_scriptPointer += resStrLen(_scriptPointer) + 1;
-
break;
case 0xD2: // SO_PRINT_WRAP Set print wordwrap
//debug(0, "decodeParseString: SO_PRINT_WRAP");
@@ -671,8 +667,10 @@
}
void ScummEngine_v8::o8_blastText() {
- // FIXME
- decodeParseString(5, 0);
+ // Original V8 interpreter uses StringSlot 2 for o_blastText and 4 for o_printDebug.
+ // Since slot 2 is already mapped to printDebug for V6 (see ScummEngine::printString()),
+ // we just "swap" the slots, and use slot 4 here.
+ decodeParseString(4, 0);
}
void ScummEngine_v8::o8_cursorCommand() {
Modified: scummvm/trunk/engines/scumm/scumm.h
===================================================================
--- scummvm/trunk/engines/scumm/scumm.h 2007-02-05 19:48:12 UTC (rev 25395)
+++ scummvm/trunk/engines/scumm/scumm.h 2007-02-05 22:47:22 UTC (rev 25396)
@@ -1175,7 +1175,7 @@
virtual void initCharset(int charset);
- void printString(int m, const byte *msg);
+ virtual void printString(int m, const byte *msg);
virtual bool handleNextCharsetCode(Actor *a, int *c);
void CHARSET_1();
Modified: scummvm/trunk/engines/scumm/string.cpp
===================================================================
--- scummvm/trunk/engines/scumm/string.cpp 2007-02-05 19:48:12 UTC (rev 25395)
+++ scummvm/trunk/engines/scumm/string.cpp 2007-02-05 22:47:22 UTC (rev 25396)
@@ -64,12 +64,21 @@
}
}
+#ifndef DISABLE_SCUMM_7_8
+void ScummEngine_v8::printString(int m, const byte *msg) {
+ if (m == 4) {
+ const StringTab &st = _string[m];
+ enqueueText(msg, st.xpos, st.ypos, st.color, st.charset, st.center);
+ } else {
+ ScummEngine::printString(m, msg);
+ }
+}
+#endif
void ScummEngine::debugMessage(const byte *msg) {
byte buffer[500];
convertMessageToString(msg, buffer, sizeof(buffer));
-// if ((_game.id == GID_CMI) && _debugMode) { // In CMI, debugMessage is used for printDebug output
if ((buffer[0] != 0xFF) && _debugMode) {
debug(0, "DEBUG: %s", buffer);
return;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list