HUGO: Fix warnings

svn-id: r52146
This commit is contained in:
Eugene Sandulenko 2010-08-17 11:00:29 +00:00
parent 789219022a
commit 2c545ae1f3
4 changed files with 10 additions and 6 deletions

View File

@ -152,7 +152,7 @@ void FileManager::readImage(int objNum, object_t *objPtr) {
// 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 @@ bool FileManager::fileExists(char *filename) {
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

View File

@ -136,7 +136,7 @@ int16 InventoryHandler::processInventory(invact_t action, ...) {
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 @@ int16 InventoryHandler::processInventory(invact_t action, ...) {
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)

View File

@ -131,11 +131,12 @@ void MouseHandler::processRightClick(int16 objId, int16 cx, int16 cy) {
_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 @@ void MouseHandler::processLeftClick(int16 objId, int16 cx, int16 cy) {
_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;
}
}

View File

@ -437,7 +437,7 @@ bool Parser::isNear(object_t *obj, char *verb, char *comment) {
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 @@ bool Parser::isNear(object_t *obj, char *verb, char *comment) {
strcpy(comment, _vm._textParser[kCmtClose]);
return(false);
}
}
if ((obj->radius < 0) ||
((abs(obj->x - _vm._hero->x) <= obj->radius) &&