diff options
author | Paweł Kołodziejski | 2004-10-16 20:38:37 +0000 |
---|---|---|
committer | Paweł Kołodziejski | 2004-10-16 20:38:37 +0000 |
commit | c9a552bebcfd97907237654a308a0be55c9dc5e6 (patch) | |
tree | c0ba99c1a86a4cb702da081ed3b787f264d2c554 /scumm | |
parent | 2337d924ce3c9513a1f2e11fa2f63f5eaaa75ee4 (diff) | |
download | scummvm-rg350-c9a552bebcfd97907237654a308a0be55c9dc5e6.tar.gz scummvm-rg350-c9a552bebcfd97907237654a308a0be55c9dc5e6.tar.bz2 scummvm-rg350-c9a552bebcfd97907237654a308a0be55c9dc5e6.zip |
fixed warnings
svn-id: r15574
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/intern.h | 2 | ||||
-rw-r--r-- | scumm/script_v100he.cpp | 2 | ||||
-rw-r--r-- | scumm/script_v72he.cpp | 6 | ||||
-rw-r--r-- | scumm/script_v80he.cpp | 6 | ||||
-rw-r--r-- | scumm/script_v90he.cpp | 14 | ||||
-rw-r--r-- | scumm/scumm.cpp | 2 |
6 files changed, 16 insertions, 16 deletions
diff --git a/scumm/intern.h b/scumm/intern.h index 04a73e6fad..a80cebe11b 100644 --- a/scumm/intern.h +++ b/scumm/intern.h @@ -712,7 +712,7 @@ protected: void writeFileFromArray(int slot, int resID); void displayWizImage(const WizImage *pwi); - void getWizImageDim(int resnum, int state, uint32 &w, uint32 &h); + void getWizImageDim(int resnum, int state, int32 &w, int32 &h); uint8 *drawWizImage(int restype, const WizImage *pwi); void drawWizPolygon(int resnum, int state, int id, int flags); void flushWizBuffer(); diff --git a/scumm/script_v100he.cpp b/scumm/script_v100he.cpp index 4a484d15b6..90e81ca660 100644 --- a/scumm/script_v100he.cpp +++ b/scumm/script_v100he.cpp @@ -1602,7 +1602,7 @@ void ScummEngine_v100he::o100_unknown27() { void ScummEngine_v100he::o100_unknown29() { int state, resId; - uint32 w, h; + int32 w, h; int16 x, y; byte subOp = fetchScriptByte(); diff --git a/scumm/script_v72he.cpp b/scumm/script_v72he.cpp index 78d45c7e9c..a858188c6b 100644 --- a/scumm/script_v72he.cpp +++ b/scumm/script_v72he.cpp @@ -1546,7 +1546,7 @@ void ScummEngine_v72he::displayWizImage(const WizImage *pwi) { } } -void ScummEngine_v72he::getWizImageDim(int resnum, int state, uint32 &w, uint32 &h) { +void ScummEngine_v72he::getWizImageDim(int resnum, int state, int32 &w, int32 &h) { const uint8 *dataPtr = getResourceAddress(rtImage, resnum); if (dataPtr) { const uint8 *wizh = findWrappedBlock(MKID('WIZH'), dataPtr, state, 0); @@ -1734,7 +1734,7 @@ void ScummEngine_v72he::drawWizPolygon(int resnum, int state, int id, int flags) error("Invalid coords polygon %d", wp->id); } - uint32 wizW, wizH; + int32 wizW, wizH; getWizImageDim(resnum, state, wizW, wizH); Common::Point bbox[4]; bbox[0].x = 0; @@ -1782,7 +1782,7 @@ void ScummEngine_v72he::drawWizPolygon(int resnum, int state, int id, int flags) int32 y_step = ((pia->y2 - pia->y1) << 0x10) / dx; while (dx--) { uint srcWizOff = (y_acc >> 0x10) * wizW + (x_acc >> 0x10); - assert(srcWizOff < wizW * wizH); + assert(srcWizOff < (uint32)(wizW * wizH)); x_acc += x_step; y_acc += y_step; *dstPtr++ = srcWizBuf[srcWizOff]; diff --git a/scumm/script_v80he.cpp b/scumm/script_v80he.cpp index 45c885b55c..a51fe9718f 100644 --- a/scumm/script_v80he.cpp +++ b/scumm/script_v80he.cpp @@ -440,7 +440,7 @@ void ScummEngine_v80he::o80_unknown49() { void ScummEngine_v80he::o80_localizeArrayToRoom() { int slot = pop(); - localizeArray(slot, 0xFFFFFFFF); + localizeArray(slot, (byte)0xFFFFFFFF); } void ScummEngine_v80he::o80_readConfigFile() { @@ -595,7 +595,7 @@ void ScummEngine_v80he::loadWizCursor(int resId, int resType, bool state) { wi.state = 0; wi.flags = 0x20; uint8 *cursor = drawWizImage(rtImage, &wi); - uint32 cw, ch; + int32 cw, ch; getWizImageDim(resId, 0, cw, ch); setCursorFromBuffer(cursor, cw, ch, cw); setCursorHotspot(x, y); @@ -703,7 +703,7 @@ void ScummEngine_v80he::o80_pickVarRandom() { if (readVar(value) == 0) { defineArray(value, kDwordArray, 0, 0, 0, num); if (value & 0x8000) - localizeArray(readVar(value), 0xFFFFFFFF); + localizeArray(readVar(value), (byte)0xFFFFFFFF); else if (value & 0x4000) localizeArray(readVar(value), vm.slot[_currentScript].number); diff --git a/scumm/script_v90he.cpp b/scumm/script_v90he.cpp index 0e234f6f16..203101756f 100644 --- a/scumm/script_v90he.cpp +++ b/scumm/script_v90he.cpp @@ -425,14 +425,14 @@ void ScummEngine_v90he::o90_sqrt() { if (i < 2) { push(i); } else { - push((int)sqrt(i + 1)); + push((int)sqrt((double)(i + 1))); } } void ScummEngine_v90he::o90_atan2() { int y = pop(); int x = pop(); - int a = (int)(atan2(y, x) * 180. / PI); + int a = (int)(atan2((double)y, (double)x) * 180. / PI); if (a < 0) { a += 360; } @@ -444,7 +444,7 @@ void ScummEngine_v90he::o90_getSegmentAngle() { int x1 = pop(); int dy = y1 - pop(); int dx = x1 - pop(); - int a = (int)(atan2(dy, dx) * 180. / PI); + int a = (int)(atan2((double)dy, (double)dx) * 180. / PI); if (a < 0) { a += 360; } @@ -478,7 +478,7 @@ void ScummEngine_v90he::o90_jumpToScriptUnk() { void ScummEngine_v90he::drawWizComplexPolygon(int resnum, int state, int po_x, int po_y, int arg14, int angle, int zoom, const Common::Rect *r) { Common::Point pts[4]; - uint32 w, h; + int32 w, h; getWizImageDim(resnum, state, w, h); pts[1].x = pts[2].x = w / 2 - 1; @@ -1141,7 +1141,7 @@ int ScummEngine_v90he::getWizImageStates(int resnum) { void ScummEngine_v90he::o90_unknown29() { int state, resId; - uint32 w, h; + int32 w, h; int16 x, y; byte subOp = fetchScriptByte(); @@ -1309,7 +1309,7 @@ void ScummEngine_v90he::o90_getPolygonOverlap() { int dy = args2[1] - args1[1]; int dist = dx * dx + dy * dy; if (dist >= 2) { - dist = (int)sqrt(dist + 1); + dist = (int)sqrt((double)(dist + 1)); } push((dist > args1[2]) ? 1 : 0); } @@ -1327,7 +1327,7 @@ void ScummEngine_v90he::o90_getPolygonOverlap() { int dy = args2[1] - args1[1]; int dist = dx * dx + dy * dy; if (dist >= 2) { - dist = (int)sqrt(dist + 1); + dist = (int)sqrt((double)(dist + 1)); } push((dist < args1[2] && dist < args2[2]) ? 1 : 0); } diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp index f530558eb4..a3f609f03f 100644 --- a/scumm/scumm.cpp +++ b/scumm/scumm.cpp @@ -1802,7 +1802,7 @@ void ScummEngine::startScene(int room, Actor *a, int objectNr) { // For HE80+ games for (i = 0; i < _numRoomVariables; i++) _roomVars[i] = 0; - nukeArrays(0xFFFFFFFF); + nukeArrays((byte)0xFFFFFFFF); for (i = 1; i < _numActors; i++) { _actors[i].hideActor(); |