26 #include "common/scummsys.h" 27 #include "lure/disk.h" 29 #include "lure/memory.h" 30 #include "lure/surface.h" 31 #include "lure/screen.h" 32 #include "lure/hotspots.h" 37 #define NUM_HORIZ_RECTS 10 38 #define NUM_VERT_RECTS 6 39 #define FULL_HORIZ_RECTS 18 40 #define FULL_VERT_RECTS 14 41 #define NUM_EDGE_RECTS 4 42 #define GRID_SIZE (FULL_VERT_RECTS * FULL_HORIZ_RECTS) 46 byte _cells[FULL_VERT_RECTS][FULL_HORIZ_RECTS];
49 RoomLayer(uint16 screenId,
bool backgroundLayer);
50 bool isOccupied(byte cellX, byte cellY) {
51 return _cells[cellY][cellX] < 0xfe;
53 uint8 getCell(byte cellX, byte cellY) {
54 return _cells[cellY][cellX];
56 void setCell(byte cellX, byte cellY, byte value) {
57 _cells[cellY][cellX] = value;
59 uint16 paletteId() {
return _paletteId; }
62 enum CursorState {CS_NONE, CS_ACTION, CS_SEQUENCE, CS_TALKING, CS_BUMPED};
71 uint16 _hotspotNameId;
72 uint16 _destRoomNumber;
74 char _hotspotName[MAX_HOTSPOT_NAME_SIZE + MAX_ACTION_NAME_SIZE];
75 char _statusLine[MAX_DESC_SIZE];
81 int16 _talkDialogX, _talkDialogY;
82 CursorState _cursorState;
84 void checkRoomHotspots();
85 CursorType checkRoomExits();
86 void loadRoomHotspots();
89 void addCell(int16 xp, int16 yp,
int layerNum);
91 void layersPostProcess();
93 RoomPathsDecompressedData tempLayer;
96 static Room &getReference();
101 uint16 roomNumber() {
return _roomNumber; }
102 void setRoomNumber(uint16 newRoomNumber,
bool showOverlay =
false);
104 uint8 numLayers() {
return _numLayers; }
105 uint16 hotspotId() {
return _hotspotId; }
106 uint16 destRoomNumber() {
return _destRoomNumber; }
107 uint16 isExit() {
return _isExit; }
108 uint32 hotspotActions() {
return _hotspot->actions & 0x10ffffff; }
109 uint8 hotspotFlags() {
return (_hotspot->actions >> 24) & 0xfe; }
111 uint16 descId() {
return _descId; }
112 bool showInfo() {
return _showInfo; }
113 CursorState cursorState() {
return _cursorState; }
114 void setShowInfo(
bool value) { _showInfo = value; }
115 void setTalkDialog(uint16 srcCharacterId, uint16 destCharacterId, uint16 usedId, uint16 stringId);
116 TalkDialog *talkDialog() {
return _talkDialog; }
117 void setCursorState(CursorState state) { _cursorState = state; }
118 bool isDialogActive() {
return _talkDialog != NULL; }
119 bool isDialogShowing() {
120 Resources &res = Resources::getReference();
121 Hotspot *talkCharacter = res.getActiveHotspot(res.getTalkingCharacter());
122 return isDialogActive() && (talkCharacter != NULL) && (talkCharacter->roomNumber() == _roomNumber);
124 bool checkInTalkDialog();
125 char *statusLine() {
return _statusLine; }
Definition: res_struct.h:513
Definition: hotspots.h:180
Definition: res_struct.h:313