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

tramboi bertrand_augereau at yahoo.fr
Wed Nov 16 22:19:49 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:
d608c07944 DREAMWEB: 'showtime' ported to C++


Commit: d608c079447c64255e4e27d44a7dc843cf5f6407
    https://github.com/scummvm/scummvm/commit/d608c079447c64255e4e27d44a7dc843cf5f6407
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-11-16T15:18:28-08:00

Commit Message:
DREAMWEB: 'showtime' 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 4389f06..d38fca9 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -207,6 +207,7 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'convicons',
 	'examineob',
 	'showwatch',
+	'showtime',
 	'roomname',
 	'transfertext',
 	'splitintolines',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 9479d34..41ed80e 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -13298,72 +13298,6 @@ void DreamGenContext::checkforshake() {
 	data.byte(kShakecounter) = -1;
 }
 
-void DreamGenContext::showtime() {
-	STACK_CHECK;
-	_cmp(data.byte(kWatchon), 0);
-	if (flags.z())
-		return /* (nowatch) */;
-	al = data.byte(kSecondcount);
-	cl = 0;
-	twodigitnum();
-	push(ax);
-	al = ah;
-	ah = 0;
-	_add(ax, 91*3+10);
-	ds = data.word(kCharset1);
-	di = 282+5;
-	bx = 21;
-	showframe();
-	ax = pop();
-	ah = 0;
-	_add(ax, 91*3+10);
-	ds = data.word(kCharset1);
-	di = 282+9;
-	bx = 21;
-	showframe();
-	al = data.byte(kMinutecount);
-	cl = 0;
-	twodigitnum();
-	push(ax);
-	al = ah;
-	ah = 0;
-	_add(ax, 91*3);
-	ds = data.word(kCharset1);
-	di = 270+5;
-	bx = 21;
-	showframe();
-	ax = pop();
-	ah = 0;
-	_add(ax, 91*3);
-	ds = data.word(kCharset1);
-	di = 270+11;
-	bx = 21;
-	showframe();
-	al = data.byte(kHourcount);
-	cl = 0;
-	twodigitnum();
-	push(ax);
-	al = ah;
-	ah = 0;
-	_add(ax, 91*3);
-	ds = data.word(kCharset1);
-	di = 256+5;
-	bx = 21;
-	showframe();
-	ax = pop();
-	ah = 0;
-	_add(ax, 91*3);
-	ds = data.word(kCharset1);
-	di = 256+11;
-	bx = 21;
-	showframe();
-	ax = 91*3+20;
-	ds = data.word(kCharset1);
-	di = 267+5;
-	bx = 21;
-	showframe();
-}
-
 void DreamGenContext::dumpwatch() {
 	STACK_CHECK;
 	_cmp(data.byte(kWatchdump), 1);
@@ -16209,7 +16143,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) {
 		case addr_screenupdate: screenupdate(); break;
 		case addr_watchreel: watchreel(); break;
 		case addr_checkforshake: checkforshake(); break;
-		case addr_showtime: showtime(); break;
 		case addr_dumpwatch: dumpwatch(); break;
 		case addr_showbyte: showbyte(); break;
 		case addr_onedigit: onedigit(); break;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 97b2951..63783c0 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -110,7 +110,6 @@ public:
 	static const uint16 addr_onedigit = 0xc9b8;
 	static const uint16 addr_showbyte = 0xc9b4;
 	static const uint16 addr_dumpwatch = 0xc9b0;
-	static const uint16 addr_showtime = 0xc9ac;
 	static const uint16 addr_checkforshake = 0xc9a4;
 	static const uint16 addr_watchreel = 0xc9a0;
 	static const uint16 addr_screenupdate = 0xc99c;
@@ -1918,7 +1917,7 @@ public:
 	void readcitypic();
 	void getpersontext();
 	void intoinv();
-	void showtime();
+	//void showtime();
 	void parser();
 	void hangonw();
 	void intro();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 6292882..8e7a076 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -1956,6 +1956,25 @@ void DreamGenContext::showwatch() {
 	}
 }
 
+void DreamGenContext::showtime() {
+	if (data.byte(kWatchon) == 0)
+		return;
+	Frame *charset = (Frame *)segRef(data.word(kCharset1)).ptr(0, 0);
+
+	uint8 mod1, mod10;
+	twodigitnum(data.byte(kSecondcount), 0, &mod10, &mod1);
+	showframe(charset, 282+5, 21, 91*3+10 + mod10, 0);
+	showframe(charset, 282+9, 21, 91*3+10 + mod1, 0);
+	twodigitnum(data.byte(kMinutecount), 0, &mod10, &mod1);
+	showframe(charset, 270+5, 21, 91*3 + mod10, 0);
+	showframe(charset, 270+11, 21, 91*3 + mod1, 0);
+	twodigitnum(data.byte(kHourcount), 0, &mod10, &mod1);
+	showframe(charset, 256+5, 21, 91*3 + mod10, 0);
+	showframe(charset, 256+11, 21, 91*3 + mod1, 0);
+
+	showframe(charset, 267+5, 21, 91*3+20, 0);
+}
+
 void DreamGenContext::watchcount() {
 	if (data.byte(kWatchon) == 0)
 		return;
@@ -2021,16 +2040,16 @@ void DreamGenContext::loadroom() {
 }
 
 void DreamGenContext::twodigitnum(uint8 num, uint8 baseChar,
-                                  uint8 &digit1, uint8 &digit2) {
-	digit1 = baseChar + num/10;
-	digit2 = baseChar + num%10;
+                                  uint8 *digit1, uint8 *digit2) {
+	*digit1 = baseChar + num/10;
+	*digit2 = baseChar + num%10;
 }
 
 // Convert a number between 0 and 99 into its two digits, either
 // ASCII (if cl/basechar == '0'), or raw (if cl/basechar == 0).
 void DreamGenContext::twodigitnum() {
 	uint8 digit1, digit2;
-	twodigitnum(al, cl, digit1, digit2);
+	twodigitnum(al, cl, &digit1, &digit2);
 	ah = digit1;
 	al = digit2;
 }
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index dde3193..aa47a62 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -251,6 +251,7 @@
 	void convicons();
 	void examineob(bool examineAgain = true);
 	void showwatch();
+	void showtime();
 	void roomname();
 	void transfertext();
 	void initrain();
@@ -272,6 +273,6 @@
 	void putundermenu();
 	void textformonk();
 	void textforend();
-	void twodigitnum(uint8 num, uint8 baseChar, uint8 &digit1, uint8 &digit2);
+	void twodigitnum(uint8 num, uint8 baseChar, uint8 *digit1, uint8 *digit2);
 	void twodigitnum();
 






More information about the Scummvm-git-logs mailing list