aboutsummaryrefslogtreecommitdiff
path: root/engines/lure/room.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2006-04-11 10:50:18 +0000
committerPaul Gilbert2006-04-11 10:50:18 +0000
commit4b913261311ba2727f5582e33c90ce5d02d6d680 (patch)
tree0b2647b89f551a1134bbc11f9b578c44f1985fdd /engines/lure/room.cpp
parent169c8d78d11f6e64197b8b2f7e4b616384a3d314 (diff)
downloadscummvm-rg350-4b913261311ba2727f5582e33c90ce5d02d6d680.tar.gz
scummvm-rg350-4b913261311ba2727f5582e33c90ce5d02d6d680.tar.bz2
scummvm-rg350-4b913261311ba2727f5582e33c90ce5d02d6d680.zip
Added a destRoomNumber variable to store which room a highlighted exit goes to, as well as some temporary code used to display pathfinding information onscreen when Toggle Info is turned on
svn-id: r21783
Diffstat (limited to 'engines/lure/room.cpp')
-rw-r--r--engines/lure/room.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/engines/lure/room.cpp b/engines/lure/room.cpp
index 3db3986ef1..dcedde6583 100644
--- a/engines/lure/room.cpp
+++ b/engines/lure/room.cpp
@@ -82,6 +82,7 @@ Room::Room(): _screen(Screen::getReference()) {
_numLayers = 0;
_showInfo = false;
_isExit = false;
+ _destRoomNumber = 0;
}
Room::~Room() {
@@ -198,6 +199,7 @@ void Room::checkRoomHotspots() {
_hotspot = entry;
_hotspotId = entry->hotspotId;
_isExit = false;
+ _destRoomNumber = 0;
}
}
@@ -225,6 +227,7 @@ uint8 Room::checkRoomExits() {
(m.y() >= rec->ys) && (m.y() <= rec->ye)) {
// Cursor is within exit area
uint8 cursorNum = rec->cursorNum;
+ _destRoomNumber = rec->destRoomNumber;
// If it's a hotspotted exit, change arrow to the + arrow
if (rec->hotspotId != 0) {
@@ -433,12 +436,26 @@ void Room::update() {
}
}
- // If show information is turned on, show room and position
+ // If show information is turned on, show extra debugging information
if (_showInfo) {
char buffer[64];
Mouse &m = Mouse::getReference();
sprintf(buffer, "Room %d Pos (%d,%d)", _roomNumber, m.x(), m.y());
s.writeString(FULL_SCREEN_WIDTH / 2, 0, buffer, false, DIALOG_TEXT_COLOUR);
+
+ // Temporary display of pathfinding data
+ for (int yctr = 0; yctr < ROOM_PATHS_HEIGHT; ++yctr) {
+ for (int xctr = 0; xctr < ROOM_PATHS_WIDTH; ++xctr) {
+ uint16 v = tempLayer[(yctr + 1) * DECODED_PATHS_WIDTH + xctr + 1];
+ if ((v != 0) && (v < 100)) {
+ sprintf(buffer, "%d", v % 10);
+ s.writeString(xctr * 8, yctr * 8 + 8, buffer, true);
+ } else if (v == 0xffff) {
+// } else if (_roomData->paths.isOccupied(xctr, yctr)) {
+ s.fillRect(Rect(xctr * 8, yctr * 8 + 8, xctr * 8 + 7, yctr * 8 + 15), 255);
+ }
+ }
+ }
}
}