22 #ifndef LASTEXPRESS_ENTITIES_H 23 #define LASTEXPRESS_ENTITIES_H 33 #include "lastexpress/entities/entity.h" 35 #include "lastexpress/shared.h" 37 #include "common/rect.h" 38 #include "common/serializer.h" 42 class LastExpressEngine;
55 void setup(
bool isFirstChapter, EntityIndex entity);
56 void setupChapter(ChapterIndex chapter);
68 void updateFields()
const;
69 void updateSequences()
const;
70 void updateCallbacks();
72 EntityIndex canInteractWith(
const Common::Point &point)
const;
73 bool compare(EntityIndex entity1, EntityIndex entity2)
const;
81 void updatePositionEnter(EntityIndex entity, CarIndex car, Position position);
82 void updatePositionExit(EntityIndex entity, CarIndex car, Position position);
83 void enterCompartment(EntityIndex entity, ObjectIndex compartment,
bool useCompartment1 =
false);
84 void exitCompartment(EntityIndex entity, ObjectIndex compartment,
bool useCompartment1 =
false);
87 void drawSequenceLeft(EntityIndex index,
const char *sequence)
const;
88 void drawSequenceRight(EntityIndex index,
const char *sequence)
const;
89 void clearSequences(EntityIndex index)
const;
91 bool updateEntity(EntityIndex entity, CarIndex car, EntityPosition position)
const;
92 bool hasValidFrame(EntityIndex entity)
const;
95 Entity *
get(EntityIndex entity);
97 int getPosition(CarIndex car, Position position)
const;
98 int getCompartments(
int index)
const;
99 int getCompartments1(
int index)
const;
102 void loadSceneFromEntityPosition(CarIndex car, EntityPosition position,
bool alternate =
false)
const;
119 bool checkFields2(ObjectIndex
object)
const;
187 bool checkFields10(EntityIndex entity)
const;
203 bool isInSalon(EntityIndex entity)
const;
256 bool checkFields19(EntityIndex entity, CarIndex car, EntityPosition position)
const;
321 static bool isFemale(EntityIndex entity);
330 static bool isMarried(EntityIndex entity);
333 static const int _compartmentsCount = 16;
334 static const int _positionsCount = 100 * 10;
341 uint _compartments[_compartmentsCount];
342 uint _compartments1[_compartmentsCount];
343 uint _positions[_positionsCount];
345 void executeCallbacks();
347 void processEntity(EntityIndex entity);
349 void drawSequence(EntityIndex entity,
const char *sequence, EntityDirection direction)
const;
350 void drawSequences(EntityIndex entity, EntityDirection direction,
bool loadSequence)
const;
351 void loadSequence2(EntityIndex entity,
Common::String sequenceName,
Common::String sequenceName2, byte field30,
bool loadSequence)
const;
354 void computeCurrentFrame(EntityIndex entity)
const;
355 int16 getCurrentFrame(EntityIndex entity,
Sequence *sequence, EntityPosition position,
bool doProcessing)
const;
356 void processFrame(EntityIndex entity,
bool keepPreviousFrame,
bool dontPlaySound);
357 void drawNextSequence(EntityIndex entity)
const;
358 void updateEntityPosition(EntityIndex entity)
const;
359 void copySequenceData(EntityIndex entity)
const;
361 bool changeCar(
EntityData::EntityCallData *data, EntityIndex entity, CarIndex car, EntityPosition position,
bool increment, EntityPosition newPosition, CarIndex newCar)
const;
365 void updatePositionsEnter(EntityIndex entity, CarIndex car, Position position1, Position position2, Position position3, Position position4);
366 void updatePositionsExit(EntityIndex entity, CarIndex car, Position position1, Position position2);
368 void resetSequences(EntityIndex entity)
const;
370 bool checkPosition(EntityPosition position)
const;
371 bool checkSequenceFromPosition(EntityIndex entity)
const;
372 EntityPosition getEntityPositionFromCurrentPosition()
const;
377 #endif // LASTEXPRESS_ENTITIES_H static bool isMarried(EntityIndex entity)
bool isInKronosSalon(EntityIndex entity) const
Definition: lastexpress.h:69
bool isOutsideAlexeiWindow() const
void updateFrame(EntityIndex entity) const
bool isInKronosCarEntrance(EntityIndex entity) const
static bool isFemale(EntityIndex entity)
Definition: entities.h:45
Definition: animation.h:45
bool isWalkingOppositeToPlayer(EntityIndex entity) const
Definition: serializer.h:79
bool isInSalon(EntityIndex entity) const
bool isSomebodyInsideRestaurantOrSalon() const
bool isInBaggageCarEntrance(EntityIndex entity) const
bool isInKitchen(EntityIndex entity) const
bool checkDistanceFromPosition(EntityIndex entity, EntityPosition position, int distance) const
bool isDistanceBetweenEntities(EntityIndex entity1, EntityIndex entity2, uint distance) const
Definition: sequence.h:151
bool isDirectionUpOrDown(EntityIndex entity) const
bool isOutsideAnnaWindow() const
Definition: serializer.h:308
bool isPlayerInCar(CarIndex car) const
bool isInsideCompartments(EntityIndex entity) const
bool isInKronosSanctum(EntityIndex entity) const
bool isPlayerPosition(CarIndex car, Position position) const
bool isInRestaurant(EntityIndex entity) const
bool isInBaggageCar(EntityIndex entity) const
void resetState(EntityIndex entity)
bool isInGreenCarEntrance(EntityIndex entity) const
bool isNobodyInCompartment(CarIndex car, EntityPosition position) const
bool isInsideCompartment(EntityIndex entity, CarIndex car, EntityPosition position) const
bool isInsideTrainCar(EntityIndex entity, CarIndex car) const