[Scummvm-cvs-logs] SF.net SVN: scummvm: [21783] scummvm/trunk/engines/lure

dreammaster at users.sourceforge.net dreammaster at users.sourceforge.net
Tue Apr 11 03:51:00 CEST 2006


Revision: 21783
Author:   dreammaster
Date:     2006-04-11 03:50:18 -0700 (Tue, 11 Apr 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=21783&view=rev

Log Message:
-----------
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

Modified Paths:
--------------
    scummvm/trunk/engines/lure/room.cpp
    scummvm/trunk/engines/lure/room.h
Modified: scummvm/trunk/engines/lure/room.cpp
===================================================================
--- scummvm/trunk/engines/lure/room.cpp	2006-04-11 10:48:28 UTC (rev 21782)
+++ scummvm/trunk/engines/lure/room.cpp	2006-04-11 10:50:18 UTC (rev 21783)
@@ -82,6 +82,7 @@
 	_numLayers = 0;
 	_showInfo = false;
 	_isExit = false;
+	_destRoomNumber = 0;
 }
 
 Room::~Room() {
@@ -198,6 +199,7 @@
 		_hotspot = entry;
 		_hotspotId = entry->hotspotId;
 		_isExit = false;
+		_destRoomNumber = 0;
 	}
 }
 
@@ -225,6 +227,7 @@
 			(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 @@
 		}
 	}
 
-	// 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);
+				}
+			}
+		}
 	}
 }
 

Modified: scummvm/trunk/engines/lure/room.h
===================================================================
--- scummvm/trunk/engines/lure/room.h	2006-04-11 10:48:28 UTC (rev 21782)
+++ scummvm/trunk/engines/lure/room.h	2006-04-11 10:50:18 UTC (rev 21783)
@@ -59,6 +59,7 @@
 	uint16 _descId;
 	uint16 _hotspotId;
 	uint16 _hotspotNameId;
+	uint16 _destRoomNumber;
 	bool _isExit;
 	char _hotspotName[MAX_HOTSPOT_NAME_SIZE + MAX_ACTION_NAME_SIZE];
 	HotspotData *_hotspot;
@@ -78,6 +79,7 @@
 	void addLayers(Hotspot &h);
 	void addCell(int16 xp, int16 yp, int layerNum);
 public:
+	RoomPathsDecompressedData tempLayer;
 	Room();
 	~Room();
 	static Room &getReference();
@@ -89,6 +91,7 @@
 	void setRoomNumber(uint16 newRoomNumber, bool showOverlay = false);
 	void leaveRoom();
 	uint16 hotspotId() { return _hotspotId; }
+	uint16 destRoomNumber() { return _destRoomNumber; }
 	uint16 isExit() { return _isExit; }
 	uint32 hotspotActions() { return _hotspot->actions & 0x10ffffff; }
 	uint8 hotspotFlags() { return (_hotspot->actions >> 24) & 0xfe; }


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.





More information about the Scummvm-git-logs mailing list