diff options
| -rwxr-xr-x | devtools/tasmrecover/tasm-recover | 1 | ||||
| -rw-r--r-- | engines/dreamweb/backdrop.cpp | 35 | ||||
| -rw-r--r-- | engines/dreamweb/dreamgen.cpp | 89 | ||||
| -rw-r--r-- | engines/dreamweb/dreamgen.h | 3 | ||||
| -rw-r--r-- | engines/dreamweb/stubs.h | 1 | 
5 files changed, 38 insertions, 91 deletions
| diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover index 641b784526..85a1b4b478 100755 --- a/devtools/tasmrecover/tasm-recover +++ b/devtools/tasmrecover/tasm-recover @@ -143,6 +143,7 @@ generator = cpp(context, "DreamGen", blacklist = [  	'placesetobject',  	'removesetobject',  	'showallfree', +	'showallex',  	'adjustlen',  	'finishedwalking',  	'checkone', diff --git a/engines/dreamweb/backdrop.cpp b/engines/dreamweb/backdrop.cpp index f667e7b73c..cfa4d571e8 100644 --- a/engines/dreamweb/backdrop.cpp +++ b/engines/dreamweb/backdrop.cpp @@ -297,5 +297,40 @@ void DreamGenContext::drawflags() {  	}  } +void DreamGenContext::showallex() { +	data.word(kListpos) = kExlist; +	memset(segRef(data.word(kBuffers)).ptr(kExlist, 100 * 5), 0xff, 100 * 5); + +	data.word(kFrsegment) = data.word(kExtras); +	data.word(kDataad) = kExframedata; +	data.word(kFramesad) = kExframes; +	data.byte(kCurrentex) = 0; +	si = kExdata + 2; +	for (size_t i = 0; i < 100; ++i, ++data.byte(kCurrentex), si +=16) { +		es = data.word(kExtras); +		if (es.byte(si) == 0xff) +			continue; +		if (es.byte(si-2) != data.byte(kReallocation)) +			continue; +		if (getmapad((const uint8 *)es.ptr(si, 5)) == 0) +			continue; +		data.word(kCurrentframe) = 3 * data.byte(kCurrentex); +		uint8 width, height; +		calcfrframe(&width, &height); +		uint16 x, y; +		finalframe(&x, &y); +		if ((width != 0) || (height != 0)) { +			showframe((Frame *)segRef(data.word(kFrsegment)).ptr(0, 0), x + data.word(kMapadx), y + data.word(kMapady), data.word(kCurrentframe) & 0xff, 0); +			ObjPos *objPos = (ObjPos *)segRef(data.word(kBuffers)).ptr(data.word(kListpos), sizeof(ObjPos)); +			objPos->xMin = data.byte(kSavex); +			objPos->yMin = data.byte(kSavey); +			objPos->xMax = data.byte(kSavesize + 0) + data.byte(kSavex); +			objPos->yMax = data.byte(kSavesize + 1) + data.byte(kSavey); +			objPos->index = i; +			data.word(kListpos) += sizeof(ObjPos); +		} +	} +} +  } /*namespace dreamgen */ diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index b7e5ba5917..5b1e30fddb 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -6303,94 +6303,6 @@ void DreamGenContext::drawfloor() {  	es = pop();  } -void DreamGenContext::showallex() { -	STACK_CHECK; -	es = data.word(kBuffers); -	bx = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)); -	data.word(kListpos) = bx; -	di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)); -	cx = 100*5; -	al = 255; -	_stosb(cx, true); -	es = data.word(kExtras); -	data.word(kFrsegment) = es; -	ax = (0); -	data.word(kDataad) = ax; -	ax = (0+2080); -	data.word(kFramesad) = ax; -	data.byte(kCurrentex) = 0; -	si = (0+2080+30000)+2; -	cx = 0; -exloop: -	push(cx); -	push(si); -	es = data.word(kExtras); -	push(si); -	ch = 0; -	_cmp(es.byte(si), 255); -	if (flags.z()) -		goto notinroom; -	al = es.byte(si-2); -	_cmp(al, data.byte(kReallocation)); -	if (!flags.z()) -		goto notinroom; -	getmapad(); -notinroom: -	si = pop(); -	_cmp(ch, 0); -	if (flags.z()) -		goto blankex; -	al = data.byte(kCurrentex); -	ah = 0; -	dx = ax; -	_add(ax, ax); -	_add(ax, dx); -	data.word(kCurrentframe) = ax; -	push(es); -	push(si); -	calcfrframe(); -	es = data.word(kMapstore); -	ds = data.word(kFrsegment); -	finalframe(); -	si = pop(); -	es = pop(); -	_cmp(cx, 0); -	if (flags.z()) -		goto blankex; -	ax = data.word(kCurrentframe); -	ah = 0; -	_add(di, data.word(kMapadx)); -	_add(bx, data.word(kMapady)); -	showframe(); -	si = data.word(kListpos); -	es = data.word(kBuffers); -	al = data.byte(kSavex); -	ah = data.byte(kSavey); -	es.word(si) = ax; -	cx = ax; -	ax = data.word(kSavesize); -	_add(al, cl); -	_add(ah, ch); -	es.word(si+2) = ax; -	ax = pop(); -	cx = pop(); -	push(cx); -	push(ax); -	es.byte(si+4) = cl; -	_add(si, 5); -	data.word(kListpos) = si; -blankex: -	_inc(data.byte(kCurrentex)); -	si = pop(); -	cx = pop(); -	_add(si, 16); -	_inc(cx); -	_cmp(cx, 100); -	if (flags.z()) -		return /* (finex) */; -	goto exloop; -} -  void DreamGenContext::autolook() {  	STACK_CHECK;  	ax = data.word(kMousex); @@ -18078,7 +17990,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) {  		case addr_deleteextext: deleteextext(); break;  		case addr_blockget: blockget(); break;  		case addr_drawfloor: drawfloor(); break; -		case addr_showallex: showallex(); break;  		case addr_autolook: autolook(); break;  		case addr_look: look(); break;  		case addr_dolook: dolook(); break; diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index 18b982f3e4..cc777f4e82 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -447,7 +447,6 @@ public:  	static const uint16 addr_dolook = 0xc474;  	static const uint16 addr_look = 0xc470;  	static const uint16 addr_autolook = 0xc46c; -	static const uint16 addr_showallex = 0xc450;  	static const uint16 addr_drawfloor = 0xc428;  	static const uint16 addr_blockget = 0xc424;  	static const uint16 addr_deleteextext = 0xc420; @@ -1468,7 +1467,7 @@ public:  	void dumpdiarykeys();  	void disablesoundint();  	void checkifset(); -	void showallex(); +	//void showallex();  	void openpoolboss();  	void buttontwo();  	//void usetimedtext(); diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index 70236aacb1..0be9c793cf 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -170,6 +170,7 @@  	void removesetobject();  	void removesetobject(uint8 index);  	void showallfree(); +	void showallex();  	bool finishedwalkingCPP();  	void finishedwalking();  	void checkone(); | 
