diff options
-rw-r--r-- | engines/dreamweb/stubs.cpp | 13 |
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(); |