[Scummvm-cvs-logs] scummvm master -> 32b47501a264f3dadd99ef58f435dccd9946150c

tramboi bertrand_augereau at yahoo.fr
Fri Nov 18 05:22:07 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:
32b47501a2 DREAMWEB: 'usemon' ported to C++


Commit: 32b47501a264f3dadd99ef58f435dccd9946150c
    https://github.com/scummvm/scummvm/commit/32b47501a264f3dadd99ef58f435dccd9946150c
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-11-17T22:21:40-08:00

Commit Message:
DREAMWEB: 'usemon' 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 b388858..56f1de0 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -245,6 +245,7 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'fadeupmonfirst',
 	'loadroomssample',
 	'printlogo',
+	'usemon',
 	], skip_output = [
 	# These functions are processed but not output
 	'dreamweb',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 95ec50f..fcda22b 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -6020,97 +6020,6 @@ void DreamGenContext::readcitypic() {
 	loadintotemp();
 }
 
-void DreamGenContext::usemon() {
-	STACK_CHECK;
-	data.byte(kLasttrigger) = 0;
-	es = cs;
-	di = 2970+1;
-	cx = 12;
-	al = 32;
-	_stosb(cx, true);
-	es = cs;
-	di = offset_operand1+1;
-	cx = 12;
-	al = 32;
-	_stosb(cx, true);
-	es = cs;
-	di = offset_keys;
-	es.byte(di) = 1;
-	_add(di, 26);
-	cx = 3;
-keyloop:
-	es.byte(di) = 0;
-	_add(di, 26);
-	if (--cx)
-		goto keyloop;
-	createpanel();
-	showpanel();
-	showicon();
-	drawfloor();
-	getridofall();
-	dx = 1974;
-	loadintotemp();
-	loadpersonal();
-	loadnews();
-	loadcart();
-	dx = 1870;
-	loadtempcharset();
-	printoutermon();
-	initialmoncols();
-	printlogo();
-	worktoscreen();
-	turnonpower();
-	fadeupyellows();
-	fadeupmonfirst();
-	data.word(kMonadx) = 76;
-	data.word(kMonady) = 141;
-	al = 1;
-	monmessage();
-	cx = 120;
-	hangoncurs();
-	al = 2;
-	monmessage();
-	cx = 60;
-	randomaccess();
-	al = 3;
-	monmessage();
-	cx = 100;
-	hangoncurs();
-	printlogo();
-	scrollmonitor();
-	data.word(kBufferin) = 0;
-	data.word(kBufferout) = 0;
-moreinput:
-	di = data.word(kMonadx);
-	bx = data.word(kMonady);
-	push(di);
-	push(bx);
-	input();
-	bx = pop();
-	di = pop();
-	data.word(kMonadx) = di;
-	data.word(kMonady) = bx;
-	execcommand();
-	_cmp(al, 0);
-	if (flags.z())
-		goto moreinput;
-	getridoftemp();
-	getridoftempcharset();
-	es = data.word(kTextfile1);
-	deallocatemem();
-	es = data.word(kTextfile2);
-	deallocatemem();
-	es = data.word(kTextfile3);
-	deallocatemem();
-	data.byte(kGetback) = 1;
-	al = 26;
-	playchannel1();
-	data.byte(kManisoffscreen) = 0;
-	restoreall();
-	redrawmainscrn();
-	worktoscreenm();
-}
-
 void DreamGenContext::printoutermon() {
 	STACK_CHECK;
 	di = 40;
@@ -15546,7 +15455,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) {
 		case addr_resetlocation: resetlocation(); break;
 		case addr_readdesticon: readdesticon(); break;
 		case addr_readcitypic: readcitypic(); break;
-		case addr_usemon: usemon(); break;
 		case addr_printoutermon: printoutermon(); break;
 		case addr_loadpersonal: loadpersonal(); break;
 		case addr_loadnews: loadnews(); break;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index dd6ffb7..563c7da 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -374,7 +374,6 @@ public:
 	static const uint16 addr_loadnews = 0xc4f4;
 	static const uint16 addr_loadpersonal = 0xc4f0;
 	static const uint16 addr_printoutermon = 0xc4ec;
-	static const uint16 addr_usemon = 0xc4e8;
 	static const uint16 addr_readcitypic = 0xc4e4;
 	static const uint16 addr_readdesticon = 0xc4e0;
 	static const uint16 addr_resetlocation = 0xc4dc;
@@ -1247,7 +1246,6 @@ public:
 	void mainscreen();
 	void watchreel();
 	void showfolder();
-	void dosreturn();
 	//void turnanypathoff();
 	void openfilefromc();
 	void gettime();
@@ -1542,6 +1540,7 @@ public:
 	void transfertoex();
 	void playchannel1();
 	void playchannel0();
+	//void usemon();
 	void steady();
 	//void pixelcheckset();
 	void reexfrominv();
@@ -1614,7 +1613,7 @@ public:
 	void deleteexframe();
 	//void readsetdata();
 	void folderexit();
-	void usemon();
+	void dosreturn();
 	void wheelsound();
 	void actualsave();
 	void autolook();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 33f8efd..44a8552 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -2167,5 +2167,84 @@ void DreamGenContext::printlogo() {
 	showcurrentfile();
 }
 
+struct MonitorKeyEntry {
+	uint8 b0;
+	uint8 b1;
+	char  b2[24];
+};
+
+void DreamGenContext::usemon() {
+	data.byte(kLasttrigger) = 0;
+	memset(cs.ptr(kCurrentfile+1, 0), ' ', 12);
+	memset(cs.ptr(offset_operand1+1, 0), ' ', 12);
+
+	MonitorKeyEntry *monitorKeyEntries = (MonitorKeyEntry *)cs.ptr(offset_keys, 0);
+	monitorKeyEntries[0].b0 = 1;
+	monitorKeyEntries[1].b0 = 0;
+	monitorKeyEntries[2].b0 = 0;
+	monitorKeyEntries[3].b0 = 0;
+
+	createpanel();
+	showpanel();
+	showicon();
+	drawfloor();
+	getridofall();
+	loadintotemp("DREAMWEB.G03");
+	loadpersonal();
+	loadnews();
+	loadcart();
+	loadtempcharset("DREAMWEB.C01");
+	printoutermon();
+	initialmoncols();
+	printlogo();
+	worktoscreen();
+	turnonpower();
+	fadeupyellows();
+	fadeupmonfirst();
+	data.word(kMonadx) = 76;
+	data.word(kMonady) = 141;
+	al = 1;
+	monmessage();
+	hangoncurs(120);
+	al = 2;
+	monmessage();
+	cx = 60;
+	randomaccess();
+	al = 3;
+	monmessage();
+	hangoncurs(100);
+	printlogo();
+	scrollmonitor();
+	data.word(kBufferin) = 0;
+	data.word(kBufferout) = 0;
+	do {
+		di = data.word(kMonadx);
+		bx = data.word(kMonady);
+		push(di);
+		push(bx);
+		input();
+		bx = pop();
+		di = pop();
+		data.word(kMonadx) = di;
+		data.word(kMonady) = bx;
+		execcommand();
+	} while (al == 0);
+	getridoftemp();
+	getridoftempcharset();
+	es = data.word(kTextfile1);
+	deallocatemem();
+	es = data.word(kTextfile2);
+	deallocatemem();
+	es = data.word(kTextfile3);
+	deallocatemem();
+	data.byte(kGetback) = 1;
+	al = 26;
+	playchannel1();
+	data.byte(kManisoffscreen) = 0;
+	restoreall();
+	redrawmainscrn();
+	worktoscreenm();
+}
+
 } /*namespace dreamgen */
 
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 5ada5b7..840d5ae 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -295,4 +295,6 @@
 	void fadeupyellows();
 	void fadeupmonfirst();
 	void printlogo();
+	void usemon();
+
 






More information about the Scummvm-git-logs mailing list