aboutsummaryrefslogtreecommitdiff
path: root/engines/draci/game.h
diff options
context:
space:
mode:
authorDenis Kasak2009-08-09 04:09:24 +0000
committerDenis Kasak2009-08-09 04:09:24 +0000
commiteeb72e3d0db18043d6ce050ebb1103ca907d640c (patch)
tree2b96c09aa5eaa50863aab8a54e711fa552034327 /engines/draci/game.h
parente46abf16435031aaa7c717e9ca8de9cf50b141ca (diff)
downloadscummvm-rg350-eeb72e3d0db18043d6ce050ebb1103ca907d640c.tar.gz
scummvm-rg350-eeb72e3d0db18043d6ce050ebb1103ca907d640c.tar.bz2
scummvm-rg350-eeb72e3d0db18043d6ce050ebb1103ca907d640c.zip
* Implemented Game::loadWalkingMap().
* Extracted title updating from the main loop to a new method, Game::updateTitle(). * Added Game::updateCursor(). * Restructured the main loop to fix many subtle bugs and enable some new functionality concerning object scripts (like support for room-global use scripts). * Added support for tracking currently selected icons (items, probably should be renamed). * Changed walkDir, lookDir and useDir members of GameObject to int and adjusted them for zero-based indexing. * Added Game::getCurrentIcon(). * Return from WalkingMap::findNearestWalkable immediately if the starting point is walkable. svn-id: r43160
Diffstat (limited to 'engines/draci/game.h')
-rw-r--r--engines/draci/game.h25
1 files changed, 23 insertions, 2 deletions
diff --git a/engines/draci/game.h b/engines/draci/game.h
index 7d0f8349f5..47b940ce7e 100644
--- a/engines/draci/game.h
+++ b/engines/draci/game.h
@@ -56,6 +56,18 @@ enum {
kNoEscRoom = -1
};
+// Used as a value to Game::_currentIcon and means there is no icon (game item) selected
+// and a "real" cursor image is used
+enum {
+ kNoIcon = -1
+};
+
+// Used as a default parameter in Game::loadWalkingMap() to specify that the default
+// walking map to the room is to be loaded.
+enum {
+ kDefaultRoomMap = -1
+};
+
enum SpeechConstants {
kBaseSpeechDuration = 200,
kSpeechTimeUnit = 400
@@ -103,10 +115,10 @@ struct GameObject {
uint _init, _look, _use, _canUse;
bool _imInit, _imLook, _imUse;
- byte _walkDir;
+ int _walkDir;
byte _z;
uint _lookX, _lookY, _useX, _useY;
- byte _lookDir, _useDir;
+ int _lookDir, _useDir;
uint _absNum;
Common::Array<int> _anims;
GPL2Program _program;
@@ -211,6 +223,7 @@ public:
int loadAnimation(uint animNum, uint z);
void loadOverlays();
void loadObject(uint numObj);
+ void loadWalkingMap(int mapID = kDefaultRoomMap);
uint getNumObjects();
GameObject *getObject(uint objNum);
@@ -228,6 +241,7 @@ public:
void setGateNum(int gate);
int getIconStatus(int iconID);
+ int getCurrentIcon();
int getEscRoom();
@@ -249,6 +263,9 @@ public:
void setSpeechTick(uint tick);
+ void updateTitle();
+ void updateCursor();
+
bool _roomChange;
private:
@@ -267,6 +284,8 @@ private:
int _newRoom;
int _newGate;
+ int _currentIcon;
+
LoopStatus _loopStatus;
LoopStatus _loopSubstatus;
@@ -276,6 +295,8 @@ private:
uint _speechTick;
int _objUnderCursor;
+ int _oldObjUnderCursor;
+
int _markedAnimationIndex; //!< Used by the Mark GPL command
};