FIFE  6e1afdbeda11afe9ac53e6023a4be96ef88f1dc6
FIFE::Instance::InstanceActivity Class Reference

InstanceActivity gets allocated in case there is some runtime activity related to the instance. More...

+ Collaboration diagram for FIFE::Instance::InstanceActivity:

Public Member Functions

 InstanceActivity (Instance &source)
 
 ~InstanceActivity ()
 
void update (Instance &source)
 updates cached variables, marks changes More...
 

Public Attributes

Location m_location
 location on previous round More...
 
Location m_oldLocation
 location on previous cell More...
 
int32_t m_rotation
 rotation on previous round More...
 
int32_t m_oldRotation
 rotation on previous round More...
 
Actionm_action
 action on previous round. NOTE: might become invalid, only used for address comparison More...
 
SoundSourcem_soundSource
 sound source of action audio on previous round More...
 
double m_speed
 speed on previous round More...
 
float m_timeMultiplier
 time multiplier on previous round More...
 
std::string m_sayText
 say text on previous round More...
 
std::vector< InstanceChangeListener * > m_changeListeners
 listeners for changes More...
 
std::vector< InstanceActionListener * > m_actionListeners
 listeners for action related events More...
 
ActionInfom_actionInfo
 action information, allocated when actions are bind More...
 
SayInfom_sayInfo
 text to say + duration, allocated when something is said More...
 
TimeProviderm_timeProvider
 time scaler for this instance More...
 
bool m_blocking
 blocking status on previous round More...
 
InstanceChangeInfo m_additional
 additional change info, used for visual class (transparency, visible, stackpos) More...
 

Detailed Description

InstanceActivity gets allocated in case there is some runtime activity related to the instance.

Keeping activity related variables in separate class keeps memory consumption lower e.g. for large tile areas. Class also keeps track of changes since the previous update call. With this bookkeeping, it is possible to optimize several spots in the engine, basically only reacting to changes instead of polling.

Definition at line 558 of file instance.h.

Constructor & Destructor Documentation

FIFE::Instance::InstanceActivity::InstanceActivity ( Instance source)

Definition at line 113 of file instance.cpp.

FIFE::Instance::InstanceActivity::~InstanceActivity ( )

Definition at line 132 of file instance.cpp.

References m_actionInfo, m_sayInfo, m_soundSource, and m_timeProvider.

Member Function Documentation

Member Data Documentation

Action* FIFE::Instance::InstanceActivity::m_action

action on previous round. NOTE: might become invalid, only used for address comparison

Definition at line 575 of file instance.h.

Referenced by FIFE::Instance::cancelAction(), FIFE::Instance::finalizeAction(), and update().

bool FIFE::Instance::InstanceActivity::m_blocking

blocking status on previous round

Definition at line 597 of file instance.h.

Referenced by update().

std::vector<InstanceChangeListener*> FIFE::Instance::InstanceActivity::m_changeListeners

listeners for changes

Definition at line 585 of file instance.h.

Referenced by FIFE::Instance::addChangeListener(), FIFE::Instance::removeChangeListener(), FIFE::Instance::update(), and update().

Location FIFE::Instance::InstanceActivity::m_location

location on previous round

Definition at line 567 of file instance.h.

Referenced by update().

Location FIFE::Instance::InstanceActivity::m_oldLocation

location on previous cell

Definition at line 569 of file instance.h.

Referenced by FIFE::Instance::getOldLocationRef(), and update().

int32_t FIFE::Instance::InstanceActivity::m_oldRotation

rotation on previous round

Definition at line 573 of file instance.h.

Referenced by FIFE::Instance::getOldRotation(), and update().

int32_t FIFE::Instance::InstanceActivity::m_rotation

rotation on previous round

Definition at line 571 of file instance.h.

Referenced by update().

SayInfo* FIFE::Instance::InstanceActivity::m_sayInfo

text to say + duration, allocated when something is said

Definition at line 593 of file instance.h.

Referenced by FIFE::Instance::getSayText(), FIFE::Instance::say(), FIFE::Instance::update(), update(), and ~InstanceActivity().

std::string FIFE::Instance::InstanceActivity::m_sayText

say text on previous round

Definition at line 583 of file instance.h.

Referenced by update().

SoundSource* FIFE::Instance::InstanceActivity::m_soundSource

sound source of action audio on previous round

Definition at line 577 of file instance.h.

Referenced by FIFE::Instance::finalizeAction(), FIFE::Instance::initializeAction(), and ~InstanceActivity().

double FIFE::Instance::InstanceActivity::m_speed

speed on previous round

Definition at line 579 of file instance.h.

Referenced by update().

float FIFE::Instance::InstanceActivity::m_timeMultiplier

time multiplier on previous round

Definition at line 581 of file instance.h.

Referenced by update().


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