aboutsummaryrefslogtreecommitdiff
path: root/engines/mads/nebular/nebular_scenes2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/mads/nebular/nebular_scenes2.cpp')
-rw-r--r--engines/mads/nebular/nebular_scenes2.cpp88
1 files changed, 44 insertions, 44 deletions
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);