aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaweł Kołodziejski2007-04-15 15:40:24 +0000
committerPaweł Kołodziejski2007-04-15 15:40:24 +0000
commitae7c6406712dcc5f3567caaab9b2f95c379c9c10 (patch)
treee0223e8113964b9dbf51198ead8dfbf850cbe1e2
parentac7b134565b351d1b8d5e100e964cd35788387c9 (diff)
downloadscummvm-rg350-ae7c6406712dcc5f3567caaab9b2f95c379c9c10.tar.gz
scummvm-rg350-ae7c6406712dcc5f3567caaab9b2f95c379c9c10.tar.bz2
scummvm-rg350-ae7c6406712dcc5f3567caaab9b2f95c379c9c10.zip
fixed warnings
svn-id: r26506
-rw-r--r--dists/msvc8/kyra.vcproj8
-rw-r--r--dists/msvc8/scumm.vcproj2
-rw-r--r--dists/msvc8/scummvm.vcproj2
-rw-r--r--engines/gob/draw_v2.cpp2
-rw-r--r--engines/gob/game.cpp2
-rw-r--r--engines/gob/inter_v2.cpp8
-rw-r--r--engines/gob/sound.cpp8
-rw-r--r--engines/scumm/resource_v2.cpp8
-rw-r--r--engines/scumm/resource_v3.cpp2
-rw-r--r--engines/scumm/sound.cpp6
10 files changed, 24 insertions, 24 deletions
diff --git a/dists/msvc8/kyra.vcproj b/dists/msvc8/kyra.vcproj
index 1634a4f432..3733f6089c 100644
--- a/dists/msvc8/kyra.vcproj
+++ b/dists/msvc8/kyra.vcproj
@@ -192,19 +192,19 @@
>
</File>
<File
- RelativePath="..\..\engines\kyra\kyra2.cpp"
+ RelativePath="..\..\engines\kyra\kyra_v2.cpp"
>
</File>
<File
- RelativePath="..\..\engines\kyra\kyra2.h"
+ RelativePath="..\..\engines\kyra\kyra_v2.h"
>
</File>
<File
- RelativePath="..\..\engines\kyra\kyra3.cpp"
+ RelativePath="..\..\engines\kyra\kyra_v3.cpp"
>
</File>
<File
- RelativePath="..\..\engines\kyra\kyra3.h"
+ RelativePath="..\..\engines\kyra\kyra_v3.h"
>
</File>
<File
diff --git a/dists/msvc8/scumm.vcproj b/dists/msvc8/scumm.vcproj
index adfa01be34..cec931fa29 100644
--- a/dists/msvc8/scumm.vcproj
+++ b/dists/msvc8/scumm.vcproj
@@ -123,7 +123,7 @@
ForceConformanceInForLoopScope="true"
UsePrecompiledHeader="0"
WarningLevel="4"
- WarnAsError="false"
+ WarnAsError="true"
DebugInformationFormat="0"
/>
<Tool
diff --git a/dists/msvc8/scummvm.vcproj b/dists/msvc8/scummvm.vcproj
index 522dfeff02..6d95784d8d 100644
--- a/dists/msvc8/scummvm.vcproj
+++ b/dists/msvc8/scummvm.vcproj
@@ -74,7 +74,7 @@
IgnoreDefaultLibraryNames="libc.lib;libcmt.lib"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)/scummvm.pdb"
- SubSystem="1"
+ SubSystem="2"
TargetMachine="1"
/>
<Tool
diff --git a/engines/gob/draw_v2.cpp b/engines/gob/draw_v2.cpp
index 6b7b1db0fd..56757bb106 100644
--- a/engines/gob/draw_v2.cpp
+++ b/engines/gob/draw_v2.cpp
@@ -558,7 +558,7 @@ void Draw_v2::spriteOperation(int16 operation) {
// Some handle, but always assigned to -1 in Game::loadTotFile()
int16 word_2F2D2 = -1;
- deltaVeto = (bool) (operation & 0x10);
+ deltaVeto = (operation & 0x10) != 0;
operation &= 0x0F;
if (_sourceSurface >= 100)
diff --git a/engines/gob/game.cpp b/engines/gob/game.cpp
index f146cded6d..4bc95d78cf 100644
--- a/engines/gob/game.cpp
+++ b/engines/gob/game.cpp
@@ -133,7 +133,7 @@ byte *Game::loadExtData(int16 itemId, int16 *pResWidth,
offset = item->offset;
size = item->size;
- isPacked = (bool) (item->width & 0x8000);
+ isPacked = (item->width & 0x8000) != 0;
if (pResWidth != 0) {
*pResWidth = item->width & 0x7FFF;
diff --git a/engines/gob/inter_v2.cpp b/engines/gob/inter_v2.cpp
index 5dc5edd823..d0677757d5 100644
--- a/engines/gob/inter_v2.cpp
+++ b/engines/gob/inter_v2.cpp
@@ -2004,12 +2004,12 @@ void Inter_v2::o2_stopInfogrames(OpGobParams &params) {
}
void Inter_v2::o2_handleGoblins(OpGobParams &params) {
- _vm->_goblin->_gob1NoTurn = (bool) VAR(load16());
- _vm->_goblin->_gob2NoTurn = (bool) VAR(load16());
+ _vm->_goblin->_gob1NoTurn = VAR(load16()) != 0;
+ _vm->_goblin->_gob2NoTurn = VAR(load16()) != 0;
_vm->_goblin->_gob1RelaxTimeVar = load16();
_vm->_goblin->_gob2RelaxTimeVar = load16();
- _vm->_goblin->_gob1Busy = (bool) VAR(load16());
- _vm->_goblin->_gob2Busy = (bool) VAR(load16());
+ _vm->_goblin->_gob1Busy = VAR(load16()) != 0;
+ _vm->_goblin->_gob2Busy = VAR(load16()) != 0;
_vm->_goblin->handleGoblins();
}
diff --git a/engines/gob/sound.cpp b/engines/gob/sound.cpp
index 9759ea087e..b390510768 100644
--- a/engines/gob/sound.cpp
+++ b/engines/gob/sound.cpp
@@ -235,7 +235,7 @@ void Snd::stopSound(int16 fadeLength, SoundDesc *sndDesc) {
_fade = true;
_fadeVol = 65536;
_fadeSamples = (int) (fadeLength * (((double) _rate) / 10.0));
- _fadeVolStep = MAX(1U, 65536 / _fadeSamples);
+ _fadeVolStep = MAX(1UL, 65536 / _fadeSamples);
_curFadeSamples = 0;
}
@@ -341,7 +341,7 @@ void Snd::setSample(SoundDesc &sndDesc, int16 repCount, int16 frequency,
_fade = true;
_fadeVol = 0;
_fadeSamples = (int) (fadeLength * (((double) _rate) / 10.0));
- _fadeVolStep = - MAX(1U, 65536 / _fadeSamples);
+ _fadeVolStep = - (int32)MAX(1UL, 65536 / _fadeSamples);
}
}
@@ -404,8 +404,8 @@ int Snd::readBuffer(int16 *buffer, const int numSamples) {
// Linear interpolation. See sound/rate.cpp
- val = _last + (((_cur - _last) * _offsetFrac +
- (1UL << (FRAC_BITS - 1))) >> FRAC_BITS) << 8;
+ val = _last + ((((_cur - _last) * _offsetFrac +
+ (1UL << (FRAC_BITS - 1))) >> FRAC_BITS) << 8);
*buffer++ = (((int32) val) * _fadeVol) >> 16;
oldOffset = _offset;
diff --git a/engines/scumm/resource_v2.cpp b/engines/scumm/resource_v2.cpp
index 08393da708..6a4f1ea30b 100644
--- a/engines/scumm/resource_v2.cpp
+++ b/engines/scumm/resource_v2.cpp
@@ -93,7 +93,7 @@ void ScummEngine_v2::readClassicIndexFile() {
for (i = 0; i < _numRooms; i++) {
_res->roomoffs[rtRoom][i] = _fileHandle->readUint16LE();
if (_res->roomoffs[rtRoom][i] == 0xFFFF)
- _res->roomoffs[rtRoom][i] = RES_INVALID_OFFSET;
+ _res->roomoffs[rtRoom][i] = (uint32)RES_INVALID_OFFSET;
}
for (i = 0; i < _numCostumes; i++) {
@@ -102,7 +102,7 @@ void ScummEngine_v2::readClassicIndexFile() {
for (i = 0; i < _numCostumes; i++) {
_res->roomoffs[rtCostume][i] = _fileHandle->readUint16LE();
if (_res->roomoffs[rtCostume][i] == 0xFFFF)
- _res->roomoffs[rtCostume][i] = RES_INVALID_OFFSET;
+ _res->roomoffs[rtCostume][i] = (uint32)RES_INVALID_OFFSET;
}
for (i = 0; i < _numScripts; i++) {
@@ -111,7 +111,7 @@ void ScummEngine_v2::readClassicIndexFile() {
for (i = 0; i < _numScripts; i++) {
_res->roomoffs[rtScript][i] = _fileHandle->readUint16LE();
if (_res->roomoffs[rtScript][i] == 0xFFFF)
- _res->roomoffs[rtScript][i] = RES_INVALID_OFFSET;
+ _res->roomoffs[rtScript][i] = (uint32)RES_INVALID_OFFSET;
}
for (i = 0; i < _numSounds; i++) {
@@ -120,7 +120,7 @@ void ScummEngine_v2::readClassicIndexFile() {
for (i = 0; i < _numSounds; i++) {
_res->roomoffs[rtSound][i] = _fileHandle->readUint16LE();
if (_res->roomoffs[rtSound][i] == 0xFFFF)
- _res->roomoffs[rtSound][i] = RES_INVALID_OFFSET;
+ _res->roomoffs[rtSound][i] = (uint32)RES_INVALID_OFFSET;
}
}
diff --git a/engines/scumm/resource_v3.cpp b/engines/scumm/resource_v3.cpp
index 1ac159c9a5..2a4add52f3 100644
--- a/engines/scumm/resource_v3.cpp
+++ b/engines/scumm/resource_v3.cpp
@@ -54,7 +54,7 @@ void ScummEngine_v3old::readResTypeList(int id) {
for (i = 0; i < num; i++) {
_res->roomoffs[id][i] = _fileHandle->readUint16LE();
if (_res->roomoffs[id][i] == 0xFFFF)
- _res->roomoffs[id][i] = RES_INVALID_OFFSET;
+ _res->roomoffs[id][i] = (uint32)RES_INVALID_OFFSET;
}
}
diff --git a/engines/scumm/sound.cpp b/engines/scumm/sound.cpp
index 9f29418ca6..c54eb25db5 100644
--- a/engines/scumm/sound.cpp
+++ b/engines/scumm/sound.cpp
@@ -1221,7 +1221,7 @@ int ScummEngine::readSoundResource(int type, int idx) {
debugC(DEBUG_SOUND, "FMUS file %s", buffer);
if (dmuFile.open(buffer) == false) {
error("Can't open music file %s*", buffer);
- _res->roomoffs[type][idx] = RES_INVALID_OFFSET;
+ _res->roomoffs[type][idx] = (uint32)RES_INVALID_OFFSET;
return 0;
}
dmuFile.seek(4, SEEK_SET);
@@ -1245,7 +1245,7 @@ int ScummEngine::readSoundResource(int type, int idx) {
}
error("Unrecognized base tag 0x%08x in sound %d", basetag, idx);
}
- _res->roomoffs[type][idx] = RES_INVALID_OFFSET;
+ _res->roomoffs[type][idx] = (uint32)RES_INVALID_OFFSET;
return 0;
}
@@ -2107,7 +2107,7 @@ int ScummEngine::readSoundResourceSmallHeader(int type, int idx) {
_fileHandle->read(_res->createResource(type, idx, ro_size - 4), ro_size - 4);
return 1;
}
- _res->roomoffs[type][idx] = RES_INVALID_OFFSET;
+ _res->roomoffs[type][idx] = (uint32)RES_INVALID_OFFSET;
return 0;
}