[Scummvm-cvs-logs] scummvm master -> 32f86ce834261939600846e24c75c40959a35fae

tramboi bertrand_augereau at yahoo.fr
Tue Nov 22 22:19:32 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:
32f86ce834 DREAMWEB: 'findroominloc' ported to C++


Commit: 32f86ce834261939600846e24c75c40959a35fae
    https://github.com/scummvm/scummvm/commit/32f86ce834261939600846e24c75c40959a35fae
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-11-22T15:15:03-08:00

Commit Message:
DREAMWEB: 'findroominloc' 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 2b4fbb2..a903e4f 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -270,6 +270,7 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'playchannel1',
 	'createpanel',
 	'createpanel2',
+	'findroominloc',
 	], skip_output = [
 	# These functions are processed but not output
 	'dreamweb',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 65f002b..d120236 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -13384,25 +13384,6 @@ lookx2:
 	es.byte(bx+6) = al;
 }
 
-void DreamGenContext::findroominloc() {
-	STACK_CHECK;
-	al = data.byte(kMapy);
-	cx = -6;
-looky:
-	_add(cx, 6);
-	_sub(al, 10);
-	if (!flags.c())
-		goto looky;
-	al = data.byte(kMapx);
-	_dec(cx);
-lookx:
-	_inc(cx);
-	_sub(al, 11);
-	if (!flags.c())
-		goto lookx;
-	data.byte(kRoomnum) = cl;
-}
-
 void DreamGenContext::allocateload() {
 	STACK_CHECK;
 	push(es);
@@ -15089,7 +15070,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) {
 		case addr_restorereels: restorereels(); break;
 		case addr_restoreall: restoreall(); break;
 		case addr_disablepath: disablepath(); break;
-		case addr_findroominloc: findroominloc(); break;
 		case addr_dontloadseg: dontloadseg(); break;
 		case addr_allocateload: allocateload(); break;
 		case addr_getridoftemp: getridoftemp(); break;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 6317361..5309059 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -57,7 +57,6 @@ public:
 	static const uint16 addr_getridoftemp = 0xcb70;
 	static const uint16 addr_allocateload = 0xcb68;
 	static const uint16 addr_dontloadseg = 0xcb64;
-	static const uint16 addr_findroominloc = 0xcb58;
 	static const uint16 addr_disablepath = 0xcb50;
 	static const uint16 addr_restoreall = 0xcb44;
 	static const uint16 addr_restorereels = 0xcb40;
@@ -1288,7 +1287,7 @@ public:
 	void slabdoord();
 	void adjustup();
 	void slabdoorf();
-	void findroominloc();
+	//void loadintotemp();
 	void loadintroroom();
 	void saveseg();
 	//void showblink();
@@ -1603,8 +1602,8 @@ public:
 	void checksoundint();
 	void usewindow();
 	void wearshades();
-	void onedigit();
 	void pitinterupt();
+	void onedigit();
 	void deleverything();
 	void fadescreendown();
 	//void findxyfrompath();
@@ -1890,7 +1889,7 @@ public:
 	//void printboth();
 	//void standardload();
 	void undertextline();
-	//void loadintotemp();
+	//void findroominloc();
 	void sitdowninbar();
 	void shownames();
 	void savefileread();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 094b4bb..73b7b27 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -2253,5 +2253,12 @@ void DreamGenContext::playchannel1() {
 	playchannel1(al);
 }
 
+void DreamGenContext::findroominloc() {
+	uint8 x = data.byte(kMapx) / 11;
+	uint8 y = data.byte(kMapy) / 10;
+	uint8 roomNum = y * 6 + x;
+	data.byte(kRoomnum) = roomNum;
+}
+
 } /*namespace dreamgen */
 
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index f9bd62d..f30b13b 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -329,4 +329,5 @@
 	void showmainops();
 	void createpanel();
 	void createpanel2();
+	void findroominloc();
 






More information about the Scummvm-git-logs mailing list