aboutsummaryrefslogtreecommitdiff
path: root/engines/draci/game.h
diff options
context:
space:
mode:
Diffstat (limited to 'engines/draci/game.h')
-rw-r--r--engines/draci/game.h67
1 files changed, 3 insertions, 64 deletions
diff --git a/engines/draci/game.h b/engines/draci/game.h
index 1366ffd9ec..181b93d0a7 100644
--- a/engines/draci/game.h
+++ b/engines/draci/game.h
@@ -32,6 +32,7 @@
#include "draci/script.h"
#include "draci/animation.h"
#include "draci/sprite.h"
+#include "draci/walking.h"
namespace Draci {
@@ -64,12 +65,6 @@ enum {
kNoItem = -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 {
kNoDialogue = -1,
kDialogueLines = 4
@@ -104,51 +99,6 @@ enum InventoryConstants {
kInventorySlots = kInventoryLines * kInventoryColumns
};
-class WalkingMap {
-public:
- WalkingMap() {
- _realWidth = 0;
- _realHeight = 0;
- _mapWidth = 0;
- _mapHeight = 0;
- _byteWidth = 0;
- _data = NULL;
- }
-
- void load(const byte *data, uint length) {
- Common::MemoryReadStream mapReader(data, length);
-
- _realWidth = mapReader.readUint16LE();
- _realHeight = mapReader.readUint16LE();
- _deltaX = mapReader.readUint16LE();
- _deltaY = mapReader.readUint16LE();
- _mapWidth = mapReader.readUint16LE();
- _mapHeight = mapReader.readUint16LE();
- _byteWidth = mapReader.readUint16LE();
-
- // Set the data pointer to raw map data
- _data = data + mapReader.pos();
- }
-
- bool isWalkable(int x, int y) const;
- Common::Point findNearestWalkable(int x, int y, Common::Rect searchRect) const;
-
-private:
- int _realWidth, _realHeight;
- int _deltaX, _deltaY;
- int _mapWidth, _mapHeight;
- int _byteWidth;
- const byte *_data;
-};
-
-/*
- * Enumerates the directions the dragon can look into when arrived.
- */
-enum SightDirection {
- kDirectionLast, kDirectionMouse, kDirectionUnknown,
- kDirectionRight, kDirectionLeft, kDirectionIntelligent
-};
-
struct GameObject {
uint _init, _look, _use, _canUse;
bool _imInit, _imLook, _imUse;
@@ -201,6 +151,7 @@ struct Room {
int _roomNum;
byte _music;
WalkingMap _walkingMap;
+ int _mapID;
int _palette;
int _numOverlays;
int _init, _look, _use, _canUse;
@@ -227,18 +178,6 @@ enum LoopSubstatus {
kSubstatusStrange
};
-/**
- * Enumerates the animations for the dragon's movement.
- */
-enum Movement {
- kMoveUndefined = -1,
- kMoveDown, kMoveUp, kMoveRight, kMoveLeft,
- kMoveRightDown, kMoveRightUp, kMoveLeftDown, kMoveLeftUp,
- kMoveDownRight, kMoveUpRight, kMoveDownLeft, kMoveUpLeft,
- kMoveLeftRight, kMoveRightLeft, kMoveUpStopLeft, kMoveUpStopRight,
- kSpeakRight, kSpeakLeft, kStopRight, kStopLeft
-};
-
class Game {
public:
Game(DraciEngine *vm);
@@ -281,7 +220,7 @@ public:
int loadAnimation(uint animNum, uint z);
void loadOverlays();
void loadObject(uint numObj);
- void loadWalkingMap(int mapID = kDefaultRoomMap);
+ void loadWalkingMap(int mapID);
void loadItem(int itemID);
uint getNumObjects() const;