diff options
-rw-r--r-- | engines/wintermute/Ad/AdResponseBox.cpp | 2 | ||||
-rw-r--r-- | engines/wintermute/Ad/AdScene.cpp | 6 | ||||
-rw-r--r-- | engines/wintermute/Ad/AdSpriteSet.cpp | 2 | ||||
-rw-r--r-- | engines/wintermute/Base/BScriptable.cpp | 2 | ||||
-rw-r--r-- | engines/wintermute/Base/BSoundBuffer.cpp | 2 | ||||
-rw-r--r-- | engines/wintermute/Base/scriptables/SXMemBuffer.cpp | 2 | ||||
-rw-r--r-- | engines/wintermute/Base/scriptables/ScEngine.cpp | 6 | ||||
-rw-r--r-- | engines/wintermute/Base/scriptables/ScValue.cpp | 3 | ||||
-rw-r--r-- | engines/wintermute/math/Vector2.cpp | 8 | ||||
-rw-r--r-- | engines/wintermute/video/VidTheoraPlayer.cpp | 4 | ||||
-rw-r--r-- | engines/wintermute/video/VidTheoraPlayer.h | 2 |
11 files changed, 28 insertions, 11 deletions
diff --git a/engines/wintermute/Ad/AdResponseBox.cpp b/engines/wintermute/Ad/AdResponseBox.cpp index 7a38451925..0359da03dd 100644 --- a/engines/wintermute/Ad/AdResponseBox.cpp +++ b/engines/wintermute/Ad/AdResponseBox.cpp @@ -586,6 +586,8 @@ HRESULT CAdResponseBox::HandleResponse(CAdResponse *Response) { case RESPONSE_ONCE_GAME:
AdGame->AddGameResponse(Response->_iD);
break;
+ default:
+ warning("CAdResponseBox::HandleResponse - Unhandled enum");
}
return S_OK;
diff --git a/engines/wintermute/Ad/AdScene.cpp b/engines/wintermute/Ad/AdScene.cpp index e8229a3351..c21d694468 100644 --- a/engines/wintermute/Ad/AdScene.cpp +++ b/engines/wintermute/Ad/AdScene.cpp @@ -2519,6 +2519,9 @@ HRESULT CAdScene::PersistState(bool Saving) { else node->_region->_active = NodeState->_active;
}
break;
+ default:
+ warning("CAdScene::PersistState - unhandled enum");
+ break;
}
}
}
@@ -2703,6 +2706,9 @@ HRESULT CAdScene::GetSceneObjects(CBArray<CAdObject *, CAdObject *> &Objects, bo //if(RegionObj.GetSize() > 0) Objects.Append(RegionObj);
}
break;
+ default:
+ warning("CAdScene::GetSceneObjects - Unhandled enum");
+ break;
}
}
}
diff --git a/engines/wintermute/Ad/AdSpriteSet.cpp b/engines/wintermute/Ad/AdSpriteSet.cpp index 4f6d17b7dd..70b5f15dbe 100644 --- a/engines/wintermute/Ad/AdSpriteSet.cpp +++ b/engines/wintermute/Ad/AdSpriteSet.cpp @@ -302,7 +302,7 @@ HRESULT CAdSpriteSet::SaveAsText(CBDynBuffer *Buffer, int Indent) { //////////////////////////////////////////////////////////////////////////
bool CAdSpriteSet::ContainsSprite(CBSprite *Sprite) {
- if (!Sprite) return NULL;
+ if (!Sprite) return false;
for (int i = 0; i < NUM_DIRECTIONS; i++) {
if (_sprites[i] == Sprite) return true;
diff --git a/engines/wintermute/Base/BScriptable.cpp b/engines/wintermute/Base/BScriptable.cpp index 09a8f2c0aa..38a3325f91 100644 --- a/engines/wintermute/Base/BScriptable.cpp +++ b/engines/wintermute/Base/BScriptable.cpp @@ -182,7 +182,7 @@ const char *CBScriptable::DbgGetNativeClass() { //////////////////////////////////////////////////////////////////////////
IWmeDebugProp *CBScriptable::DbgGetProperty(const char *Name) {
- return ScGetProperty((char *)Name);
+ return ScGetProperty(Name);
}
} // end of namespace WinterMute
diff --git a/engines/wintermute/Base/BSoundBuffer.cpp b/engines/wintermute/Base/BSoundBuffer.cpp index a8c41cd022..35471bd4d9 100644 --- a/engines/wintermute/Base/BSoundBuffer.cpp +++ b/engines/wintermute/Base/BSoundBuffer.cpp @@ -260,7 +260,7 @@ void CBSoundBuffer::SetType(TSoundType Type) { //////////////////////////////////////////////////////////////////////////
HRESULT CBSoundBuffer::SetVolume(int Volume) {
if (_stream && _handle) {
- byte vol = Volume / 100.f * Audio::Mixer::kMaxChannelVolume;
+ byte vol = (byte)(Volume / 100.f * Audio::Mixer::kMaxChannelVolume);
g_system->getMixer()->setChannelVolume(*_handle, vol);
}
return S_OK;
diff --git a/engines/wintermute/Base/scriptables/SXMemBuffer.cpp b/engines/wintermute/Base/scriptables/SXMemBuffer.cpp index 88f293367a..6769d3fda9 100644 --- a/engines/wintermute/Base/scriptables/SXMemBuffer.cpp +++ b/engines/wintermute/Base/scriptables/SXMemBuffer.cpp @@ -53,7 +53,7 @@ CSXMemBuffer::CSXMemBuffer(CBGame *inGame, CScStack *Stack): CBScriptable(inGame //////////////////////////////////////////////////////////////////////////
CSXMemBuffer::CSXMemBuffer(CBGame *inGame, void *Buffer): CBScriptable(inGame) {
- _size = NULL;
+ _size = 0;
_buffer = Buffer;
}
diff --git a/engines/wintermute/Base/scriptables/ScEngine.cpp b/engines/wintermute/Base/scriptables/ScEngine.cpp index d81db93e34..a8bfc10800 100644 --- a/engines/wintermute/Base/scriptables/ScEngine.cpp +++ b/engines/wintermute/Base/scriptables/ScEngine.cpp @@ -421,6 +421,9 @@ HRESULT CScEngine::Tick() { }
break;
}
+ default:
+ warning("CScEngine::Tick - Unhandled enum");
+ break;
} // switch
} // for each script
@@ -515,6 +518,9 @@ int CScEngine::GetNumScripts(int *Running, int *Waiting, int *Persistent) { case SCRIPT_PERSISTENT:
persistent++;
break;
+ default:
+ warning("CScEngine::GetNumScripts - unhandled enum");
+ break;
}
total++;
}
diff --git a/engines/wintermute/Base/scriptables/ScValue.cpp b/engines/wintermute/Base/scriptables/ScValue.cpp index 2182e58e71..4dce85c1a0 100644 --- a/engines/wintermute/Base/scriptables/ScValue.cpp +++ b/engines/wintermute/Base/scriptables/ScValue.cpp @@ -707,6 +707,9 @@ void CScValue::SetValue(CScValue *Val) { case VAL_STRING:
_valNative->ScSetString(Val->GetString());
break;
+ default:
+ warning("CScValue::SetValue - unhandled enum");
+ break;
}
}
// otherwise just copy everything
diff --git a/engines/wintermute/math/Vector2.cpp b/engines/wintermute/math/Vector2.cpp index b2fa56dff4..a72fb51e79 100644 --- a/engines/wintermute/math/Vector2.cpp +++ b/engines/wintermute/math/Vector2.cpp @@ -37,9 +37,9 @@ Vector2::Vector2() { }
//////////////////////////////////////////////////////////////////////////
-Vector2::Vector2(float x, float y) {
- this->x = x;
- this->y = y;
+Vector2::Vector2(float xVal, float yVal) {
+ this->x = xVal;
+ this->y = yVal;
}
//////////////////////////////////////////////////////////////////////////
@@ -49,7 +49,7 @@ Vector2::~Vector2() { //////////////////////////////////////////////////////////////////////////
float Vector2::Length() const {
- return sqrt(x * x + y * y);
+ return (float)sqrt(x * x + y * y);
}
} // end of namespace WinterMute
diff --git a/engines/wintermute/video/VidTheoraPlayer.cpp b/engines/wintermute/video/VidTheoraPlayer.cpp index bcf4569737..c6447c7431 100644 --- a/engines/wintermute/video/VidTheoraPlayer.cpp +++ b/engines/wintermute/video/VidTheoraPlayer.cpp @@ -584,9 +584,9 @@ HRESULT CVidTheoraPlayer::update() { } ////////////////////////////////////////////////////////////////////////// -float CVidTheoraPlayer::getMovieTime() { +uint32 CVidTheoraPlayer::getMovieTime() { if (!_playbackStarted) { - return 0.0f; + return 0; } else { return _theoraDecoder->getTime(); } diff --git a/engines/wintermute/video/VidTheoraPlayer.h b/engines/wintermute/video/VidTheoraPlayer.h index a112377f91..437a72db67 100644 --- a/engines/wintermute/video/VidTheoraPlayer.h +++ b/engines/wintermute/video/VidTheoraPlayer.h @@ -84,7 +84,7 @@ public: return _state == THEORA_STATE_PAUSED; }; - float getMovieTime(); + uint32 getMovieTime(); uint32 getMovieFrame(); CBSurface *getTexture(); |