diff options
| author | Max Horn | 2011-12-16 17:05:15 +0100 | 
|---|---|---|
| committer | Max Horn | 2011-12-16 17:44:36 +0100 | 
| commit | 010714ce5bf401f3d91e8d410c447b866646c85f (patch) | |
| tree | b59e65a04d70415146d212f28dc6edb0aaa764b2 | |
| parent | 202f9d18f142544339ecd70c13e30243b5325682 (diff) | |
| download | scummvm-rg350-010714ce5bf401f3d91e8d410c447b866646c85f.tar.gz scummvm-rg350-010714ce5bf401f3d91e8d410c447b866646c85f.tar.bz2 scummvm-rg350-010714ce5bf401f3d91e8d410c447b866646c85f.zip | |
DREAMWEB: Move more to DreamBase; fix regression in introMonks1()
| -rw-r--r-- | engines/dreamweb/dreambase.h | 9 | ||||
| -rw-r--r-- | engines/dreamweb/people.cpp | 28 | ||||
| -rw-r--r-- | engines/dreamweb/sprite.cpp | 14 | ||||
| -rw-r--r-- | engines/dreamweb/stubs.h | 7 | 
4 files changed, 21 insertions, 37 deletions
| diff --git a/engines/dreamweb/dreambase.h b/engines/dreamweb/dreambase.h index 4856ae0487..d6b94e013b 100644 --- a/engines/dreamweb/dreambase.h +++ b/engines/dreamweb/dreambase.h @@ -133,6 +133,11 @@ public:  	void bresenhams();  	void workoutFrames(); +	// from people.cpp +	void madMode(); +	void addToPeopleList(ReelRoutine *routine); +	bool checkSpeed(ReelRoutine &routine); +  	// from print.cpp  	uint8 getNextWord(const Frame *charSet, const uint8 *string, uint8 *totalWidth, uint8 *charCount);  	void printChar(const Frame* charSet, uint16 *x, uint16 y, uint8 c, uint8 nextChar, uint8 *width, uint8 *height); @@ -194,6 +199,10 @@ public:  	Rain *splitIntoLines(uint8 x, uint8 y, Rain *rain);  	void initRain(); +	void intro1Text(); +	void intro2Text(uint16 nextReelPointer); +	void intro3Text(uint16 nextReelPointer); +  	void rollEndCredits();  	void monks2text();  	void textForEnd(); diff --git a/engines/dreamweb/people.cpp b/engines/dreamweb/people.cpp index aeb0b5db22..c4f950cbab 100644 --- a/engines/dreamweb/people.cpp +++ b/engines/dreamweb/people.cpp @@ -140,7 +140,7 @@ void DreamGenContext::madman(ReelRoutine &routine) {  	madMode();  } -void DreamGenContext::madMode() { +void DreamBase::madMode() {  	data.word(kWatchingtime) = 2;  	data.byte(kPointermode) = 0;  	if (data.byte(kCombatcount) < (isCD() ? 65 : 63)) @@ -150,7 +150,7 @@ void DreamGenContext::madMode() {  	data.byte(kPointermode) = 2;  } -void DreamGenContext::addToPeopleList(ReelRoutine *routine) { +void DreamBase::addToPeopleList(ReelRoutine *routine) {  	uint16 routinePointer = (const uint8 *)routine - data.ptr(0, 0);  	People *people = (People *)getSegment(data.word(kBuffers)).ptr(data.word(kListpos), sizeof(People)); @@ -160,12 +160,7 @@ void DreamGenContext::addToPeopleList(ReelRoutine *routine) {  	data.word(kListpos) += sizeof(People);  } -void DreamGenContext::checkSpeed() { -	ReelRoutine *routine = (ReelRoutine *)es.ptr(bx, sizeof(ReelRoutine)); -	flags._z = checkSpeed(*routine); -} - -bool DreamGenContext::checkSpeed(ReelRoutine &routine) { +bool DreamBase::checkSpeed(ReelRoutine &routine) {  	if (data.byte(kLastweapon) != (uint8)-1)  		return true;  	++routine.counter; @@ -372,11 +367,7 @@ void DreamGenContext::introMagic1(ReelRoutine &routine) {  		routine.setReelPointer(nextReelPointer);  		if (nextReelPointer == 121) {  			++data.byte(kIntrocount); -			push(es); -			push(bx);  			intro1Text(); -			bx = pop(); -			es = pop();  			if (data.byte(kIntrocount) == 8) {  				data.byte(kMapy) += 10;  				data.byte(kNowinnewroom) = 1; @@ -462,12 +453,7 @@ void DreamGenContext::gates(ReelRoutine &routine) {  			nextReelPointer = 119;  		}  		routine.setReelPointer(nextReelPointer); -		push(es); -		push(bx); -		ax = nextReelPointer; -		intro3Text(); -		bx = pop(); -		es = pop(); +		intro3Text(nextReelPointer);  	}  	showGameReel(&routine);  } @@ -655,11 +641,7 @@ void DreamGenContext::introMonks1(ReelRoutine &routine) {  			nextReelPointer == 25 || nextReelPointer == 61 ||  			nextReelPointer == 71) {  			// Wait step -			push(es); -			push(bx); -			intro2Text(); -			bx = pop(); -			es = pop(); +			intro2Text(nextReelPointer);  			routine.counter = (uint8)-20;  		}  	} diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp index 99b12d1bc8..cfa204ec23 100644 --- a/engines/dreamweb/sprite.cpp +++ b/engines/dreamweb/sprite.cpp @@ -709,7 +709,7 @@ void DreamBase::initRain() {  	rain->x = 0xff;  } -void DreamGenContext::intro1Text() { +void DreamBase::intro1Text() {  	if (data.byte(kIntrocount) != 2 && data.byte(kIntrocount) != 4 && data.byte(kIntrocount) != 6)  		return; @@ -725,17 +725,17 @@ void DreamGenContext::intro1Text() {  	}  } -void DreamGenContext::intro2Text() { -	if (ax == 5) +void DreamBase::intro2Text(uint16 nextReelPointer) { +	if (nextReelPointer == 5)  		setupTimedTemp(43, 82, 34, 40, 90, 1); -	else if (ax == 15) +	else if (nextReelPointer == 15)  		setupTimedTemp(44, 82, 34, 40, 90, 1);  } -void DreamGenContext::intro3Text() { -	if (ax == 107) +void DreamBase::intro3Text(uint16 nextReelPointer) { +	if (nextReelPointer == 107)  		setupTimedTemp(45, 82, 36, 56, 100, 1); -	else if (ax == (isCD() ? 108 : 109)) +	else if (nextReelPointer == (isCD() ? 108 : 109))  		setupTimedTemp(46, 82, 36, 56, 100, 1);  } diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index 765b689251..df55f0579c 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -93,7 +93,6 @@  	void updatePeople();  	void madman(ReelRoutine &routine);  	void madmanText(); -	void madMode();  	bool addAlong(const uint8 *mapFlags);  	bool addLength(const uint8 *mapFlags);  	void getDimension(); @@ -138,7 +137,6 @@  	void obName();  	void obName(uint8 command, uint8 commandType);  	void checkCoords(const RectWithCallback *rectWithCallbacks); -	void addToPeopleList(ReelRoutine *routine);  	void getExPos();  	void compare();  	bool compare(uint8 index, uint8 flag, const char id[4]) { @@ -183,9 +181,6 @@  	void transferText();  	void watchCount();  	void loadRoom(); -	void intro1Text(); -	void intro2Text(); -	void intro3Text();  	void readSetData();  	void fadeupYellows();  	void fadeupMonFirst(); @@ -279,8 +274,6 @@  	void nextFolder();  	void lastFolder();  	void drawFloor(); -	bool checkSpeed(ReelRoutine &routine); -	void checkSpeed();  	void sparkyDrip(ReelRoutine &routine);  	void genericPerson(ReelRoutine &routine);  	void gamer(ReelRoutine &routine); | 
