aboutsummaryrefslogtreecommitdiff
path: root/engines/dreamweb/stubs.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2011-12-13 00:53:36 +0200
committerFilippos Karapetis2011-12-13 00:54:51 +0200
commitc452bf9c1268155bd896b2f42c003c8eda110e84 (patch)
tree716d2fb12686cd8cbc3791a92290fe0de48baa62 /engines/dreamweb/stubs.cpp
parent6d2723400662c2b7d75bf6317807770b4d370caf (diff)
downloadscummvm-rg350-c452bf9c1268155bd896b2f42c003c8eda110e84.tar.gz
scummvm-rg350-c452bf9c1268155bd896b2f42c003c8eda110e84.tar.bz2
scummvm-rg350-c452bf9c1268155bd896b2f42c003c8eda110e84.zip
DREAMWEB: Port 'selectslot' to C++
Diffstat (limited to 'engines/dreamweb/stubs.cpp')
-rw-r--r--engines/dreamweb/stubs.cpp35
1 files changed, 35 insertions, 0 deletions
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index e52ccf03f3..97dad08298 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -4476,4 +4476,39 @@ void DreamGenContext::entryAnims() {
}
}
+void DreamGenContext::selectSlot() {
+ if (data.byte(kCommandtype) != 244) {
+ data.byte(kCommandtype) = 244;
+ commandOnly(45);
+ }
+
+ if (data.word(kMousebutton) != 1 || data.word(kMousebutton) == data.word(kOldbutton))
+ return; // noselslot
+ if (data.byte(kLoadingorsave) == 3)
+ data.byte(kLoadingorsave)--;
+
+ oldToNames();
+ uint16 y = data.word(kMousey) - (kOpsy + 4);
+ byte currentSlot = (byte)-1;
+
+ do {
+ currentSlot++;
+ y -= 11;
+ } while (y >= 11);
+
+ data.byte(kCurrentslot) = currentSlot;
+ delPointer();
+ showOpBox();
+ showSlots();
+ showNames();
+ if (data.byte(kLoadingorsave) == 1)
+ showLoadOps();
+ else
+ showSaveOps();
+ readMouse();
+ showPointer();
+ workToScreen();
+ delPointer();
+}
+
} // End of namespace DreamGen