[Scummvm-cvs-logs] scummvm master -> 529cd5bf959490abcc39366e06309a6aa838fe9d

tramboi bertrand_augereau at yahoo.fr
Mon Nov 14 14:36:23 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:
529cd5bf95 DREAMWEB: 'sortoutmap' ported to C++


Commit: 529cd5bf959490abcc39366e06309a6aa838fe9d
    https://github.com/scummvm/scummvm/commit/529cd5bf959490abcc39366e06309a6aa838fe9d
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-09-04T03:55:04-07:00

Commit Message:
DREAMWEB: 'sortoutmap' 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 2066ae9..cc3f7b2 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -198,6 +198,7 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'findnextcolon',
 	'usetext',
 	'bresenhams',
+	'sortoutmap',
 	'examineobtext',
 	'wornerror',
 	], skip_output = [
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 8f4b4ce..5f9712e 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -15374,29 +15374,6 @@ void DreamGenContext::restoreall() {
 	setallchanges();
 }
 
-void DreamGenContext::sortoutmap() {
-	STACK_CHECK;
-	push(es);
-	push(di);
-	ds = data.word(kWorkspace);
-	si = 0;
-	es = data.word(kMapdata);
-	di = 0;
-	cx = (60);
-blimey:
-	push(cx);
-	push(si);
-	cx = (66);
-	_movsb(cx, true);
-	si = pop();
-	cx = pop();
-	_add(si, 132);
-	if (--cx)
-		goto blimey;
-	di = pop();
-	es = pop();
-}
-
 void DreamGenContext::disablepath() {
 	STACK_CHECK;
 	push(cx);
@@ -17237,7 +17214,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) {
 		case addr_getridofall: getridofall(); break;
 		case addr_restorereels: restorereels(); break;
 		case addr_restoreall: restoreall(); break;
-		case addr_sortoutmap: sortoutmap(); break;
 		case addr_disablepath: disablepath(); break;
 		case addr_findroominloc: findroominloc(); break;
 		case addr_dontloadseg: dontloadseg(); break;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index f3a763f..3da4e71 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -60,7 +60,6 @@ public:
 	static const uint16 addr_dontloadseg = 0xcb64;
 	static const uint16 addr_findroominloc = 0xcb58;
 	static const uint16 addr_disablepath = 0xcb50;
-	static const uint16 addr_sortoutmap = 0xcb48;
 	static const uint16 addr_restoreall = 0xcb44;
 	static const uint16 addr_restorereels = 0xcb40;
 	static const uint16 addr_getridofall = 0xcb3c;
@@ -1769,7 +1768,7 @@ public:
 	//void madmode();
 	void intro3text();
 	void allocatemem();
-	void sortoutmap();
+	//void sortoutmap();
 	//void showrain();
 	void useopened();
 	void inventory();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 7f8a511..93688bf 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -1882,5 +1882,15 @@ void DreamGenContext::zoomonoff() {
 	worktoscreenm();
 }
 
+void DreamGenContext::sortoutmap() {
+	const uint8 *src = (const uint8 *)segRef(data.word(kWorkspace)).ptr(0, 0);
+	uint8 *dst = (uint8 *)segRef(data.word(kMapdata)).ptr(0, 0);
+	for (uint16 y = 0; y < kMaplength; ++y) {
+		memcpy(dst, src, kMapwidth);
+		dst += kMapwidth;
+		src += 132;
+	}
+}
+
 } /*namespace dreamgen */
 
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index ac7e1a5..3e928fe 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -246,4 +246,5 @@
 	uint8 getblockofpixel(uint8 x, uint8 y);
 	void bresenhams();
 	void examineobtext();
+	void sortoutmap();
 






More information about the Scummvm-git-logs mailing list