aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2010-08-17 09:47:46 +0000
committerEugene Sandulenko2010-08-17 09:47:46 +0000
commit7d7acd704210c2f0a0c4c3edb10625178053b1da (patch)
treeaab5ce21359128041f11dd9739df39c0f29f2494
parentaa16c9e04699e9f441db071d7e27ebfcad17074c (diff)
downloadscummvm-rg350-7d7acd704210c2f0a0c4c3edb10625178053b1da.tar.gz
scummvm-rg350-7d7acd704210c2f0a0c4c3edb10625178053b1da.tar.bz2
scummvm-rg350-7d7acd704210c2f0a0c4c3edb10625178053b1da.zip
HUGO: Fix warnings
svn-id: r52139
-rwxr-xr-xengines/hugo/engine.cpp6
-rwxr-xr-xengines/hugo/file.cpp4
-rwxr-xr-xengines/hugo/game.h12
3 files changed, 11 insertions, 11 deletions
diff --git a/engines/hugo/engine.cpp b/engines/hugo/engine.cpp
index ef93ef6279..f27f38c574 100755
--- a/engines/hugo/engine.cpp
+++ b/engines/hugo/engine.cpp
@@ -235,7 +235,7 @@ void HugoEngine::moveObjects() {
seq_t *currImage;
int x1, x2, y1, y2; // object coordinates
int dx, dy; // Allowable motion wrt boundary
- char radius; // Radius for chase (8 bit signed)
+ int8 radius; // Radius for chase (8 bit signed)
debugC(4, kDebugEngine, "moveObjects");
@@ -465,7 +465,7 @@ int HugoEngine::deltaY(int x1, int x2, int vy, int y) {
inc = (vy > 0 ? 1 : -1);
for (j = y + inc; j != (y + vy + inc); j += inc) //Search by byte
for (i = x1 >> 3; i <= x2 >> 3; i++)
- if (b = _boundary[j * XBYTES + i] | _objBound[j * XBYTES + i]) { // Any bit set
+ if ((b = _boundary[j * XBYTES + i] | _objBound[j * XBYTES + i]) != 0) { // Any bit set
// Make sure boundary bits fall on line segment
if (i == (x2 >> 3)) // Adjust right end
b &= 0xff << ((i << 3) + 7 - x2);
@@ -921,7 +921,7 @@ void HugoEngine::setNewScreen(int screenNum) {
// An object has collided with a boundary. See if any actions are required
void HugoEngine::boundaryCollision(object_t *obj) {
int x, y, dx, dy;
- char radius; // 8 bits signed
+ int8 radius; // 8 bits signed
hotspot_t *hotspot;
debugC(1, kDebugEngine, "boundaryCollision");
diff --git a/engines/hugo/file.cpp b/engines/hugo/file.cpp
index 0a20c8a67b..4ccabc01f0 100755
--- a/engines/hugo/file.cpp
+++ b/engines/hugo/file.cpp
@@ -51,7 +51,7 @@ byte *FileManager::convertPCC(byte *p, uint16 y, uint16 bpl, image_pt dataPtr) {
// Convert 4 planes (RGBI) data to 8-bit DIB format
// Return original plane data ptr
uint16 r, g, b, i; // Byte index within each plane
- char bit; // Bit index within a byte
+ int8 bit; // Bit index within a byte
debugC(2, kDebugFile, "convertPCC(byte *p, %d, %d, image_pt data_p)", y, bpl);
@@ -337,7 +337,7 @@ void FileManager::readOverlay(int screenNum, image_pt image, ovl_t overlayType)
// Open and read in an overlay file, close file
uint32 i;
int16 j, k;
- char data; // Must be 8 bits signed
+ int8 data; // Must be 8 bits signed
image_pt tmpImage = image; // temp ptr to overlay file
sceneBlock_t sceneBlock; // Database header entry
diff --git a/engines/hugo/game.h b/engines/hugo/game.h
index e2e685c193..e8eeae75cb 100755
--- a/engines/hugo/game.h
+++ b/engines/hugo/game.h
@@ -361,7 +361,7 @@ struct act10 { // Type 10 - Initialise an o
int timer; // Time to set off the action
int objNumb; // The object number
int newPathType; // New path type
- char vxPath, vyPath; // Max delta velocities e.g. for CHASE
+ int8 vxPath, vyPath; // Max delta velocities e.g. for CHASE
};
struct act11 { // Type 11 - Conditional on object's state
@@ -400,7 +400,7 @@ struct act15 { // Type 15 - Home in on an o
int timer; // Time to set off the action
int obj1; // The object number homing in
int obj2; // The object number to home in on
- char dx, dy; // Max delta velocities
+ int8 dx, dy; // Max delta velocities
};
// Note: Don't set a sequence at time 0 of a new screen, it causes
// problems clearing the boundary bits of the object! timer > 0 is safe
@@ -734,11 +734,11 @@ struct object_t {
byte cycleNumb; // No. of times to cycle
byte frameInterval; // Interval (in ticks) between frames
byte frameTimer; // Decrementing timer for above
- char radius; // Defines sphere of influence by hero
+ int8 radius; // Defines sphere of influence by hero
byte screenIndex; // Screen in which object resides
int x, y; // Current coordinates of object
int oldx, oldy; // Previous coordinates of object
- char vx, vy; // Velocity
+ int8 vx, vy; // Velocity
byte objValue; // Value of object
int genericCmd; // Bit mask of 'generic' commands for object
uint16 cmdIndex; // ptr to list of cmd structures for verbs
@@ -750,8 +750,8 @@ struct object_t {
int16 direction; // Direction to view object from
byte curSeqNum; // Save which seq number currently in use
byte curImageNum; // Save which image of sequence currently in use
- char oldvx; // Previous vx (used in wandering)
- char oldvy; // Previous vy
+ int8 oldvx; // Previous vx (used in wandering)
+ int8 oldvy; // Previous vy
};
// Following is structure of verbs and nouns for 'background' objects