aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStrangerke2016-05-12 07:59:20 +0200
committerStrangerke2016-05-12 07:59:20 +0200
commit9c0808237c3c4cb8a93a31cad8bf939396415fd1 (patch)
treee21b815f7f6b2a00ba3bfca2a6800569078e6591
parentaf1cf151de9ffc9d040a4e52b57fe3dfd754969b (diff)
downloadscummvm-rg350-9c0808237c3c4cb8a93a31cad8bf939396415fd1.tar.gz
scummvm-rg350-9c0808237c3c4cb8a93a31cad8bf939396415fd1.tar.bz2
scummvm-rg350-9c0808237c3c4cb8a93a31cad8bf939396415fd1.zip
GNAP: Remove _id from HotSpot structure
-rw-r--r--engines/gnap/gnap.cpp4
-rw-r--r--engines/gnap/gnap.h1
-rw-r--r--engines/gnap/menu.cpp20
3 files changed, 1 insertions, 24 deletions
diff --git a/engines/gnap/gnap.cpp b/engines/gnap/gnap.cpp
index d9c0971d8c..3b5d1496e0 100644
--- a/engines/gnap/gnap.cpp
+++ b/engines/gnap/gnap.cpp
@@ -326,7 +326,6 @@ void GnapEngine::setHotspot(int index, int16 x1, int16 y1, int16 x2, int16 y2, u
int16 walkX, int16 walkY) {
_hotspots[index]._rect = Common::Rect(x1, y1, x2, y2);
_hotspots[index]._flags = flags;
- _hotspots[index]._id = index;
_hotspotsWalkPos[index].x = walkX;
_hotspotsWalkPos[index].y = walkY;
}
@@ -388,7 +387,7 @@ int GnapEngine::getClickedHotspotId() {
if (hotspotIndex >= 0) {
_mouseClickState._left = false;
_timers[3] = 300;
- result = _hotspots[hotspotIndex]._id;
+ result = hotspotIndex;
}
}
return result;
@@ -577,7 +576,6 @@ void GnapEngine::setDeviceHotspot(int hotspotIndex, int x1, int y1, int x2, int
_hotspots[hotspotIndex]._rect = Common::Rect(_deviceX1, _deviceY1, _deviceX2, _deviceY2);
_hotspots[hotspotIndex]._flags = SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR;
- _hotspots[hotspotIndex]._id = hotspotIndex;
}
int GnapEngine::getSequenceTotalDuration(int resourceId) {
diff --git a/engines/gnap/gnap.h b/engines/gnap/gnap.h
index 45ac584a26..d379a263b9 100644
--- a/engines/gnap/gnap.h
+++ b/engines/gnap/gnap.h
@@ -68,7 +68,6 @@ struct MouseButtonState {
struct Hotspot {
Common::Rect _rect;
uint16 _flags;
- int _id;
bool isPointInside(Common::Point pos) const {
return _rect.contains(pos);
diff --git a/engines/gnap/menu.cpp b/engines/gnap/menu.cpp
index 78bffefa1e..21ea8d4a67 100644
--- a/engines/gnap/menu.cpp
+++ b/engines/gnap/menu.cpp
@@ -50,24 +50,20 @@ void GnapEngine::initMenuHotspots1() {
for (int j = 0; j < 3; ++j) {
_hotspots[curId]._rect = Common::Rect(87 * j + 262, 74 * i + 69, _hotspots[curId]._rect.left + 79, _hotspots[curId]._rect.top + 66);
_hotspots[curId]._flags = SF_NONE;
- _hotspots[curId]._id = curId;
++curId;
}
}
_hotspots[curId]._rect = Common::Rect(330, 350, 430, 460);
_hotspots[curId]._flags = SF_GRAB_CURSOR;
- _hotspots[curId]._id = curId;
++curId;
_hotspots[curId]._rect = Common::Rect(180, 15, 620, 580);
_hotspots[curId]._flags = SF_NONE;
- _hotspots[curId]._id = curId;
++curId;
_hotspots[curId]._rect = Common::Rect(0, 0, 799, 599);
_hotspots[curId]._flags = SF_NONE;
- _hotspots[curId]._id = curId;
_hotspotsCount = curId + 1;
}
@@ -78,28 +74,23 @@ void GnapEngine::initMenuHotspots2() {
for (int i = 0; i < 4; ++i) {
_hotspots[curId]._rect = Common::Rect(312, 48 * i + 85, _hotspots[curId]._rect.left + 153, _hotspots[curId]._rect.top + 37);
_hotspots[curId]._flags = SF_GRAB_CURSOR;
- _hotspots[curId]._id = curId;
++curId;
}
_hotspots[curId]._rect = Common::Rect(500, 72, 527, 99);
_hotspots[curId]._flags = SF_DISABLED;
- _hotspots[curId]._id = curId;
++curId;
_hotspots[curId]._rect = Common::Rect(330, 350, 430, 460);
_hotspots[curId]._flags = SF_GRAB_CURSOR;
- _hotspots[curId]._id = curId;
++curId;
_hotspots[curId]._rect = Common::Rect(180, 15, 620, 580);
_hotspots[curId]._flags = SF_NONE;
- _hotspots[curId]._id = curId;
++curId;
_hotspots[curId]._rect = Common::Rect(0, 0, 799, 599);
_hotspots[curId]._flags = SF_NONE;
- _hotspots[curId]._id = curId;
_hotspotsCount = curId + 1;
}
@@ -107,23 +98,18 @@ void GnapEngine::initMenuHotspots2() {
void GnapEngine::initMenuQuitQueryHotspots() {
_hotspots[0]._rect = Common::Rect(311, 197, 377, 237);
_hotspots[0]._flags = SF_GRAB_CURSOR;
- _hotspots[0]._id = 0;
_hotspots[1]._rect = Common::Rect(403, 197, 469, 237);
_hotspots[1]._flags = SF_GRAB_CURSOR;
- _hotspots[1]._id = 1;
_hotspots[2]._rect = Common::Rect(330, 350, 430, 460);
_hotspots[2]._flags = SF_GRAB_CURSOR;
- _hotspots[2]._id = 2;
_hotspots[3]._rect = Common::Rect(180, 15, 620, 580);
_hotspots[3]._flags = SF_NONE;
- _hotspots[3]._id = 3;
_hotspots[4]._rect = Common::Rect(0, 0, 799, 599);
_hotspots[4]._flags = SF_NONE;
- _hotspots[4]._id = 4;
_hotspotsCount = 5;
}
@@ -134,35 +120,29 @@ void GnapEngine::initSaveLoadHotspots() {
for (int i = 0; i < 7; ++i ) {
_hotspots[curId]._rect = Common::Rect(288, 31 * i + 74, _hotspots[curId]._rect.left + 91, _hotspots[curId]._rect.top + 22);
_hotspots[curId]._flags = SF_GRAB_CURSOR;
- _hotspots[curId]._id = curId;
++curId;
}
if (_menuStatus == 2) {
_hotspots[curId]._rect = Common::Rect(416, 160, 499, 188);
_hotspots[curId]._flags = SF_GRAB_CURSOR;
- _hotspots[curId]._id = curId;
++curId;
}
_hotspots[curId]._rect = Common::Rect(416, 213, 499, 241);
_hotspots[curId]._flags = SF_GRAB_CURSOR;
- _hotspots[curId]._id = curId;
++curId;
_hotspots[curId]._rect = Common::Rect(330, 350, 430, 460);
_hotspots[curId]._flags = SF_GRAB_CURSOR;
- _hotspots[curId]._id = curId;
++curId;
_hotspots[curId]._rect = Common::Rect(180, 15, 620, 580);
_hotspots[curId]._flags = SF_NONE;
- _hotspots[curId]._id = curId;
++curId;
_hotspots[curId]._rect = Common::Rect(0, 0, 799, 599);
_hotspots[curId]._flags = SF_NONE;
- _hotspots[curId]._id = curId;
_hotspotsCount = curId + 1;
}