[Scummvm-cvs-logs] SF.net SVN: scummvm:[52146] scummvm/trunk/engines/hugo

sev at users.sourceforge.net sev at users.sourceforge.net
Tue Aug 17 13:00:30 CEST 2010


Revision: 52146
          http://scummvm.svn.sourceforge.net/scummvm/?rev=52146&view=rev
Author:   sev
Date:     2010-08-17 11:00:29 +0000 (Tue, 17 Aug 2010)

Log Message:
-----------
HUGO: Fix warnings

Modified Paths:
--------------
    scummvm/trunk/engines/hugo/file.cpp
    scummvm/trunk/engines/hugo/inventory.cpp
    scummvm/trunk/engines/hugo/mouse.cpp
    scummvm/trunk/engines/hugo/parser.cpp

Modified: scummvm/trunk/engines/hugo/file.cpp
===================================================================
--- scummvm/trunk/engines/hugo/file.cpp	2010-08-17 11:00:00 UTC (rev 52145)
+++ scummvm/trunk/engines/hugo/file.cpp	2010-08-17 11:00:29 UTC (rev 52146)
@@ -152,7 +152,7 @@
 // Read object file of PCC images into object supplied
 	byte       x, y, j, k;
 	uint16     x2;                                  // Limit on x in image data
-	seq_t     *seqPtr;                              // Ptr to sequence structure
+	seq_t     *seqPtr = 0;                          // Ptr to sequence structure
 	image_pt   dibPtr;                              // Ptr to DIB data
 	objBlock_t objBlock;                            // Info on file within database
 	bool       firstFl = true;                      // Initializes pcx read function
@@ -335,7 +335,7 @@
 
 void FileManager::readOverlay(int screenNum, image_pt image, ovl_t overlayType) {
 // Open and read in an overlay file, close file
-	uint32       i;
+	uint32       i = 0;
 	int16        j, k;
 	int8         data;                              // Must be 8 bits signed
 	image_pt     tmpImage = image;                  // temp ptr to overlay file

Modified: scummvm/trunk/engines/hugo/inventory.cpp
===================================================================
--- scummvm/trunk/engines/hugo/inventory.cpp	2010-08-17 11:00:00 UTC (rev 52145)
+++ scummvm/trunk/engines/hugo/inventory.cpp	2010-08-17 11:00:29 UTC (rev 52146)
@@ -136,7 +136,7 @@
 		cursory -= DIBOFF_Y;                        // Icon bar is at true zero
 		if (cursory > 0 && cursory < INV_DY) {      // Within icon bar?
 			i = cursorx / INV_DX;                   // Compute icon index
-			if (scrollFl)                           // Scroll buttons displayed
+			if (scrollFl) {                          // Scroll buttons displayed
 				if (i == 0)                         // Left scroll button
 					objId = LEFT_ARROW;
 				else {
@@ -145,6 +145,7 @@
 					else                            // Adjust for scroll
 						i += firstIconId - 1;       // i is icon index
 				}
+			}
 
 			// If not an arrow, find object id - limit to valid range
 			if (objId == -1 && i < displayNumb)

Modified: scummvm/trunk/engines/hugo/mouse.cpp
===================================================================
--- scummvm/trunk/engines/hugo/mouse.cpp	2010-08-17 11:00:00 UTC (rev 52145)
+++ scummvm/trunk/engines/hugo/mouse.cpp	2010-08-17 11:00:29 UTC (rev 52146)
@@ -131,11 +131,12 @@
 			_vm.useObject(objId);                   // Pick up or use object
 			break;
 		default:                                    // Walk to view point if possible
-			if (!_vm.route().startRoute(GO_GET, objId, obj->viewx, obj->viewy))
+			if (!_vm.route().startRoute(GO_GET, objId, obj->viewx, obj->viewy)) {
 				if (_vm._hero->cycling == INVISIBLE)    // If invisible do
 					_vm.useObject(objId);           // immediate use
 				else
 					Utils::Box(BOX_ANY, _vm._textMouse[kMsNoWayText]);      // Can't get there
+			}
 			break;
 		}
 	}
@@ -213,11 +214,12 @@
 				_vm.lookObject(obj);
 				break;
 			default:                                // Walk to view point if possible
-				if (!_vm.route().startRoute(GO_LOOK, objId, obj->viewx, obj->viewy))
+				if (!_vm.route().startRoute(GO_LOOK, objId, obj->viewx, obj->viewy)) {
 					if (_vm._hero->cycling == INVISIBLE)    // If invisible do
 						_vm.lookObject(obj);            // immediate decription
 					else
 						Utils::Box(BOX_ANY, _vm._textMouse[kMsNoWayText]);  // Can't get there
+				}
 				break;
 			}
 		}

Modified: scummvm/trunk/engines/hugo/parser.cpp
===================================================================
--- scummvm/trunk/engines/hugo/parser.cpp	2010-08-17 11:00:00 UTC (rev 52145)
+++ scummvm/trunk/engines/hugo/parser.cpp	2010-08-17 11:00:29 UTC (rev 52146)
@@ -437,7 +437,7 @@
 		return(false);
 	}
 
-	if (obj->cycling == INVISIBLE)
+	if (obj->cycling == INVISIBLE) {
 		if (obj->seqNumb) {
 			// There is an image
 			strcpy(comment, _vm._textParser[kCmtAny3]);
@@ -456,6 +456,7 @@
 					strcpy(comment, _vm._textParser[kCmtClose]);
 				return(false);
 			}
+	}
 
 	if ((obj->radius < 0) ||
 	        ((abs(obj->x - _vm._hero->x) <= obj->radius) &&


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