ScummVM API documentation
LastExpress::Entity Class Referenceabstract
Inheritance diagram for LastExpress::Entity:
Common::Serializable LastExpress::Abbot LastExpress::Alexei LastExpress::Alouan LastExpress::Anna LastExpress::August LastExpress::Boutarel LastExpress::Chapters LastExpress::Cooks LastExpress::Coudert LastExpress::Entity39 LastExpress::Francois LastExpress::Gendarmes LastExpress::Hadija LastExpress::Ivo LastExpress::Kahina LastExpress::Kronos LastExpress::Mahmud LastExpress::Max LastExpress::Mertens LastExpress::Milos LastExpress::MmeBoutarel LastExpress::Pascale LastExpress::Rebecca LastExpress::Salko LastExpress::Sophie LastExpress::Tables LastExpress::Tatiana LastExpress::Train LastExpress::Vassili LastExpress::Verges LastExpress::Vesna LastExpress::Waiter1 LastExpress::Waiter2 LastExpress::Yasmin

Public Member Functions

 Entity (LastExpressEngine *engine, EntityIndex index)
 
EntityDatagetParamData ()
 
EntityData::EntityCallDatagetData ()
 
byte getCallback ()
 
void setCallback (byte index)
 
void setup (ChapterIndex index)
 
virtual void setup_chapter1 ()=0
 
virtual void setup_chapter2 ()=0
 
virtual void setup_chapter3 ()=0
 
virtual void setup_chapter4 ()=0
 
virtual void setup_chapter5 ()=0
 
virtual void setup_savegame (SavegameType, uint32)
 
virtual void setup_enterExitCompartment (const char *, ObjectIndex)
 
virtual void setup_updateEntity (CarIndex, EntityPosition)
 
virtual void setup_playSound (const char *)
 
void saveLoadWithSerializer (Common::Serializer &ser) override
 
void nullfunction (const SavePoint &savepoint)
 

Protected Types

typedef Common::Functor1< const SavePoint &, void > Callback
 

Protected Member Functions

void savegame (const SavePoint &savepoint)
 
bool savegameBloodJacket (byte callback)
 
void playSound (const SavePoint &savepoint, bool resetItem=false, SoundFlag flag=kSoundVolumeEntityDefault)
 
void draw (const SavePoint &savepoint, bool handleExcuseMe=false)
 
void draw2 (const SavePoint &savepoint)
 
void updateFromTicks (const SavePoint &savepoint)
 
void updateFromTime (const SavePoint &savepoint)
 
void reset (const SavePoint &savepoint, ClothesIndex maxClothes=kClothesDefault, bool resetItem=false)
 
void callbackActionOnDirection (const SavePoint &savepoint)
 
void callbackActionRestaurantOrSalon (const SavePoint &savepoint)
 
void updateEntity (const SavePoint &savepoint, bool handleExcuseMe=false)
 
void callSavepoint (const SavePoint &savepoint, bool handleExcuseMe=false)
 
void enterExitCompartment (const SavePoint &savepoint, EntityPosition position1=kPositionNone, EntityPosition position2=kPositionNone, CarIndex car=kCarNone, ObjectIndex compartment=kObjectNone, bool alternate=false, bool updateLocation=false)
 
void goToCompartment (const SavePoint &savepoint, ObjectIndex compartmentFrom, EntityPosition positionFrom, Common::String sequenceFrom, Common::String sequenceTo)
 
void goToCompartmentFromCompartment (const SavePoint &savepoint, ObjectIndex compartmentFrom, EntityPosition positionFrom, Common::String sequenceFrom, ObjectIndex compartmentTo, EntityPosition positionTo, Common::String sequenceTo)
 
void updatePosition (const SavePoint &savepoint, bool handleExcuseMe=false)
 
void callbackAction ()
 
void setup (const char *name, uint index, EntityData::TypeSetter paramsTypeSetter)
 
void setupI (const char *name, uint index, EntityData::TypeSetter paramsTypeSetter, uint param1)
 
void setupII (const char *name, uint index, EntityData::TypeSetter paramsTypeSetter, uint param1, uint param2)
 
void setupIII (const char *name, uint index, EntityData::TypeSetter paramsTypeSetter, uint param1, uint param2, uint param3)
 
void setupS (const char *name, uint index, EntityData::TypeSetter paramsTypeSetter, const char *seq1)
 
void setupSS (const char *name, uint index, EntityData::TypeSetter paramsTypeSetter, const char *seq1, const char *seq2)
 
void setupSI (const char *name, uint index, EntityData::TypeSetter paramsTypeSetter, const char *seq1, uint param4)
 
void setupSII (const char *name, uint index, EntityData::TypeSetter paramsTypeSetter, const char *seq1, uint param4, uint param5)
 
void setupSIII (const char *name, uint index, EntityData::TypeSetter paramsTypeSetter, const char *seq, uint param4, uint param5, uint param6)
 
void setupSIIS (const char *name, uint index, EntityData::TypeSetter paramsTypeSetter, const char *seq1, uint param4, uint param5, const char *seq2)
 
void setupSSI (const char *name, uint index, EntityData::TypeSetter paramsTypeSetter, const char *seq1, const char *seq2, uint param7)
 
void setupIS (const char *name, uint index, EntityData::TypeSetter paramsTypeSetter, uint param1, const char *seq)
 
void setupISS (const char *name, uint index, EntityData::TypeSetter paramsTypeSetter, uint param1, const char *seq1, const char *seq2)
 
void setupIIS (const char *name, uint index, EntityData::TypeSetter paramsTypeSetter, uint param1, uint param2, const char *seq)
 
void setupIISS (const char *name, uint index, EntityData::TypeSetter paramsTypeSetter, uint param1, uint param2, const char *seq1, const char *seq2)
 
bool updateParameter (uint &parameter, uint timeType, uint delta) const
 
bool updateParameterCheck (uint &parameter, uint timeType, uint delta) const
 
bool updateParameterTime (TimeValue timeValue, bool check, uint &parameter, uint delta) const
 
bool timeCheck (TimeValue timeValue, uint &parameter, Common::Functor0< void > *function) const
 
bool timeCheckCallback (TimeValue timeValue, uint &parameter, byte callback, Common::Functor0< void > *function)
 
bool timeCheckCallback (TimeValue timeValue, uint &parameter, byte callback, const char *str, Common::Functor1< const char *, void > *function)
 
bool timeCheckCallback (TimeValue timeValue, uint &parameter, byte callback, bool check, Common::Functor1< bool, void > *function)
 
bool timeCheckCallbackInventory (TimeValue timeValue, uint &parameter, byte callback, Common::Functor0< void > *function)
 
bool timeCheckCar (TimeValue timeValue, uint &parameter, byte callback, Common::Functor0< void > *function)
 
void timeCheckSavepoint (TimeValue timeValue, uint &parameter, EntityIndex entity1, EntityIndex entity2, ActionIndex action) const
 
void timeCheckObject (TimeValue timeValue, uint &parameter, ObjectIndex index, ObjectModel model) const
 
bool timeCheckCallbackAction (TimeValue timeValue, uint &parameter)
 
bool timeCheckPlaySoundUpdatePosition (TimeValue timeValue, uint &parameter, byte callback, const char *sound, EntityPosition position)
 

Protected Attributes

LastExpressEngine_engine
 
EntityIndex _entityIndex
 
EntityData_data
 
Common::Array< Callback * > _callbacks
 
Common::Array< EntityData::TypeSetter > _paramsTypeSetters
 

Member Function Documentation

◆ savegame()

void LastExpress::Entity::savegame ( const SavePoint savepoint)
protected

Saves the game

Parameters
savepointThe savepoint
  • SavegameType
  • EventIndex

◆ savegameBloodJacket()

bool LastExpress::Entity::savegameBloodJacket ( byte  callback)
protected

Saves the game before being found out with a blood covered jacket.

Parameters
callbackargument for setCallback()
Returns
true if the event has been processed, false if nothing happened

◆ playSound()

void LastExpress::Entity::playSound ( const SavePoint savepoint,
bool  resetItem = false,
SoundFlag  flag = kSoundVolumeEntityDefault 
)
protected

Play sound

Parameters
savepointThe savepoint
  • Sound filename
resetItemtrue to reset item.
flagsound flag

◆ draw()

void LastExpress::Entity::draw ( const SavePoint savepoint,
bool  handleExcuseMe = false 
)
protected

Draws the entity

Parameters
savepointThe savepoint
handleExcuseMetrue to handle excuseMeCath action

◆ draw2()

void LastExpress::Entity::draw2 ( const SavePoint savepoint)
protected

Draws the entity along with another one

Parameters
savepointThe savepoint.

◆ updateFromTicks()

void LastExpress::Entity::updateFromTicks ( const SavePoint savepoint)
protected

Updates parameter 2 using ticks value

Parameters
savepointThe savepoint
  • Number of ticks to add

◆ updateFromTime()

void LastExpress::Entity::updateFromTime ( const SavePoint savepoint)
protected

Updates parameter 2 using time value

Parameters
savepointThe savepoint.
  • Time to add

◆ reset()

void LastExpress::Entity::reset ( const SavePoint savepoint,
ClothesIndex  maxClothes = kClothesDefault,
bool  resetItem = false 
)
protected

Resets an entity

Parameters
savepointThe savepoint.
maxClothescycles clothes from kClothesDefault to maxClothes inclusively
resetItemtrue to reset inventoryItem to kItemInvalid

◆ callbackActionOnDirection()

void LastExpress::Entity::callbackActionOnDirection ( const SavePoint savepoint)
protected

Process callback action when the entity direction is not kDirectionRight

Parameters
savepointThe savepoint.

◆ callbackActionRestaurantOrSalon()

void LastExpress::Entity::callbackActionRestaurantOrSalon ( const SavePoint savepoint)
protected

Process callback action when somebody is standing in the restaurant or salon.

Parameters
savepointThe savepoint.

◆ updateEntity()

void LastExpress::Entity::updateEntity ( const SavePoint savepoint,
bool  handleExcuseMe = false 
)
protected

Updates the entity

Parameters
savepointThe savepoint.
  • CarIndex
  • EntityPosition
handleExcuseMetrue to handle the kActionExcuseMe/kActionExcuseMeCath actions.

◆ callSavepoint()

void LastExpress::Entity::callSavepoint ( const SavePoint savepoint,
bool  handleExcuseMe = false 
)
protected

Call a specific savepoint (or draw sequence in default case)

Parameters
savepointThe savepoint.
  • Sequence to draw in default case
  • EntityIndex
  • ActionIndex
  • Sequence for the savepoint
handleExcuseMetrue to handle excuse me.

◆ enterExitCompartment()

void LastExpress::Entity::enterExitCompartment ( const SavePoint savepoint,
EntityPosition  position1 = kPositionNone,
EntityPosition  position2 = kPositionNone,
CarIndex  car = kCarNone,
ObjectIndex  compartment = kObjectNone,
bool  alternate = false,
bool  updateLocation = false 
)
protected

Handles entering/exiting a compartment.

Parameters
savepointThe savepoint.
position1The first position.
position2The second position.
carThe car.
compartmentThe compartment.
alternatetrue to use the alternate version of SceneManager::loadSceneFromObject()

◆ goToCompartment()

void LastExpress::Entity::goToCompartment ( const SavePoint savepoint,
ObjectIndex  compartmentFrom,
EntityPosition  positionFrom,
Common::String  sequenceFrom,
Common::String  sequenceTo 
)
protected

Go to compartment.

Parameters
savepointThe savepoint.
compartmentFromThe compartment from.
positionFromThe position from.
sequenceFromThe sequence from.
sequenceToThe sequence to.

◆ goToCompartmentFromCompartment()

void LastExpress::Entity::goToCompartmentFromCompartment ( const SavePoint savepoint,
ObjectIndex  compartmentFrom,
EntityPosition  positionFrom,
Common::String  sequenceFrom,
ObjectIndex  compartmentTo,
EntityPosition  positionTo,
Common::String  sequenceTo 
)
protected

Go to compartment from compartment.

Parameters
savepointThe savepoint.
compartmentFromThe compartment from.
positionFromThe position from.
sequenceFromThe sequence from.
compartmentToThe compartment to.
positionToThe position to.
sequenceToThe sequence to.

◆ updatePosition()

void LastExpress::Entity::updatePosition ( const SavePoint savepoint,
bool  handleExcuseMe = false 
)
protected

Updates the position

Parameters
savepointThe savepoint
handleExcuseMetrue to handle excuseMe actions

◆ callbackAction()

void LastExpress::Entity::callbackAction ( )
protected

Store the current callback information and perform the callback action


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