aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorStrangerke2014-03-07 14:33:43 +0100
committerStrangerke2014-03-07 14:33:43 +0100
commit705b48025b9d62dc1d6edf90afaa0d4252340934 (patch)
treebe9cd32351ffb3e4bdeb12d7991c34bea526290d /engines
parentdc2094f7a6e00283b6349bce9faac192c7626412 (diff)
downloadscummvm-rg350-705b48025b9d62dc1d6edf90afaa0d4252340934.tar.gz
scummvm-rg350-705b48025b9d62dc1d6edf90afaa0d4252340934.tar.bz2
scummvm-rg350-705b48025b9d62dc1d6edf90afaa0d4252340934.zip
TUCKER: Reduce the scope of some variables
Diffstat (limited to 'engines')
-rw-r--r--engines/tucker/locations.cpp2
-rw-r--r--engines/tucker/tucker.cpp8
2 files changed, 6 insertions, 4 deletions
diff --git a/engines/tucker/locations.cpp b/engines/tucker/locations.cpp
index 13d5f06894..b53ed44f5a 100644
--- a/engines/tucker/locations.cpp
+++ b/engines/tucker/locations.cpp
@@ -2354,7 +2354,6 @@ void TuckerEngine::execData3PreUpdate_locationNum53() {
}
void TuckerEngine::updateSprite_locationNum54(int i) {
- int state = 3;
if (_flagsTable[141] == 2) {
_spritesTable[i].needUpdate = 0;
setCharacterAnimation(0, i);
@@ -2367,6 +2366,7 @@ void TuckerEngine::updateSprite_locationNum54(int i) {
setCharacterAnimation(2, i);
_flagsTable[141] = 3;
} else {
+ int state = 3;
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
_spritesTable[i].needUpdate = 2;
state = (getRandomNumber() < 12000) ? 2 : 4;
diff --git a/engines/tucker/tucker.cpp b/engines/tucker/tucker.cpp
index 7eb4856050..0e1188031b 100644
--- a/engines/tucker/tucker.cpp
+++ b/engines/tucker/tucker.cpp
@@ -1831,14 +1831,16 @@ void TuckerEngine::rememberSpeechSound() {
}
void TuckerEngine::redrawPanelItems() {
- const uint8 *src = 0;
- uint8 *dst = 0;
- int sz = 0;
if (_forceRedrawPanelItems || (_redrawPanelItemsCounter != 0 && _panelState == 0)) {
_forceRedrawPanelItems = false;
if (_redrawPanelItemsCounter > 0) {
--_redrawPanelItemsCounter;
}
+
+ const uint8 *src = 0;
+ uint8 *dst = 0;
+ int sz = 0;
+
switch (_panelState) {
case 0:
src = _panelGfxBuf;