diff options
author | Julien | 2012-07-22 19:22:49 -0400 |
---|---|---|
committer | Julien | 2012-07-27 00:14:54 -0400 |
commit | 2c4518d6154a0ae9772fe19a629f05c750ab19c8 (patch) | |
tree | 549bb00be8ce65a8f978a6b7bcb70887b812ebb1 /engines | |
parent | 831e1b27dc5b114eaceb49bad08576b3bdf81ab5 (diff) | |
download | scummvm-rg350-2c4518d6154a0ae9772fe19a629f05c750ab19c8.tar.gz scummvm-rg350-2c4518d6154a0ae9772fe19a629f05c750ab19c8.tar.bz2 scummvm-rg350-2c4518d6154a0ae9772fe19a629f05c750ab19c8.zip |
LASTEXPRESS: Move some macros to entity.h
Diffstat (limited to 'engines')
-rw-r--r-- | engines/lastexpress/entities/entity.h | 23 | ||||
-rw-r--r-- | engines/lastexpress/entities/entity_intern.h | 20 |
2 files changed, 23 insertions, 20 deletions
diff --git a/engines/lastexpress/entities/entity.h b/engines/lastexpress/entities/entity.h index 5ba78abc17..7ff574ddbe 100644 --- a/engines/lastexpress/entities/entity.h +++ b/engines/lastexpress/entities/entity.h @@ -41,6 +41,29 @@ class Sequence; class SequenceFrame; struct SavePoint; + +////////////////////////////////////////////////////////////////////////// +// Callbacks +#define ENTITY_CALLBACK(class, name, pointer) \ + Common::Functor1Mem<const SavePoint&, void, class>(pointer, &class::name) + +#define ADD_CALLBACK_FUNCTION(class, name) \ + _callbacks.push_back(new ENTITY_CALLBACK(class, name, this)); + +#define ADD_NULL_FUNCTION() \ + _callbacks.push_back(new ENTITY_CALLBACK(Entity, nullfunction, this)); + +////////////////////////////////////////////////////////////////////////// +// Parameters macros +////////////////////////////////////////////////////////////////////////// +#define CURRENT_PARAM(index, id) \ + ((EntityData::EntityParametersIIII*)_data->getCurrentParameters(index))->param##id + +#define ENTITY_PARAM(index, id) \ + ((EntityData::EntityParametersIIII*)_data->getParameters(8, index))->param##id + + + class EntityData : Common::Serializable { public: diff --git a/engines/lastexpress/entities/entity_intern.h b/engines/lastexpress/entities/entity_intern.h index 64814a1b40..576765620f 100644 --- a/engines/lastexpress/entities/entity_intern.h +++ b/engines/lastexpress/entities/entity_intern.h @@ -26,17 +26,6 @@ namespace LastExpress { ////////////////////////////////////////////////////////////////////////// -// Callbacks -#define ENTITY_CALLBACK(class, name, pointer) \ - Common::Functor1Mem<const SavePoint&, void, class>(pointer, &class::name) - -#define ADD_CALLBACK_FUNCTION(class, name) \ - _callbacks.push_back(new ENTITY_CALLBACK(class, name, this)); - -#define ADD_NULL_FUNCTION() \ - _callbacks.push_back(new ENTITY_CALLBACK(Entity, nullfunction, this)); - -////////////////////////////////////////////////////////////////////////// // Declaration ////////////////////////////////////////////////////////////////////////// @@ -308,15 +297,6 @@ void class::setup_##name() { \ ((class *)getEntities()->get(entity))->function(); ////////////////////////////////////////////////////////////////////////// -// Parameters macros (for default IIII parameters) -////////////////////////////////////////////////////////////////////////// -#define CURRENT_PARAM(index, id) \ - ((EntityData::EntityParametersIIII*)_data->getCurrentParameters(index))->param##id - -#define ENTITY_PARAM(index, id) \ - ((EntityData::EntityParametersIIII*)_data->getParameters(8, index))->param##id - -////////////////////////////////////////////////////////////////////////// // Time check macros ////////////////////////////////////////////////////////////////////////// #define TIME_CHECK(timeValue, parameter, function) \ |