mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-07 02:39:56 +00:00
VOYEUR: Fix some more CppCheck warnings
This commit is contained in:
parent
7e5dea4f5e
commit
d0703467b4
@ -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);
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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));
|
||||
|
Loading…
x
Reference in New Issue
Block a user