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

tramboi bertrand_augereau at yahoo.fr
Tue Nov 29 11:49:33 CET 2011


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
55d7272197 DREAMWEB: 'nextfolder' ported to C++
ef31ac6db0 DREAMWEB: 'lastfolder' ported to C++


Commit: 55d727219705ba859657877a9a57a1a2e2665ada
    https://github.com/scummvm/scummvm/commit/55d727219705ba859657877a9a57a1a2e2665ada
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-11-29T02:03:29-08:00

Commit Message:
DREAMWEB: 'nextfolder' 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
    engines/dreamweb/use.cpp



diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index 9fb76eb..373a746 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -305,6 +305,7 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'showfolder',
 	'showleftpage',
 	'showrightpage',
+	'nextfolder',
 	'getlocation',
 	'setlocation',
 	], skip_output = [
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 85324fb..b19b86e 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -9740,40 +9740,6 @@ void DreamGenContext::loadmenu() {
 	loadintotemp2();
 }
 
-void DreamGenContext::nextfolder() {
-	STACK_CHECK;
-	_cmp(data.byte(kFolderpage), 12);
-	if (!flags.z())
-		goto cannextf;
-	blank();
-	return;
-cannextf:
-	_cmp(data.byte(kCommandtype), 201);
-	if (flags.z())
-		goto alreadynextf;
-	data.byte(kCommandtype) = 201;
-	al = 16;
-	commandonly();
-alreadynextf:
-	ax = data.word(kMousebutton);
-	_cmp(ax, data.word(kOldbutton));
-	if (flags.z())
-		return /* (notnextf) */;
-	_cmp(ax, 1);
-	if (flags.z())
-		goto donextf;
-	return;
-donextf:
-	_inc(data.byte(kFolderpage));
-	folderhints();
-	delpointer();
-	showfolder();
-	data.word(kMousebutton) = 0;
-	bx = offset_folderlist;
-	checkcoords();
-	worktoscreenm();
-}
-
 void DreamGenContext::folderhints() {
 	STACK_CHECK;
 	_cmp(data.byte(kFolderpage), 5);
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index a63d27d..76734fd 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -180,7 +180,6 @@ public:
 	static const uint16 addr_loadfolder = 0xc7c4;
 	static const uint16 addr_lastfolder = 0xc7c0;
 	static const uint16 addr_folderhints = 0xc7bc;
-	static const uint16 addr_nextfolder = 0xc7b8;
 	static const uint16 addr_loadmenu = 0xc7b0;
 	static const uint16 addr_showmenu = 0xc7ac;
 	static const uint16 addr_dumpmenu = 0xc79c;
@@ -1341,7 +1340,7 @@ public:
 	void calledenslift();
 	void useclearbox();
 	void entryanims();
-	void nextfolder();
+	//void nextfolder();
 	void getfreead();
 	void showarrows();
 	void walkintoroom();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index f44d290..0338a69 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -2423,5 +2423,36 @@ const uint8 *DreamGenContext::getTextInFile1(uint16 index) {
 	return string;
 }
 
+void DreamGenContext::checkFolderCoords() {
+	RectWithCallback folderlist[] = {
+		{ 280,320,160,200,&DreamGenContext::quitkey },
+		{ 143,300,6,194,&DreamGenContext::nextfolder },
+		{ 0,143,6,194,&DreamGenContext::lastfolder },
+		{ 0,320,0,200,&DreamGenContext::blank },
+		{ 0xFFFF,0,0,0,0 }
+	};
+	checkcoords(folderlist);
+}
+
+void DreamGenContext::nextfolder() {
+	if (data.byte(kFolderpage) == 12) {
+		blank();
+		return;
+	}
+	if (data.byte(kCommandtype) != 201) {
+		data.byte(kCommandtype) = 201;
+		commandonly(16);
+	}
+	if ((data.word(kMousebutton) == 1) && (data.word(kMousebutton) != data.word(kOldbutton))) {
+		++data.byte(kFolderpage);
+		folderhints();
+		delpointer();
+		showfolder();
+		data.word(kMousebutton) = 0;
+		checkFolderCoords();
+		worktoscreenm();
+	}
+}
+
 } /*namespace dreamgen */
 
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 76964b0..b4ad02e 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -355,9 +355,11 @@
 	void restoreall();
 	void restorereels();
 	void viewfolder();
+	void checkFolderCoords();
 	void showfolder();
 	void showleftpage();
 	void showrightpage();
+	void nextfolder();
 	uint8 getlocation(uint8 index);
 	void getlocation();
 	void setlocation(uint8 index);
diff --git a/engines/dreamweb/use.cpp b/engines/dreamweb/use.cpp
index 2e32a21..b64797e 100644
--- a/engines/dreamweb/use.cpp
+++ b/engines/dreamweb/use.cpp
@@ -211,14 +211,7 @@ void DreamGenContext::viewfolder() {
 		vsync();
 		dumppointer();
 		dumptextline();
-		RectWithCallback folderlist[] = {
-			{ 280,320,160,200,&DreamGenContext::quitkey },
-			{ 143,300,6,194,&DreamGenContext::nextfolder },
-			{ 0,143,6,194,&DreamGenContext::lastfolder },
-			{ 0,320,0,200,&DreamGenContext::blank },
-			{ 0xFFFF,0,0,0,0 }
-		};
-		checkcoords(folderlist);
+		checkFolderCoords();
 	} while (data.byte(kGetback) == 0);
 	data.byte(kManisoffscreen) = 0;
 	getridoftemp();


Commit: ef31ac6db0fe91afcaa9ac58d2f7a36fa6ba7af6
    https://github.com/scummvm/scummvm/commit/ef31ac6db0fe91afcaa9ac58d2f7a36fa6ba7af6
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-11-29T02:47:15-08:00

Commit Message:
DREAMWEB: 'lastfolder' 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 373a746..1d3bb5a 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -306,6 +306,7 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'showleftpage',
 	'showrightpage',
 	'nextfolder',
+	'lastfolder',
 	'getlocation',
 	'setlocation',
 	], skip_output = [
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index b19b86e..d435f5a 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -9791,42 +9791,6 @@ notaideadd:
 	hangonp();
 }
 
-void DreamGenContext::lastfolder() {
-	STACK_CHECK;
-	_cmp(data.byte(kFolderpage), 0);
-	if (!flags.z())
-		goto canlastf;
-	blank();
-	return;
-canlastf:
-	_cmp(data.byte(kCommandtype), 202);
-	if (flags.z())
-		goto alreadylastf;
-	data.byte(kCommandtype) = 202;
-	al = 17;
-	commandonly();
-alreadylastf:
-	_cmp(data.byte(kFolderpage), 0);
-	if (flags.z())
-		return /* (notlastf) */;
-	ax = data.word(kMousebutton);
-	_cmp(ax, data.word(kOldbutton));
-	if (flags.z())
-		return /* (notlastf) */;
-	_cmp(ax, 1);
-	if (flags.z())
-		goto dolastf;
-	return;
-dolastf:
-	_dec(data.byte(kFolderpage));
-	delpointer();
-	showfolder();
-	data.word(kMousebutton) = 0;
-	bx = offset_folderlist;
-	checkcoords();
-	worktoscreenm();
-}
-
 void DreamGenContext::loadfolder() {
 	STACK_CHECK;
 	dx = 2299;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 76734fd..36e2254 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -178,7 +178,6 @@ public:
 	static const uint16 addr_entersymbol = 0xc7d8;
 	static const uint16 addr_folderexit = 0xc7cc;
 	static const uint16 addr_loadfolder = 0xc7c4;
-	static const uint16 addr_lastfolder = 0xc7c0;
 	static const uint16 addr_folderhints = 0xc7bc;
 	static const uint16 addr_loadmenu = 0xc7b0;
 	static const uint16 addr_showmenu = 0xc7ac;
@@ -555,7 +554,6 @@ public:
 	static const uint16 offset_diarylist = 0x0e9c;
 	static const uint16 offset_decidelist = 0x13c1;
 	static const uint16 offset_symbollist = 0x0e5e;
-	static const uint16 offset_folderlist = 0x0e34;
 	static const uint16 offset_operand1 = 0x0b7e;
 	static const uint16 offset_keypadlist = 0x0d9a;
 	static const uint16 kStartvars = 0;
@@ -1500,7 +1498,7 @@ public:
 	//void showfirstuse();
 	void channel1only();
 	//void checkbasemem();
-	void lastfolder();
+	//void lastfolder();
 	void transfermap();
 	void showmonk();
 	void diarykeyn();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 0338a69..81d284c 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -1524,17 +1524,6 @@ void DreamGenContext::checkcoords() {
 		checkcoords(menulist);
 		break;
 	}
-	case offset_folderlist: {
-		RectWithCallback folderlist[] = {
-			{ 280,320,160,200,&DreamGenContext::quitkey },
-			{ 143,300,6,194,&DreamGenContext::nextfolder },
-			{ 0,143,6,194,&DreamGenContext::lastfolder },
-			{ 0,320,0,200,&DreamGenContext::blank },
-			{ 0xFFFF,0,0,0,0 }
-		};
-		checkcoords(folderlist);
-		break;
-	}
 	case offset_symbollist: {
 		RectWithCallback symbollist[] = {
 			{ kSymbolx+40,kSymbolx+64,kSymboly+2,kSymboly+16,&DreamGenContext::quitsymbol },
@@ -2454,5 +2443,25 @@ void DreamGenContext::nextfolder() {
 	}
 }
 
+void DreamGenContext::lastfolder() {
+	if (data.byte(kFolderpage) == 0) {
+		blank();
+		return;
+	}
+	if (data.byte(kCommandtype) != 202) {
+		data.byte(kCommandtype) = 202;
+		commandonly(17);
+	}
+
+	if ((data.word(kMousebutton) == 1) && (data.word(kMousebutton) != data.word(kOldbutton))) {
+		--data.byte(kFolderpage);
+		delpointer();
+		showfolder();
+		data.word(kMousebutton) = 0;
+		checkFolderCoords();
+		worktoscreenm();
+	}
+}
+
 } /*namespace dreamgen */
 
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index b4ad02e..2a6175b 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -360,6 +360,7 @@
 	void showleftpage();
 	void showrightpage();
 	void nextfolder();
+	void lastfolder();
 	uint8 getlocation(uint8 index);
 	void getlocation();
 	void setlocation(uint8 index);






More information about the Scummvm-git-logs mailing list