[Scummvm-cvs-logs] scummvm master -> 19768db88210c8491a729fb20ac6af040296a0ec

tramboi bertrand_augereau at yahoo.fr
Thu Aug 25 09:17:03 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:
19768db882 DREAMWEB: 'drawflags' ported to C++


Commit: 19768db88210c8491a729fb20ac6af040296a0ec
    https://github.com/scummvm/scummvm/commit/19768db88210c8491a729fb20ac6af040296a0ec
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-08-25T02:12:27-07:00

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

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



diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index 6596d4e..744e285 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -161,6 +161,7 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'readmouse3',
 	'readmouse4',
 	'waitframes',
+	'drawflags',
 	], skip_output = [
 	# These functions are processed but not output
 	'dreamweb',
diff --git a/engines/dreamweb/backdrop.cpp b/engines/dreamweb/backdrop.cpp
index 6243cee..f667e7b 100644
--- a/engines/dreamweb/backdrop.cpp
+++ b/engines/dreamweb/backdrop.cpp
@@ -281,5 +281,21 @@ void DreamGenContext::showallfree() {
 	}
 }
 
+void DreamGenContext::drawflags() {
+	uint8 *mapFlags = segRef(data.word(kBuffers)).ptr(kMapflags, 0);
+	const uint8 *mapData = segRef(data.word(kMapdata)).ptr(kMap + data.byte(kMapy) * kMapwidth + data.byte(kMapx), 0);
+	const uint8 *backdropFlags = segRef(data.word(kBackdrop)).ptr(kFlags, 0);
+
+	for (size_t i = 0; i < 10; ++i) {
+		for (size_t j = 0; j < 11; ++j) {
+			uint8 tile = mapData[i * kMapwidth + j];
+			mapFlags[0] = backdropFlags[2 * tile + 0];
+			mapFlags[1] = backdropFlags[2 * tile + 1];
+			mapFlags[2] = tile;
+			mapFlags += 3;
+		}
+	}
+}
+
 } /*namespace dreamgen */
 
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 721ac52..8d3518d 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -6321,45 +6321,6 @@ void DreamGenContext::drawfloor() {
 	es = pop();
 }
 
-void DreamGenContext::drawflags() {
-	STACK_CHECK;
-	es = data.word(kBuffers);
-	di = (0+(228*13)+32+60+(32*32));
-	al = data.byte(kMapy);
-	ah = 0;
-	cx = (66);
-	_mul(cx);
-	bl = data.byte(kMapx);
-	bh = 0;
-	_add(ax, bx);
-	si = (0);
-	_add(si, ax);
-	cx = 10;
-_tmp28:
-	push(cx);
-	cx = 11;
-_tmp28a:
-	ds = data.word(kMapdata);
-	_lodsb();
-	ds = data.word(kBackdrop);
-	push(si);
-	push(ax);
-	ah = 0;
-	_add(ax, ax);
-	si = (0);
-	_add(si, ax);
-	_movsw();
-	ax = pop();
-	_stosb();
-	si = pop();
-	if (--cx)
-		goto _tmp28a;
-	_add(si, (66)-11);
-	cx = pop();
-	if (--cx)
-		goto _tmp28;
-}
-
 void DreamGenContext::showallex() {
 	STACK_CHECK;
 	es = data.word(kBuffers);
@@ -18156,7 +18117,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) {
 		case addr_deleteextext: deleteextext(); break;
 		case addr_blockget: blockget(); break;
 		case addr_drawfloor: drawfloor(); break;
-		case addr_drawflags: drawflags(); break;
 		case addr_showallex: showallex(); break;
 		case addr_autolook: autolook(); break;
 		case addr_look: look(); break;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 7fc3091..fc4deeb 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -449,7 +449,6 @@ public:
 	static const uint16 addr_look = 0xc470;
 	static const uint16 addr_autolook = 0xc46c;
 	static const uint16 addr_showallex = 0xc450;
-	static const uint16 addr_drawflags = 0xc43c;
 	static const uint16 addr_drawfloor = 0xc428;
 	static const uint16 addr_blockget = 0xc424;
 	static const uint16 addr_deleteextext = 0xc420;
@@ -1973,7 +1972,7 @@ public:
 	void getlocation();
 	void geteitherad();
 	//void placesetobject();
-	void drawflags();
+	//void drawflags();
 	void zoomonoff();
 	void updatesymboltop();
 	void showryanpage();
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index c1a9140..7c8cee4 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -190,4 +190,5 @@
 	void readmouse3();
 	void readmouse4();
 	uint16 waitframes();
+	void drawflags();
 






More information about the Scummvm-git-logs mailing list