diff options
Diffstat (limited to 'engines/lastexpress/game')
-rw-r--r-- | engines/lastexpress/game/beetle.cpp | 32 | ||||
-rw-r--r-- | engines/lastexpress/game/beetle.h | 1 |
2 files changed, 18 insertions, 15 deletions
diff --git a/engines/lastexpress/game/beetle.cpp b/engines/lastexpress/game/beetle.cpp index f95947617a..2a72459697 100644 --- a/engines/lastexpress/game/beetle.cpp +++ b/engines/lastexpress/game/beetle.cpp @@ -336,26 +336,13 @@ void Beetle::drawUpdate() { } } -#define INVERT_Y() \ - switch (_data->indexes[_data->offset]) { \ - default: \ - break; \ - case 24: \ - case 25: \ - case 26: \ - case 27: \ - case 28: \ - _data->coordY = -_data->coordY; \ - break; \ - } - // Invert direction - INVERT_Y(); + invertDirection(); SequenceFrame *frame = new SequenceFrame(_data->currentSequence, (uint16)_data->currentFrame); updateFrame(frame); - INVERT_Y(); + invertDirection(); getScenes()->addToQueue(frame); @@ -363,6 +350,21 @@ void Beetle::drawUpdate() { _data->frame = frame; } +void Beetle::invertDirection() { + switch (_data->indexes[_data->offset]) { + default: + break; + + case 24: + case 25: + case 26: + case 27: + case 28: + _data->coordY = -_data->coordY; + break; + } +} + void Beetle::move() { if (!_data) error("[Beetle::move] Sequences have not been loaded"); diff --git a/engines/lastexpress/game/beetle.h b/engines/lastexpress/game/beetle.h index d3c47f39e5..034ebbd557 100644 --- a/engines/lastexpress/game/beetle.h +++ b/engines/lastexpress/game/beetle.h @@ -111,6 +111,7 @@ private: void updateFrame(SequenceFrame *frame) const; void updateData(uint32 index); void drawUpdate(); + void invertDirection(); }; } // End of namespace LastExpress |