[Scummvm-cvs-logs] SF.net SVN: scummvm:[39853] scummvm/trunk/engines/kyra/lol.cpp
athrxx at users.sourceforge.net
athrxx at users.sourceforge.net
Sun Apr 5 00:49:14 CEST 2009
Revision: 39853
http://scummvm.svn.sourceforge.net/scummvm/?rev=39853&view=rev
Author: athrxx
Date: 2009-04-04 22:49:14 +0000 (Sat, 04 Apr 2009)
Log Message:
-----------
LOL: fix magic atlas back/forward buttons
Modified Paths:
--------------
scummvm/trunk/engines/kyra/lol.cpp
Modified: scummvm/trunk/engines/kyra/lol.cpp
===================================================================
--- scummvm/trunk/engines/kyra/lol.cpp 2009-04-04 21:10:35 UTC (rev 39852)
+++ scummvm/trunk/engines/kyra/lol.cpp 2009-04-04 22:49:14 UTC (rev 39853)
@@ -2311,11 +2311,11 @@
}
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::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;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list