diff options
author | Adrian Frühwirth | 2018-03-28 21:40:10 +0200 |
---|---|---|
committer | Adrian Frühwirth | 2018-03-28 21:40:10 +0200 |
commit | 0bf68e95810f48588944310dd193b7ea01461fda (patch) | |
tree | 11e21bb374c675eb73b88d37af9c7f1bda8f6ea3 /engines/tucker | |
parent | 2b9aa962d91b0cc70b33218b73f7c70cdaf2037c (diff) | |
download | scummvm-rg350-0bf68e95810f48588944310dd193b7ea01461fda.tar.gz scummvm-rg350-0bf68e95810f48588944310dd193b7ea01461fda.tar.bz2 scummvm-rg350-0bf68e95810f48588944310dd193b7ea01461fda.zip |
TUCKER: Follow code formatting convention for switch statements
Diffstat (limited to 'engines/tucker')
-rw-r--r-- | engines/tucker/saveload.cpp | 24 | ||||
-rw-r--r-- | engines/tucker/sequences.cpp | 22 | ||||
-rw-r--r-- | engines/tucker/tucker.cpp | 100 |
3 files changed, 73 insertions, 73 deletions
diff --git a/engines/tucker/saveload.cpp b/engines/tucker/saveload.cpp index 7e78f24978..a56ced915e 100644 --- a/engines/tucker/saveload.cpp +++ b/engines/tucker/saveload.cpp @@ -109,18 +109,18 @@ Common::Error TuckerEngine::loadGameState(int slot) { if (savegameError) { switch (savegameError) { - case kSavegameInvalidTypeError: - warning("Invalid savegame '%s' (does not look like a ScummVM Tucker-engine savegame)", fileName.c_str()); - break; - - case kSavegameInvalidVersionError: - warning("Invalid savegame '%s' (expected savegame version v%i-v%i, got v%i)", - fileName.c_str(), kSavegameVersionMinimum, kSavegameVersionCurrent, header.version); - break; - - default: - warning("Failed to load savegame '%s'", fileName.c_str()); - break; + case kSavegameInvalidTypeError: + warning("Invalid savegame '%s' (does not look like a ScummVM Tucker-engine savegame)", fileName.c_str()); + break; + + case kSavegameInvalidVersionError: + warning("Invalid savegame '%s' (expected savegame version v%i-v%i, got v%i)", + fileName.c_str(), kSavegameVersionMinimum, kSavegameVersionCurrent, header.version); + break; + + default: + warning("Failed to load savegame '%s'", fileName.c_str()); + break; } delete file; diff --git a/engines/tucker/sequences.cpp b/engines/tucker/sequences.cpp index 998183e99e..711818122f 100644 --- a/engines/tucker/sequences.cpp +++ b/engines/tucker/sequences.cpp @@ -216,17 +216,17 @@ void TuckerEngine::handleNewPartSequence() { unloadSprA02_01(); unloadSprC02_01(); switch (_part) { - case kPartOne: - filename = "sprites/partone.spr"; - break; - case kPartTwo: - filename = "sprites/parttwo.spr"; - break; - case kPartThree: - filename = "sprites/partthr.spr"; - break; - default: - break; + case kPartOne: + filename = "sprites/partone.spr"; + break; + case kPartTwo: + filename = "sprites/parttwo.spr"; + break; + case kPartThree: + filename = "sprites/partthr.spr"; + break; + default: + break; } _sprC02Table[1] = loadFile(filename.c_str(), 0); startSpeechSound(9000, 60); diff --git a/engines/tucker/tucker.cpp b/engines/tucker/tucker.cpp index fcf8f59532..a459c345cc 100644 --- a/engines/tucker/tucker.cpp +++ b/engines/tucker/tucker.cpp @@ -1470,23 +1470,23 @@ void TuckerEngine::handleMouseOnPanel() { void TuckerEngine::togglePanelStyle() { switch (_panelState) { - case kPanelStateShrinking: - if (++_switchPanelCounter == 25) { - _panelStyle = (_panelStyle == kPanelStyleVerbs) ? kPanelStyleIcons : kPanelStyleVerbs; - loadPanel(); - _forceRedrawPanelItems = true; - _panelState = kPanelStateExpanding; - } - break; + case kPanelStateShrinking: + if (++_switchPanelCounter == 25) { + _panelStyle = (_panelStyle == kPanelStyleVerbs) ? kPanelStyleIcons : kPanelStyleVerbs; + loadPanel(); + _forceRedrawPanelItems = true; + _panelState = kPanelStateExpanding; + } + break; - case kPanelStateExpanding: - if (--_switchPanelCounter == 0) { - _panelState = kPanelStateNormal; - } - break; + case kPanelStateExpanding: + if (--_switchPanelCounter == 0) { + _panelState = kPanelStateNormal; + } + break; - default: - break; + default: + break; } } @@ -1862,17 +1862,17 @@ void TuckerEngine::drawCurrentSprite() { static const int whitelistReservedColorsLocation48[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 }; static const int whitelistReservedColorsLocation61[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1 }; switch (_location) { - case kLocationCorridor: - whitelistReservedColors = (const int *)&whitelistReservedColorsLocation48; - break; + case kLocationCorridor: + whitelistReservedColors = (const int *)&whitelistReservedColorsLocation48; + break; - case kLocationParkPartThree: - if (_xPosCurrent <= 565) - whitelistReservedColors = (const int *)&whitelistReservedColorsLocation61; - break; + case kLocationParkPartThree: + if (_xPosCurrent <= 565) + whitelistReservedColors = (const int *)&whitelistReservedColorsLocation61; + break; - default: - break; + default: + break; } SpriteFrame *chr = &_spriteFramesTable[_currentSpriteAnimationFrame]; @@ -1968,32 +1968,32 @@ void TuckerEngine::redrawPanelItems() { int sz = 0; switch (_panelType) { - case kPanelTypeNormal: - src = _panelGfxBuf; - dst = _itemsGfxBuf + 3200; - sz = 16000; - break; - case kPanelTypeEmpty: - src = _panelGfxBuf + 16320; - dst = _itemsGfxBuf; - sz = 19200; - break; - case kPanelTypeLoadSavePlayQuit: - src = _panelGfxBuf + 16320; - dst = _itemsGfxBuf; - sz = 19200; - memcpy(dst, src, sz); - src = _panelGfxBuf + 55040; - dst = _itemsGfxBuf + 6400; - sz = 5120; - break; - case kPanelTypeLoadSaveSavegame: - src = _panelGfxBuf + 35200; - dst = _itemsGfxBuf; - sz = 19200; - break; - default: - break; + case kPanelTypeNormal: + src = _panelGfxBuf; + dst = _itemsGfxBuf + 3200; + sz = 16000; + break; + case kPanelTypeEmpty: + src = _panelGfxBuf + 16320; + dst = _itemsGfxBuf; + sz = 19200; + break; + case kPanelTypeLoadSavePlayQuit: + src = _panelGfxBuf + 16320; + dst = _itemsGfxBuf; + sz = 19200; + memcpy(dst, src, sz); + src = _panelGfxBuf + 55040; + dst = _itemsGfxBuf + 6400; + sz = 5120; + break; + case kPanelTypeLoadSaveSavegame: + src = _panelGfxBuf + 35200; + dst = _itemsGfxBuf; + sz = 19200; + break; + default: + break; } memcpy(dst, src, sz); if (_panelType == kPanelTypeNormal) { |