aboutsummaryrefslogtreecommitdiff
path: root/engines/lastexpress
diff options
context:
space:
mode:
authorJulien2012-07-22 19:22:49 -0400
committerJulien2012-07-27 00:14:54 -0400
commit2c4518d6154a0ae9772fe19a629f05c750ab19c8 (patch)
tree549bb00be8ce65a8f978a6b7bcb70887b812ebb1 /engines/lastexpress
parent831e1b27dc5b114eaceb49bad08576b3bdf81ab5 (diff)
downloadscummvm-rg350-2c4518d6154a0ae9772fe19a629f05c750ab19c8.tar.gz
scummvm-rg350-2c4518d6154a0ae9772fe19a629f05c750ab19c8.tar.bz2
scummvm-rg350-2c4518d6154a0ae9772fe19a629f05c750ab19c8.zip
LASTEXPRESS: Move some macros to entity.h
Diffstat (limited to 'engines/lastexpress')
-rw-r--r--engines/lastexpress/entities/entity.h23
-rw-r--r--engines/lastexpress/entities/entity_intern.h20
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) \