Really fixing searchHotspot, syntax-wise at least. (Note: Hotspots::Hotspot::left is unsigned, so a comparison with -1 will always yield false. And for left == 0xFFFF a method already exists, Hotspots::Hotspot::isEnd())

svn-id: r44022
This commit is contained in:
Sven Hesse 2009-09-09 23:10:53 +00:00
parent 3259a6f0b5
commit ae3cc2ca5f

View file

@ -1567,7 +1567,7 @@ int16 Hotspots::findCursor(uint16 x, uint16 y) const {
bool Hotspots::searchHotspot(int16 shortId) const {
for (int i = 0; i < kHotspotCount; i++) {
if (_hotspots[i].left == -1)
if (_hotspots[i].isEnd())
return false;
if ((_hotspots[i].id == 0xD000 + shortId) || (_hotspots[i].id == 0xB000 + shortId) || (_hotspots[i].id == 0x4000 + shortId))
return true;