ScummVM
|
#include "lastexpress/game/action.h"
#include "lastexpress/data/animation.h"
#include "lastexpress/data/cursor.h"
#include "lastexpress/data/snd.h"
#include "lastexpress/data/scene.h"
#include "lastexpress/entities/abbot.h"
#include "lastexpress/entities/anna.h"
#include "lastexpress/game/beetle.h"
#include "lastexpress/game/entities.h"
#include "lastexpress/game/inventory.h"
#include "lastexpress/game/logic.h"
#include "lastexpress/game/object.h"
#include "lastexpress/game/savegame.h"
#include "lastexpress/game/savepoint.h"
#include "lastexpress/game/scenes.h"
#include "lastexpress/game/state.h"
#include "lastexpress/sound/queue.h"
#include "lastexpress/lastexpress.h"
#include "lastexpress/resource.h"
Go to the source code of this file.
Classes | |
class | LastExpress::Functor1MemConst< Arg, Res, T > |
Namespaces | |
LastExpress | |
This is the namespace of the LastExpress engine. | |
Macros | |
#define | ENTITY_PARAMS(entity, index, id) ((EntityData::EntityParametersIIII*)getEntities()->get(entity)->getParamData()->getParameters(8, index))->param##id |
Functions | |
LastExpress::error ("[Action::action_dummy] Dummy action function called (hotspot action: %d)", hotspot.action) | |
if (!getState() ->sceneUseBackup) return kSceneInvalid | |
if (getState() ->sceneBackup2) | |
if (getEntities() ->getPosition(backup->car, backup->position)) index | |
getScenes () -> loadScene(index) | |
if (!getInventory() ->getSelectedItem()) return kSceneInvalid | |
if (!getInventory() ->getSelectedEntry() ->isSelectable||(!getState() ->sceneBackup2 &&getInventory() ->getFirstExaminableItem())) getInventory() -> selectItem(getInventory() ->getFirstExaminableItem()) | |
getSavePoints () -> push(kEntityPlayer,(EntityIndex) hotspot.param1,(ActionIndex) hotspot.param2) | |
if (hotspot.param2||!getSoundQueue() ->isBuffered(Common::String::format("LIB%03d", hotspot.param1), true)) getSound() -> playSoundEvent(kEntityPlayer, hotspot.param1, hotspot.param2) | |
if (!getSoundQueue() ->isBuffered(filename) &&(hotspot.param1 !=50||getProgress().chapter==kChapter5)) getSound() -> playSound(kEntityPlayer, filename, kVolumeFull, hotspot.param2) | |
if (object >=kObjectMax) return kSceneInvalid | |
if (getObjects() ->get(object).entity) | |
if (compartment >=kObjectMax) return kSceneInvalid | |
if (getObjects() ->get(compartment).entity) | |
if (handleOtherCompartment(compartment, true, true)) | |
if (location==kObjectLocation1||location==kObjectLocation3||getEntities() ->checkFields2(compartment)) | |
if (hotspot.action !=SceneHotspot::kActionEnterCompartment||getInventory() ->getSelectedItem() !=kItemKey) | |
getObjects () -> update(kObjectCompartment1, kEntityPlayer, kObjectLocation1, kCursorHandKnock, kCursorHand) | |
getSound () -> playSoundEvent(kEntityPlayer, 16) | |
getInventory () -> unselectItem() | |
if (getEvent(hotspot.param1)) return kSceneInvalid | |
playAnimation ((EventIndex) hotspot.param1) | |
if (!hotspot.scene) getScenes() -> processScene() | |
switch (location) | |
if (object !=kObject112||getSoundQueue() ->isBuffered("LIB096")) | |
if (item >=kPortraitOriginal) return kSceneInvalid | |
if (entry->inPocket) return kSceneInvalid | |
if (item==kItemCorpse) | |
if (!entry->location) return kSceneInvalid | |
switch (item) | |
if (getInventory() ->get(item) ->scene) | |
if (!getInventory() ->hasItem(item)) return kSceneInvalid | |
if (location< kObjectLocation1) return kSceneInvalid | |
if (getObjects() ->get(kObjectCompartment1).status==kObjectLocation1||getObjects() ->get(kObjectCompartment1).status==kObjectLocation3||getInventory() ->getSelectedItem()==kItemKey) return action_compartment(hotspot) | |
if (getProgress().eventCorpseFound) | |
getSaveLoad () -> saveGame(kSavegameTypeTime, kEntityPlayer, kTimeNone) | |
playAnimation (kEventCathFindCorpse) | |
getProgress ().eventCorpseFound | |
if ((getEvent(kEventCathLookOutsideWindowDay)||getEvent(kEventCathLookOutsideWindowNight)||getObjects() ->get(kObjectCompartment1).model==kObjectModel1) &&getProgress().isTrainRunning &&(object !=kObjectOutsideAnnaCompartment||(!getEntities() ->isInsideCompartment(kEntityRebecca, kCarRedSleeping, kPosition_4840) &&getObjects() ->get(kObjectOutsideBetweenCompartments).status==kObjectLocation2)) &&getInventory() ->getSelectedItem() !=kItemFirebird &&getInventory() ->getSelectedItem() !=kItemBriefcase) | |
switch ((ObjectIndex) hotspot.param1) | |
if (action !=1 &&action !=2) return kSceneInvalid | |
switch (getProgress().chapter) | |
playAnimation (evt) | |
if (evt==kEventCathClimbDownTrainNoJacketDay) getSound() -> playSoundEvent(kEntityPlayer, 37) | |
switch (hotspot.param1) | |
switch (action) | |
if (!getSoundQueue() ->isBuffered("LIB031", true)) getSound() -> playSoundEvent(kEntityPlayer, 31) | |
switch (getEntityData(kEntityPlayer) ->car) | |
if (!getSoundQueue() ->isBuffered(filename)) getSound() -> playSound(kEntityPlayer, filename, kVolumeFull) | |
if (!getBeetle() ->isLoaded()) return kSceneInvalid | |
if (getBeetle() ->catchBeetle()) | |
if (!getProgress().field_30 &&getProgress().jacket !=kJacketOriginal) | |
return | action_enterCompartment (hotspot) |
if (evt !=kEventNone) | |
if (!getInventory() ->get(kItemMatch) ->location||getInventory() ->get(kItemMatch) ->inPocket) return kSceneInvalid | |
if (getProgress().field_7C &&!getSoundQueue() ->isBuffered("MUS003")) | |
if (getProgress().field_80 &&!getSoundQueue() ->isBuffered("MUS003")) | |
return | action_knockInside (hotspot) |
if (id) | |
if (!getSoundQueue() ->isBuffered(filename) &&hotspot.param3 &id) | |
Variables | |
static const int | LastExpress::_animationListSize = 273 |
struct { | |
const char * LastExpress::filename | |
uint16 LastExpress::time | |
} | LastExpress::_animationList [_animationListSize] |
SceneIndex | index = kSceneNone |
else | |
Scene * | backup = getScenes()->get(getState()->sceneBackup) |
return | kSceneInvalid |
Common::String | filename = Common::String::format("MUS%03d", hotspot.param1) |
ObjectIndex | object = (ObjectIndex)hotspot.param1 |
ObjectIndex | compartment = (ObjectIndex)hotspot.param1 |
ObjectLocation | location = getObjects()->get(compartment).status |
return | kSceneNone |
bool | isNotWindow = ((object <= kObjectCompartment8 || object >= kObjectHandleBathroom) && (object <= kObjectCompartmentH || object >= kObject48)) |
ObjectModel | model = (ObjectModel)hotspot.param2 |
InventoryItem | item = (InventoryItem)hotspot.param1 |
Inventory::InventoryEntry * | entry = getInventory()->get(item) |
bool | process = (hotspot.scene == 0) |
SceneIndex | sceneIndex = kSceneInvalid |
return | kSceneCompartmentCorpse |
byte | action = hotspot.param1 |
EventIndex | evt = kEventNone |
byte | id = 0 |
#define ENTITY_PARAMS | ( | entity, | |
index, | |||
id | |||
) | ((EntityData::EntityParametersIIII*)getEntities()->get(entity)->getParamData()->getParameters(8, index))->param##id |
return action_enterCompartment | ( | hotspot | ) |
return action_knockInside | ( | hotspot | ) |
getInventory | ( | ) | -> unselectItem() |
getObjects | ( | ) | -> update(kObjectCompartment1, kEntityPlayer, kObjectLocation1, kCursorHandKnock, kCursorHand) |
getProgress | ( | ) |
getSaveLoad | ( | ) | -> saveGame(kSavegameTypeTime, kEntityPlayer, kTimeNone) |
getSavePoints | ( | ) | -> push(kEntityPlayer,(EntityIndex) hotspot.param1,(ActionIndex) hotspot.param2) |
getScenes | ( | ) | -> loadScene(index) |
getSound | ( | ) | -> playSoundEvent(kEntityPlayer, 16) |
if | ( | !getState() -> | sceneUseBackup | ) |
if | ( | getState() -> | sceneBackup2 | ) |
Definition at line 433 of file action.cpp.
if | ( | getEntities() ->getPosition(backup->car, backup->position) | ) |
if | ( | ! | getInventory) ->getSelectedItem( | ) |
if | ( | ! | getInventory) ->getSelectedEntry() ->isSelectable||(!getState() ->sceneBackup2 &&getInventory() ->getFirstExaminableItem() | ) | -> selectItem(getInventory() ->getFirstExaminableItem()) |
if | ( | hotspot.param2||! | getSoundQueue) ->isBuffered(Common::String::format("LIB%03d", hotspot.param1), true | ) | -> playSoundEvent(kEntityPlayer, hotspot.param1, hotspot.param2) |
if | ( | ! | getSoundQueue) ->isBuffered(filename) &&(hotspot.param1 !=50||getProgress().chapter==kChapter5 | ) | -> playSound(kEntityPlayer, filename, kVolumeFull, hotspot.param2) |
if | ( | object >= | kObjectMax | ) |
if | ( | getObjects() ->get(object). | entity | ) |
Definition at line 494 of file action.cpp.
if | ( | compartment >= | kObjectMax | ) |
if | ( | getObjects() ->get(compartment). | entity | ) |
Definition at line 512 of file action.cpp.
if | ( | handleOtherCompartment(compartment, true, true) | ) |
Definition at line 519 of file action.cpp.
if | ( | location | = = kObjectLocation1 || location == kObjectLocation3 || getEntities()->checkFields2(compartment) | ) |
Definition at line 525 of file action.cpp.
if | ( | hotspot.action ! | = SceneHotspot::kActionEnterCompartment || getInventory()->getSelectedItem() != kItemKey | ) |
Definition at line 550 of file action.cpp.
if | ( | getEvent(hotspot.param1) | ) |
if | ( | !hotspot. | scene | ) | -> processScene() |
if | ( | object ! | = kObject112 || getSoundQueue()->isBuffered("LIB096") | ) |
Definition at line 637 of file action.cpp.
if | ( | item >= | kPortraitOriginal | ) |
if | ( | entry-> | inPocket | ) |
if | ( | item | = =kItemCorpse | ) |
Definition at line 660 of file action.cpp.
if | ( | !entry-> | location | ) |
if | ( | getInventory() ->get(item) -> | scene | ) |
Definition at line 738 of file action.cpp.
if | ( | ! | getInventory) ->hasItem(item | ) |
if | ( | ) |
if | ( | getObjects() ->get(kObjectCompartment1). | status = =kObjectLocation1||getObjects() ->get(kObjectCompartment1).status==kObjectLocation3||getInventory() ->getSelectedItem()==kItemKey | ) |
if | ( | getProgress(). | eventCorpseFound | ) |
Definition at line 814 of file action.cpp.
if | ( | (getEvent(kEventCathLookOutsideWindowDay)||getEvent(kEventCathLookOutsideWindowNight)||getObjects() ->get(kObjectCompartment1).model==kObjectModel1) &&getProgress().isTrainRunning &&(object !=kObjectOutsideAnnaCompartment||(!getEntities() ->isInsideCompartment(kEntityRebecca, kCarRedSleeping, kPosition_4840) &&getObjects() ->get(kObjectOutsideBetweenCompartments).status==kObjectLocation2)) &&getInventory() ->getSelectedItem() ! | = kItemFirebird && getInventory()->getSelectedItem() != kItemBriefcase | ) |
Definition at line 848 of file action.cpp.
if | ( | evt | = =kEventCathClimbDownTrainNoJacketDay | ) | -> playSoundEvent(kEntityPlayer, 37) |
if | ( | ! | getSoundQueue) ->isBuffered("LIB031", true | ) | -> playSoundEvent(kEntityPlayer, 31) |
if | ( | ! | getSoundQueue) ->isBuffered(filename | ) | -> playSound(kEntityPlayer, filename, kVolumeFull) |
if | ( | ! | getBeetle) ->isLoaded( | ) |
if | ( | getBeetle() ->catchBeetle() | ) |
Definition at line 1210 of file action.cpp.
if | ( | !getProgress().field_30 &&getProgress().jacket ! | = kJacketOriginal | ) |
Definition at line 1222 of file action.cpp.
if | ( | evt ! | = kEventNone | ) |
Definition at line 1324 of file action.cpp.
if | ( | !getInventory() ->get(kItemMatch) ->location||getInventory() ->get(kItemMatch) -> | inPocket | ) |
if | ( | getProgress().field_7C &&!getSoundQueue() ->isBuffered("MUS003") | ) |
Definition at line 1370 of file action.cpp.
if | ( | getProgress().field_80 &&!getSoundQueue() ->isBuffered("MUS003") | ) |
Definition at line 1382 of file action.cpp.
if | ( | id | ) |
Definition at line 1421 of file action.cpp.
if | ( | !getSoundQueue() ->isBuffered(filename) &&hotspot.param3 & | id | ) |
Definition at line 1456 of file action.cpp.
playAnimation | ( | (EventIndex) hotspot. | param1 | ) |
playAnimation | ( | kEventCathFindCorpse | ) |
playAnimation | ( | evt | ) |
switch | ( | location | ) |
Definition at line 604 of file action.cpp.
switch | ( | item | ) |
Definition at line 705 of file action.cpp.
switch | ( | (ObjectIndex) hotspot. | param1 | ) |
Definition at line 891 of file action.cpp.
switch | ( | getProgress(). | chapter | ) |
Definition at line 946 of file action.cpp.
switch | ( | hotspot. | param1 | ) |
Definition at line 1003 of file action.cpp.
switch | ( | action | ) |
Definition at line 1044 of file action.cpp.
switch | ( | getEntityData(kEntityPlayer) -> | car | ) |
Definition at line 1153 of file action.cpp.
byte action = hotspot.param1 |
Definition at line 941 of file action.cpp.
Definition at line 440 of file action.cpp.
ObjectIndex compartment = (ObjectIndex)hotspot.param1 |
Definition at line 507 of file action.cpp.
else |
Definition at line 436 of file action.cpp.
Inventory::InventoryEntry * entry = getInventory()->get(item) |
Definition at line 654 of file action.cpp.
EventIndex evt = kEventNone |
Definition at line 975 of file action.cpp.
Common::String filename = Common::String::format("MUS%03d", hotspot.param1) |
Definition at line 479 of file action.cpp.
int id = 0 |
Definition at line 1401 of file action.cpp.
index = kSceneNone |
Definition at line 432 of file action.cpp.
bool isNotWindow = ((object <= kObjectCompartment8 || object >= kObjectHandleBathroom) && (object <= kObjectCompartmentH || object >= kObject48)) |
Definition at line 602 of file action.cpp.
InventoryItem item = (InventoryItem)hotspot.param1 |
Definition at line 650 of file action.cpp.
return kSceneCompartmentCorpse |
Definition at line 837 of file action.cpp.
return kSceneInvalid |
Definition at line 453 of file action.cpp.
return kSceneNone |
Definition at line 565 of file action.cpp.
ObjectLocation location = getObjects()->get(compartment).status |
Definition at line 524 of file action.cpp.
ObjectModel model = (ObjectModel)hotspot.param2 |
Definition at line 630 of file action.cpp.
ObjectIndex object = (ObjectIndex)hotspot.param1 |
Definition at line 490 of file action.cpp.
bool process = (hotspot.scene == 0) |
Definition at line 686 of file action.cpp.
return sceneIndex = kSceneInvalid |
Definition at line 687 of file action.cpp.