aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Kagerer2009-04-04 22:49:14 +0000
committerFlorian Kagerer2009-04-04 22:49:14 +0000
commit7bd305397bf994f2e7a954fe61432f719d07aa3c (patch)
tree84bd1d867bf34eadd75722c114a760f86b2f55d7
parent44fa38b2afa2279a19a09a973dc157606b865008 (diff)
downloadscummvm-rg350-7bd305397bf994f2e7a954fe61432f719d07aa3c.tar.gz
scummvm-rg350-7bd305397bf994f2e7a954fe61432f719d07aa3c.tar.bz2
scummvm-rg350-7bd305397bf994f2e7a954fe61432f719d07aa3c.zip
LOL: fix magic atlas back/forward buttons
svn-id: r39853
-rw-r--r--engines/kyra/lol.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/engines/kyra/lol.cpp b/engines/kyra/lol.cpp
index 6034639114..97ba9cb9bd 100644
--- a/engines/kyra/lol.cpp
+++ b/engines/kyra/lol.cpp
@@ -2311,11 +2311,11 @@ bool LoLEngine::automapProcessButtons(int inputFlag) {
}
void LoLEngine::automapForwardButton() {
- int i = (_currentMapLevel + 1) & 0x1f;
- for (; !(_hasTempDataFlags & (1 << (i - 1))); i++) {
- if (i >= 32 || i == _currentMapLevel)
- return;
- }
+ int i = _currentMapLevel + 1;
+ while (!(_hasTempDataFlags & (1 << (i - 1))))
+ i = (i + 1) & 0x1f;
+ if (i == _currentMapLevel)
+ return;
for (int l = 0; l < 11; l++) {
_defaultLegendData[l].enable = false;
@@ -2330,11 +2330,11 @@ void LoLEngine::automapForwardButton() {
}
void LoLEngine::automapBackButton() {
- int i = (_currentMapLevel - 1) & 0x1f;
- for (; !(_hasTempDataFlags & (1 << (i - 1))); i--) {
- if (i < 0 || i == _currentMapLevel)
- return;
- }
+ int i = _currentMapLevel - 1;
+ while (!(_hasTempDataFlags & (1 << (i - 1))))
+ i = (i - 1) & 0x1f;
+ if (i == _currentMapLevel)
+ return;
for (int l = 0; l < 11; l++) {
_defaultLegendData[l].enable = false;