aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/kyra/lol.cpp10
-rw-r--r--engines/kyra/lol.h2
-rw-r--r--engines/kyra/staticres.cpp2
3 files changed, 5 insertions, 9 deletions
diff --git a/engines/kyra/lol.cpp b/engines/kyra/lol.cpp
index 31a25895a5..21b44f99f6 100644
--- a/engines/kyra/lol.cpp
+++ b/engines/kyra/lol.cpp
@@ -3370,7 +3370,7 @@ void LoLEngine::displayAutomap() {
_screen->fadePalette(_screen->getPalette(3), 10);
_smoothScrollTimer = _system->getMillis() + 8 * _tickLength;
- while (!exitAutomap) {
+ while (!exitAutomap && !shouldQuit()) {
if (_mapUpdateNeeded) {
drawMapPage(2);
_screen->copyPage(2, 0);
@@ -3660,10 +3660,8 @@ void LoLEngine::automapForwardButton() {
if (i == _currentMapLevel)
return;
- for (int l = 0; l < 11; l++) {
+ for (int l = 0; l < 11; l++)
_defaultLegendData[l].enable = false;
- _defaultLegendData[l].shapeIndex = 255;
- }
_currentMapLevel = i;
loadLevelWallData(i, false);
@@ -3679,10 +3677,8 @@ void LoLEngine::automapBackButton() {
if (i == _currentMapLevel)
return;
- for (int l = 0; l < 11; l++) {
+ for (int l = 0; l < 11; l++)
_defaultLegendData[l].enable = false;
- _defaultLegendData[l].shapeIndex = 255;
- }
_currentMapLevel = i;
loadLevelWallData(i, false);
diff --git a/engines/kyra/lol.h b/engines/kyra/lol.h
index 525b763a67..14f9a59e58 100644
--- a/engines/kyra/lol.h
+++ b/engines/kyra/lol.h
@@ -256,7 +256,7 @@ struct LevelTempData {
struct MapLegendData {
uint8 shapeIndex;
bool enable;
- uint8 x;
+ int8 x;
uint16 stringId;
};
diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp
index c4e193f87f..2d75705a9b 100644
--- a/engines/kyra/staticres.cpp
+++ b/engines/kyra/staticres.cpp
@@ -1844,7 +1844,7 @@ void LoLEngine::initStaticResource() {
for (int i = 0; i < tmpSize; i++) {
_defaultLegendData[i].shapeIndex = *tmp++;
_defaultLegendData[i].enable = *tmp++ ? true : false;
- _defaultLegendData[i].x = *tmp++;
+ _defaultLegendData[i].x = (int8)*tmp++;
_defaultLegendData[i].stringId = READ_LE_UINT16(tmp);
tmp += 2;
}