[Scummvm-cvs-logs] SF.net SVN: scummvm: [26506] scummvm/trunk
aquadran at users.sourceforge.net
aquadran at users.sourceforge.net
Sun Apr 15 17:40:26 CEST 2007
Revision: 26506
http://scummvm.svn.sourceforge.net/scummvm/?rev=26506&view=rev
Author: aquadran
Date: 2007-04-15 08:40:24 -0700 (Sun, 15 Apr 2007)
Log Message:
-----------
fixed warnings
Modified Paths:
--------------
scummvm/trunk/dists/msvc8/kyra.vcproj
scummvm/trunk/dists/msvc8/scumm.vcproj
scummvm/trunk/dists/msvc8/scummvm.vcproj
scummvm/trunk/engines/gob/draw_v2.cpp
scummvm/trunk/engines/gob/game.cpp
scummvm/trunk/engines/gob/inter_v2.cpp
scummvm/trunk/engines/gob/sound.cpp
scummvm/trunk/engines/scumm/resource_v2.cpp
scummvm/trunk/engines/scumm/resource_v3.cpp
scummvm/trunk/engines/scumm/sound.cpp
Modified: scummvm/trunk/dists/msvc8/kyra.vcproj
===================================================================
--- scummvm/trunk/dists/msvc8/kyra.vcproj 2007-04-15 15:04:59 UTC (rev 26505)
+++ scummvm/trunk/dists/msvc8/kyra.vcproj 2007-04-15 15:40:24 UTC (rev 26506)
@@ -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
Modified: scummvm/trunk/dists/msvc8/scumm.vcproj
===================================================================
--- scummvm/trunk/dists/msvc8/scumm.vcproj 2007-04-15 15:04:59 UTC (rev 26505)
+++ scummvm/trunk/dists/msvc8/scumm.vcproj 2007-04-15 15:40:24 UTC (rev 26506)
@@ -123,7 +123,7 @@
ForceConformanceInForLoopScope="true"
UsePrecompiledHeader="0"
WarningLevel="4"
- WarnAsError="false"
+ WarnAsError="true"
DebugInformationFormat="0"
/>
<Tool
Modified: scummvm/trunk/dists/msvc8/scummvm.vcproj
===================================================================
--- scummvm/trunk/dists/msvc8/scummvm.vcproj 2007-04-15 15:04:59 UTC (rev 26505)
+++ scummvm/trunk/dists/msvc8/scummvm.vcproj 2007-04-15 15:40:24 UTC (rev 26506)
@@ -74,7 +74,7 @@
IgnoreDefaultLibraryNames="libc.lib;libcmt.lib"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)/scummvm.pdb"
- SubSystem="1"
+ SubSystem="2"
TargetMachine="1"
/>
<Tool
Modified: scummvm/trunk/engines/gob/draw_v2.cpp
===================================================================
--- scummvm/trunk/engines/gob/draw_v2.cpp 2007-04-15 15:04:59 UTC (rev 26505)
+++ scummvm/trunk/engines/gob/draw_v2.cpp 2007-04-15 15:40:24 UTC (rev 26506)
@@ -558,7 +558,7 @@
// 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)
Modified: scummvm/trunk/engines/gob/game.cpp
===================================================================
--- scummvm/trunk/engines/gob/game.cpp 2007-04-15 15:04:59 UTC (rev 26505)
+++ scummvm/trunk/engines/gob/game.cpp 2007-04-15 15:40:24 UTC (rev 26506)
@@ -133,7 +133,7 @@
offset = item->offset;
size = item->size;
- isPacked = (bool) (item->width & 0x8000);
+ isPacked = (item->width & 0x8000) != 0;
if (pResWidth != 0) {
*pResWidth = item->width & 0x7FFF;
Modified: scummvm/trunk/engines/gob/inter_v2.cpp
===================================================================
--- scummvm/trunk/engines/gob/inter_v2.cpp 2007-04-15 15:04:59 UTC (rev 26505)
+++ scummvm/trunk/engines/gob/inter_v2.cpp 2007-04-15 15:40:24 UTC (rev 26506)
@@ -2004,12 +2004,12 @@
}
void Inter_v2::o2_handleGoblins(OpGobParams ¶ms) {
- _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();
}
Modified: scummvm/trunk/engines/gob/sound.cpp
===================================================================
--- scummvm/trunk/engines/gob/sound.cpp 2007-04-15 15:04:59 UTC (rev 26505)
+++ scummvm/trunk/engines/gob/sound.cpp 2007-04-15 15:40:24 UTC (rev 26506)
@@ -235,7 +235,7 @@
_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 @@
_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 @@
// 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;
Modified: scummvm/trunk/engines/scumm/resource_v2.cpp
===================================================================
--- scummvm/trunk/engines/scumm/resource_v2.cpp 2007-04-15 15:04:59 UTC (rev 26505)
+++ scummvm/trunk/engines/scumm/resource_v2.cpp 2007-04-15 15:40:24 UTC (rev 26506)
@@ -93,7 +93,7 @@
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 @@
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 @@
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 @@
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;
}
}
Modified: scummvm/trunk/engines/scumm/resource_v3.cpp
===================================================================
--- scummvm/trunk/engines/scumm/resource_v3.cpp 2007-04-15 15:04:59 UTC (rev 26505)
+++ scummvm/trunk/engines/scumm/resource_v3.cpp 2007-04-15 15:40:24 UTC (rev 26506)
@@ -54,7 +54,7 @@
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;
}
}
Modified: scummvm/trunk/engines/scumm/sound.cpp
===================================================================
--- scummvm/trunk/engines/scumm/sound.cpp 2007-04-15 15:04:59 UTC (rev 26505)
+++ scummvm/trunk/engines/scumm/sound.cpp 2007-04-15 15:40:24 UTC (rev 26506)
@@ -1221,7 +1221,7 @@
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 @@
}
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 @@
_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;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list