diff options
| -rwxr-xr-x | devtools/tasmrecover/tasm-recover | 4 | ||||
| -rw-r--r-- | engines/dreamweb/dreamgen.cpp | 206 | ||||
| -rw-r--r-- | engines/dreamweb/dreamgen.h | 4 | ||||
| -rw-r--r-- | engines/dreamweb/sprite.cpp | 178 | ||||
| -rw-r--r-- | engines/dreamweb/stubs.cpp | 4 | ||||
| -rw-r--r-- | engines/dreamweb/stubs.h | 6 | 
6 files changed, 98 insertions, 304 deletions
| diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover index 7454c3acaf..0ef548c8be 100755 --- a/devtools/tasmrecover/tasm-recover +++ b/devtools/tasmrecover/tasm-recover @@ -335,6 +335,9 @@ generator = cpp(context, "DreamGen", blacklist = [  	'initrain',  	'input',  	'intro', +	'intro1text', +	'intro2text', +	'intro3text',  	'intromagic1',  	'intromusic',  	'inventory', @@ -392,6 +395,7 @@ generator = cpp(context, "DreamGen", blacklist = [  	'modifychar',  	'monmessage',  	'monprint', +	'monks2text',  	'movemap',  	'multidump',  	'multiget', diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index 1dcfaaeb24..820395953a 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -909,212 +909,6 @@ intromonk2fin:  	showGameReel();  } -void DreamGenContext::monks2text() { -	STACK_CHECK; -	_cmp(data.byte(kIntrocount), 1); -	if (!flags.z()) -		goto notmonk2text1; -	al = 8; -	bl = 36; -	bh = 160; -	cx = 100; -	goto gotmonks2text; -notmonk2text1: -	_cmp(data.byte(kIntrocount), 4); -	if (!flags.z()) -		goto notmonk2text2; -	al = 9; -	bl = 36; -	bh = 160; -	cx = 100; -	goto gotmonks2text; -notmonk2text2: -	_cmp(data.byte(kIntrocount), 7); -	if (!flags.z()) -		goto notmonk2text3; -	al = 10; -	bl = 36; -	bh = 160; -	cx = 100; -	goto gotmonks2text; -notmonk2text3: -	_cmp(data.byte(kIntrocount), 10); -	if (!flags.z()) -		goto notmonk2text4; -	data.byte(kIntrocount) = 12; -	al = 11; -	bl = 0; -	bh = 105; -	cx = 100; -	goto gotmonks2text; -notmonk2text4: -	_cmp(data.byte(kIntrocount), 13); -	if (!flags.z()) -		goto notmonk2text5; -	data.byte(kIntrocount) = 17; -	return; -	al = 12; -	bl = 0; -	bh = 120; -	cx = 100; -	goto gotmonks2text; -notmonk2text5: -	_cmp(data.byte(kIntrocount), 16); -	if (!flags.z()) -		goto notmonk2text6; -	al = 13; -	bl = 0; -	bh = 135; -	cx = 100; -	goto gotmonks2text; -notmonk2text6: -	_cmp(data.byte(kIntrocount), 19); -	if (!flags.z()) -		goto notmonk2text7; -	al = 14; -	bl = 36; -	bh = 160; -	cx = 100; -	dx = 1; -	ah = 82; -	{ setupTimedTemp(); return; }; -notmonk2text7: -	_cmp(data.byte(kIntrocount), 22); -	if (!flags.z()) -		goto notmonk2text8; -	al = 15; -	bl = 36; -	bh = 160; -	cx = 100; -	goto gotmonks2text; -notmonk2text8: -	_cmp(data.byte(kIntrocount), 25); -	if (!flags.z()) -		goto notmonk2text9; -	al = 16; -	bl = 36; -	bh = 160; -	cx = 100; -	goto gotmonks2text; -notmonk2text9: -	_cmp(data.byte(kIntrocount), 27); -	if (!flags.z()) -		goto notmonk2text10; -	al = 17; -	bl = 36; -	bh = 160; -	cx = 100; -	goto gotmonks2text; -notmonk2text10: -	_cmp(data.byte(kIntrocount), 31); -	if (!flags.z()) -		return /* (notmonk2text11) */; -	al = 18; -	bl = 36; -	bh = 160; -	cx = 100; -	goto gotmonks2text; -	return; -gotmonks2text: -	dx = 1; -	cx = 120; -	ah = 82; -	setupTimedTemp(); -} - -void DreamGenContext::intro1Text() { -	STACK_CHECK; -	_cmp(data.byte(kIntrocount), 2); -	if (!flags.z()) -		goto notintro1text1; -	al = 40; -	bl = 34; -	bh = 130; -	cx = 90; -	goto gotintro1text; -notintro1text1: -	_cmp(data.byte(kIntrocount), 4); -	if (!flags.z()) -		goto notintro1text2; -	al = 41; -	bl = 34; -	bh = 130; -	cx = 90; -	goto gotintro1text; -notintro1text2: -	_cmp(data.byte(kIntrocount), 6); -	if (!flags.z()) -		return /* (notintro1text3) */; -	al = 42; -	bl = 34; -	bh = 130; -	cx = 90; -	goto gotintro1text; -	return; -gotintro1text: -	dx = 1; -	ah = 82; -	_cmp(data.byte(kCh1playing), 255); -	if (flags.z()) -		goto oktalk2; -	_dec(data.byte(kIntrocount)); -	return; -oktalk2: -	setupTimedTemp(); -} - -void DreamGenContext::intro2Text() { -	STACK_CHECK; -	_cmp(ax, 5); -	if (!flags.z()) -		goto notintro2text1; -	al = 43; -	bl = 34; -	bh = 40; -	cx = 90; -	goto gotintro2text; -notintro2text1: -	_cmp(ax, 15); -	if (!flags.z()) -		return /* (notintro2text2) */; -	al = 44; -	bl = 34; -	bh = 40; -	cx = 90; -	goto gotintro2text; -	return; -gotintro2text: -	dx = 1; -	ah = 82; -	setupTimedTemp(); -} - -void DreamGenContext::intro3Text() { -	STACK_CHECK; -	_cmp(ax, 107); -	if (!flags.z()) -		goto notintro3text1; -	al = 45; -	bl = 36; -	bh = 56; -	cx = 100; -	goto gotintro3text; -notintro3text1: -	_cmp(ax, 108); -	if (!flags.z()) -		return /* (notintro3text2) */; -	al = 46; -	bl = 36; -	bh = 56; -	cx = 100; -	goto gotintro3text; -	return; -gotintro3text: -	dx = 1; -	ah = 82; -	setupTimedTemp(); -} -  void DreamGenContext::monkAndRyan() {  	STACK_CHECK;  	checkSpeed(); diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index d062acbb1b..9fe38769b2 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -627,7 +627,6 @@ public:  	void runIntroSeq();  	void advisor();  	void attendant(); -	void monks2text();  	void clearPalette();  	void cantDrop();  	void copper(); @@ -643,7 +642,6 @@ public:  	void workoutFrames();  	void dumpSymBox();  	void rollEndCredits(); -	void intro2Text();  	void interviewer();  	void getKeyAndLogo();  	void selectOb(); @@ -662,7 +660,6 @@ public:  	void introMagic3();  	void showDiaryPage();  	void dumpSymbol(); -	void intro1Text();  	void transferToEx();  	void reExFromInv();  	void examineInventory(); @@ -730,7 +727,6 @@ public:  	void dumpCurrent();  	void showDiaryKeys();  	void dontLoadSeg(); -	void intro3Text();  	void allocateMem();  	void useOpened();  	void fillOpen(); diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp index 28b1ce8683..6c8c1356de 100644 --- a/engines/dreamweb/sprite.cpp +++ b/engines/dreamweb/sprite.cpp @@ -742,109 +742,109 @@ void DreamGenContext::initRain() {  	rain->x = 0xff;  } +void DreamGenContext::intro1Text() { +	if ((data.byte(kIntrocount) == 2 || data.byte(kIntrocount) == 4 || data.byte(kIntrocount) == 6) && +		data.byte(kCh1playing) == 255) { +		data.byte(kIntrocount) = data.byte(kIntrocount) - 1; +	} else { +		if (data.byte(kIntrocount) == 2) +			setupTimedTemp(40, 82, 34, 130, 90, 1); +		else if (data.byte(kIntrocount) == 4) +			setupTimedTemp(41, 82, 34, 130, 90, 1); +		else if (data.byte(kIntrocount) == 6) +			setupTimedTemp(42, 82, 34, 130, 90, 1); +	} +} + +void DreamGenContext::intro2Text() { +	if (ax == 5) +		setupTimedTemp(43, 82, 34, 40, 90, 1); +	else if (ax == 15) +		setupTimedTemp(44, 82, 34, 40, 90, 1); +} + +void DreamGenContext::intro3Text() { +	if (ax == 107) +		setupTimedTemp(45, 82, 36, 56, 100, 1); +	else if (ax == 108) +		setupTimedTemp(46, 82, 36, 56, 100, 1); +} + +void DreamGenContext::monks2text() { +	if (data.byte(kIntrocount) == 1) +		setupTimedTemp(8, 82, 36, 160, 120, 1); +	else if (data.byte(kIntrocount) == 4) +		setupTimedTemp(9, 82, 36, 160, 120, 1); +	else if (data.byte(kIntrocount) == 7) +		setupTimedTemp(10, 82, 36, 160, 120, 1); +	else if (data.byte(kIntrocount) == 10) +		setupTimedTemp(11, 82, 0, 105, 120, 1); +	else if (data.byte(kIntrocount) == 13) +		setupTimedTemp(12, 82, 0, 120, 120, 1); +	else if (data.byte(kIntrocount) == 16) +		setupTimedTemp(13, 82, 0, 135, 120, 1); +	else if (data.byte(kIntrocount) == 19) +		setupTimedTemp(14, 82, 36, 160, 120, 1); +	else if (data.byte(kIntrocount) == 22) +		setupTimedTemp(15, 82, 36, 160, 120, 1); +	else if (data.byte(kIntrocount) == 25) +		setupTimedTemp(16, 82, 36, 160, 120, 1); +	else if (data.byte(kIntrocount) == 27) +		setupTimedTemp(17, 82, 36, 160, 120, 1); +	else if (data.byte(kIntrocount) == 31) +		setupTimedTemp(18, 82, 36, 160, 120, 1); +} +  void DreamGenContext::textForEnd() {  	if (data.byte(kIntrocount) == 20) -		al = 0; +		setupTimedTemp(0, 83, 34, 20, 60, 1);  	else if (data.byte(kIntrocount) == (isCD() ? 50 : 65)) -		al = 1; +		setupTimedTemp(1, 83, 34, 20, 60, 1);  	else if (data.byte(kIntrocount) == (isCD() ? 85 : 110)) -		al = 2; -	else -		return; +		setupTimedTemp(2, 83, 34, 20, 60, 1); +} -	bl = 34; -	bh = 20; -	cx = 60; -	dx = 1; -	ah = 83; -	setupTimedTemp(); +void DreamGenContext::textForMonkHelper(uint8 textIndex, uint8 voiceIndex, uint8 x, uint8 y, uint16 countToTimed, uint16 timeCount) { +	if (isCD() && data.byte(kCh1playing) != 255) +		data.byte(kIntrocount)--; +	else +		setupTimedTemp(textIndex, voiceIndex, x, y, countToTimed, timeCount);  }  void DreamGenContext::textForMonk() { -	if (data.byte(kIntrocount) == 1) { -		al = 19; -		bl = 68; -		bh = 154; -		cx = 120; -	} else if (data.byte(kIntrocount) == 5) { -		al = 20; -		bl = 68; -		bh = 38; -		cx = 120; -	} else if (data.byte(kIntrocount) == 9) { -		al = 21; -		bl = 48; -		bh = 154; -		cx = 120; -	} else if (data.byte(kIntrocount) == 13) { -		al = 22; -		bl = 68; -		bh = 38; -		cx = 120; -	} else if (data.byte(kIntrocount) == (isCD() ? 15 : 17)) { -		al = 23; -		bl = 68; -		bh = 154; -		cx = 120; -	} else if (data.byte(kIntrocount) == 21) { -		al = 24; -		bl = 68; -		bh = 38; -		cx = 120; -	} else if (data.byte(kIntrocount) == 25) { -		al = 25; -		bl = 68; -		bh = 154; -		cx = 120; -	} else if (data.byte(kIntrocount) == 29) { -		al = 26; -		bl = 68; -		bh = 38; -		cx = 120; -	} else if (data.byte(kIntrocount) == 33) { -		al = 27; -		bl = 68; -		bh = 154; -		cx = 120; -	} else if (data.byte(kIntrocount) == 37) { -		al = 28; -		bl = 68; -		bh = 154; -		cx = 120; -	} else if (data.byte(kIntrocount) == 41) { -		al = 29; -		bl = 68; -		bh = 38; -		cx = 120; -	} else if (data.byte(kIntrocount) == 45) { -		al = 30; -		bl = 68; -		bh = 154; -		cx = 120; -	} else if (data.byte(kIntrocount) == (isCD() ? 52 : 49)) { -		al = 31; -		bl = 68; -		bh = 154; -		cx = 220; -	} else if (data.byte(kIntrocount) == 53) { +	if (data.byte(kIntrocount) == 1) +		textForMonkHelper(19, 82, 68, 154, 120, 1); +	else if (data.byte(kIntrocount) == 5) +		textForMonkHelper(20, 82, 68, 38, 120, 1); +	else if (data.byte(kIntrocount) == 9) +		textForMonkHelper(21, 82, 48, 154, 120, 1); +	else if (data.byte(kIntrocount) == 13) +		textForMonkHelper(22, 82, 68, 38, 120, 1); +	else if (data.byte(kIntrocount) == (isCD() ? 15 : 17)) +		textForMonkHelper(23, 82, 68, 154, 120, 1); +	else if (data.byte(kIntrocount) == 21) +		textForMonkHelper(24, 82, 68, 38, 120, 1); +	else if (data.byte(kIntrocount) == 25) +		textForMonkHelper(25, 82, 68, 154, 120, 1); +	else if (data.byte(kIntrocount) == 29) +		textForMonkHelper(26, 82, 68, 38, 120, 1); +	else if (data.byte(kIntrocount) == 33) +		textForMonkHelper(27, 82, 68, 154, 120, 1); +	else if (data.byte(kIntrocount) == 37) +		textForMonkHelper(28, 82, 68, 154, 120, 1); +	else if (data.byte(kIntrocount) == 41) +		textForMonkHelper(29, 82, 68, 38, 120, 1); +	else if (data.byte(kIntrocount) == 45) +		textForMonkHelper(30, 82, 68, 154, 120, 1); +	else if (data.byte(kIntrocount) == (isCD() ? 52 : 49)) +		textForMonkHelper(31, 82, 68, 154, 220, 1); +	else if (data.byte(kIntrocount) == 53) {  		fadeScreenDowns();  		if (isCD()) {  			data.byte(kVolumeto) = 7;  			data.byte(kVolumedirection) = 1;  		} -		return; -	} else { -		return;	  	} - -	dx = 1; -	ah = 82; -	if (isCD() && data.byte(kCh1playing) != 255) { -		data.byte(kIntrocount)--; -		return; -	} - -	setupTimedTemp();  }  void DreamGenContext::reelsOnScreen() { diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index 4b64102f4d..07170af4a6 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -964,10 +964,6 @@ void DreamGenContext::useTimedText() {  	data.byte(kNeedtodumptimed) = 1;  } -void DreamGenContext::setupTimedTemp() { -	setupTimedTemp(al, ah, bl, bh, cx, dx); -} -  void DreamGenContext::setupTimedTemp(uint8 textIndex, uint8 voiceIndex, uint8 x, uint8 y, uint16 countToTimed, uint16 timeCount) {  #if 1 // if cd  	if (voiceIndex != 0) { diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index 79a0438738..5ca0d168db 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -82,7 +82,6 @@  	void printMessage();  	void useTimedText();  	void dumpTimedText(); -	void setupTimedTemp();  	void setupTimedTemp(uint8 textIndex, uint8 voiceIndex, uint8 x, uint8 y, uint16 countToTimed, uint16 timeCount);  	void getUnderTimed();  	void putUnderTimed(); @@ -302,7 +301,12 @@  	void getUnderMenu();  	void putUnderMenu();  	void textForMonk(); +	void textForMonkHelper(uint8 textIndex, uint8 voiceIndex, uint8 x, uint8 y, uint16 countToTimed, uint16 timeCount);  	void textForEnd(); +	void monks2text(); +	void intro1Text(); +	void intro2Text(); +	void intro3Text();  	void readSetData();  	void loadRoomsSample();  	void fadeupYellows(); | 
