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

tramboi bertrand_augereau at yahoo.fr
Mon Aug 22 19:14:19 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:
a39a3eda46 DREAMWEB: 'checkone' ported to C++


Commit: a39a3eda46aea108a51556f001617ad28d29e520
    https://github.com/scummvm/scummvm/commit/a39a3eda46aea108a51556f001617ad28d29e520
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-08-22T10:09:16-07:00

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

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



diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index 84859b1..8e37b4e 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -144,6 +144,7 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'showallfree',
 	'adjustlen',
 	'finishedwalking',
+	'checkone',
 	], skip_output = [
 	# These functions are processed but not output
 	'dreamweb',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 54428c6..0ee8c50 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -2076,41 +2076,6 @@ void DreamGenContext::delsprite() {
 	_stosb(cx, true);
 }
 
-void DreamGenContext::checkone() {
-	STACK_CHECK;
-	push(cx);
-	al = ch;
-	ah = 0;
-	cl = 4;
-	_shr(ax, cl);
-	dl = al;
-	cx = pop();
-	al = cl;
-	ah = 0;
-	cl = 4;
-	_shr(ax, cl);
-	ah = dl;
-	push(ax);
-	ch = 0;
-	cl = al;
-	push(cx);
-	al = ah;
-	ah = 0;
-	cx = 11;
-	_mul(cx);
-	cx = pop();
-	_add(ax, cx);
-	cx = 3;
-	_mul(cx);
-	si = ax;
-	ds = data.word(kBuffers);
-	_add(si, (0+(228*13)+32+60+(32*32)));
-	_lodsw();
-	cx = ax;
-	_lodsb();
-	dx = pop();
-}
-
 void DreamGenContext::checkforexit() {
 	STACK_CHECK;
 	cl = data.byte(kRyanx);
@@ -18123,7 +18088,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) {
 		case addr_addtopeoplelist: addtopeoplelist(); break;
 		case addr_checkspeed: checkspeed(); break;
 		case addr_delsprite: delsprite(); break;
-		case addr_checkone: checkone(); break;
 		case addr_mainman: mainman(); break;
 		case addr_checkforexit: checkforexit(); break;
 		case addr_adjustdown: adjustdown(); break;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index a20d251..7ed079c 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -612,7 +612,6 @@ public:
 	static const uint16 addr_adjustdown = 0xc14c;
 	static const uint16 addr_checkforexit = 0xc148;
 	static const uint16 addr_mainman = 0xc138;
-	static const uint16 addr_checkone = 0xc12c;
 	static const uint16 addr_delsprite = 0xc11c;
 	static const uint16 addr_checkspeed = 0xc110;
 	static const uint16 addr_addtopeoplelist = 0xc108;
@@ -1799,7 +1798,7 @@ public:
 	//void copyname();
 	void look();
 	void setmouse();
-	//void getdimension();
+	//void checkone();
 	void transferinv();
 	void candles2();
 	void pickupob();
@@ -1875,7 +1874,7 @@ public:
 	void grafittidoor();
 	void input();
 	void nextdest();
-	void checkone();
+	//void getdimension();
 	void makecaps();
 	void read();
 	void fadescreenups();
diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp
index c1a47ae..e9a40d7 100644
--- a/engines/dreamweb/sprite.cpp
+++ b/engines/dreamweb/sprite.cpp
@@ -869,5 +869,25 @@ void DreamGenContext::movemap(uint8 param) {
 	data.byte(kNowinnewroom) = 1;
 }
 
+void DreamGenContext::checkone() {
+	uint8 flag, flagEx, type, flagX, flagY;
+	checkone(cl, ch, &flag, &flagEx, &type, &flagX, &flagY);
+
+	cl = flag;
+	ch = flagEx;
+	dl = flagX;
+	dh = flagY;
+	al = type;
+}
+
+void DreamGenContext::checkone(uint8 x, uint8 y, uint8 *flag, uint8 *flagEx, uint8 *type, uint8 *flagX, uint8 *flagY) {
+	*flagX = x / 16;
+	*flagY = y / 16;
+	const uint8 *tileData = segRef(data.word(kBuffers)).ptr(kMapflags + (*flagY * 11 + *flagX) * 3, 3);
+	*flag = tileData[0];
+	*flagEx = tileData[1];
+	*type = tileData[2];
+}
+
 } /*namespace dreamgen */
 
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 5443ee5..9d5550b 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -169,5 +169,6 @@
 	void showallfree();
 	bool finishedwalkingCPP();
 	void finishedwalking();
-
+	void checkone();
+	void checkone(uint8 x, uint8 y, uint8 *flag, uint8 *flagEx, uint8 *type, uint8 *flagX, uint8 *flagY);
 






More information about the Scummvm-git-logs mailing list