diff options
author | Littleboy | 2012-07-14 14:32:51 -0400 |
---|---|---|
committer | Littleboy | 2012-07-14 14:34:42 -0400 |
commit | 4cee0836c9d4dda646f1e76a3440ffb73499dbb5 (patch) | |
tree | 6f1853f3e1b554b8c6a9e85986c45483b3072361 /engines/lastexpress/entities/entity_intern.h | |
parent | 13c00d40486201989463d337d5c09720f10a0aeb (diff) | |
download | scummvm-rg350-4cee0836c9d4dda646f1e76a3440ffb73499dbb5.tar.gz scummvm-rg350-4cee0836c9d4dda646f1e76a3440ffb73499dbb5.tar.bz2 scummvm-rg350-4cee0836c9d4dda646f1e76a3440ffb73499dbb5.zip |
LASTEXPRESS: Replace CALLBACK_ACTION macro by member function
Diffstat (limited to 'engines/lastexpress/entities/entity_intern.h')
-rw-r--r-- | engines/lastexpress/entities/entity_intern.h | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/engines/lastexpress/entities/entity_intern.h b/engines/lastexpress/entities/entity_intern.h index 2da0da15b3..c21f2c14e2 100644 --- a/engines/lastexpress/entities/entity_intern.h +++ b/engines/lastexpress/entities/entity_intern.h @@ -378,7 +378,7 @@ void class::setup_##name() { \ #define TIME_CHECK_CALLBACK_ACTION(timeValue, parameter) \ if (getState()->time > timeValue && !parameter) { \ parameter = 1; \ - CALLBACK_ACTION(); \ + callbackAction(); \ break; \ } @@ -409,17 +409,6 @@ void class::setup_##name() { \ } ////////////////////////////////////////////////////////////////////////// -// Callback action -////////////////////////////////////////////////////////////////////////// -#define CALLBACK_ACTION() { \ - if (getData()->currentCall == 0) \ - error("[CALLBACK_ACTION] currentCall is already 0, cannot proceed"); \ - getData()->currentCall--; \ - getSavePoints()->setCallback(_entityIndex, _callbacks[_data->getCurrentCallback()]); \ - getSavePoints()->call(_entityIndex, _entityIndex, kActionCallback); \ - } - -////////////////////////////////////////////////////////////////////////// // Param update ////////////////////////////////////////////////////////////////////////// #define UPDATE_PARAM(parameter, type, value) { \ @@ -486,7 +475,7 @@ void class::setup_##name() { \ case 2: \ getData()->entityPosition = positionFrom; \ getEntities()->clearSequences(_entityIndex); \ - CALLBACK_ACTION(); \ + callbackAction(); \ } \ break; \ } @@ -516,7 +505,7 @@ void class::setup_##name() { \ case 3: \ getData()->location = kLocationInsideCompartment; \ getEntities()->clearSequences(_entityIndex); \ - CALLBACK_ACTION(); \ + callbackAction(); \ break; \ } \ break; \ |