diff options
| -rwxr-xr-x | devtools/tasmrecover/tasm-recover | 1 | ||||
| -rw-r--r-- | engines/dreamweb/dreamgen.cpp | 50 | ||||
| -rw-r--r-- | engines/dreamweb/dreamgen.h | 1 | ||||
| -rw-r--r-- | engines/dreamweb/stubs.h | 1 | ||||
| -rw-r--r-- | engines/dreamweb/use.cpp | 33 | 
5 files changed, 35 insertions, 51 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover index 95925a8260..6efa0c03f5 100755 --- a/devtools/tasmrecover/tasm-recover +++ b/devtools/tasmrecover/tasm-recover @@ -808,6 +808,7 @@ generator = cpp(context, "DreamGen", blacklist = [  	'userailing',  	'useroutine',  	'useshield', +	'useslab',  	'usetempcharset',  	'usetext',  	'usetimedtext', diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index 3cc0c4e862..a2d8c2c70f 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -3637,56 +3637,6 @@ alreadyfull:  	putBackObStuff();  } -void DreamGenContext::useSLab() { -	STACK_CHECK; -	_cmp(data.byte(kWithobject), 255); -	if (!flags.z()) -		goto slabwith; -	withWhat(); -	return; -slabwith: -	al = data.byte(kWithobject); -	ah = data.byte(kWithtype); -	cl = 'J'; -	ch = 'E'; -	dl = 'W'; -	dh = 'L'; -	compare(); -	if (flags.z()) -		goto nextslab; -	cx = 300; -	al = 14; -	showPuzText(); -	putBackObStuff(); -	return; -nextslab: -	al = data.byte(kWithobject); -	getExAd(); -	es.byte(bx+2) = 0; -	al = data.byte(kCommand); -	push(ax); -	removeSetObject(); -	ax = pop(); -	_inc(al); -	push(ax); -	placeSetObject(); -	ax = pop(); -	_cmp(al, 54); -	if (!flags.z()) -		goto notlastslab; -	al = 0; -	turnPathOn(); -	data.word(kWatchingtime) = 22; -	data.word(kReeltowatch) = 35; -	data.word(kEndwatchreel) = 48; -	data.byte(kWatchspeed) = 1; -	data.byte(kSpeedcount) = 1; -notlastslab: -	_inc(data.byte(kProgresspoints)); -	showFirstUse(); -	data.byte(kGetback) = 1; -} -  void DreamGenContext::useOpenBox() {  	STACK_CHECK;  	_cmp(data.byte(kWithobject), 255); diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index b87d9c64de..6e8400b58e 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -508,7 +508,6 @@ public:  	void dirCom();  	void endGameSeq();  	void findFirstPath(); -	void useSLab();  	void useAltar();  	void startTalk();  	void getAnyAd(); diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index a6e29f2192..ff7c1106a6 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -331,6 +331,7 @@  	void useWindow();  	void useHatch();  	void useLighter(); +	void useSLab();  	void wheelSound();  	void callHotelLift();  	void useShield(); diff --git a/engines/dreamweb/use.cpp b/engines/dreamweb/use.cpp index eb3281150d..f6d6b2f494 100644 --- a/engines/dreamweb/use.cpp +++ b/engines/dreamweb/use.cpp @@ -1281,4 +1281,37 @@ void DreamGenContext::useControl() {  	}  } +void DreamGenContext::useSLab() { +	if (data.byte(kWithobject) == 255) { +		withWhat(); +		return; +	} + +	char id[4] = { 'J', 'E', 'W', 'L' };	// TODO: convert to string with trailing zero +	if (!compare(data.byte(kWithobject), data.byte(kWithtype), id)) { +		showPuzText(14, 300); +		putBackObStuff(); +		return; +	} + +	DynObject *exObject = getExAd(data.byte(kWithobject)); +	exObject->mapad[0] = 0; + +	removeSetObject(data.byte(kCommand)); +	placeSetObject(data.byte(kCommand) + 1); +	if (data.byte(kCommand) + 1 == 54) { +		// Last slab +		turnPathOn(0); +		data.word(kWatchingtime) = 22; +		data.word(kReeltowatch) = 35; +		data.word(kEndwatchreel) = 48; +		data.byte(kWatchspeed) = 1; +		data.byte(kSpeedcount) = 1; +	} + +	data.byte(kProgresspoints)++; +	showFirstUse(); +	data.byte(kGetback) = 1; +} +  } // End of namespace DreamGen  | 
