fixed warnings
svn-id: r15574
This commit is contained in:
parent
2337d924ce
commit
c9a552bebc
7 changed files with 17 additions and 17 deletions
|
@ -232,7 +232,7 @@ int SndRes::loadVocSound(byte *snd_res, size_t snd_res_len, R_SOUNDBUFFER *snd_b
|
||||||
|
|
||||||
int SndRes::getVoiceLength(uint32 voice_rn) {
|
int SndRes::getVoiceLength(uint32 voice_rn) {
|
||||||
int res_type = _snd_info.res_type;
|
int res_type = _snd_info.res_type;
|
||||||
uint32 length;
|
uint32 length = 0;
|
||||||
|
|
||||||
double ms_f;
|
double ms_f;
|
||||||
int ms_i = -1;
|
int ms_i = -1;
|
||||||
|
|
|
@ -712,7 +712,7 @@ protected:
|
||||||
void writeFileFromArray(int slot, int resID);
|
void writeFileFromArray(int slot, int resID);
|
||||||
|
|
||||||
void displayWizImage(const WizImage *pwi);
|
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);
|
uint8 *drawWizImage(int restype, const WizImage *pwi);
|
||||||
void drawWizPolygon(int resnum, int state, int id, int flags);
|
void drawWizPolygon(int resnum, int state, int id, int flags);
|
||||||
void flushWizBuffer();
|
void flushWizBuffer();
|
||||||
|
|
|
@ -1602,7 +1602,7 @@ void ScummEngine_v100he::o100_unknown27() {
|
||||||
|
|
||||||
void ScummEngine_v100he::o100_unknown29() {
|
void ScummEngine_v100he::o100_unknown29() {
|
||||||
int state, resId;
|
int state, resId;
|
||||||
uint32 w, h;
|
int32 w, h;
|
||||||
int16 x, y;
|
int16 x, y;
|
||||||
|
|
||||||
byte subOp = fetchScriptByte();
|
byte subOp = fetchScriptByte();
|
||||||
|
|
|
@ -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);
|
const uint8 *dataPtr = getResourceAddress(rtImage, resnum);
|
||||||
if (dataPtr) {
|
if (dataPtr) {
|
||||||
const uint8 *wizh = findWrappedBlock(MKID('WIZH'), dataPtr, state, 0);
|
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);
|
error("Invalid coords polygon %d", wp->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 wizW, wizH;
|
int32 wizW, wizH;
|
||||||
getWizImageDim(resnum, state, wizW, wizH);
|
getWizImageDim(resnum, state, wizW, wizH);
|
||||||
Common::Point bbox[4];
|
Common::Point bbox[4];
|
||||||
bbox[0].x = 0;
|
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;
|
int32 y_step = ((pia->y2 - pia->y1) << 0x10) / dx;
|
||||||
while (dx--) {
|
while (dx--) {
|
||||||
uint srcWizOff = (y_acc >> 0x10) * wizW + (x_acc >> 0x10);
|
uint srcWizOff = (y_acc >> 0x10) * wizW + (x_acc >> 0x10);
|
||||||
assert(srcWizOff < wizW * wizH);
|
assert(srcWizOff < (uint32)(wizW * wizH));
|
||||||
x_acc += x_step;
|
x_acc += x_step;
|
||||||
y_acc += y_step;
|
y_acc += y_step;
|
||||||
*dstPtr++ = srcWizBuf[srcWizOff];
|
*dstPtr++ = srcWizBuf[srcWizOff];
|
||||||
|
|
|
@ -440,7 +440,7 @@ void ScummEngine_v80he::o80_unknown49() {
|
||||||
|
|
||||||
void ScummEngine_v80he::o80_localizeArrayToRoom() {
|
void ScummEngine_v80he::o80_localizeArrayToRoom() {
|
||||||
int slot = pop();
|
int slot = pop();
|
||||||
localizeArray(slot, 0xFFFFFFFF);
|
localizeArray(slot, (byte)0xFFFFFFFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScummEngine_v80he::o80_readConfigFile() {
|
void ScummEngine_v80he::o80_readConfigFile() {
|
||||||
|
@ -595,7 +595,7 @@ void ScummEngine_v80he::loadWizCursor(int resId, int resType, bool state) {
|
||||||
wi.state = 0;
|
wi.state = 0;
|
||||||
wi.flags = 0x20;
|
wi.flags = 0x20;
|
||||||
uint8 *cursor = drawWizImage(rtImage, &wi);
|
uint8 *cursor = drawWizImage(rtImage, &wi);
|
||||||
uint32 cw, ch;
|
int32 cw, ch;
|
||||||
getWizImageDim(resId, 0, cw, ch);
|
getWizImageDim(resId, 0, cw, ch);
|
||||||
setCursorFromBuffer(cursor, cw, ch, cw);
|
setCursorFromBuffer(cursor, cw, ch, cw);
|
||||||
setCursorHotspot(x, y);
|
setCursorHotspot(x, y);
|
||||||
|
@ -703,7 +703,7 @@ void ScummEngine_v80he::o80_pickVarRandom() {
|
||||||
if (readVar(value) == 0) {
|
if (readVar(value) == 0) {
|
||||||
defineArray(value, kDwordArray, 0, 0, 0, num);
|
defineArray(value, kDwordArray, 0, 0, 0, num);
|
||||||
if (value & 0x8000)
|
if (value & 0x8000)
|
||||||
localizeArray(readVar(value), 0xFFFFFFFF);
|
localizeArray(readVar(value), (byte)0xFFFFFFFF);
|
||||||
else if (value & 0x4000)
|
else if (value & 0x4000)
|
||||||
localizeArray(readVar(value), vm.slot[_currentScript].number);
|
localizeArray(readVar(value), vm.slot[_currentScript].number);
|
||||||
|
|
||||||
|
|
|
@ -425,14 +425,14 @@ void ScummEngine_v90he::o90_sqrt() {
|
||||||
if (i < 2) {
|
if (i < 2) {
|
||||||
push(i);
|
push(i);
|
||||||
} else {
|
} else {
|
||||||
push((int)sqrt(i + 1));
|
push((int)sqrt((double)(i + 1)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScummEngine_v90he::o90_atan2() {
|
void ScummEngine_v90he::o90_atan2() {
|
||||||
int y = pop();
|
int y = pop();
|
||||||
int x = 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) {
|
if (a < 0) {
|
||||||
a += 360;
|
a += 360;
|
||||||
}
|
}
|
||||||
|
@ -444,7 +444,7 @@ void ScummEngine_v90he::o90_getSegmentAngle() {
|
||||||
int x1 = pop();
|
int x1 = pop();
|
||||||
int dy = y1 - pop();
|
int dy = y1 - pop();
|
||||||
int dx = x1 - 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) {
|
if (a < 0) {
|
||||||
a += 360;
|
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) {
|
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];
|
Common::Point pts[4];
|
||||||
uint32 w, h;
|
int32 w, h;
|
||||||
getWizImageDim(resnum, state, w, h);
|
getWizImageDim(resnum, state, w, h);
|
||||||
|
|
||||||
pts[1].x = pts[2].x = w / 2 - 1;
|
pts[1].x = pts[2].x = w / 2 - 1;
|
||||||
|
@ -1141,7 +1141,7 @@ int ScummEngine_v90he::getWizImageStates(int resnum) {
|
||||||
|
|
||||||
void ScummEngine_v90he::o90_unknown29() {
|
void ScummEngine_v90he::o90_unknown29() {
|
||||||
int state, resId;
|
int state, resId;
|
||||||
uint32 w, h;
|
int32 w, h;
|
||||||
int16 x, y;
|
int16 x, y;
|
||||||
|
|
||||||
byte subOp = fetchScriptByte();
|
byte subOp = fetchScriptByte();
|
||||||
|
@ -1309,7 +1309,7 @@ void ScummEngine_v90he::o90_getPolygonOverlap() {
|
||||||
int dy = args2[1] - args1[1];
|
int dy = args2[1] - args1[1];
|
||||||
int dist = dx * dx + dy * dy;
|
int dist = dx * dx + dy * dy;
|
||||||
if (dist >= 2) {
|
if (dist >= 2) {
|
||||||
dist = (int)sqrt(dist + 1);
|
dist = (int)sqrt((double)(dist + 1));
|
||||||
}
|
}
|
||||||
push((dist > args1[2]) ? 1 : 0);
|
push((dist > args1[2]) ? 1 : 0);
|
||||||
}
|
}
|
||||||
|
@ -1327,7 +1327,7 @@ void ScummEngine_v90he::o90_getPolygonOverlap() {
|
||||||
int dy = args2[1] - args1[1];
|
int dy = args2[1] - args1[1];
|
||||||
int dist = dx * dx + dy * dy;
|
int dist = dx * dx + dy * dy;
|
||||||
if (dist >= 2) {
|
if (dist >= 2) {
|
||||||
dist = (int)sqrt(dist + 1);
|
dist = (int)sqrt((double)(dist + 1));
|
||||||
}
|
}
|
||||||
push((dist < args1[2] && dist < args2[2]) ? 1 : 0);
|
push((dist < args1[2] && dist < args2[2]) ? 1 : 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1802,7 +1802,7 @@ void ScummEngine::startScene(int room, Actor *a, int objectNr) {
|
||||||
// For HE80+ games
|
// For HE80+ games
|
||||||
for (i = 0; i < _numRoomVariables; i++)
|
for (i = 0; i < _numRoomVariables; i++)
|
||||||
_roomVars[i] = 0;
|
_roomVars[i] = 0;
|
||||||
nukeArrays(0xFFFFFFFF);
|
nukeArrays((byte)0xFFFFFFFF);
|
||||||
|
|
||||||
for (i = 1; i < _numActors; i++) {
|
for (i = 1; i < _numActors; i++) {
|
||||||
_actors[i].hideActor();
|
_actors[i].hideActor();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue