[Scummvm-cvs-logs] scummvm master -> 66c740ceea29f97e631e794a7ccdec5865fbb92d

tramboi bertrand_augereau at yahoo.fr
Mon Nov 14 20:09:57 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:
66c740ceea DREAMWEB: 'showicon' ported to C++


Commit: 66c740ceea29f97e631e794a7ccdec5865fbb92d
    https://github.com/scummvm/scummvm/commit/66c740ceea29f97e631e794a7ccdec5865fbb92d
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-11-14T13:08:19-08:00

Commit Message:
DREAMWEB: 'showicon' 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 e37f155..b834017 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -158,6 +158,7 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'dumppointer',
 	'showpointer',
 	'animpointer',
+	'showicon',
 	'checkcoords',
 	'readmouse',
 	'readmouse1',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index a092509..5b869d4 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -14708,57 +14708,6 @@ success:
 	data.byte(kTurndirection) = 0;
 }
 
-void DreamGenContext::showicon() {
-	STACK_CHECK;
-	_cmp(data.byte(kReallocation), 50);
-	if (!flags.c())
-		goto isdream1;
-	showpanel();
-	showman();
-	roomname();
-	panelicons1();
-	zoomicon();
-	return;
-isdream1:
-	ds = data.word(kTempsprites);
-	di = 72;
-	bx = 2;
-	al = 45;
-	ah = 0;
-	showframe();
-	ds = data.word(kTempsprites);
-	di = 72+47;
-	bx = 2;
-	al = 46;
-	ah = 0;
-	showframe();
-	ds = data.word(kTempsprites);
-	di = 69-10;
-	bx = 21;
-	al = 49;
-	ah = 0;
-	showframe();
-	ds = data.word(kTempsprites);
-	di = 160+88;
-	bx = 2;
-	al = 45;
-	ah = 4;
-	showframe();
-	ds = data.word(kTempsprites);
-	di = 160+43;
-	bx = 2;
-	al = 46;
-	ah = 4;
-	showframe();
-	ds = data.word(kTempsprites);
-	di = 160+101;
-	bx = 21;
-	al = 49;
-	ah = 4;
-	showframe();
-	middlepanel();
-}
-
 void DreamGenContext::middlepanel() {
 	STACK_CHECK;
 	ds = data.word(kTempsprites);
@@ -17131,7 +17080,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) {
 		case addr_printmessage2: printmessage2(); break;
 		case addr_setwalk: setwalk(); break;
 		case addr_workoutframes: workoutframes(); break;
-		case addr_showicon: showicon(); break;
 		case addr_middlepanel: middlepanel(); break;
 		case addr_showman: showman(); break;
 		case addr_roomname: roomname(); break;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index c29463a..4ba7e40 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -97,7 +97,6 @@ public:
 	static const uint16 addr_roomname = 0xca74;
 	static const uint16 addr_showman = 0xca6c;
 	static const uint16 addr_middlepanel = 0xca68;
-	static const uint16 addr_showicon = 0xca64;
 	static const uint16 addr_workoutframes = 0xca54;
 	static const uint16 addr_setwalk = 0xca44;
 	static const uint16 addr_printmessage2 = 0xca30;
@@ -1652,7 +1651,7 @@ public:
 	void startup();
 	void savegame();
 	void startpaltoend();
-	void showicon();
+	//void showicon();
 	void findopenpos();
 	void describeob();
 	void deleteexframe();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 674bc49..5fa6e8a 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -1721,6 +1721,25 @@ bool DreamGenContext::isCD() {
 	return (data.byte(kSpeechloaded) == 1);
 }
 
+void DreamGenContext::showicon() {
+	if (data.byte(kReallocation) < 50) {
+		showpanel();
+		showman();
+		roomname();
+		panelicons1();
+		zoomicon();
+	} else {
+		Frame *tempSprites = (Frame *)segRef(data.word(kTempsprites)).ptr(0, 0);
+		showframe(tempSprites, 72, 2, 45, 0);
+		showframe(tempSprites, 72+47, 2, 46, 0);
+		showframe(tempSprites, 69-10, 21, 49, 0);
+		showframe(tempSprites, 160+88, 2, 45, 4 & 0xfe);
+		showframe(tempSprites, 160+43, 2, 46, 4 & 0xfe);
+		showframe(tempSprites, 160+101, 21, 49, 4 & 0xfe);
+		middlepanel();
+	}
+}
+
 void DreamGenContext::checkifset() {
 	flags._z = !checkifset(al, ah);
 }
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 8fd1598..27bbe31 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -235,6 +235,7 @@
 	void hangon(uint16 frameCount);
 	void hangonp();
 	void hangonp(uint16 count);
+	void showicon();
 	uint8 findnextcolon(uint8 **string);
 	void findnextcolon();
 	uint8 *getobtextstartCPP();






More information about the Scummvm-git-logs mailing list