diff options
| -rwxr-xr-x | devtools/tasmrecover/tasm-recover | 1 | ||||
| -rw-r--r-- | engines/dreamweb/dreamgen.cpp | 21 | ||||
| -rw-r--r-- | engines/dreamweb/dreamgen.h | 3 | ||||
| -rw-r--r-- | engines/dreamweb/stubs.cpp | 10 | ||||
| -rw-r--r-- | engines/dreamweb/stubs.h | 2 | 
5 files changed, 14 insertions, 23 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover index 744e285fbf..f2134be215 100755 --- a/devtools/tasmrecover/tasm-recover +++ b/devtools/tasmrecover/tasm-recover @@ -51,6 +51,7 @@ generator = cpp(context, "DreamGen", blacklist = [  	'printchar',  	'printdirect',  	'printslow', +	'printmessage',  	'usetimedtext',  	'dumptimedtext',  	'setuptimedtemp', diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index 8d3518d5f6..f716d89769 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -15615,26 +15615,6 @@ void DreamGenContext::examineobtext() {  	commandwithob();  } -void DreamGenContext::printmessage() { -	STACK_CHECK; -	push(dx); -	push(bx); -	push(di); -	ah = 0; -	_add(ax, ax); -	bx = ax; -	es = data.word(kCommandtext); -	ax = es.word(bx); -	_add(ax, (66*2)); -	si = ax; -	di = pop(); -	bx = pop(); -	dx = pop(); -	al = 0; -	ah = 0; -	printdirect(); -} -  void DreamGenContext::printmessage2() {  	STACK_CHECK;  	push(dx); @@ -18459,7 +18439,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) {  		case addr_walkintoroom: walkintoroom(); break;  		case addr_afterintroroom: afterintroroom(); break;  		case addr_examineobtext: examineobtext(); break; -		case addr_printmessage: printmessage(); break;  		case addr_printmessage2: printmessage2(); break;  		case addr_setwalk: setwalk(); break;  		case addr_bresenhams: bresenhams(); break; diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index fc4deeb488..3ad99d1543 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -105,7 +105,6 @@ public:  	static const uint16 addr_bresenhams = 0xca50;  	static const uint16 addr_setwalk = 0xca44;  	static const uint16 addr_printmessage2 = 0xca30; -	static const uint16 addr_printmessage = 0xca2c;  	static const uint16 addr_examineobtext = 0xca20;  	static const uint16 addr_afterintroroom = 0xca14;  	static const uint16 addr_walkintoroom = 0xca10; @@ -2017,7 +2016,7 @@ public:  	void loadsecondsample();  	void transfercontoex();  	//void multiput(); -	void printmessage(); +	//void printmessage();  	void businessman();  	void switchryanoff();  	//void commandwithob(); diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index 9b85cbb9f4..92a2a3d139 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -1618,6 +1618,16 @@ void DreamGenContext::animpointer() {  	data.byte(kPointerframe) = 8;  } +void DreamGenContext::printmessage() { +	printmessage(di, bx, al, dl, (bool)(dl & 1)); +} + +void DreamGenContext::printmessage(uint16 x, uint16 y, uint8 index, uint8 maxWidth, bool centered) { +	uint16 offset = kTextstart + segRef(data.word(kCommandtext)).word(index * 2); +	const uint8 *string = segRef(data.word(kCommandtext)).ptr(offset, 0); +	printdirect(&string, x, &y, maxWidth, centered); +} +  bool DreamGenContext::isCD() {  	// The original sources has two codepaths depending if the game is 'if cd' or not  	// This is a hack to guess which version to use with the assumption that if we have a cd version diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index 7c8cee4690..bb5568e20d 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -47,6 +47,8 @@  	void printchar(const Frame* charSet, uint16 *x, uint16 y, uint8 c, uint8 nextChar, uint8 *width, uint8 *height);  	void printdirect();  	void printdirect(const uint8** string, uint16 x, uint16 *y, uint8 maxWidth, bool centered); +	void printmessage(uint16 x, uint16 y, uint8 index, uint8 maxWidth, bool centered); +	void printmessage();  	void usetimedtext();  	void dumptimedtext();  	void setuptimedtemp();  | 
