aboutsummaryrefslogtreecommitdiff
path: root/engines/dreamweb
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2011-12-13 10:36:50 +0100
committerWillem Jan Palenstijn2011-12-13 10:45:07 +0100
commitfb66ae3698f75ccfd7ac541b85e1646596fca968 (patch)
treee0fdfa4e8137b8d727ebaaad5fe850799523d653 /engines/dreamweb
parentd124e25cfe6b022c7030842493065fa91c616bd5 (diff)
downloadscummvm-rg350-fb66ae3698f75ccfd7ac541b85e1646596fca968.tar.gz
scummvm-rg350-fb66ae3698f75ccfd7ac541b85e1646596fca968.tar.bz2
scummvm-rg350-fb66ae3698f75ccfd7ac541b85e1646596fca968.zip
DREAMWEB: Fix regression in selecSlot
Diffstat (limited to 'engines/dreamweb')
-rw-r--r--engines/dreamweb/stubs.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 6dc74b7309..a7d65845e1 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -4488,15 +4488,12 @@ void DreamGenContext::selectSlot() {
data.byte(kLoadingorsave)--;
oldToNames();
- uint16 y = data.word(kMousey) - (kOpsy + 4);
- byte currentSlot = (byte)-1;
-
- do {
- currentSlot++;
- y -= 11;
- } while (y >= 11);
+ int y = data.word(kMousey) - (kOpsy + 4);
+ if (y < 11)
+ data.byte(kCurrentslot) = 0;
+ else
+ data.byte(kCurrentslot) = y / 11;
- data.byte(kCurrentslot) = currentSlot;
delPointer();
showOpBox();
showSlots();