diff options
author | Matthew Hoops | 2014-09-28 15:18:43 -0400 |
---|---|---|
committer | Matthew Hoops | 2014-09-28 15:29:49 -0400 |
commit | cbfa8bfccdf66229608387528360107ee34ab860 (patch) | |
tree | 22a5ebb8a15c28e1b8f49d9ef0471ae4676b9c0c | |
parent | b2676c412dc79af6c9f8d2ff423fcc95421eff97 (diff) | |
download | scummvm-rg350-cbfa8bfccdf66229608387528360107ee34ab860.tar.gz scummvm-rg350-cbfa8bfccdf66229608387528360107ee34ab860.tar.bz2 scummvm-rg350-cbfa8bfccdf66229608387528360107ee34ab860.zip |
CGE2: Silence gcc warnings
-rw-r--r-- | engines/cge2/hero.cpp | 7 | ||||
-rw-r--r-- | engines/cge2/toolbar.cpp | 8 | ||||
-rw-r--r-- | engines/cge2/vga13h.cpp | 3 |
3 files changed, 10 insertions, 8 deletions
diff --git a/engines/cge2/hero.cpp b/engines/cge2/hero.cpp index 86bd7ac953..b5e8cac4e3 100644 --- a/engines/cge2/hero.cpp +++ b/engines/cge2/hero.cpp @@ -120,7 +120,8 @@ Sprite *Hero::expand() { break; case kIdName: Common::strlcpy(tmpStr, line.c_str(), sizeof(tmpStr)); - for (p = tmpStr; *p != '='; p++); // We search for the = + for (p = tmpStr; *p != '='; p++) // We search for the = + ; setName(_vm->tail(p)); break; default: @@ -201,7 +202,7 @@ Sprite *Hero::expand() { delete[] text; int i = stepSize() / 2; - _maxDist = sqrt(double(i * i * 2)); + _maxDist = (int)sqrt(double(i * i * 2)); setCurrent(); return this; @@ -413,7 +414,7 @@ void Hero::fun() { } int Hero::len(V2D v) { - return sqrt(double(v.x * v.x + v.y * v.y)); + return (int)sqrt(double(v.x * v.x + v.y * v.y)); } bool Hero::findWay(){ diff --git a/engines/cge2/toolbar.cpp b/engines/cge2/toolbar.cpp index 6af64b1f5c..92f73877e6 100644 --- a/engines/cge2/toolbar.cpp +++ b/engines/cge2/toolbar.cpp @@ -120,7 +120,7 @@ void CGE2Engine::setVolume(int idx, int cnt) { int p = _vol[idx]->_seqPtr + cnt; if ((p >= 0) && (p < _vol[idx]->_seqCnt)) { _vol[idx]->step(p); - int newVolume = p * kSoundStatetoNumRate; + int newVolume = (int)(p * kSoundStatetoNumRate); switch (idx) { case 0: _oldSfxVolume = ConfMan.getInt("sfx_volume"); @@ -140,11 +140,11 @@ void CGE2Engine::setVolume(int idx, int cnt) { void CGE2Engine::checkVolumeSwitches() { int musicVolume = ConfMan.getInt("music_volume"); if (musicVolume != _oldMusicVolume) - _vol[1]->step(musicVolume / kSoundNumtoStateRate); + _vol[1]->step((int)(musicVolume / kSoundNumtoStateRate)); int sfxVolume = ConfMan.getInt("sfx_volume"); if (sfxVolume != _oldSfxVolume) - _vol[0]->step(sfxVolume / kSoundNumtoStateRate); + _vol[0]->step((int)(sfxVolume / kSoundNumtoStateRate)); } void CGE2Engine::switchCap() { @@ -208,7 +208,7 @@ void CGE2Engine::initToolbar() { void CGE2Engine::initVolumeSwitch(Sprite *volSwitch, int val) { int state = 0; - state = val / kSoundNumtoStateRate; + state = (int)(val / kSoundNumtoStateRate); volSwitch->step(state); } diff --git a/engines/cge2/vga13h.cpp b/engines/cge2/vga13h.cpp index db96682237..227633579e 100644 --- a/engines/cge2/vga13h.cpp +++ b/engines/cge2/vga13h.cpp @@ -371,7 +371,8 @@ Sprite *Sprite::expand() { break; case kIdName: Common::strlcpy(tmpStr, line.c_str(), sizeof(tmpStr)); - for (p = tmpStr; *p != '='; p++); // We search for the = + for (p = tmpStr; *p != '='; p++) // We search for the = + ; setName(_vm->tail(p)); break; default: |