diff options
author | Einar Johan Trøan Sømåen | 2012-07-20 02:44:15 +0200 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2012-07-20 02:44:15 +0200 |
commit | 958cb16f9e9d0995c71a54bd20d4b8464775a9e6 (patch) | |
tree | 25cd233211857e2402ac6d07ba1ad4a93cb6f3a0 /engines/wintermute | |
parent | df115ce8d4eac608e611acc971181b5b27c49fbe (diff) | |
download | scummvm-rg350-958cb16f9e9d0995c71a54bd20d4b8464775a9e6.tar.gz scummvm-rg350-958cb16f9e9d0995c71a54bd20d4b8464775a9e6.tar.bz2 scummvm-rg350-958cb16f9e9d0995c71a54bd20d4b8464775a9e6.zip |
WINTERMUTE: Silence a few signed/unsigned warnings.
Diffstat (limited to 'engines/wintermute')
-rw-r--r-- | engines/wintermute/base/BFileManager.cpp | 30 | ||||
-rw-r--r-- | engines/wintermute/base/BSoundMgr.cpp | 10 | ||||
-rw-r--r-- | engines/wintermute/base/BSurfaceStorage.cpp | 10 | ||||
-rw-r--r-- | engines/wintermute/base/file/BDiskFile.cpp | 2 | ||||
-rw-r--r-- | engines/wintermute/base/font/BFontBitmap.cpp | 2 | ||||
-rw-r--r-- | engines/wintermute/graphics/transparentSurface.cpp | 4 |
6 files changed, 29 insertions, 29 deletions
diff --git a/engines/wintermute/base/BFileManager.cpp b/engines/wintermute/base/BFileManager.cpp index 35dde203c7..34638f55e8 100644 --- a/engines/wintermute/base/BFileManager.cpp +++ b/engines/wintermute/base/BFileManager.cpp @@ -75,11 +75,11 @@ CBFileManager::~CBFileManager() { //////////////////////////////////////////////////////////////////////////
bool CBFileManager::cleanup() {
// delete registered paths
- for (int i = 0; i < _singlePaths.size(); i++)
+ for (uint32 i = 0; i < _singlePaths.size(); i++)
delete [] _singlePaths[i];
_singlePaths.clear();
- for (int i = 0; i < _packagePaths.size(); i++)
+ for (uint32 i = 0; i < _packagePaths.size(); i++)
delete [] _packagePaths[i];
_packagePaths.clear();
@@ -93,14 +93,14 @@ bool CBFileManager::cleanup() { _files.clear();
// close open files
- for (int i = 0; i < _openFiles.size(); i++) {
+ for (uint32 i = 0; i < _openFiles.size(); i++) {
delete _openFiles[i];
}
_openFiles.clear();
// delete packages
- for (int i = 0; i < _packages.size(); i++)
+ for (uint32 i = 0; i < _packages.size(); i++)
delete _packages[i];
_packages.clear();
@@ -225,7 +225,7 @@ bool CBFileManager::saveFile(const Common::String &filename, byte *buffer, uint3 //////////////////////////////////////////////////////////////////////////
bool CBFileManager::requestCD(int cd, char *packageFile, const char *filename) {
// unmount all non-local packages
- for (int i = 0; i < _packages.size(); i++) {
+ for (uint32 i = 0; i < _packages.size(); i++) {
if (_packages[i]->_cD > 0) _packages[i]->close();
}
@@ -262,11 +262,11 @@ bool CBFileManager::addPath(TPathType type, const Common::String &path) { //////////////////////////////////////////////////////////////////////////
bool CBFileManager::reloadPaths() {
// delete registered paths
- for (int i = 0; i < _singlePaths.size(); i++)
+ for (uint32 i = 0; i < _singlePaths.size(); i++)
delete [] _singlePaths[i];
_singlePaths.clear();
- for (int i = 0; i < _packagePaths.size(); i++)
+ for (uint32 i = 0; i < _packagePaths.size(); i++)
delete [] _packagePaths[i];
_packagePaths.clear();
@@ -378,13 +378,13 @@ bool CBFileManager::registerPackage(const Common::String &filename , bool search bool boundToExe = false;
if (searchSignature) {
- uint32 Offset;
- if (!findPackageSignature(package, &Offset)) {
+ uint32 offset;
+ if (!findPackageSignature(package, &offset)) {
delete package;
return STATUS_OK;
} else {
- package->seek(Offset, SEEK_SET);
- absoluteOffset = Offset;
+ package->seek(offset, SEEK_SET);
+ absoluteOffset = offset;
boundToExe = true;
}
}
@@ -511,7 +511,7 @@ Common::File *CBFileManager::openPackage(const Common::String &name) { Common::File *ret = new Common::File();
char filename[MAX_PATH_LENGTH];
- for (int i = 0; i < _packagePaths.size(); i++) {
+ for (uint32 i = 0; i < _packagePaths.size(); i++) {
sprintf(filename, "%s%s.%s", _packagePaths[i], name.c_str(), PACKAGE_EXTENSION);
ret->open(filename);
if (ret->isOpen()) {
@@ -537,7 +537,7 @@ Common::File *CBFileManager::openSingleFile(const Common::String &name) { Common::File *ret = NULL;
char filename[MAX_PATH_LENGTH];
- for (int i = 0; i < _singlePaths.size(); i++) {
+ for (uint32 i = 0; i < _singlePaths.size(); i++) {
sprintf(filename, "%s%s", _singlePaths[i], name.c_str());
ret->open(filename);
if (ret->isOpen())
@@ -562,7 +562,7 @@ bool CBFileManager::getFullPath(const Common::String &filename, char *fullname) Common::File f;
bool found = false;
- for (int i = 0; i < _singlePaths.size(); i++) {
+ for (uint32 i = 0; i < _singlePaths.size(); i++) {
sprintf(fullname, "%s%s", _singlePaths[i], filename.c_str());
f.open(fullname);
if (f.isOpen()) {
@@ -632,7 +632,7 @@ Common::SeekableReadStream *CBFileManager::openFile(const Common::String &filena //////////////////////////////////////////////////////////////////////////
bool CBFileManager::closeFile(Common::SeekableReadStream *File) {
- for (int i = 0; i < _openFiles.size(); i++) {
+ for (uint32 i = 0; i < _openFiles.size(); i++) {
if (_openFiles[i] == File) {
delete _openFiles[i];
_openFiles.remove_at(i);
diff --git a/engines/wintermute/base/BSoundMgr.cpp b/engines/wintermute/base/BSoundMgr.cpp index 8d9b775c68..66baa633e4 100644 --- a/engines/wintermute/base/BSoundMgr.cpp +++ b/engines/wintermute/base/BSoundMgr.cpp @@ -62,7 +62,7 @@ CBSoundMgr::~CBSoundMgr() { //////////////////////////////////////////////////////////////////////////
bool CBSoundMgr::cleanup() {
- for (int i = 0; i < _sounds.size(); i++)
+ for (uint32 i = 0; i < _sounds.size(); i++)
delete _sounds[i];
_sounds.clear();
#if 0
@@ -164,7 +164,7 @@ bool CBSoundMgr::addSound(CBSoundBuffer *sound, Audio::Mixer::SoundType type) { //////////////////////////////////////////////////////////////////////////
bool CBSoundMgr::removeSound(CBSoundBuffer *sound) {
- for (int i = 0; i < _sounds.size(); i++) {
+ for (uint32 i = 0; i < _sounds.size(); i++) {
if (_sounds[i] == sound) {
delete _sounds[i];
_sounds.remove_at(i);
@@ -227,7 +227,7 @@ byte CBSoundMgr::getVolumePercent(Audio::Mixer::SoundType type) { //////////////////////////////////////////////////////////////////////////
bool CBSoundMgr::setMasterVolume(byte value) {
_volumeMaster = value;
- for (int i = 0; i < _sounds.size(); i++) {
+ for (uint32 i = 0; i < _sounds.size(); i++) {
_sounds[i]->updateVolume();
}
return STATUS_OK;
@@ -254,7 +254,7 @@ byte CBSoundMgr::getMasterVolume() { //////////////////////////////////////////////////////////////////////////
bool CBSoundMgr::pauseAll(bool includingMusic) {
- for (int i = 0; i < _sounds.size(); i++) {
+ for (uint32 i = 0; i < _sounds.size(); i++) {
if (_sounds[i]->isPlaying() && (_sounds[i]->_type != Audio::Mixer::kMusicSoundType || includingMusic)) {
_sounds[i]->pause();
_sounds[i]->_freezePaused = true;
@@ -268,7 +268,7 @@ bool CBSoundMgr::pauseAll(bool includingMusic) { //////////////////////////////////////////////////////////////////////////
bool CBSoundMgr::resumeAll() {
- for (int i = 0; i < _sounds.size(); i++) {
+ for (uint32 i = 0; i < _sounds.size(); i++) {
if (_sounds[i]->_freezePaused) {
_sounds[i]->resume();
_sounds[i]->_freezePaused = false;
diff --git a/engines/wintermute/base/BSurfaceStorage.cpp b/engines/wintermute/base/BSurfaceStorage.cpp index 887510b675..406535cf39 100644 --- a/engines/wintermute/base/BSurfaceStorage.cpp +++ b/engines/wintermute/base/BSurfaceStorage.cpp @@ -52,7 +52,7 @@ CBSurfaceStorage::~CBSurfaceStorage() { //////////////////////////////////////////////////////////////////////////
bool CBSurfaceStorage::cleanup(bool warn) {
- for (int i = 0; i < _surfaces.size(); i++) {
+ for (uint32 i = 0; i < _surfaces.size(); i++) {
if (warn) _gameRef->LOG(0, "CBSurfaceStorage warning: purging surface '%s', usage:%d", _surfaces[i]->getFileName(), _surfaces[i]->_referenceCount);
delete _surfaces[i];
}
@@ -67,7 +67,7 @@ bool CBSurfaceStorage::initLoop() { if (_gameRef->_smartCache && _gameRef->_liveTimer - _lastCleanupTime >= _gameRef->_surfaceGCCycleTime) {
_lastCleanupTime = _gameRef->_liveTimer;
sortSurfaces();
- for (int i = 0; i < _surfaces.size(); i++) {
+ for (uint32 i = 0; i < _surfaces.size(); i++) {
if (_surfaces[i]->_lifeTime <= 0) break;
if (_surfaces[i]->_lifeTime > 0 && _surfaces[i]->_valid && _gameRef->_liveTimer - _surfaces[i]->_lastUsedTime >= _surfaces[i]->_lifeTime) {
@@ -82,7 +82,7 @@ bool CBSurfaceStorage::initLoop() { //////////////////////////////////////////////////////////////////////
bool CBSurfaceStorage::removeSurface(CBSurface *surface) {
- for (int i = 0; i < _surfaces.size(); i++) {
+ for (uint32 i = 0; i < _surfaces.size(); i++) {
if (_surfaces[i] == surface) {
_surfaces[i]->_referenceCount--;
if (_surfaces[i]->_referenceCount <= 0) {
@@ -98,7 +98,7 @@ bool CBSurfaceStorage::removeSurface(CBSurface *surface) { //////////////////////////////////////////////////////////////////////
CBSurface *CBSurfaceStorage::addSurface(const char *filename, bool defaultCK, byte ckRed, byte ckGreen, byte ckBlue, int lifeTime, bool keepLoaded) {
- for (int i = 0; i < _surfaces.size(); i++) {
+ for (uint32 i = 0; i < _surfaces.size(); i++) {
if (scumm_stricmp(_surfaces[i]->getFileName(), filename) == 0) {
_surfaces[i]->_referenceCount++;
return _surfaces[i];
@@ -132,7 +132,7 @@ CBSurface *CBSurfaceStorage::addSurface(const char *filename, bool defaultCK, by //////////////////////////////////////////////////////////////////////
bool CBSurfaceStorage::restoreAll() {
bool ret;
- for (int i = 0; i < _surfaces.size(); i++) {
+ for (uint32 i = 0; i < _surfaces.size(); i++) {
ret = _surfaces[i]->restore();
if (ret != STATUS_OK) {
_gameRef->LOG(0, "CBSurfaceStorage::RestoreAll failed");
diff --git a/engines/wintermute/base/file/BDiskFile.cpp b/engines/wintermute/base/file/BDiskFile.cpp index f2938cebc9..739eafcc73 100644 --- a/engines/wintermute/base/file/BDiskFile.cpp +++ b/engines/wintermute/base/file/BDiskFile.cpp @@ -50,7 +50,7 @@ Common::SeekableReadStream *openDiskFile(const Common::String &filename, CBFileM uint32 prefixSize = 0;
Common::SeekableReadStream *file = NULL;
- for (int i = 0; i < fileManager->_singlePaths.size(); i++) {
+ for (uint32 i = 0; i < fileManager->_singlePaths.size(); i++) {
sprintf(fullPath, "%s%s", fileManager->_singlePaths[i], filename.c_str());
correctSlashes(fullPath);
Common::File *tempFile = new Common::File();
diff --git a/engines/wintermute/base/font/BFontBitmap.cpp b/engines/wintermute/base/font/BFontBitmap.cpp index 341f90d559..62576cdfea 100644 --- a/engines/wintermute/base/font/BFontBitmap.cpp +++ b/engines/wintermute/base/font/BFontBitmap.cpp @@ -97,7 +97,7 @@ int CBFontBitmap::getTextWidth(byte *text, int maxLength) { //str.substr(0, maxLength); // TODO: Remove
int textWidth = 0;
- for (size_t i = 0; i < str.size(); i++) {
+ for (int i = 0; i < str.size(); i++) {
textWidth += getCharWidth(str[i]);
}
diff --git a/engines/wintermute/graphics/transparentSurface.cpp b/engines/wintermute/graphics/transparentSurface.cpp index 4c646a6779..cec47ed52f 100644 --- a/engines/wintermute/graphics/transparentSurface.cpp +++ b/engines/wintermute/graphics/transparentSurface.cpp @@ -55,10 +55,10 @@ void doBlit(byte *ino, byte* outo, uint32 width, uint32 height, uint32 pitch, in const int gShiftTarget = 16;//target.format.gShift; const int rShiftTarget = 24;//target.format.rShift; - for (int i = 0; i < height; i++) { + for (uint32 i = 0; i < height; i++) { out = outo; in = ino; - for (int j = 0; j < width; j++) { + for (uint32 j = 0; j < width; j++) { uint32 pix = *(uint32 *)in; uint32 o_pix = *(uint32 *) out; int b = (pix >> bShift) & 0xff; |