diff options
author | Strangerke | 2016-05-30 07:15:43 +0200 |
---|---|---|
committer | Strangerke | 2016-05-30 07:15:43 +0200 |
commit | 52ee33dfa675f0520eb2345c46e2bb0ecaa2aa2f (patch) | |
tree | 2f20d75e275a3974d87afb9380cdd000d22fb3d9 /engines/gnap | |
parent | 73c366ac5b0007177bd094a06b6f94cb78e9084a (diff) | |
download | scummvm-rg350-52ee33dfa675f0520eb2345c46e2bb0ecaa2aa2f.tar.gz scummvm-rg350-52ee33dfa675f0520eb2345c46e2bb0ecaa2aa2f.tar.bz2 scummvm-rg350-52ee33dfa675f0520eb2345c46e2bb0ecaa2aa2f.zip |
GNAP: Make 2 variables local to setDeviceHotspot
Diffstat (limited to 'engines/gnap')
-rw-r--r-- | engines/gnap/gnap.cpp | 12 | ||||
-rw-r--r-- | engines/gnap/gnap.h | 2 |
2 files changed, 6 insertions, 8 deletions
diff --git a/engines/gnap/gnap.cpp b/engines/gnap/gnap.cpp index d86d1a484c..f6c758becd 100644 --- a/engines/gnap/gnap.cpp +++ b/engines/gnap/gnap.cpp @@ -160,8 +160,6 @@ GnapEngine::GnapEngine(OSystem *syst, const ADGameDescription *gd) : _fullScreenSpriteId = 0; _deviceX1 = 0; _deviceY1 = 0; - _deviceX2 = 0; - _deviceY2 = 0; _soundTimerIndexA = 0; _soundTimerIndexB = 0; _soundTimerIndexC = 0; @@ -654,19 +652,19 @@ void GnapEngine::removeDeviceIconActive() { void GnapEngine::setDeviceHotspot(int hotspotIndex, int x1, int y1, int x2, int y2) { _deviceX1 = x1; - _deviceX2 = x2; _deviceY1 = y1; - _deviceY2 = y2; + int deviceX2 = x2; + int deviceY2 = y2; if (x1 == -1) _deviceX1 = 730; if (x2 == -1) - _deviceX2 = 780; + deviceX2 = 780; if (y1 == -1) _deviceY1 = 14; if (y2 == -1) - _deviceY2 = 79; + deviceY2 = 79; - _hotspots[hotspotIndex]._rect = Common::Rect(_deviceX1, _deviceY1, _deviceX2, _deviceY2); + _hotspots[hotspotIndex]._rect = Common::Rect(_deviceX1, _deviceY1, deviceX2, deviceY2); _hotspots[hotspotIndex]._flags = SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR; } diff --git a/engines/gnap/gnap.h b/engines/gnap/gnap.h index 84c40e2969..29665728d5 100644 --- a/engines/gnap/gnap.h +++ b/engines/gnap/gnap.h @@ -296,7 +296,7 @@ public: Graphics::Surface *_fullScreenSprite; int _fullScreenSpriteId; - int _deviceX1, _deviceY1, _deviceX2, _deviceY2; + int _deviceX1, _deviceY1; int _soundTimerIndexA; int _soundTimerIndexB; |