[Scummvm-cvs-logs] SF.net SVN: scummvm: [26971] scummvm/trunk/engines/agos

Kirben at users.sourceforge.net Kirben at users.sourceforge.net
Sun May 27 13:54:02 CEST 2007


Revision: 26971
          http://scummvm.svn.sourceforge.net/scummvm/?rev=26971&view=rev
Author:   Kirben
Date:     2007-05-27 04:54:01 -0700 (Sun, 27 May 2007)

Log Message:
-----------
Adjust code for paranoid compilers.

Modified Paths:
--------------
    scummvm/trunk/engines/agos/cursor.cpp
    scummvm/trunk/engines/agos/gfx.cpp

Modified: scummvm/trunk/engines/agos/cursor.cpp
===================================================================
--- scummvm/trunk/engines/agos/cursor.cpp	2007-05-27 11:49:08 UTC (rev 26970)
+++ scummvm/trunk/engines/agos/cursor.cpp	2007-05-27 11:54:01 UTC (rev 26971)
@@ -664,7 +664,7 @@
 	} else if (getGameType() == GType_SIMON1) {
 		CursorMan.replaceCursor(_mouseData, 16, 16, 0, 0, 0xFF);
 	} else {
-		const uint16 *src = NULL;
+		const uint16 *src;
 		int i, j;
 
 		const uint8 color = (getGameType() == GType_ELVIRA1) ? 15: 65;
@@ -708,7 +708,7 @@
 			} else {
 				src = _common_crossbowInfo2;
 			}
-		} else if (getGameType() == GType_ELVIRA1) {
+		} else {
 			if (_mouseCursor == 0) {
 				src = _common_mouseInfo;
 			} else if (_mouseCursor == 1) {
@@ -721,8 +721,6 @@
 		if (_dragFlag != 0)
 			src = _common_handInfo;
 
-		assert(src);
-
 		for (i = 0; i < 16; i++) {
 			for (j = 0; j < 16; j++) {
 				if (src[0] & (1 << (15 - (j % 16)))) {

Modified: scummvm/trunk/engines/agos/gfx.cpp
===================================================================
--- scummvm/trunk/engines/agos/gfx.cpp	2007-05-27 11:49:08 UTC (rev 26970)
+++ scummvm/trunk/engines/agos/gfx.cpp	2007-05-27 11:54:01 UTC (rev 26971)
@@ -630,7 +630,7 @@
 	if (getFeatures() & GF_32COLOR)
 		state->palette = 0xC0;
 
-	uint16 xoffs = 0, yoffs = 0;
+	uint16 xoffs, yoffs;
 	if (getGameType() == GType_SIMON2) {
 		state->surf2_addr = getBackGround();
 		state->surf2_pitch = _screenWidth;
@@ -667,7 +667,7 @@
 			xoffs = (vlut[0] * 2 + state->x) * 8;
 			yoffs = vlut[1] + state->y;
 		}
-	} else if (getGameType() == GType_SIMON1) {
+	} else {
 		if (_windowNum == 3 || _windowNum == 4 || _windowNum >= 10) {
 			if (_window3Flag == 1) {
 				state->surf2_addr = getBackGround();
@@ -810,7 +810,7 @@
 	if (!drawImage_clip(state))
 		return;
 
-	uint16 xoffs = 0, yoffs = 0;
+	uint16 xoffs, yoffs;
 	if (getGameType() == GType_WW) {
 		if (_windowNum == 4 || (_windowNum >= 10 && _windowNum <= 27)) {
 			state->surf_addr = _window4BackScn;
@@ -851,7 +851,7 @@
 			xoffs = (vlut[0] * 2 + state->x) * 8;
 			yoffs = vlut[1] + state->y;
 		}
-	} else if (getGameType() == GType_ELVIRA1) {
+	} else {
 		if (_windowNum == 6) {
 			state->surf_addr = _window6BackScn;
 			state->surf_pitch = 48;	
@@ -1301,8 +1301,8 @@
 		uint height = _videoWindows[updateWindow * 4 + 3];
 
 		byte *dst = getBackGround() + xoffs + yoffs * _screenWidth;
-		byte *src = dst;
-		uint srcWidth = 0;
+		byte *src;
+		uint srcWidth;
 
 		if (getGameType() == GType_SIMON2) {
 			src = _window4BackScn + xoffs + yoffs * 320;
@@ -1355,7 +1355,7 @@
 				_lockWord &= ~0x20;
 				return;
 			}
-		} else if (getGameType() == GType_ELVIRA1) {
+		} else {
 			if (updateWindow == 6) {
 				_window6Flag = 1;
 				src = _window6BackScn;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list