[Scummvm-cvs-logs] scummvm master -> d559998f90717d40aadde8a8ab22d594116ade27

tramboi bertrand_augereau at yahoo.fr
Sun Dec 4 17:30:20 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:
3f4ec15792 DREAMWEB: Implicit conversion warnings fixed
4506d2ac8d DREAMWEB: Rename random -> randomSprite
d559998f90 DREAMWEB: Cleanup DreamGenContext::loadPalFromIFF, get rid of readFromFile()


Commit: 3f4ec15792dd49b14295717f495aa0c4e4457d54
    https://github.com/scummvm/scummvm/commit/3f4ec15792dd49b14295717f495aa0c4e4457d54
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-12-04T10:25:54-08:00

Commit Message:
DREAMWEB: Implicit conversion warnings fixed

Changed paths:
    engines/dreamweb/people.cpp



diff --git a/engines/dreamweb/people.cpp b/engines/dreamweb/people.cpp
index 4c7f9dd..3122984 100644
--- a/engines/dreamweb/people.cpp
+++ b/engines/dreamweb/people.cpp
@@ -301,7 +301,7 @@ void DreamGenContext::rockstar(ReelRoutine &routine) {
 					nextReelPointer = 79;
 				}
 			} else {
-				data.byte(kLastweapon) = -1;
+				data.byte(kLastweapon) = (uint8)-1;
 				nextReelPointer = 123;
 			}
 		}
@@ -368,7 +368,7 @@ void DreamGenContext::security(ReelRoutine &routine) {
 		if (data.byte(kLastweapon) == 1) {
 			data.word(kWatchingtime) = 10;
 			if ((data.byte(kManspath) == 9) && (data.byte(kFacing) == 0)) {
-				data.byte(kLastweapon) = -1;
+				data.byte(kLastweapon) = (uint8)-1;
 				routine.incReelPointer();
 			}
 		}


Commit: 4506d2ac8d12c871cac0b1eb9b82a056e39e1303
    https://github.com/scummvm/scummvm/commit/4506d2ac8d12c871cac0b1eb9b82a056e39e1303
Author: Max Horn (max at quendi.de)
Date: 2011-12-04T10:28:13-08:00

Commit Message:
DREAMWEB: Rename random -> randomSprite

Changed paths:
    engines/dreamweb/runtime.h
    engines/dreamweb/sprite.cpp
    engines/dreamweb/stubs.h



diff --git a/engines/dreamweb/runtime.h b/engines/dreamweb/runtime.h
index db74c19..38599d2 100644
--- a/engines/dreamweb/runtime.h
+++ b/engines/dreamweb/runtime.h
@@ -37,9 +37,6 @@ namespace DreamWeb {
 
 namespace DreamGen {
 
-//fixme: name clash
-#undef random
-
 struct Register {
 	union {
 		uint16 _value;
diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp
index a2763ae..5eddb1c 100644
--- a/engines/dreamweb/sprite.cpp
+++ b/engines/dreamweb/sprite.cpp
@@ -265,7 +265,7 @@ void DreamGenContext::backObject(Sprite *sprite) {
 	if (objData->type == 6)
 		wideDoor(sprite, objData);
 	else if (objData->type == 5)
-		random(sprite, objData);
+		randomSprite(sprite, objData);
 	else if (objData->type == 4)
 		lockedDoorway(sprite, objData);
 	else if (objData->type == 3)
@@ -288,7 +288,7 @@ void DreamGenContext::constant(Sprite *sprite, SetObject *objData) {
 	sprite->frameNumber = frame;
 }
 
-void DreamGenContext::random(Sprite *sprite, SetObject *objData) {
+void DreamGenContext::randomSprite(Sprite *sprite, SetObject *objData) {
 	uint8 r = engine->randomNumber();
 	sprite->frameNumber = objData->frames[r&7];
 }
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index e2edd89..05b3b3a 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -118,7 +118,7 @@
 	void backObject();
 	void constant(Sprite *sprite, SetObject *objData);
 	void steady(Sprite *sprite, SetObject *objData);
-	void random(Sprite *sprite, SetObject *objData);
+	void randomSprite(Sprite *sprite, SetObject *objData);
 	void doDoor(Sprite *sprite, SetObject *objData, Common::Rect check);
 	void doorway(Sprite *sprite, SetObject *objData);
 	void wideDoor(Sprite *sprite, SetObject *objData);


Commit: d559998f90717d40aadde8a8ab22d594116ade27
    https://github.com/scummvm/scummvm/commit/d559998f90717d40aadde8a8ab22d594116ade27
Author: Max Horn (max at quendi.de)
Date: 2011-12-04T10:28:17-08:00

Commit Message:
DREAMWEB: Cleanup DreamGenContext::loadPalFromIFF, get rid of readFromFile()

Changed paths:
    engines/dreamweb/dreamgen.h
    engines/dreamweb/stubs.cpp
    engines/dreamweb/stubs.h
    engines/dreamweb/vgagrafx.cpp



diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index bd42cab..204c171 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -777,7 +777,6 @@ public:
 	void handClap();
 	void afterIntroRoom();
 	void findAllOpen();
-	void readFromFile();
 	void initialInv();
 	void quitSymbol();
 	void setTopRight();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 85d39a8..7209cdb 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -845,14 +845,6 @@ void DreamGenContext::resetKeyboard() {
 void DreamGenContext::setKeyboardInt() {
 }
 
-void DreamGenContext::readFromFile() {
-	uint16 dst_offset = dx;
-	uint16 size = cx;
-	debug(1, "readfromfile(%04x:%u, %u)", (uint16)ds, dst_offset, size);
-	ax = engine->readFromFile(ds.ptr(dst_offset, size), size);
-	flags._c = false;
-}
-
 void DreamGenContext::closeFile() {
 	engine->closeFile();
 	data.byte(kHandle) = 0;
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 05b3b3a..39f3a5e 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -91,7 +91,6 @@
 	void oldToNames();
 	void namesToOld();
 	void loadPalFromIFF();
-	void readHeader();
 	void fillSpace();
 	void startLoading(const Room &room);
 	Sprite *spriteTable();
diff --git a/engines/dreamweb/vgagrafx.cpp b/engines/dreamweb/vgagrafx.cpp
index 1088058..4ad5237 100644
--- a/engines/dreamweb/vgagrafx.cpp
+++ b/engines/dreamweb/vgagrafx.cpp
@@ -431,11 +431,13 @@ void DreamGenContext::zoom() {
 }
 
 void DreamGenContext::panelToMap() {
-	multiGet(getSegment(data.word(kMapstore)).ptr(0, 0), data.word(kMapxstart) + data.word(kMapadx), data.word(kMapystart) + data.word(kMapady), data.byte(kMapxsize), data.byte(kMapysize));
+	SegmentRef mapstore = getSegment(data.word(kMapstore));
+	multiGet(getSegment(mapstore).ptr(0, 0), data.word(kMapxstart) + data.word(kMapadx), data.word(kMapystart) + data.word(kMapady), data.byte(kMapxsize), data.byte(kMapysize));
 }
 
 void DreamGenContext::mapToPanel() {
-	multiPut(getSegment(data.word(kMapstore)).ptr(0, 0), data.word(kMapxstart) + data.word(kMapadx), data.word(kMapystart) + data.word(kMapady), data.byte(kMapxsize), data.byte(kMapysize));
+	SegmentRef mapstore = getSegment(data.word(kMapstore));
+	multiPut(getSegment(mapstore).ptr(0, 0), data.word(kMapxstart) + data.word(kMapadx), data.word(kMapystart) + data.word(kMapady), data.byte(kMapxsize), data.byte(kMapysize));
 }
 
 void DreamGenContext::dumpMap() {
@@ -469,15 +471,14 @@ bool DreamGenContext::pixelCheckSet(const ObjPos *pos, uint8 x, uint8 y) {
 }
 
 void DreamGenContext::loadPalFromIFF() {
-	dx = kPalettescreen;
-	openFile();
-	cx = 2000;
-	ds = data.word(kMapstore);
-	dx = 0;
-	readFromFile();
-	closeFile();
-
-	const uint8 *src = getSegment(data.word(kMapstore)).ptr(0x30, 0);
+	SegmentRef mapstore = getSegment(data.word(kMapstore));
+
+	// TODO: Get rid of data blob position kPalettescreen;
+	engine->openFile("DREAMWEB.PAL");
+	engine->readFromFile(mapstore.ptr(0, 2000), 2000);
+	engine->closeFile();
+
+	const uint8 *src = mapstore.ptr(0x30, 0);
 	uint8 *dst = mainPalette();
 	for (size_t i = 0; i < 256*3; ++i) {
 		uint8 c = src[i] / 4;






More information about the Scummvm-git-logs mailing list