aboutsummaryrefslogtreecommitdiff
path: root/engines/gnap
diff options
context:
space:
mode:
authorStrangerke2016-05-30 07:34:28 +0200
committerStrangerke2016-05-30 07:34:28 +0200
commite0c032d87abc0f000f9ccb55853a5988ff3e5be5 (patch)
tree1b80379d4b9fa7d637f67b0547b1497b677cc826 /engines/gnap
parent7792297691fa17abcbe9a695e092bab01d19a41c (diff)
downloadscummvm-rg350-e0c032d87abc0f000f9ccb55853a5988ff3e5be5.tar.gz
scummvm-rg350-e0c032d87abc0f000f9ccb55853a5988ff3e5be5.tar.bz2
scummvm-rg350-e0c032d87abc0f000f9ccb55853a5988ff3e5be5.zip
GNAP: Make two variables local to Scene52::run()
Diffstat (limited to 'engines/gnap')
-rw-r--r--engines/gnap/scenes/arcade.cpp18
-rw-r--r--engines/gnap/scenes/arcade.h2
2 files changed, 8 insertions, 12 deletions
diff --git a/engines/gnap/scenes/arcade.cpp b/engines/gnap/scenes/arcade.cpp
index 5d65bc7c3b..94d3c7d84f 100644
--- a/engines/gnap/scenes/arcade.cpp
+++ b/engines/gnap/scenes/arcade.cpp
@@ -1885,8 +1885,6 @@ Scene52::Scene52(GnapEngine *vm) : Scene(vm) {
_nextUfoSequenceId = -1;
_ufoSequenceId = -1;
_liveAlienRows = 0;
- _arcadeScreenLeft = 0;
- _arcadeScreenRight = 0;
}
int Scene52::init() {
@@ -2642,8 +2640,8 @@ void Scene52::run() {
_shipMidY = _vm->_gameSys->getSpriteHeightById(15);
_shipPosX = (800 - _shipMidX) / 2;
_arcadeScreenBottom = 496;
- _arcadeScreenRight = 595 - _shipMidX;
- _arcadeScreenLeft = 210;
+ int arcadeScreenRight = 595 - _shipMidX;
+ int arcadeScreenLeft = 210;
_shipsLeft = 3;
_alienCounter = 0;
@@ -2685,10 +2683,10 @@ void Scene52::run() {
while (_vm->isKeyStatus2(Common::KEYCODE_RIGHT)) {
update();
if (_vm->_gameSys->getAnimationStatus(7) == 2) {
- if (_shipPosX < _arcadeScreenRight) {
+ if (_shipPosX < arcadeScreenRight) {
_shipPosX += 15;
- if (_shipPosX > _arcadeScreenRight)
- _shipPosX = _arcadeScreenRight;
+ if (_shipPosX > arcadeScreenRight)
+ _shipPosX = arcadeScreenRight;
_vm->_gameSys->setAnimation(_nextUfoSequenceId, 256, 7);
_vm->_gameSys->insertSequence(_nextUfoSequenceId, 256, _ufoSequenceId, 256, kSeqSyncWait, 0, _shipPosX, _arcadeScreenBottom);
_ufoSequenceId = _nextUfoSequenceId;
@@ -2702,10 +2700,10 @@ void Scene52::run() {
while (_vm->isKeyStatus2(Common::KEYCODE_LEFT)) {
update();
if (_vm->_gameSys->getAnimationStatus(7) == 2) {
- if (_shipPosX > _arcadeScreenLeft) {
+ if (_shipPosX > arcadeScreenLeft) {
_shipPosX -= 15;
- if (_shipPosX < _arcadeScreenLeft)
- _shipPosX = _arcadeScreenLeft;
+ if (_shipPosX < arcadeScreenLeft)
+ _shipPosX = arcadeScreenLeft;
_vm->_gameSys->setAnimation(_nextUfoSequenceId, 256, 7);
_vm->_gameSys->insertSequence(_nextUfoSequenceId, 256, _ufoSequenceId, 256, kSeqSyncWait, 0, _shipPosX, _arcadeScreenBottom);
_ufoSequenceId = _nextUfoSequenceId;
diff --git a/engines/gnap/scenes/arcade.h b/engines/gnap/scenes/arcade.h
index e472e00508..ab519ee00b 100644
--- a/engines/gnap/scenes/arcade.h
+++ b/engines/gnap/scenes/arcade.h
@@ -216,8 +216,6 @@ private:
int _liveAlienRows;
int _gameScore;
bool _soundToggle;
- int _arcadeScreenLeft;
- int _arcadeScreenRight;
int _arcadeScreenBottom;
int _shipsLeft;
int _shieldSpriteIds[3];