diff options
| -rwxr-xr-x | devtools/tasmrecover/tasm-recover | 2 | ||||
| -rw-r--r-- | engines/dreamweb/dreamgen.cpp | 80 | ||||
| -rw-r--r-- | engines/dreamweb/dreamgen.h | 2 | ||||
| -rw-r--r-- | engines/dreamweb/stubs.cpp | 28 | ||||
| -rw-r--r-- | engines/dreamweb/stubs.h | 1 | 
5 files changed, 30 insertions, 83 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover index 4cf0b42a95..824cb92e21 100755 --- a/devtools/tasmrecover/tasm-recover +++ b/devtools/tasmrecover/tasm-recover @@ -209,6 +209,7 @@ generator = cpp(context, "DreamGen", blacklist = [  	'actualload',  	'actualsave',  	'addalong', +	'additionaltext',  	'addlength',  	'addtopeoplelist',  	'addtopresslist', @@ -318,6 +319,7 @@ generator = cpp(context, "DreamGen", blacklist = [  	'delsprite',  	'deltextline',  	'delthisone', +	'describeob',  	'destselect',  	'diarykeyp',  	'diarykeyn', diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index a33f5a27fc..b882f9f1ea 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -1046,86 +1046,6 @@ void DreamGenContext::openOb() {  	cs.word(bx) = ax;  } -void DreamGenContext::describeOb() { -	STACK_CHECK; -	getObTextStart(); -	di = 33; -	bx = 92; -	_cmp(data.byte(kForeignrelease),  0); -	if (flags.z()) -		goto notsetd; -	_cmp(data.byte(kObjecttype), 1); -	if (!flags.z()) -		goto notsetd; -	bx = 82; -notsetd: -	dl = 241; -	ah = 16; -	data.word(kCharshift) = 91+91; -	printDirect(); -	data.word(kCharshift) = 0; -	di = 36; -	bx = 104; -	_cmp(data.byte(kForeignrelease),  0); -	if (flags.z()) -		goto notsetd2; -	_cmp(data.byte(kObjecttype), 1); -	if (!flags.z()) -		goto notsetd2; -	bx = 94; -notsetd2: -	dl = 241; -	ah = 0; -	printDirect(); -	push(bx); -	obsThatDoThings(); -	bx = pop(); -	additionalText(); -} - -void DreamGenContext::additionalText() { -	STACK_CHECK; -	_add(bx, 10); -	push(bx); -	al = data.byte(kCommand); -	ah = data.byte(kObjecttype); -	cl = 'C'; -	ch = 'U'; -	dl = 'P'; -	dh = 'E'; -	compare(); -	if (flags.z()) -		goto emptycup; -	al = data.byte(kCommand); -	ah = data.byte(kObjecttype); -	cl = 'C'; -	ch = 'U'; -	dl = 'P'; -	dh = 'F'; -	compare(); -	if (flags.z()) -		goto fullcup; -	bx = pop(); -	return; -emptycup: -	al = 40; -	findPuzText(); -	bx = pop(); -	di = 36; -	dl = 241; -	ah = 0; -	printDirect(); -	return; -fullcup: -	al = 39; -	findPuzText(); -	bx = pop(); -	di = 36; -	dl = 241; -	ah = 0; -	printDirect(); -} -  void DreamGenContext::getObTextStart() {  	STACK_CHECK;  	es = data.word(kFreedesc); diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index c1829ec4c2..d1a9471f4f 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -528,7 +528,6 @@ public:  	void showKeys();  	void printmessage2();  	void findOpenPos(); -	void describeOb();  	void deleteExFrame();  	void searchForSame();  	void rollEm(); @@ -553,7 +552,6 @@ public:  	void findPathOfPoint();  	void getDestInfo();  	void read(); -	void additionalText();  	void mugger();  	void searchForString();  	void selectOpenOb(); diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index 01169a81df..e721d482db 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -3396,6 +3396,33 @@ void DreamGenContext::obsThatDoThings() {  	}  } +void DreamGenContext::describeOb() { +	const uint8 *obText = getObTextStartCPP(); +	uint16 y = 92; +	if (data.byte(kForeignrelease) && data.byte(kObjecttype) == 1) +		y = 82; +	data.word(kCharshift) = 91 + 91; +	printDirect(obText, 33, y, 241, 241 & 1); +	data.word(kCharshift) = 0; +	if (data.byte(kForeignrelease) && data.byte(kObjecttype) == 1) +		y = 94; +	printDirect(obText, 36, y, 241, 241 & 1); +	obsThatDoThings(); + +	// Additional text +	if (compare(data.byte(kCommand), data.byte(kObjecttype), "CUPE")) { +		// Empty cup +		uint16 offset = kTextstart + getSegment(data.word(kPuzzletext)).word(40 * 2); +		const uint8 *string = getSegment(data.word(kPuzzletext)).ptr(offset, 0); +		printDirect(string, 36, y + 10, 241, 241 & 1); +	} else if (compare(data.byte(kCommand), data.byte(kObjecttype), "CUPF")) { +		// Full cup +		uint16 offset = kTextstart + getSegment(data.word(kPuzzletext)).word(39 * 2); +		const uint8 *string = getSegment(data.word(kPuzzletext)).ptr(offset, 0); +		printDirect(string, 36, y + 10, 241, 241 & 1); +	} +} +  void DreamGenContext::delEverything() {  	if (data.byte(kMapysize) + data.word(kMapoffsety) < 182) {  		mapToPanel(); @@ -4272,7 +4299,6 @@ void DreamGenContext::showPuzText() {  }  void DreamGenContext::showPuzText(uint16 command, uint16 count) { -	findPuzText(); // FIXME: Unnecessary? (Input: al, Output: es:si)  	createPanel();  	showPanel();  	showMan(); diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index 16d7e67d5c..3413c5eef0 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -588,5 +588,6 @@  	uint16 findSetObject(const char *id);  	void findExObject();  	uint16 findExObject(const char *id); +	void describeOb();  #endif  | 
