ScummVM API documentation
LastExpress::Entities Class Reference
Inheritance diagram for LastExpress::Entities:
Common::Serializable

Public Member Functions

 Entities (LastExpressEngine *engine)
 
void saveLoadWithSerializer (Common::Serializer &ser) override
 
void savePositions (Common::Serializer &ser)
 
void saveCompartments (Common::Serializer &ser)
 
void setup (bool isFirstChapter, EntityIndex entity)
 
void setupChapter (ChapterIndex chapter)
 
void reset ()
 
void resetState (EntityIndex entity)
 
void updateFields () const
 
void updateSequences () const
 
void updateCallbacks ()
 
EntityIndex canInteractWith (const Common::Point &point) const
 
bool compare (EntityIndex entity1, EntityIndex entity2) const
 
void updateFrame (EntityIndex entity) const
 
void updatePositionEnter (EntityIndex entity, CarIndex car, Position position)
 
void updatePositionExit (EntityIndex entity, CarIndex car, Position position)
 
void enterCompartment (EntityIndex entity, ObjectIndex compartment, bool useCompartment1=false)
 
void exitCompartment (EntityIndex entity, ObjectIndex compartment, bool useCompartment1=false)
 
void drawSequenceLeft (EntityIndex index, const char *sequence) const
 
void drawSequenceRight (EntityIndex index, const char *sequence) const
 
void clearSequences (EntityIndex index) const
 
bool updateEntity (EntityIndex entity, CarIndex car, EntityPosition position) const
 
bool hasValidFrame (EntityIndex entity) const
 
Entityget (EntityIndex entity)
 
EntityData::EntityCallDatagetData (EntityIndex entity) const
 
int getPosition (CarIndex car, Position position) const
 
int getCompartments (int index) const
 
int getCompartments1 (int index) const
 
void loadSceneFromEntityPosition (CarIndex car, EntityPosition position, bool alternate=false) const
 
bool isInsideCompartment (EntityIndex entity, CarIndex car, EntityPosition position) const
 
bool checkFields2 (ObjectIndex object) const
 
bool isInsideCompartments (EntityIndex entity) const
 
bool isPlayerPosition (CarIndex car, Position position) const
 
bool isInsideTrainCar (EntityIndex entity, CarIndex car) const
 
bool isInGreenCarEntrance (EntityIndex entity) const
 
bool isPlayerInCar (CarIndex car) const
 
bool isDirectionUpOrDown (EntityIndex entity) const
 
bool isDistanceBetweenEntities (EntityIndex entity1, EntityIndex entity2, uint distance) const
 
bool checkFields10 (EntityIndex entity) const
 
bool isSomebodyInsideRestaurantOrSalon () const
 
bool isInSalon (EntityIndex entity) const
 
bool isInRestaurant (EntityIndex entity) const
 
bool isInKronosSalon (EntityIndex entity) const
 
bool isOutsideAlexeiWindow () const
 
bool isOutsideAnnaWindow () const
 
bool isInKitchen (EntityIndex entity) const
 
bool isNobodyInCompartment (CarIndex car, EntityPosition position) const
 
bool checkFields19 (EntityIndex entity, CarIndex car, EntityPosition position) const
 
bool isInBaggageCarEntrance (EntityIndex entity) const
 
bool isInBaggageCar (EntityIndex entity) const
 
bool isInKronosSanctum (EntityIndex entity) const
 
bool isInKronosCarEntrance (EntityIndex entity) const
 
bool checkDistanceFromPosition (EntityIndex entity, EntityPosition position, int distance) const
 
bool isWalkingOppositeToPlayer (EntityIndex entity) const
 

Static Public Member Functions

static bool isFemale (EntityIndex entity)
 
static bool isMarried (EntityIndex entity)
 

Member Function Documentation

◆ resetState()

void LastExpress::Entities::resetState ( EntityIndex  entity)

Reset an entity state

Parameters
entityentity index
Note
remember to call the function pointer (we do not pass it our implementation)

◆ updateFrame()

void LastExpress::Entities::updateFrame ( EntityIndex  entity) const

Update an entity current sequence frame (and related fields)

Parameters
entityentity index

◆ isInsideCompartment()

bool LastExpress::Entities::isInsideCompartment ( EntityIndex  entity,
CarIndex  car,
EntityPosition  position 
) const

Query if 'entity' is inside a compartment

Parameters
entityThe entity.
carThe car.
positionThe position.
Returns
true if inside the compartment, false if not.

◆ isInsideCompartments()

bool LastExpress::Entities::isInsideCompartments ( EntityIndex  entity) const

Query if 'entity' is in compartment cars.

Parameters
entityThe entity.
Returns
true if in compartment cars, false if not.

◆ isPlayerPosition()

bool LastExpress::Entities::isPlayerPosition ( CarIndex  car,
Position  position 
) const

Query if the player is in the specified position

Parameters
carThe car.
positionThe position.
Returns
true if player is in that position, false if not.

◆ isInsideTrainCar()

bool LastExpress::Entities::isInsideTrainCar ( EntityIndex  entity,
CarIndex  car 
) const

Query if 'entity' is inside a train car

Parameters
entityThe entity.
carThe car.
Returns
true if inside a train car, false if not.

◆ isInGreenCarEntrance()

bool LastExpress::Entities::isInGreenCarEntrance ( EntityIndex  entity) const

Query if 'entity' is in green car entrance.

Parameters
entityThe entity.
Returns
true if in the green car entrance, false if not.

◆ isPlayerInCar()

bool LastExpress::Entities::isPlayerInCar ( CarIndex  car) const

Query if the player is in a specific car

Parameters
carThe car.
Returns
true if player is in the car, false if not.

◆ isDirectionUpOrDown()

bool LastExpress::Entities::isDirectionUpOrDown ( EntityIndex  entity) const

Query if 'entity' is going in the up or down direction.

Parameters
entityThe entity.
Returns
true if direction is up or down, false if not.

◆ isDistanceBetweenEntities()

bool LastExpress::Entities::isDistanceBetweenEntities ( EntityIndex  entity1,
EntityIndex  entity2,
uint  distance 
) const

Query if the distance between the two entities is less 'distance'

Parameters
entity1The first entity.
entity2The second entity.
distanceThe distance.
Returns
true if the distance between entities is less than 'distance', false if not.

◆ isSomebodyInsideRestaurantOrSalon()

bool LastExpress::Entities::isSomebodyInsideRestaurantOrSalon ( ) const

Query if there is somebody in the restaurant or salon.

Returns
true if somebody is in the restaurant or salon, false if not.

◆ isInSalon()

bool LastExpress::Entities::isInSalon ( EntityIndex  entity) const

Query if 'entity' is in the salon.

Parameters
entityThe entity.
Returns
true if in the salon, false if not.

◆ isInRestaurant()

bool LastExpress::Entities::isInRestaurant ( EntityIndex  entity) const

Query if 'entity' is in the restaurant.

Parameters
entityThe entity.
Returns
true if in the restaurant, false if not.

◆ isInKronosSalon()

bool LastExpress::Entities::isInKronosSalon ( EntityIndex  entity) const

Query if 'entity' is in Kronos salon.

Parameters
entityThe entity.
Returns
true if in Kronos salon, false if not.

◆ isOutsideAlexeiWindow()

bool LastExpress::Entities::isOutsideAlexeiWindow ( ) const

Query if the player is outside Alexei window.

Returns
true if outside alexei window, false if not.

◆ isOutsideAnnaWindow()

bool LastExpress::Entities::isOutsideAnnaWindow ( ) const

Query if the player is outside Anna window.

Returns
true if outside anna window, false if not.

◆ isInKitchen()

bool LastExpress::Entities::isInKitchen ( EntityIndex  entity) const

Query if 'entity' is in the kitchen.

Parameters
entityThe entity.
Returns
true if in the kitchen, false if not.

◆ isNobodyInCompartment()

bool LastExpress::Entities::isNobodyInCompartment ( CarIndex  car,
EntityPosition  position 
) const

Query if nobody is in a compartment at that position.

Parameters
carThe car.
positionThe position.
Returns
true if nobody is in a compartment, false if not.

◆ isInBaggageCarEntrance()

bool LastExpress::Entities::isInBaggageCarEntrance ( EntityIndex  entity) const

Query if 'entity' is in the baggage car entrance.

Parameters
entityThe entity.
Returns
true if in the baggage car entrance, false if not.

◆ isInBaggageCar()

bool LastExpress::Entities::isInBaggageCar ( EntityIndex  entity) const

Query if 'entity' is in the baggage car.

Parameters
entityThe entity.
Returns
true if in the baggage car, false if not.

◆ isInKronosSanctum()

bool LastExpress::Entities::isInKronosSanctum ( EntityIndex  entity) const

Query if 'entity' is in Kronos sanctum.

Parameters
entityThe entity.
Returns
true if in Kronos sanctum, false if not.

◆ isInKronosCarEntrance()

bool LastExpress::Entities::isInKronosCarEntrance ( EntityIndex  entity) const

Query if 'entity' is in Kronos car entrance.

Parameters
entityThe entity.
Returns
true if in Kronos car entrance, false if not.

◆ checkDistanceFromPosition()

bool LastExpress::Entities::checkDistanceFromPosition ( EntityIndex  entity,
EntityPosition  position,
int  distance 
) const

Check distance from position.

Parameters
entityThe entity.
positionThe position.
distanceThe distance.
Returns
true if distance is bigger, false otherwise.

◆ isWalkingOppositeToPlayer()

bool LastExpress::Entities::isWalkingOppositeToPlayer ( EntityIndex  entity) const

Query if 'entity' is walking opposite to player.

Parameters
entityThe entity.
Returns
true if walking opposite to player, false if not.

◆ isFemale()

static bool LastExpress::Entities::isFemale ( EntityIndex  entity)
static

Query if 'entity' is female.

Parameters
entityThe entity.
Returns
true if female, false if not.

◆ isMarried()

static bool LastExpress::Entities::isMarried ( EntityIndex  entity)
static

Query if 'entity' is married.

Parameters
entityThe entity.
Returns
true if married, false if not.

The documentation for this class was generated from the following file: