aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/voyeur/files_threads.cpp2
-rw-r--r--engines/voyeur/graphics.cpp8
-rw-r--r--engines/voyeur/voyeur.cpp11
-rw-r--r--engines/voyeur/voyeur_game.cpp3
4 files changed, 9 insertions, 15 deletions
diff --git a/engines/voyeur/files_threads.cpp b/engines/voyeur/files_threads.cpp
index 1764c223d7..4348a14896 100644
--- a/engines/voyeur/files_threads.cpp
+++ b/engines/voyeur/files_threads.cpp
@@ -1398,11 +1398,11 @@ int ThreadResource::doInterface() {
_vm->_eventsManager.setCursor(crosshairsCursor);
// Main loop
- int priorRegionIndex = -1;
int regionIndex = 0;
Common::Rect mansionViewBounds(MANSION_VIEW_X, MANSION_VIEW_Y,
MANSION_VIEW_X + MANSION_VIEW_WIDTH, MANSION_VIEW_Y + MANSION_VIEW_HEIGHT);
+ int priorRegionIndex = -1;
do {
_vm->_voyeurArea = AREA_INTERFACE;
_vm->doTimeBar(true);
diff --git a/engines/voyeur/graphics.cpp b/engines/voyeur/graphics.cpp
index c4080e7d38..ec26017541 100644
--- a/engines/voyeur/graphics.cpp
+++ b/engines/voyeur/graphics.cpp
@@ -135,8 +135,7 @@ void GraphicsManager::sDrawPic(DisplayResource *srcDisplay, DisplayResource *des
Common::Rect backBounds;
int var24;
bool isClipped = false;
- int var52;
- int var20, var22;
+ int var22;
int var26;
byte pixel = 0;
@@ -182,8 +181,7 @@ void GraphicsManager::sDrawPic(DisplayResource *srcDisplay, DisplayResource *des
var24 = offset.y - newBounds.top;
if (var24 < 0) {
- var52 = width2;
- srcOffset -= var24 * var52;
+ srcOffset -= var24 * width2;
height1 += var24;
offset.y = newBounds.top;
@@ -193,7 +191,7 @@ void GraphicsManager::sDrawPic(DisplayResource *srcDisplay, DisplayResource *des
isClipped = true;
}
- var20 = newBounds.bottom - (offset.y + height1);
+ int var20 = newBounds.bottom - (offset.y + height1);
if (var20 < 0) {
height1 += var20;
if (height1 <= 0)
diff --git a/engines/voyeur/voyeur.cpp b/engines/voyeur/voyeur.cpp
index bc2a30b0b7..d6b95316be 100644
--- a/engines/voyeur/voyeur.cpp
+++ b/engines/voyeur/voyeur.cpp
@@ -265,10 +265,6 @@ bool VoyeurEngine::doLock() {
byte *buttonVoc = _filesManager.fload("button.voc", &buttonVocSize);
byte *wrongVoc = _filesManager.fload("wrong.voc", &wrongVocSize);
LockClass lock;
- PictureResource *cursorPic;
- byte *keyData;
- int keyCount;
- int key;
if (_bVoy->getBoltGroup(0x700)) {
lock.getSysDate();
@@ -278,12 +274,12 @@ bool VoyeurEngine::doLock() {
_voy._viewBounds = _bVoy->boltEntry(0x704)._rectResource;
Common::String password = lock._password;
- cursorPic = _bVoy->getPictureResource(0x702);
+ PictureResource *cursorPic = _bVoy->getPictureResource(0x702);
assert(cursorPic);
// Get the mappings of keys on the keypad
- keyData = _bVoy->memberAddr(0x705);
- keyCount = READ_LE_UINT16(keyData);
+ byte *keyData = _bVoy->memberAddr(0x705);
+ int keyCount = READ_LE_UINT16(keyData);
_graphicsManager._backColors = _bVoy->getCMapResource(0x7010000);
_graphicsManager._backgroundPage = _bVoy->getPictureResource(0x700);
@@ -338,6 +334,7 @@ bool VoyeurEngine::doLock() {
}
// Loop for getting key presses
+ int key;
do {
do {
// Scan through the list of key rects to check if a keypad key is highlighted
diff --git a/engines/voyeur/voyeur_game.cpp b/engines/voyeur/voyeur_game.cpp
index a8330c02b3..2212453cdf 100644
--- a/engines/voyeur/voyeur_game.cpp
+++ b/engines/voyeur/voyeur_game.cpp
@@ -1040,7 +1040,6 @@ void VoyeurEngine::doScroll(const Common::Point &pt) {
Common::Rect clipRect(72, 47, 72 + 240, 47 + 148);
(*_graphicsManager._vPort)->setupViewPort(NULL, &clipRect);
- PictureResource *pic;
int base = 0;
switch (_voy._transitionId) {
case 0:
@@ -1062,7 +1061,7 @@ void VoyeurEngine::doScroll(const Common::Point &pt) {
}
if (base) {
- pic = _bVoy->boltEntry(base + 3)._picResource;
+ PictureResource *pic = _bVoy->boltEntry(base + 3)._picResource;
_graphicsManager.sDrawPic(pic, *_graphicsManager._vPort, Common::Point(784 - pt.x - 712, 150 - pt.y - 104));
pic = _bVoy->boltEntry(base + 4)._picResource;
_graphicsManager.sDrawPic(pic, *_graphicsManager._vPort, Common::Point(784 - pt.x - 712, 150 - pt.y - 44));