[Scummvm-cvs-logs] scummvm master -> 627d3f8d4128d07b01765132b8ee39ec7f30f2b6

wjp wjp at usecode.org
Thu Dec 8 19:21:18 CET 2011


This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
e8ccbe3558 DREAMWEB: Convert watchreel and remove global kReelpointer
e40f1af3dc DREAMWEB: Remove globals kCurrentframe, kTakeoff
627d3f8d41 DREAMWEB: Move functions to DreamBase


Commit: e8ccbe355851e17a6a5912f3b5c6bb0ef2a48810
    https://github.com/scummvm/scummvm/commit/e8ccbe355851e17a6a5912f3b5c6bb0ef2a48810
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2011-12-08T10:18:27-08:00

Commit Message:
DREAMWEB: Convert watchreel and remove global kReelpointer

Changed paths:
    devtools/tasmrecover/tasm-recover
    engines/dreamweb/dreambase.h
    engines/dreamweb/dreamgen.cpp
    engines/dreamweb/dreamgen.h
    engines/dreamweb/sound.cpp
    engines/dreamweb/sprite.cpp
    engines/dreamweb/stubs.cpp
    engines/dreamweb/stubs.h



diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index a37f7a7..1e326cb 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -202,6 +202,7 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'checkcoords',
 	'checkdest',
 	'checkforemm',
+	'checkforshake',
 	'checkifex',
 	'checkiffree',
 	'checkifpathison',
@@ -710,6 +711,7 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'walkintoroom',
 	'walktotext',
 	'watchcount',
+	'watchreel',
 	'wearwatch',
 	'wearshades',
 	'wheelsound',
diff --git a/engines/dreamweb/dreambase.h b/engines/dreamweb/dreambase.h
index 7672290..d88fda3 100644
--- a/engines/dreamweb/dreambase.h
+++ b/engines/dreamweb/dreambase.h
@@ -74,10 +74,16 @@ public:
 	void cancelCh0();
 	void cancelCh1();
 	void loadRoomsSample();
+	void playChannel0(uint8 index, uint8 repeat);
+	void playChannel1(uint8 index);
 
 	// from sprite.cpp
 	Sprite *spriteTable();
-	Reel *getReelStart();
+	Reel *getReelStart(uint16 reelPointer);
+	const Frame *findSource(uint16 &frame);
+	void showReelFrame(Reel *reel);
+	const Frame *getReelFrameAX(uint16 frame);
+	void soundOnReels(uint16 reelPointer);
 
 	// from stubs.cpp
 	void crosshair();
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 718538e..aef6488 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -6758,99 +6758,6 @@ void DreamGenContext::clearChanges() {
 	_stosw(cx, true);
 }
 
-void DreamGenContext::watchReel() {
-	STACK_CHECK;
-	_cmp(data.word(kReeltowatch), -1);
-	if (flags.z())
-		goto notplayingreel;
-	al = data.byte(kManspath);
-	_cmp(al, data.byte(kFinaldest));
-	if (!flags.z())
-		return /* (waitstopwalk) */;
-	al = data.byte(kTurntoface);
-	_cmp(al, data.byte(kFacing));
-	if (flags.z())
-		goto notwatchpath;
-	return;
-notwatchpath:
-	_dec(data.byte(kSpeedcount));
-	_cmp(data.byte(kSpeedcount), -1);
-	if (!flags.z())
-		goto showwatchreel;
-	al = data.byte(kWatchspeed);
-	data.byte(kSpeedcount) = al;
-	ax = data.word(kReeltowatch);
-	_cmp(ax, data.word(kEndwatchreel));
-	if (!flags.z())
-		goto ismorereel;
-	_cmp(data.word(kWatchingtime), 0);
-	if (!flags.z())
-		goto showwatchreel;
-	data.word(kReeltowatch) = -1;
-	data.byte(kWatchmode) = -1;
-	_cmp(data.word(kReeltohold), -1);
-	if (flags.z())
-		return /* (nomorereel) */;
-	data.byte(kWatchmode) = 1;
-	goto notplayingreel;
-ismorereel:
-	_inc(data.word(kReeltowatch));
-showwatchreel:
-	ax = data.word(kReeltowatch);
-	data.word(kReelpointer) = ax;
-	plotReel();
-	ax = data.word(kReelpointer);
-	data.word(kReeltowatch) = ax;
-	checkForShake();
-	return;
-notplayingreel:
-	_cmp(data.byte(kWatchmode), 1);
-	if (!flags.z())
-		goto notholdingreel;
-	ax = data.word(kReeltohold);
-	data.word(kReelpointer) = ax;
-	plotReel();
-	return;
-notholdingreel:
-	_cmp(data.byte(kWatchmode), 2);
-	if (!flags.z())
-		return /* (notreleasehold) */;
-	_dec(data.byte(kSpeedcount));
-	_cmp(data.byte(kSpeedcount), -1);
-	if (!flags.z())
-		goto notlastspeed2;
-	al = data.byte(kWatchspeed);
-	data.byte(kSpeedcount) = al;
-	_inc(data.word(kReeltohold));
-notlastspeed2:
-	ax = data.word(kReeltohold);
-	_cmp(ax, data.word(kEndofholdreel));
-	if (!flags.z())
-		goto ismorereel2;
-	data.word(kReeltohold) = -1;
-	data.byte(kWatchmode) = -1;
-	al = data.byte(kDestafterhold);
-	data.byte(kDestination) = al;
-	data.byte(kFinaldest) = al;
-	autoSetWalk();
-	return;
-ismorereel2:
-	ax = data.word(kReeltohold);
-	data.word(kReelpointer) = ax;
-	plotReel();
-}
-
-void DreamGenContext::checkForShake() {
-	STACK_CHECK;
-	_cmp(data.byte(kReallocation), 26);
-	if (!flags.z())
-		return /* (notstartshake) */;
-	_cmp(ax, 104);
-	if (!flags.z())
-		return /* (notstartshake) */;
-	data.byte(kShakecounter) = -1;
-}
-
 void DreamGenContext::madmanRun() {
 	STACK_CHECK;
 	_cmp(data.byte(kLocation), 14);
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 9d283b2..b8aecee 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -554,10 +554,9 @@ public:
 	void checkInput();
 	void putUnderCentre();
 	void checkObjectSize();
-	void watchReel();
 	void findText1();
 	void isRyanHolding();
-	void showSlots();
+	void quitSymbol();
 	void useCashCard();
 	void moneyPoke();
 	void doSomeTalk();
@@ -643,7 +642,7 @@ public:
 	void lookAtPlace();
 	void useAxe();
 	void findAllOpen();
-	void quitSymbol();
+	void showSlots();
 	void findSetObject();
 	void useDiary();
 	void deleteExObject();
@@ -693,7 +692,6 @@ public:
 	void afterNewRoom();
 	void getExAd();
 	void initialMonCols();
-	void checkForShake();
 	void useButtonA();
 	void execCommand();
 	void updateSymbolBot();
diff --git a/engines/dreamweb/sound.cpp b/engines/dreamweb/sound.cpp
index 16f562a..8bccc5e 100644
--- a/engines/dreamweb/sound.cpp
+++ b/engines/dreamweb/sound.cpp
@@ -53,7 +53,7 @@ void DreamBase::volumeAdjust() {
 	}
 }
 
-void DreamGenContext::playChannel0(uint8 index, uint8 repeat) {
+void DreamBase::playChannel0(uint8 index, uint8 repeat) {
 	if (data.byte(kSoundint) == 255)
 		return;
 
@@ -80,7 +80,7 @@ void DreamGenContext::playChannel0() {
 	playChannel0(al, ah);
 }
 
-void DreamGenContext::playChannel1(uint8 index) {
+void DreamBase::playChannel1(uint8 index) {
 	if (data.byte(kSoundint) == 255)
 		return;
 	if (data.byte(kCh1playing) == 7)
diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp
index a44cd8d..992a080 100644
--- a/engines/dreamweb/sprite.cpp
+++ b/engines/dreamweb/sprite.cpp
@@ -482,8 +482,8 @@ Frame *DreamGenContext::findSource() {
 	}
 }
 
-Reel *DreamBase::getReelStart() {
-	Reel *reel = (Reel *)getSegment(data.word(kReels)).ptr(kReellist + data.word(kReelpointer) * sizeof(Reel) * 8, sizeof(Reel));
+Reel *DreamBase::getReelStart(uint16 reelPointer) {
+	Reel *reel = (Reel *)getSegment(data.word(kReels)).ptr(kReellist + reelPointer * sizeof(Reel) * 8, sizeof(Reel));
 	return reel;
 }
 
@@ -504,9 +504,8 @@ void DreamGenContext::showGameReel(ReelRoutine *routine) {
 	uint16 reelPointer = routine->reelPointer();
 	if (reelPointer >= 512)
 		return;
-	data.word(kReelpointer) = reelPointer;
-	plotReel();
-	routine->setReelPointer(data.word(kReelpointer));
+	plotReel(reelPointer);
+	routine->setReelPointer(reelPointer);
 }
 
 const Frame *DreamGenContext::getReelFrameAX(uint16 frame) {
@@ -1133,14 +1132,14 @@ static const ReelSound *g_roomByRoom[] = {
 };
 
 
-void DreamGenContext::soundOnReels() {
+void DreamBase::soundOnReels(uint16 reelPointer) {
 	const ReelSound *r = g_roomByRoom[data.byte(kReallocation)];
 
 	if (engine->getLanguage() == Common::DE_DEU && r == g_roomSound29)
 		r = g_roomSound29_German;
 
 	for (; r->_sample != 255; ++r) {
-		if (r->_reelPointer != data.word(kReelpointer))
+		if (r->_reelPointer != reelPointer)
 			continue;
 		if (r->_reelPointer == data.word(kLastsoundreel))
 			continue;
@@ -1156,7 +1155,7 @@ void DreamGenContext::soundOnReels() {
 		playChannel0(r->_sample & 63, 255);
 	}
 
-	if (data.word(kReelpointer) != data.word(kLastsoundreel))
+	if (data.word(kLastsoundreel) != reelPointer)
 		data.word(kLastsoundreel) = (uint16)-1;
 }
 
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 6ad048d..4ccb50b 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -1196,11 +1196,11 @@ void DreamGenContext::dealWithSpecial(uint8 firstParam, uint8 secondParam) {
 	}
 }
 
-void DreamGenContext::plotReel() {
-	Reel *reel = getReelStart();
+void DreamGenContext::plotReel(uint16 &reelPointer) {
+	Reel *reel = getReelStart(reelPointer);
 	while (reel->x >= 220 && reel->x != 255) {
 		dealWithSpecial(reel->x, reel->y);
-		++data.word(kReelpointer);
+		++reelPointer;
 		reel += 8;
 	}
 
@@ -1209,11 +1209,7 @@ void DreamGenContext::plotReel() {
 			showReelFrame(reel);
 		++reel;
 	}
-	push(es);
-	push(bx);
-	soundOnReels();
-	bx = pop();
-	es = pop();
+	soundOnReels(reelPointer);
 }
 
 void DreamBase::crosshair() {
@@ -1258,8 +1254,7 @@ bool DreamGenContext::checkIfPerson(uint8 x, uint8 y) {
 	for (size_t i = 0; i < 12; ++i, ++people) {
 		if (people->b4 == 255)
 			continue;
-		data.word(kReelpointer) = people->reelPointer();
-		Reel *reel = getReelStart();
+		Reel *reel = getReelStart(people->reelPointer());
 		if (reel->frame() == 0xffff)
 			++reel;
 		const Frame *frame = getReelFrameAX(reel->frame());
@@ -3815,4 +3810,61 @@ void DreamBase::showDiary() {
 	showFrame(tempGraphics(), kDiaryx + 176, kDiaryy + 108, 2, 0);
 }
 
+void DreamGenContext::showWatchReel() {
+	uint16 reelPointer = data.word(kReeltowatch);
+	plotReel(reelPointer);
+	data.word(kReeltowatch) = reelPointer;
+
+	// check for shake
+	if (data.byte(kReallocation) == 26 && reelPointer == 104)
+		data.byte(kShakecounter) = 0xFF;
+}
+
+void DreamGenContext::watchReel() {
+	if (data.word(kReeltowatch) != 0xFFFF) {
+		if (data.byte(kManspath) != data.byte(kFinaldest))
+			return; // Wait until stopped walking
+		if (data.byte(kTurntoface) != data.byte(kFacing))
+			return;
+
+		if (--data.byte(kSpeedcount) != 0xFF) {
+			showWatchReel();
+			return;
+		}
+		data.byte(kSpeedcount) = data.byte(kWatchspeed);
+		if (data.word(kReeltowatch) != data.word(kEndwatchreel)) {
+			++data.word(kReeltowatch);
+			showWatchReel();
+			return;
+		}
+		if (data.word(kWatchingtime)) {
+			showWatchReel();
+			return;
+		}
+		data.word(kReeltowatch) = 0xFFFF;
+		data.byte(kWatchmode) = 0xFF;
+		if (data.word(kReeltohold) == 0xFFFF)
+			return; // No more reel
+		data.byte(kWatchmode) = 1;
+	} else if (data.byte(kWatchmode) != 1) {
+		if (data.byte(kWatchmode) != 2)
+			return; // "notreleasehold"
+		if (--data.byte(kSpeedcount) == 0xFF) {
+			data.byte(kSpeedcount) = data.byte(kWatchspeed);
+			++data.word(kReeltohold);
+		}
+		if (data.word(kReeltohold) == data.word(kEndofholdreel)) {
+			data.word(kReeltohold) = -1;
+			data.byte(kWatchmode) = -1;
+			data.byte(kDestination) = data.byte(kDestafterhold);
+			data.byte(kFinaldest) = data.byte(kDestafterhold);
+			autoSetWalk();
+			return;
+		}
+	}
+
+	uint16 reelPointer = data.word(kReeltohold);
+	plotReel(reelPointer);
+}
+
 } // End of namespace DreamGen
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 8b709d8..3bbba77 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -130,7 +130,6 @@
 	void turnAnyPathOff();
 	void makeBackOb(SetObject *objData);
 	void lockMon();
-	void plotReel();
 	void dealWithSpecial(uint8 firstParam, uint8 secondParam);
 	void zoom();
 	void showRain();
@@ -297,9 +296,13 @@
 	void powerLightOn();
 	void powerLightOff();
 	void playChannel0();
-	void playChannel0(uint8 index, uint8 repeat);
+	void playChannel0(uint8 index, uint8 repeat) {
+		DreamBase::playChannel0(index, repeat);
+	}
 	void playChannel1();
-	void playChannel1(uint8 index);
+	void playChannel1(uint8 index) {
+		DreamBase::playChannel1(index);
+	}
 	void showMainOps();
 	void showDiscOps();
 	void findRoomInLoc();
@@ -471,7 +474,6 @@
 	void loadPersonal();
 	void loadNews();
 	void loadCart();
-	void soundOnReels();
 	void readKey();
 	void hangOne(uint16 delay);
 	void hangOne();
@@ -556,5 +558,8 @@
 	void examineInventory();
 	void showSaveOps();
 	void showLoadOps();
+	void watchReel();
+	void showWatchReel();
+	void plotReel(uint16 &reelPointer);
 
 #endif


Commit: e40f1af3dcc282585cd8f9d173d81657ec4dc0cc
    https://github.com/scummvm/scummvm/commit/e40f1af3dcc282585cd8f9d173d81657ec4dc0cc
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2011-12-08T10:18:27-08:00

Commit Message:
DREAMWEB: Remove globals kCurrentframe, kTakeoff

Changed paths:
    devtools/tasmrecover/tasm-recover
    engines/dreamweb/backdrop.cpp
    engines/dreamweb/dreamgen.cpp
    engines/dreamweb/dreamgen.h
    engines/dreamweb/sprite.cpp
    engines/dreamweb/stubs.h
    engines/dreamweb/talk.cpp



diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index 1e326cb..56d7109 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -97,6 +97,9 @@ p = parser(skip_binary_data = [
 	'icons1',
 	'icons2',
 	'tempcharset',
+	'currentframe',
+	'takeoff',
+	'reelpointer',
 	# vgagrafx.asm
 	'cityname',
 	'extragraphics1',
diff --git a/engines/dreamweb/backdrop.cpp b/engines/dreamweb/backdrop.cpp
index 065ce63..cf07ffc 100644
--- a/engines/dreamweb/backdrop.cpp
+++ b/engines/dreamweb/backdrop.cpp
@@ -105,15 +105,15 @@ uint8 DreamGenContext::getMapAd(const uint8 *setData) {
 	return 1;
 }
 
-void DreamGenContext::calcFrFrame() {
+void DreamGenContext::calcFrFrame(uint16 frame) {
 	uint8 width, height;
-	calcFrFrame(&width, &height);
+	calcFrFrame(frame, &width, &height);
 	cl = width;
 	ch = height;
 }
 
-void DreamGenContext::calcFrFrame(uint8* width, uint8* height) {
-	const Frame *frame = (const Frame *)getSegment(data.word(kFrsegment)).ptr(data.word(kCurrentframe) * sizeof(Frame), sizeof(Frame));
+void DreamGenContext::calcFrFrame(uint16 frameNum, uint8* width, uint8* height) {
+	const Frame *frame = (const Frame *)getSegment(data.word(kFrsegment)).ptr(frameNum * sizeof(Frame), sizeof(Frame));
 	data.word(kSavesource) = data.word(kFramesad) + frame->ptr();
 	data.byte(kSavesize+0) = frame->width;
 	data.byte(kSavesize+1) = frame->height;
@@ -151,17 +151,16 @@ void DreamGenContext::showAllObs() {
 		if (getMapAd(setEntry->mapad) == 0)
 			continue;
 		uint8 currentFrame = setEntry->frames[0];
-		data.word(kCurrentframe) = currentFrame;
 		if (currentFrame == 0xff)
 			continue;
-		calcFrFrame();
+		calcFrFrame(currentFrame);
 		uint16 x, y;
 		finalFrame(&x, &y);
 		setEntry->index = setEntry->frames[0];
 		if ((setEntry->type == 0) && (setEntry->priority != 5) && (setEntry->priority != 6)) {
 			x += data.word(kMapadx);
 			y += data.word(kMapady);
-			showFrame(frames, x, y, data.word(kCurrentframe), 0);
+			showFrame(frames, x, y, currentFrame, 0);
 		} else
 			makeBackOb(setEntry);
 
@@ -251,15 +250,16 @@ void DreamGenContext::showAllFree() {
 	for(size_t i = 0; i < 80; ++i) {
 		uint8 mapAd = getMapAd(freeObjects[i].mapad);
 		if (mapAd != 0) {
-			data.word(kCurrentframe) = 3 * data.byte(kCurrentfree);
 			uint8 width, height;
-			calcFrFrame(&width, &height);
+			uint16 currentFrame = 3 * data.byte(kCurrentfree);
+			calcFrFrame(currentFrame, &width, &height);
 			uint16 x, y;
 			finalFrame(&x, &y);
 			if ((width != 0) || (height != 0)) {
 				x += data.word(kMapadx);
 				y += data.word(kMapady);
-				showFrame((Frame *)getSegment(data.word(kFrsegment)).ptr(0, 0), x, y, data.word(kCurrentframe) & 0xff, 0);
+				assert(currentFrame < 256);
+				showFrame((Frame *)getSegment(data.word(kFrsegment)).ptr(0, 0), x, y, currentFrame, 0);
 				ObjPos *objPos = (ObjPos *)getSegment(data.word(kBuffers)).ptr(data.word(kListpos), sizeof(ObjPos));
 				objPos->xMin = data.byte(kSavex);
 				objPos->yMin = data.byte(kSavey);
@@ -307,13 +307,14 @@ void DreamGenContext::showAllEx() {
 			continue;
 		if (getMapAd(object->mapad) == 0)
 			continue;
-		data.word(kCurrentframe) = 3 * data.byte(kCurrentex);
 		uint8 width, height;
-		calcFrFrame(&width, &height);
+		uint16 currentFrame = 3 * data.byte(kCurrentex);
+		calcFrFrame(currentFrame, &width, &height);
 		uint16 x, y;
 		finalFrame(&x, &y);
 		if ((width != 0) || (height != 0)) {
-			showFrame((Frame *)getSegment(data.word(kFrsegment)).ptr(0, 0), x + data.word(kMapadx), y + data.word(kMapady), data.word(kCurrentframe) & 0xff, 0);
+			assert(currentFrame < 256);
+			showFrame((Frame *)getSegment(data.word(kFrsegment)).ptr(0, 0), x + data.word(kMapadx), y + data.word(kMapady), currentFrame, 0);
 			ObjPos *objPos = (ObjPos *)getSegment(data.word(kBuffers)).ptr(data.word(kListpos), sizeof(ObjPos));
 			objPos->xMin = data.byte(kSavex);
 			objPos->yMin = data.byte(kSavey);
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index aef6488..6216714 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -1138,7 +1138,7 @@ void DreamGenContext::showGun() {
 	data.byte(kRoomssample) = 34;
 	loadRoomsSample();
 	data.byte(kVolume) = 0;
-	dx = 1061;
+	dx = 1055;
 	loadIntoTemp();
 	createPanel2();
 	ds = data.word(kTempgraphics);
@@ -1161,7 +1161,7 @@ void DreamGenContext::showGun() {
 	al = 12;
 	ah = 0;
 	playChannel0();
-	dx = 1035;
+	dx = 1029;
 	loadTempText();
 	rollEndCredits2();
 	getRidOfTempText();
@@ -1409,7 +1409,7 @@ void DreamGenContext::initialMonCols() {
 
 void DreamGenContext::endGame() {
 	STACK_CHECK;
-	dx = 1035;
+	dx = 1029;
 	loadTempText();
 	monkSpeaking();
 	gettingShot();
@@ -1424,7 +1424,7 @@ void DreamGenContext::monkSpeaking() {
 	STACK_CHECK;
 	data.byte(kRoomssample) = 35;
 	loadRoomsSample();
-	dx = 1074;
+	dx = 1068;
 	loadIntoTemp();
 	clearWork();
 	showMonk();
@@ -3579,14 +3579,14 @@ void DreamGenContext::getDestInfo() {
 	push(ax);
 	dx = data;
 	es = dx;
-	si = 1661;
+	si = 1655;
 	_add(si, ax);
 	cl = es.byte(si);
 	ax = pop();
 	push(cx);
 	dx = data;
 	es = dx;
-	si = 1677;
+	si = 1671;
 	_add(si, ax);
 	ax = pop();
 }
@@ -3638,7 +3638,7 @@ clearedlocations:
 	bx = ax;
 	dx = data;
 	es = dx;
-	_add(bx, 1661);
+	_add(bx, 1655);
 	es.byte(bx) = 0;
 }
 
@@ -3708,7 +3708,7 @@ void DreamGenContext::execCommand() {
 	es = cs;
 	bx = offset_comlist;
 	ds = cs;
-	si = 1695;
+	si = 1689;
 	al = ds.byte(si);
 	_cmp(al, 0);
 	if (!flags.z())
@@ -3801,7 +3801,7 @@ dirroot:
 	si = offset_rootdir;
 	_inc(si);
 	es = cs;
-	di = 1350;
+	di = 1344;
 	_inc(di);
 	cx = 12;
 	_movsb(cx, true);
@@ -3903,7 +3903,7 @@ notyetassigned:
 	push(bx);
 	_add(bx, 2);
 	ds = cs;
-	si = 1695;
+	si = 1689;
 checkpass:
 	_lodsw();
 	ah = es.byte(bx);
@@ -3974,7 +3974,7 @@ void DreamGenContext::read() {
 	return;
 okcom:
 	es = cs;
-	di = 1350;
+	di = 1344;
 	ax = data.word(kTextfile1);
 	data.word(kMonsource) = ax;
 	ds = ax;
@@ -4104,7 +4104,7 @@ keyok2:
 	ds = cs;
 	si = offset_operand1+1;
 	es = cs;
-	di = 1350+1;
+	di = 1344+1;
 	cx = 12;
 	_movsb(cx, true);
 	monitorLogo();
@@ -4231,7 +4231,7 @@ void DreamGenContext::parser() {
 	al = '=';
 	_stosb();
 	ds = cs;
-	si = 1695;
+	si = 1689;
 notspace1:
 	_lodsw();
 	_cmp(al, 32);
@@ -5818,11 +5818,11 @@ notwrapbackb:
 void DreamGenContext::useDiary() {
 	STACK_CHECK;
 	getRidOfReels();
-	dx = 1009;
+	dx = 1003;
 	loadIntoTemp();
-	dx = 1022;
+	dx = 1016;
 	loadTempText();
-	dx = 983;
+	dx = 977;
 	loadTempCharset();
 	createPanel();
 	showIcon();
@@ -6217,7 +6217,7 @@ void DreamGenContext::getNamePos() {
 	_mul(cx);
 	dx = data;
 	es = dx;
-	bx = 1829;
+	bx = 1823;
 	_add(bx, ax);
 	al = data.byte(kCursorpos);
 	ah = 0;
@@ -6313,7 +6313,7 @@ void DreamGenContext::showNames() {
 	STACK_CHECK;
 	dx = data;
 	es = dx;
-	si = 1829+1;
+	si = 1823+1;
 	di = (60)+21;
 	bx = (52)+10;
 	cl = 0;
@@ -6694,7 +6694,7 @@ notalley:
 void DreamGenContext::clearBuffers() {
 	STACK_CHECK;
 	es = data.word(kBuffers);
-	cx = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4)+(256*30)+(6*64)+983-526+68-0)/2;
+	cx = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4)+(256*30)+(6*64)+977-520+68-0)/2;
 	ax = 0;
 	di = 0;
 	_stosw(cx, true);
@@ -6706,11 +6706,11 @@ void DreamGenContext::clearBuffers() {
 	es = data.word(kBuffers);
 	di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4)+(256*30)+(6*64));
 	ds = cs;
-	si = 526;
-	cx = (983-526);
+	si = 520;
+	cx = (977-520);
 	_movsb(cx, true);
 	es = data.word(kBuffers);
-	di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4)+(256*30)+(6*64)+983-526);
+	di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4)+(256*30)+(6*64)+977-520);
 	ds = cs;
 	si = 0;
 	cx = (68-0);
@@ -6728,11 +6728,11 @@ void DreamGenContext::clearChanges() {
 	ds = data.word(kBuffers);
 	si = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4)+(256*30)+(6*64));
 	es = cs;
-	di = 526;
-	cx = (983-526);
+	di = 520;
+	cx = (977-520);
 	_movsb(cx, true);
 	ds = data.word(kBuffers);
-	si = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4)+(256*30)+(6*64)+983-526);
+	si = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4)+(256*30)+(6*64)+977-520);
 	es = cs;
 	di = 0;
 	cx = (68-0);
@@ -6746,7 +6746,7 @@ void DreamGenContext::clearChanges() {
 	di = 0;
 	_stosw(cx, true);
 	es = cs;
-	di = 1661;
+	di = 1655;
 	al = 1;
 	_stosb(2);
 	al = 0;
@@ -7156,14 +7156,14 @@ void DreamGenContext::__start() {
 		//0x0090: .... .... .... ....
 		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
 		//0x00a0: .... .... .... ....
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 
+		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 
 		//0x00b0: .... .... .... ....
 		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
 		//0x00c0: .... .... .... ....
 		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
 		//0x00d0: .... .... .... ....
-		0x00, 0x00, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-		//0x00e0: ..   .... .... ....
+		0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+		//0x00e0:   .. .... .... ....
 		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
 		//0x00f0: .... .... .... ....
 		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
@@ -7176,175 +7176,175 @@ void DreamGenContext::__start() {
 		//0x0130: .... .... .... ....
 		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
 		//0x0140: .... .... .... ....
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 
 		//0x0150: .... .... .... ....
-		0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 
+		0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
 		//0x0160: .... .... .... ....
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x01, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+		0x00, 0x05, 0x01, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
 		//0x0170: .... .... .... ....
 		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
 		//0x0180: .... .... .... ....
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 
 		//0x0190: .... .... .... ....
-		0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
+		0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
 		//0x01a0: .... .... .... ....
 		0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
 		//0x01b0: .... .... .... ....
-		0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x17, 0x00, 
+		0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
 		//0x01c0: .... .... .... ....
 		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
 		//0x01d0: .... .... .... ....
 		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
 		//0x01e0: .... .... .... ....
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 
+		0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
 		//0x01f0: .... .... .... ....
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x01, 0x2c, 
-		//0x0200: .... .... .... ...,
-		0x00, 0x14, 0x00, 0x02, 0x00, 0x01, 0x01, 0x37, 0x00, 0x00, 0x00, 0x32, 0x14, 0x00, 0x18, 0x16, 
-		//0x0210: .... ...7 ...2 ....
-		0x00, 0x4a, 0x00, 0x01, 0x00, 0x00, 0x18, 0x21, 0x0a, 0x4b, 0x00, 0x01, 0x00, 0x01, 0x01, 0x2c, 
-		//0x0220: .J.. ...! .K.. ...,
-		0x00, 0x1b, 0x00, 0x02, 0x00, 0x02, 0x01, 0x2c, 0x00, 0x60, 0x00, 0x03, 0x00, 0x04, 0x01, 0x2c, 
-		//0x0230: .... ..., .`.. ...,
-		0x00, 0x76, 0x00, 0x02, 0x00, 0x05, 0x01, 0x2c, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x05, 0x16, 
-		//0x0240: .v.. ..., .... ....
-		0x14, 0x35, 0x00, 0x03, 0x00, 0x00, 0x05, 0x16, 0x14, 0x28, 0x00, 0x01, 0x00, 0x02, 0x05, 0x16, 
-		//0x0250: .5.. .... .(.. ....
-		0x14, 0x32, 0x00, 0x01, 0x00, 0x03, 0x02, 0x0b, 0x0a, 0xc0, 0x00, 0x01, 0x00, 0x00, 0x02, 0x0b, 
-		//0x0260: .2.. .... .... ....
-		0x0a, 0xb6, 0x00, 0x02, 0x00, 0x01, 0x08, 0x0b, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x01, 0x17, 0x00, 
-		//0x0270: .... .... .... ....
-		0x32, 0x00, 0x00, 0x03, 0x00, 0x00, 0x1c, 0x0b, 0x14, 0xfa, 0x00, 0x04, 0x00, 0x00, 0x17, 0x00, 
-		//0x0280: 2... .... .... ....
-		0x32, 0x2b, 0x00, 0x02, 0x00, 0x08, 0x17, 0x0b, 0x28, 0x82, 0x00, 0x02, 0x00, 0x01, 0x17, 0x16, 
-		//0x0290: 2+.. .... (... ....
-		0x28, 0x7a, 0x00, 0x02, 0x00, 0x02, 0x17, 0x16, 0x28, 0x69, 0x00, 0x02, 0x00, 0x03, 0x17, 0x16, 
-		//0x02a0: (z.. .... (i.. ....
-		0x28, 0x51, 0x00, 0x02, 0x00, 0x04, 0x17, 0x0b, 0x28, 0x87, 0x00, 0x02, 0x00, 0x05, 0x17, 0x16, 
-		//0x02b0: (Q.. .... (... ....
-		0x28, 0x91, 0x00, 0x02, 0x00, 0x06, 0x04, 0x16, 0x1e, 0x00, 0x00, 0x02, 0x00, 0x00, 0x2d, 0x16, 
-		//0x02c0: (... .... .... ..-.
-		0x1e, 0xc8, 0x00, 0x00, 0x00, 0x14, 0x2d, 0x16, 0x1e, 0x27, 0x00, 0x02, 0x00, 0x00, 0x2d, 0x16, 
-		//0x02d0: .... ..-. .'.. ..-.
-		0x1e, 0x19, 0x00, 0x02, 0x00, 0x00, 0x08, 0x16, 0x28, 0x20, 0x00, 0x02, 0x00, 0x00, 0x07, 0x0b, 
-		//0x02e0: .... .... ( .. ....
-		0x14, 0x40, 0x00, 0x02, 0x00, 0x00, 0x16, 0x16, 0x14, 0x52, 0x00, 0x02, 0x00, 0x00, 0x1b, 0x0b, 
-		//0x02f0: . at .. .... .R.. ....
-		0x1e, 0x00, 0x00, 0x02, 0x00, 0x00, 0x14, 0x00, 0x1e, 0x00, 0x00, 0x02, 0x00, 0x00, 0x0e, 0x21, 
-		//0x0300: .... .... .... ...!
-		0x28, 0x15, 0x00, 0x01, 0x00, 0x00, 0x1d, 0x0b, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x02, 0x16, 
-		//0x0310: (... .... .... ....
-		0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x19, 0x00, 0x32, 0x04, 0x00, 0x02, 0x00, 0x00, 0x32, 0x16, 
-		//0x0320: .... .... 2... ..2.
-		0x1e, 0x79, 0x00, 0x02, 0x00, 0x00, 0x32, 0x16, 0x1e, 0x00, 0x00, 0x14, 0x00, 0x00, 0x34, 0x16, 
-		//0x0330: .y.. ..2. .... ..4.
-		0x1e, 0xc0, 0x00, 0x02, 0x00, 0x00, 0x34, 0x16, 0x1e, 0xe9, 0x00, 0x02, 0x00, 0x00, 0x32, 0x16, 
-		//0x0340: .... ..4. .... ..2.
-		0x28, 0x68, 0x00, 0x37, 0x00, 0x00, 0x35, 0x21, 0x00, 0x63, 0x00, 0x02, 0x00, 0x00, 0x32, 0x16, 
-		//0x0350: (h.7 ..5! .c.. ..2.
-		0x28, 0x00, 0x00, 0x03, 0x00, 0x00, 0x32, 0x16, 0x1e, 0xa2, 0x00, 0x02, 0x00, 0x00, 0x34, 0x16, 
-		//0x0360: (... ..2. .... ..4.
-		0x1e, 0x39, 0x00, 0x02, 0x00, 0x00, 0x34, 0x16, 0x1e, 0x00, 0x00, 0x02, 0x00, 0x00, 0x36, 0x00, 
-		//0x0370: .9.. ..4. .... ..6.
-		0x00, 0x48, 0x00, 0x03, 0x00, 0x00, 0x37, 0x2c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x13, 0x00, 
-		//0x0380: .H.. ..7, .... ....
-		0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x0e, 0x16, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x0e, 0x16, 
-		//0x0390: .... .... .... ....
-		0x00, 0x2c, 0x01, 0x01, 0x00, 0x00, 0x0a, 0x16, 0x1e, 0xae, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x16, 
-		//0x03a0: .,.. .... .... ....
-		0x14, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0b, 0x0b, 0x14, 0x00, 0x00, 0x32, 0x14, 0x00, 0x0b, 0x0b, 
-		//0x03b0: .... .... ...2 ....
-		0x1e, 0x00, 0x00, 0x32, 0x14, 0x00, 0x0b, 0x16, 0x14, 0x00, 0x00, 0x32, 0x14, 0x00, 0x0e, 0x21, 
-		//0x03c0: ...2 .... ...2 ...!
-		0x28, 0x00, 0x00, 0x32, 0x14, 0x00, 0xff, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 
-		//0x03d0: (..2 ...D REAM WEB.
-		0x43, 0x30, 0x32, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x56, 0x39, 0x39, 
-		//0x03e0: C02. DREA MWEB .V99
-		0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x47, 0x31, 0x34, 0x00, 0x44, 0x52, 
-		//0x03f0: .DRE AMWE B.G1 4.DR
-		0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x54, 0x35, 0x31, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 
-		//0x0400: EAMW EB.T 51.D REAM
-		0x57, 0x45, 0x42, 0x2e, 0x54, 0x38, 0x33, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 
-		//0x0410: WEB. T83. DREA MWEB
-		0x2e, 0x56, 0x4f, 0x4c, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x47, 0x31, 
-		//0x0420: .VOL .DRE AMWE B.G1
-		0x33, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x47, 0x31, 0x35, 0x00, 0x44, 
-		//0x0430: 3.DR EAMW EB.G 15.D
-		0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x49, 0x30, 0x37, 0x00, 0x00, 0x01, 0x11, 0x01, 
-		//0x0440: REAM WEB. I07. ....
-		0x40, 0x01, 0x9d, 0x00, 0xc6, 0x00, 0x7c, 0xc4, 0xf0, 0x00, 0x22, 0x01, 0x02, 0x00, 0x2c, 0x00, 
-		//0x0450: @... ..|. ..". ..,.
-		0x94, 0xc4, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xc8, 0x00, 0xa0, 0xca, 0xff, 0xff, 0x11, 0x01, 
-		//0x0460: .... @... .... ....
-		0x40, 0x01, 0x9d, 0x00, 0xc6, 0x00, 0x7c, 0xc4, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xc8, 0x00, 
-		//0x0470: @... ..|. .. at . ....
-		0xa0, 0xca, 0xff, 0xff, 0x45, 0x58, 0x49, 0x54, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x48, 0x45, 
-		//0x0480: .... EXIT        HE
-		0x4c, 0x50, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x4c, 0x49, 0x53, 0x54, 0x20, 0x20, 0x20, 0x20, 
-		//0x0490: LP        LIST     
-		0x20, 0x20, 0x52, 0x45, 0x41, 0x44, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x4c, 0x4f, 0x47, 0x4f, 
-		//0x04a0:   RE AD        LOGO
-		0x4e, 0x20, 0x20, 0x20, 0x20, 0x20, 0x4b, 0x45, 0x59, 0x53, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
-		//0x04b0: N      KE YS       
-		0x01, 0x00, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x50, 0x55, 
-		//0x04c0: ..PU BLIC        PU
-		0x42, 0x4c, 0x49, 0x43, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x42, 0x4c, 0x41, 0x43, 
-		//0x04d0: BLIC       ... BLAC
-		0x4b, 0x44, 0x52, 0x41, 0x47, 0x4f, 0x4e, 0x20, 0x52, 0x59, 0x41, 0x4e, 0x20, 0x20, 0x20, 0x20, 
-		//0x04e0: KDRA GON  RYAN     
-		0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x48, 0x45, 0x4e, 0x44, 0x52, 0x49, 0x58, 0x20, 0x20, 0x20, 
-		//0x04f0:    . ..HE NDRI X   
-		0x20, 0x20, 0x4c, 0x4f, 0x55, 0x49, 0x53, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 
-		//0x0500:   LO UIS        ...
-		0x53, 0x45, 0x50, 0x54, 0x49, 0x4d, 0x55, 0x53, 0x20, 0x20, 0x20, 0x20, 0x42, 0x45, 0x43, 0x4b, 
-		//0x0510: SEPT IMUS      BECK
-		0x45, 0x54, 0x54, 0x20, 0x20, 0x20, 0x20, 0x00, 0xff, 0xff, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
-		//0x0520: ETT     . ..       
-		0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x22, 0x52, 0x4f, 0x4f, 0x54, 0x20, 0x20, 0x20, 
-		//0x0530:         . "ROO T   
-		0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x22, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
-		//0x0540:       ."           
-		0x20, 0x20, 0x20, 0x00, 0x30, 0x30, 0x30, 0x30, 0x00, 0x30, 0x30, 0x00, 0xba, 0x00, 0xca, 0x00, 
-		//0x0550:    . 0000 .00. ....
-		0x9d, 0x00, 0xad, 0x00, 0x1c, 0xc8, 0xf3, 0x00, 0x03, 0x01, 0x83, 0x00, 0x93, 0x00, 0x18, 0xc8, 
+		0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x01, 0x2c, 0x00, 0x14, 0x00, 0x02, 0x00, 0x01, 
+		//0x0200: .... .... .,.. ....
+		0x01, 0x37, 0x00, 0x00, 0x00, 0x32, 0x14, 0x00, 0x18, 0x16, 0x00, 0x4a, 0x00, 0x01, 0x00, 0x00, 
+		//0x0210: .7.. .2.. ...J ....
+		0x18, 0x21, 0x0a, 0x4b, 0x00, 0x01, 0x00, 0x01, 0x01, 0x2c, 0x00, 0x1b, 0x00, 0x02, 0x00, 0x02, 
+		//0x0220: .!.K .... .,.. ....
+		0x01, 0x2c, 0x00, 0x60, 0x00, 0x03, 0x00, 0x04, 0x01, 0x2c, 0x00, 0x76, 0x00, 0x02, 0x00, 0x05, 
+		//0x0230: .,.` .... .,.v ....
+		0x01, 0x2c, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x05, 0x16, 0x14, 0x35, 0x00, 0x03, 0x00, 0x00, 
+		//0x0240: .,.. .... ...5 ....
+		0x05, 0x16, 0x14, 0x28, 0x00, 0x01, 0x00, 0x02, 0x05, 0x16, 0x14, 0x32, 0x00, 0x01, 0x00, 0x03, 
+		//0x0250: ...( .... ...2 ....
+		0x02, 0x0b, 0x0a, 0xc0, 0x00, 0x01, 0x00, 0x00, 0x02, 0x0b, 0x0a, 0xb6, 0x00, 0x02, 0x00, 0x01, 
+		//0x0260: .... .... .... ....
+		0x08, 0x0b, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x01, 0x17, 0x00, 0x32, 0x00, 0x00, 0x03, 0x00, 0x00, 
+		//0x0270: .... .... ..2. ....
+		0x1c, 0x0b, 0x14, 0xfa, 0x00, 0x04, 0x00, 0x00, 0x17, 0x00, 0x32, 0x2b, 0x00, 0x02, 0x00, 0x08, 
+		//0x0280: .... .... ..2+ ....
+		0x17, 0x0b, 0x28, 0x82, 0x00, 0x02, 0x00, 0x01, 0x17, 0x16, 0x28, 0x7a, 0x00, 0x02, 0x00, 0x02, 
+		//0x0290: ..(. .... ..(z ....
+		0x17, 0x16, 0x28, 0x69, 0x00, 0x02, 0x00, 0x03, 0x17, 0x16, 0x28, 0x51, 0x00, 0x02, 0x00, 0x04, 
+		//0x02a0: ..(i .... ..(Q ....
+		0x17, 0x0b, 0x28, 0x87, 0x00, 0x02, 0x00, 0x05, 0x17, 0x16, 0x28, 0x91, 0x00, 0x02, 0x00, 0x06, 
+		//0x02b0: ..(. .... ..(. ....
+		0x04, 0x16, 0x1e, 0x00, 0x00, 0x02, 0x00, 0x00, 0x2d, 0x16, 0x1e, 0xc8, 0x00, 0x00, 0x00, 0x14, 
+		//0x02c0: .... .... -... ....
+		0x2d, 0x16, 0x1e, 0x27, 0x00, 0x02, 0x00, 0x00, 0x2d, 0x16, 0x1e, 0x19, 0x00, 0x02, 0x00, 0x00, 
+		//0x02d0: -..' .... -... ....
+		0x08, 0x16, 0x28, 0x20, 0x00, 0x02, 0x00, 0x00, 0x07, 0x0b, 0x14, 0x40, 0x00, 0x02, 0x00, 0x00, 
+		//0x02e0: ..(  .... ...@ ....
+		0x16, 0x16, 0x14, 0x52, 0x00, 0x02, 0x00, 0x00, 0x1b, 0x0b, 0x1e, 0x00, 0x00, 0x02, 0x00, 0x00, 
+		//0x02f0: ...R .... .... ....
+		0x14, 0x00, 0x1e, 0x00, 0x00, 0x02, 0x00, 0x00, 0x0e, 0x21, 0x28, 0x15, 0x00, 0x01, 0x00, 0x00, 
+		//0x0300: .... .... .!(. ....
+		0x1d, 0x0b, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x02, 0x16, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 
+		//0x0310: .... .... .... ....
+		0x19, 0x00, 0x32, 0x04, 0x00, 0x02, 0x00, 0x00, 0x32, 0x16, 0x1e, 0x79, 0x00, 0x02, 0x00, 0x00, 
+		//0x0320: ..2. .... 2..y ....
+		0x32, 0x16, 0x1e, 0x00, 0x00, 0x14, 0x00, 0x00, 0x34, 0x16, 0x1e, 0xc0, 0x00, 0x02, 0x00, 0x00, 
+		//0x0330: 2... .... 4... ....
+		0x34, 0x16, 0x1e, 0xe9, 0x00, 0x02, 0x00, 0x00, 0x32, 0x16, 0x28, 0x68, 0x00, 0x37, 0x00, 0x00, 
+		//0x0340: 4... .... 2.(h .7..
+		0x35, 0x21, 0x00, 0x63, 0x00, 0x02, 0x00, 0x00, 0x32, 0x16, 0x28, 0x00, 0x00, 0x03, 0x00, 0x00, 
+		//0x0350: 5!.c .... 2.(. ....
+		0x32, 0x16, 0x1e, 0xa2, 0x00, 0x02, 0x00, 0x00, 0x34, 0x16, 0x1e, 0x39, 0x00, 0x02, 0x00, 0x00, 
+		//0x0360: 2... .... 4..9 ....
+		0x34, 0x16, 0x1e, 0x00, 0x00, 0x02, 0x00, 0x00, 0x36, 0x00, 0x00, 0x48, 0x00, 0x03, 0x00, 0x00, 
+		//0x0370: 4... .... 6..H ....
+		0x37, 0x2c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 
+		//0x0380: 7,.. .... .... ....
+		0x0e, 0x16, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x0e, 0x16, 0x00, 0x2c, 0x01, 0x01, 0x00, 0x00, 
+		//0x0390: .... .... ..., ....
+		0x0a, 0x16, 0x1e, 0xae, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x16, 0x14, 0x00, 0x00, 0x01, 0x00, 0x00, 
+		//0x03a0: .... .... .... ....
+		0x0b, 0x0b, 0x14, 0x00, 0x00, 0x32, 0x14, 0x00, 0x0b, 0x0b, 0x1e, 0x00, 0x00, 0x32, 0x14, 0x00, 
+		//0x03b0: .... .2.. .... .2..
+		0x0b, 0x16, 0x14, 0x00, 0x00, 0x32, 0x14, 0x00, 0x0e, 0x21, 0x28, 0x00, 0x00, 0x32, 0x14, 0x00, 
+		//0x03c0: .... .2.. .!(. .2..
+		0xff, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x43, 0x30, 0x32, 0x00, 0x44, 0x52, 
+		//0x03d0: .DRE AMWE B.C0 2.DR
+		0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x56, 0x39, 0x39, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 
+		//0x03e0: EAMW EB.V 99.D REAM
+		0x57, 0x45, 0x42, 0x2e, 0x47, 0x31, 0x34, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 
+		//0x03f0: WEB. G14. DREA MWEB
+		0x2e, 0x54, 0x35, 0x31, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x54, 0x38, 
+		//0x0400: .T51 .DRE AMWE B.T8
+		0x33, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x56, 0x4f, 0x4c, 0x00, 0x44, 
+		//0x0410: 3.DR EAMW EB.V OL.D
+		0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x47, 0x31, 0x33, 0x00, 0x44, 0x52, 0x45, 0x41, 
+		//0x0420: REAM WEB. G13. DREA
+		0x4d, 0x57, 0x45, 0x42, 0x2e, 0x47, 0x31, 0x35, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 
+		//0x0430: MWEB .G15 .DRE AMWE
+		0x42, 0x2e, 0x49, 0x30, 0x37, 0x00, 0x00, 0x01, 0x11, 0x01, 0x40, 0x01, 0x9d, 0x00, 0xc6, 0x00, 
+		//0x0440: B.I0 7... .. at . ....
+		0x7c, 0xc4, 0xf0, 0x00, 0x22, 0x01, 0x02, 0x00, 0x2c, 0x00, 0x94, 0xc4, 0x00, 0x00, 0x40, 0x01, 
+		//0x0450: |... "... ,... .. at .
+		0x00, 0x00, 0xc8, 0x00, 0xa0, 0xca, 0xff, 0xff, 0x11, 0x01, 0x40, 0x01, 0x9d, 0x00, 0xc6, 0x00, 
+		//0x0460: .... .... .. at . ....
+		0x7c, 0xc4, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xc8, 0x00, 0xa0, 0xca, 0xff, 0xff, 0x45, 0x58, 
+		//0x0470: |... @... .... ..EX
+		0x49, 0x54, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x48, 0x45, 0x4c, 0x50, 0x20, 0x20, 0x20, 0x20, 
+		//0x0480: IT        HELP     
+		0x20, 0x20, 0x4c, 0x49, 0x53, 0x54, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x52, 0x45, 0x41, 0x44, 
+		//0x0490:   LI ST        READ
+		0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x4c, 0x4f, 0x47, 0x4f, 0x4e, 0x20, 0x20, 0x20, 0x20, 0x20, 
+		//0x04a0:        LO GON      
+		0x4b, 0x45, 0x59, 0x53, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x01, 0x00, 0x50, 0x55, 0x42, 0x4c, 
+		//0x04b0: KEYS        .. PUBL
+		0x49, 0x43, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x20, 0x20, 
+		//0x04c0: IC        PUBL IC  
+		0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x42, 0x4c, 0x41, 0x43, 0x4b, 0x44, 0x52, 0x41, 0x47, 0x4f, 
+		//0x04d0:    . ..BL ACKD RAGO
+		0x4e, 0x20, 0x52, 0x59, 0x41, 0x4e, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 
+		//0x04e0: N RY AN         ...
+		0x48, 0x45, 0x4e, 0x44, 0x52, 0x49, 0x58, 0x20, 0x20, 0x20, 0x20, 0x20, 0x4c, 0x4f, 0x55, 0x49, 
+		//0x04f0: HEND RIX       LOUI
+		0x53, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x53, 0x45, 0x50, 0x54, 0x49, 0x4d, 
+		//0x0500: S       . ..SE PTIM
+		0x55, 0x53, 0x20, 0x20, 0x20, 0x20, 0x42, 0x45, 0x43, 0x4b, 0x45, 0x54, 0x54, 0x20, 0x20, 0x20, 
+		//0x0510: US     BE CKET T   
+		0x20, 0x00, 0xff, 0xff, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+		//0x0520:  ...               
+		0x20, 0x00, 0x22, 0x52, 0x4f, 0x4f, 0x54, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 
+		//0x0530:  ."R OOT          .
+		0x22, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x30, 0x30, 
+		//0x0540: "               .00
+		0x30, 0x30, 0x00, 0x30, 0x30, 0x00, 0xba, 0x00, 0xca, 0x00, 0x9d, 0x00, 0xad, 0x00, 0x1c, 0xc8, 
+		//0x0550: 00.0 0... .... ....
+		0xf3, 0x00, 0x03, 0x01, 0x83, 0x00, 0x93, 0x00, 0x18, 0xc8, 0x0c, 0x01, 0x1c, 0x01, 0xa8, 0x00, 
 		//0x0560: .... .... .... ....
-		0x0c, 0x01, 0x1c, 0x01, 0xa8, 0x00, 0xb8, 0x00, 0x50, 0xc7, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 
-		//0x0570: .... .... P... @...
-		0xc8, 0x00, 0xa0, 0xca, 0xff, 0xff, 0x77, 0x00, 0xae, 0x00, 0x52, 0x00, 0x80, 0x00, 0x34, 0xc8, 
-		//0x0580: .... ..w. ..R. ..4.
-		0x46, 0x00, 0x89, 0x00, 0x3e, 0x00, 0x6f, 0x00, 0x80, 0xc8, 0xbc, 0x00, 0xfa, 0x00, 0x44, 0x00, 
-		//0x0590: F... >.o. .... ..D.
-		0x98, 0x00, 0x4c, 0xc8, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xc8, 0x00, 0xa0, 0xca, 0xff, 0xff, 
-		//0x05a0: ..L. .. at . .... ....
-		0x77, 0x00, 0xae, 0x00, 0x52, 0x00, 0x80, 0x00, 0x44, 0xc8, 0x46, 0x00, 0x8b, 0x00, 0x3e, 0x00, 
-		//0x05b0: w... R... D.F. ..>.
-		0x6f, 0x00, 0x50, 0xc8, 0xec, 0x00, 0xfc, 0x00, 0x70, 0x00, 0x80, 0x00, 0x48, 0xc8, 0x00, 0x00, 
-		//0x05c0: o.P. .... p... H...
-		0x40, 0x01, 0x00, 0x00, 0xc8, 0x00, 0xa0, 0xca, 0xff, 0xff, 0x0d, 0x0a, 0x0d, 0x0a, 0x24, 0x81, 
-		//0x05d0: @... .... .... ..$.
-		0x00, 0xb8, 0x00, 0x52, 0x00, 0x80, 0x00, 0xc0, 0xc8, 0x50, 0x00, 0x93, 0x00, 0x3e, 0x00, 0x6f, 
-		//0x05e0: ...R .... .P.. .>.o
-		0x00, 0x80, 0xc8, 0xb7, 0x00, 0xfa, 0x00, 0x3e, 0x00, 0x6f, 0x00, 0xc4, 0xc8, 0x00, 0x00, 0x40, 
-		//0x05f0: .... ...> .o.. ...@
-		0x01, 0x00, 0x00, 0xc8, 0x00, 0xa0, 0xca, 0xff, 0xff, 0x53, 0x50, 0x45, 0x45, 0x43, 0x48, 0x52, 
-		//0x0600: .... .... .SPE ECHR
-		0x32, 0x34, 0x43, 0x30, 0x30, 0x30, 0x35, 0x2e, 0x52, 0x41, 0x57, 0x00, 0x4f, 0x42, 0x4a, 0x45, 
-		//0x0610: 24C0 005. RAW. OBJE
-		0x43, 0x54, 0x20, 0x4e, 0x41, 0x4d, 0x45, 0x20, 0x4f, 0x4e, 0x45, 0x20, 0x20, 0x20, 0x20, 0x20, 
-		//0x0620: CT N AME  ONE      
-		0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
-		//0x0630:                    
-		0x20, 0x20, 0x20, 0x20, 0x00, 0x10, 0x12, 0x12, 0x11, 0x10, 0x10, 0x10, 0x01, 0x01, 0x01, 0x01, 
-		//0x0640:      .... .... ....
-		0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x44, 0x3a, 0x00, 
-		//0x0650: .... .... .... .D:.
+		0xb8, 0x00, 0x50, 0xc7, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xc8, 0x00, 0xa0, 0xca, 0xff, 0xff, 
+		//0x0570: ..P. .. at . .... ....
+		0x77, 0x00, 0xae, 0x00, 0x52, 0x00, 0x80, 0x00, 0x34, 0xc8, 0x46, 0x00, 0x89, 0x00, 0x3e, 0x00, 
+		//0x0580: w... R... 4.F. ..>.
+		0x6f, 0x00, 0x80, 0xc8, 0xbc, 0x00, 0xfa, 0x00, 0x44, 0x00, 0x98, 0x00, 0x4c, 0xc8, 0x00, 0x00, 
+		//0x0590: o... .... D... L...
+		0x40, 0x01, 0x00, 0x00, 0xc8, 0x00, 0xa0, 0xca, 0xff, 0xff, 0x77, 0x00, 0xae, 0x00, 0x52, 0x00, 
+		//0x05a0: @... .... ..w. ..R.
+		0x80, 0x00, 0x44, 0xc8, 0x46, 0x00, 0x8b, 0x00, 0x3e, 0x00, 0x6f, 0x00, 0x50, 0xc8, 0xec, 0x00, 
+		//0x05b0: ..D. F... >.o. P...
+		0xfc, 0x00, 0x70, 0x00, 0x80, 0x00, 0x48, 0xc8, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xc8, 0x00, 
+		//0x05c0: ..p. ..H. .. at . ....
+		0xa0, 0xca, 0xff, 0xff, 0x0d, 0x0a, 0x0d, 0x0a, 0x24, 0x81, 0x00, 0xb8, 0x00, 0x52, 0x00, 0x80, 
+		//0x05d0: .... .... $... .R..
+		0x00, 0xc0, 0xc8, 0x50, 0x00, 0x93, 0x00, 0x3e, 0x00, 0x6f, 0x00, 0x80, 0xc8, 0xb7, 0x00, 0xfa, 
+		//0x05e0: ...P ...> .o.. ....
+		0x00, 0x3e, 0x00, 0x6f, 0x00, 0xc4, 0xc8, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xc8, 0x00, 0xa0, 
+		//0x05f0: .>.o .... . at .. ....
+		0xca, 0xff, 0xff, 0x53, 0x50, 0x45, 0x45, 0x43, 0x48, 0x52, 0x32, 0x34, 0x43, 0x30, 0x30, 0x30, 
+		//0x0600: ...S PEEC HR24 C000
+		0x35, 0x2e, 0x52, 0x41, 0x57, 0x00, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x20, 0x4e, 0x41, 0x4d, 
+		//0x0610: 5.RA W.OB JECT  NAM
+		0x45, 0x20, 0x4f, 0x4e, 0x45, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+		//0x0620: E ON E             
+		0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x10, 
+		//0x0630:                  ..
+		0x12, 0x12, 0x11, 0x10, 0x10, 0x10, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 
+		//0x0640: .... .... .... ....
+		0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x44, 0x3a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+		//0x0650: .... ...D :... ....
 		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
 		//0x0660: .... .... .... ....
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 
+		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 
 		//0x0670: .... .... .... ....
-		0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 
+		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x02, 0x04, 0x01, 0x0a, 0x09, 0x08, 
 		//0x0680: .... .... .... ....
-		0x02, 0x04, 0x01, 0x0a, 0x09, 0x08, 0x06, 0x0b, 0x04, 0x07, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 
+		0x06, 0x0b, 0x04, 0x07, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
 		//0x0690: .... .... .... ....
 		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
 		//0x06a0: .... .... .... ....
@@ -7360,23 +7360,23 @@ void DreamGenContext::__start() {
 		//0x06f0: .... .... .... ....
 		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
 		//0x0700: .... .... .... ....
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 
+		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x02, 
 		//0x0710: .... .... .... ....
-		0xff, 0xff, 0xff, 0xff, 0xff, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 
+		0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 
 		//0x0720: .... .... .... ....
-		0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 
+		0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 
 		//0x0730: .... .... .... ....
-		0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 
+		0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 
 		//0x0740: .... .... .... ....
-		0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 
+		0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 
 		//0x0750: .... .... .... ....
-		0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 
+		0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 
 		//0x0760: .... .... .... ....
-		0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 
+		0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 
 		//0x0770: .... .... .... ....
-		0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 
+		0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 
 		//0x0780: .... .... .... ....
-		0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, };
+		0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, };
 	ds.assign(src, src + sizeof(src));
 	dreamweb(); 
 }
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index b8aecee..fa7fa79 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -32,21 +32,21 @@
 
 namespace DreamGen {
 
-static const uint16 offset_speechfile = 0x060f;
-static const uint16 offset_operand1 = 0x052a;
-static const uint16 offset_comlist = 0x0484;
-static const uint16 offset_money2poke = 0x0559;
-static const uint16 offset_discopslist = 0x05b0;
-static const uint16 offset_openchangesize = 0x044c;
-static const uint16 offset_keys = 0x04c0;
-static const uint16 offset_diarylist = 0x055c;
-static const uint16 offset_quitlist = 0x046e;
-static const uint16 offset_rootdir = 0x0538;
-static const uint16 offset_decidelist = 0x05df;
-static const uint16 offset_money1poke = 0x0554;
-static const uint16 offset_commandline = 0x061c;
-static const uint16 offset_opslist = 0x0586;
-static const uint16 offset_talklist = 0x044e;
+static const uint16 offset_money1poke = 0x054e;
+static const uint16 offset_talklist = 0x0448;
+static const uint16 offset_decidelist = 0x05d9;
+static const uint16 offset_discopslist = 0x05aa;
+static const uint16 offset_openchangesize = 0x0446;
+static const uint16 offset_operand1 = 0x0524;
+static const uint16 offset_speechfile = 0x0609;
+static const uint16 offset_comlist = 0x047e;
+static const uint16 offset_opslist = 0x0580;
+static const uint16 offset_diarylist = 0x0556;
+static const uint16 offset_rootdir = 0x0532;
+static const uint16 offset_money2poke = 0x0553;
+static const uint16 offset_commandline = 0x0616;
+static const uint16 offset_keys = 0x04ba;
+static const uint16 offset_quitlist = 0x0468;
 static const uint16 kStartvars = 0;
 static const uint16 kProgresspoints = 1;
 static const uint16 kWatchon = 2;
@@ -174,272 +174,269 @@ static const uint16 kFlagx = 154;
 static const uint16 kFlagy = 155;
 static const uint16 kCurrentex = 156;
 static const uint16 kCurrentfree = 157;
-static const uint16 kCurrentframe = 158;
-static const uint16 kFramesad = 160;
-static const uint16 kDataad = 162;
-static const uint16 kFrsegment = 164;
-static const uint16 kObjectx = 166;
-static const uint16 kObjecty = 168;
-static const uint16 kOffsetx = 170;
-static const uint16 kOffsety = 172;
-static const uint16 kSavesize = 174;
-static const uint16 kSavesource = 176;
-static const uint16 kSavex = 178;
-static const uint16 kSavey = 179;
-static const uint16 kCurrentob = 180;
-static const uint16 kPrioritydep = 181;
-static const uint16 kDestpos = 182;
-static const uint16 kReallocation = 183;
-static const uint16 kRoomnum = 184;
-static const uint16 kNowinnewroom = 185;
-static const uint16 kResetmanxy = 186;
-static const uint16 kNewlocation = 187;
-static const uint16 kAutolocation = 188;
-static const uint16 kMustload = 189;
-static const uint16 kAnswered = 190;
-static const uint16 kSaidno = 191;
-static const uint16 kDoorcheck1 = 192;
-static const uint16 kDoorcheck2 = 193;
-static const uint16 kDoorcheck3 = 194;
-static const uint16 kDoorcheck4 = 195;
-static const uint16 kMousex = 196;
-static const uint16 kMousey = 198;
-static const uint16 kMousebutton = 200;
-static const uint16 kMousebutton1 = 202;
-static const uint16 kMousebutton2 = 204;
-static const uint16 kMousebutton3 = 206;
-static const uint16 kMousebutton4 = 208;
-static const uint16 kOldbutton = 210;
-static const uint16 kOldx = 212;
-static const uint16 kOldy = 214;
-static const uint16 kLastbutton = 216;
-static const uint16 kOldpointerx = 218;
-static const uint16 kOldpointery = 220;
-static const uint16 kDelherex = 222;
-static const uint16 kDelherey = 224;
-static const uint16 kPointerxs = 226;
-static const uint16 kPointerys = 227;
-static const uint16 kDelxs = 228;
-static const uint16 kDelys = 229;
-static const uint16 kPointerframe = 230;
-static const uint16 kPointerpower = 231;
-static const uint16 kAuxpointerframe = 232;
-static const uint16 kPointermode = 233;
-static const uint16 kPointerspeed = 234;
-static const uint16 kPointercount = 235;
-static const uint16 kInmaparea = 236;
-static const uint16 kReelpointer = 237;
-static const uint16 kSlotdata = 239;
-static const uint16 kThisslot = 240;
-static const uint16 kSlotflags = 241;
-static const uint16 kTakeoff = 242;
-static const uint16 kTalkmode = 244;
-static const uint16 kTalkpos = 245;
-static const uint16 kCharacter = 246;
-static const uint16 kPersondata = 247;
-static const uint16 kTalknum = 249;
-static const uint16 kNumberinroom = 250;
-static const uint16 kCurrentcel = 251;
-static const uint16 kOldselection = 252;
-static const uint16 kStopwalking = 253;
-static const uint16 kMouseon = 254;
-static const uint16 kPlayed = 255;
-static const uint16 kTimer1 = 257;
-static const uint16 kTimer2 = 258;
-static const uint16 kTimer3 = 259;
-static const uint16 kWholetimer = 260;
-static const uint16 kTimer1to = 262;
-static const uint16 kTimer2to = 263;
-static const uint16 kTimer3to = 264;
-static const uint16 kWatchdump = 265;
-static const uint16 kLogonum = 266;
-static const uint16 kOldlogonum = 267;
-static const uint16 kNewlogonum = 268;
-static const uint16 kNetseg = 269;
-static const uint16 kNetpoint = 271;
-static const uint16 kKeynum = 273;
-static const uint16 kCursorstate = 274;
-static const uint16 kPressed = 275;
-static const uint16 kPresspointer = 276;
-static const uint16 kGraphicpress = 278;
-static const uint16 kPresscount = 279;
-static const uint16 kKeypadax = 280;
-static const uint16 kKeypadcx = 282;
-static const uint16 kLightcount = 284;
-static const uint16 kFolderpage = 285;
-static const uint16 kDiarypage = 286;
-static const uint16 kMenucount = 287;
-static const uint16 kSymboltopx = 288;
-static const uint16 kSymboltopnum = 289;
-static const uint16 kSymboltopdir = 290;
-static const uint16 kSymbolbotx = 291;
-static const uint16 kSymbolbotnum = 292;
-static const uint16 kSymbolbotdir = 293;
-static const uint16 kSymboltolight = 294;
-static const uint16 kSymbol1 = 295;
-static const uint16 kSymbol2 = 296;
-static const uint16 kSymbol3 = 297;
-static const uint16 kSymbolnum = 298;
-static const uint16 kDumpx = 299;
-static const uint16 kDumpy = 301;
-static const uint16 kWalkandexam = 303;
-static const uint16 kWalkexamtype = 304;
-static const uint16 kWalkexamnum = 305;
-static const uint16 kCursloc = 306;
-static const uint16 kCurslocx = 308;
-static const uint16 kCurslocy = 310;
-static const uint16 kCurpos = 312;
-static const uint16 kMonadx = 314;
-static const uint16 kMonady = 316;
-static const uint16 kGotfrom = 318;
-static const uint16 kMonsource = 320;
-static const uint16 kNumtodo = 322;
-static const uint16 kTimecount = 324;
-static const uint16 kCounttotimed = 326;
-static const uint16 kTimedseg = 328;
-static const uint16 kTimedoffset = 330;
-static const uint16 kTimedy = 332;
-static const uint16 kTimedx = 333;
-static const uint16 kNeedtodumptimed = 334;
-static const uint16 kHandle = 335;
-static const uint16 kLoadingorsave = 337;
-static const uint16 kCurrentslot = 338;
-static const uint16 kCursorpos = 339;
-static const uint16 kColourpos = 340;
-static const uint16 kFadedirection = 341;
-static const uint16 kNumtofade = 342;
-static const uint16 kFadecount = 343;
-static const uint16 kAddtogreen = 344;
-static const uint16 kAddtored = 345;
-static const uint16 kAddtoblue = 346;
-static const uint16 kLastsoundreel = 347;
-static const uint16 kSoundbuffer = 349;
-static const uint16 kSoundbufferad = 351;
-static const uint16 kSoundbufferpage = 353;
-static const uint16 kSoundtimes = 354;
-static const uint16 kNeedsoundbuff = 355;
-static const uint16 kOldint9seg = 356;
-static const uint16 kOldint9add = 358;
-static const uint16 kOldint8seg = 360;
-static const uint16 kOldint8add = 362;
-static const uint16 kOldsoundintseg = 364;
-static const uint16 kOldsoundintadd = 366;
-static const uint16 kSoundbaseadd = 368;
-static const uint16 kDsp_status = 370;
-static const uint16 kDsp_write = 372;
-static const uint16 kDmaaddress = 374;
-static const uint16 kSoundint = 375;
-static const uint16 kSounddmachannel = 376;
-static const uint16 kSampleplaying = 377;
-static const uint16 kTestresult = 378;
-static const uint16 kCurrentirq = 379;
-static const uint16 kSpeechloaded = 380;
-static const uint16 kSpeechlength = 381;
-static const uint16 kVolume = 383;
-static const uint16 kVolumeto = 384;
-static const uint16 kVolumedirection = 385;
-static const uint16 kVolumecount = 386;
-static const uint16 kPlayblock = 387;
-static const uint16 kWongame = 388;
-static const uint16 kLasthardkey = 389;
-static const uint16 kBufferin = 390;
-static const uint16 kBufferout = 392;
-static const uint16 kExtras = 394;
-static const uint16 kWorkspace = 396;
-static const uint16 kMapstore = 398;
-static const uint16 kCharset1 = 400;
-static const uint16 kBuffers = 402;
-static const uint16 kMainsprites = 404;
-static const uint16 kBackdrop = 406;
-static const uint16 kMapdata = 408;
-static const uint16 kSounddata = 410;
-static const uint16 kSounddata2 = 412;
-static const uint16 kRecordspace = 414;
-static const uint16 kFreedat = 416;
-static const uint16 kSetdat = 418;
-static const uint16 kReel1 = 420;
-static const uint16 kReel2 = 422;
-static const uint16 kReel3 = 424;
-static const uint16 kRoomdesc = 426;
-static const uint16 kFreedesc = 428;
-static const uint16 kSetdesc = 430;
-static const uint16 kBlockdesc = 432;
-static const uint16 kSetframes = 434;
-static const uint16 kFreeframes = 436;
-static const uint16 kPeople = 438;
-static const uint16 kReels = 440;
-static const uint16 kCommandtext = 442;
-static const uint16 kPuzzletext = 444;
-static const uint16 kTraveltext = 446;
-static const uint16 kTempgraphics = 448;
-static const uint16 kTempgraphics2 = 450;
-static const uint16 kTempgraphics3 = 452;
-static const uint16 kTempsprites = 454;
-static const uint16 kTextfile1 = 456;
-static const uint16 kTextfile2 = 458;
-static const uint16 kTextfile3 = 460;
-static const uint16 kBlinkframe = 462;
-static const uint16 kBlinkcount = 463;
-static const uint16 kReasseschanges = 464;
-static const uint16 kPointerspath = 465;
-static const uint16 kManspath = 466;
-static const uint16 kPointerfirstpath = 467;
-static const uint16 kFinaldest = 468;
-static const uint16 kDestination = 469;
-static const uint16 kLinestartx = 470;
-static const uint16 kLinestarty = 472;
-static const uint16 kLineendx = 474;
-static const uint16 kLineendy = 476;
-static const uint16 kIncrement1 = 478;
-static const uint16 kIncrement2 = 480;
-static const uint16 kLineroutine = 482;
-static const uint16 kLinepointer = 483;
-static const uint16 kLinedirection = 484;
-static const uint16 kLinelength = 485;
-static const uint16 kLiftsoundcount = 486;
-static const uint16 kEmmhandle = 487;
-static const uint16 kEmmpageframe = 489;
-static const uint16 kEmmhardwarepage = 491;
-static const uint16 kCh0emmpage = 492;
-static const uint16 kCh0offset = 494;
-static const uint16 kCh0blockstocopy = 496;
-static const uint16 kCh0playing = 498;
-static const uint16 kCh0repeat = 499;
-static const uint16 kCh0oldemmpage = 500;
-static const uint16 kCh0oldoffset = 502;
-static const uint16 kCh0oldblockstocopy = 504;
-static const uint16 kCh1playing = 506;
-static const uint16 kCh1emmpage = 507;
-static const uint16 kCh1offset = 509;
-static const uint16 kCh1blockstocopy = 511;
-static const uint16 kCh1blocksplayed = 513;
-static const uint16 kSoundbufferwrite = 515;
-static const uint16 kSoundemmpage = 517;
-static const uint16 kSpeechemmpage = 519;
-static const uint16 kCurrentsample = 521;
-static const uint16 kRoomssample = 522;
-static const uint16 kGameerror = 523;
-static const uint16 kHowmuchalloc = 524;
-static const uint16 kReelroutines = 526;
-static const uint16 kCharacterset3 = 983;
-static const uint16 kBasicsample = 996;
-static const uint16 kDiarygraphic = 1009;
-static const uint16 kDiarytext = 1022;
-static const uint16 kEndtextname = 1035;
-static const uint16 kVolumetabname = 1048;
-static const uint16 kGungraphic = 1061;
-static const uint16 kMonkface = 1074;
-static const uint16 kTitle7graphics = 1087;
-static const uint16 kCurrentfile = 1350;
-static const uint16 kRoomscango = 1661;
-static const uint16 kRoompics = 1677;
-static const uint16 kOplist = 1692;
-static const uint16 kInputline = 1695;
-static const uint16 kPresslist = 1823;
-static const uint16 kSavenames = 1829;
-static const uint16 kQuitrequested = 1948;
-static const uint16 kSubtitles = 1949;
-static const uint16 kForeignrelease = 1950;
+static const uint16 kFramesad = 158;
+static const uint16 kDataad = 160;
+static const uint16 kFrsegment = 162;
+static const uint16 kObjectx = 164;
+static const uint16 kObjecty = 166;
+static const uint16 kOffsetx = 168;
+static const uint16 kOffsety = 170;
+static const uint16 kSavesize = 172;
+static const uint16 kSavesource = 174;
+static const uint16 kSavex = 176;
+static const uint16 kSavey = 177;
+static const uint16 kCurrentob = 178;
+static const uint16 kPrioritydep = 179;
+static const uint16 kDestpos = 180;
+static const uint16 kReallocation = 181;
+static const uint16 kRoomnum = 182;
+static const uint16 kNowinnewroom = 183;
+static const uint16 kResetmanxy = 184;
+static const uint16 kNewlocation = 185;
+static const uint16 kAutolocation = 186;
+static const uint16 kMustload = 187;
+static const uint16 kAnswered = 188;
+static const uint16 kSaidno = 189;
+static const uint16 kDoorcheck1 = 190;
+static const uint16 kDoorcheck2 = 191;
+static const uint16 kDoorcheck3 = 192;
+static const uint16 kDoorcheck4 = 193;
+static const uint16 kMousex = 194;
+static const uint16 kMousey = 196;
+static const uint16 kMousebutton = 198;
+static const uint16 kMousebutton1 = 200;
+static const uint16 kMousebutton2 = 202;
+static const uint16 kMousebutton3 = 204;
+static const uint16 kMousebutton4 = 206;
+static const uint16 kOldbutton = 208;
+static const uint16 kOldx = 210;
+static const uint16 kOldy = 212;
+static const uint16 kLastbutton = 214;
+static const uint16 kOldpointerx = 216;
+static const uint16 kOldpointery = 218;
+static const uint16 kDelherex = 220;
+static const uint16 kDelherey = 222;
+static const uint16 kPointerxs = 224;
+static const uint16 kPointerys = 225;
+static const uint16 kDelxs = 226;
+static const uint16 kDelys = 227;
+static const uint16 kPointerframe = 228;
+static const uint16 kPointerpower = 229;
+static const uint16 kAuxpointerframe = 230;
+static const uint16 kPointermode = 231;
+static const uint16 kPointerspeed = 232;
+static const uint16 kPointercount = 233;
+static const uint16 kInmaparea = 234;
+static const uint16 kSlotdata = 235;
+static const uint16 kThisslot = 236;
+static const uint16 kSlotflags = 237;
+static const uint16 kTalkmode = 238;
+static const uint16 kTalkpos = 239;
+static const uint16 kCharacter = 240;
+static const uint16 kPersondata = 241;
+static const uint16 kTalknum = 243;
+static const uint16 kNumberinroom = 244;
+static const uint16 kCurrentcel = 245;
+static const uint16 kOldselection = 246;
+static const uint16 kStopwalking = 247;
+static const uint16 kMouseon = 248;
+static const uint16 kPlayed = 249;
+static const uint16 kTimer1 = 251;
+static const uint16 kTimer2 = 252;
+static const uint16 kTimer3 = 253;
+static const uint16 kWholetimer = 254;
+static const uint16 kTimer1to = 256;
+static const uint16 kTimer2to = 257;
+static const uint16 kTimer3to = 258;
+static const uint16 kWatchdump = 259;
+static const uint16 kLogonum = 260;
+static const uint16 kOldlogonum = 261;
+static const uint16 kNewlogonum = 262;
+static const uint16 kNetseg = 263;
+static const uint16 kNetpoint = 265;
+static const uint16 kKeynum = 267;
+static const uint16 kCursorstate = 268;
+static const uint16 kPressed = 269;
+static const uint16 kPresspointer = 270;
+static const uint16 kGraphicpress = 272;
+static const uint16 kPresscount = 273;
+static const uint16 kKeypadax = 274;
+static const uint16 kKeypadcx = 276;
+static const uint16 kLightcount = 278;
+static const uint16 kFolderpage = 279;
+static const uint16 kDiarypage = 280;
+static const uint16 kMenucount = 281;
+static const uint16 kSymboltopx = 282;
+static const uint16 kSymboltopnum = 283;
+static const uint16 kSymboltopdir = 284;
+static const uint16 kSymbolbotx = 285;
+static const uint16 kSymbolbotnum = 286;
+static const uint16 kSymbolbotdir = 287;
+static const uint16 kSymboltolight = 288;
+static const uint16 kSymbol1 = 289;
+static const uint16 kSymbol2 = 290;
+static const uint16 kSymbol3 = 291;
+static const uint16 kSymbolnum = 292;
+static const uint16 kDumpx = 293;
+static const uint16 kDumpy = 295;
+static const uint16 kWalkandexam = 297;
+static const uint16 kWalkexamtype = 298;
+static const uint16 kWalkexamnum = 299;
+static const uint16 kCursloc = 300;
+static const uint16 kCurslocx = 302;
+static const uint16 kCurslocy = 304;
+static const uint16 kCurpos = 306;
+static const uint16 kMonadx = 308;
+static const uint16 kMonady = 310;
+static const uint16 kGotfrom = 312;
+static const uint16 kMonsource = 314;
+static const uint16 kNumtodo = 316;
+static const uint16 kTimecount = 318;
+static const uint16 kCounttotimed = 320;
+static const uint16 kTimedseg = 322;
+static const uint16 kTimedoffset = 324;
+static const uint16 kTimedy = 326;
+static const uint16 kTimedx = 327;
+static const uint16 kNeedtodumptimed = 328;
+static const uint16 kHandle = 329;
+static const uint16 kLoadingorsave = 331;
+static const uint16 kCurrentslot = 332;
+static const uint16 kCursorpos = 333;
+static const uint16 kColourpos = 334;
+static const uint16 kFadedirection = 335;
+static const uint16 kNumtofade = 336;
+static const uint16 kFadecount = 337;
+static const uint16 kAddtogreen = 338;
+static const uint16 kAddtored = 339;
+static const uint16 kAddtoblue = 340;
+static const uint16 kLastsoundreel = 341;
+static const uint16 kSoundbuffer = 343;
+static const uint16 kSoundbufferad = 345;
+static const uint16 kSoundbufferpage = 347;
+static const uint16 kSoundtimes = 348;
+static const uint16 kNeedsoundbuff = 349;
+static const uint16 kOldint9seg = 350;
+static const uint16 kOldint9add = 352;
+static const uint16 kOldint8seg = 354;
+static const uint16 kOldint8add = 356;
+static const uint16 kOldsoundintseg = 358;
+static const uint16 kOldsoundintadd = 360;
+static const uint16 kSoundbaseadd = 362;
+static const uint16 kDsp_status = 364;
+static const uint16 kDsp_write = 366;
+static const uint16 kDmaaddress = 368;
+static const uint16 kSoundint = 369;
+static const uint16 kSounddmachannel = 370;
+static const uint16 kSampleplaying = 371;
+static const uint16 kTestresult = 372;
+static const uint16 kCurrentirq = 373;
+static const uint16 kSpeechloaded = 374;
+static const uint16 kSpeechlength = 375;
+static const uint16 kVolume = 377;
+static const uint16 kVolumeto = 378;
+static const uint16 kVolumedirection = 379;
+static const uint16 kVolumecount = 380;
+static const uint16 kPlayblock = 381;
+static const uint16 kWongame = 382;
+static const uint16 kLasthardkey = 383;
+static const uint16 kBufferin = 384;
+static const uint16 kBufferout = 386;
+static const uint16 kExtras = 388;
+static const uint16 kWorkspace = 390;
+static const uint16 kMapstore = 392;
+static const uint16 kCharset1 = 394;
+static const uint16 kBuffers = 396;
+static const uint16 kMainsprites = 398;
+static const uint16 kBackdrop = 400;
+static const uint16 kMapdata = 402;
+static const uint16 kSounddata = 404;
+static const uint16 kSounddata2 = 406;
+static const uint16 kRecordspace = 408;
+static const uint16 kFreedat = 410;
+static const uint16 kSetdat = 412;
+static const uint16 kReel1 = 414;
+static const uint16 kReel2 = 416;
+static const uint16 kReel3 = 418;
+static const uint16 kRoomdesc = 420;
+static const uint16 kFreedesc = 422;
+static const uint16 kSetdesc = 424;
+static const uint16 kBlockdesc = 426;
+static const uint16 kSetframes = 428;
+static const uint16 kFreeframes = 430;
+static const uint16 kPeople = 432;
+static const uint16 kReels = 434;
+static const uint16 kCommandtext = 436;
+static const uint16 kPuzzletext = 438;
+static const uint16 kTraveltext = 440;
+static const uint16 kTempgraphics = 442;
+static const uint16 kTempgraphics2 = 444;
+static const uint16 kTempgraphics3 = 446;
+static const uint16 kTempsprites = 448;
+static const uint16 kTextfile1 = 450;
+static const uint16 kTextfile2 = 452;
+static const uint16 kTextfile3 = 454;
+static const uint16 kBlinkframe = 456;
+static const uint16 kBlinkcount = 457;
+static const uint16 kReasseschanges = 458;
+static const uint16 kPointerspath = 459;
+static const uint16 kManspath = 460;
+static const uint16 kPointerfirstpath = 461;
+static const uint16 kFinaldest = 462;
+static const uint16 kDestination = 463;
+static const uint16 kLinestartx = 464;
+static const uint16 kLinestarty = 466;
+static const uint16 kLineendx = 468;
+static const uint16 kLineendy = 470;
+static const uint16 kIncrement1 = 472;
+static const uint16 kIncrement2 = 474;
+static const uint16 kLineroutine = 476;
+static const uint16 kLinepointer = 477;
+static const uint16 kLinedirection = 478;
+static const uint16 kLinelength = 479;
+static const uint16 kLiftsoundcount = 480;
+static const uint16 kEmmhandle = 481;
+static const uint16 kEmmpageframe = 483;
+static const uint16 kEmmhardwarepage = 485;
+static const uint16 kCh0emmpage = 486;
+static const uint16 kCh0offset = 488;
+static const uint16 kCh0blockstocopy = 490;
+static const uint16 kCh0playing = 492;
+static const uint16 kCh0repeat = 493;
+static const uint16 kCh0oldemmpage = 494;
+static const uint16 kCh0oldoffset = 496;
+static const uint16 kCh0oldblockstocopy = 498;
+static const uint16 kCh1playing = 500;
+static const uint16 kCh1emmpage = 501;
+static const uint16 kCh1offset = 503;
+static const uint16 kCh1blockstocopy = 505;
+static const uint16 kCh1blocksplayed = 507;
+static const uint16 kSoundbufferwrite = 509;
+static const uint16 kSoundemmpage = 511;
+static const uint16 kSpeechemmpage = 513;
+static const uint16 kCurrentsample = 515;
+static const uint16 kRoomssample = 516;
+static const uint16 kGameerror = 517;
+static const uint16 kHowmuchalloc = 518;
+static const uint16 kReelroutines = 520;
+static const uint16 kCharacterset3 = 977;
+static const uint16 kBasicsample = 990;
+static const uint16 kDiarygraphic = 1003;
+static const uint16 kDiarytext = 1016;
+static const uint16 kEndtextname = 1029;
+static const uint16 kVolumetabname = 1042;
+static const uint16 kGungraphic = 1055;
+static const uint16 kMonkface = 1068;
+static const uint16 kTitle7graphics = 1081;
+static const uint16 kCurrentfile = 1344;
+static const uint16 kRoomscango = 1655;
+static const uint16 kRoompics = 1671;
+static const uint16 kOplist = 1686;
+static const uint16 kInputline = 1689;
+static const uint16 kPresslist = 1817;
+static const uint16 kSavenames = 1823;
+static const uint16 kQuitrequested = 1942;
+static const uint16 kSubtitles = 1943;
+static const uint16 kForeignrelease = 1944;
 static const uint16 kBlocktextdat = (0);
 static const uint16 kPersonframes = (0);
 static const uint16 kDebuglevel1 = (0);
@@ -478,8 +475,8 @@ static const uint16 kListofchanges = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768
 static const uint16 kUndertimedtext = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4));
 static const uint16 kRainlist = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4)+(256*30));
 static const uint16 kInitialreelrouts = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4)+(256*30)+(6*64));
-static const uint16 kInitialvars = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4)+(256*30)+(6*64)+983-526);
-static const uint16 kLengthofbuffer = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4)+(256*30)+(6*64)+983-526+68-0);
+static const uint16 kInitialvars = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4)+(256*30)+(6*64)+977-520);
+static const uint16 kLengthofbuffer = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4)+(256*30)+(6*64)+977-520+68-0);
 static const uint16 kReellist = (0+(36*144));
 static const uint16 kIntext = (0+(38*2));
 static const uint16 kLengthofmap = (0+(66*60));
@@ -531,7 +528,7 @@ static const uint16 kZoomx = (8);
 static const uint16 kInventx = (80);
 static const uint16 kMenux = (80+40);
 static const uint16 kHeaderlen = (96);
-static const uint16 kLenofreelrouts = (983-526);
+static const uint16 kLenofreelrouts = (977-520);
 
 
 class DreamGenContext : public DreamBase, public Context {
diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp
index 992a080..b14cfc5 100644
--- a/engines/dreamweb/sprite.cpp
+++ b/engines/dreamweb/sprite.cpp
@@ -464,36 +464,33 @@ void DreamGenContext::faceRightWay() {
 	data.byte(kLeavedirection) = dir;
 }
 
-// Locate the reel segment (reel1, reel2, reel3) this frame is stored in.
-// The return value is a pointer to the start of the segment.
-// data.word(kCurrentframe) - data.word(kTakeoff) is the number of the frame
-// inside that segment
-Frame *DreamGenContext::findSource() {
-	uint16 currentFrame = data.word(kCurrentframe);
-	if (currentFrame < 160) {
-		data.word(kTakeoff) = 0;
-		return (Frame *)getSegment(data.word(kReel1)).ptr(0, 0);
-	} else if (currentFrame < 320) {
-		data.word(kTakeoff) = 160;
-		return (Frame *)getSegment(data.word(kReel2)).ptr(0, 0);
-	} else {
-		data.word(kTakeoff) = 320;
-		return (Frame *)getSegment(data.word(kReel3)).ptr(0, 0);
-	}
-}
-
 Reel *DreamBase::getReelStart(uint16 reelPointer) {
 	Reel *reel = (Reel *)getSegment(data.word(kReels)).ptr(kReellist + reelPointer * sizeof(Reel) * 8, sizeof(Reel));
 	return reel;
 }
 
-void DreamGenContext::showReelFrame(Reel *reel) {
+// Locate the reel segment (reel1, reel2, reel3) this frame is stored in,
+// and adjust the frame number relative to this segment.
+const Frame *DreamBase::findSource(uint16 &frame) {
+	uint16 base;
+	if (frame < 160) {
+		base = data.word(kReel1);
+	} else if (frame < 320) {
+		frame -= 160;
+		base = data.word(kReel2);
+	} else {
+		frame -= 320;
+		base = data.word(kReel3);
+	}
+	return (const Frame *)getSegment(base).ptr(0, (frame+1)*sizeof(Frame));
+}
+
+void DreamBase::showReelFrame(Reel *reel) {
 	uint16 x = reel->x + data.word(kMapadx);
 	uint16 y = reel->y + data.word(kMapady);
-	data.word(kCurrentframe) = reel->frame();
-	Frame *source = findSource();
-	uint16 frame = data.word(kCurrentframe) - data.word(kTakeoff);
-	showFrame(source, x, y, frame, 8);
+	uint16 frame = reel->frame();
+	const Frame *base = findSource(frame);
+	showFrame(base, x, y, frame, 8);
 }
 
 void DreamGenContext::showGameReel() {
@@ -508,11 +505,9 @@ void DreamGenContext::showGameReel(ReelRoutine *routine) {
 	routine->setReelPointer(reelPointer);
 }
 
-const Frame *DreamGenContext::getReelFrameAX(uint16 frame) {
-	data.word(kCurrentframe) = frame;
-	Frame *source = findSource();
-	uint16 offset = data.word(kCurrentframe) - data.word(kTakeoff);
-	return source + offset;
+const Frame *DreamBase::getReelFrameAX(uint16 frame) {
+	const Frame *base = findSource(frame);
+	return base + frame;
 }
 
 void DreamGenContext::showRain() {
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 3bbba77..80433c1 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -115,11 +115,8 @@
 	void wideDoor(Sprite *sprite, SetObject *objData);
 	void lockedDoorway(Sprite *sprite, SetObject *objData);
 	void liftSprite(Sprite *sprite, SetObject *objData);
-	Frame *findSource();
 	void showGameReel();
 	void showGameReel(ReelRoutine *routine);
-	void showReelFrame(Reel *reel);
-	const Frame *getReelFrameAX(uint16 frame);
 	void turnPathOn(uint8 param);
 	void turnPathOff(uint8 param);
 	void turnPathOn();
@@ -162,8 +159,8 @@
 	uint8 getMapAd(const uint8 *setData);
 	uint8 getXAd(const uint8 *setData, uint8 *result);
 	uint8 getYAd(const uint8 *setData, uint8 *result);
-	void calcFrFrame();
-	void calcFrFrame(uint8* width, uint8* height);
+	void calcFrFrame(uint16 frame);
+	void calcFrFrame(uint16 frame, uint8* width, uint8* height);
 	void finalFrame();
 	void finalFrame(uint16 *x, uint16 *y);
 	void showAllObs();
diff --git a/engines/dreamweb/talk.cpp b/engines/dreamweb/talk.cpp
index 42fc352..86d1b88 100644
--- a/engines/dreamweb/talk.cpp
+++ b/engines/dreamweb/talk.cpp
@@ -30,10 +30,9 @@ uint16 DreamGenContext::getPersFrame(uint8 index) {
 
 void DreamGenContext::convIcons() {
 	uint8 index = data.byte(kCharacter) & 127;
-	data.word(kCurrentframe) = getPersFrame(index);
-	Frame *frame = findSource();
-	uint16 frameNumber = (data.word(kCurrentframe) - data.word(kTakeoff)) & 0xff;
-	showFrame(frame, 234, 2, frameNumber, 0);
+	uint16 frame = getPersFrame(index);
+	const Frame *base = findSource(frame);
+	showFrame(base, 234, 2, frame, 0);
 }
 
 } // End of namespace DreamGen


Commit: 627d3f8d4128d07b01765132b8ee39ec7f30f2b6
    https://github.com/scummvm/scummvm/commit/627d3f8d4128d07b01765132b8ee39ec7f30f2b6
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2011-12-08T10:18:27-08:00

Commit Message:
DREAMWEB: Move functions to DreamBase

Changed paths:
    devtools/tasmrecover/tasm-recover
    engines/dreamweb/dreambase.h
    engines/dreamweb/dreamgen.cpp
    engines/dreamweb/dreamgen.h
    engines/dreamweb/monitor.cpp
    engines/dreamweb/print.cpp
    engines/dreamweb/stubs.cpp
    engines/dreamweb/stubs.h
    engines/dreamweb/use.cpp



diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index 56d7109..9a319b9 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -421,6 +421,8 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'loadtemptext',
 	'loadtraveltext',
 	'lockeddoorway',
+	'locklightoff',
+	'locklighton',
 	'lockmon',
 	'look',
 	'loopchannel0',
@@ -496,6 +498,7 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'pickupob',
 	'pitinterupt',
 	'pixelcheckset',
+	'placefreeobject',
 	'placesetobject',
 	'playchannel0',
 	'playchannel1',
diff --git a/engines/dreamweb/dreambase.h b/engines/dreamweb/dreambase.h
index d88fda3..28feb5b 100644
--- a/engines/dreamweb/dreambase.h
+++ b/engines/dreamweb/dreambase.h
@@ -53,6 +53,17 @@ public:
 public:
 	// from monitor.cpp
 	void printOuterMon();
+	void showCurrentFile();
+	void accessLightOn();
+	void accessLightOff();
+	void turnOnPower();
+	void powerLightOn();
+	void powerLightOff();
+	void printLogo();
+	void scrollMonitor();
+	const char *monPrint(const char *string);
+	void lockLightOn();
+	void lockLightOff();
 
 	// from pathfind.cpp
 	Common::Point _lineData[200];		// Output of Bresenham
@@ -68,6 +79,10 @@ public:
 	uint8 printDirect(const uint8* string, uint16 x, uint16 y, uint8 maxWidth, bool centered);
 	uint8 getNumber(const Frame *charSet, const uint8 *string, uint16 maxWidth, bool centered, uint16 *offset);
 	uint8 kernChars(uint8 firstChar, uint8 secondChar, uint8 width);
+	uint8 printSlow(const uint8 *string, uint16 x, uint16 y, uint8 maxWidth, bool centered);
+	uint16 waitFrames();
+	void printCurs();
+	void delCurs();
 
 	// from sound.cpp
 	void volumeAdjust();
@@ -90,6 +105,8 @@ public:
 	void showBlink();
 	void dumpBlink();
 	void dumpPointer();
+	void showPointer();
+	void delPointer();
 	void showRyanPage();
 	Frame *tempGraphics();
 	Frame *tempGraphics2();
@@ -98,6 +115,21 @@ public:
 	void showOpBox();
 	void middlePanel();
 	void showDiary();
+	void readMouse();
+	uint16 readMouseState();
+	void hangOn(uint16 frameCount);
+	bool quitRequested();
+	void lockMon();
+	uint8 *textUnder();
+	void readKey();
+	void findOrMake(uint8 index, uint8 value, uint8 type);
+	DynObject *getFreeAd(uint8 index);
+	DynObject *getExAd(uint8 index);
+	DynObject *getEitherAdCPP();
+
+	// from use.cpp
+	void placeFreeObject(uint8 index);
+	void removeFreeObject(uint8 index);
 
 	// from vgafades.cpp
 	uint8 *mainPalette();
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 6216714..9c1db94 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -3661,40 +3661,6 @@ emptyinterface:
 	al = 0;
 }
 
-void DreamGenContext::lockLightOn() {
-	STACK_CHECK;
-	di = 56;
-	bx = 182;
-	ds = data.word(kTempgraphics);
-	al = 10;
-	ah = 0;
-	push(di);
-	push(bx);
-	showFrame();
-	bx = pop();
-	di = pop();
-	cl = 12;
-	ch = 8;
-	multiDump();
-}
-
-void DreamGenContext::lockLightOff() {
-	STACK_CHECK;
-	di = 56;
-	bx = 182;
-	ds = data.word(kTempgraphics);
-	al = 9;
-	ah = 0;
-	push(di);
-	push(bx);
-	showFrame();
-	bx = pop();
-	di = pop();
-	cl = 12;
-	ch = 8;
-	multiDump();
-}
-
 void DreamGenContext::makeCaps() {
 	STACK_CHECK;
 	_cmp(al, 'a');
@@ -5359,19 +5325,6 @@ void DreamGenContext::findPuzText() {
 	si = ax;
 }
 
-void DreamGenContext::placeFreeObject() {
-	STACK_CHECK;
-	push(es);
-	push(bx);
-	cl = 0;
-	ch = 1;
-	findOrMake();
-	getFreeAd();
-	es.byte(bx+2) = 0;
-	bx = pop();
-	es = pop();
-}
-
 void DreamGenContext::removeFreeObject() {
 	STACK_CHECK;
 	push(es);
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index fa7fa79..0fb1452 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -593,15 +593,12 @@ public:
 	void removeObFromInv();
 	void heavy();
 	void useKey();
-	void lockLightOn();
 	void discOps();
 	void monitorLogo();
 	void dirFile();
 	void pickupConts();
-	void lockLightOff();
 	void allPalette();
 	void cantDrop();
-	void placeFreeObject();
 	void putUnderZoom();
 	void findInvPos();
 	void workoutFrames();
@@ -641,7 +638,6 @@ public:
 	void findAllOpen();
 	void showSlots();
 	void findSetObject();
-	void useDiary();
 	void deleteExObject();
 	void removeFreeObject();
 	void lookAtCard();
@@ -677,6 +673,7 @@ public:
 	void selectOpenOb();
 	void useGun();
 	void autoAppear();
+	void useDiary();
 	void newPlace();
 	void useHandle();
 	void showPuzText();
diff --git a/engines/dreamweb/monitor.cpp b/engines/dreamweb/monitor.cpp
index c6bfd487..49cd800 100644
--- a/engines/dreamweb/monitor.cpp
+++ b/engines/dreamweb/monitor.cpp
@@ -97,7 +97,7 @@ void DreamGenContext::useMon() {
 	workToScreenM();
 }
 
-void DreamGenContext::printLogo() {
+void DreamBase::printLogo() {
 	showFrame(tempGraphics(), 56, 32, 0, 0);
 	showCurrentFile();
 }
@@ -161,7 +161,7 @@ void DreamGenContext::delChar() {
 	multiDump(data.word(kMonadx), data.word(kMonady), al, 8);
 }
 
-void DreamGenContext::printCurs() {
+void DreamBase::printCurs() {
 	uint16 x = data.word(kCurslocx);
 	uint16 y = data.word(kCurslocy);
 	uint16 height;
@@ -177,7 +177,7 @@ void DreamGenContext::printCurs() {
 	multiDump(x - 6, y, 12, height);
 }
 
-void DreamGenContext::delCurs() {
+void DreamBase::delCurs() {
 	uint16 x = data.word(kCurslocx);
 	uint16 y = data.word(kCurslocy);
 	uint16 width = 6;
@@ -195,14 +195,14 @@ void DreamGenContext::hangOnCurs() {
 	hangOnCurs(cx);
 }
 
-void DreamGenContext::scrollMonitor() {
+void DreamBase::scrollMonitor() {
 	printLogo();
 	printUnderMon();
 	workToScreenCPP();
 	playChannel1(25);
 }
 
-void DreamGenContext::showCurrentFile() {
+void DreamBase::showCurrentFile() {
 	uint16 x = 178; // TODO: Looks like this hardcoded constant in the asm doesn't match the frame
 	const char *currentFile = (const char *)data.ptr(kCurrentfile+1, 0);
 	while (*currentFile) {
@@ -212,12 +212,12 @@ void DreamGenContext::showCurrentFile() {
 	}
 }
 
-void DreamGenContext::accessLightOn() {
+void DreamBase::accessLightOn() {
 	showFrame(tempGraphics(), 74, 182, 8, 0);
 	multiDump(74, 182, 12, 8);
 }
 
-void DreamGenContext::accessLightOff() {
+void DreamBase::accessLightOff() {
 	showFrame(tempGraphics(), 74, 182, 7, 0);
 	multiDump(74, 182, 12, 8);
 }
@@ -258,17 +258,27 @@ void DreamGenContext::netError() {
 	scrollMonitor();
 }
 
-void DreamGenContext::powerLightOn() {
+void DreamBase::powerLightOn() {
 	showFrame(tempGraphics(), 257+4, 182, 6, 0);
 	multiDump(257+4, 182, 12, 8);
 }
 
-void DreamGenContext::powerLightOff() {
+void DreamBase::powerLightOff() {
 	showFrame(tempGraphics(), 257+4, 182, 5, 0);
 	multiDump(257+4, 182, 12, 8);
 }
 
-void DreamGenContext::turnOnPower() {
+void DreamBase::lockLightOn() {
+	showFrame(tempGraphics(), 56, 182, 10, 0);
+	multiDump(58, 182, 12, 8);
+}
+
+void DreamBase::lockLightOff() {
+	showFrame(tempGraphics(), 56, 182, 9, 0);
+	multiDump(58, 182, 12, 8);
+}
+
+void DreamBase::turnOnPower() {
 	for (size_t i = 0; i < 3; ++i) {
 		powerLightOn();
 		hangOn(30);
diff --git a/engines/dreamweb/print.cpp b/engines/dreamweb/print.cpp
index c554053..df89df2 100644
--- a/engines/dreamweb/print.cpp
+++ b/engines/dreamweb/print.cpp
@@ -79,7 +79,7 @@ void DreamBase::printChar(const Frame *charSet, uint16 x, uint16 y, uint8 c, uin
 	printChar(charSet, &x, y, c, nextChar, width, height);
 }
 
-uint8 DreamGenContext::printSlow(const uint8 *string, uint16 x, uint16 y, uint8 maxWidth, bool centered) {
+uint8 DreamBase::printSlow(const uint8 *string, uint16 x, uint16 y, uint8 maxWidth, bool centered) {
 	data.byte(kPointerframe) = 1;
 	data.byte(kPointermode) = 3;
 	const Frame* charSet = (const Frame *)getSegment(data.word(kCharset1)).ptr(0, 0);
@@ -205,7 +205,7 @@ uint8 DreamBase::kernChars(uint8 firstChar, uint8 secondChar, uint8 width) {
 	return width;
 }
 
-uint16 DreamGenContext::waitFrames() {
+uint16 DreamBase::waitFrames() {
 	readMouse();
 	showPointer();
 	vSync();
@@ -221,7 +221,7 @@ void DreamGenContext::monPrint() {
 	bx = originalBx + (nextString - string);
 }
 
-const char *DreamGenContext::monPrint(const char *string) {
+const char *DreamBase::monPrint(const char *string) {
 	data.byte(kKerning) = 1;
 	uint16 x = data.word(kMonadx);
 	Frame *charset = engine->tempCharset();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 4ccb50b..48cf3d8 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -645,7 +645,7 @@ done: // The engine will need some cleaner finalization, let's put it here for n
 	engine->freeIcons2();
 }
 
-bool DreamGenContext::quitRequested() {
+bool DreamBase::quitRequested() {
 	return data.byte(kQuitrequested);
 }
 
@@ -738,7 +738,7 @@ void DreamGenContext::switchRyanOff() {
 	data.byte(kRyanon) = 1;
 }
 
-uint8 *DreamGenContext::textUnder() {
+uint8 *DreamBase::textUnder() {
 	return getSegment(data.word(kBuffers)).ptr(kTextunder, 0);
 }
 
@@ -838,13 +838,13 @@ bool DreamGenContext::openForLoad(unsigned int slot) {
 	return engine->openSaveFileForReading(filename);
 }
 
-void DreamGenContext::readMouse() {
+void DreamBase::readMouse() {
 	data.word(kOldbutton) = data.word(kMousebutton);
 	uint16 state = readMouseState();
 	data.word(kMousebutton) = state;
 }
 
-uint16 DreamGenContext::readMouseState() {
+uint16 DreamBase::readMouseState() {
 	data.word(kOldx) = data.word(kMousex);
 	data.word(kOldy) = data.word(kMousey);
 	uint16 x, y, state;
@@ -1057,7 +1057,7 @@ void DreamGenContext::eraseOldObs() {
 	}
 }
 
-void DreamGenContext::lockMon() {
+void DreamBase::lockMon() {
 	// Pressing space pauses text output in the monitor. We use the "hard"
 	// key because calling readkey() drains characters from the input
 	// buffer, we we want the user to be able to type ahead while the text
@@ -1176,12 +1176,10 @@ void DreamGenContext::dealWithSpecial(uint8 firstParam, uint8 secondParam) {
 		removeSetObject(secondParam);
 		data.byte(kHavedoneobs) = 1;
 	} else if (type == 2) {
-		al = secondParam;
-		placeFreeObject();
+		placeFreeObject(secondParam);
 		data.byte(kHavedoneobs) = 1;
 	} else if (type == 3) {
-		al = secondParam;
-		removeFreeObject();
+		removeFreeObject(secondParam);
 		data.byte(kHavedoneobs) = 1;
 	} else if (type == 4) {
 		switchRyanOff();
@@ -1391,7 +1389,7 @@ void DreamGenContext::findOrMake() {
 	findOrMake(b0, b2, b3);
 }
 
-void DreamGenContext::findOrMake(uint8 index, uint8 value, uint8 type) {
+void DreamBase::findOrMake(uint8 index, uint8 value, uint8 type) {
 	Change *change = (Change *)getSegment(data.word(kBuffers)).ptr(kListofchanges, sizeof(Change));
 	for (; change->index != 0xff; ++change) {
 		if (index == change->index && data.byte(kReallocation) == change->location && type == change->type) {
@@ -1413,15 +1411,15 @@ void DreamGenContext::setAllChanges() {
 			doChange(change->index, change->value, change->type);
 }
 
-DynObject *DreamGenContext::getFreeAd(uint8 index) {
+DynObject *DreamBase::getFreeAd(uint8 index) {
 	return (DynObject *)getSegment(data.word(kFreedat)).ptr(0, 0) + index;
 }
 
-DynObject *DreamGenContext::getExAd(uint8 index) {
+DynObject *DreamBase::getExAd(uint8 index) {
 	return (DynObject *)getSegment(data.word(kExtras)).ptr(kExdata, 0) + index;
 }
 
-DynObject *DreamGenContext::getEitherAdCPP() {
+DynObject *DreamBase::getEitherAdCPP() {
 	if (data.byte(kObjecttype) == 4)
 		return getExAd(data.byte(kItemframe));
 	else
@@ -1625,7 +1623,7 @@ void DreamGenContext::obName(uint8 command, uint8 commandType) {
 	}
 }
 
-void DreamGenContext::delPointer() {
+void DreamBase::delPointer() {
 	if (data.word(kOldpointerx) == 0xffff)
 		return;
 	data.word(kDelherex) = data.word(kOldpointerx);
@@ -1759,7 +1757,7 @@ void DreamGenContext::checkCoords(const RectWithCallback *rectWithCallbacks) {
 	}
 }
 
-void DreamGenContext::showPointer() {
+void DreamBase::showPointer() {
 	showBlink();
 	uint16 x = data.word(kMousex);
 	data.word(kOldpointerx) = data.word(kMousex);
@@ -1962,7 +1960,7 @@ void DreamGenContext::hangOn() {
 	hangOn(cx);
 }
 
-void DreamGenContext::hangOn(uint16 frameCount) {
+void DreamBase::hangOn(uint16 frameCount) {
 	while (frameCount) {
 		vSync();
 		--frameCount;
@@ -2912,7 +2910,7 @@ void DreamGenContext::showSymbol() {
 	showFrame(tempGraphics(), data.byte(kSymbolbotx) + kSymbolx+54, kSymboly+49, 6 + nextNextBotSymbol, 32);
 }
 
-void DreamGenContext::readKey() {
+void DreamBase::readKey() {
 	uint16 bufOut = data.word(kBufferout);
 
 	if (bufOut == data.word(kBufferin)) {
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 80433c1..f1dd998 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -23,14 +23,12 @@
 #define DREAMWEB_STUBS_H
 
 	void screenUpdate();
-	bool quitRequested();
 	void startup();
 	void startup1();
 	void switchRyanOn();
 	void switchRyanOff();
 	uint16 allocateMem(uint16 paragraphs);
 	void deallocateMem(uint16 segment);
-	uint8 *textUnder();
 	uint16 standardLoad(const char *fileName, uint16 *outSizeInBytes = NULL); // Returns a segment handle which needs to be freed with deallocatemem for symmetry
 	void *standardLoadCPP(const char *fileName, uint16 *outSizeInBytes = NULL); // And this one should be 'free'd
 	void loadIntoTemp();
@@ -40,8 +38,6 @@
 	void loadTempCharset();
 	void loadTempCharset(const char *fileName);
 	void saveLoad();
-	void printCurs();
-	void delCurs();
 	void delChar();
 	void hangOnCurs(uint16 frameCount);
 	void hangOnCurs();
@@ -80,7 +76,6 @@
 	void setupTimedTemp(uint8 textIndex, uint8 voiceIndex, uint8 x, uint8 y, uint16 countToTimed, uint16 timeCount);
 	void getUnderTimed();
 	void putUnderTimed();
-	uint8 printSlow(const uint8 *string, uint16 x, uint16 y, uint8 maxWidth, bool centered);
 	void dumpTextLine();
 	void oldToNames();
 	void namesToOld();
@@ -126,7 +121,6 @@
 	void turnAnyPathOn();
 	void turnAnyPathOff();
 	void makeBackOb(SetObject *objData);
-	void lockMon();
 	void dealWithSpecial(uint8 firstParam, uint8 secondParam);
 	void zoom();
 	void showRain();
@@ -169,9 +163,15 @@
 	void personNameText();
 	void findXYFromPath();
 	void findOrMake();
-	void findOrMake(uint8 index, uint8 value, uint8 type);
-	DynObject *getFreeAd(uint8 index);
-	DynObject *getExAd(uint8 index);
+	void findOrMake(uint8 index, uint8 value, uint8 type) {
+		DreamBase::findOrMake(index, value, type);
+	}
+	DynObject *getFreeAd(uint8 index) {
+		return DreamBase::getFreeAd(index);
+	}
+	DynObject *getExAd(uint8 index) {
+		return DreamBase::getExAd(index);
+	}
 	DynObject *getEitherAdCPP();
 	SetObject *getSetAd(uint8 index);
 	void *getAnyAd(uint8 *value1, uint8 *value2);
@@ -195,14 +195,9 @@
 	void walkAndExamine();
 	void obName();
 	void obName(uint8 command, uint8 commandType);
-	void delPointer();
-	void showPointer();
 	void animPointer();
 	void checkCoords();
 	void checkCoords(const RectWithCallback *rectWithCallbacks);
-	void readMouse();
-	uint16 readMouseState();
-	uint16 waitFrames();
 	void drawFlags();
 	void addToPeopleList();
 	void addToPeopleList(ReelRoutine *routine);
@@ -229,7 +224,9 @@
 	void fillRyan();
 	void useRoutine();
 	void hangOn();
-	void hangOn(uint16 frameCount);
+	void hangOn(uint16 frameCount) {
+		DreamBase::hangOn(frameCount);
+	}
 	void hangOnW();
 	void hangOnW(uint16 frameCount);
 	void hangOnP();
@@ -271,27 +268,21 @@
 	void readSetData();
 	void fadeupYellows();
 	void fadeupMonFirst();
-	void printLogo();
 	void loadMenu();
 	void showMenu();
 	void dumpMenu();
 	void useMenu();
 	void useMon();
-	void scrollMonitor();
-	void showCurrentFile();
 	void input();
 	void monPrint();
-	const char *monPrint(const char *string);
-	void accessLightOn();
-	void accessLightOff();
+	const char *monPrint(const char *string) {
+		return DreamBase::monPrint(string);
+	}
 	void randomAccess(uint16 count);
 	void randomAccess();
 	void monMessage(uint8 index);
 	void monMessage();
 	void netError();
-	void turnOnPower();
-	void powerLightOn();
-	void powerLightOff();
 	void playChannel0();
 	void playChannel0(uint8 index, uint8 repeat) {
 		DreamBase::playChannel0(index, repeat);
@@ -471,7 +462,6 @@
 	void loadPersonal();
 	void loadNews();
 	void loadCart();
-	void readKey();
 	void hangOne(uint16 delay);
 	void hangOne();
 	void bibleQuote();
@@ -558,5 +548,8 @@
 	void watchReel();
 	void showWatchReel();
 	void plotReel(uint16 &reelPointer);
+	void removeFreeObject(uint8 index) {
+		DreamBase::removeFreeObject(index);
+	}
 
 #endif
diff --git a/engines/dreamweb/use.cpp b/engines/dreamweb/use.cpp
index b56ae07..f06a30d 100644
--- a/engines/dreamweb/use.cpp
+++ b/engines/dreamweb/use.cpp
@@ -829,8 +829,7 @@ void DreamGenContext::usePlate() {
 		placeSetObject(28);
 		placeSetObject(24);
 		removeSetObject(25);
-		al = 0;
-		placeFreeObject();
+		placeFreeObject(0);
 		data.byte(kProgresspoints)++;
 		data.byte(kGetback) = 1;
 	} else if (compare(data.byte(kWithobject), data.byte(kWithtype), knife)) {
@@ -1150,4 +1149,14 @@ void DreamGenContext::useCooker() {
 	putBackObStuff();
 }
 
+void DreamBase::placeFreeObject(uint8 index) {
+	findOrMake(index, 0, 1);
+	getFreeAd(index)->mapad[0] = 0;
+}
+
+void DreamBase::removeFreeObject(uint8 index) {
+	getFreeAd(index)->mapad[0] = 0xFF;
+}
+
+
 } // End of namespace DreamGen






More information about the Scummvm-git-logs mailing list