diff options
author | Littleboy | 2012-07-29 21:05:12 -0400 |
---|---|---|
committer | Littleboy | 2012-07-29 21:09:34 -0400 |
commit | 65565c891493ed6a54a347df8041a011512d5cb8 (patch) | |
tree | 0cd763e6d78878c187ad3029dfb289838e9ea69c /engines/lastexpress/game | |
parent | c8df89e6b2ad04aac03be89c1ac214dbd144c982 (diff) | |
download | scummvm-rg350-65565c891493ed6a54a347df8041a011512d5cb8.tar.gz scummvm-rg350-65565c891493ed6a54a347df8041a011512d5cb8.tar.bz2 scummvm-rg350-65565c891493ed6a54a347df8041a011512d5cb8.zip |
LASTEXPRESS: Replace REDRAW_CURSOR macro by function
Diffstat (limited to 'engines/lastexpress/game')
-rw-r--r-- | engines/lastexpress/game/logic.cpp | 28 | ||||
-rw-r--r-- | engines/lastexpress/game/logic.h | 1 |
2 files changed, 17 insertions, 12 deletions
diff --git a/engines/lastexpress/game/logic.cpp b/engines/lastexpress/game/logic.cpp index 135b7d3480..a8619512cb 100644 --- a/engines/lastexpress/game/logic.cpp +++ b/engines/lastexpress/game/logic.cpp @@ -86,16 +86,6 @@ Logic::~Logic() { ////////////////////////////////////////////////////////////////////////// // Event Handling ////////////////////////////////////////////////////////////////////////// -#define REDRAW_CURSOR() { \ - if (getInventory()->isMagnifierInUse()) \ - _engine->getCursor()->setStyle(kCursorMagnifier); \ - if (getInventory()->isPortraitHighlighted() \ - || getInventory()->isOpened() \ - || getInventory()->isEggHighlighted()) \ - _engine->getCursor()->setStyle(kCursorNormal); \ - return; \ -} - void Logic::eventMouse(const Common::Event &ev) { bool hotspotHandled = false; @@ -166,7 +156,9 @@ void Logic::eventMouse(const Common::Event &ev) { getInventory()->unselectItem(); } - REDRAW_CURSOR() + redrawCursor(); + + return; } // Handle match case @@ -192,7 +184,9 @@ void Logic::eventMouse(const Common::Event &ev) { getScenes()->processScene(); } - REDRAW_CURSOR() + redrawCursor(); + + return; } // Handle entity item case @@ -596,4 +590,14 @@ void Logic::updateCursor(bool) const { /* the cursor is always updated, even whe _engine->getCursor()->setStyle(style); } +void Logic::redrawCursor() const { + if (getInventory()->isMagnifierInUse()) + _engine->getCursor()->setStyle(kCursorMagnifier); + + if (getInventory()->isPortraitHighlighted() + || getInventory()->isOpened() + || getInventory()->isEggHighlighted()) + _engine->getCursor()->setStyle(kCursorNormal); +} + } // End of namespace LastExpress diff --git a/engines/lastexpress/game/logic.h b/engines/lastexpress/game/logic.h index 84b64a998b..efb8f1e1a3 100644 --- a/engines/lastexpress/game/logic.h +++ b/engines/lastexpress/game/logic.h @@ -73,6 +73,7 @@ private: void switchChapter() const; void showCredits() const; + void redrawCursor() const; // Flags & Members bool _flagActionPerformed; |