[Scummvm-cvs-logs] scummvm master -> 7190f1374e1a905af91a7cda10f8ef1771263698

tramboi bertrand_augereau at yahoo.fr
Sun Nov 20 12:20:54 CET 2011


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

Summary:
f0ccf111f2 DREAMWEB: 'accesslighton' and 'accesslightoff' ported to C++
3d16344e99 DREAMWEB: Accessors for kTempGraphics
7190f1374e DREAMWEB: Accessor for kTempcharset


Commit: f0ccf111f2fc348caf2e3fefe422c085d6352def
    https://github.com/scummvm/scummvm/commit/f0ccf111f2fc348caf2e3fefe422c085d6352def
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-11-20T05:18:26-08:00

Commit Message:
DREAMWEB: 'accesslighton' and 'accesslightoff' ported to C++

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



diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index a398c28..49b4afd 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -250,6 +250,8 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'showcurrentfile',
 	'input',
 	'monprint',
+	'accesslighton',
+	'accesslightoff',
 	], skip_output = [
 	# These functions are processed but not output
 	'dreamweb',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 6d5952c..2a9b64a 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -6152,40 +6152,6 @@ void DreamGenContext::powerlightoff() {
 	multidump();
 }
 
-void DreamGenContext::accesslighton() {
-	STACK_CHECK;
-	di = 74;
-	bx = 182;
-	ds = data.word(kTempgraphics);
-	al = 8;
-	ah = 0;
-	push(di);
-	push(bx);
-	showframe();
-	bx = pop();
-	di = pop();
-	cl = 12;
-	ch = 8;
-	multidump();
-}
-
-void DreamGenContext::accesslightoff() {
-	STACK_CHECK;
-	di = 74;
-	bx = 182;
-	ds = data.word(kTempgraphics);
-	al = 7;
-	ah = 0;
-	push(di);
-	push(bx);
-	showframe();
-	bx = pop();
-	di = pop();
-	cl = 12;
-	ch = 8;
-	multidump();
-}
-
 void DreamGenContext::locklighton() {
 	STACK_CHECK;
 	di = 56;
@@ -15233,8 +15199,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) {
 		case addr_randomaccess: randomaccess(); break;
 		case addr_powerlighton: powerlighton(); break;
 		case addr_powerlightoff: powerlightoff(); break;
-		case addr_accesslighton: accesslighton(); break;
-		case addr_accesslightoff: accesslightoff(); break;
 		case addr_locklighton: locklighton(); break;
 		case addr_locklightoff: locklightoff(); break;
 		case addr_makecaps: makecaps(); break;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index c74a556..fd3fc3f 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -360,8 +360,6 @@ public:
 	static const uint16 addr_makecaps = 0xc524;
 	static const uint16 addr_locklightoff = 0xc51c;
 	static const uint16 addr_locklighton = 0xc518;
-	static const uint16 addr_accesslightoff = 0xc514;
-	static const uint16 addr_accesslighton = 0xc510;
 	static const uint16 addr_powerlightoff = 0xc50c;
 	static const uint16 addr_powerlighton = 0xc508;
 	static const uint16 addr_randomaccess = 0xc504;
@@ -1497,7 +1495,7 @@ public:
 	//void checkcoords();
 	//void usetext();
 	void chewy();
-	void accesslighton();
+	//void accesslighton();
 	void useplinth();
 	//void adjustlen();
 	//void quickquit();
@@ -1938,7 +1936,7 @@ public:
 	void openob();
 	void createfile();
 	void userailing();
-	void accesslightoff();
+	//void accesslightoff();
 	void usehole();
 	void useobject();
 	void readdesticon();
diff --git a/engines/dreamweb/monitor.cpp b/engines/dreamweb/monitor.cpp
index 11e19b4..d13b723 100644
--- a/engines/dreamweb/monitor.cpp
+++ b/engines/dreamweb/monitor.cpp
@@ -205,5 +205,15 @@ void DreamGenContext::showcurrentfile() {
 	}
 }
 
+void DreamGenContext::accesslighton() {
+	showframe((Frame *)segRef(data.word(kTempgraphics)).ptr(0, 0), 74, 182, 8, 0);
+	multidump(74, 182, 12, 8);
+}
+
+void DreamGenContext::accesslightoff() {
+	showframe((Frame *)segRef(data.word(kTempgraphics)).ptr(0, 0), 74, 182, 7, 0);
+	multidump(74, 182, 12, 8);
+}
+
 } /*namespace dreamgen */
 
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 2741c6b..edd4e21 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -304,4 +304,6 @@
 	void input();
 	void monprint();
 	const char *monprint(const char *string);
+	void accesslighton();
+	void accesslightoff();
 


Commit: 3d16344e99b3a886e25735d60ebe89895d3e7316
    https://github.com/scummvm/scummvm/commit/3d16344e99b3a886e25735d60ebe89895d3e7316
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-11-20T05:18:27-08:00

Commit Message:
DREAMWEB: Accessors for kTempGraphics

Changed paths:
    engines/dreamweb/monitor.cpp
    engines/dreamweb/stubs.cpp
    engines/dreamweb/stubs.h



diff --git a/engines/dreamweb/monitor.cpp b/engines/dreamweb/monitor.cpp
index d13b723..cc6ae07 100644
--- a/engines/dreamweb/monitor.cpp
+++ b/engines/dreamweb/monitor.cpp
@@ -103,7 +103,7 @@ void DreamGenContext::usemon() {
 }
 
 void DreamGenContext::printlogo() {
-	showframe((Frame *)segRef(data.word(kTempgraphics)).ptr(0, 0), 56, 32, 0, 0);
+	showframe(tempGraphics(), 56, 32, 0, 0);
 	showcurrentfile();
 }
 
@@ -206,12 +206,12 @@ void DreamGenContext::showcurrentfile() {
 }
 
 void DreamGenContext::accesslighton() {
-	showframe((Frame *)segRef(data.word(kTempgraphics)).ptr(0, 0), 74, 182, 8, 0);
+	showframe(tempGraphics(), 74, 182, 8, 0);
 	multidump(74, 182, 12, 8);
 }
 
 void DreamGenContext::accesslightoff() {
-	showframe((Frame *)segRef(data.word(kTempgraphics)).ptr(0, 0), 74, 182, 7, 0);
+	showframe(tempGraphics(), 74, 182, 7, 0);
 	multidump(74, 182, 12, 8);
 }
 
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 7e2e185..850b746 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -1973,9 +1973,8 @@ void DreamGenContext::sortoutmap() {
 
 void DreamGenContext::showcity() {
 	clearwork();
-	Frame *tempGraphics = (Frame *)segRef(data.word(kTempgraphics)).ptr(0, 0);
-	showframe(tempGraphics, 57, 32, 0, 0);
-	showframe(tempGraphics, 120+57, 32, 1, 0);
+	showframe(tempGraphics(), 57, 32, 0, 0);
+	showframe(tempGraphics(), 120+57, 32, 1, 0);
 }
 
 void DreamGenContext::mainscreen() {
@@ -2129,5 +2128,17 @@ void DreamGenContext::readsetdata() {
 	engine->closeFile();
 }
 
+Frame * DreamGenContext::tempGraphics() {
+	return (Frame *)segRef(data.word(kTempgraphics)).ptr(0, 0);
+}
+
+Frame * DreamGenContext::tempGraphics2() {
+	return (Frame *)segRef(data.word(kTempgraphics2)).ptr(0, 0);
+}
+
+Frame * DreamGenContext::tempGraphics3() {
+	return (Frame *)segRef(data.word(kTempgraphics3)).ptr(0, 0);
+}
+
 } /*namespace dreamgen */
 
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index edd4e21..2a84492 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -304,6 +304,9 @@
 	void input();
 	void monprint();
 	const char *monprint(const char *string);
+	Frame *tempGraphics();
+	Frame *tempGraphics2();
+	Frame *tempGraphics3();
 	void accesslighton();
 	void accesslightoff();
 


Commit: 7190f1374e1a905af91a7cda10f8ef1771263698
    https://github.com/scummvm/scummvm/commit/7190f1374e1a905af91a7cda10f8ef1771263698
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-11-20T05:18:27-08:00

Commit Message:
DREAMWEB: Accessor for kTempcharset

Changed paths:
    engines/dreamweb/monitor.cpp
    engines/dreamweb/print.cpp
    engines/dreamweb/stubs.cpp
    engines/dreamweb/stubs.h



diff --git a/engines/dreamweb/monitor.cpp b/engines/dreamweb/monitor.cpp
index cc6ae07..f8ad127 100644
--- a/engines/dreamweb/monitor.cpp
+++ b/engines/dreamweb/monitor.cpp
@@ -111,7 +111,7 @@ void DreamGenContext::input() {
 	char *inputLine = (char *)cs.ptr(kInputline, 64);
 	memset(inputLine, 0, 64);
 	data.word(kCurpos) = 0;
-	printchar((Frame *)segRef(data.word(kTempcharset)).ptr(0, 0), data.word(kMonadx), data.word(kMonady), '>', 0, NULL, NULL);
+	printchar(tempCharset(), data.word(kMonadx), data.word(kMonady), '>', 0, NULL, NULL);
 	multidump(data.word(kMonadx), data.word(kMonady), 6, 8);
 	data.word(kMonadx) += 6;
 	data.word(kCurslocx) = data.word(kMonadx);
@@ -145,7 +145,7 @@ void DreamGenContext::input() {
 			continue;
 		multiget(segRef(data.word(kMapstore)).ptr(data.word(kCurpos) * 256, 0), data.word(kMonadx), data.word(kMonady), 8, 8);
 		uint8 charWidth;
-		printchar((Frame *)segRef(data.word(kTempcharset)).ptr(0, 0), data.word(kMonadx), data.word(kMonady), currentKey, 0, &charWidth, NULL);
+		printchar(tempCharset(), data.word(kMonadx), data.word(kMonady), currentKey, 0, &charWidth, NULL);
 		inputLine[data.word(kCurpos) * 2 + 1] = charWidth;
 		data.word(kMonadx) += charWidth;
 		++data.word(kCurpos);
@@ -165,7 +165,7 @@ void DreamGenContext::printcurs() {
 	multiget(textUnder(), x, y, 6, height);
 	++data.word(kMaintimer);
 	if ((data.word(kMaintimer) & 16) == 0)
-		showframe((Frame *)segRef(data.word(kTempcharset)).ptr(0, 0), x, y, '/' - 32, 0);
+		showframe(tempCharset(), x, y, '/' - 32, 0);
 	multidump(x - 6, y, 12, height);
 }
 
@@ -201,7 +201,7 @@ void DreamGenContext::showcurrentfile() {
 	while (*currentFile) {
 		char c = *currentFile++;
 		c = engine->modifyChar(c);
-		printchar((const Frame *)segRef(data.word(kTempcharset)).ptr(0, 0), &x, 37, c, 0, NULL, NULL);
+		printchar(tempCharset(), &x, 37, c, 0, NULL, NULL);
 	}
 }
 
diff --git a/engines/dreamweb/print.cpp b/engines/dreamweb/print.cpp
index 3e305dc..3a71c47 100644
--- a/engines/dreamweb/print.cpp
+++ b/engines/dreamweb/print.cpp
@@ -244,12 +244,12 @@ void DreamGenContext::monprint() {
 const char *DreamGenContext::monprint(const char *string) {
 	data.byte(kKerning) = 1;
 	uint16 x = data.word(kMonadx);
-	Frame *tempCharset = (Frame *)segRef(data.word(kTempcharset)).ptr(0, 0);
+	Frame *charset = tempCharset();
 	const char *iterator = string;
 	bool done = false;
 	while (!done) {
 
-		uint16 count = getnumber(tempCharset, (const uint8 *)iterator, 166, false, &x);
+		uint16 count = getnumber(charset, (const uint8 *)iterator, 166, false, &x);
 		do {	
 			char c = *iterator++;
 			if (c == ':')
@@ -265,7 +265,7 @@ const char *DreamGenContext::monprint(const char *string) {
 				break;
 			}
 			c = engine->modifyChar(c);
-			printchar(tempCharset, &x, data.word(kMonady), c, 0, NULL, NULL);
+			printchar(charset, &x, data.word(kMonady), c, 0, NULL, NULL);
 			data.word(kCurslocx) = x;
 			data.word(kCurslocy) = data.word(kMonady);
 			data.word(kMaintimer) = 1;
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 850b746..287f4ee 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -258,6 +258,10 @@ void DreamGenContext::loadtempcharset(const char *fileName) {
 	data.word(kTempcharset) = standardload(fileName);
 }
 
+Frame *DreamGenContext::tempCharset() {
+	return (Frame *)segRef(data.word(kTempcharset)).ptr(0, 0);
+}
+
 void DreamGenContext::hangoncurs(uint16 frameCount) {
 	for (uint16 i = 0; i < frameCount; ++i) {
 		printcurs();
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 2a84492..893fa68 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -35,6 +35,7 @@
 	void loadintotemp3(const char *fileName);
 	void loadtempcharset();
 	void loadtempcharset(const char *fileName);
+	Frame *tempCharset();
 	void printcurs();
 	void delcurs();
 	void hangoncurs(uint16 frameCount);






More information about the Scummvm-git-logs mailing list