diff options
author | Filippos Karapetis | 2014-05-10 13:22:45 +0300 |
---|---|---|
committer | Filippos Karapetis | 2014-05-10 13:24:36 +0300 |
commit | 600a715661333565e8546dfcafabf5e1da95d340 (patch) | |
tree | a07a3d2306539cac54852e7e143600a4aa8e86b2 | |
parent | 9b79267bd7adc1eeaec105d378b146a1402c607f (diff) | |
download | scummvm-rg350-600a715661333565e8546dfcafabf5e1da95d340.tar.gz scummvm-rg350-600a715661333565e8546dfcafabf5e1da95d340.tar.bz2 scummvm-rg350-600a715661333565e8546dfcafabf5e1da95d340.zip |
MADS: Split verbs from nouns
-rw-r--r-- | engines/mads/dragonsphere/dragonsphere_scenes.h | 2 | ||||
-rw-r--r-- | engines/mads/nebular/game_nebular.cpp | 30 | ||||
-rw-r--r-- | engines/mads/nebular/nebular_scenes.h | 45 | ||||
-rw-r--r-- | engines/mads/nebular/nebular_scenes1.cpp | 2 | ||||
-rw-r--r-- | engines/mads/nebular/nebular_scenes2.cpp | 21 | ||||
-rw-r--r-- | engines/mads/nebular/nebular_scenes7.cpp | 7 | ||||
-rw-r--r-- | engines/mads/phantom/phantom_scenes.h | 2 | ||||
-rw-r--r-- | engines/mads/scene.cpp | 2 |
8 files changed, 53 insertions, 58 deletions
diff --git a/engines/mads/dragonsphere/dragonsphere_scenes.h b/engines/mads/dragonsphere/dragonsphere_scenes.h index 8ce1492208..d6af608b19 100644 --- a/engines/mads/dragonsphere/dragonsphere_scenes.h +++ b/engines/mads/dragonsphere/dragonsphere_scenes.h @@ -35,7 +35,7 @@ namespace MADS { namespace Dragonsphere { enum Noun { - NOUN_LOOK_AT = 0x0D1 + VERB_LOOK_AT = 0x0D1 // TODO }; diff --git a/engines/mads/nebular/game_nebular.cpp b/engines/mads/nebular/game_nebular.cpp index 86435c655f..600c153088 100644 --- a/engines/mads/nebular/game_nebular.cpp +++ b/engines/mads/nebular/game_nebular.cpp @@ -284,17 +284,17 @@ void GameNebular::doObjectAction() { Dialogs &dialogs = *_vm->_dialogs; int id; - if (action.isAction(NOUN_SMELL) && scene._currentSceneId > 103 && scene._currentSceneId < 111) { + if (action.isAction(VERB_SMELL) && scene._currentSceneId > 103 && scene._currentSceneId < 111) { dialogs.show(440); - } else if (action.isAction(NOUN_EAT) && scene._currentSceneId > 103 && scene._currentSceneId < 111) { + } else if (action.isAction(VERB_EAT) && scene._currentSceneId > 103 && scene._currentSceneId < 111) { dialogs.show(441); - } else if (action.isAction(NOUN_SMELL, NOUN_BURGER)) { + } else if (action.isAction(VERB_SMELL, NOUN_BURGER)) { dialogs.show(442); - } else if (action.isAction(NOUN_EAT, NOUN_BURGER)) { + } else if (action.isAction(VERB_EAT, NOUN_BURGER)) { dialogs.show(443); - } else if (action.isAction(NOUN_SMELL, NOUN_STUFFED_FISH)) { + } else if (action.isAction(VERB_SMELL, NOUN_STUFFED_FISH)) { dialogs.show(444); - } else if (action.isAction(NOUN_EAT, NOUN_STUFFED_FISH)) { + } else if (action.isAction(VERB_EAT, NOUN_STUFFED_FISH)) { dialogs.show(445); } else if (action.isAction(401, 289)) { dialogs.show(scene._currentSceneId > 103 && scene._currentSceneId < 111 ? 446 : 447); @@ -304,7 +304,7 @@ void GameNebular::doObjectAction() { dialogs.show(449); } else if (action.isAction(203, 276)) { dialogs.show(450); - } else if (action.isAction(NOUN_EAT, 378)) { + } else if (action.isAction(VERB_EAT, 378)) { _objects.setRoom(OBJ_TWINKIFRUIT, PLAYER_INVENTORY); dialogs.show(451); } else if (action.isAction(153, 378)) { @@ -342,13 +342,13 @@ void GameNebular::doObjectAction() { dialogs.show(466); } else if (action.isAction(530, 288)) { dialogs.show(467); - } else if (action.isAction(NOUN_EAT, 74)) { + } else if (action.isAction(VERB_EAT, 74)) { dialogs.show(469); } else if (action.isAction(50, 381)) { dialogs.show(471); } else if (action.isAction(307, 950)) { dialogs.show(472); - } else if (action.isAction(NOUN_READ, NOUN_LOG)) { + } else if (action.isAction(VERB_READ, NOUN_LOG)) { dialogs.show(473); } else if (action.isAction(1189, 43)) { dialogs.show(474); @@ -371,12 +371,12 @@ void GameNebular::doObjectAction() { dialogs.show(434); } else if (action.isAction(1196)) { dialogs.show(479); - } else if ((action.isAction(287) || action.isAction(NOUN_LOOK_AT) || action.isAction(VERB_LOOK)) && + } else if ((action.isAction(287) || action.isAction(VERB_LOOK_AT) || action.isAction(VERB_LOOK)) && action.isAction(936) && _objects.isInInventory(OBJ_NOTE)) { _objects.setRoom(OBJ_NOTE, PLAYER_INVENTORY); _objects.addToInventory(OBJ_COMBINATION); dialogs.showItem(OBJ_COMBINATION, 851); - } else if ((action.isAction(VERB_LOOK) || action.isAction(NOUN_READ)) && + } else if ((action.isAction(VERB_LOOK) || action.isAction(VERB_READ)) && ((id = _objects.getIdFromDesc(action._activeAction._objectNameId)) > 0 || (action._activeAction._indirectObjectId > 0 && (id = _objects.getIdFromDesc(action._activeAction._indirectObjectId))))) { @@ -574,13 +574,13 @@ void GameNebular::unhandledAction() { _vm->_dialogs->show(0x2A); else if (action.isAction(0x6C)) _vm->_dialogs->show(0x1B3); - else if ((action.isAction(NOUN_EAT, NOUN_DEAD_FISH) || action.isAction(NOUN_EAT, NOUN_STUFFED_FISH)) && _vm->_game->_objects.isInInventory(_vm->_game->_objects.getIdFromDesc(action._activeAction._objectNameId))) + else if ((action.isAction(VERB_EAT, NOUN_DEAD_FISH) || action.isAction(VERB_EAT, NOUN_STUFFED_FISH)) && _vm->_game->_objects.isInInventory(_vm->_game->_objects.getIdFromDesc(action._activeAction._objectNameId))) _vm->_dialogs->show(0xC); - else if ((action.isAction(NOUN_SMELL, NOUN_DEAD_FISH) || action.isAction(NOUN_SMELL, NOUN_STUFFED_FISH)) && _vm->_game->_objects.isInInventory(_vm->_game->_objects.getIdFromDesc(action._activeAction._objectNameId))) + else if ((action.isAction(VERB_SMELL, NOUN_DEAD_FISH) || action.isAction(VERB_SMELL, NOUN_STUFFED_FISH)) && _vm->_game->_objects.isInInventory(_vm->_game->_objects.getIdFromDesc(action._activeAction._objectNameId))) _vm->_dialogs->show(0xD); - else if (action.isAction(NOUN_EAT, NOUN_CHICKEN) && _vm->_game->_objects.isInInventory(OBJ_CHICKEN)) + else if (action.isAction(VERB_EAT, NOUN_CHICKEN) && _vm->_game->_objects.isInInventory(OBJ_CHICKEN)) _vm->_dialogs->show(0x390); - else if ((action.isAction(NOUN_SHOOT) || action.isAction(NOUN_HOSE_DOWN)) && action.isAction(NOUN_BLOWGUN)) { + else if ((action.isAction(VERB_SHOOT) || action.isAction(VERB_HOSE_DOWN)) && action.isAction(NOUN_BLOWGUN)) { if ((_scene._currentSceneId >= 104) && (_scene._currentSceneId <= 111)) _vm->_dialogs->show(0x26); else if (action.isAction(0x10D)) diff --git a/engines/mads/nebular/nebular_scenes.h b/engines/mads/nebular/nebular_scenes.h index 2f9dff706d..3534613431 100644 --- a/engines/mads/nebular/nebular_scenes.h +++ b/engines/mads/nebular/nebular_scenes.h @@ -38,6 +38,32 @@ enum { SEX_MALE = 0, SEX_UNKNOWN = 1, SEX_FEMALE = 2 }; +enum Verb { + VERB_CLIMB_DOWN = 0x04E, + VERB_EAT = 0x075, + VERB_EXAMINE = 0x07D, + VERB_HOSE_DOWN = 0x0A6, + VERB_IGNITE = 0x0B4, + VERB_INFLATE = 0x0B5, + VERB_INSERT = 0x0B6, + VERB_INSPECT = 0x0B7, + VERB_HURL = 0x0A9, + VERB_LOOK_AT = 0x0D1, + VERB_LOOK_IN = 0x0D2, + VERB_LOOK_THROUGH = 0x0D3, + VERB_PEER_THROUGH = 0x103, + VERB_READ = 0x11F, + VERB_SHOOT = 0x13A, + VERB_SIT_IN = 0x13F, + VERB_SMELL = 0x147, + VERB_WALK_THROUGH = 0x18B, + VERB_WALK_TOWARDS = 0x18C, + VERB_WALK_DOWN = 0x1AD, + VERB_CLIMB_INTO = 0x2F7, + VERB_STEP_INTO = 0x2F9, + VERB_WALK_ALONG = 0x312, +}; + enum Noun { NOUN_BIG_LEAVES = 0x23, NOUN_BLOWGUN = 0x29, @@ -51,50 +77,34 @@ enum Noun { NOUN_CHICKEN_BOMB = 0x4A, NOUN_DEAD_FISH = 0x65, NOUN_DOOR = 0x6E, - NOUN_EAT = 0x75, - NOUN_EXAMINE = 0x7D, + NOUN_FISHING_LINE = 0x87, NOUN_FRONT_WINDOW = 0x8E, NOUN_FUZZY_DICE = 0x91, - NOUN_HOSE_DOWN = 0x0A6, NOUN_HOTPANTS = 0x0A7, NOUN_HULL = 0x0A8, - NOUN_HURL = 0x0A9, NOUN_ID_CARD = 0x0B3, - NOUN_IGNITE = 0x0B4, - NOUN_INFLATE = 0x0B5, - NOUN_INSERT = 0x0B6, - NOUN_INSPECT = 0x0B7, NOUN_JUNGLE = 0x0B8, NOUN_LADDER = 0x0C7, NOUN_LIFE_SUPPORT_SECTION = 0x0CC, NOUN_LOG = 0x0D0, - NOUN_LOOK_AT = 0x0D1, - NOUN_LOOK_IN = 0x0D2, - NOUN_LOOK_THROUGH = 0x0D3, NOUN_MONKEY = 0x0E3, NOUN_OUTER_HULL = 0x0F8, NOUN_OUTSIDE = 0x0F9, - NOUN_PEER_THROUGH = 0x103, NOUN_PIRANHA = 0x10D, NOUN_PLANT_STALK = 0x10F, - NOUN_READ = 0x11F, NOUN_REFRIDGERATOR = 0x122, NOUN_ROBO_KITCHEN = 0x127, NOUN_ROCK = 0x128, NOUN_SHIELD_ACCESS_PANEL = 0x135, NOUN_SHIELD_MODULATOR = 0x137, - NOUN_SHOOT = 0x13A, - NOUN_SIT_IN = 0x13F, NOUN_SKULL = 0x140, NOUN_TELEPORTER = 0x16C, NOUN_BROKEN_LADDER = 0x1C9, - NOUN_SMELL = 0x147, NOUN_STUFFED_FISH = 0x157, NOUN_15F = 0x15F, NOUN_TIMEBOMB = 0x171, NOUN_TWINKIFRUIT = 0x17A, NOUN_VIEW_SCREEN = 0x180, - NOUN_WALK_THROUGH = 0x18B, NOUN_DEEP_PIT = 0x19E, NOUN_HUGE_LEGS = 0x1A8, NOUN_LEAF_COVERED_PIT = 0x1A9, @@ -105,6 +115,7 @@ enum Noun { NOUN_ALCOHOL = 0x310, NOUN_SUBMERGED_CITY = 0x313, NOUN_LASER_BEAM = 0x343, + NOUN_BOAT = 0x345, NOUN_CEMENT_BLOCK = 0x38E, NOUN_CITY = 0x38F, NOUN_DOLLOP = 0x3AC, diff --git a/engines/mads/nebular/nebular_scenes1.cpp b/engines/mads/nebular/nebular_scenes1.cpp index c202fe1f80..f317b2832d 100644 --- a/engines/mads/nebular/nebular_scenes1.cpp +++ b/engines/mads/nebular/nebular_scenes1.cpp @@ -1346,7 +1346,7 @@ void Scene103::step() { void Scene103::actions() { if (_action._savedFields._lookFlag) { _vm->_dialogs->show(10322); - } else if (_action.isAction(NOUN_WALK_THROUGH, NOUN_DOOR)) { + } else if (_action.isAction(VERB_WALK_THROUGH, NOUN_DOOR)) { switch (_vm->_game->_trigger) { case 0: _globals._sequenceIndexes[6] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[6], false, 6, 1); diff --git a/engines/mads/nebular/nebular_scenes2.cpp b/engines/mads/nebular/nebular_scenes2.cpp index 2bb24be18b..e4c09fa72b 100644 --- a/engines/mads/nebular/nebular_scenes2.cpp +++ b/engines/mads/nebular/nebular_scenes2.cpp @@ -30,15 +30,6 @@ namespace MADS { namespace Nebular { -// Scene 2xx verbs -enum { - VERB_WALK_THROUGH = 0x18B, - VERB_WALK_TOWARDS = 0x18C, - VERB_WALK_DOWN = 0x1AD, - - VERB_CLIMB_DOWN = 0x4E -}; - void Scene2xx::setAAName() { int idx = (_scene->_nextSceneId == 216) ? 4 : 2; _game._aaName = Resources::formatAAName(idx); @@ -3086,14 +3077,14 @@ void Scene209::step() { case 234: _scene->_sequences.remove(_globals._sequenceIndexes[2]); _scene->_kernelMessages.reset(); - if (_action.isAction(NOUN_HOSE_DOWN, NOUN_BLOWGUN, NOUN_MONKEY)) { + if (_action.isAction(VERB_HOSE_DOWN, NOUN_BLOWGUN, NOUN_MONKEY)) { _globals._sequenceIndexes[2] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[2], false, 7, 16, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], 11, 12); _scene->_sequences.setMsgPosition(_globals._sequenceIndexes[2], Common::Point(116, 131)); _scene->_sequences.setDepth(_globals._sequenceIndexes[2], 4); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_SPRITE, 12, 239); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_EXPIRE, 0, 235); - } else if (_action.isAction(NOUN_SHOOT, NOUN_BLOWGUN, NOUN_MONKEY)) { + } else if (_action.isAction(VERB_SHOOT, NOUN_BLOWGUN, NOUN_MONKEY)) { _globals._sequenceIndexes[2] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[2], false, 8, 1, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], 11, 12); _scene->_sequences.setMsgPosition(_globals._sequenceIndexes[2], Common::Point(116, 131)); @@ -3169,7 +3160,7 @@ void Scene209::preActions() { _game._player._walkOffScreenSceneId = 208; if (_globals[kMonkeyStatus] == 1) { - if ((_action.isAction(NOUN_SHOOT) || _action.isAction(NOUN_HOSE_DOWN)) && _action.isTarget(NOUN_MONKEY) + if ((_action.isAction(VERB_SHOOT) || _action.isAction(VERB_HOSE_DOWN)) && _action.isTarget(NOUN_MONKEY) && _action.isObject(NOUN_BLOWGUN) && _game._objects.isInInventory(OBJ_BLOWGUN) && _game._objects.isInInventory(OBJ_POISON_DARTS)) { _game._player._prepareWalkPos = Common::Point(111, 129); _game._player._prepareWalkFacing = FACING_NORTHEAST; @@ -3306,9 +3297,9 @@ void Scene209::actions() { } if (_globals[kMonkeyStatus] == 1) { - if ((_action.isAction(NOUN_SHOOT) || _action.isAction(NOUN_HOSE_DOWN)) && _action.isAction(NOUN_MONKEY) + if ((_action.isAction(VERB_SHOOT) || _action.isAction(VERB_HOSE_DOWN)) && _action.isAction(NOUN_MONKEY) && _action.isAction(NOUN_BLOWGUN) && _game._objects.isInInventory(OBJ_BLOWGUN) && _game._objects.isInInventory(OBJ_POISON_DARTS)) { - if (_action.isAction(NOUN_SHOOT, NOUN_BLOWGUN, NOUN_MONKEY) && !_startShootingInTimerFl) { + if (_action.isAction(VERB_SHOOT, NOUN_BLOWGUN, NOUN_MONKEY) && !_startShootingInTimerFl) { _game._triggerSetupMode = SEQUENCE_TRIGGER_DAEMON; _scene->_sequences.addTimer(1, 231); _startShootingInTimerFl = true; @@ -3318,7 +3309,7 @@ void Scene209::actions() { return; } - if (_action.isAction(NOUN_HOSE_DOWN, NOUN_BLOWGUN, NOUN_MONKEY) && !_startShootingInTimerFl) { + if (_action.isAction(VERB_HOSE_DOWN, NOUN_BLOWGUN, NOUN_MONKEY) && !_startShootingInTimerFl) { _game._triggerSetupMode = SEQUENCE_TRIGGER_DAEMON; _scene->_sequences.addTimer(1, 228); _game._player._stepEnabled = false; diff --git a/engines/mads/nebular/nebular_scenes7.cpp b/engines/mads/nebular/nebular_scenes7.cpp index 476b13223f..3e6847135c 100644 --- a/engines/mads/nebular/nebular_scenes7.cpp +++ b/engines/mads/nebular/nebular_scenes7.cpp @@ -30,13 +30,6 @@ namespace MADS { namespace Nebular { -// Scene 7xx verbs -enum { - VERB_LOOK_AT = 0xD1, - VERB_WALK_ALONG = 0x312, - VERB_STEP_INTO = 0x2F9 -}; - void Scene7xx::setAAName() { _game._aaName = Resources::formatAAName(5); } diff --git a/engines/mads/phantom/phantom_scenes.h b/engines/mads/phantom/phantom_scenes.h index 986934fe62..d93ccfccc5 100644 --- a/engines/mads/phantom/phantom_scenes.h +++ b/engines/mads/phantom/phantom_scenes.h @@ -35,7 +35,7 @@ namespace MADS { namespace Phantom { enum Noun { - NOUN_LOOK_AT = 0x0D1 + VERB_LOOK_AT = 0x0D1 // TODO }; diff --git a/engines/mads/scene.cpp b/engines/mads/scene.cpp index 32956e6484..601acc5ec6 100644 --- a/engines/mads/scene.cpp +++ b/engines/mads/scene.cpp @@ -369,7 +369,7 @@ void Scene::doFrame() { if (_action._selectedAction && player._stepEnabled && !player._needToWalk && !_vm->_game->_trigger && !player._trigger) { _action.startAction(); - if (_action._activeAction._verbId == Nebular::NOUN_LOOK_AT) { + if (_action._activeAction._verbId == Nebular::VERB_LOOK_AT) { _action._activeAction._verbId = VERB_LOOK; _action._savedFields._command = false; } |