diff options
author | Strangerke | 2014-03-26 07:49:37 +0100 |
---|---|---|
committer | Strangerke | 2014-03-26 07:49:37 +0100 |
commit | 46021c487b1d0d528a6f9199bff9f2006263bd33 (patch) | |
tree | d364b893aeb4a34dbf8be008981a18a05597a1a2 | |
parent | 04cbbb5f0a5cc761c71ead882187c02a0000ec0b (diff) | |
download | scummvm-rg350-46021c487b1d0d528a6f9199bff9f2006263bd33.tar.gz scummvm-rg350-46021c487b1d0d528a6f9199bff9f2006263bd33.tar.bz2 scummvm-rg350-46021c487b1d0d528a6f9199bff9f2006263bd33.zip |
MADS: Use globalId enum, add a skeletton for scene 209
-rw-r--r-- | engines/mads/nebular/globals_nebular.h | 59 | ||||
-rw-r--r-- | engines/mads/nebular/nebular_scenes.cpp | 2 | ||||
-rw-r--r-- | engines/mads/nebular/nebular_scenes1.cpp | 14 | ||||
-rw-r--r-- | engines/mads/nebular/nebular_scenes2.cpp | 134 | ||||
-rw-r--r-- | engines/mads/nebular/nebular_scenes2.h | 11 | ||||
-rw-r--r-- | engines/mads/nebular/nebular_scenes8.cpp | 37 |
6 files changed, 128 insertions, 129 deletions
diff --git a/engines/mads/nebular/globals_nebular.h b/engines/mads/nebular/globals_nebular.h index f83c0fa1b7..d8500e2291 100644 --- a/engines/mads/nebular/globals_nebular.h +++ b/engines/mads/nebular/globals_nebular.h @@ -32,120 +32,95 @@ namespace MADS { namespace Nebular { enum GlobalId { - KSexOfRex = 0, + kSexOfRex = 0, kOldSexOfRex = 1, kWalkerTiming = 2, kWalkerTiming0 = 3, - kTalkInanimateCount = 4, - kCopyProtectFailed = 5, /* Section #1 variables */ kNeedToStandUp = 10, - kTurkeyExploded = 11, kMedicineCabinetOpen = 12, kMedicineCabinetVirgin = 13, kWatchedViewScreen = 14, - kHoovicAlive = 15, kHoovicSated = 16, kHoovicFishEaten = 17, - kWaterInAPuddle = 18, - kFishIn105 = 19, kFishIn107 = 20, kFishIn108 = 21, - /* Section #2 variables */ kCurtainOpen = 30, kLadderBroken = 31, kBone202Status = 32, - kMeteorologistStatus = 33, - kRhotundaStatus = 34, kLeavesStatus = 35, - kMonkeyStatus = 36, - kMeteorologistEverSeen = 37, kMeteorologistWatch = 38, - kTeleporterCommand = 39, + kTeleporterDestination = 40, kTeleporterUnderstood = 41, - kConv205 = 42, kChickenPpermitted = 43, - kTwinklesStatus = 44, kTwinklesApproached = 45, - kConvTwinkles1 = 46, kConvTwinkles2 = 47, kConvTwinkles3 = 48, kConvTwinkles5 = 49, + kConvTwinkles6 = 50, kConvTwinkles7 = 51, kConvTwinkles8 = 52, - kBlowgunStatus = 53, - /* Section #3 Variables */ kAfterHavoc = 60, kHaveYourStuff = 61, - kRightView320 = 62, - kConvBuddy1 = 63, kConvBuddy2 = 64, kMetBuddyBeast = 65, kKnowsBuddyBeast = 66, - kConvSlache1 = 67, kConvSlache2 = 68, kConvSlache3 = 69, kRexHasMetSlache = 70, - kConvIntern = 71, kHasSeenProfPyro = 72, - kKickedIn391Grate = 73, - /* Section #4 Variables */ kArmoryDoorOpen = 80, kStorageDoorOpen = 81, - kNextIngredient = 82, - kIngredientList = 83, kIngredientList1 = 84, kIngredientList2 = 85, kIngredientList3 = 86, - kIngredientQuantity = 87, kIngredientQuantity1 = 88, kIngredientQuantity2 = 89, - kIngredientQuantity3 = 90, - - - conv_pyro_1 = 91, - conv_pyro_2 = 92, - conv_pyro_3 = 93, - conv_pyro_4 = 94, - bad_first_ingredient = 95, + kIngredientQuantity3 = 90, + kconvPyro_1 = 91, + kconvPyro_2 = 92, + kconvPyro_3 = 93, + kconvPyro_4 = 94, + kBadFirstIngredient = 95, kConvBartender1 = 96, kConvBartender2 = 97, kConvBartender3 = 98, kConvBartender4 = 99, + kHasPurchased = 100, kBeenThruHelgaScene = 101, kHasSaidBinocs = 102, @@ -154,12 +129,9 @@ enum GlobalId { kHasBeenScanned = 105, kSomeoneHasExploded = 106, - /* Section #5 Variables */ kBoatRaised = 110, - kCarStatus = 111, - kCityFlooded = 112, kLaserOn = 113, kLaserHoleIsThere = 114, @@ -172,7 +144,6 @@ enum GlobalId { kHoverCarLocation = 120, kHoverCarDestination = 121, - /* Section #6 Variables */ kConvHermit1 = 130, kconvHermit2 = 131, @@ -184,39 +155,34 @@ enum GlobalId { kPenlightCellStatus = 137, kTimebombStatus = 138, kCheckDaemonTimebomb = 140, - kResurrectRoom = 141, + kResurrectRoom = 141, /* Section #6 Time-Bomb Variables */ kTimebombClock = 142, kTimebombClock0 = 143, - kTimebombTimer = 144, kTimebombTimer0 = 145, - kWarnedFloodCity = 146, /* Section #7 Variables */ kBottleStatus = 150, kMonsterAlive = 151, - kConvBottleFillNode = 152, kBoatStatus = 153, - /* Section #8 Variables */ kAntigravClock = 160, kAntigravClock0 = 161, - kAntigravTiming = 162, kAntigravTiming0 = 163, - kWindowFixed = 164, kinSpace = 165, kReturnFromCut = 166, kBeamIsUp = 167, kForceBeamDown = 168, kCameFromCut = 169, + kCutX = 170, kCutY = 171, kCutFacing = 172, @@ -227,6 +193,7 @@ enum GlobalId { kRemoteOnGround = 177, kFromCockpit = 178, kExitShip = 179, + kBetweenRooms = 180, kTopButtonPushed = 181, kTargetModInstalled = 182, diff --git a/engines/mads/nebular/nebular_scenes.cpp b/engines/mads/nebular/nebular_scenes.cpp index 39a8ed58b4..3a6e6a609f 100644 --- a/engines/mads/nebular/nebular_scenes.cpp +++ b/engines/mads/nebular/nebular_scenes.cpp @@ -63,6 +63,8 @@ SceneLogic *SceneFactory::createScene(MADSEngine *vm) { return new Scene207(vm); case 208: return new Scene208(vm); + case 209: + return new Scene209(vm); // Scene group #8 case 804: diff --git a/engines/mads/nebular/nebular_scenes1.cpp b/engines/mads/nebular/nebular_scenes1.cpp index 652ee99d38..4c3b67f3c5 100644 --- a/engines/mads/nebular/nebular_scenes1.cpp +++ b/engines/mads/nebular/nebular_scenes1.cpp @@ -72,22 +72,22 @@ void Scene1xx::setPlayerSpritesPrefix() { _vm->_sound->command(5); Common::String oldName = _game._player._spritesPrefix; if (_scene->_nextSceneId <= 103 || _scene->_nextSceneId == 111) { - if (_globals[0] == SEX_FEMALE) { + if (_globals[kSexOfRex] == SEX_FEMALE) { _game._player._spritesPrefix = "ROX"; } else { _game._player._spritesPrefix = "RXM"; - _globals[0] = SEX_MALE; + _globals[kSexOfRex] = SEX_MALE; } } else if (_scene->_nextSceneId <= 110) { _game._player._spritesPrefix = "RXSW"; - _globals[0] = SEX_UNKNOWN; + _globals[kSexOfRex] = SEX_UNKNOWN; } else if (_scene->_nextSceneId == 112) { _game._player._spritesPrefix = ""; } if (oldName == _game._player._spritesPrefix) _game._player._spritesChanged = true; - if (_scene->_nextSceneId == 105 || (_scene->_nextSceneId == 109 && _globals[15])) { + if (_scene->_nextSceneId == 105 || (_scene->_nextSceneId == 109 && _globals[kHoovicAlive])) { _game._player._spritesChanged = true; _game._v3 = 0; } @@ -176,7 +176,7 @@ void Scene103::enter() { _globals._spriteIndexes[10], false, 6); } - if (_globals[11]) { + if (_globals[kTurkeyExploded]) { _globals._spriteIndexes[24] = _scene->_sequences.addSpriteCycle( _globals._spriteIndexes[9], false, 6); _scene->_sequences.setAnimRange(_globals._spriteIndexes[24], -2, -2); @@ -362,14 +362,14 @@ void Scene103::actions() { } _game._player._stepEnabled = _game._abortTimers == 2; - _globals[11] = -1; + _globals[kTurkeyExploded] = -1; if (_game._abortTimers == 2) { Dialog::show(1030); _scene->_hotspots.activate(362, false); } } } else if (_action.isAction(VERB_LOOK, 250, 0)) { - Dialog::show(!_globals[11] ? 10323 : 10303); + Dialog::show(!_globals[kTurkeyExploded] ? 10323 : 10303); } else if (_action.isAction(VERB_TALKTO, 27, 0)) { switch (_vm->_game->_abortTimers) { diff --git a/engines/mads/nebular/nebular_scenes2.cpp b/engines/mads/nebular/nebular_scenes2.cpp index 4cec40cd9c..4fc1e3e48d 100644 --- a/engines/mads/nebular/nebular_scenes2.cpp +++ b/engines/mads/nebular/nebular_scenes2.cpp @@ -45,7 +45,7 @@ void Scene2xx::setPlayerSpritesPrefix() { _game._player._spritesPrefix = ""; break; default: - if (_globals[0] != SEX_MALE) { + if (_globals[kSexOfRex] != SEX_MALE) { _game._player._spritesPrefix = "ROX"; } else { _game._player._spritesPrefix = "RXM"; @@ -61,7 +61,7 @@ void Scene2xx::setPlayerSpritesPrefix() { if (oldName != _game._player._spritesPrefix) _game._player._spritesChanged = true; - if ((_scene->_nextSceneId == 203 || _scene->_nextSceneId == 204) && _globals[34]) + if ((_scene->_nextSceneId == 203 || _scene->_nextSceneId == 204) && _globals[kRhotundaStatus]) _game._v3 = 0; _vm->_palette->setEntry(16, 10, 63, 63); @@ -72,7 +72,7 @@ void Scene2xx::sceneEntrySound() { if (_vm->_musicFlag) { switch (_scene->_nextSceneId) { case 201: - if ((_globals[39] == 2) || (_globals[39] == 4) || (_globals[33] != 1)) + if ((_globals[kTeleporterCommand] == 2) || (_globals[kTeleporterCommand] == 4) || (_globals[kMeteorologistStatus] != 1)) _vm->_sound->command(17); else _vm->_sound->command(9); @@ -96,13 +96,13 @@ void Scene2xx::sceneEntrySound() { _vm->_sound->command(11); break; case 210: - if (_globals[44] == 0) + if (_globals[kTwinklesStatus] == 0) _vm->_sound->command(15); else _vm->_sound->command(10); break; case 213: - if (_globals[38] == 0) + if (_globals[kMeteorologistWatch] == 0) _vm->_sound->command(1); else _vm->_sound->command(9); @@ -155,18 +155,18 @@ void Scene201::enter() { _game._player._direction = FACING_SOUTH; } - if (_globals[39] != 0) { + if (_globals[kTeleporterCommand] != 0) { _game._player._visible = false; _game._player._stepEnabled = false; - int sepChar = (_globals[0] == SEX_UNKNOWN) ? 't' : 'u'; + int sepChar = (_globals[kSexOfRex] == SEX_UNKNOWN) ? 't' : 'u'; // Guess values. What is the default value used by the compiler? int suffixNum = -1; int abortTimers = -1; - switch(_globals[39]) { + switch(_globals[kTeleporterCommand]) { case 1: suffixNum = 3; abortTimers = 76; - _globals[41] = -1; + _globals[kTeleporterUnderstood] = -1; break; case 2: suffixNum = 1; @@ -182,12 +182,12 @@ void Scene201::enter() { abortTimers = 78; break; } - _globals[39] = 0; + _globals[kTeleporterCommand] = 0; if (suffixNum >= 0) _scene->loadAnimation(formAnimName(sepChar, suffixNum), abortTimers); } - if ((_scene->_priorSceneId == 202) && (_globals[33] == 1) && !_scene->_roomChanged) { + if ((_scene->_priorSceneId == 202) && (_globals[kMeteorologistStatus] == 1) && !_scene->_roomChanged) { _globals._spriteIndexes[6] = _scene->_sprites.addSprites(formAnimName('a', 0), 0); _globals._spriteIndexes[7] = _scene->_sprites.addSprites(formAnimName('a', 1), 0); _game.loadQuoteSet(90, 91, 0); @@ -204,7 +204,7 @@ void Scene201::enter() { } else _globals._frameTime = 0xFFFF; - if (_globals[41] != 0) + if (_globals[kTeleporterUnderstood] != 0) _scene->_hotspots.activate(438, false); sceneEntrySound(); @@ -261,7 +261,7 @@ void Scene201::step() { } if (_game._abortTimers == 75) { - _globals[37] = 0; + _globals[kMeteorologistEverSeen] = 0; _scene->_nextSceneId = 202; } @@ -272,8 +272,8 @@ void Scene201::step() { } if (_game._abortTimers == 77) { - _globals[39] = 1; - _scene->_nextSceneId = _globals[40]; + _globals[kTeleporterCommand] = 1; + _scene->_nextSceneId = _globals[kTeleporterDestination]; _scene->_reloadSceneFlag = true; } @@ -296,7 +296,7 @@ void Scene201::actions() { } else { _game._player._stepEnabled = false; _game._player._visible = false; - int sepChar = (_globals[0] == SEX_UNKNOWN) ? 't' : 'u'; + int sepChar = (_globals[kSexOfRex] == SEX_UNKNOWN) ? 't' : 'u'; _scene->loadAnimation(formAnimName(sepChar, 0), 1); } } else if (action->isAction(0x3, 0x1A6, 0)) { @@ -318,7 +318,7 @@ void Scene201::actions() { } else if (action->isAction(0x3, 0x83, 0)) { Dialog::show(0x4E8E); } else if (action->isAction(0x3, 0x1B6, 0)) { - if (_globals[37]) + if (_globals[kMeteorologistEverSeen]) Dialog::show(0x4E90); else Dialog::show(0x4E8D); @@ -354,7 +354,7 @@ void Scene202::enter() { _globals._spriteIndexes[6] = _scene->_sprites.addSprites(formAnimName('b', 2), 0); _globals._spriteIndexes[3] = _scene->_sprites.addSprites(formAnimName('x', 0), 0); _globals._spriteIndexes[5] = _scene->_sprites.addSprites(formAnimName('l', -1), 0); - if (_globals[0] != SEX_MALE) { + if (_globals[kSexOfRex] != SEX_MALE) { _globals._spriteIndexes[7] = _scene->_sprites.addSprites("*ROXBD_2"); } else { _globals._spriteIndexes[7] = _scene->_sprites.addSprites("*RXMBD_2"); @@ -370,7 +370,7 @@ void Scene202::enter() { int idx = _scene->_dynamicHotspots.add(320, 13, _globals._spriteIndexes[17], Common::Rect(0, 0, 0, 0)); _scene->_dynamicHotspots.setPosition(idx, 153, 97, FACING_SOUTH); - if (_globals[32] & 1) { + if (_globals[kBone202Status] & 1) { _globals._spriteIndexes[16] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[1], false, 6, 0, 0, 0); _scene->_sequences.setMsgPosition(_globals._spriteIndexes[16], Common::Point(130, 108)); _scene->_sequences.setDepth(_globals._spriteIndexes[16], 10); @@ -378,7 +378,7 @@ void Scene202::enter() { _scene->_dynamicHotspots.setPosition(idx, 132, 97, FACING_SOUTH); } - if (_globals[32] & 2) { + if (_globals[kBone202Status] & 2) { _globals._spriteIndexes[21] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[6], false, 6, 0, 0, 0); _scene->_sequences.setMsgPosition(_globals._spriteIndexes[21], Common::Point(166, 110)); _scene->_sequences.setDepth(_globals._spriteIndexes[21], 10); @@ -386,8 +386,8 @@ void Scene202::enter() { _scene->_dynamicHotspots.setPosition(idx, 165, 99, FACING_SOUTH); } - if (_globals[32]) - _scene->changeDepthSurface(_globals[32]); + if (_globals[kBone202Status]) + _scene->changeDepthSurface(_globals[kBone202Status]); if (_scene->_priorSceneId == 201) { _game._player._playerPos = Common::Point(190, 91); @@ -397,7 +397,7 @@ void Scene202::enter() { _game._player._direction = FACING_NORTH; } - if (_globals[31]) { + if (_globals[kLadderBroken]) { _globals._spriteIndexes[20] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[5], false, 6, 0, 0, 0); _scene->_sequences.setDepth(_globals._spriteIndexes[20], 6); _scene->_hotspots.activate(199, false); @@ -423,15 +423,15 @@ void Scene202::enter() { if (_scene->_roomChanged) _game._objects.addToInventory(OBJ_NONE); - if (_globals[38]) { + if (_globals[kMeteorologistWatch]) { _game._player._visible = false; _game._player._stepEnabled = false; - if (_globals[38] == 2) + if (_globals[kMeteorologistWatch] == 2) _globals._v4 = 1; else _globals._v4 = 0; - if (_globals[38] < 1) + if (_globals[kMeteorologistWatch] < 1) _globals._spriteIndexes[25] = _scene->_sequences.startCycle(_globals._spriteIndexes[9], false, 6); else _globals._spriteIndexes[25] = _scene->_sequences.startCycle(_globals._spriteIndexes[9], false, 8); @@ -441,7 +441,7 @@ void Scene202::enter() { _scene->_sequences.setMsgPosition(_globals._spriteIndexes[25], Common::Point(247, 82)); _game._player._playerPos = Common::Point(246, 124); _game._player._direction = FACING_NORTH; - _globals[41] = -1; + _globals[kTeleporterUnderstood] = -1; } else { _scene->_sequences.setMsgPosition(_globals._spriteIndexes[25], Common::Point(172, 123)); _game._player._playerPos = Common::Point(171, 122); @@ -496,7 +496,7 @@ void Scene202::step() { int msgIndex = _scene->_kernelMessages.add(msgPos, 0x1110, msgFlag | 32, 0, 120, _game.getQuote(102)); _scene->_kernelMessages.setQuoted(msgIndex, 4, true); - if (_globals[38] == 1) { + if (_globals[kMeteorologistWatch] == 1) { MADSAction *action = _game._player._action; action->_activeAction._verbId = 3; action->_activeAction._objectNameId = 39; @@ -504,10 +504,10 @@ void Scene202::step() { _game._abortTimersMode2 = ABORTMODE_0; _scene->_sequences.addTimer(120, 2); _globals._abortVal = -1; - } else if (_globals[38] == 2) { + } else if (_globals[kMeteorologistWatch] == 2) { _scene->_sequences.addTimer(120, 90); } - _globals[38] = 0; + _globals[kMeteorologistWatch] = 0; } switch (_game._abortTimers) { @@ -536,7 +536,7 @@ void Scene202::step() { } break; case 93: { - _globals[31] = -1; + _globals[kLadderBroken] = -1; _globals._spriteIndexes[20] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[5], false, 6, 0, 0, 0); _scene->_hotspots.activate(199, false); int idx = _scene->_dynamicHotspots.add(457, 13, _globals._spriteIndexes[20], Common::Rect(0, 0, 0, 0)); @@ -554,19 +554,19 @@ void Scene202::step() { break; } - if (!_scene->_activeAnimation && (_globals[33] != 2) && (_globals._v7 <= _scene->_frameStartTime) && (_globals._v8425C <= _scene->_frameStartTime)) { + if (!_scene->_activeAnimation && (_globals[kMeteorologistStatus] != 2) && (_globals._v7 <= _scene->_frameStartTime) && (_globals._v8425C <= _scene->_frameStartTime)) { int randVal = _vm->getRandomNumber(1, 500); int threshold = 1; if (_globals._v4) threshold = 26; - if (!_globals[37]) + if (!_globals[kMeteorologistEverSeen]) threshold = 25; if (threshold >= randVal) { _vm->_sound->command(17); _scene->loadAnimation(formAnimName('M', -1), 71); _globals._v84266 = -1; _globals._v84268 = 0; - _globals[37] = true; + _globals[kMeteorologistEverSeen] = true; _globals._v6 = _scene->_frameStartTime; _globals._v8 = 0; _globals._v84262 = 0; @@ -580,7 +580,7 @@ void Scene202::step() { if (_globals._v5) { if (_scene->_activeAnimation->getCurrentFrame() >= 200) { - if ((_globals[38] == 2) || _globals[31]) { + if ((_globals[kMeteorologistWatch] == 2) || _globals[kLadderBroken]) { _scene->_nextSceneId = 213; } else { Dialog::show(0x4EE9); @@ -761,11 +761,11 @@ void Scene202::actions() { } else if (action->isAction(0x18C, 0x83, 0)) { _scene->_nextSceneId = 203; } else if (action->isAction(0x18C, 0x82, 0)) { - if (_globals[33] != 2) { + if (_globals[kMeteorologistStatus] != 2) { if (_scene->_activeAnimation) - _globals[33] = 1; + _globals[kMeteorologistStatus] = 1; else - _globals[33] = 0; + _globals[kMeteorologistStatus] = 0; } _scene->_nextSceneId = 201; } else if (action->isAction(0x4, 0x2C, 0)) { @@ -784,10 +784,10 @@ void Scene202::actions() { } else if (_game._abortTimers == 1) { if ((_game._player._playerPos.x == 132) && (_game._player._playerPos.y == 97)) { _scene->_sequences.remove(_globals._spriteIndexes[16]); - _globals[32] |= 1; + _globals[kBone202Status] |= 1; } else { _scene->_sequences.remove(_globals._spriteIndexes[21]); - _globals[32] |= 2; + _globals[kBone202Status] |= 2; } } else if (_game._abortTimers == 2) { if (_game._objects.isInInventory(OBJ_BONE)) { @@ -798,7 +798,7 @@ void Scene202::actions() { _game._objects.addToInventory(OBJ_BONE); _vm->_dialogs->showPicture(OBJ_BONE, 0x4EFA, 0); } - _scene->changeDepthSurface(_globals[32]); + _scene->changeDepthSurface(_globals[kBone202Status]); _game._player._stepEnabled = true; _game._player._visible = true; } else { @@ -806,7 +806,7 @@ void Scene202::actions() { return; } } - } else if ((action->isAction(0x50, 0xC7, 0)) && (_globals[31] == 0)) { + } else if ((action->isAction(0x50, 0xC7, 0)) && (_globals[kLadderBroken] == 0)) { if (_game._abortTimers == 0) { _vm->_sound->command(29); _globals._v8425C = _scene->_frameStartTime; @@ -832,7 +832,7 @@ void Scene202::actions() { action->_inProgress = false; return; } - } else if (((action->isAction(0x3, 0x27, 0x82)) || (action->isAction(0x3, 0x27, 0x1B6))) && (_globals[0] == SEX_MALE)) { + } else if (((action->isAction(0x3, 0x27, 0x82)) || (action->isAction(0x3, 0x27, 0x1B6))) && (_globals[kSexOfRex] == SEX_MALE)) { if (_globals._v4 == 0) { if (_game._abortTimers == 0) { _game._player._stepEnabled = false; @@ -849,7 +849,7 @@ void Scene202::actions() { _scene->_sequences.setMsgPosition(_globals._spriteIndexes[25], Common::Point(172, 123)); if (_scene->_activeAnimation) { _globals._v5 = -1; - _globals[38] = 1; + _globals[kMeteorologistWatch] = 1; } else { _scene->_sequences.addTimer(120, 2); } @@ -889,7 +889,7 @@ void Scene202::actions() { _scene->_sequences.addTimer(120, 2); } else { _globals._v5 = -1; - _globals[38] = 2; + _globals[kMeteorologistWatch] = 2; if ((_scene->_activeAnimation->getCurrentFrame() >= 44) && (_scene->_activeAnimation->getCurrentFrame() <= 75)) { _scene->_kernelMessages.reset(); int msgIndex = _scene->_kernelMessages.add(Common::Point(248, 15), 0x1110, 32, 0, 60, _game.getQuote(100)); @@ -930,9 +930,9 @@ void Scene202::actions() { } else if (action->isAction(0x3, 0x19C, 0)) { Dialog::show(0x4EEC); } else if (action->isAction(0x3, 0x82, 0)) { - if ((_globals[33] == 0) || (_globals[33] == 2)) { + if ((_globals[kMeteorologistStatus] == 0) || (_globals[kMeteorologistStatus] == 2)) { Dialog::show(0x4EED); - } else if (_globals[33] == 1) { + } else if (_globals[kMeteorologistStatus] == 1) { Dialog::show(0x4EFC); } else { action->_inProgress = false; @@ -998,7 +998,7 @@ void Scene203::enter() { _globals._v0 = 0; _globals._frameTime = 0; - if ((_globals[34] == 0) && (_scene->_roomChanged == 0)) { + if ((_globals[kRhotundaStatus] == 0) && (_scene->_roomChanged == 0)) { _globals._v0 = -1; _game._player.startWalking(Common::Point(158, 135), FACING_SOUTH); int idx = _scene->_dynamicHotspots.add(131, 396, 0, Common::Rect(0, 0, 320, 156)); @@ -1105,7 +1105,7 @@ void Scene205::enter() { _globals._spriteIndexes[4] = _scene->_sprites.addSprites(formAnimName('c', -1), 0); _globals._spriteIndexes[6] = _scene->_sprites.addSprites(formAnimName('p', -1), 0); - if (_globals[0] == SEX_MALE) + if (_globals[kSexOfRex] == SEX_MALE) _globals._spriteIndexes[8] = _scene->_sprites.addSprites(formAnimName('a', 1), 0); _globals._spriteIndexes[16] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[1], false, 10, 0, 0, 3); @@ -1152,13 +1152,13 @@ void Scene205::enter() { _globals._v0 = _globals._frameTime & 0xFFFF; _globals._frameTime >>= 16; - if (_globals[0] == SEX_FEMALE) + if (_globals[kSexOfRex] == SEX_FEMALE) warning("sub71704(0x3, 0xC3, 0x108, 0x63, 0x86, 0xD, 2, 0xFDFC, 0x3C, 0x6C, 0x6C, 0x6D, 0x6D, 0x6E, 0x6E, 0x6F, 0x6C, 0);"); if (_scene->_priorSceneId != -2) _game._player._playerPos = Common::Point(99, 152); - if (_globals[0] != SEX_MALE) { + if (_globals[kSexOfRex] != SEX_MALE) { _scene->loadAnimation(formAnimName('a', -1), 0); _scene->_activeAnimation->_resetFlag = false; } else { @@ -1400,7 +1400,7 @@ void Scene208::enter() { _game.loadQuoteSet(0x81, 0x46, 0); - if ((_scene->_priorSceneId == 207) && (_globals[36] == 1)) { + if ((_scene->_priorSceneId == 207) && (_globals[kMonkeyStatus] == 1)) { int msgIndex = _scene->_kernelMessages.add(Common::Point(0, 0), 0x1110, 34, 0, 120, _game.getQuote(129)); _scene->_kernelMessages.setQuoted(msgIndex, 4, true); } @@ -1440,7 +1440,7 @@ void Scene208::step() { if (_game._abortTimers & 0xFF) { if ((_game._abortTimers & 0xFF) == 81) { _scene->_sequences.remove(_globals._spriteIndexes[15]); - _globals[34] = 1; + _globals[kRhotundaStatus] = 1; warning("TODO: sub34648(...)"); _scene->_sequences.addTimer(90, 82); } @@ -1462,7 +1462,7 @@ void Scene208::preActions() { void Scene208::actions() { if (_action.isAction(0x18C, 0x19F, 0)) { - if (_globals[34]) + if (_globals[kRhotundaStatus]) _scene->_nextSceneId = 203; else if (_game._abortTimers == 0) { _game._player._stepEnabled = false; @@ -1473,11 +1473,11 @@ void Scene208::actions() { } } else if (_action.isAction(0x18C, 0x83, 0)) { _scene->_nextSceneId = 212; - } else if (_action.isAction(0x4, 0x1AA, 0) && (!_globals[35] || _game._abortTimers)) { + } else if (_action.isAction(0x4, 0x1AA, 0) && (!_globals[kLeavesStatus] || _game._abortTimers)) { warning("TODO: sub3B282(1);"); if (_game._player._stepEnabled) _vm->_dialogs->showPicture(OBJ_BIG_LEAVES, 0x326, 0); - } else if (_action.isAction(0x7, 0x23, 0x19E) && (_globals[35] == 1 || _game._abortTimers)) { + } else if (_action.isAction(0x7, 0x23, 0x19E) && (_globals[kLeavesStatus] == 1 || _game._abortTimers)) { warning("TODO: sub3B282(2);"); } else if (_action.isAction(0x7, 0x17A, 0x1A9)) { warning("TODO: sub3B282(3);"); @@ -1529,9 +1529,9 @@ void Scene208::actions() { Dialog::show(0x5150); } else if (_action._savedFields._lookFlag == 0) { return; - } else if (_globals[34] == 1) { + } else if (_globals[kRhotundaStatus] == 1) { Dialog::show(0x5153); - } else if (_globals[35] == 2) { + } else if (_globals[kLeavesStatus] == 2) { Dialog::show(0x5152); } else { Dialog::show(0x5151); @@ -1542,5 +1542,23 @@ void Scene208::actions() { /*****************************************************************************/ +void Scene209::setup() { + setPlayerSpritesPrefix(); + setAAName(); + _scene->addActiveVocab(0x10F); +} + +void Scene209::enter() { +} + +void Scene209::step() { +} + +void Scene209::preActions() { +} + +void Scene209::actions() { +} + } // End of namespace Nebular } // End of namespace MADS diff --git a/engines/mads/nebular/nebular_scenes2.h b/engines/mads/nebular/nebular_scenes2.h index 7a5af6ff41..a23ae98b36 100644 --- a/engines/mads/nebular/nebular_scenes2.h +++ b/engines/mads/nebular/nebular_scenes2.h @@ -123,6 +123,17 @@ public: virtual void postActions() {}; }; +class Scene209: public Scene2xx { +public: + Scene209(MADSEngine *vm) : Scene2xx(vm) {} + virtual void setup(); + virtual void enter(); + virtual void step(); + virtual void preActions(); + virtual void actions(); + virtual void postActions() {}; +}; + } // End of namespace Nebular } // End of namespace MADS diff --git a/engines/mads/nebular/nebular_scenes8.cpp b/engines/mads/nebular/nebular_scenes8.cpp index 920467f610..b802c3e3e4 100644 --- a/engines/mads/nebular/nebular_scenes8.cpp +++ b/engines/mads/nebular/nebular_scenes8.cpp @@ -32,12 +32,12 @@ namespace Nebular { void Scene8xx::setup1() { _vm->_sound->command(5); - if ((_globals[178] && !_globals[179]) || + if ((_globals[kFromCockpit] && !_globals[kExitShip]) || _scene->_nextSceneId == 804 || _scene->_nextSceneId == 805 || _scene->_nextSceneId == 808 || _scene->_nextSceneId == 810) { _game._player._spritesPrefix = ""; } else { - _game._player._spritesPrefix = _globals[0] == SEX_FEMALE ? "ROX" : "RXM"; + _game._player._spritesPrefix = _globals[kSexOfRex] == SEX_FEMALE ? "ROX" : "RXM"; } _vm->_palette->setEntry(16, 0x0A, 0x3F, 0x3F); @@ -88,10 +88,10 @@ void Scene804::enter() { _globals._v6 = 0; _globals._v7 = 0; _globals._v8 = 0; - if (_globals[5]) { + if (_globals[kCopyProtectFailed]) { // Copy protection failed - _globals[165] = -1; - _globals[164] = 0; + _globals[kinSpace] = -1; + _globals[kWindowFixed] = 0; } _globals._spriteIndexes[4] = _scene->_sprites.addSprites(formAnimName('x', 0)); @@ -103,8 +103,8 @@ void Scene804::enter() { _game.loadQuoteSet(791, 0); - if (_globals[165]) { - if (_globals[164]) { + if (_globals[kinSpace]) { + if (_globals[kWindowFixed]) { _globals._spriteIndexes[20] = _scene->_sequences.startCycle( _globals._spriteIndexes[5], 0, 1); _scene->_sequences.addTimer(60, 100); @@ -117,12 +117,12 @@ void Scene804::enter() { _game._player._stepEnabled = false; } } else { - if (_globals[167] == 0) { + if (_globals[kBeamIsUp] == 0) { _globals._spriteIndexes[23] = _scene->_sequences.startCycle( _globals._spriteIndexes[8], false, 1); } - if (_globals[164] == 0) { + if (_globals[kWindowFixed] == 0) { _globals._spriteIndexes[23] = _scene->_sequences.startCycle( _globals._spriteIndexes[19], false, 1); } @@ -137,7 +137,7 @@ void Scene804::enter() { Scene8xx::enter1(); - if (_globals[165] && !_globals[164]) { + if (_globals[kinSpace] && !_globals[kWindowFixed]) { _scene->_userInterface.setup(2); _vm->_sound->command(19); } @@ -191,9 +191,9 @@ void Scene804::step() { if (_scene->_activeAnimation->getCurrentFrame() == 81) { _globals._v5 = 80; } else { - _globals[165] = 0; - _globals[167] = -1; - assert(!_globals[5]); + _globals[kinSpace] = 0; + _globals[kBeamIsUp] = -1; + assert(!_globals[kCopyProtectFailed]); _game._winStatus = 4; _vm->quitGame(); } @@ -203,9 +203,9 @@ void Scene804::step() { if (_scene->_activeAnimation->getCurrentFrame() == 68) { _globals._v5 = 66; } else { - _globals[165] = 0; - _globals[167] = -1; - assert(!_globals[5]); + _globals[kinSpace] = 0; + _globals[kBeamIsUp] = -1; + assert(!_globals[kCopyProtectFailed]); _game._winStatus = 4; _vm->quitGame(); } @@ -225,10 +225,10 @@ void Scene804::step() { if (_game._abortTimers == 80) _scene->_nextSceneId = 803; - if (_scene->_activeAnimation->getCurrentFrame() == 7 && !_globals[164]) { + if (_scene->_activeAnimation->getCurrentFrame() == 7 && !_globals[kWindowFixed]) { _globals._spriteIndexes[19] = _scene->_sequences.startCycle(_globals._spriteIndexes[4], false, 1); _scene->_sequences.addTimer(20, 110); - _globals[164] = -1; + _globals[kWindowFixed] = -1; } if (_scene->_activeAnimation->getCurrentFrame() == 10) { @@ -239,6 +239,7 @@ void Scene804::step() { switch (_scene->_activeAnimation->getCurrentFrame()) { case 1: + // CHECKME: GlobalID not in enum _globals[29] = _vm->getRandomNumber(1, 30); switch (_globals[29]) { case 1: |