aboutsummaryrefslogtreecommitdiff
path: root/engines/hugo
diff options
context:
space:
mode:
Diffstat (limited to 'engines/hugo')
-rwxr-xr-xengines/hugo/file.cpp4
-rwxr-xr-xengines/hugo/inventory.cpp3
-rwxr-xr-xengines/hugo/mouse.cpp6
-rwxr-xr-xengines/hugo/parser.cpp3
4 files changed, 10 insertions, 6 deletions
diff --git a/engines/hugo/file.cpp b/engines/hugo/file.cpp
index 4ccabc01f0..672051fe2b 100755
--- a/engines/hugo/file.cpp
+++ b/engines/hugo/file.cpp
@@ -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
diff --git a/engines/hugo/inventory.cpp b/engines/hugo/inventory.cpp
index 1988e9b1cb..c5f09ad653 100755
--- a/engines/hugo/inventory.cpp
+++ b/engines/hugo/inventory.cpp
@@ -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)
diff --git a/engines/hugo/mouse.cpp b/engines/hugo/mouse.cpp
index 581a455469..329b0b4fc7 100755
--- a/engines/hugo/mouse.cpp
+++ b/engines/hugo/mouse.cpp
@@ -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;
}
}
diff --git a/engines/hugo/parser.cpp b/engines/hugo/parser.cpp
index c184000602..c9c3b8dc4e 100755
--- a/engines/hugo/parser.cpp
+++ b/engines/hugo/parser.cpp
@@ -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) &&