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

tramboi bertrand_augereau at yahoo.fr
Fri Nov 18 06:41:18 CET 2011


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

Summary:
e808034e1d DREAMWEB: 'printchar' now has an overload that doesn't advance x for convenience, and supports NULL output widthheight p
f455e609c9 DREAMWEB: Cleaning in 'input'


Commit: e808034e1d8f2ed37de0e24ded6d453f3d2fc411
    https://github.com/scummvm/scummvm/commit/e808034e1d8f2ed37de0e24ded6d453f3d2fc411
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-11-17T23:39:27-08:00

Commit Message:
DREAMWEB: 'printchar' now has an overload that doesn't advance x for convenience, and supports NULL output widthheight parameters

Changed paths:
    engines/dreamweb/print.cpp
    engines/dreamweb/stubs.h



diff --git a/engines/dreamweb/print.cpp b/engines/dreamweb/print.cpp
index edaf8ee..8ae9df5 100644
--- a/engines/dreamweb/print.cpp
+++ b/engines/dreamweb/print.cpp
@@ -69,20 +69,25 @@ void DreamGenContext::printchar() {
 void DreamGenContext::printchar(const Frame *charSet, uint16* x, uint16 y, uint8 c, uint8 nextChar, uint8 *width, uint8 *height) {
 	if (c == 255)
 		return;
-	push(si);
-	push(di);
-	if (data.byte(kForeignrelease) != 0)
+
+	uint8 dummyWidth, dummyHeight;
+	if (width == NULL)
+		width = &dummyWidth;
+	if (height == NULL)
+		height = &dummyHeight;
+	if (data.byte(kForeignrelease))
 		y -= 3;
 	uint16 tmp = c - 32 + data.word(kCharshift);
 	showframe(charSet, *x, y, tmp & 0x1ff, (tmp >> 8) & 0xfe, width, height);
-	di = pop();
-	si = pop();
-	_cmp(data.byte(kKerning), 0);
-	if (flags.z())
+	if (data.byte(kKerning), 0)
 		*width = kernchars(c, nextChar, *width);
 	(*x) += *width;
 }
 
+void DreamGenContext::printchar(const Frame *charSet, uint16 x, uint16 y, uint8 c, uint8 nextChar, uint8 *width, uint8 *height) {
+	printchar(charSet, &x, y, c, nextChar, width, height);
+}
+
 void DreamGenContext::printslow() {
 	al = printslow(es.ptr(si, 0), di, bx, dl, (bool)(dl & 1));
 }
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 30f5f1d..38c0932 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -61,6 +61,7 @@
 	void printboth(const Frame* charSet, uint16 *x, uint16 y, uint8 c, uint8 nextChar);
 	void printchar();
 	void printchar(const Frame* charSet, uint16 *x, uint16 y, uint8 c, uint8 nextChar, uint8 *width, uint8 *height);
+	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 printdirect(const uint8* string, uint16 x, uint16 y, uint8 maxWidth, bool centered);


Commit: f455e609c9109abb32132efab05eb6d635a4ca75
    https://github.com/scummvm/scummvm/commit/f455e609c9109abb32132efab05eb6d635a4ca75
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-11-17T23:40:05-08:00

Commit Message:
DREAMWEB: Cleaning in 'input'

Changed paths:
    engines/dreamweb/monitor.cpp



diff --git a/engines/dreamweb/monitor.cpp b/engines/dreamweb/monitor.cpp
index 4386e1a..d53b0b2 100644
--- a/engines/dreamweb/monitor.cpp
+++ b/engines/dreamweb/monitor.cpp
@@ -109,12 +109,7 @@ void DreamGenContext::input() {
 	char *inputLine = (char *)cs.ptr(kInputline, 64);
 	memset(inputLine, 0, 64);
 	data.word(kCurpos) = 0;
-	ds = data.word(kTempcharset);
-	{
-		uint16 x = data.word(kMonadx);
-		uint8 width, height;
-		printchar((Frame *)segRef(data.word(kTempcharset)).ptr(0, 0), &x, data.word(kMonady), '>', 0, &width, &height);
-	}
+	printchar((Frame *)segRef(data.word(kTempcharset)).ptr(0, 0), data.word(kMonadx), data.word(kMonady), '>', 0, NULL, NULL);
 	multidump(data.word(kMonadx), data.word(kMonady), 6, 8);
 	data.word(kMonadx) += 6;
 	data.word(kCurslocx) = data.word(kMonadx);
@@ -146,11 +141,7 @@ void DreamGenContext::input() {
 			continue;
 		multiget(segRef(data.word(kMapstore)).ptr(data.word(kCurpos) * 256, 0), data.word(kMonadx), data.word(kMonady), 8, 8);
 		uint8 charWidth;
-		{
-			uint16 x = data.word(kMonadx);
-			uint8 height;
-			printchar((Frame *)segRef(data.word(kTempcharset)).ptr(0, 0), &x, data.word(kMonady), currentKey, 0, &charWidth, &height);
-		}
+		printchar((Frame *)segRef(data.word(kTempcharset)).ptr(0, 0), data.word(kMonadx), data.word(kMonady), currentKey, 0, &charWidth, NULL);
 		inputLine[data.word(kCurpos) * 2 + 1] = charWidth;
 		data.word(kMonadx) += charWidth;
 		++data.word(kCurpos);






More information about the Scummvm-git-logs mailing list