[Scummvm-cvs-logs] scummvm master -> 7eab6a7c59feaff698061be19aef61d0d0e688c2

tramboi bertrand_augereau at yahoo.fr
Wed Aug 17 22:59:27 CEST 2011


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
7eab6a7c59 DREAMWEB: 'commandonly' ported to C++


Commit: 7eab6a7c59feaff698061be19aef61d0d0e688c2
    https://github.com/scummvm/scummvm/commit/7eab6a7c59feaff698061be19aef61d0d0e688c2
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-08-17T15:48:20-07:00

Commit Message:
DREAMWEB: 'commandonly' ported to C++

Changed paths:
    devtools/tasmrecover/tasm-recover
    engines/dreamweb/dreamgen.cpp
    engines/dreamweb/dreamgen.h
    engines/dreamweb/stubs.cpp
    engines/dreamweb/stubs.h



diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index 1c5dacc..c333f58 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -123,6 +123,7 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'getmapad',
 	'calcfrframe',
 	'finalframe',
+	'commandonly',
 	], skip_output = [
 	# These functions are processed but not output
 	'dreamweb',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 23c9096..1d97499 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -16566,41 +16566,6 @@ void DreamGenContext::examineobtext() {
 	commandwithob();
 }
 
-void DreamGenContext::commandonly() {
-	STACK_CHECK;
-	push(ax);
-	push(bx);
-	push(cx);
-	push(dx);
-	push(es);
-	push(ds);
-	push(si);
-	push(di);
-	deltextline();
-	di = pop();
-	si = pop();
-	ds = pop();
-	es = pop();
-	dx = pop();
-	cx = pop();
-	bx = pop();
-	ax = pop();
-	ah = 0;
-	_add(ax, ax);
-	bx = ax;
-	es = data.word(kCommandtext);
-	ax = es.word(bx);
-	_add(ax, (66*2));
-	si = ax;
-	di = data.word(kTextaddressx);
-	bx = data.word(kTextaddressy);
-	dl = data.byte(kTextlen);
-	al = 0;
-	ah = 0;
-	printdirect();
-	data.byte(kNewtextline) = 1;
-}
-
 void DreamGenContext::printmessage() {
 	STACK_CHECK;
 	push(dx);
@@ -19326,7 +19291,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) {
 		case addr_obname: obname(); break;
 		case addr_finishedwalking: finishedwalking(); break;
 		case addr_examineobtext: examineobtext(); break;
-		case addr_commandonly: commandonly(); break;
 		case addr_printmessage: printmessage(); break;
 		case addr_printmessage2: printmessage2(); break;
 		case addr_blocknametext: blocknametext(); break;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 5cb2614..b9ac99e 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -123,7 +123,6 @@ public:
 	static const uint16 addr_blocknametext = 0xca34;
 	static const uint16 addr_printmessage2 = 0xca30;
 	static const uint16 addr_printmessage = 0xca2c;
-	static const uint16 addr_commandonly = 0xca28;
 	static const uint16 addr_examineobtext = 0xca20;
 	static const uint16 addr_finishedwalking = 0xca1c;
 	static const uint16 addr_obname = 0xca18;
@@ -1321,7 +1320,7 @@ public:
 	void wornerror();
 	void putundercentre();
 	void checkobjectsize();
-	void commandonly();
+	//void commandonly();
 	void adjustlen();
 	void deallocatemem();
 	void checkforemm();
@@ -1594,7 +1593,7 @@ public:
 	//void finalframe();
 	void receptionist();
 	void selectslot();
-	void edenscdplayer();
+	void openfilenocheck();
 	//void readoneblock();
 	void fadeupmon();
 	void paltoendpal();
@@ -1827,7 +1826,7 @@ public:
 	//void makesprite();
 	void dreamweb();
 	void droperror();
-	void openfilenocheck();
+	void edenscdplayer();
 	void calledensdlift();
 	void checkinside();
 	void gates();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 1c60fb6..8591862 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -920,6 +920,20 @@ void DreamGenContext::deltextline() {
 	multiput(segRef(data.word(kBuffers)).ptr(kTextunder, 0), x, y, kUndertextsizex, kUndertextsizey);
 }
 
+void DreamGenContext::commandonly() {
+	commandonly(al);	
+}
+
+void DreamGenContext::commandonly(uint8 command) {
+	deltextline();
+	uint16 index = command * 2;
+	uint16 offset = kTextstart + segRef(data.word(kCommandtext)).word(index);
+	uint16 y = data.word(kTextaddressy);
+	const uint8 *string = segRef(data.word(kCommandtext)).ptr(offset, 0);
+	printdirect(&string, data.word(kTextaddressx), &y, data.byte(kTextlen), (bool)(data.byte(kTextlen) & 1));
+	data.byte(kNewtextline) = 1;
+}
+
 void DreamGenContext::autosetwalk() {
 	al = data.byte(kManspath);
 	if (data.byte(kFinaldest) == al)
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 04773ee..710ebf9 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -117,6 +117,8 @@
 	void crosshair();
 	void showrain();
 	void deltextline();
+	void commandonly();
+	void commandonly(uint8 command);
 	void doblocks();
 	void checkifperson();
 	bool checkifperson(uint8 x, uint8 y);






More information about the Scummvm-git-logs mailing list