aboutsummaryrefslogtreecommitdiff
path: root/engines/director
diff options
context:
space:
mode:
authorD G Turner2019-10-17 21:43:00 +0100
committerD G Turner2019-10-17 21:43:00 +0100
commit80522f1187a8af827f018c8714cb07ee109182e3 (patch)
tree001272693b2a9d431a11cd36f4d2837f8b03af10 /engines/director
parent9ce2ba27589b9341510427452a01a4217d70f55f (diff)
downloadscummvm-rg350-80522f1187a8af827f018c8714cb07ee109182e3.tar.gz
scummvm-rg350-80522f1187a8af827f018c8714cb07ee109182e3.tar.bz2
scummvm-rg350-80522f1187a8af827f018c8714cb07ee109182e3.zip
DIRECTOR: Fix Missing Default Switch Cases
These are flagged by GCC if -Wswitch-default is enabled.
Diffstat (limited to 'engines/director')
-rw-r--r--engines/director/frame.cpp7
-rw-r--r--engines/director/images.cpp3
-rw-r--r--engines/director/lingo/lingo-funcs.cpp1
-rw-r--r--engines/director/lingo/lingo-lex.cpp3
-rw-r--r--engines/director/score.cpp1
5 files changed, 13 insertions, 2 deletions
diff --git a/engines/director/frame.cpp b/engines/director/frame.cpp
index fe0f2569f1..15463c05c3 100644
--- a/engines/director/frame.cpp
+++ b/engines/director/frame.cpp
@@ -587,6 +587,8 @@ void Frame::renderSprites(Graphics::ManagedSurface &surface, bool renderTrail) {
case 7:
castType = kCastText;
break;
+ default:
+ break;
}
} else {
if (!_vm->getCurrentScore()->_castTypes.contains(_sprites[i]->_castId)) {
@@ -708,6 +710,9 @@ void Frame::renderButton(Graphics::ManagedSurface &surface, uint16 spriteId) {
case kTypeRadio:
warning("STUB: renderButton: kTypeRadio");
break;
+ default:
+ warning("renderButton: Unknown buttonType");
+ break;
}
}
@@ -743,7 +748,6 @@ void Frame::inkBasedBlit(Graphics::ManagedSurface &targetSurface, const Graphics
void Frame::renderText(Graphics::ManagedSurface &surface, uint16 spriteId, Common::Rect *textSize) {
TextCast *textCast = _sprites[spriteId]->_buttonCast != nullptr ? (TextCast*)_sprites[spriteId]->_buttonCast : _sprites[spriteId]->_textCast;
-
int x = _sprites[spriteId]->_startPoint.x; // +rectLeft;
int y = _sprites[spriteId]->_startPoint.y; // +rectTop;
int height = textCast->initialRect.height(); //_sprites[spriteId]->_height;
@@ -829,6 +833,7 @@ void Frame::renderText(Graphics::ManagedSurface &surface, uint16 spriteId, Commo
switch (textCast->textAlign) {
case kTextAlignLeft:
+ default:
break;
case kTextAlignCenter:
textX = (width / 2) - (textSurface->w / 2) + (padding / 2) + borderSize;
diff --git a/engines/director/images.cpp b/engines/director/images.cpp
index 4574165bb6..007dc8a496 100644
--- a/engines/director/images.cpp
+++ b/engines/director/images.cpp
@@ -226,9 +226,10 @@ BITDDecoderV4::BITDDecoderV4(int w, int h, uint16 bitsPerPixel) {
case 32:
//pf = Graphics::PixelFormat::PixelFormat(bitsPerPixel / 8, 8, 8, 8, 8, 24, 16, 8, 0);
break;
+ default:
+ break;
}
-
// HACK: Create a padded surface by adjusting w after create()
_surface->create(pitch, h, pf);
_surface->w = w;
diff --git a/engines/director/lingo/lingo-funcs.cpp b/engines/director/lingo/lingo-funcs.cpp
index dbd637a3fd..e17712848a 100644
--- a/engines/director/lingo/lingo-funcs.cpp
+++ b/engines/director/lingo/lingo-funcs.cpp
@@ -327,6 +327,7 @@ void Lingo::func_cursor(int c) {
switch (c) {
case 0:
case -1:
+ default:
_vm->getMacWindowManager()->pushArrowCursor();
break;
case 1:
diff --git a/engines/director/lingo/lingo-lex.cpp b/engines/director/lingo/lingo-lex.cpp
index 7b98269f2f..0458c27b84 100644
--- a/engines/director/lingo/lingo-lex.cpp
+++ b/engines/director/lingo/lingo-lex.cpp
@@ -1644,6 +1644,9 @@ case YY_STATE_EOF(INITIAL):
else switch ( yy_get_next_buffer( ) )
{
+ default:
+ break;
+
case EOB_ACT_END_OF_FILE:
{
(yy_did_buffer_switch_on_eof) = 0;
diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index 30cbe1d4c3..33e48f239f 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -895,6 +895,7 @@ void Score::dumpScript(const char *script, ScriptType type, uint16 id) {
switch (type) {
case kNoneScript:
+ default:
error("Incorrect dumpScript() call");
case kFrameScript:
typeName = "frame";