[Scummvm-cvs-logs] scummvm master -> 14ac4efa09f1b6b59f60769770a519397c6da3de

tramboi bertrand_augereau at yahoo.fr
Mon Aug 29 15:23:10 CEST 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:
3623ae35ef DREAMWEB: 'addtopeoplelist' ported to C++
3d85a4974b DREAMWEB: 'showgamereel' gets a ReelRoutine* as parameter
14ac4efa09 DREAMWEB: 'addpeoplelist' takes a ReelRoutine* param


Commit: 3623ae35efd6269c862ab894ef03fbeb7704d765
    https://github.com/scummvm/scummvm/commit/3623ae35efd6269c862ab894ef03fbeb7704d765
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-08-29T06:19:21-07:00

Commit Message:
DREAMWEB: 'addtopeoplelist' ported to C++

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



diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index f2134be..641b784 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -163,6 +163,7 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'readmouse4',
 	'waitframes',
 	'drawflags',
+	'addtopeoplelist',
 	], skip_output = [
 	# These functions are processed but not output
 	'dreamweb',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index f716d89..b7e5ba5 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -2032,24 +2032,6 @@ gottrainframe:
 	showgamereel();
 }
 
-void DreamGenContext::addtopeoplelist() {
-	STACK_CHECK;
-	push(es);
-	push(bx);
-	push(bx);
-	cl = es.byte(bx+7);
-	ax = es.word(bx+3);
-	bx = data.word(kListpos);
-	es = data.word(kBuffers);
-	es.word(bx) = ax;
-	ax = pop();
-	es.word(bx+2) = ax;
-	es.byte(bx+4) = cl;
-	bx = pop();
-	es = pop();
-	_add(data.word(kListpos), 5);
-}
-
 void DreamGenContext::checkspeed() {
 	STACK_CHECK;
 	_cmp(data.byte(kLastweapon), -1);
@@ -17948,7 +17930,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) {
 		case addr_copper: copper(); break;
 		case addr_sparky: sparky(); break;
 		case addr_train: train(); break;
-		case addr_addtopeoplelist: addtopeoplelist(); break;
 		case addr_checkspeed: checkspeed(); break;
 		case addr_delsprite: delsprite(); break;
 		case addr_mainman: mainman(); break;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 3ad99d1..18b982f 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -596,7 +596,6 @@ public:
 	static const uint16 addr_mainman = 0xc138;
 	static const uint16 addr_delsprite = 0xc11c;
 	static const uint16 addr_checkspeed = 0xc110;
-	static const uint16 addr_addtopeoplelist = 0xc108;
 	static const uint16 addr_train = 0xc104;
 	static const uint16 addr_sparky = 0xc100;
 	static const uint16 addr_copper = 0xc0fc;
@@ -1413,7 +1412,7 @@ public:
 	void showdiary();
 	void purgealocation();
 	//void updatepeople();
-	void addtopeoplelist();
+	//void addtopeoplelist();
 	void hangoncurs();
 	void sparkydrip();
 	void compare();
diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp
index 17d4ddb..95d8321 100644
--- a/engines/dreamweb/sprite.cpp
+++ b/engines/dreamweb/sprite.cpp
@@ -889,5 +889,13 @@ void DreamGenContext::checkone(uint8 x, uint8 y, uint8 *flag, uint8 *flagEx, uin
 	*type = tileData[2];
 }
 
+void DreamGenContext::addtopeoplelist() {
+	People *people = (People *)segRef(data.word(kBuffers)).ptr(data.word(kListpos), sizeof(People));
+	people->setW0(es.word(bx+3));
+	people->setW2(bx);
+	people->b4 = es.byte(bx+7);
+	data.word(kListpos) += sizeof(People);
+}
+
 } /*namespace dreamgen */
 
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index bb5568e..746855b 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -193,4 +193,5 @@
 	void readmouse4();
 	uint16 waitframes();
 	void drawflags();
+	void addtopeoplelist();
 


Commit: 3d85a4974bfd93a69fa51f54b12c0728509450fa
    https://github.com/scummvm/scummvm/commit/3d85a4974bfd93a69fa51f54b12c0728509450fa
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-08-29T06:19:22-07:00

Commit Message:
DREAMWEB: 'showgamereel' gets a ReelRoutine* as parameter

Changed paths:
    engines/dreamweb/sprite.cpp
    engines/dreamweb/structs.h
    engines/dreamweb/stubs.cpp
    engines/dreamweb/stubs.h



diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp
index 95d8321..f555daa 100644
--- a/engines/dreamweb/sprite.cpp
+++ b/engines/dreamweb/sprite.cpp
@@ -549,16 +549,16 @@ void DreamGenContext::showreelframe(Reel *reel) {
 }
 
 void DreamGenContext::showgamereel() {
-	uint16 reelpointer = es.word(bx+3);
+	showgamereel((ReelRoutine *)es.ptr(bx, sizeof(ReelRoutine)));
+}
+
+void DreamGenContext::showgamereel(ReelRoutine *routine) {
+	uint16 reelpointer = routine->reelPointer();
 	if (reelpointer >= 512)
 		return;
 	data.word(kReelpointer) = reelpointer;
-	push(es);
-	push(bx);
 	plotreel();
-	bx = pop();
-	es = pop();
-	es.word(bx+3) = data.word(kReelpointer);
+	routine->setReelPointer(data.word(kReelpointer));
 }
 
 const Frame *DreamGenContext::getreelframeax(uint16 frame) {
diff --git a/engines/dreamweb/structs.h b/engines/dreamweb/structs.h
index 1cb52ec..804684a 100644
--- a/engines/dreamweb/structs.h
+++ b/engines/dreamweb/structs.h
@@ -168,6 +168,8 @@ struct ReelRoutine {
 	uint8 mapY;
 	uint8 b3;
 	uint8 b4;
+	uint16 reelPointer() const { return READ_LE_UINT16(&b3); }
+	void setReelPointer(uint16 v) { WRITE_LE_UINT16(&b3, v); }
 	uint8 b5;
 	uint8 b6;
 	uint8 b7;
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 92a2a3d..d56394e 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -935,7 +935,11 @@ void DreamGenContext::plotreel() {
 			showreelframe(reel);
 		++reel;
 	}
+	push(es);
+	push(bx);
 	soundonreels();
+	bx = pop();
+	es = pop();
 }
 
 void DreamGenContext::crosshair() {
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 746855b..2d5d45a 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -99,6 +99,7 @@
 	void findsource();
 	Frame *findsourceCPP();
 	void showgamereel();
+	void showgamereel(ReelRoutine *routine);
 	void showreelframe();
 	void showreelframe(Reel *reel);
 	const Frame *getreelframeax(uint16 frame);


Commit: 14ac4efa09f1b6b59f60769770a519397c6da3de
    https://github.com/scummvm/scummvm/commit/14ac4efa09f1b6b59f60769770a519397c6da3de
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-08-29T06:19:22-07:00

Commit Message:
DREAMWEB: 'addpeoplelist' takes a ReelRoutine* param

Changed paths:
    engines/dreamweb/sprite.cpp
    engines/dreamweb/structs.h
    engines/dreamweb/stubs.cpp
    engines/dreamweb/stubs.h



diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp
index f555daa..c2ec277 100644
--- a/engines/dreamweb/sprite.cpp
+++ b/engines/dreamweb/sprite.cpp
@@ -890,10 +890,16 @@ void DreamGenContext::checkone(uint8 x, uint8 y, uint8 *flag, uint8 *flagEx, uin
 }
 
 void DreamGenContext::addtopeoplelist() {
+	addtopeoplelist((ReelRoutine *)es.ptr(bx, sizeof(ReelRoutine)));
+}
+
+void DreamGenContext::addtopeoplelist(ReelRoutine *routine) {
+	uint16 routinePointer = (const uint8 *)routine - cs.ptr(0, 0);
+
 	People *people = (People *)segRef(data.word(kBuffers)).ptr(data.word(kListpos), sizeof(People));
-	people->setW0(es.word(bx+3));
-	people->setW2(bx);
-	people->b4 = es.byte(bx+7);
+	people->setReelPointer(routine->reelPointer());
+	people->setRoutinePointer(routinePointer);
+	people->b4 = routine->b7;
 	data.word(kListpos) += sizeof(People);
 }
 
diff --git a/engines/dreamweb/structs.h b/engines/dreamweb/structs.h
index 804684a..6d3deac 100644
--- a/engines/dreamweb/structs.h
+++ b/engines/dreamweb/structs.h
@@ -178,12 +178,12 @@ struct ReelRoutine {
 struct People {
 	uint8 b0;
 	uint8 b1;
-	uint16 w0() const { return READ_LE_UINT16(&b0); }
-	void setW0(uint16 v) { WRITE_LE_UINT16(&b0, v); }
+	uint16 reelPointer() const { return READ_LE_UINT16(&b0); }
+	void setReelPointer(uint16 v) { WRITE_LE_UINT16(&b0, v); }
 	uint8 b2;
 	uint8 b3;
-	uint16 w2() const { return READ_LE_UINT16(&b2); }
-	void setW2(uint16 v) { WRITE_LE_UINT16(&b2, v); }
+	uint16 routinePointer() const { return READ_LE_UINT16(&b2); }
+	void setRoutinePointer(uint16 v) { WRITE_LE_UINT16(&b2, v); }
 	uint8 b4;
 
 };
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index d56394e..33f7a41 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -985,7 +985,7 @@ bool DreamGenContext::checkifperson(uint8 x, uint8 y) {
 	for (size_t i = 0; i < 12; ++i, ++people) {
 		if (people->b4 == 255)
 			continue;
-		data.word(kReelpointer) = people->w0();
+		data.word(kReelpointer) = people->reelPointer();
 		Reel *reel = getreelstart();
 		if (reel->frame() == 0xffff)
 			++reel;
@@ -1002,7 +1002,7 @@ bool DreamGenContext::checkifperson(uint8 x, uint8 y) {
 			continue;
 		if (y >= ymax)
 			continue;
-		data.word(kPersondata) = people->w2();
+		data.word(kPersondata) = people->routinePointer();
 		obname(people->b4, 5);
 		return true;
 	}
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 2d5d45a..70236aa 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -195,4 +195,5 @@
 	uint16 waitframes();
 	void drawflags();
 	void addtopeoplelist();
+	void addtopeoplelist(ReelRoutine *routine);
 






More information about the Scummvm-git-logs mailing list