[Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.307,2.308 script_v100he.cpp,2.21,2.22 script_v72he.cpp,2.174,2.175 script_v80he.cpp,2.59,2.60 script_v90he.cpp,2.97,2.98 scumm.cpp,1.258,1.259
Pawel Kolodziejski
aquadran at users.sourceforge.net
Sat Oct 16 13:39:14 CEST 2004
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28958/scumm
Modified Files:
intern.h script_v100he.cpp script_v72he.cpp script_v80he.cpp
script_v90he.cpp scumm.cpp
Log Message:
fixed warnings
Index: intern.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/intern.h,v
retrieving revision 2.307
retrieving revision 2.308
diff -u -d -r2.307 -r2.308
--- intern.h 16 Oct 2004 09:59:39 -0000 2.307
+++ intern.h 16 Oct 2004 20:38:37 -0000 2.308
@@ -712,7 +712,7 @@
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();
Index: script_v100he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v100he.cpp,v
retrieving revision 2.21
retrieving revision 2.22
diff -u -d -r2.21 -r2.22
--- script_v100he.cpp 16 Oct 2004 10:30:22 -0000 2.21
+++ script_v100he.cpp 16 Oct 2004 20:38:37 -0000 2.22
@@ -1602,7 +1602,7 @@
void ScummEngine_v100he::o100_unknown29() {
int state, resId;
- uint32 w, h;
+ int32 w, h;
int16 x, y;
byte subOp = fetchScriptByte();
Index: script_v72he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v72he.cpp,v
retrieving revision 2.174
retrieving revision 2.175
diff -u -d -r2.174 -r2.175
--- script_v72he.cpp 16 Oct 2004 05:10:14 -0000 2.174
+++ script_v72he.cpp 16 Oct 2004 20:38:37 -0000 2.175
@@ -1546,7 +1546,7 @@
}
}
-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 @@
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 @@
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];
Index: script_v80he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v80he.cpp,v
retrieving revision 2.59
retrieving revision 2.60
diff -u -d -r2.59 -r2.60
--- script_v80he.cpp 13 Oct 2004 10:55:50 -0000 2.59
+++ script_v80he.cpp 16 Oct 2004 20:38:37 -0000 2.60
@@ -440,7 +440,7 @@
void ScummEngine_v80he::o80_localizeArrayToRoom() {
int slot = pop();
- localizeArray(slot, 0xFFFFFFFF);
+ localizeArray(slot, (byte)0xFFFFFFFF);
}
void ScummEngine_v80he::o80_readConfigFile() {
@@ -595,7 +595,7 @@
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 @@
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);
Index: script_v90he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v90he.cpp,v
retrieving revision 2.97
retrieving revision 2.98
diff -u -d -r2.97 -r2.98
--- script_v90he.cpp 16 Oct 2004 05:10:15 -0000 2.97
+++ script_v90he.cpp 16 Oct 2004 20:38:37 -0000 2.98
@@ -425,14 +425,14 @@
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 @@
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::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 @@
void ScummEngine_v90he::o90_unknown29() {
int state, resId;
- uint32 w, h;
+ int32 w, h;
int16 x, y;
byte subOp = fetchScriptByte();
@@ -1309,7 +1309,7 @@
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 @@
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);
}
Index: scumm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.cpp,v
retrieving revision 1.258
retrieving revision 1.259
diff -u -d -r1.258 -r1.259
--- scumm.cpp 13 Oct 2004 09:18:17 -0000 1.258
+++ scumm.cpp 16 Oct 2004 20:38:37 -0000 1.259
@@ -1802,7 +1802,7 @@
// 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();
More information about the Scummvm-git-logs
mailing list