[Scummvm-cvs-logs] scummvm master -> e79dda07f469626d9f2c06450a13625c52e47329

tramboi bertrand_augereau at yahoo.fr
Thu Nov 17 23:04:52 CET 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:
e79dda07f4 DREAMWEB: 'printcurs' ported to C++


Commit: e79dda07f469626d9f2c06450a13625c52e47329
    https://github.com/scummvm/scummvm/commit/e79dda07f469626d9f2c06450a13625c52e47329
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-11-17T16:03:49-08:00

Commit Message:
DREAMWEB: 'printcurs' 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 fddf64b..bf9f304 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -238,6 +238,7 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'loadintotemp2',
 	'loadintotemp3',
 	'loadtempcharset',
+	'printcurs',
 	'loadroomssample',
 	], skip_output = [
 	# These functions are processed but not output
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 41c91a5..24c804e 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -7294,63 +7294,6 @@ void DreamGenContext::triggermessage() {
 	data.byte(kLasttrigger) = 0;
 }
 
-void DreamGenContext::printcurs() {
-	STACK_CHECK;
-	push(si);
-	push(di);
-	push(ds);
-	push(dx);
-	push(bx);
-	push(es);
-	di = data.word(kCurslocx);
-	bx = data.word(kCurslocy);
-	cl = 6;
-	ch = 8;
-	_cmp(data.byte(kForeignrelease),  0);
-	if (flags.z())
-		goto _tmp1;
-	_sub(bx, 3);
-	ch = 11;
-_tmp1:
-	ds = data.word(kBuffers);
-	si = (0);
-	push(di);
-	push(bx);
-	multiget();
-	bx = pop();
-	di = pop();
-	push(bx);
-	push(di);
-	_inc(data.word(kMaintimer));
-	ax = data.word(kMaintimer);
-	_and(al, 16);
-	if (!flags.z())
-		goto flashcurs;
-	al = '/';
-	_sub(al, 32);
-	ah = 0;
-	ds = data.word(kTempcharset);
-	showframe();
-flashcurs:
-	di = pop();
-	bx = pop();
-	_sub(di, 6);
-	cl = 12;
-	ch = 8;
-	_cmp(data.byte(kForeignrelease),  0);
-	if (flags.z())
-		goto _tmp2;
-	ch = 11;
-_tmp2:
-	multidump();
-	es = pop();
-	bx = pop();
-	dx = pop();
-	ds = pop();
-	di = pop();
-	si = pop();
-}
-
 void DreamGenContext::delcurs() {
 	STACK_CHECK;
 	push(es);
@@ -15742,7 +15685,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) {
 		case addr_monmessage: monmessage(); break;
 		case addr_processtrigger: processtrigger(); break;
 		case addr_triggermessage: triggermessage(); break;
-		case addr_printcurs: printcurs(); break;
 		case addr_delcurs: delcurs(); break;
 		case addr_useobject: useobject(); break;
 		case addr_wheelsound: wheelsound(); break;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 281a92b..512f7e6 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -343,7 +343,6 @@ public:
 	static const uint16 addr_wheelsound = 0xc588;
 	static const uint16 addr_useobject = 0xc580;
 	static const uint16 addr_delcurs = 0xc57c;
-	static const uint16 addr_printcurs = 0xc578;
 	static const uint16 addr_triggermessage = 0xc574;
 	static const uint16 addr_processtrigger = 0xc570;
 	static const uint16 addr_monmessage = 0xc56c;
@@ -1338,7 +1337,7 @@ public:
 	void hangoncurs();
 	//void getblockofpixel();
 	//void kernchars();
-	void printcurs();
+	//void printcurs();
 	//void convertkey();
 	void outofopen();
 	//void dealwithspecial();
@@ -1934,7 +1933,7 @@ public:
 	void quitkey();
 	void processtrigger();
 	void monmessage();
-	void readdesticon();
+	void volumeadjust();
 	void randomnum2();
 	void loadsecondsample();
 	void transfercontoex();
@@ -1952,7 +1951,7 @@ public:
 	void accesslightoff();
 	void usehole();
 	void useobject();
-	void volumeadjust();
+	void readdesticon();
 	//void watchcount();
 };
 }
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index ce25a92..eb8f2b8 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -254,6 +254,22 @@ void DreamGenContext::loadtempcharset(const char *fileName) {
 	data.word(kTempcharset) = standardload(fileName);
 }
 
+void DreamGenContext::printcurs() {
+	uint16 x = data.word(kCurslocx);
+	uint16 y = data.word(kCurslocy);
+	uint16 height;
+	if (data.byte(kForeignrelease)) {
+		y -= 3;
+		height = 11;
+	} else
+		height = 8;
+	multiget(segRef(data.word(kBuffers)).ptr(kTextunder, 0), x, y, 6, height);
+	++data.word(kMaintimer);
+	if ((data.word(kMaintimer) & 16) == 0)
+		showframe((Frame *)segRef(data.word(kTempcharset)).ptr(0, 0), x, y, '/' - 32, 0);
+	multidump(x - 6, y, 12, height);
+}
+
 void DreamGenContext::seecommandtail() {
 	data.word(kSoundbaseadd) = 0x220;
 	data.byte(kSoundint) = 5;
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index ff8d597..ca7b74f 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -33,6 +33,7 @@
 	void loadintotemp3(const char *fileName);
 	void loadtempcharset();
 	void loadtempcharset(const char *fileName);
+	void printcurs();
 	void multidump();
 	void multidump(uint16 x, uint16 y, uint8 width, uint8 height);
 	void frameoutv(uint8 *dst, const uint8 *src, uint16 pitch, uint16 width, uint16 height, int16 x, int16 y);






More information about the Scummvm-git-logs mailing list