[Scummvm-cvs-logs] scummvm master -> 4619419402094608a7d56ab454610e4680f29887

tramboi bertrand_augereau at yahoo.fr
Sat Dec 3 17:07:57 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:
f6f47d13cc DREAMWEB: CR at last line
4619419402 DREAMWEB: 'rockstar' ported to C++


Commit: f6f47d13cc7552bc1cca080b9ac5d97f2caa06fd
    https://github.com/scummvm/scummvm/commit/f6f47d13cc7552bc1cca080b9ac5d97f2caa06fd
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-12-03T09:06:24-08:00

Commit Message:
DREAMWEB: CR at last line

Changed paths:
    engines/dreamweb/structs.h



diff --git a/engines/dreamweb/structs.h b/engines/dreamweb/structs.h
index 39bfeb7..b542cfa 100644
--- a/engines/dreamweb/structs.h
+++ b/engines/dreamweb/structs.h
@@ -276,3 +276,4 @@ struct FileHeader {
 		WRITE_LE_UINT16(&_len[i], length);
 	}
 };
+


Commit: 4619419402094608a7d56ab454610e4680f29887
    https://github.com/scummvm/scummvm/commit/4619419402094608a7d56ab454610e4680f29887
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-12-03T09:06:24-08:00

Commit Message:
DREAMWEB: 'rockstar' 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 9a533c8..ebe51d6 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -126,6 +126,7 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'updatepeople',
 	'malefan',
 	'femalefan',
+	'rockstar',
 	'madmantext',
 	'madmode',
 	'movemap',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 6ade575..b89c1dc 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -360,65 +360,6 @@ gotsoldframe:
 	addToPeopleList();
 }
 
-void DreamGenContext::rockstar() {
-	STACK_CHECK;
-	ax = es.word(bx+3);
-	_cmp(ax, 303);
-	if (flags.z())
-		goto rockcombatend;
-	_cmp(ax, 118);
-	if (flags.z())
-		goto rockcombatend;
-	checkSpeed();
-	if (!flags.z())
-		goto rockspeed;
-	ax = es.word(bx+3);
-	_inc(ax);
-	_cmp(ax, 118);
-	if (!flags.z())
-		goto notbeforedead;
-	data.byte(kMandead) = 2;
-	goto gotrockframe;
-notbeforedead:
-	_cmp(ax, 79);
-	if (!flags.z())
-		goto gotrockframe;
-	_dec(ax);
-	_cmp(data.byte(kLastweapon), 1);
-	if (!flags.z())
-		goto notgunonrock;
-	data.byte(kLastweapon) = -1;
-	ax = 123;
-	goto gotrockframe;
-notgunonrock:
-	_inc(data.byte(kCombatcount));
-	_cmp(data.byte(kCombatcount), 40);
-	if (!flags.z())
-		goto gotrockframe;
-	data.byte(kCombatcount) = 0;
-	ax = 79;
-gotrockframe:
-	es.word(bx+3) = ax;
-rockspeed:
-	showGameReel();
-	_cmp(es.word(bx+3), 78);
-	if (!flags.z())
-		goto notalkrock;
-	addToPeopleList();
-	data.byte(kPointermode) = 2;
-	data.word(kWatchingtime) = 0;
-	return;
-notalkrock:
-	data.word(kWatchingtime) = 2;
-	data.byte(kPointermode) = 0;
-	al = data.byte(kMapy);
-	es.byte(bx+2) = al;
-	return;
-rockcombatend:
-	data.byte(kNewlocation) = 45;
-	showGameReel();
-}
-
 void DreamGenContext::helicopter() {
 	STACK_CHECK;
 	ax = es.word(bx+3);
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index b0cb21f..8f30dd4 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -794,7 +794,6 @@ public:
 	void drinker();
 	void placeFreeObject();
 	void allPalette();
-	void rockstar();
 	void adjustRight();
 	void putUnderZoom();
 	void vSync();
diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp
index b2ac6f5..67ce7dc 100644
--- a/engines/dreamweb/sprite.cpp
+++ b/engines/dreamweb/sprite.cpp
@@ -581,7 +581,7 @@ static void (DreamGenContext::*reelCallbacks[57])() = {
 	&DreamGenContext::keeper, &DreamGenContext::candles1,
 	&DreamGenContext::smallCandle, &DreamGenContext::security,
 	&DreamGenContext::copper, &DreamGenContext::poolGuard,
-	&DreamGenContext::rockstar, &DreamGenContext::businessMan,
+	NULL, &DreamGenContext::businessMan,
 	&DreamGenContext::train, &DreamGenContext::aide,
 	&DreamGenContext::mugger, &DreamGenContext::helicopter,
 	&DreamGenContext::introMagic1, &DreamGenContext::introMusic,
@@ -613,7 +613,7 @@ static void (DreamGenContext::*reelCallbacksCPP[57])(ReelRoutine &) = {
 	/*&DreamGenContext::keeper*/NULL, /*&DreamGenContext::candles1*/NULL,
 	/*&DreamGenContext::smallcandle*/NULL, /*&DreamGenContext::security*/NULL,
 	/*&DreamGenContext::copper*/NULL, /*&DreamGenContext::poolGuard*/NULL,
-	/*&DreamGenContext::rockstar*/NULL, /*&DreamGenContext::businessMan*/NULL,
+	&DreamGenContext::rockstar, /*&DreamGenContext::businessMan*/NULL,
 	/*&DreamGenContext::train*/NULL, /*&DreamGenContext::aide*/NULL,
 	/*&DreamGenContext::mugger*/NULL, /*&DreamGenContext::helicopter*/NULL,
 	/*&DreamGenContext::introMagic1*/NULL, /*&DreamGenContext::introMusic*/NULL,
@@ -1137,5 +1137,42 @@ void DreamGenContext::sparky(ReelRoutine &routine) {
 		data.byte(kTalkedtosparky) = 1;
 }
 
+void DreamGenContext::rockstar(ReelRoutine &routine) {
+	if ((routine.reelPointer() == 303) || (routine.reelPointer() == 118)) {
+		data.byte(kNewlocation) = 45;
+		showGameReel(&routine);
+		return;
+	}
+	if (checkSpeed(&routine)) {
+		uint16 nextReelPointer = routine.reelPointer() + 1;
+		if (nextReelPointer == 118) {
+			data.byte(kMandead) = 2;
+		} else if (nextReelPointer == 79) {
+			--nextReelPointer;
+			if (data.byte(kLastweapon) != 1) {
+				++data.byte(kCombatcount);
+				if (data.byte(kCombatcount) == 40) {
+					data.byte(kCombatcount) = 0;
+					nextReelPointer = 79;
+				}
+			} else {
+				data.byte(kLastweapon) = -1;
+				nextReelPointer = 123;
+			}
+		}
+		routine.setReelPointer(nextReelPointer);
+	}
+	showGameReel(&routine);
+	if (routine.reelPointer() == 78) {
+		addToPeopleList(&routine);
+		data.byte(kPointermode) = 2;
+		data.word(kWatchingtime) = 0;
+	} else {
+		data.word(kWatchingtime) = 2;
+		data.byte(kPointermode) = 0;
+		routine.mapY = data.byte(kMapy);
+	}
+}
+
 } /*namespace dreamgen */
 
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index de9335f..9adad3d 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -386,6 +386,7 @@
 	void sparky(ReelRoutine &routine);
 	void femaleFan(ReelRoutine &routine);
 	void maleFan(ReelRoutine &routine);
+	void rockstar(ReelRoutine &routine);
 	void singleKey(uint8 key, uint16 x, uint16 y);
 	void showKeypad();
 	void showOuterPad();






More information about the Scummvm-git-logs mailing list