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

tramboi bertrand_augereau at yahoo.fr
Mon Sep 5 18:40:07 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:
e0b77beb99 DREAMWEB: 'obtoinv' ported to C++


Commit: e0b77beb99138cf840dee93037ca11ea98a9e333
    https://github.com/scummvm/scummvm/commit/e0b77beb99138cf840dee93037ca11ea98a9e333
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-09-02T01:12:14-07:00

Commit Message:
DREAMWEB: 'obtoinv' 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 a9fb153..9427664 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -187,6 +187,7 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'dumpeverything',
 	'isitworn',
 	'makeworn',
+	'obtoinv',
 	], skip_output = [
 	# These functions are processed but not output
 	'dreamweb',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index c28c289..3ee8c79 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -3955,66 +3955,6 @@ findopen2a:
 		goto findopen1a;
 }
 
-void DreamGenContext::obtoinv() {
-	STACK_CHECK;
-	push(bx);
-	push(es);
-	push(si);
-	push(ax);
-	push(ax);
-	push(di);
-	push(bx);
-	ds = data.word(kIcons1);
-	_sub(di, 2);
-	_sub(bx, 1);
-	al = 10;
-	ah = 0;
-	showframe();
-	bx = pop();
-	di = pop();
-	ax = pop();
-	_cmp(al, 255);
-	if (flags.z())
-		goto finishfill;
-	push(bx);
-	push(di);
-	push(ax);
-	ds = data.word(kExtras);
-	_cmp(ah, 4);
-	if (flags.z())
-		goto isanextra;
-	ds = data.word(kFreeframes);
-isanextra:
-	cl = al;
-	_add(al, al);
-	_add(al, cl);
-	_inc(al);
-	ah = 128;
-	_add(bx, 19);
-	_add(di, 18);
-	showframe();
-	ax = pop();
-	di = pop();
-	bx = pop();
-	push(bx);
-	getanyaddir();
-	isitworn();
-	bx = pop();
-	if (!flags.z())
-		goto finishfill;
-	ds = data.word(kIcons1);
-	_sub(di, 3);
-	_sub(bx, 2);
-	al = 7;
-	ah = 0;
-	showframe();
-finishfill:
-	ax = pop();
-	si = pop();
-	es = pop();
-	bx = pop();
-}
-
 void DreamGenContext::examineob() {
 	STACK_CHECK;
 	data.byte(kPointermode) = 0;
@@ -17368,7 +17308,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) {
 		case addr_fillopen: fillopen(); break;
 		case addr_findallryan: findallryan(); break;
 		case addr_findallopen: findallopen(); break;
-		case addr_obtoinv: obtoinv(); break;
 		case addr_examineob: examineob(); break;
 		case addr_makemainscreen: makemainscreen(); break;
 		case addr_getbackfromob: getbackfromob(); break;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index f3b502a..68e7b65 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -494,7 +494,6 @@ public:
 	static const uint16 addr_getbackfromob = 0xc344;
 	static const uint16 addr_makemainscreen = 0xc340;
 	static const uint16 addr_examineob = 0xc33c;
-	static const uint16 addr_obtoinv = 0xc330;
 	static const uint16 addr_findallopen = 0xc32c;
 	static const uint16 addr_findallryan = 0xc328;
 	static const uint16 addr_fillopen = 0xc324;
@@ -1480,7 +1479,7 @@ public:
 	void checkspeed();
 	//void printchar();
 	void showkeypad();
-	void obtoinv();
+	//void obtoinv();
 	//void getroomdata();
 	void removeobfrominv();
 	void usecoveredbox();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 7313966..e6c8685 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -1796,5 +1796,25 @@ void DreamGenContext::makeworn(DynObject *object) {
 	object->id[1] = 'E'-'A';
 }
 
+void DreamGenContext::obtoinv() {
+	obtoinv(al, ah, di, bx);
+}
+
+void DreamGenContext::obtoinv(uint8 index, uint8 flag, uint16 x, uint16 y) {
+	Frame *icons1 = (Frame *)segRef(data.word(kIcons1)).ptr(0, 0);
+	showframe(icons1, x - 2, y - 1, 10, 0);
+	if (index == 0xff)
+		return;
+
+	Frame *extras = (Frame *)segRef(data.word(kExtras)).ptr(0, 0);
+	Frame *frees = (Frame *)segRef(data.word(kFreeframes)).ptr(0, 0);
+	Frame *frames = (ah == 4) ? extras : frees;
+	showframe(frames, x + 18, y + 19, 3 * index + 1, 128);
+	const DynObject *object = (const DynObject *)getanyaddir(index, flag);
+	bool worn = isitworn(object);
+	if (worn)
+		showframe(icons1, x - 3, y - 2, 7, 0);
+}
+
 } /*namespace dreamgen */
 
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 4d22fcc..70ba5f7 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -224,4 +224,6 @@
 	bool isitworn(const DynObject *object);
 	void makeworn();
 	void makeworn(DynObject *object);
+	void obtoinv();
+	void obtoinv(uint8 index, uint8 flag, uint16 x, uint16 y);
 






More information about the Scummvm-git-logs mailing list