aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorRobert Špalek2009-11-02 05:37:17 +0000
committerRobert Špalek2009-11-02 05:37:17 +0000
commitab3eb81dfb3839fcae13edb83fc85a5759106b1c (patch)
tree328a2bdf132dd9a7a7e9f39210ac8436ddb3156a /engines
parent6de74446ab75fb19b62ab5fc6ef492d7b05e1f15 (diff)
downloadscummvm-rg350-ab3eb81dfb3839fcae13edb83fc85a5759106b1c.tar.gz
scummvm-rg350-ab3eb81dfb3839fcae13edb83fc85a5759106b1c.tar.bz2
scummvm-rg350-ab3eb81dfb3839fcae13edb83fc85a5759106b1c.zip
Little clean-up after the refactoring.
svn-id: r45609
Diffstat (limited to 'engines')
-rw-r--r--engines/draci/game.cpp8
-rw-r--r--engines/draci/game.h7
2 files changed, 5 insertions, 10 deletions
diff --git a/engines/draci/game.cpp b/engines/draci/game.cpp
index 63721bee31..079e2ebb55 100644
--- a/engines/draci/game.cpp
+++ b/engines/draci/game.cpp
@@ -228,17 +228,13 @@ void Game::init() {
_pushedNewRoom = _pushedNewGate = -1;
}
-void Game::handleOrdinaryLoop() {
+void Game::handleOrdinaryLoop(int x, int y) {
// During the normal game-play, in particular not when
// running the init-scripts, enable interactivity.
if (_loopSubstatus != kOuterLoop) {
return;
}
- // Fetch mouse coordinates
- int x = _vm->_mouse->getPosX();
- int y = _vm->_mouse->getPosY();
-
// Fetch the dedicated objects' title animation / current frame
Animation *titleAnim = _vm->_anims->getAnimation(kTitleText);
Text *title = reinterpret_cast<Text *>(titleAnim->getCurrentFrame());
@@ -502,7 +498,7 @@ void Game::loop(LoopSubstatus substatus, bool shouldExit) {
case kStatusOrdinary:
updateOrdinaryCursor();
updateTitle(x, y);
- handleOrdinaryLoop();
+ handleOrdinaryLoop(x, y);
break;
case kStatusInventory:
updateInventoryCursor();
diff --git a/engines/draci/game.h b/engines/draci/game.h
index fb244ce06a..22f0bdf67f 100644
--- a/engines/draci/game.h
+++ b/engines/draci/game.h
@@ -280,9 +280,6 @@ public:
void setSpeechTiming(uint tick, uint duration);
void shiftSpeechAndFadeTick(int delta);
- void updateTitle(int x, int y);
- void updateCursor();
-
void inventoryInit();
void inventoryDraw();
void inventoryDone();
@@ -322,9 +319,11 @@ public:
private:
void updateOrdinaryCursor();
void updateInventoryCursor();
- void handleOrdinaryLoop();
+ void handleOrdinaryLoop(int x, int y);
void handleInventoryLoop();
void handleDialogueLoop();
+ void updateTitle(int x, int y);
+ void updateCursor();
void advanceAnimationsAndTestLoopExit();
bool enterNewRoom(); // Returns false if another room change has been triggered and therefore loop() shouldn't be called yet.