aboutsummaryrefslogtreecommitdiff
path: root/engines/mads/nebular
diff options
context:
space:
mode:
authorFilippos Karapetis2015-11-23 00:41:07 +0200
committerFilippos Karapetis2015-11-23 00:41:07 +0200
commitd9e2943fe6962810ffccc6ae136d7092ac0bd4bf (patch)
tree527c856b2adf129b8bde442823ffe6bcf81f4684 /engines/mads/nebular
parent0c7bde123b93f30939b3560e3117e1b13d27502e (diff)
parentf0d17d2c061dd2d4648e501d8f0caf8fd3ad7f73 (diff)
downloadscummvm-rg350-d9e2943fe6962810ffccc6ae136d7092ac0bd4bf.tar.gz
scummvm-rg350-d9e2943fe6962810ffccc6ae136d7092ac0bd4bf.tar.bz2
scummvm-rg350-d9e2943fe6962810ffccc6ae136d7092ac0bd4bf.zip
Merge pull request #626 from dreammaster/phantom
MADS: Return of the Phantom WIP
Diffstat (limited to 'engines/mads/nebular')
-rw-r--r--engines/mads/nebular/game_nebular.cpp20
-rw-r--r--engines/mads/nebular/nebular_scenes1.cpp30
-rw-r--r--engines/mads/nebular/nebular_scenes2.cpp88
-rw-r--r--engines/mads/nebular/nebular_scenes3.cpp80
-rw-r--r--engines/mads/nebular/nebular_scenes4.cpp72
-rw-r--r--engines/mads/nebular/nebular_scenes5.cpp52
-rw-r--r--engines/mads/nebular/nebular_scenes6.cpp126
-rw-r--r--engines/mads/nebular/nebular_scenes7.cpp94
-rw-r--r--engines/mads/nebular/nebular_scenes8.cpp36
9 files changed, 299 insertions, 299 deletions
diff --git a/engines/mads/nebular/game_nebular.cpp b/engines/mads/nebular/game_nebular.cpp
index 8f40bc15c8..5526845552 100644
--- a/engines/mads/nebular/game_nebular.cpp
+++ b/engines/mads/nebular/game_nebular.cpp
@@ -354,7 +354,7 @@ void GameNebular::setSectionHandler() {
void GameNebular::checkShowDialog() {
// Loop for showing dialogs, if any need to be shown
- if (_vm->_dialogs->_pendingDialog && (_player._stepEnabled || _winStatus)
+ if (_vm->_dialogs->_pendingDialog && (_player._stepEnabled || _winStatus)
&& !_globals[kCopyProtectFailed]) {
_player.releasePlayerSprites();
@@ -828,7 +828,7 @@ void GameNebular::unhandledAction() {
void GameNebular::step() {
if (_player._visible && _player._stepEnabled && !_player._moving &&
(_player._facing == _player._turnToFacing)) {
- if (_scene._frameStartTime >= *((uint32 *)&_globals[kWalkerTiming])) {
+ if (_scene._frameStartTime >= (uint32)_globals[kWalkerTiming]) {
if (!_player._stopWalkerIndex) {
int randomVal = _vm->getRandomNumber(29999);
if (_globals[kSexOfRex] == REX_MALE) {
@@ -877,19 +877,19 @@ void GameNebular::step() {
}
}
- *((uint32 *)&_globals[kWalkerTiming]) += 6;
+ _globals[kWalkerTiming] += 6;
}
}
// Below is countdown to set the timebomb off in room 604
if (_globals[kTimebombStatus] == TIMEBOMB_ACTIVATED) {
- int diff = _scene._frameStartTime - *((uint32 *)&_globals[kTimebombClock]);
- if ((diff >= 0) && (diff <= 60)) {
- *((uint32 *)&_globals[kTimebombTimer]) += diff;
- } else {
- ++*((uint32 *)&_globals[kTimebombTimer]);
- }
- *((uint32 *)&_globals[kTimebombClock]) = _scene._frameStartTime;
+ int diff = _scene._frameStartTime - _globals[kTimebombClock];
+ if ((diff >= 0) && (diff <= 60))
+ _globals[kTimebombTimer] += diff;
+ else
+ ++_globals[kTimebombTimer];
+
+ _globals[kTimebombClock] = (int) _scene._frameStartTime;
}
}
diff --git a/engines/mads/nebular/nebular_scenes1.cpp b/engines/mads/nebular/nebular_scenes1.cpp
index 0cb1b11ee9..9207d87be7 100644
--- a/engines/mads/nebular/nebular_scenes1.cpp
+++ b/engines/mads/nebular/nebular_scenes1.cpp
@@ -258,32 +258,32 @@ void Scene101::step() {
break;
}
- if (_scene->_activeAnimation != nullptr) {
- if ((_scene->_activeAnimation->getCurrentFrame() >= 6) && (_messageNum == 0)) {
+ if (_scene->_animation[0] != nullptr) {
+ if ((_scene->_animation[0]->getCurrentFrame() >= 6) && (_messageNum == 0)) {
_messageNum++;
_scene->_kernelMessages.add(Common::Point(63, _posY), 0x1110, 0, 0, 240, _game.getQuote(49));
_posY += 14;
}
- if ((_scene->_activeAnimation->getCurrentFrame() >= 7) && (_messageNum == 1)) {
+ if ((_scene->_animation[0]->getCurrentFrame() >= 7) && (_messageNum == 1)) {
_messageNum++;
_scene->_kernelMessages.add(Common::Point(63, _posY), 0x1110, 0, 0, 240, _game.getQuote(54));
_posY += 14;
}
- if ((_scene->_activeAnimation->getCurrentFrame() >= 10) && (_messageNum == 2)) {
+ if ((_scene->_animation[0]->getCurrentFrame() >= 10) && (_messageNum == 2)) {
_messageNum++;
_scene->_kernelMessages.add(Common::Point(63, _posY), 0x1110, 0, 0, 240, _game.getQuote(55));
_posY += 14;
}
- if ((_scene->_activeAnimation->getCurrentFrame() >= 17) && (_messageNum == 3)) {
+ if ((_scene->_animation[0]->getCurrentFrame() >= 17) && (_messageNum == 3)) {
_messageNum++;
_scene->_kernelMessages.add(Common::Point(63, _posY), 0x1110, 0, 0, 240, _game.getQuote(56));
_posY += 14;
}
- if ((_scene->_activeAnimation->getCurrentFrame() >= 20) && (_messageNum == 4)) {
+ if ((_scene->_animation[0]->getCurrentFrame() >= 20) && (_messageNum == 4)) {
_messageNum++;
_scene->_kernelMessages.add(Common::Point(63, _posY), 0x1110, 0, 0, 240, _game.getQuote(50));
_posY += 14;
@@ -1263,7 +1263,7 @@ void Scene102::actions() {
return;
}
- if (_action.isAction(VERB_LOOK, NOUN_BURGER) && (_action._mainObjectSource == 4)) {
+ if (_action.isAction(VERB_LOOK, NOUN_BURGER) && (_action._mainObjectSource == CAT_HOTSPOT)) {
_vm->_dialogs->show(801);
_action._inProgress = false;
}
@@ -1782,7 +1782,7 @@ void Scene104::step() {
if ((_game._player._special > 0) && _game._player._stepEnabled)
_game._player._stepEnabled = false;
- if (_kargShootingFl && (_scene->_activeAnimation->getCurrentFrame() >= 19)) {
+ if (_kargShootingFl && (_scene->_animation[0]->getCurrentFrame() >= 19)) {
_scene->_kernelMessages.add(Common::Point(0, 0), 0x1110, 34, 0, 120, _game.getQuote(52));
_kargShootingFl = false;
}
@@ -2079,7 +2079,7 @@ void Scene106::step() {
}
}
- if (_firstEmergingFl && (_scene->_activeAnimation->getCurrentFrame() >= 19)) {
+ if (_firstEmergingFl && (_scene->_animation[0]->getCurrentFrame() >= 19)) {
_firstEmergingFl = false;
_scene->_kernelMessages.add(Common::Point(0, 0), 0x1110, 34, 0, 120, _game.getQuote(52));
}
@@ -2263,7 +2263,7 @@ void Scene107::enter() {
}
void Scene107::step() {
- if (_shootingFl && (_scene->_activeAnimation->getCurrentFrame() >= 19)) {
+ if (_shootingFl && (_scene->_animation[0]->getCurrentFrame() >= 19)) {
_scene->_kernelMessages.add(Common::Point(0, 0), 0x1110, 34, 0, 120, _game.getQuote(52));
_shootingFl = false;
}
@@ -2295,7 +2295,7 @@ void Scene107::actions() {
_scene->_nextSceneId = 105;
else if (_action.isAction(VERB_LOOK, NOUN_NORTHERN_SEA_CLIFF))
_vm->_dialogs->show(10701);
- else if (_action.isAction(VERB_LOOK, NOUN_DEAD_FISH) && (_action._mainObjectSource == 4))
+ else if (_action.isAction(VERB_LOOK, NOUN_DEAD_FISH) && (_action._mainObjectSource == CAT_HOTSPOT))
_vm->_dialogs->show(10702);
else if (_action.isAction(VERB_LOOK, NOUN_BUSH_LIKE_FORMATION))
_vm->_dialogs->show(10703);
@@ -2919,7 +2919,7 @@ void Scene110::actions() {
switch (_game._trigger) {
case 0:
_scene->loadAnimation(Resources::formatName(110, 'T', 0, EXT_AA, ""), 1);
- _scene->_activeAnimation->setNextFrameTimer(_game._player._ticksAmount + _game._player._priorTimer);
+ _scene->_animation[0]->setNextFrameTimer(_game._player._ticksAmount + _game._player._priorTimer);
_game._player._stepEnabled = false;
_game._player._visible = false;
break;
@@ -3066,7 +3066,7 @@ void Scene111::step() {
if (_game._trigger == 73)
_vm->_sound->command(37);
- if (_rexDivingFl && (_scene->_activeAnimation->getCurrentFrame() >= 9)) {
+ if (_rexDivingFl && (_scene->_animation[0]->getCurrentFrame() >= 9)) {
_vm->_sound->command(36);
_rexDivingFl = false;
}
@@ -3138,8 +3138,8 @@ void Scene112::enter() {
}
void Scene112::step() {
- if ((_scene->_activeAnimation != nullptr) && (_game._storyMode == STORYMODE_NICE)) {
- if (_scene->_activeAnimation->getCurrentFrame() >= 54) {
+ if ((_scene->_animation[0] != nullptr) && (_game._storyMode == STORYMODE_NICE)) {
+ if (_scene->_animation[0]->getCurrentFrame() >= 54) {
_scene->freeAnimation();
_game._trigger = 70;
}
diff --git a/engines/mads/nebular/nebular_scenes2.cpp b/engines/mads/nebular/nebular_scenes2.cpp
index 1cbd6f56ef..7349677ab8 100644
--- a/engines/mads/nebular/nebular_scenes2.cpp
+++ b/engines/mads/nebular/nebular_scenes2.cpp
@@ -484,7 +484,7 @@ void Scene202::enter() {
}
_scene->loadAnimation(formAnimName('M', -1), 71);
- _scene->_activeAnimation->setCurrentFrame(200);
+ _scene->_animation[0]->setCurrentFrame(200);
} else {
if (_ladderTopFl) {
_game._player._visible = false;
@@ -596,7 +596,7 @@ void Scene202::step() {
break;
}
- if (!_scene->_activeAnimation && (_globals[kMeteorologistStatus] != METEOROLOGIST_GONE) && (_meteoClock2 <= _scene->_frameStartTime) && (_meteoClock1 <= _scene->_frameStartTime)) {
+ if (!_scene->_animation[0] && (_globals[kMeteorologistStatus] != METEOROLOGIST_GONE) && (_meteoClock2 <= _scene->_frameStartTime) && (_meteoClock1 <= _scene->_frameStartTime)) {
int randVal = _vm->getRandomNumber(1, 500);
int threshold = 1;
if (_ladderTopFl)
@@ -615,11 +615,11 @@ void Scene202::step() {
}
}
- if (!_scene->_activeAnimation)
+ if (!_scene->_animation[0])
return;
if (_waitingMeteoFl) {
- if (_scene->_activeAnimation->getCurrentFrame() >= 200) {
+ if (_scene->_animation[0]->getCurrentFrame() >= 200) {
if ((_globals[kMeteorologistWatch] == METEOROLOGIST_TOWER) || _globals[kLadderBroken]) {
_scene->_nextSceneId = 213;
} else {
@@ -628,7 +628,7 @@ void Scene202::step() {
}
}
- if ((_scene->_activeAnimation->getCurrentFrame() == 160) && (_meteoFrame != _scene->_activeAnimation->getCurrentFrame())) {
+ if ((_scene->_animation[0]->getCurrentFrame() == 160) && (_meteoFrame != _scene->_animation[0]->getCurrentFrame())) {
Common::Point msgPos;
int msgFlag;
if (!_ladderTopFl) {
@@ -647,15 +647,15 @@ void Scene202::step() {
_toTeleportFl = true;
}
- if (_scene->_activeAnimation->getCurrentFrame() == _meteoFrame) {
+ if (_scene->_animation[0]->getCurrentFrame() == _meteoFrame) {
return;
}
- _meteoFrame = _scene->_activeAnimation->getCurrentFrame();
+ _meteoFrame = _scene->_animation[0]->getCurrentFrame();
int randVal = _vm->getRandomNumber(1, 1000);
int frameStep = -1;
- switch (_scene->_activeAnimation->getCurrentFrame()) {
+ switch (_scene->_animation[0]->getCurrentFrame()) {
case 42:
case 77:
case 96:
@@ -693,8 +693,8 @@ void Scene202::step() {
break;
}
- if (frameStep >= 0 && frameStep != _scene->_activeAnimation->getCurrentFrame() + 1) {
- _scene->_activeAnimation->setCurrentFrame(frameStep);
+ if (frameStep >= 0 && frameStep != _scene->_animation[0]->getCurrentFrame() + 1) {
+ _scene->_animation[0]->setCurrentFrame(frameStep);
_meteoFrame = frameStep;
}
}
@@ -797,7 +797,7 @@ void Scene202::actions() {
_scene->_nextSceneId = 203;
} else if (_action.isAction(VERB_WALK_TOWARDS, NOUN_FIELD_TO_NORTH)) {
if (_globals[kMeteorologistStatus] != METEOROLOGIST_GONE) {
- if (_scene->_activeAnimation)
+ if (_scene->_animation[0])
_globals[kMeteorologistStatus] = METEOROLOGIST_PRESENT;
else
_globals[kMeteorologistStatus] = METEOROLOGIST_ABSENT;
@@ -890,7 +890,7 @@ void Scene202::actions() {
_globals._sequenceIndexes[10] = _scene->_sequences.startCycle(_globals._spriteIndexes[9], false, 6);
_scene->_sequences.setDepth(_globals._sequenceIndexes[10], 1);
_scene->_sequences.setPosition(_globals._sequenceIndexes[10], Common::Point(172, 123));
- if (_scene->_activeAnimation) {
+ if (_scene->_animation[0]) {
_waitingMeteoFl = true;
_globals[kMeteorologistWatch] = METEOROLOGIST_GROUND;
} else {
@@ -898,7 +898,7 @@ void Scene202::actions() {
}
break;
case 2:
- if (!_scene->_activeAnimation && !_meteorologistSpecial) {
+ if (!_scene->_animation[0] && !_meteorologistSpecial) {
_vm->_dialogs->show(20222);
}
_scene->_sequences.remove(_globals._sequenceIndexes[10]);
@@ -932,13 +932,13 @@ void Scene202::actions() {
_globals._sequenceIndexes[10] = _scene->_sequences.startCycle(_globals._spriteIndexes[9], true, -2);
_scene->_sequences.setPosition(_globals._sequenceIndexes[10], Common::Point(247, 82));
_scene->_sequences.setDepth(_globals._sequenceIndexes[10], 1);
- if (_scene->_activeAnimation) {
- if (_scene->_activeAnimation->getCurrentFrame() > 200) {
+ if (_scene->_animation[0]) {
+ if (_scene->_animation[0]->getCurrentFrame() > 200) {
_scene->_sequences.addTimer(120, 2);
} else {
_waitingMeteoFl = true;
_globals[kMeteorologistWatch] = METEOROLOGIST_GONE;
- if ((_scene->_activeAnimation->getCurrentFrame() >= 44) && (_scene->_activeAnimation->getCurrentFrame() <= 75)) {
+ if ((_scene->_animation[0]->getCurrentFrame() >= 44) && (_scene->_animation[0]->getCurrentFrame() <= 75)) {
_scene->_kernelMessages.reset();
int msgIndex = _scene->_kernelMessages.add(Common::Point(248, 15), 0x1110, 32, 0, 60, _game.getQuote(100));
_scene->_kernelMessages.setQuoted(msgIndex, 4, false);
@@ -952,7 +952,7 @@ void Scene202::actions() {
}
break;
case 2:
- if (!_scene->_activeAnimation)
+ if (!_scene->_animation[0])
_vm->_dialogs->show(20222);
_meteorologistSpecial = false;
_scene->_sequences.remove(_globals._sequenceIndexes[10]);
@@ -1227,7 +1227,7 @@ void Scene205::enter() {
if (_globals[kSexOfRex] != SEX_MALE) {
_scene->loadAnimation(formAnimName('a', -1));
- _scene->_activeAnimation->_resetFlag = true;
+ _scene->_animation[0]->_resetFlag = true;
} else {
_beingKicked = true;
_globals._sequenceIndexes[8] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[8], false, 8, 1, 0, 0);
@@ -1379,8 +1379,8 @@ void Scene205::actions() {
_scene->_sequences.updateTimeout(_globals._sequenceIndexes[9], -1);
_vm->_sound->command(27);
} else if (_game._trigger == 1) {
- if (_scene->_activeAnimation != nullptr)
- _scene->_activeAnimation->resetSpriteSetsCount();
+ if (_scene->_animation[0] != nullptr)
+ _scene->_animation[0]->resetSpriteSetsCount();
_vm->_dialogs->show(20516);
_scene->_reloadSceneFlag = true;
@@ -1405,9 +1405,9 @@ void Scene205::actions() {
_vm->_dialogs->show(20503);
else if (_action.isAction(VERB_LOOK, NOUN_HUT))
_vm->_dialogs->show(20504);
- else if (_action.isAction(VERB_LOOK, NOUN_CHICKEN) && (_action._mainObjectSource == 4))
+ else if (_action.isAction(VERB_LOOK, NOUN_CHICKEN) && (_action._mainObjectSource == CAT_HOTSPOT))
_vm->_dialogs->show(20505);
- else if (_action.isAction(VERB_TAKE, NOUN_CHICKEN) && (_action._mainObjectSource == 4))
+ else if (_action.isAction(VERB_TAKE, NOUN_CHICKEN) && (_action._mainObjectSource == CAT_HOTSPOT))
_vm->_dialogs->show(20506);
else if (_action.isAction(VERB_LOOK, NOUN_CHICKEN_ON_SPIT))
_vm->_dialogs->show(20507);
@@ -1746,9 +1746,9 @@ void Scene208::enter() {
}
void Scene208::step() {
- if (_boundingFl && _scene->_activeAnimation &&
- (_rhotundaTime <= _scene->_activeAnimation->getCurrentFrame())) {
- _rhotundaTime = _scene->_activeAnimation->getCurrentFrame();
+ if (_boundingFl && _scene->_animation[0] &&
+ (_rhotundaTime <= _scene->_animation[0]->getCurrentFrame())) {
+ _rhotundaTime = _scene->_animation[0]->getCurrentFrame();
if (_rhotundaTime == 125)
_scene->_sequences.remove(_globals._sequenceIndexes[4]);
@@ -4064,7 +4064,7 @@ void Scene210::setDialogNode(int node) {
_vm->_palette->lock();
_scene->_kernelMessages.reset();
_scene->freeAnimation();
- _scene->_activeAnimation = nullptr;
+ _scene->_animation[0] = nullptr;
_scene->resetScene();
_globals._spriteIndexes[1] = _scene->_sprites.addSprites(formAnimName('c', -1));
@@ -4263,8 +4263,8 @@ void Scene210::enter() {
}
restoreDialogNode(_curDialogNode, quote, number);
- if (_scene->_activeAnimation)
- _scene->_activeAnimation->setCurrentFrame(131);
+ if (_scene->_animation[0])
+ _scene->_animation[0]->setCurrentFrame(131);
}
_vm->_palette->setEntry(252, 63, 63, 10);
@@ -4274,9 +4274,9 @@ void Scene210::enter() {
}
void Scene210::step() {
- if ((_twinkleAnimationType == 1) && _scene->_activeAnimation) {
- if (_twinklesCurrentFrame != _scene->_activeAnimation->getCurrentFrame()) {
- _twinklesCurrentFrame = _scene->_activeAnimation->getCurrentFrame();
+ if ((_twinkleAnimationType == 1) && _scene->_animation[0]) {
+ if (_twinklesCurrentFrame != _scene->_animation[0]->getCurrentFrame()) {
+ _twinklesCurrentFrame = _scene->_animation[0]->getCurrentFrame();
int reset_frame = -1;
int random = _vm->getRandomNumber(1, 1000);
@@ -4396,8 +4396,8 @@ void Scene210::step() {
}
if (reset_frame >= 0) {
- if (reset_frame != _scene->_activeAnimation->getCurrentFrame()) {
- _scene->_activeAnimation->setCurrentFrame(reset_frame);
+ if (reset_frame != _scene->_animation[0]->getCurrentFrame()) {
+ _scene->_animation[0]->setCurrentFrame(reset_frame);
_twinklesCurrentFrame = reset_frame;
}
@@ -4411,9 +4411,9 @@ void Scene210::step() {
}
}
- if ((_twinkleAnimationType == 2) && _scene->_activeAnimation) {
- if (_twinklesCurrentFrame != _scene->_activeAnimation->getCurrentFrame()) {
- _twinklesCurrentFrame = _scene->_activeAnimation->getCurrentFrame();
+ if ((_twinkleAnimationType == 2) && _scene->_animation[0]) {
+ if (_twinklesCurrentFrame != _scene->_animation[0]->getCurrentFrame()) {
+ _twinklesCurrentFrame = _scene->_animation[0]->getCurrentFrame();
int reset_frame = -1;
if (_twinklesCurrentFrame == 53) {
@@ -4422,8 +4422,8 @@ void Scene210::step() {
} else if ((_twinklesCurrentFrame == 75) && _shouldTalk)
reset_frame = 60;
- if ((reset_frame >= 0) && (reset_frame != _scene->_activeAnimation->getCurrentFrame())) {
- _scene->_activeAnimation->setCurrentFrame(reset_frame);
+ if ((reset_frame >= 0) && (reset_frame != _scene->_animation[0]->getCurrentFrame())) {
+ _scene->_animation[0]->setCurrentFrame(reset_frame);
_twinklesCurrentFrame = reset_frame;
}
}
@@ -4646,7 +4646,7 @@ void Scene211::enter() {
_game._player._stepEnabled = false;
_game._player._visible = false;
_scene->loadAnimation(formAnimName('A', -1), 100);
- _scene->_activeAnimation->setCurrentFrame(169);
+ _scene->_animation[0]->setCurrentFrame(169);
} else if (_scene->_priorSceneId != RETURNING_FROM_DIALOG) {
_game._player._playerPos = Common::Point(310, 31);
_game._player._facing = FACING_SOUTHWEST;
@@ -4725,8 +4725,8 @@ void Scene211::step() {
}
}
- if (_ambushFl && (_scene->_activeAnimation->getCurrentFrame() > _monkeyFrame)) {
- _monkeyFrame = _scene->_activeAnimation->getCurrentFrame();
+ if (_ambushFl && (_scene->_animation[0]->getCurrentFrame() > _monkeyFrame)) {
+ _monkeyFrame = _scene->_animation[0]->getCurrentFrame();
switch (_monkeyFrame) {
case 2: {
int msgIndex = _scene->_kernelMessages.add(Common::Point(12, 4), 0xFDFC, 0, 0, 60, _game.getQuote(157));
@@ -4798,9 +4798,9 @@ void Scene211::step() {
_wakeFl = false;
}
- if (_scene->_activeAnimation->getCurrentFrame() > _monkeyFrame) {
- _monkeyFrame = _scene->_activeAnimation->getCurrentFrame();
- switch (_scene->_activeAnimation->getCurrentFrame()) {
+ if (_scene->_animation[0]->getCurrentFrame() > _monkeyFrame) {
+ _monkeyFrame = _scene->_animation[0]->getCurrentFrame();
+ switch (_scene->_animation[0]->getCurrentFrame()) {
case 177: {
int msgIndex = _scene->_kernelMessages.add(Common::Point(63, _scrollY), 0x1110, 0, 0, 180, _game.getQuote(165));
_scene->_kernelMessages.setQuoted(msgIndex, 4, true);
diff --git a/engines/mads/nebular/nebular_scenes3.cpp b/engines/mads/nebular/nebular_scenes3.cpp
index 5a6edbf995..f9513b9bd3 100644
--- a/engines/mads/nebular/nebular_scenes3.cpp
+++ b/engines/mads/nebular/nebular_scenes3.cpp
@@ -293,8 +293,8 @@ void Scene302::step() {
if (_game._trigger == 71)
_scene->_nextSceneId = 303;
- if ((_scene->_activeAnimation != nullptr) && (_scene->_activeAnimation->getCurrentFrame() != _oldFrame)) {
- _oldFrame = _scene->_activeAnimation->getCurrentFrame();
+ if ((_scene->_animation[0] != nullptr) && (_scene->_animation[0]->getCurrentFrame() != _oldFrame)) {
+ _oldFrame = _scene->_animation[0]->getCurrentFrame();
if (_oldFrame == 147) {
_game._objects.setRoom(OBJ_POISON_DARTS, 1);
_game._objects.setRoom(OBJ_BLOWGUN, 1);
@@ -828,23 +828,23 @@ void Scene307::enter() {
void Scene307::step() {
handleForceField(&_forceField, &_globals._spriteIndexes[0]);
- if ((_animationMode == 1) && (_scene->_activeAnimation != nullptr)) {
- if (_scene->_activeAnimation->getCurrentFrame() == 126) {
+ if ((_animationMode == 1) && (_scene->_animation[0] != nullptr)) {
+ if (_scene->_animation[0]->getCurrentFrame() == 126) {
_forceField._flag = false;
_vm->_sound->command(5);
}
- if (_scene->_activeAnimation->getCurrentFrame() == 194) {
+ if (_scene->_animation[0]->getCurrentFrame() == 194) {
_forceField._flag = true;
_vm->_sound->command(24);
}
}
- if ((_animationMode == 2) && (_scene->_activeAnimation != nullptr)) {
- if (_scene->_activeAnimation->getCurrentFrame() == 54)
+ if ((_animationMode == 2) && (_scene->_animation[0] != nullptr)) {
+ if (_scene->_animation[0]->getCurrentFrame() == 54)
_forceField._flag = false;
- if (_scene->_activeAnimation->getCurrentFrame() == 150) {
+ if (_scene->_animation[0]->getCurrentFrame() == 150) {
_game._player._visible = false;
_game._player._priorTimer = _scene->_frameStartTime - _game._player._ticksAmount;
}
@@ -869,7 +869,7 @@ void Scene307::step() {
}
_lastFrameTime = _scene->_frameStartTime;
- if ((_guardTime > 3000) && !_duringPeeingFl && (_scene->_activeAnimation == nullptr)
+ if ((_guardTime > 3000) && !_duringPeeingFl && (_scene->_animation[0] == nullptr)
&& (_game._screenObjects._inputMode != kInputConversation) && _globals[kMetBuddyBeast] && !_activePrisonerFl) {
if (!_game._objects.isInInventory(OBJ_SCALPEL) && !_grateOpenedFl) {
_game._player._stepEnabled = false;
@@ -879,7 +879,7 @@ void Scene307::step() {
_scene->loadAnimation(formAnimName('b', -1), 70);
}
_guardTime = 0;
- } else if ((_prisonerTimer > 300) && (_game._screenObjects._inputMode != kInputConversation) && (_scene->_activeAnimation == nullptr) && !_activePrisonerFl) {
+ } else if ((_prisonerTimer > 300) && (_game._screenObjects._inputMode != kInputConversation) && (_scene->_animation[0] == nullptr) && !_activePrisonerFl) {
if (!_globals[kMetBuddyBeast]) {
int idx = _scene->_kernelMessages.add(Common::Point(5, 51), 0xFDFC, 0, 81, 120, _game.getQuote(_prisonerMessageId));
_scene->_kernelMessages.setQuoted(idx, 4, true);
@@ -1380,9 +1380,9 @@ void Scene309::enter() {
_game._player._stepEnabled = false;
_scene->loadAnimation(formAnimName('a', -1), 60);
- _characterSpriteIndexes[0] = _scene->_activeAnimation->_spriteListIndexes[2];
- _characterSpriteIndexes[1] = _scene->_activeAnimation->_spriteListIndexes[2];
- _characterSpriteIndexes[2] = _scene->_activeAnimation->_spriteListIndexes[1];
+ _characterSpriteIndexes[0] = _scene->_animation[0]->_spriteListIndexes[2];
+ _characterSpriteIndexes[1] = _scene->_animation[0]->_spriteListIndexes[2];
+ _characterSpriteIndexes[2] = _scene->_animation[0]->_spriteListIndexes[1];
_messagesIndexes[0] = -1;
_messagesIndexes[1] = -1;
@@ -1404,9 +1404,9 @@ void Scene309::step() {
if (_game._trigger == 62)
_messagesIndexes[2] = -1;
- if (_scene->_activeAnimation != nullptr) {
- if (_lastFrame != _scene->_activeAnimation->getCurrentFrame()) {
- _lastFrame = _scene->_activeAnimation->getCurrentFrame();
+ if (_scene->_animation[0] != nullptr) {
+ if (_lastFrame != _scene->_animation[0]->getCurrentFrame()) {
+ _lastFrame = _scene->_animation[0]->getCurrentFrame();
if (_lastFrame == 39) {
_messagesIndexes[0] = _scene->_kernelMessages.add(Common::Point(0, 0), 0x1110, 32, 61, 210, _game.getQuote(348));
_messagesIndexes[1] = _scene->_kernelMessages.add(Common::Point(0, 0), 0x1110, 32, 0, 210, _game.getQuote(349));
@@ -1419,15 +1419,15 @@ void Scene309::step() {
if (_messagesIndexes[charIdx] >= 0) {
bool match = false;
int j = -1;
- for (j = _scene->_activeAnimation->_oldFrameEntry; j < _scene->_activeAnimation->_header._frameEntriesCount; j++) {
- if (_scene->_activeAnimation->_frameEntries[j]._spriteSlot._spritesIndex == _characterSpriteIndexes[charIdx]) {
+ for (j = _scene->_animation[0]->_oldFrameEntry; j < _scene->_animation[0]->_header._frameEntriesCount; j++) {
+ if (_scene->_animation[0]->_frameEntries[j]._spriteSlot._spritesIndex == _characterSpriteIndexes[charIdx]) {
match = true;
break;
}
}
if (match) {
- SpriteSlotSubset *curSpriteSlot = &_scene->_activeAnimation->_frameEntries[j]._spriteSlot;
+ SpriteSlotSubset *curSpriteSlot = &_scene->_animation[0]->_frameEntries[j]._spriteSlot;
_scene->_kernelMessages._entries[_messagesIndexes[charIdx]]._position.x = curSpriteSlot->_position.x;
_scene->_kernelMessages._entries[_messagesIndexes[charIdx]]._position.y = curSpriteSlot->_position.y - (50 + (14 * ((charIdx == 0) ? 2 : 1)));
}
@@ -2602,7 +2602,7 @@ void Scene318::enter() {
if (_globals[kAfterHavoc]) {
_scene->loadAnimation(formAnimName('f', -1));
- _scene->_activeAnimation->_resetFlag = true;
+ _scene->_animation[0]->_resetFlag = true;
} else if (!_globals[kHasSeenProfPyro]) {
_scene->_hotspots.activate(NOUN_PROFESSORS_GURNEY, false);
_scene->_hotspots.activate(NOUN_PROFESSOR, false);
@@ -2655,7 +2655,7 @@ void Scene318::enter() {
0x1C8, 0x1C9, 0x1CA, 0x1CB, 0x1CC, 0x1CD, 0x1CE, 0x1CF, 0x1D0, 0x1D1, 0x1D2, 0x1D3,
0x190, 0x19D, 0);
- if ((_scene->_priorSceneId == RETURNING_FROM_DIALOG) || (((_scene->_priorSceneId == 318) ||
+ if ((_scene->_priorSceneId == RETURNING_FROM_DIALOG) || (((_scene->_priorSceneId == 318) ||
(_scene->_priorSceneId == RETURNING_FROM_LOADING)) && (!_globals[kAfterHavoc]))) {
if (!_globals[kAfterHavoc]) {
_game._player._visible = false;
@@ -2705,9 +2705,9 @@ void Scene318::enter() {
}
void Scene318::step() {
- if ((_scene->_activeAnimation != nullptr) && (_animMode == 2)) {
- if (_lastFrame != _scene->_activeAnimation->getCurrentFrame()) {
- _lastFrame = _scene->_activeAnimation->getCurrentFrame();
+ if ((_scene->_animation[0] != nullptr) && (_animMode == 2)) {
+ if (_lastFrame != _scene->_animation[0]->getCurrentFrame()) {
+ _lastFrame = _scene->_animation[0]->getCurrentFrame();
int nextFrame = -1;
switch (_lastFrame) {
@@ -2759,8 +2759,8 @@ void Scene318::step() {
break;
}
- if ((nextFrame >= 0) && (nextFrame != _scene->_activeAnimation->getCurrentFrame())) {
- _scene->_activeAnimation->setCurrentFrame(nextFrame);
+ if ((nextFrame >= 0) && (nextFrame != _scene->_animation[0]->getCurrentFrame())) {
+ _scene->_animation[0]->setCurrentFrame(nextFrame);
_lastFrame = nextFrame;
}
}
@@ -3185,11 +3185,11 @@ void Scene319::enter() {
}
void Scene319::step() {
- if (_scene->_activeAnimation == nullptr)
+ if (_scene->_animation[0] == nullptr)
return;
- if (_animFrame != _scene->_activeAnimation->getCurrentFrame()) {
- _animFrame = _scene->_activeAnimation->getCurrentFrame();
+ if (_animFrame != _scene->_animation[0]->getCurrentFrame()) {
+ _animFrame = _scene->_animation[0]->getCurrentFrame();
int nextFrame = -1;
if (_animMode == 1) {
switch (_animFrame) {
@@ -3305,8 +3305,8 @@ void Scene319::step() {
if ((_animMode == 4) && (_animFrame == 16))
_vm->_screen._shakeCountdown = 80;
- if ((nextFrame >= 0) && (nextFrame != _scene->_activeAnimation->getCurrentFrame())) {
- _scene->_activeAnimation->setCurrentFrame(nextFrame);
+ if ((nextFrame >= 0) && (nextFrame != _scene->_animation[0]->getCurrentFrame())) {
+ _scene->_animation[0]->setCurrentFrame(nextFrame);
_animFrame = nextFrame;
}
}
@@ -3320,11 +3320,11 @@ void Scene319::step() {
_scene->freeAnimation();
_scene->loadAnimation(formAnimName('b', 0));
if (_nextAction1 == 3)
- _scene->_activeAnimation->setCurrentFrame(85);
+ _scene->_animation[0]->setCurrentFrame(85);
else if (_nextAction1 == 1)
- _scene->_activeAnimation->setCurrentFrame(40);
+ _scene->_animation[0]->setCurrentFrame(40);
- _animFrame = _scene->_activeAnimation->getCurrentFrame();
+ _animFrame = _scene->_animation[0]->getCurrentFrame();
_slacheTalkingFl = true;
_vm->_screen._shakeCountdown = 1;
@@ -3710,9 +3710,9 @@ void Scene320::enter() {
}
void Scene320::step() {
- if (_scene->_activeAnimation != nullptr) {
- if (_lastFrame != _scene->_activeAnimation->getCurrentFrame()) {
- _lastFrame = _scene->_activeAnimation->getCurrentFrame();
+ if (_scene->_animation[0] != nullptr) {
+ if (_lastFrame != _scene->_animation[0]->getCurrentFrame()) {
+ _lastFrame = _scene->_animation[0]->getCurrentFrame();
switch (_lastFrame) {
case 95:
_blinkFl = true;
@@ -3892,8 +3892,8 @@ void Scene321::enter() {
}
void Scene321::step() {
- if (_scene->_activeAnimation != nullptr) {
- if ((_scene->_activeAnimation->getCurrentFrame() >= 260) && (_globals[kSexOfRex] == REX_MALE) && (_game._storyMode >= STORYMODE_NICE))
+ if (_scene->_animation[0] != nullptr) {
+ if ((_scene->_animation[0]->getCurrentFrame() >= 260) && (_globals[kSexOfRex] == REX_MALE) && (_game._storyMode >= STORYMODE_NICE))
_scene->_nextSceneId = 316;
}
@@ -5045,7 +5045,7 @@ void Scene359::actions() {
_vm->_dialogs->show(35918);
else if (_action.isAction(VERB_TAKE, NOUN_LIMB))
_vm->_dialogs->show(35919);
- else if (_action.isAction(VERB_LOOK, NOUN_SECURITY_CARD) && (_action._mainObjectSource == 4))
+ else if (_action.isAction(VERB_LOOK, NOUN_SECURITY_CARD) && (_action._mainObjectSource == CAT_HOTSPOT))
_vm->_dialogs->show(35921);
else if (_action.isAction(VERB_LOOK, NOUN_BLOOD_STAIN)) {
if ((_game._difficulty != DIFFICULTY_HARD) && (_game._objects[OBJ_SECURITY_CARD]._roomNumber == 359))
diff --git a/engines/mads/nebular/nebular_scenes4.cpp b/engines/mads/nebular/nebular_scenes4.cpp
index c981f6a6e4..19e1fc792e 100644
--- a/engines/mads/nebular/nebular_scenes4.cpp
+++ b/engines/mads/nebular/nebular_scenes4.cpp
@@ -876,7 +876,7 @@ void Scene402::enter() {
_refuseAlienLiquor = false;
_scene->loadAnimation(Resources::formatName(402, 'd', 1, EXT_AA, ""));
- _scene->_activeAnimation->_resetFlag = true;
+ _scene->_animation[0]->_resetFlag = true;
_globals._sequenceIndexes[5] = _scene->_sequences.startCycle(_globals._spriteIndexes[5], false, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[5], 1);
@@ -1536,43 +1536,43 @@ void Scene402::step() {
if (_game._trigger == 32)
_rightWomanMoving = false;
- if (_scene->_activeAnimation->getCurrentFrame() == 1) {
+ if (_scene->_animation[0]->getCurrentFrame() == 1) {
switch (_vm->getRandomNumber(1, 50)) {
case 1:
- _scene->_activeAnimation->setCurrentFrame(2);
+ _scene->_animation[0]->setCurrentFrame(2);
break;
case 2:
- _scene->_activeAnimation->setCurrentFrame(7);
+ _scene->_animation[0]->setCurrentFrame(7);
break;
case 3:
- _scene->_activeAnimation->setCurrentFrame(11);
+ _scene->_animation[0]->setCurrentFrame(11);
break;
default:
- _scene->_activeAnimation->setCurrentFrame(0);
+ _scene->_animation[0]->setCurrentFrame(0);
break;
}
}
- if ((_scene->_activeAnimation->getCurrentFrame() == 4) && (_drinkTimer < 10)) {
+ if ((_scene->_animation[0]->getCurrentFrame() == 4) && (_drinkTimer < 10)) {
++ _drinkTimer;
- _scene->_activeAnimation->setCurrentFrame(3);
+ _scene->_animation[0]->setCurrentFrame(3);
}
if (_drinkTimer == 10) {
_drinkTimer = 0;
- _scene->_activeAnimation->setCurrentFrame(4);
- _scene->_activeAnimation->_currentFrame = 5;
+ _scene->_animation[0]->setCurrentFrame(4);
+ _scene->_animation[0]->_currentFrame = 5;
}
- switch (_scene->_activeAnimation->getCurrentFrame()) {
+ switch (_scene->_animation[0]->getCurrentFrame()) {
case 6:
case 10:
case 14:
- _scene->_activeAnimation->setCurrentFrame(0);
+ _scene->_animation[0]->setCurrentFrame(0);
break;
default:
@@ -3126,36 +3126,36 @@ void Scene410::enter() {
sceneEntrySound();
_scene->loadAnimation(Resources::formatName(410, 'r', -1, EXT_AA, ""));
- _scene->_activeAnimation->_resetFlag = true;
+ _scene->_animation[0]->_resetFlag = true;
}
void Scene410::step() {
- if (_scene->_activeAnimation->getCurrentFrame() == 1) {
+ if (_scene->_animation[0]->getCurrentFrame() == 1) {
if (_vm->getRandomNumber(1, 30) == 1)
- _scene->_activeAnimation->setCurrentFrame(2);
+ _scene->_animation[0]->setCurrentFrame(2);
else
- _scene->_activeAnimation->setCurrentFrame(0);
+ _scene->_animation[0]->setCurrentFrame(0);
}
- if (_scene->_activeAnimation->getCurrentFrame() == 9) {
+ if (_scene->_animation[0]->getCurrentFrame() == 9) {
if (_vm->getRandomNumber(1, 30) == 1)
- _scene->_activeAnimation->setCurrentFrame(10);
+ _scene->_animation[0]->setCurrentFrame(10);
else
- _scene->_activeAnimation->setCurrentFrame(8);
+ _scene->_animation[0]->setCurrentFrame(8);
}
- if (_scene->_activeAnimation->getCurrentFrame() == 5) {
+ if (_scene->_animation[0]->getCurrentFrame() == 5) {
if (_vm->getRandomNumber(1, 30) == 1)
- _scene->_activeAnimation->setCurrentFrame(6);
+ _scene->_animation[0]->setCurrentFrame(6);
else
- _scene->_activeAnimation->setCurrentFrame(4);
+ _scene->_animation[0]->setCurrentFrame(4);
}
- if (_scene->_activeAnimation->getCurrentFrame() == 3) {
+ if (_scene->_animation[0]->getCurrentFrame() == 3) {
if (_vm->getRandomNumber(1, 2) == 1)
- _scene->_activeAnimation->setCurrentFrame(4);
+ _scene->_animation[0]->setCurrentFrame(4);
else // == 2
- _scene->_activeAnimation->setCurrentFrame(8);
+ _scene->_animation[0]->setCurrentFrame(8);
}
}
@@ -3491,7 +3491,7 @@ void Scene411::handleDialog() {
_game._player._priorTimer = _scene->_frameStartTime + _game._player._ticksAmount;
_game._player._visible = false;
_game._player._stepEnabled = false;
- _scene->_activeAnimation->setCurrentFrame(_resetFrame);
+ _scene->_animation[0]->setCurrentFrame(_resetFrame);
}
_scene->_kernelMessages.reset();
_newQuantity = computeQuoteAndQuantity();
@@ -3661,16 +3661,16 @@ void Scene411::enter() {
}
_scene->loadAnimation(formAnimName('a', -1));
- _scene->_activeAnimation->setCurrentFrame(128);
+ _scene->_animation[0]->setCurrentFrame(128);
_makeMushroomCloud = false;
_killRox = false;
}
void Scene411::step() {
- if (_scene->_activeAnimation != nullptr) {
- if (_curAnimationFrame != _scene->_activeAnimation->getCurrentFrame()) {
- _curAnimationFrame = _scene->_activeAnimation->getCurrentFrame();
+ if (_scene->_animation[0] != nullptr) {
+ if (_curAnimationFrame != _scene->_animation[0]->getCurrentFrame()) {
+ _curAnimationFrame = _scene->_animation[0]->getCurrentFrame();
_resetFrame = -1;
switch (_curAnimationFrame) {
@@ -3738,14 +3738,14 @@ void Scene411::step() {
break;
}
- if ((_resetFrame >= 0) && (_resetFrame != _scene->_activeAnimation->getCurrentFrame())) {
- _scene->_activeAnimation->setCurrentFrame(_resetFrame);
+ if ((_resetFrame >= 0) && (_resetFrame != _scene->_animation[0]->getCurrentFrame())) {
+ _scene->_animation[0]->setCurrentFrame(_resetFrame);
_curAnimationFrame = _resetFrame;
}
}
}
- if (_scene->_activeAnimation->getCurrentFrame() == 86)
+ if (_scene->_animation[0]->getCurrentFrame() == 86)
_vm->_sound->command(59);
}
@@ -4113,10 +4113,10 @@ void Scene413::enter() {
}
void Scene413::step() {
- if (_scene->_activeAnimation && _scene->_activeAnimation->getCurrentFrame() == 38)
- _scene->_activeAnimation->setCurrentFrame(37);
+ if (_scene->_animation[0] && _scene->_animation[0]->getCurrentFrame() == 38)
+ _scene->_animation[0]->setCurrentFrame(37);
- if (_scene->_activeAnimation && _scene->_activeAnimation->getCurrentFrame() == 21 && _canMove) {
+ if (_scene->_animation[0] && _scene->_animation[0]->getCurrentFrame() == 21 && _canMove) {
_vm->_sound->command(27);
_canMove = false;
}
diff --git a/engines/mads/nebular/nebular_scenes5.cpp b/engines/mads/nebular/nebular_scenes5.cpp
index 95eb429193..3778a59eb3 100644
--- a/engines/mads/nebular/nebular_scenes5.cpp
+++ b/engines/mads/nebular/nebular_scenes5.cpp
@@ -722,9 +722,9 @@ void Scene504::enter() {
}
void Scene504::step() {
- if ((_carAnimationMode == 1) && (_scene->_activeAnimation != nullptr)) {
- if (_scene->_activeAnimation->getCurrentFrame() != _carFrame) {
- _carFrame = _scene->_activeAnimation->getCurrentFrame();
+ if ((_carAnimationMode == 1) && (_scene->_animation[0] != nullptr)) {
+ if (_scene->_animation[0]->getCurrentFrame() != _carFrame) {
+ _carFrame = _scene->_animation[0]->getCurrentFrame();
int nextFrame;
if (_carFrame == 1)
@@ -732,8 +732,8 @@ void Scene504::step() {
else
nextFrame = -1;
- if ((nextFrame >= 0) && (nextFrame != _scene->_activeAnimation->getCurrentFrame())) {
- _scene->_activeAnimation->setCurrentFrame(nextFrame);
+ if ((nextFrame >= 0) && (nextFrame != _scene->_animation[0]->getCurrentFrame())) {
+ _scene->_animation[0]->setCurrentFrame(nextFrame);
_carFrame = nextFrame;
}
}
@@ -943,15 +943,15 @@ void Scene505::enter() {
_game._player._stepEnabled = false;
_frame = -1;
_scene->loadAnimation(formAnimName('a', -1));
- _scene->_activeAnimation->setCurrentFrame(86);
+ _scene->_animation[0]->setCurrentFrame(86);
sceneEntrySound();
_vm->_sound->command(16);
}
void Scene505::step() {
- if (_frame != _scene->_activeAnimation->getCurrentFrame()) {
- _frame = _scene->_activeAnimation->getCurrentFrame();
+ if (_frame != _scene->_animation[0]->getCurrentFrame()) {
+ _frame = _scene->_animation[0]->getCurrentFrame();
int resetFrame = -1;
switch (_frame) {
@@ -1088,8 +1088,8 @@ void Scene505::step() {
break;
}
- if ((resetFrame >= 0) && (resetFrame != _scene->_activeAnimation->getCurrentFrame())) {
- _scene->_activeAnimation->setCurrentFrame(resetFrame);
+ if ((resetFrame >= 0) && (resetFrame != _scene->_animation[0]->getCurrentFrame())) {
+ _scene->_animation[0]->setCurrentFrame(resetFrame);
_frame = resetFrame;
}
}
@@ -1254,7 +1254,7 @@ void Scene506::step() {
switch (_game._trigger) {
case 70:
_game._player._visible = true;
- _game._player._priorTimer = _scene->_activeAnimation->getNextFrameTimer() - _game._player._ticksAmount;
+ _game._player._priorTimer = _scene->_animation[0]->getNextFrameTimer() - _game._player._ticksAmount;
_scene->_sequences.addTimer(6, 71);
break;
@@ -1943,9 +1943,9 @@ void Scene511::enter() {
}
void Scene511::step() {
- if ((_lineAnimationMode == 1) && _scene->_activeAnimation) {
- if (_lineFrame != _scene->_activeAnimation->getCurrentFrame()) {
- _lineFrame = _scene->_activeAnimation->getCurrentFrame();
+ if ((_lineAnimationMode == 1) && _scene->_animation[0]) {
+ if (_lineFrame != _scene->_animation[0]->getCurrentFrame()) {
+ _lineFrame = _scene->_animation[0]->getCurrentFrame();
int resetFrame = -1;
if ((_lineAnimationPosition == 2) && (_lineFrame == 14))
@@ -1961,8 +1961,8 @@ void Scene511::step() {
resetFrame = 2;
}
- if ((resetFrame >= 0) && (resetFrame != _scene->_activeAnimation->getCurrentFrame())) {
- _scene->_activeAnimation->setCurrentFrame(resetFrame);
+ if ((resetFrame >= 0) && (resetFrame != _scene->_animation[0]->getCurrentFrame())) {
+ _scene->_animation[0]->setCurrentFrame(resetFrame);
_lineFrame = resetFrame;
}
}
@@ -1971,7 +1971,7 @@ void Scene511::step() {
switch (_game._trigger) {
case 70:
_game._player._visible = true;
- _game._player._priorTimer = _scene->_activeAnimation->getNextFrameTimer() - _game._player._ticksAmount;
+ _game._player._priorTimer = _scene->_animation[0]->getNextFrameTimer() - _game._player._ticksAmount;
_scene->_sequences.addTimer(6, 71);
break;
@@ -2009,7 +2009,7 @@ void Scene511::preActions() {
_scene->loadAnimation(formAnimName('R',2), 1);
} else if (_game._trigger == 1) {
_game._player._visible = true;
- _game._player._priorTimer = _scene->_activeAnimation->getNextFrameTimer() - _game._player._ticksAmount;
+ _game._player._priorTimer = _scene->_animation[0]->getNextFrameTimer() - _game._player._ticksAmount;
_game._objects.setRoom(OBJ_FISHING_LINE, 1);
_handingLine = false;
_game._player._stepEnabled = true;
@@ -2089,7 +2089,7 @@ void Scene511::actions() {
} else {
_vm->_dialogs->show(51130);
}
- } else if (_action.isAction(VERB_TIE, NOUN_FISHING_LINE, NOUN_BOAT) ||
+ } else if (_action.isAction(VERB_TIE, NOUN_FISHING_LINE, NOUN_BOAT) ||
_action.isAction(VERB_ATTACH, NOUN_FISHING_LINE, NOUN_BOAT)) {
if (_globals[kBoatRaised])
_vm->_dialogs->show(51131);
@@ -2118,8 +2118,8 @@ void Scene511::actions() {
_globals[kLineStatus] = 3;
_game._player._stepEnabled = true;
- if (_scene->_activeAnimation)
- _scene->_activeAnimation->eraseSprites();
+ if (_scene->_animation[0])
+ _scene->_animation[0]->eraseSprites();
_game._player.update();
}
}
@@ -2159,9 +2159,9 @@ void Scene511::actions() {
_vm->_dialogs->show(51128);
} else if (_action.isAction(VERB_LOOK, NOUN_PORTHOLE))
_vm->_dialogs->show(51122);
- else if (_action.isAction(VERB_LOOK, NOUN_FISHING_LINE) && (_action._mainObjectSource == 4) && (_globals[kLineStatus] == 2))
+ else if (_action.isAction(VERB_LOOK, NOUN_FISHING_LINE) && (_action._mainObjectSource == CAT_HOTSPOT) && (_globals[kLineStatus] == 2))
_vm->_dialogs->show(51126);
- else if (_action.isAction(VERB_LOOK, NOUN_FISHING_LINE) && (_action._mainObjectSource == 4) && (_globals[kLineStatus] == 3))
+ else if (_action.isAction(VERB_LOOK, NOUN_FISHING_LINE) && (_action._mainObjectSource == CAT_HOTSPOT) && (_globals[kLineStatus] == 3))
_vm->_dialogs->show(51133);
else if (_action.isAction(VERB_LOOK, NOUN_STATUE))
_vm->_dialogs->show(51127);
@@ -2434,8 +2434,8 @@ void Scene512::actions() {
_vm->_dialogs->show(51225);
else if (_action.isAction(VERB_LOOK, NOUN_PADLOCK_KEY) && _game._objects.isInRoom(OBJ_PADLOCK_KEY))
_vm->_dialogs->show(51215);
- else if (_action.isAction(VERB_LOOK, NOUN_FISHING_ROD) && (!_scene->_activeAnimation ||
- _scene->_activeAnimation->getCurrentFrame() == 4))
+ else if (_action.isAction(VERB_LOOK, NOUN_FISHING_ROD) && (!_scene->_animation[0] ||
+ _scene->_animation[0]->getCurrentFrame() == 4))
_vm->_dialogs->show(51216);
else if (_action.isAction(VERB_LOOK, NOUN_SHIPS_WHEEL))
_vm->_dialogs->show(51218);
@@ -2570,7 +2570,7 @@ void Scene513::step() {
switch (_game._trigger) {
case 70:
_game._player._visible = true;
- _game._player._priorTimer = _scene->_activeAnimation->getNextFrameTimer() - _game._player._ticksAmount;
+ _game._player._priorTimer = _scene->_animation[0]->getNextFrameTimer() - _game._player._ticksAmount;
_scene->_sequences.addTimer(6, 71);
break;
diff --git a/engines/mads/nebular/nebular_scenes6.cpp b/engines/mads/nebular/nebular_scenes6.cpp
index d97e37ea0b..7098566f80 100644
--- a/engines/mads/nebular/nebular_scenes6.cpp
+++ b/engines/mads/nebular/nebular_scenes6.cpp
@@ -124,7 +124,7 @@ void Scene601::step() {
switch (_game._trigger) {
case 70:
_game._player._visible = true;
- _game._player._priorTimer = _scene->_activeAnimation->getNextFrameTimer() - _game._player._ticksAmount;
+ _game._player._priorTimer = _scene->_animation[0]->getNextFrameTimer() - _game._player._ticksAmount;
_scene->_sequences.addTimer(30, 71);
break;
@@ -431,7 +431,7 @@ void Scene602::actions() {
case 1: {
_game._player._visible = true;
- _game._player._priorTimer = _scene->_activeAnimation->getNextFrameTimer() - _game._player._ticksAmount;
+ _game._player._priorTimer = _scene->_animation[0]->getNextFrameTimer() - _game._player._ticksAmount;
_lastSpriteIdx = _globals._spriteIndexes[3];
_lastSequenceIdx = _scene->_sequences.startCycle(_lastSpriteIdx, false, -1);
_scene->_sequences.setDepth(_lastSequenceIdx, 14);
@@ -684,7 +684,7 @@ void Scene603::actions() {
_vm->_dialogs->show(60327);
else
_vm->_dialogs->show(60328);
- } else if (_action.isAction(VERB_LOOK, NOUN_COMPACT_CASE) && (_action._mainObjectSource == 4))
+ } else if (_action.isAction(VERB_LOOK, NOUN_COMPACT_CASE) && (_action._mainObjectSource == CAT_HOTSPOT))
_vm->_dialogs->show(60329);
// For the next two checks, the second part of the check wasn't surrounded par parenthesis, which was obviously wrong
else if (_action.isAction(VERB_LOOK) && (_action.isObject(NOUN_BRA) || _action.isObject(NOUN_BOA) || _action.isObject(NOUN_SLIP)))
@@ -775,7 +775,7 @@ void Scene604::step() {
switch (_game._trigger) {
case 70:
_game._player._visible = true;
- _game._player._priorTimer = _scene->_activeAnimation->getNextFrameTimer() - _game._player._ticksAmount;
+ _game._player._priorTimer = _scene->_animation[0]->getNextFrameTimer() - _game._player._ticksAmount;
_scene->_sequences.addTimer(30, 71);
break;
@@ -797,9 +797,9 @@ void Scene604::step() {
break;
}
- if (_monsterActive && (_scene->_activeAnimation != nullptr)) {
- if (_scene->_activeAnimation->getCurrentFrame() != _monsterFrame) {
- _monsterFrame = _scene->_activeAnimation->getCurrentFrame();
+ if (_monsterActive && (_scene->_animation[0] != nullptr)) {
+ if (_scene->_animation[0]->getCurrentFrame() != _monsterFrame) {
+ _monsterFrame = _scene->_animation[0]->getCurrentFrame();
int nextMonsterFrame = -1;
switch (_monsterFrame) {
@@ -837,7 +837,7 @@ void Scene604::step() {
}
if ((nextMonsterFrame >= 0) && (nextMonsterFrame != _monsterFrame)) {
- _scene->_activeAnimation->setCurrentFrame(nextMonsterFrame);
+ _scene->_animation[0]->setCurrentFrame(nextMonsterFrame);
_monsterFrame = nextMonsterFrame;
}
}
@@ -1297,7 +1297,7 @@ void Scene607::step() {
switch (_game._trigger) {
case 80:
_game._player._visible = true;
- _game._player._priorTimer = _scene->_activeAnimation->getNextFrameTimer() - _game._player._ticksAmount;
+ _game._player._priorTimer = _scene->_animation[0]->getNextFrameTimer() - _game._player._ticksAmount;
_scene->_sequences.addTimer(6, 81);
break;
@@ -1331,7 +1331,7 @@ void Scene607::handleThrowingBone() {
case 1:
_game._player._visible = true;
- _game._player._priorTimer = _scene->_activeAnimation->getNextFrameTimer() - _game._player._ticksAmount;
+ _game._player._priorTimer = _scene->_animation[0]->getNextFrameTimer() - _game._player._ticksAmount;
if (_animationMode != 1)
_scene->_hotspots.activate(NOUN_OBNOXIOUS_DOG, false);
@@ -1605,7 +1605,7 @@ void Scene608::restoreAnimations() {
_scene->_sequences.remove(_globals._sequenceIndexes[6]);
_scene->_sequences.remove(_globals._sequenceIndexes[7]);
_scene->loadAnimation(formAnimName('A', -1));
- _scene->_activeAnimation->setCurrentFrame(6);
+ _scene->_animation[0]->setCurrentFrame(6);
}
}
@@ -1757,7 +1757,7 @@ void Scene608::enter() {
int idx = _scene->_dynamicHotspots.add(NOUN_CAR, VERB_WALKTO, -1, Common::Rect(100, 100, 100 + 82, 100 + 25));
_carHotspotId = _scene->_dynamicHotspots.setPosition(idx, Common::Point(96, 132), FACING_NORTHEAST);
_scene->loadAnimation(formAnimName('A', -1));
- _scene->_activeAnimation->setCurrentFrame(6);
+ _scene->_animation[0]->setCurrentFrame(6);
} else if (_globals[kCarStatus] == CAR_SQUASHES_DOG) {
_carMode = 2;
_dogDeathMode = 0;
@@ -1927,13 +1927,13 @@ void Scene608::step() {
_animationMode = 0;
}
- if ((_carMode == 4) && (_scene->_activeAnimation != nullptr)) {
- if (_scene->_activeAnimation->getCurrentFrame() != _carFrame) {
- _carFrame = _scene->_activeAnimation->getCurrentFrame();
+ if ((_carMode == 4) && (_scene->_animation[0] != nullptr)) {
+ if (_scene->_animation[0]->getCurrentFrame() != _carFrame) {
+ _carFrame = _scene->_animation[0]->getCurrentFrame();
if (_carFrame == 10) {
_game._player._visible = true;
- _game._player._priorTimer = _scene->_activeAnimation->getNextFrameTimer() - _game._player._ticksAmount;
+ _game._player._priorTimer = _scene->_animation[0]->getNextFrameTimer() - _game._player._ticksAmount;
} else if (_carFrame == 56) {
resetDogVariables();
_animationMode = 0;
@@ -1942,12 +1942,12 @@ void Scene608::step() {
}
}
- if ((_carMode == 5) && (_scene->_activeAnimation != nullptr)) {
- if (_scene->_activeAnimation->getCurrentFrame() != _carFrame) {
- _carFrame = _scene->_activeAnimation->getCurrentFrame();
+ if ((_carMode == 5) && (_scene->_animation[0] != nullptr)) {
+ if (_scene->_animation[0]->getCurrentFrame() != _carFrame) {
+ _carFrame = _scene->_animation[0]->getCurrentFrame();
if (_carFrame == 10) {
_game._player._visible = true;
- _game._player._priorTimer = _scene->_activeAnimation->getNextFrameTimer() - _game._player._ticksAmount;
+ _game._player._priorTimer = _scene->_animation[0]->getNextFrameTimer() - _game._player._ticksAmount;
} else if (_carFrame == 52) {
resetDogVariables();
_animationMode = 0;
@@ -1956,13 +1956,13 @@ void Scene608::step() {
}
}
- if ((_carMode == 6) && (_scene->_activeAnimation != nullptr)) {
- if (_scene->_activeAnimation->getCurrentFrame() != _carFrame) {
- _carFrame = _scene->_activeAnimation->getCurrentFrame();
+ if ((_carMode == 6) && (_scene->_animation[0] != nullptr)) {
+ if (_scene->_animation[0]->getCurrentFrame() != _carFrame) {
+ _carFrame = _scene->_animation[0]->getCurrentFrame();
if (_carFrame == 11) {
_game._player._visible = true;
- _game._player._priorTimer = _scene->_activeAnimation->getNextFrameTimer() - _game._player._ticksAmount;
+ _game._player._priorTimer = _scene->_animation[0]->getNextFrameTimer() - _game._player._ticksAmount;
} else if (_carFrame == 41) {
_globals._sequenceIndexes[10] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[10], false, 9, 0, 0, 0);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[10], 10, 11);
@@ -2000,9 +2000,9 @@ void Scene608::step() {
if (_game._trigger == 112)
_dogYelping = false;
- if ((_carMode == 0) && (_scene->_activeAnimation != nullptr)) {
- if (_scene->_activeAnimation->getCurrentFrame() != _carFrame) {
- _carFrame = _scene->_activeAnimation->getCurrentFrame();
+ if ((_carMode == 0) && (_scene->_animation[0] != nullptr)) {
+ if (_scene->_animation[0]->getCurrentFrame() != _carFrame) {
+ _carFrame = _scene->_animation[0]->getCurrentFrame();
int nextFrame = -1;
if ((_globals[kCarStatus] == CAR_UP) || (_globals[kCarStatus] == CAR_DOWN)) {
@@ -2015,7 +2015,7 @@ void Scene608::step() {
break;
case 1:
- if (_scene->_activeAnimation->getCurrentFrame() >= 12) {
+ if (_scene->_animation[0]->getCurrentFrame() >= 12) {
nextFrame = 0;
_carMoveMode = 0;
_globals[kCarStatus] = CAR_UP;
@@ -2023,7 +2023,7 @@ void Scene608::step() {
break;
case 2:
- if (_scene->_activeAnimation->getCurrentFrame() >= 6) {
+ if (_scene->_animation[0]->getCurrentFrame() >= 6) {
nextFrame = 6;
_carMoveMode = 0;
_globals[kCarStatus] = CAR_DOWN;
@@ -2035,35 +2035,35 @@ void Scene608::step() {
}
}
- if ((nextFrame >= 0) && (nextFrame != _scene->_activeAnimation->getCurrentFrame())) {
- _scene->_activeAnimation->setCurrentFrame(nextFrame);
+ if ((nextFrame >= 0) && (nextFrame != _scene->_animation[0]->getCurrentFrame())) {
+ _scene->_animation[0]->setCurrentFrame(nextFrame);
_carFrame = nextFrame;
}
}
}
- if ((_carMode == 2) && (_scene->_activeAnimation != nullptr)) {
- if (_scene->_activeAnimation->getCurrentFrame() != _carFrame) {
- _carFrame = _scene->_activeAnimation->getCurrentFrame();
+ if ((_carMode == 2) && (_scene->_animation[0] != nullptr)) {
+ if (_scene->_animation[0]->getCurrentFrame() != _carFrame) {
+ _carFrame = _scene->_animation[0]->getCurrentFrame();
int nextFrame = -1;
if (_carMoveMode == 0)
nextFrame = 28;
- else if (_scene->_activeAnimation->getCurrentFrame() >= 28) {
+ else if (_scene->_animation[0]->getCurrentFrame() >= 28) {
nextFrame = 28;
_carMoveMode = 0;
}
- if ((nextFrame >= 0) && (nextFrame != _scene->_activeAnimation->getCurrentFrame())) {
- _scene->_activeAnimation->setCurrentFrame(nextFrame);
+ if ((nextFrame >= 0) && (nextFrame != _scene->_animation[0]->getCurrentFrame())) {
+ _scene->_animation[0]->setCurrentFrame(nextFrame);
_carFrame = nextFrame;
}
}
}
- if ((_carMode == 3) && (_scene->_activeAnimation != nullptr)) {
- if (_scene->_activeAnimation->getCurrentFrame() != _carFrame) {
- _carFrame = _scene->_activeAnimation->getCurrentFrame();
+ if ((_carMode == 3) && (_scene->_animation[0] != nullptr)) {
+ if (_scene->_animation[0]->getCurrentFrame() != _carFrame) {
+ _carFrame = _scene->_animation[0]->getCurrentFrame();
int nextFrame = -1;
if (_resetPositionsFl) {
@@ -2071,22 +2071,22 @@ void Scene608::step() {
_carMoveMode = 0;
} else if (_carMoveMode == 0)
nextFrame = 6;
- else if (_scene->_activeAnimation->getCurrentFrame() >= 6) {
+ else if (_scene->_animation[0]->getCurrentFrame() >= 6) {
nextFrame = 6;
_carMoveMode = 0;
}
- if ((nextFrame >= 0) && (nextFrame != _scene->_activeAnimation->getCurrentFrame())) {
- _scene->_activeAnimation->setCurrentFrame(nextFrame);
+ if ((nextFrame >= 0) && (nextFrame != _scene->_animation[0]->getCurrentFrame())) {
+ _scene->_animation[0]->setCurrentFrame(nextFrame);
_carFrame = nextFrame;
}
}
}
- if ((_carMode == 1) && (_scene->_activeAnimation != nullptr)) {
- if (_scene->_activeAnimation->getCurrentFrame() != _carFrame) {
- _carFrame = _scene->_activeAnimation->getCurrentFrame();
+ if ((_carMode == 1) && (_scene->_animation[0] != nullptr)) {
+ if (_scene->_animation[0]->getCurrentFrame() != _carFrame) {
+ _carFrame = _scene->_animation[0]->getCurrentFrame();
int nextFrame = -1;
if (_resetPositionsFl) {
@@ -2094,13 +2094,13 @@ void Scene608::step() {
_carMoveMode = 0;
} else if (_carMoveMode == 0)
nextFrame = 6;
- else if (_scene->_activeAnimation->getCurrentFrame() >= 6) {
+ else if (_scene->_animation[0]->getCurrentFrame() >= 6) {
nextFrame = 6;
_carMoveMode = 0;
}
- if ((nextFrame >= 0) && (nextFrame != _scene->_activeAnimation->getCurrentFrame())) {
- _scene->_activeAnimation->setCurrentFrame(nextFrame);
+ if ((nextFrame >= 0) && (nextFrame != _scene->_animation[0]->getCurrentFrame())) {
+ _scene->_animation[0]->setCurrentFrame(nextFrame);
_carFrame = nextFrame;
}
}
@@ -2476,7 +2476,7 @@ void Scene608::actions() {
_vm->_dialogs->show(60824);
} else if (_action.isAction(VERB_OPEN, NOUN_STORAGE_BOX))
_vm->_dialogs->show(60826);
- else if (_action.isAction(VERB_LOOK, NOUN_REARVIEW_MIRROR) && (_action._mainObjectSource == 4))
+ else if (_action.isAction(VERB_LOOK, NOUN_REARVIEW_MIRROR) && (_action._mainObjectSource == CAT_HOTSPOT))
_vm->_dialogs->show(60828);
else if (_action.isAction(VERB_LOOK, NOUN_TOOL_BOX)) {
if (_game._objects[OBJ_POLYCEMENT]._roomNumber == _scene->_currentSceneId)
@@ -2605,7 +2605,7 @@ void Scene609::step() {
switch (_game._trigger) {
case 70:
_game._player._visible = true;
- _game._player._priorTimer = _scene->_activeAnimation->getNextFrameTimer() - _game._player._ticksAmount;
+ _game._player._priorTimer = _scene->_animation[0]->getNextFrameTimer() - _game._player._ticksAmount;
_scene->_sequences.addTimer(6, 71);
break;
@@ -3014,7 +3014,7 @@ void Scene610::actions() {
_vm->_dialogs->show(61024);
else if (_action.isAction(VERB_LOOK, NOUN_SPOTLIGHT))
_vm->_dialogs->show(61025);
- else if (_action.isAction(VERB_LOOK, NOUN_PHONE_HANDSET) && (_action._mainObjectSource == 4))
+ else if (_action.isAction(VERB_LOOK, NOUN_PHONE_HANDSET) && (_action._mainObjectSource == CAT_HOTSPOT))
_vm->_dialogs->show(61026);
else if (_action.isAction(VERB_LOOK, NOUN_PHONE_CRADLE))
_vm->_dialogs->show(61027);
@@ -3930,7 +3930,7 @@ void Scene611::enter() {
0x2D9, 0x2DA, 0x2DB, 0x2DC, 0x2DD, 0x2DE, 0x2DF, 0x2E0, 0x2E1, 0x2E2, 0x2E3, 0x2E4, 0x2E5, 0x2E6,
0x323, 0x324, 0);
- _dialog1.setup(kConvHermit1, 0x287, 0x288, 0x289, 0x28A, 0x28B, 0x28C, 0x28D, 0x28E, 0x28F, 0x290,
+ _dialog1.setup(kConvHermit1, 0x287, 0x288, 0x289, 0x28A, 0x28B, 0x28C, 0x28D, 0x28E, 0x28F, 0x290,
0x291, 0x292, 0x293, 0x294, 0x295, 0x296, 0);
_dialog2.setup(kConvHermit2, 0x29C, 0x29D, 0x29E, 0x29F, 0);
@@ -4145,13 +4145,13 @@ void Scene611::step() {
_hermitMovingFl = true;
}
- if (_stickFingerFl && (_scene->_activeAnimation->getCurrentFrame() == 47)) {
+ if (_stickFingerFl && (_scene->_animation[0]->getCurrentFrame() == 47)) {
_stickFingerFl = false;
_hermitMovingFl = true;
_hermitMode = 1;
}
- if (_scene->_activeAnimation != nullptr && (_scene->_activeAnimation->getCurrentFrame() == 240) && _check1Fl) {
+ if (_scene->_animation[0] != nullptr && (_scene->_animation[0]->getCurrentFrame() == 240) && _check1Fl) {
_check1Fl = false;
_scene->_kernelMessages.add(Common::Point(33, 88), 0xFDFC, 0, 0, 90, _game.getQuote(0x27E));
_scene->_sequences.addTimer(120, 120);
@@ -4240,7 +4240,7 @@ void Scene611::step() {
}
}
- if (_scene->_activeAnimation != nullptr && _scene->_activeAnimation->getCurrentFrame() == 254)
+ if (_scene->_animation[0] != nullptr && _scene->_animation[0]->getCurrentFrame() == 254)
_game._player._stepEnabled = true;
if (_game._trigger == 110) {
@@ -4266,7 +4266,7 @@ void Scene611::step() {
}
if (_hermitMode == 6) {
- if ((_scene->_activeAnimation->getCurrentFrame() == 9) && _check1Fl) {
+ if ((_scene->_animation[0]->getCurrentFrame() == 9) && _check1Fl) {
_scene->_sequences.remove(_globals._sequenceIndexes[3]);
_globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 7, 1, 0, 0);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 1, 2);
@@ -4275,7 +4275,7 @@ void Scene611::step() {
_check1Fl = false;
}
- if ((_scene->_activeAnimation->getCurrentFrame() == 17) && !_check1Fl) {
+ if ((_scene->_animation[0]->getCurrentFrame() == 17) && !_check1Fl) {
_nextFrame = 26;
_hermitMode = 4;
_check1Fl = true;
@@ -4283,13 +4283,13 @@ void Scene611::step() {
}
if (_hermitMode == 4) {
- if ((_scene->_activeAnimation->getCurrentFrame() == 33) && _check1Fl) {
+ if ((_scene->_animation[0]->getCurrentFrame() == 33) && _check1Fl) {
displayHermitQuestions(_hermitDisplayedQuestion);
_nextFrame = 1;
_check1Fl = false;
}
- if ((_scene->_activeAnimation->getCurrentFrame() == 9) && !_check1Fl) {
+ if ((_scene->_animation[0]->getCurrentFrame() == 9) && !_check1Fl) {
_nextFrame = 8;
_scene->_sequences.addTimer(1, 113);
_check1Fl = true;
@@ -4315,8 +4315,8 @@ void Scene611::step() {
_scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 115);
}
- if ((_nextFrame >= 0) && (_nextFrame != _scene->_activeAnimation->getCurrentFrame())) {
- _scene->_activeAnimation->setCurrentFrame(_nextFrame);
+ if ((_nextFrame >= 0) && (_nextFrame != _scene->_animation[0]->getCurrentFrame())) {
+ _scene->_animation[0]->setCurrentFrame(_nextFrame);
_nextFrame = -1;
}
@@ -4588,7 +4588,7 @@ void Scene612::step() {
switch (_game._trigger) {
case 70:
_game._player._visible = true;
- _game._player._priorTimer = _scene->_activeAnimation->getNextFrameTimer() - _game._player._ticksAmount;
+ _game._player._priorTimer = _scene->_animation[0]->getNextFrameTimer() - _game._player._ticksAmount;
_scene->_sequences.addTimer(6, 71);
break;
diff --git a/engines/mads/nebular/nebular_scenes7.cpp b/engines/mads/nebular/nebular_scenes7.cpp
index c2a249e5f8..6caebb7f79 100644
--- a/engines/mads/nebular/nebular_scenes7.cpp
+++ b/engines/mads/nebular/nebular_scenes7.cpp
@@ -361,7 +361,7 @@ void Scene701::actions() {
case 1: {
_game._player._visible = true;
- _game._player._priorTimer = _scene->_activeAnimation->getNextFrameTimer() - _game._player._ticksAmount;
+ _game._player._priorTimer = _scene->_animation[0]->getNextFrameTimer() - _game._player._ticksAmount;
_globals._sequenceIndexes[2] = _scene->_sequences.startCycle(_globals._spriteIndexes[2], false, -1);
_scene->_sequences.setDepth (_globals._sequenceIndexes[2], 9);
int idx = _scene->_dynamicHotspots.add(NOUN_BOAT, VERB_CLIMB_INTO, _globals._sequenceIndexes[2], Common::Rect(0, 0, 0, 0));
@@ -498,7 +498,7 @@ void Scene702::actions() {
_game._player._stepEnabled = false;
_game._player._visible = false;
_scene->_nextSceneId = 711;
- } else if (_action.isAction(VERB_TAKE, NOUN_BONES) && (_action._mainObjectSource == 4) && (!_game._objects.isInInventory(OBJ_BONES) || _game._trigger)) {
+ } else if (_action.isAction(VERB_TAKE, NOUN_BONES) && (_action._mainObjectSource == CAT_HOTSPOT) && (!_game._objects.isInInventory(OBJ_BONES) || _game._trigger)) {
switch (_game._trigger) {
case 0:
_game._player._stepEnabled = false;
@@ -537,9 +537,9 @@ void Scene702::actions() {
_vm->_dialogs->show(70215);
else if (_action.isAction(VERB_LOOK, NOUN_TELEPORTER))
_vm->_dialogs->show(70216);
- else if (_action.isAction(VERB_LOOK, NOUN_BONES) && (_action._mainObjectSource == 4))
+ else if (_action.isAction(VERB_LOOK, NOUN_BONES) && (_action._mainObjectSource == CAT_HOTSPOT))
_vm->_dialogs->show(70217);
- else if (_action.isAction(VERB_TAKE, NOUN_BONES) && (_action._mainObjectSource == 4)) {
+ else if (_action.isAction(VERB_TAKE, NOUN_BONES) && (_action._mainObjectSource == CAT_HOTSPOT)) {
if (_game._objects.isInInventory(OBJ_BONES))
_vm->_dialogs->show(70219);
} else if (_action.isAction(VERB_LOOK, NOUN_SUBMERGED_CITY))
@@ -694,7 +694,7 @@ void Scene703::enter() {
_boatDir = 2;
_monsterMode = 0;
_scene->loadAnimation(formAnimName('A', -1));
- _scene->_activeAnimation->setCurrentFrame(34);
+ _scene->_animation[0]->setCurrentFrame(34);
} else if (_scene->_priorSceneId != RETURNING_FROM_DIALOG) {
_game._player._stepEnabled = false;
_boatDir = 1;
@@ -712,17 +712,17 @@ void Scene703::enter() {
_boatDir = 1;
_monsterMode = 1;
_scene->loadAnimation(formAnimName('B', -1));
- _scene->_activeAnimation->setCurrentFrame(39);
+ _scene->_animation[0]->setCurrentFrame(39);
} else if (_boatDir == 1) {
_curSequence = 0;
_monsterMode = 0;
_scene->loadAnimation(formAnimName('A', -1));
- _scene->_activeAnimation->setCurrentFrame(9);
+ _scene->_animation[0]->setCurrentFrame(9);
} else if (_boatDir == 2) {
_curSequence = 0;
_monsterMode = 0;
_scene->loadAnimation(formAnimName('A', -1));
- _scene->_activeAnimation->setCurrentFrame(56);
+ _scene->_animation[0]->setCurrentFrame(56);
}
if (_scene->_roomChanged) {
@@ -764,9 +764,9 @@ void Scene703::step() {
if (_game._trigger == 70)
_scene->_reloadSceneFlag = true;
- if ((_monsterMode == 3) && (_scene->_activeAnimation != nullptr)) {
- if (_scene->_activeAnimation->getCurrentFrame() != _boatFrame) {
- _boatFrame = _scene->_activeAnimation->getCurrentFrame();
+ if ((_monsterMode == 3) && (_scene->_animation[0] != nullptr)) {
+ if (_scene->_animation[0]->getCurrentFrame() != _boatFrame) {
+ _boatFrame = _scene->_animation[0]->getCurrentFrame();
int nextBoatFrame = -1;
if (_boatFrame == 62) {
@@ -777,8 +777,8 @@ void Scene703::step() {
}
}
- if ((nextBoatFrame >= 0) && (nextBoatFrame != _scene->_activeAnimation->getCurrentFrame())) {
- _scene->_activeAnimation->setCurrentFrame(nextBoatFrame);
+ if ((nextBoatFrame >= 0) && (nextBoatFrame != _scene->_animation[0]->getCurrentFrame())) {
+ _scene->_animation[0]->setCurrentFrame(nextBoatFrame);
_boatFrame = nextBoatFrame;
}
}
@@ -787,9 +787,9 @@ void Scene703::step() {
if (_game._trigger == 70)
_scene->_reloadSceneFlag = true;
- if ((_monsterMode == 0) && (_scene->_activeAnimation != nullptr)) {
- if (_scene->_activeAnimation->getCurrentFrame() != _boatFrame) {
- _boatFrame = _scene->_activeAnimation->getCurrentFrame();
+ if ((_monsterMode == 0) && (_scene->_animation[0] != nullptr)) {
+ if (_scene->_animation[0]->getCurrentFrame() != _boatFrame) {
+ _boatFrame = _scene->_animation[0]->getCurrentFrame();
int nextBoatFrame = -1;
switch (_boatFrame) {
@@ -860,8 +860,8 @@ void Scene703::step() {
break;
}
- if ((nextBoatFrame >= 0) && (nextBoatFrame != _scene->_activeAnimation->getCurrentFrame())) {
- _scene->_activeAnimation->setCurrentFrame(nextBoatFrame);
+ if ((nextBoatFrame >= 0) && (nextBoatFrame != _scene->_animation[0]->getCurrentFrame())) {
+ _scene->_animation[0]->setCurrentFrame(nextBoatFrame);
_boatFrame = nextBoatFrame;
}
}
@@ -895,9 +895,9 @@ void Scene703::step() {
}
- if ((_monsterMode == 1) && (_scene->_activeAnimation != nullptr)) {
- if (_scene->_activeAnimation->getCurrentFrame() != _boatFrame) {
- _boatFrame = _scene->_activeAnimation->getCurrentFrame();
+ if ((_monsterMode == 1) && (_scene->_animation[0] != nullptr)) {
+ if (_scene->_animation[0]->getCurrentFrame() != _boatFrame) {
+ _boatFrame = _scene->_animation[0]->getCurrentFrame();
int nextBoatFrame = -1;
switch (_boatFrame) {
@@ -934,16 +934,16 @@ void Scene703::step() {
break;
}
- if ((nextBoatFrame >= 0) && (nextBoatFrame != _scene->_activeAnimation->getCurrentFrame())) {
- _scene->_activeAnimation->setCurrentFrame(nextBoatFrame);
+ if ((nextBoatFrame >= 0) && (nextBoatFrame != _scene->_animation[0]->getCurrentFrame())) {
+ _scene->_animation[0]->setCurrentFrame(nextBoatFrame);
_boatFrame = nextBoatFrame;
}
}
}
- if ((_monsterMode == 2) && (_scene->_activeAnimation != nullptr)) {
- if (_scene->_activeAnimation->getCurrentFrame() != _boatFrame) {
- _boatFrame = _scene->_activeAnimation->getCurrentFrame();
+ if ((_monsterMode == 2) && (_scene->_animation[0] != nullptr)) {
+ if (_scene->_animation[0]->getCurrentFrame() != _boatFrame) {
+ _boatFrame = _scene->_animation[0]->getCurrentFrame();
int nextBoatFrame = -1;
switch (_boatFrame) {
@@ -983,7 +983,7 @@ void Scene703::step() {
_scene->freeAnimation();
_monsterMode = 1;
_scene->loadAnimation(formAnimName('B', -1));
- _scene->_activeAnimation->setCurrentFrame(39);
+ _scene->_animation[0]->setCurrentFrame(39);
_game._player._stepEnabled = true;
break;
@@ -992,7 +992,7 @@ void Scene703::step() {
_scene->freeAnimation();
_monsterMode = 1;
_scene->loadAnimation(formAnimName('B', -1));
- _scene->_activeAnimation->setCurrentFrame(39);
+ _scene->_animation[0]->setCurrentFrame(39);
_game._player._stepEnabled = true;
} else
_game._objects.setRoom(OBJ_CHICKEN_BOMB, 1);
@@ -1005,7 +1005,7 @@ void Scene703::step() {
_scene->freeAnimation();
_monsterMode = 0;
_scene->loadAnimation(formAnimName('A', -1));
- _scene->_activeAnimation->setCurrentFrame(9);
+ _scene->_animation[0]->setCurrentFrame(9);
_game._player._stepEnabled = true;
if (_game._storyMode == STORYMODE_NAUGHTY)
_vm->_dialogs->show(70321);
@@ -1018,8 +1018,8 @@ void Scene703::step() {
break;
}
- if ((nextBoatFrame >= 0) && (nextBoatFrame != _scene->_activeAnimation->getCurrentFrame())) {
- _scene->_activeAnimation->setCurrentFrame(nextBoatFrame);
+ if ((nextBoatFrame >= 0) && (nextBoatFrame != _scene->_animation[0]->getCurrentFrame())) {
+ _scene->_animation[0]->setCurrentFrame(nextBoatFrame);
_boatFrame = nextBoatFrame;
}
}
@@ -1055,7 +1055,7 @@ void Scene703::actions() {
_scene->freeAnimation();
_monsterMode = 2;
_scene->loadAnimation(formAnimName('C', -1));
- _scene->_activeAnimation->setCurrentFrame(19);
+ _scene->_animation[0]->setCurrentFrame(19);
} else if (_action.isAction(VERB_THROW, NOUN_CHICKEN, NOUN_SEA_MONSTER)) {
_game._player._stepEnabled = false;
_scene->freeAnimation();
@@ -1066,13 +1066,13 @@ void Scene703::actions() {
_scene->freeAnimation();
_monsterMode = 2;
_scene->loadAnimation(formAnimName('C', -1));
- _scene->_activeAnimation->setCurrentFrame(39);
+ _scene->_animation[0]->setCurrentFrame(39);
} else if (_action.isAction(VERB_THROW, NOUN_BOMB, NOUN_SEA_MONSTER)) {
_game._player._stepEnabled = false;
_scene->freeAnimation();
_monsterMode = 2;
_scene->loadAnimation(formAnimName('C', -1));
- _scene->_activeAnimation->setCurrentFrame(59);
+ _scene->_animation[0]->setCurrentFrame(59);
} else if (_action.isAction(VERB_THROW, NOUN_CHICKEN_BOMB, NOUN_SEA_MONSTER)) {
_useBomb = true;
_game._player._stepEnabled = false;
@@ -1241,21 +1241,21 @@ void Scene704::enter() {
_animationMode = 2;
_boatDirection = 2;
_scene->loadAnimation(formAnimName('A', -1));
- _scene->_activeAnimation->setCurrentFrame(36);
+ _scene->_animation[0]->setCurrentFrame(36);
} else if (_scene->_priorSceneId != RETURNING_FROM_DIALOG) {
_game._player._stepEnabled = false;
_boatDirection = 1;
_scene->loadAnimation(formAnimName('A', -1));
} else if (_boatDirection == 1) {
_scene->loadAnimation(formAnimName('A', -1));
- _scene->_activeAnimation->setCurrentFrame(8);
+ _scene->_animation[0]->setCurrentFrame(8);
} else if (_boatDirection == 2) {
if (_game._objects[OBJ_BOTTLE]._roomNumber == _scene->_currentSceneId) {
_scene->_sequences.setPosition(_globals._sequenceIndexes[1], Common::Point(123, 125));
_scene->_sequences.setDepth(_globals._sequenceIndexes[1], 1);
}
_scene->loadAnimation(formAnimName('A', -1));
- _scene->_activeAnimation->setCurrentFrame(57);
+ _scene->_animation[0]->setCurrentFrame(57);
}
if (_scene->_roomChanged)
@@ -1269,9 +1269,9 @@ void Scene704::enter() {
}
void Scene704::step() {
- if (_scene->_activeAnimation != nullptr) {
- if (_scene->_activeAnimation->getCurrentFrame() != _boatCurrentFrame) {
- _boatCurrentFrame = _scene->_activeAnimation->getCurrentFrame();
+ if (_scene->_animation[0] != nullptr) {
+ if (_scene->_animation[0]->getCurrentFrame() != _boatCurrentFrame) {
+ _boatCurrentFrame = _scene->_animation[0]->getCurrentFrame();
int nextFrame = -1;
switch (_boatCurrentFrame) {
@@ -1377,8 +1377,8 @@ void Scene704::step() {
break;
}
- if ((nextFrame >= 0) && (nextFrame != _scene->_activeAnimation->getCurrentFrame())) {
- _scene->_activeAnimation->setCurrentFrame(nextFrame);
+ if ((nextFrame >= 0) && (nextFrame != _scene->_animation[0]->getCurrentFrame())) {
+ _scene->_animation[0]->setCurrentFrame(nextFrame);
_boatCurrentFrame = nextFrame;
}
}
@@ -1455,7 +1455,7 @@ void Scene704::actions() {
_vm->_dialogs->show(70412);
} else if (_action.isAction(VERB_LOOK, NOUN_VOLCANO_RIM))
_vm->_dialogs->show(70413);
- else if (_action.isAction(VERB_LOOK, NOUN_BOTTLE) && (_action._mainObjectSource == 4))
+ else if (_action.isAction(VERB_LOOK, NOUN_BOTTLE) && (_action._mainObjectSource == CAT_HOTSPOT))
_vm->_dialogs->show(70414);
else if (_action.isAction(VERB_LOOK, NOUN_OPEN_WATER_TO_SOUTH))
_vm->_dialogs->show(70416);
@@ -1906,9 +1906,9 @@ void Scene706::step() {
_scene->_reloadSceneFlag = true;
}
- if (_scene->_activeAnimation != nullptr) {
- if ((_animationMode != 0) && (_scene->_activeAnimation->getCurrentFrame() != _animationFrame)) {
- _animationFrame = _scene->_activeAnimation->getCurrentFrame();
+ if (_scene->_animation[0] != nullptr) {
+ if ((_animationMode != 0) && (_scene->_animation[0]->getCurrentFrame() != _animationFrame)) {
+ _animationFrame = _scene->_animation[0]->getCurrentFrame();
if (_animationFrame == 6) {
_scene->_sequences.remove(_globals._sequenceIndexes[1]);
@@ -2017,7 +2017,7 @@ void Scene706::actions() {
_vm->_dialogs->show(70623);
else if (_action.isAction(VERB_LOOK, NOUN_VASE) && (_game._objects[OBJ_VASE]._roomNumber == _scene->_currentSceneId))
_vm->_dialogs->show(70624);
- else if (_action.isAction(VERB_LOOK, NOUN_BOTTLE) && (_action._mainObjectSource == 4))
+ else if (_action.isAction(VERB_LOOK, NOUN_BOTTLE) && (_action._mainObjectSource == CAT_HOTSPOT))
_vm->_dialogs->show(70632);
else
return;
diff --git a/engines/mads/nebular/nebular_scenes8.cpp b/engines/mads/nebular/nebular_scenes8.cpp
index a904569624..951b270a1c 100644
--- a/engines/mads/nebular/nebular_scenes8.cpp
+++ b/engines/mads/nebular/nebular_scenes8.cpp
@@ -930,7 +930,7 @@ void Scene804::enter() {
void Scene804::step() {
if (!_messWithThrottle) {
- if ((_throttleGone) && (_movingThrottle) && (_scene->_activeAnimation->getCurrentFrame() == 39)) {
+ if ((_throttleGone) && (_movingThrottle) && (_scene->_animation[0]->getCurrentFrame() == 39)) {
_globals._sequenceIndexes[1] = _scene->_sequences.startCycle
(_globals._spriteIndexes[1], false, 1);
_scene->_sequences.setPosition(_globals._sequenceIndexes[1], Common::Point(133, 139));
@@ -938,7 +938,7 @@ void Scene804::step() {
_throttleGone = false;
}
- if ((_movingThrottle) && (_scene->_activeAnimation->getCurrentFrame() == 42)) {
+ if ((_movingThrottle) && (_scene->_animation[0]->getCurrentFrame() == 42)) {
_resetFrame = 0;
_movingThrottle = false;
}
@@ -947,12 +947,12 @@ void Scene804::step() {
_resetFrame = 42;
}
- if (_scene->_activeAnimation->getCurrentFrame() == 65)
+ if (_scene->_animation[0]->getCurrentFrame() == 65)
_scene->_sequences.remove(_globals._sequenceIndexes[7]);
switch (_game._storyMode) {
case STORYMODE_NAUGHTY:
- if (_scene->_activeAnimation->getCurrentFrame() == 81) {
+ if (_scene->_animation[0]->getCurrentFrame() == 81) {
_resetFrame = 80;
_globals[kInSpace] = false;
_globals[kBeamIsUp] = true;
@@ -964,7 +964,7 @@ void Scene804::step() {
break;
case STORYMODE_NICE:
- if (_scene->_activeAnimation->getCurrentFrame() == 68) {
+ if (_scene->_animation[0]->getCurrentFrame() == 68) {
_resetFrame = 66;
_globals[kInSpace] = false;
_globals[kBeamIsUp] = true;
@@ -975,12 +975,12 @@ void Scene804::step() {
}
}
- if (_scene->_activeAnimation->getCurrentFrame() == 34) {
+ if (_scene->_animation[0]->getCurrentFrame() == 34) {
_resetFrame = 36;
_scene->_sequences.remove(_globals._sequenceIndexes[1]);
}
- if (_scene->_activeAnimation->getCurrentFrame() == 37) {
+ if (_scene->_animation[0]->getCurrentFrame() == 37) {
_resetFrame = 36;
if (!_dontPullThrottleAgain) {
_dontPullThrottleAgain = true;
@@ -992,20 +992,20 @@ void Scene804::step() {
_scene->_nextSceneId = 803;
}
- if ((_scene->_activeAnimation->getCurrentFrame() == 7) && (!_globals[kWindowFixed])) {
+ if ((_scene->_animation[0]->getCurrentFrame() == 7) && (!_globals[kWindowFixed])) {
_globals._sequenceIndexes[4] = _scene->_sequences.startCycle(_globals._spriteIndexes[4], false, 1);
_scene->_sequences.addTimer(20, 110);
_globals[kWindowFixed] = true;
}
- if (_scene->_activeAnimation->getCurrentFrame() == 10) {
+ if (_scene->_animation[0]->getCurrentFrame() == 10) {
_resetFrame = 0;
_game._player._stepEnabled = true;
_game._objects.setRoom(OBJ_POLYCEMENT, NOWHERE);
}
// FIXME: Original doesn't have resetFrame check. Check why this has been needed
- if (_resetFrame == -1 && _scene->_activeAnimation->getCurrentFrame() == 1) {
+ if (_resetFrame == -1 && _scene->_animation[0]->getCurrentFrame() == 1) {
int randomVal = _vm->getRandomNumber(29) + 1;
switch (randomVal) {
case 1:
@@ -1023,7 +1023,7 @@ void Scene804::step() {
}
}
- switch (_scene->_activeAnimation->getCurrentFrame()) {
+ switch (_scene->_animation[0]->getCurrentFrame()) {
case 26:
case 28:
case 31:
@@ -1031,12 +1031,12 @@ void Scene804::step() {
break;
}
} else {
- if ((_scene->_activeAnimation->getCurrentFrame() == 36) && (!_throttleGone)) {
+ if ((_scene->_animation[0]->getCurrentFrame() == 36) && (!_throttleGone)) {
_scene->_sequences.remove(_globals._sequenceIndexes[1]);
_throttleGone = true;
}
- if (_scene->_activeAnimation->getCurrentFrame() == 39) {
+ if (_scene->_animation[0]->getCurrentFrame() == 39) {
_movingThrottle = false;
switch (_throttleCounter) {
case 1:
@@ -1074,8 +1074,8 @@ void Scene804::step() {
}
if (_resetFrame >= 0) {
- if (_resetFrame != _scene->_activeAnimation->getCurrentFrame()) {
- _scene->_activeAnimation->setCurrentFrame(_resetFrame);
+ if (_resetFrame != _scene->_animation[0]->getCurrentFrame()) {
+ _scene->_animation[0]->setCurrentFrame(_resetFrame);
_resetFrame = -1;
}
}
@@ -1084,12 +1084,12 @@ void Scene804::step() {
_scene->_nextSceneId = 803;
}
- if ((_scene->_activeAnimation->getCurrentFrame() == 72) && !_alreadyPop) {
+ if ((_scene->_animation[0]->getCurrentFrame() == 72) && !_alreadyPop) {
_vm->_sound->command(21);
_alreadyPop = true;
}
- if ((_scene->_activeAnimation->getCurrentFrame() == 80) && !_alreadyOrgan) {
+ if ((_scene->_animation[0]->getCurrentFrame() == 80) && !_alreadyOrgan) {
_vm->_sound->command(22);
_alreadyOrgan = true;
}
@@ -1606,7 +1606,7 @@ void Scene810::enter() {
}
void Scene810::step() {
- if (_scene->_activeAnimation && (_scene->_activeAnimation->getCurrentFrame() == 200)
+ if (_scene->_animation[0] && (_scene->_animation[0]->getCurrentFrame() == 200)
&& _moveAllowed) {
_scene->_sequences.addTimer(100, 70);
_moveAllowed = false;