aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2012-06-01 00:51:58 +0200
committerEinar Johan Trøan Sømåen2012-06-02 13:07:18 +0200
commit0cee40306710b0ddae57e962797fd8d40299558b (patch)
tree94c1f3ddb6df8db1160141686f16850cff7939fe /engines/wintermute
parentbfcffbea601f03d44344ff4cccb2466ca2f648f2 (diff)
downloadscummvm-rg350-0cee40306710b0ddae57e962797fd8d40299558b.tar.gz
scummvm-rg350-0cee40306710b0ddae57e962797fd8d40299558b.tar.bz2
scummvm-rg350-0cee40306710b0ddae57e962797fd8d40299558b.zip
WINTERMUTE: Fix a few warnings.
Diffstat (limited to 'engines/wintermute')
-rw-r--r--engines/wintermute/AdActor.cpp2
-rw-r--r--engines/wintermute/AdEntity.cpp2
-rw-r--r--engines/wintermute/AdResponseBox.cpp2
-rw-r--r--engines/wintermute/AdScene.cpp4
-rw-r--r--engines/wintermute/BTransitionMgr.cpp3
-rw-r--r--engines/wintermute/UIButton.cpp2
-rw-r--r--engines/wintermute/UIText.cpp2
-rw-r--r--engines/wintermute/UIWindow.cpp2
-rw-r--r--engines/wintermute/graphics/transparentSurface.cpp1
-rw-r--r--engines/wintermute/scriptables/ScEngine.cpp2
-rw-r--r--engines/wintermute/scriptables/ScEngine.h4
11 files changed, 18 insertions, 8 deletions
diff --git a/engines/wintermute/AdActor.cpp b/engines/wintermute/AdActor.cpp
index 328ab31874..3778fbaa5f 100644
--- a/engines/wintermute/AdActor.cpp
+++ b/engines/wintermute/AdActor.cpp
@@ -742,6 +742,8 @@ HRESULT CAdActor::Update() {
}
}
break;
+ default:
+ error("AdActor::Update - Unhandled enum");
}
diff --git a/engines/wintermute/AdEntity.cpp b/engines/wintermute/AdEntity.cpp
index a472107c90..b00b0bd923 100644
--- a/engines/wintermute/AdEntity.cpp
+++ b/engines/wintermute/AdEntity.cpp
@@ -577,6 +577,8 @@ HRESULT CAdEntity::Update() {
}
}
break;
+ default:
+ error("AdEntity::Update - Unhandled enum");
}
diff --git a/engines/wintermute/AdResponseBox.cpp b/engines/wintermute/AdResponseBox.cpp
index 603915396b..895ecd9bef 100644
--- a/engines/wintermute/AdResponseBox.cpp
+++ b/engines/wintermute/AdResponseBox.cpp
@@ -502,6 +502,8 @@ HRESULT CAdResponseBox::Listen(CBScriptHolder *param1, uint32 param2) {
ClearResponses();
} else return CBObject::Listen(param1, param2);
break;
+ default:
+ error("AdResponseBox::Listen - Unhandled enum");
}
return S_OK;
diff --git a/engines/wintermute/AdScene.cpp b/engines/wintermute/AdScene.cpp
index 904bc87a13..c5e3d63db0 100644
--- a/engines/wintermute/AdScene.cpp
+++ b/engines/wintermute/AdScene.cpp
@@ -944,8 +944,8 @@ HRESULT CAdScene::TraverseNodes(bool Update) {
Game->_renderer->Setup2D();
// for each layer
- int MainOffsetX = 0;
- int MainOffsetY = 0;
+ /* int MainOffsetX = 0; */
+ /* int MainOffsetY = 0; */
for (j = 0; j < _layers.GetSize(); j++) {
if (!_layers[j]->_active) continue;
diff --git a/engines/wintermute/BTransitionMgr.cpp b/engines/wintermute/BTransitionMgr.cpp
index c5c421250a..177c10a980 100644
--- a/engines/wintermute/BTransitionMgr.cpp
+++ b/engines/wintermute/BTransitionMgr.cpp
@@ -114,7 +114,8 @@ HRESULT CBTransitionMgr::Update() {
if (time > FADE_DURATION) _state = TRANS_MGR_READY;
}
break;
-
+ default:
+ error("CBTransitionMgr::Update - unhandled enum NUM_TRANSITION_TYPES");
}
if (IsReady()) {
diff --git a/engines/wintermute/UIButton.cpp b/engines/wintermute/UIButton.cpp
index e2c13e80ba..70b2825027 100644
--- a/engines/wintermute/UIButton.cpp
+++ b/engines/wintermute/UIButton.cpp
@@ -588,7 +588,7 @@ HRESULT CUIButton::Display(int OffsetX, int OffsetY) {
_hover = (!_disable && Game->_activeObject == this && (Game->_interactive || Game->_state == GAME_SEMI_FROZEN));
if ((_press && _hover && !Game->_mouseLeftDown) ||
- _oneTimePress && CBPlatform::GetTime() - _oneTimePressTime >= 100) Press();
+ (_oneTimePress && CBPlatform::GetTime() - _oneTimePressTime >= 100)) Press();
if (_disable) {
diff --git a/engines/wintermute/UIText.cpp b/engines/wintermute/UIText.cpp
index 3fcda74d1c..194bff2390 100644
--- a/engines/wintermute/UIText.cpp
+++ b/engines/wintermute/UIText.cpp
@@ -342,6 +342,8 @@ HRESULT CUIText::SaveAsText(CBDynBuffer *Buffer, int Indent) {
case VAL_CENTER:
Buffer->PutTextIndent(Indent + 2, "VERTICAL_ALIGN=\"%s\"\n", "center");
break;
+ default:
+ error("UIText::SaveAsText - Unhandled enum value: NUM_VERTICAL_ALIGN");
}
Buffer->PutTextIndent(Indent + 2, "\n");
diff --git a/engines/wintermute/UIWindow.cpp b/engines/wintermute/UIWindow.cpp
index 51d3ff0f2b..89980d8497 100644
--- a/engines/wintermute/UIWindow.cpp
+++ b/engines/wintermute/UIWindow.cpp
@@ -609,6 +609,8 @@ HRESULT CUIWindow::SaveAsText(CBDynBuffer *Buffer, int Indent) {
case TAL_CENTER:
Buffer->PutTextIndent(Indent + 2, "TITLE_ALIGN=\"%s\"\n", "center");
break;
+ default:
+ error("UIWindow::SaveAsText - Unhandled enum-value NUM_TEXT_ALIGN");
}
if (!CBPlatform::IsRectEmpty(&_titleRect)) {
diff --git a/engines/wintermute/graphics/transparentSurface.cpp b/engines/wintermute/graphics/transparentSurface.cpp
index c8ac9f1a2c..1f13e15c55 100644
--- a/engines/wintermute/graphics/transparentSurface.cpp
+++ b/engines/wintermute/graphics/transparentSurface.cpp
@@ -152,7 +152,6 @@ Common::Rect TransparentSurface::blit(Graphics::Surface &target, int posX, int p
int bShiftTarget = target.format.bShift;
int gShiftTarget = target.format.gShift;
int rShiftTarget = target.format.rShift;
- int aShiftTarget = target.format.aShift;
for (int i = 0; i < img->h; i++) {
out = outo;
diff --git a/engines/wintermute/scriptables/ScEngine.cpp b/engines/wintermute/scriptables/ScEngine.cpp
index 67e9f9eef0..bb65b438de 100644
--- a/engines/wintermute/scriptables/ScEngine.cpp
+++ b/engines/wintermute/scriptables/ScEngine.cpp
@@ -777,7 +777,7 @@ HRESULT CScEngine::LoadBreakpoints() {
int Count = Game->_registry->ReadInt("Debug", "NumBreakpoints", 0);
for (int i = 1; i <= Count; i++) {
- uint32 BufSize = 512;
+ /* uint32 BufSize = 512; */
sprintf(Key, "Breakpoint%d", i);
AnsiString breakpoint = Game->_registry->ReadString("Debug", Key, "");
diff --git a/engines/wintermute/scriptables/ScEngine.h b/engines/wintermute/scriptables/ScEngine.h
index 5ba93d6d0e..ab1504e899 100644
--- a/engines/wintermute/scriptables/ScEngine.h
+++ b/engines/wintermute/scriptables/ScEngine.h
@@ -42,8 +42,8 @@ typedef byte *(*DLL_COMPILE_BUFFER)(byte *Buffer, char *Source, uint32 BufferSi
typedef byte *(*DLL_COMPILE_FILE)(char *Filename, uint32 *CompiledSize);
typedef void (*DLL_RELEASE_BUFFER)(unsigned char *Buffer);
typedef void (*DLL_SET_CALLBACKS)(CALLBACKS *callbacks, void *Data);
-typedef int (*DLL_DEFINE_FUNCTION)(const char *Name);
-typedef int (*DLL_DEFINE_VARIABLE)(char *Name);
+typedef int (*DLL_DEFINE_FUNCTION)(const char *Name); /* Was non-const, changed to silence warnings */
+typedef int (*DLL_DEFINE_VARIABLE)(const char *Name); /* Was non-const, changed to silence warnings */
typedef void (*COMPILE_ERROR_CALLBACK)(int Line, char *Text , void *Data);
typedef void (*PARSE_ELEMENT_CALLBACK)(int Line, int Type, void *ElementData, void *Data);