diff options
| -rwxr-xr-x | devtools/tasmrecover/tasm-recover | 1 | ||||
| -rw-r--r-- | engines/dreamweb/dreamgen.cpp | 22 | ||||
| -rw-r--r-- | engines/dreamweb/dreamgen.h | 2 | ||||
| -rw-r--r-- | engines/dreamweb/sprite.cpp | 17 | ||||
| -rw-r--r-- | engines/dreamweb/stubs.h | 1 | 
5 files changed, 17 insertions, 26 deletions
| diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover index 124ec8fa5b..bdb58a572b 100755 --- a/devtools/tasmrecover/tasm-recover +++ b/devtools/tasmrecover/tasm-recover @@ -338,6 +338,7 @@ generator = cpp(context, "DreamGen", blacklist = [  	'sparkydrip',  	'othersmoker',  	'barwoman', +	'gamer',  	], skip_output = [  	# These functions are processed but not output  	'dreamweb', diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index 8143c8f4b2..260e6d5edd 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -908,28 +908,6 @@ notboss:  	data.byte(kTalkedtoboss) = 1;  } -void DreamGenContext::gamer() { -	STACK_CHECK; -	checkspeed(); -	if (!flags.z()) -		goto gamerfin; -gameragain: -	randomnum1(); -	_and(al, 7); -	_cmp(al, 5); -	if (!flags.c()) -		goto gameragain; -	_add(al, 20); -	_cmp(al, es.byte(bx+3)); -	if (flags.z()) -		goto gameragain; -	ah = 0; -	es.word(bx+3) = ax; -gamerfin: -	showgamereel(); -	addtopeoplelist(); -} -  void DreamGenContext::carparkdrip() {  	STACK_CHECK;  	checkspeed(); diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index 0e472e284c..a5fba4de30 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -457,7 +457,6 @@ public:  	static const uint16 addr_candles1 = 0xc08c;  	static const uint16 addr_keeper = 0xc088;  	static const uint16 addr_carparkdrip = 0xc084; -	static const uint16 addr_gamer = 0xc07c;  	static const uint16 addr_bossman = 0xc078;  	static const uint16 addr_heavy = 0xc074;  	static const uint16 addr_security = 0xc070; @@ -1363,7 +1362,6 @@ public:  	void afterintroroom();  	void buttonnine();  	void findallopen(); -	void gamer();  	void readfromfile();  	void initialinv();  	void quitsymbol(); diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp index 584fa18dc2..f8c865da6c 100644 --- a/engines/dreamweb/sprite.cpp +++ b/engines/dreamweb/sprite.cpp @@ -568,7 +568,7 @@ void DreamGenContext::showrain() {  }  static void (DreamGenContext::*reelCallbacks[57])() = { -	&DreamGenContext::gamer, NULL, +	NULL, NULL,  	&DreamGenContext::eden, &DreamGenContext::edeninbath,  	&DreamGenContext::sparky, &DreamGenContext::smokebloke,  	&DreamGenContext::manasleep, &DreamGenContext::drunk, @@ -600,7 +600,7 @@ static void (DreamGenContext::*reelCallbacks[57])() = {  };  static void (DreamGenContext::*reelCallbacksCPP[57])(ReelRoutine &) = { -	/*&DreamGenContext::gamer*/NULL, &DreamGenContext::sparkydrip, +	&DreamGenContext::gamer, &DreamGenContext::sparkydrip,  	/*&DreamGenContext::eden*/NULL, /*&DreamGenContext::edeninbath*/NULL,  	/*&DreamGenContext::sparky*/NULL, /*&DreamGenContext::smokebloke*/NULL,  	/*&DreamGenContext::manasleep*/NULL, /*&DreamGenContext::drunk*/NULL, @@ -1087,5 +1087,18 @@ void DreamGenContext::othersmoker(ReelRoutine &routine) {  	addtopeoplelist(&routine);  } +void DreamGenContext::gamer(ReelRoutine &routine) { +	if (checkspeed(&routine)) { +		uint8 v; +		do { +			v = 20 + engine->randomNumber() % 5; +		} while (v == routine.reelPointer()); +		routine.setReelPointer(v); +	} + +	showgamereel(&routine); +	addtopeoplelist(&routine); +} +  } /*namespace dreamgen */ diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index 1512c30000..b1f2b8a693 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -379,4 +379,5 @@  	void checkspeed();  	void sparkydrip(ReelRoutine &routine);  	void othersmoker(ReelRoutine &routine); +	void gamer(ReelRoutine &routine); | 
