[Scummvm-cvs-logs] SF.net SVN: scummvm: [28879] scummvm/trunk/engines/agi

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Sat Sep 8 13:17:14 CEST 2007


Revision: 28879
          http://scummvm.svn.sourceforge.net/scummvm/?rev=28879&view=rev
Author:   fingolfin
Date:     2007-09-08 04:17:13 -0700 (Sat, 08 Sep 2007)

Log Message:
-----------
Fixed various warnings

Modified Paths:
--------------
    scummvm/trunk/engines/agi/picture.cpp
    scummvm/trunk/engines/agi/preagi_mickey.cpp
    scummvm/trunk/engines/agi/saveload.cpp

Modified: scummvm/trunk/engines/agi/picture.cpp
===================================================================
--- scummvm/trunk/engines/agi/picture.cpp	2007-09-08 11:16:40 UTC (rev 28878)
+++ scummvm/trunk/engines/agi/picture.cpp	2007-09-08 11:17:13 UTC (rev 28879)
@@ -66,6 +66,7 @@
 /* For the flood fill routines */
 
 /* MH2 needs stack size > 300 */
+// FIXME: Consider using FixedStack<> or Stack<> from common/stack.h here
 #define STACK_SIZE 512
 static unsigned int stackPtr;
 static uint16 stack[STACK_SIZE];
@@ -401,12 +402,12 @@
 **************************************************************************/
 
 void PictureMgr::plotPattern(int x, int y) {
-	static uint16 binary_list[] = {0x8000, 0x4000, 0x2000, 0x1000, 0x800, 0x400, 0x200, 0x100, 
+	static const uint16 binary_list[] = {0x8000, 0x4000, 0x2000, 0x1000, 0x800, 0x400, 0x200, 0x100, 
 		0x80, 0x40, 0x20, 0x10, 0x8, 0x4, 0x2, 0x1};
 
-	static uint8 circle_list[] = {0, 1, 4, 9, 16, 25, 37, 50};
+	static const uint8 circle_list[] = {0, 1, 4, 9, 16, 25, 37, 50};
 
-	static uint16 circle_data[] =
+	static const uint16 circle_data[] =
 		{0x8000, 
 		0xE000, 0xE000, 0xE000, 
 		0x7000, 0xF800, 0x0F800, 0x0F800, 0x7000, 
@@ -417,7 +418,7 @@
 		0x07C0, 0x1FF0, 0x3FF8, 0x7FFC, 0x7FFC, 0x0FFFE, 0x0FFFE, 0x0FFFE, 0x0FFFE, 0x0FFFE, 0x7FFC, 0x7FFC, 0x3FF8, 0x1FF0, 0x07C0};
 
 	uint16 circle_word;
-	uint16 *circle_ptr;
+	const uint16 *circle_ptr;
 	uint16 counter;
 	uint16 pen_width = 0;
 	int pen_final_x = 0;
@@ -541,7 +542,6 @@
 void PictureMgr::drawPicture() {
 	uint8 act;
 	int drawing;
-	int storedXOffset = 0, storedYOffset = 0;
 
 	_patCode = 0;
 	_patNum = 0;
@@ -695,8 +695,8 @@
 			// FIXME: This is used by Mickey for the crystal animation, but
 			// currently it's very very very slow
 			/*
-			storedXOffset = _xOffset;
-			storedYOffset = _yOffset;
+			int storedXOffset = _xOffset;
+			int storedYOffset = _yOffset;
 			// FIXME: picture coordinates are correct for Mickey only
 			showPic(10, 0, _width, _height);
 			_gfx->doUpdate();

Modified: scummvm/trunk/engines/agi/preagi_mickey.cpp
===================================================================
--- scummvm/trunk/engines/agi/preagi_mickey.cpp	2007-09-08 11:16:40 UTC (rev 28878)
+++ scummvm/trunk/engines/agi/preagi_mickey.cpp	2007-09-08 11:17:13 UTC (rev 28879)
@@ -869,7 +869,6 @@
 	const int w = 80;
 	const int h = 170;
 	uint8 bitmap[h][w];
-	uint8 color = 0, color2 = 0, color3 = 0, color4 = 0;
 
 	// read in logos.bcg
 	sprintf(szFile, IDS_MSA_PATH_LOGO);
@@ -886,10 +885,10 @@
 	// TODO: Show BCG picture
 	for (int y = 0; y < h; y++) {
 		for (int x = 0; x < w; x++) {
-			color  = (uint8)colorBCG[(bitmap[y][x] & 0xf0) / 0x10][0];	// background
-			color2 = (uint8)colorBCG[(bitmap[y][x] & 0xf0) / 0x10][1];	// background
-			color3 = (uint8)colorBCG[ bitmap[y][x] & 0x0f][0];			// foreground
-			color4 = (uint8)colorBCG[ bitmap[y][x] & 0x0f][1];			// foreground
+			uint8 color  = (uint8)colorBCG[(bitmap[y][x] & 0xf0) / 0x10][0];	// background
+			uint8 color2 = (uint8)colorBCG[(bitmap[y][x] & 0xf0) / 0x10][1];	// background
+			uint8 color3 = (uint8)colorBCG[ bitmap[y][x] & 0x0f][0];			// foreground
+			uint8 color4 = (uint8)colorBCG[ bitmap[y][x] & 0x0f][1];			// foreground
 
 			_vm->_picture->putPixel(x * 4,			y,		color);
 			_vm->_picture->putPixel(x * 4 + 1,		y,		color2);

Modified: scummvm/trunk/engines/agi/saveload.cpp
===================================================================
--- scummvm/trunk/engines/agi/saveload.cpp	2007-09-08 11:16:40 UTC (rev 28878)
+++ scummvm/trunk/engines/agi/saveload.cpp	2007-09-08 11:17:13 UTC (rev 28879)
@@ -525,7 +525,7 @@
 	int oldActive = active + 1;
 
 	for (;;) {
-		int sbPos;
+		int sbPos = 0;
 
 		if (oldFirstSlot != _firstSlot || oldActive != active) {
 			char dstr[64];


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