[Scummvm-cvs-logs] scummvm master -> 4062a9653d5087259bebe34704051caa798034e7

bluegr md5 at scummvm.org
Sat Oct 15 11:39:27 CEST 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:
63b3db2753 MADE: Graphics::Surface is a struct, not a class
4062a9653d DREAMWEB: Silenced warnings, applied coding conventions


Commit: 63b3db27539605f9ba5115757cb8c4fdf17d67af
    https://github.com/scummvm/scummvm/commit/63b3db27539605f9ba5115757cb8c4fdf17d67af
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2011-10-15T02:24:31-07:00

Commit Message:
MADE: Graphics::Surface is a struct, not a class

Changed paths:
    engines/made/resource.h



diff --git a/engines/made/resource.h b/engines/made/resource.h
index 1ce01aa..9e0a729 100644
--- a/engines/made/resource.h
+++ b/engines/made/resource.h
@@ -38,7 +38,7 @@ class AudioStream;
 }
 
 namespace Graphics {
-class Surface;
+struct Surface;
 }
 
 namespace Made {


Commit: 4062a9653d5087259bebe34704051caa798034e7
    https://github.com/scummvm/scummvm/commit/4062a9653d5087259bebe34704051caa798034e7
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2011-10-15T02:24:32-07:00

Commit Message:
DREAMWEB: Silenced warnings, applied coding conventions

- Silenced a lot of signed/unsigned MSVC warnings
- Changed (rarely used) "not" keywords to "!"

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



diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp
index 864bba1..3b67bfb 100644
--- a/engines/dreamweb/sprite.cpp
+++ b/engines/dreamweb/sprite.cpp
@@ -243,7 +243,7 @@ void DreamGenContext::aboutturn(Sprite *sprite) {
 		data.byte(kFacing) = (data.byte(kFacing) + 1) & 7;
 		sprite->b29 = 0;
 	} else {
-		data.byte(kTurndirection) = -1;
+		data.byte(kTurndirection) = (uint8)-1;
 		data.byte(kFacing) = (data.byte(kFacing) - 1) & 7;
 		sprite->b29 = 0;
 	}
@@ -295,17 +295,17 @@ void DreamGenContext::random(Sprite *sprite, SetObject *objData) {
 }
 
 void DreamGenContext::doorway(Sprite *sprite, SetObject *objData) {
-	data.byte(kDoorcheck1) = -24;
+	data.byte(kDoorcheck1) = (uint8)-24;
 	data.byte(kDoorcheck2) = 10;
-	data.byte(kDoorcheck3) = -30;
+	data.byte(kDoorcheck3) = (uint8)-30;
 	data.byte(kDoorcheck4) = 10;
 	dodoor(sprite, objData);
 }
 
 void DreamGenContext::widedoor(Sprite *sprite, SetObject *objData) {
-	data.byte(kDoorcheck1) = -24;
+	data.byte(kDoorcheck1) = (uint8)-24;
 	data.byte(kDoorcheck2) = 24;
-	data.byte(kDoorcheck3) = -30;
+	data.byte(kDoorcheck3) = (uint8)-30;
 	data.byte(kDoorcheck4) = 24;
 	dodoor(sprite, objData);
 }
@@ -782,7 +782,7 @@ void DreamGenContext::madman() {
 			ax = pop();
 			bx = pop();
 			es = pop();
-			data.byte(kCombatcount) = -1;
+			data.byte(kCombatcount) = (uint8)-1;
 			data.byte(kSpeechcount) = 0;
 		}
 		++ax;
@@ -811,7 +811,7 @@ void DreamGenContext::madman() {
 				else {
 					if (data.byte(kLastweapon) == 8) {
 						data.byte(kCombatcount) = isCD() ? 72 : 70;
-						data.byte(kLastweapon) = -1;
+						data.byte(kLastweapon) = (uint8)-1;
 						data.byte(kMadmanflag) = 1;
 						ax = 67;
 					}
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index e3295b3..bfa22f4 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -127,7 +127,7 @@ void DreamGenContext::dreamweb() {
 			data.byte(kLastflag) = 32;
 			startup1();
 			data.byte(kVolumeto) = 0;
-			data.byte(kVolumedirection) = -1;
+			data.byte(kVolumedirection) = (uint8)-1;
 			data.byte(kCommandtype) = 255;
 
 		}
@@ -769,7 +769,7 @@ void DreamGenContext::startloading(const Room *room) {
 	data.byte(kCounttoopen) = room->countToOpen;
 	data.byte(kLiftpath) = room->liftPath;
 	data.byte(kDoorpath) = room->doorPath;
-	data.byte(kLastweapon) = -1;
+	data.byte(kLastweapon) = (uint8)-1;
 	al = room->b27;
 	push(ax);
 	al = room->b31;
@@ -867,7 +867,7 @@ void DreamGenContext::startloading(const Room *room) {
 	autoappear();
 	al = data.byte(kNewlocation);
 	getroomdata();
-	data.byte(kLastweapon) = -1;
+	data.byte(kLastweapon) = (uint8)-1;
 	data.byte(kMandead) = 0;
 	data.word(kLookcounter) = 160;
 	data.byte(kNewlocation) = 255;
@@ -973,7 +973,7 @@ void DreamGenContext::commandonly(uint8 command) {
 }
 
 void DreamGenContext::checkifperson() {
-	flags._z = not checkifperson(al, ah);
+	flags._z = !checkifperson(al, ah);
 }
 
 bool DreamGenContext::checkifperson(uint8 x, uint8 y) {
@@ -1007,7 +1007,7 @@ bool DreamGenContext::checkifperson(uint8 x, uint8 y) {
 }
 
 void DreamGenContext::checkiffree() {
-	flags._z = not checkiffree(al, ah);
+	flags._z = !checkiffree(al, ah);
 }
 
 bool DreamGenContext::checkiffree(uint8 x, uint8 y) {
@@ -1031,7 +1031,7 @@ bool DreamGenContext::checkiffree(uint8 x, uint8 y) {
 }
 
 void DreamGenContext::checkifex() {
-	flags._z = not checkifex(al, ah);
+	flags._z = !checkifex(al, ah);
 }
 
 bool DreamGenContext::checkifex(uint8 x, uint8 y) {
@@ -1807,7 +1807,8 @@ void DreamGenContext::hangonp(uint16 count) {
 	showpointer();
 	vsync();
 	dumppointer();
-	for (size_t i = 0; i < count * 3; ++i) {
+	uint32 counter = count;	// silence a signed/unsigned MSVC warning below
+	for (uint32 i = 0; i < counter * 3; ++i) {
 		delpointer();
 		readmouse();
 		animpointer();






More information about the Scummvm-git-logs mailing list