aboutsummaryrefslogtreecommitdiff
path: root/engines/draci/game.h
diff options
context:
space:
mode:
authorDenis Kasak2009-07-29 01:11:53 +0000
committerDenis Kasak2009-07-29 01:11:53 +0000
commite9669b8e2bcc4a65d5cc1225e9328d9171726690 (patch)
tree87361ed3d977fdfa684d5963e7621a145a8102aa /engines/draci/game.h
parentdd9303d27e5b55175781b55c9da63468ce287a2a (diff)
downloadscummvm-rg350-e9669b8e2bcc4a65d5cc1225e9328d9171726690.tar.gz
scummvm-rg350-e9669b8e2bcc4a65d5cc1225e9328d9171726690.tar.bz2
scummvm-rg350-e9669b8e2bcc4a65d5cc1225e9328d9171726690.zip
* Moved event handling to DraciEngine::handleEvents()
* Added Game::start() method which is called from DraciEngine::go() * Made Game::loop() suitable for calling from other places (like GPL scripts) by handling events, redrawing the screen, etc from inside. This way it doesn't freeze the game if it doesn't return immediately. * Added Game::shouldQuit() and Game::setQuit() which can be used to signal the engine to quit. * Fixed race condition related to mouse buttons not getting released. * Instead of deleting frames for the title animation and adding a new one, reset the text for its frame. svn-id: r42875
Diffstat (limited to 'engines/draci/game.h')
-rw-r--r--engines/draci/game.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/engines/draci/game.h b/engines/draci/game.h
index fbc1d3283e..5cfa5d894e 100644
--- a/engines/draci/game.h
+++ b/engines/draci/game.h
@@ -86,8 +86,6 @@ private:
struct GameObject {
- GameObject() {}
-
uint _init, _look, _use, _canUse;
bool _imInit, _imLook, _imUse;
byte _walkDir;
@@ -162,6 +160,7 @@ public:
~Game();
void init();
+ void start();
void loop();
void changeRoom(uint roomNum);
@@ -213,6 +212,9 @@ public:
void setLoopStatus(LoopStatus status);
LoopStatus getLoopStatus();
+ bool shouldQuit() { return _shouldQuit; }
+ void setQuit(bool quit) { _shouldQuit = quit; }
+
private:
DraciEngine *_vm;
@@ -227,8 +229,9 @@ private:
Room _currentRoom;
LoopStatus _loopStatus;
- int _objUnderCursor;
+ bool _shouldQuit;
+ int _objUnderCursor;
int _markedAnimationIndex; //!< Used by the Mark GPL command
};