[Scummvm-cvs-logs] scummvm master -> 1fb892878fcfa6c38efc08e40e59676785147e70

wjp wjp at usecode.org
Sat Dec 3 20:39:40 CET 2011


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

Summary:
0336c67bfd DREAMWEB: Move Bresenham output out of data segment
1fb892878f DREAMWEB: Move temporary room for loading out of data segment


Commit: 0336c67bfdc86be6932b9f57939361769ba25e6d
    https://github.com/scummvm/scummvm/commit/0336c67bfdc86be6932b9f57939361769ba25e6d
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2011-12-03T11:39:06-08:00

Commit Message:
DREAMWEB: Move Bresenham output out of data segment

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



diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index 80037a9..8700589 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -35,6 +35,7 @@ p = parser(skip_binary_data = [
 	'stak',
 	'keyconverttab',
 	'atmospherelist',
+	'linedata',
 	# keypad.asm
 	'keypadlist',
 	'symbollist',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 127e62f..3bdad08 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -9844,7 +9844,7 @@ void DreamGenContext::getNamePos() {
 	_mul(cx);
 	dx = data;
 	es = dx;
-	bx = 3368;
+	bx = 2968;
 	_add(bx, ax);
 	al = data.byte(kCursorpos);
 	ah = 0;
@@ -9998,7 +9998,7 @@ void DreamGenContext::showNames() {
 	STACK_CHECK;
 	dx = data;
 	es = dx;
-	si = 3368+1;
+	si = 2968+1;
 	di = (60)+21;
 	bx = (52)+10;
 	cl = 0;
@@ -11670,84 +11670,34 @@ void DreamGenContext::__start() {
 		//0x0b70: .... .... .... ....
 		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
 		//0x0b80: .... .... .... ....
-		0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
+		0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 
 		//0x0b90: .... .... .... ....
-		0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
-		//0x0ba0: .... .... .... ....
-		0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
-		//0x0bb0: .... .... .... ....
-		0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
-		//0x0bc0: .... .... .... ....
-		0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
-		//0x0bd0: .... .... .... ....
-		0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
-		//0x0be0: .... .... .... ....
-		0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
-		//0x0bf0: .... .... .... ....
-		0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
-		//0x0c00: .... .... .... ....
-		0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
-		//0x0c10: .... .... .... ....
-		0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
-		//0x0c20: .... .... .... ....
-		0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
-		//0x0c30: .... .... .... ....
-		0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
-		//0x0c40: .... .... .... ....
-		0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
-		//0x0c50: .... .... .... ....
-		0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
-		//0x0c60: .... .... .... ....
-		0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
-		//0x0c70: .... .... .... ....
-		0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
-		//0x0c80: .... .... .... ....
-		0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
-		//0x0c90: .... .... .... ....
-		0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
-		//0x0ca0: .... .... .... ....
-		0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
-		//0x0cb0: .... .... .... ....
-		0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
-		//0x0cc0: .... .... .... ....
-		0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
-		//0x0cd0: .... .... .... ....
-		0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
-		//0x0ce0: .... .... .... ....
-		0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
-		//0x0cf0: .... .... .... ....
-		0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
-		//0x0d00: .... .... .... ....
-		0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
-		//0x0d10: .... .... .... ....
-		0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 
-		//0x0d20: .... .... .... ....
 		0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 
-		//0x0d30: .... .... .... ....
+		//0x0ba0: .... .... .... ....
 		0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 
-		//0x0d40: .... .... .... ....
+		//0x0bb0: .... .... .... ....
 		0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 
-		//0x0d50: .... .... .... ....
+		//0x0bc0: .... .... .... ....
 		0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 
-		//0x0d60: .... .... .... ....
+		//0x0bd0: .... .... .... ....
 		0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 
-		//0x0d70: .... .... .... ....
+		//0x0be0: .... .... .... ....
 		0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 
-		//0x0d80: .... .... .... ....
+		//0x0bf0: .... .... .... ....
 		0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x44, 
-		//0x0d90: .... .... .... ...D
+		//0x0c00: .... .... .... ...D
 		0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x44, 0x30, 0x30, 0x00, 0x44, 0x52, 0x45, 0x41, 
-		//0x0da0: REAM WEB. D00. DREA
+		//0x0c10: REAM WEB. D00. DREA
 		0x4d, 0x57, 0x45, 0x42, 0x2e, 0x44, 0x30, 0x31, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 
-		//0x0db0: MWEB .D01 .DRE AMWE
+		//0x0c20: MWEB .D01 .DRE AMWE
 		0x42, 0x2e, 0x44, 0x30, 0x32, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x44, 
-		//0x0dc0: B.D0 2.DR EAMW EB.D
+		//0x0c30: B.D0 2.DR EAMW EB.D
 		0x30, 0x33, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x44, 0x30, 0x34, 0x00, 
-		//0x0dd0: 03.D REAM WEB. D04.
+		//0x0c40: 03.D REAM WEB. D04.
 		0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x44, 0x30, 0x35, 0x00, 0x44, 0x52, 0x45, 
-		//0x0de0: DREA MWEB .D05 .DRE
+		//0x0c50: DREA MWEB .D05 .DRE
 		0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x44, 0x30, 0x36, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 
-		//0x0df0: AMWE B.D0 6.DR EAMW
+		//0x0c60: AMWE B.D0 6.DR EAMW
 		0x45, 0x42, 0x2e, 0x44, 0x45, 0x4d, 0x00, 0x00, 0x00, 0x00, };
 	ds.assign(src, src + sizeof(src));
 	dreamweb(); 
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 94f4836..aa5b10b 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -509,14 +509,13 @@ public:
 	static const uint16 kRoompics = 2816;
 	static const uint16 kOplist = 2831;
 	static const uint16 kInputline = 2834;
-	static const uint16 kLinedata = 2962;
-	static const uint16 kPresslist = 3362;
-	static const uint16 kSavenames = 3368;
-	static const uint16 kSavefiles = 3487;
-	static const uint16 kRecname = 3578;
-	static const uint16 kQuitrequested = 3591;
-	static const uint16 kSubtitles = 3592;
-	static const uint16 kForeignrelease = 3593;
+	static const uint16 kPresslist = 2962;
+	static const uint16 kSavenames = 2968;
+	static const uint16 kSavefiles = 3087;
+	static const uint16 kRecname = 3178;
+	static const uint16 kQuitrequested = 3191;
+	static const uint16 kSubtitles = 3192;
+	static const uint16 kForeignrelease = 3193;
 	static const uint16 kBlocktextdat = (0);
 	static const uint16 kPersonframes = (0);
 	static const uint16 kDebuglevel1 = (0);
diff --git a/engines/dreamweb/dreamweb.h b/engines/dreamweb/dreamweb.h
index 8181d04..2d59a87 100644
--- a/engines/dreamweb/dreamweb.h
+++ b/engines/dreamweb/dreamweb.h
@@ -46,6 +46,9 @@ namespace DreamGen {
 const uint16 addr_backobject = 0xc170;
 const uint16 addr_mainman = 0xc138;
 
+// Output of Bresenham
+extern Common::Point g_lineData[200];
+
 }
 
 namespace DreamWeb {
diff --git a/engines/dreamweb/pathfind.cpp b/engines/dreamweb/pathfind.cpp
index 2353fc7..66a0228 100644
--- a/engines/dreamweb/pathfind.cpp
+++ b/engines/dreamweb/pathfind.cpp
@@ -24,6 +24,10 @@
 
 namespace DreamGen {
 
+// Output of Bresenham
+Common::Point g_lineData[200];
+
+
 void DreamGenContext::turnPathOn() {
 	turnPathOn(al);
 }
@@ -131,7 +135,7 @@ bool DreamGenContext::checkIfPathIsOn(uint8 index) {
 
 void DreamGenContext::bresenhams() {
 	workoutFrames();
-	int8 *lineData = (int8 *)data.ptr(kLinedata, 0);
+	Common::Point *lineData = &g_lineData[0];
 	int16 startX = (int16)data.word(kLinestartx);
 	int16 startY = (int16)data.word(kLinestarty);
 	int16 endX = (int16)data.word(kLineendx);
@@ -152,13 +156,12 @@ void DreamGenContext::bresenhams() {
 		++deltaY;
 		int8 x = (int8)startX;
 		data.byte(kLinelength) = deltaY;
-		do {
-			lineData[0] = x;
-			lineData[1] = y;
-			lineData += 2;
+		for (; deltaY; --deltaY) {
+			lineData->x = x;
+			lineData->y = y;
+			++lineData;
 			++y;
-			--deltaY;
-		} while (deltaY);
+		}
 		return;
 	}
 	uint16 deltaX;
@@ -182,13 +185,12 @@ void DreamGenContext::bresenhams() {
 		int8 y = (int8)startY;
 		++deltaX;
 		data.byte(kLinelength) = deltaX;
-		do {
-			lineData[0] = x;
-			lineData[1] = y;
-			lineData += 2;
+		for (; deltaX; --deltaX) {
+			lineData->x = x;
+			lineData->y = y;
+			++lineData;
 			++x;
-			--deltaX;
-		} while (deltaX);
+		}
 		return;
 	}
 	uint16 deltaY;
@@ -219,10 +221,10 @@ void DreamGenContext::bresenhams() {
 	int8 y = (int8)startY;
 	data.byte(kLinelength) = delta1;
 	if (data.byte(kLineroutine) != 1) {
-		do {
-			lineData[0] = x;
-			lineData[1] = y;
-			lineData += 2;
+		for (; delta1; --delta1) {
+			lineData->x = x;
+			lineData->y = y;
+			++lineData;
 			++x;
 			if (remainder < 0) {
 				remainder += data.word(kIncrement1);
@@ -230,13 +232,12 @@ void DreamGenContext::bresenhams() {
 				remainder += data.word(kIncrement2);
 				y += increment;
 			}
-			--delta1;
-		} while (delta1);
+		}
 	} else {
-		do {
-			lineData[0] = x;
-			lineData[1] = y;
-			lineData += 2;
+		for (; delta1; --delta1) {
+			lineData->x = x;
+			lineData->y = y;
+			++lineData;
 			y += increment;
 			if (remainder < 0) {
 				remainder += data.word(kIncrement1);
@@ -244,7 +245,6 @@ void DreamGenContext::bresenhams() {
 				remainder += data.word(kIncrement2);
 				++x;
 			}
-			--delta1;
 		} while (delta1);
 	}
 }
diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp
index dae62d7..92b78ce 100644
--- a/engines/dreamweb/sprite.cpp
+++ b/engines/dreamweb/sprite.cpp
@@ -196,8 +196,8 @@ void DreamGenContext::walking(Sprite *sprite) {
 		comp = data.byte(kLinelength);
 	}
 	if (data.byte(kLinepointer) < comp) {
-		sprite->x = data.byte(kLinedata + data.byte(kLinepointer) * 2 + 0);
-		sprite->y = data.byte(kLinedata + data.byte(kLinepointer) * 2 + 1);
+		sprite->x = (uint8)g_lineData[data.byte(kLinepointer)].x;
+		sprite->y = (uint8)g_lineData[data.byte(kLinepointer)].y;
 		return;
 	}
 


Commit: 1fb892878fcfa6c38efc08e40e59676785147e70
    https://github.com/scummvm/scummvm/commit/1fb892878fcfa6c38efc08e40e59676785147e70
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2011-12-03T11:39:06-08:00

Commit Message:
DREAMWEB: Move temporary room for loading out of data segment

Changed paths:
    devtools/tasmrecover/tasm-recover
    engines/dreamweb/dreamgen.cpp
    engines/dreamweb/dreamgen.h
    engines/dreamweb/saveload.cpp



diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index 8700589..0896f05 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -36,6 +36,8 @@ p = parser(skip_binary_data = [
 	'keyconverttab',
 	'atmospherelist',
 	'linedata',
+	'madeuproomdat',
+	'recname',
 	# keypad.asm
 	'keypadlist',
 	'symbollist',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 3bdad08..7a66a05 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -5273,14 +5273,14 @@ void DreamGenContext::getDestInfo() {
 	push(ax);
 	dx = data;
 	es = dx;
-	si = 2800;
+	si = 2768;
 	_add(si, ax);
 	cl = es.byte(si);
 	ax = pop();
 	push(cx);
 	dx = data;
 	es = dx;
-	si = 2816;
+	si = 2784;
 	_add(si, ax);
 	ax = pop();
 }
@@ -5457,7 +5457,7 @@ clearedlocations:
 	bx = ax;
 	dx = data;
 	es = dx;
-	_add(bx, 2800);
+	_add(bx, 2768);
 	es.byte(bx) = 0;
 }
 
@@ -5670,7 +5670,7 @@ void DreamGenContext::delChar() {
 	si = data.word(kCurpos);
 	_add(si, si);
 	es = cs;
-	_add(si, 2834);
+	_add(si, 2802);
 	es.byte(si) = 0;
 	al = es.byte(si+1);
 	ah = 0;
@@ -5697,7 +5697,7 @@ void DreamGenContext::execCommand() {
 	es = cs;
 	bx = offset_comlist;
 	ds = cs;
-	si = 2834;
+	si = 2802;
 	al = ds.byte(si);
 	_cmp(al, 0);
 	if (!flags.z())
@@ -5892,7 +5892,7 @@ notyetassigned:
 	push(bx);
 	_add(bx, 2);
 	ds = cs;
-	si = 2834;
+	si = 2802;
 checkpass:
 	_lodsw();
 	ah = es.byte(bx);
@@ -6220,7 +6220,7 @@ void DreamGenContext::parser() {
 	al = '=';
 	_stosb();
 	ds = cs;
-	si = 2834;
+	si = 2802;
 notspace1:
 	_lodsw();
 	_cmp(al, 32);
@@ -9844,7 +9844,7 @@ void DreamGenContext::getNamePos() {
 	_mul(cx);
 	dx = data;
 	es = dx;
-	bx = 2968;
+	bx = 2936;
 	_add(bx, ax);
 	al = data.byte(kCursorpos);
 	ah = 0;
@@ -9998,7 +9998,7 @@ void DreamGenContext::showNames() {
 	STACK_CHECK;
 	dx = data;
 	es = dx;
-	si = 2968+1;
+	si = 2936+1;
 	di = (60)+21;
 	bx = (52)+10;
 	cl = 0;
@@ -10518,7 +10518,7 @@ void DreamGenContext::clearChanges() {
 	di = 0;
 	_stosw(cx, true);
 	es = cs;
-	di = 2800;
+	di = 2768;
 	al = 1;
 	_stosb(2);
 	al = 0;
@@ -11646,13 +11646,13 @@ void DreamGenContext::__start() {
 		//0x0ab0: .... .... .... ....
 		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
 		//0x0ac0: .... .... .... ....
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+		0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
 		//0x0ad0: .... .... .... ....
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+		0x05, 0x00, 0x03, 0x02, 0x04, 0x01, 0x0a, 0x09, 0x08, 0x06, 0x0b, 0x04, 0x07, 0x07, 0x00, 0x00, 
 		//0x0ae0: .... .... .... ....
-		0x01, 0x01, 0x00, 0x01, 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, 
 		//0x0af0: .... .... .... ....
-		0x05, 0x00, 0x03, 0x02, 0x04, 0x01, 0x0a, 0x09, 0x08, 0x06, 0x0b, 0x04, 0x07, 0x07, 0x00, 0x00, 
+		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
 		//0x0b00: .... .... .... ....
 		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
 		//0x0b10: .... .... .... ....
@@ -11666,39 +11666,33 @@ void DreamGenContext::__start() {
 		//0x0b50: .... .... .... ....
 		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
 		//0x0b60: .... .... .... ....
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-		//0x0b70: .... .... .... ....
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-		//0x0b80: .... .... .... ....
 		0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 
-		//0x0b90: .... .... .... ....
+		//0x0b70: .... .... .... ....
 		0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 
-		//0x0ba0: .... .... .... ....
+		//0x0b80: .... .... .... ....
 		0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 
-		//0x0bb0: .... .... .... ....
+		//0x0b90: .... .... .... ....
 		0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 
-		//0x0bc0: .... .... .... ....
+		//0x0ba0: .... .... .... ....
 		0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 
-		//0x0bd0: .... .... .... ....
+		//0x0bb0: .... .... .... ....
 		0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 
-		//0x0be0: .... .... .... ....
+		//0x0bc0: .... .... .... ....
 		0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 
-		//0x0bf0: .... .... .... ....
+		//0x0bd0: .... .... .... ....
 		0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x44, 
-		//0x0c00: .... .... .... ...D
+		//0x0be0: .... .... .... ...D
 		0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x44, 0x30, 0x30, 0x00, 0x44, 0x52, 0x45, 0x41, 
-		//0x0c10: REAM WEB. D00. DREA
+		//0x0bf0: REAM WEB. D00. DREA
 		0x4d, 0x57, 0x45, 0x42, 0x2e, 0x44, 0x30, 0x31, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 
-		//0x0c20: MWEB .D01 .DRE AMWE
+		//0x0c00: MWEB .D01 .DRE AMWE
 		0x42, 0x2e, 0x44, 0x30, 0x32, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x44, 
-		//0x0c30: B.D0 2.DR EAMW EB.D
+		//0x0c10: B.D0 2.DR EAMW EB.D
 		0x30, 0x33, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x44, 0x30, 0x34, 0x00, 
-		//0x0c40: 03.D REAM WEB. D04.
+		//0x0c20: 03.D REAM WEB. D04.
 		0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x44, 0x30, 0x35, 0x00, 0x44, 0x52, 0x45, 
-		//0x0c50: DREA MWEB .D05 .DRE
-		0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x44, 0x30, 0x36, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 
-		//0x0c60: AMWE B.D0 6.DR EAMW
-		0x45, 0x42, 0x2e, 0x44, 0x45, 0x4d, 0x00, 0x00, 0x00, 0x00, };
+		//0x0c30: DREA MWEB .D05 .DRE
+		0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x44, 0x30, 0x36, 0x00, 0x00, 0x00, 0x00, };
 	ds.assign(src, src + sizeof(src));
 	dreamweb(); 
 }
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index aa5b10b..01a1bd6 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -504,18 +504,16 @@ public:
 	static const uint16 kFileheader = 2672;
 	static const uint16 kFiledata = 2722;
 	static const uint16 kExtradata = 2762;
-	static const uint16 kMadeuproomdat = 2768;
-	static const uint16 kRoomscango = 2800;
-	static const uint16 kRoompics = 2816;
-	static const uint16 kOplist = 2831;
-	static const uint16 kInputline = 2834;
-	static const uint16 kPresslist = 2962;
-	static const uint16 kSavenames = 2968;
-	static const uint16 kSavefiles = 3087;
-	static const uint16 kRecname = 3178;
-	static const uint16 kQuitrequested = 3191;
-	static const uint16 kSubtitles = 3192;
-	static const uint16 kForeignrelease = 3193;
+	static const uint16 kRoomscango = 2768;
+	static const uint16 kRoompics = 2784;
+	static const uint16 kOplist = 2799;
+	static const uint16 kInputline = 2802;
+	static const uint16 kPresslist = 2930;
+	static const uint16 kSavenames = 2936;
+	static const uint16 kSavefiles = 3055;
+	static const uint16 kQuitrequested = 3146;
+	static const uint16 kSubtitles = 3147;
+	static const uint16 kForeignrelease = 3148;
 	static const uint16 kBlocktextdat = (0);
 	static const uint16 kPersonframes = (0);
 	static const uint16 kDebuglevel1 = (0);
diff --git a/engines/dreamweb/saveload.cpp b/engines/dreamweb/saveload.cpp
index 6f1691f..910f74e 100644
--- a/engines/dreamweb/saveload.cpp
+++ b/engines/dreamweb/saveload.cpp
@@ -28,6 +28,10 @@
 
 namespace DreamGen {
 
+// Temporary storage for loading the room from a savegame
+Room g_madeUpRoomDat;
+
+
 void DreamGenContext::loadGame() {
 	if (data.byte(kCommandtype) != 246) {
 		data.byte(kCommandtype) = 246;
@@ -100,15 +104,13 @@ void DreamGenContext::doLoad(int savegameId) {
 	}
 
 	// If we reach this point, loadPosition() has just been called.
-	// Note: Among other things, it will have filled kMadeuproomdat.
-
+	// Among other things, it will have filled g_MadeUpRoomDat.
 
 	// kTempgraphics might not have been allocated if we bypassed all menus
 	if (data.word(kTempgraphics) != 0xFFFF)
 		getRidOfTemp();
 
-	const Room *room = (const Room *)cs.ptr(kMadeuproomdat, sizeof(Room));
-	startLoading(*room);
+	startLoading(g_madeUpRoomDat);
 	loadRoomsSample();
 	data.byte(kRoomloaded) = 1;
 	data.byte(kNewlocation) = 255;
@@ -370,9 +372,9 @@ void DreamGenContext::loadPosition(unsigned int slot) {
 	engine->readFromSaveFile(getSegment(data.word(kBuffers)).ptr(kListofchanges, len[3]), len[3]);
 
 	// len[4] == 48, which is sizeof(Room) plus 16 for 'Roomscango'
-	// Note: the values read into Madeuproomdat are only used in actualLoad,
+	// Note: the values read into g_madeUpRoomDat are only used in actualLoad,
 	// which is (almost) immediately called after this function
-	engine->readFromSaveFile(data.ptr(kMadeuproomdat, sizeof(Room)), sizeof(Room));
+	engine->readFromSaveFile((uint8 *)&g_madeUpRoomDat, sizeof(Room));
 	engine->readFromSaveFile(data.ptr(kRoomscango, 16), 16);
 
 	engine->readFromSaveFile(cs.ptr(kReelroutines, len[5]), len[5]);






More information about the Scummvm-git-logs mailing list