aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorStrangerke2016-03-20 18:01:40 +0100
committerEugene Sandulenko2016-05-10 09:54:21 +0200
commite1debd6e26720e168815872bfe2b4fec0444f98b (patch)
treec054a6b95c9ca7dac57bd4fcc36729837bf0375e /engines
parent6b1a2f36498341ad409cdb8a9e0419e17ae0781c (diff)
downloadscummvm-rg350-e1debd6e26720e168815872bfe2b4fec0444f98b.tar.gz
scummvm-rg350-e1debd6e26720e168815872bfe2b4fec0444f98b.tar.bz2
scummvm-rg350-e1debd6e26720e168815872bfe2b4fec0444f98b.zip
GNAP: Some renaming in scene 43
Diffstat (limited to 'engines')
-rw-r--r--engines/gnap/gnap.h9
-rw-r--r--engines/gnap/scenes/scene42.cpp3
-rw-r--r--engines/gnap/scenes/scene43.cpp57
3 files changed, 35 insertions, 34 deletions
diff --git a/engines/gnap/gnap.h b/engines/gnap/gnap.h
index 44d6e2e355..9f670f35f1 100644
--- a/engines/gnap/gnap.h
+++ b/engines/gnap/gnap.h
@@ -855,15 +855,18 @@ public:
void scene41_updateAnimations();
// Scene 42
- int _s42_currBBQVendorSequenceId, _s42_nextBBQVendorSequenceId;
+ int _s42_currBBQVendorSequenceId;
+ int _s42_nextBBQVendorSequenceId;
+
int scene42_init();
void scene42_updateHotspots();
void scene42_run();
void scene42_updateAnimations();
// Scene 43
- int _s43_dword_47F2B0;
- int _s43_dword_47F2B4;
+ int _currTwoHeadedGuySequenceId;
+ int _nextTwoHeadedGuySequenceId;
+
int scene43_init();
void scene43_updateHotspots();
void scene43_run();
diff --git a/engines/gnap/scenes/scene42.cpp b/engines/gnap/scenes/scene42.cpp
index 1399cbe8ad..8de3a694eb 100644
--- a/engines/gnap/scenes/scene42.cpp
+++ b/engines/gnap/scenes/scene42.cpp
@@ -196,11 +196,8 @@ void GnapEngine::scene42_run() {
break;
}
-
} else {
-
switch (_sceneClickedHotspot) {
-
case kHSDevice:
runMenu();
scene42_updateHotspots();
diff --git a/engines/gnap/scenes/scene43.cpp b/engines/gnap/scenes/scene43.cpp
index f7ba272082..e0cc8ad033 100644
--- a/engines/gnap/scenes/scene43.cpp
+++ b/engines/gnap/scenes/scene43.cpp
@@ -92,11 +92,11 @@ void GnapEngine::scene43_run() {
if (!isFlag(14))
_gameSys->insertSequence(0x1086F, 1, 0, 0, kSeqNone, 0, 0, 0);
- _s43_dword_47F2B0 = 0x13C;
- _s43_dword_47F2B4 = -1;
+ _currTwoHeadedGuySequenceId = 0x13C;
+ _nextTwoHeadedGuySequenceId = -1;
_gameSys->setAnimation(0x13C, 1, 2);
- _gameSys->insertSequence(_s43_dword_47F2B0, 1, 0, 0, kSeqNone, 0, 0, 0);
+ _gameSys->insertSequence(_currTwoHeadedGuySequenceId, 1, 0, 0, kSeqNone, 0, 0, 0);
if (isFlag(12)) {
_toyUfoId = 0;
@@ -332,27 +332,27 @@ void GnapEngine::scene43_run() {
updateGnapIdleSequence();
if (!_timers[4] && (!isFlag(12) || !isFlag(19))) {
_timers[4] = getRandom(100) + 100;
- if (_gnapActionStatus < 0 && _beaverActionStatus < 0 && _s43_dword_47F2B4 == -1) {
+ if (_gnapActionStatus < 0 && _beaverActionStatus < 0 && _nextTwoHeadedGuySequenceId == -1) {
_gnapRandomValue = getRandom(5);
switch (_gnapRandomValue) {
case 0:
- _s43_dword_47F2B4 = 0x13C;
+ _nextTwoHeadedGuySequenceId = 0x13C;
break;
case 1:
- _s43_dword_47F2B4 = 0x134;
+ _nextTwoHeadedGuySequenceId = 0x134;
break;
case 2:
- _s43_dword_47F2B4 = 0x135;
+ _nextTwoHeadedGuySequenceId = 0x135;
break;
case 3:
- _s43_dword_47F2B4 = 0x136;
+ _nextTwoHeadedGuySequenceId = 0x136;
break;
case 4:
- _s43_dword_47F2B4 = 0x13A;
+ _nextTwoHeadedGuySequenceId = 0x13A;
break;
}
- if (_s43_dword_47F2B4 == _s43_dword_47F2B0)
- _s43_dword_47F2B4 = -1;
+ if (_nextTwoHeadedGuySequenceId == _currTwoHeadedGuySequenceId)
+ _nextTwoHeadedGuySequenceId = -1;
}
}
}
@@ -376,13 +376,13 @@ void GnapEngine::scene43_run() {
}
void GnapEngine::scene43_updateAnimations() {
-
if (_gameSys->getAnimationStatus(0) == 2) {
switch (_gnapActionStatus) {
case 0:
_gameSys->setAnimation(0, 0, 0);
_sceneDone = true;
break;
+
case 1:
if (_gameSys->getAnimationStatus(2) == 2) {
_timers[2] = getRandom(30) + 20;
@@ -391,15 +391,16 @@ void GnapEngine::scene43_updateAnimations() {
_gnapSequenceId = 0x13D;
_gnapSequenceDatNum = 0;
_gameSys->setAnimation(0x13D, _gnapId, 0);
- _s43_dword_47F2B4 = 0x13B;
- _gameSys->insertSequence(0x13B, 1, _s43_dword_47F2B0, 1, kSeqSyncWait, 0, 0, 0);
- _gameSys->setAnimation(_s43_dword_47F2B4, 1, 2);
- _s43_dword_47F2B0 = _s43_dword_47F2B4;
- _s43_dword_47F2B4 = -1;
+ _nextTwoHeadedGuySequenceId = 0x13B;
+ _gameSys->insertSequence(0x13B, 1, _currTwoHeadedGuySequenceId, 1, kSeqSyncWait, 0, 0, 0);
+ _gameSys->setAnimation(_nextTwoHeadedGuySequenceId, 1, 2);
+ _currTwoHeadedGuySequenceId = _nextTwoHeadedGuySequenceId;
+ _nextTwoHeadedGuySequenceId = -1;
_timers[4] = getRandom(100) + 100;
_gnapActionStatus = -1;
}
break;
+
default:
_gameSys->setAnimation(0, 0, 0);
_gnapActionStatus = -1;
@@ -408,24 +409,24 @@ void GnapEngine::scene43_updateAnimations() {
}
if (_gameSys->getAnimationStatus(2) == 2) {
- if (_s43_dword_47F2B0 == 0x13A) {
+ if (_currTwoHeadedGuySequenceId == 0x13A) {
if (isFlag(19)) {
- _s43_dword_47F2B4 = 0x13E;
+ _nextTwoHeadedGuySequenceId = 0x13E;
stopSound(0x108F6);
} else if (getRandom(2) != 0) {
- _s43_dword_47F2B4 = 0x137;
+ _nextTwoHeadedGuySequenceId = 0x137;
} else {
- _s43_dword_47F2B4 = 0x138;
+ _nextTwoHeadedGuySequenceId = 0x138;
}
- } else if (_s43_dword_47F2B0 == 0x13E) {
+ } else if (_currTwoHeadedGuySequenceId == 0x13E) {
_sceneDone = true;
_newSceneNum = 54;
}
- if (_s43_dword_47F2B4 != -1) {
- _gameSys->insertSequence(_s43_dword_47F2B4, 1, _s43_dword_47F2B0, 1, kSeqSyncWait, 0, 0, 0);
- _gameSys->setAnimation(_s43_dword_47F2B4, 1, 2);
- _s43_dword_47F2B0 = _s43_dword_47F2B4;
- _s43_dword_47F2B4 = -1;
+ if (_nextTwoHeadedGuySequenceId != -1) {
+ _gameSys->insertSequence(_nextTwoHeadedGuySequenceId, 1, _currTwoHeadedGuySequenceId, 1, kSeqSyncWait, 0, 0, 0);
+ _gameSys->setAnimation(_nextTwoHeadedGuySequenceId, 1, 2);
+ _currTwoHeadedGuySequenceId = _nextTwoHeadedGuySequenceId;
+ _nextTwoHeadedGuySequenceId = -1;
_timers[4] = getRandom(100) + 100;
}
}
@@ -457,7 +458,7 @@ void GnapEngine::scene43_updateAnimations() {
_gnapActionStatus = 3;
break;
case 8:
- _s43_dword_47F2B4 = 0x13A;
+ _nextTwoHeadedGuySequenceId = 0x13A;
_toyUfoX = 514;
_toyUfoY = 125;
toyUfoFlyTo(835, 125, 0, 835, 0, 300, 3);