diff options
| author | Gregory Montoir | 2007-02-05 22:47:22 +0000 | 
|---|---|---|
| committer | Gregory Montoir | 2007-02-05 22:47:22 +0000 | 
| commit | 15e2af8e9dd52cef4fb57cb49e766c5192321042 (patch) | |
| tree | 57b72fab61b6c18b1f7f461559241adb0423dd27 | |
| parent | 7082e5828931cc1f86d4a733ae46d492337ab6ae (diff) | |
| download | scummvm-rg350-15e2af8e9dd52cef4fb57cb49e766c5192321042.tar.gz scummvm-rg350-15e2af8e9dd52cef4fb57cb49e766c5192321042.tar.bz2 scummvm-rg350-15e2af8e9dd52cef4fb57cb49e766c5192321042.zip | |
'fixed' o_blastText and updated a comment
svn-id: r25396
| -rw-r--r-- | engines/scumm/intern.h | 2 | ||||
| -rw-r--r-- | engines/scumm/script_v8.cpp | 12 | ||||
| -rw-r--r-- | engines/scumm/scumm.h | 2 | ||||
| -rw-r--r-- | engines/scumm/string.cpp | 11 | 
4 files changed, 18 insertions, 9 deletions
| diff --git a/engines/scumm/intern.h b/engines/scumm/intern.h index dbbe54cbe1..6e20af2927 100644 --- a/engines/scumm/intern.h +++ b/engines/scumm/intern.h @@ -961,6 +961,8 @@ protected:  	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(); diff --git a/engines/scumm/script_v8.cpp b/engines/scumm/script_v8.cpp index b69c209c71..17b494250e 100644 --- a/engines/scumm/script_v8.cpp +++ b/engines/scumm/script_v8.cpp @@ -499,12 +499,8 @@ void ScummEngine_v8::decodeParseString(int m, int n) {  		_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_arrayOps() {  }  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() { diff --git a/engines/scumm/scumm.h b/engines/scumm/scumm.h index 6a0c1ded5b..d71b756641 100644 --- a/engines/scumm/scumm.h +++ b/engines/scumm/scumm.h @@ -1175,7 +1175,7 @@ protected:  	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(); diff --git a/engines/scumm/string.cpp b/engines/scumm/string.cpp index 41327dbad9..6c2f207e13 100644 --- a/engines/scumm/string.cpp +++ b/engines/scumm/string.cpp @@ -64,12 +64,21 @@ void ScummEngine::printString(int m, const byte *msg) {  	}  } +#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; | 
