diff options
author | Filippos Karapetis | 2011-12-16 22:47:33 +0200 |
---|---|---|
committer | Filippos Karapetis | 2011-12-16 22:47:33 +0200 |
commit | 2887686d56544e6edfaf401c0aab5203be3c1ccc (patch) | |
tree | 931a093d8d6cedc6e1e5332b1fa8115384b5063f /engines | |
parent | 984010faae5d7cac0cef8f74229f9761cf7dd934 (diff) | |
download | scummvm-rg350-2887686d56544e6edfaf401c0aab5203be3c1ccc.tar.gz scummvm-rg350-2887686d56544e6edfaf401c0aab5203be3c1ccc.tar.bz2 scummvm-rg350-2887686d56544e6edfaf401c0aab5203be3c1ccc.zip |
DREAMWEB: Port 'showslots' to C++
Diffstat (limited to 'engines')
-rw-r--r-- | engines/dreamweb/dreamgen.cpp | 33 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.h | 3 | ||||
-rw-r--r-- | engines/dreamweb/stubs.cpp | 14 | ||||
-rw-r--r-- | engines/dreamweb/stubs.h | 1 |
4 files changed, 15 insertions, 36 deletions
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index ddc599f7e8..b756c39bbf 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -3004,39 +3004,6 @@ gotkeyp: showDiaryPage(); } -void DreamGenContext::showSlots() { - STACK_CHECK; - di = (60)+7; - bx = (52)+8; - al = 2; - ds = data.word(kTempgraphics); - ah = 0; - showFrame(); - di = (60)+10; - bx = (52)+11; - cl = 0; -slotloop: - push(cx); - push(di); - push(bx); - _cmp(cl, data.byte(kCurrentslot)); - if (!flags.z()) - goto nomatchslot; - al = 3; - ds = data.word(kTempgraphics); - ah = 0; - showFrame(); -nomatchslot: - bx = pop(); - di = pop(); - cx = pop(); - _add(bx, 10); - _inc(cl); - _cmp(cl, 7); - if (!flags.z()) - goto slotloop; -} - void DreamGenContext::clearBuffers() { STACK_CHECK; es = data.word(kBuffers); diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index 5273270ce5..05e7c856df 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -479,7 +479,7 @@ public: void clearBuffers(); void getObTextStart(); void checkObjectSize(); - void showSlots(); + void fillOpen(); void useCashCard(); void moneyPoke(); void doSomeTalk(); @@ -518,7 +518,6 @@ public: void rollEm(); void lookAtPlace(); void findAllOpen(); - void fillOpen(); void deleteExObject(); void getEitherAd(); void setPickup(); diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index 2279d9ffbe..fb5fba8d9c 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -3927,7 +3927,6 @@ void DreamGenContext::talk() { } } - void DreamGenContext::discOps() { if (data.byte(kCommandtype) != 249) { data.byte(kCommandtype) = 249; @@ -4564,4 +4563,17 @@ void DreamGenContext::lookAtCard() { putBackObStuff(); } +void DreamGenContext::showSlots() { + showFrame(tempGraphics(), kOpsx + 7, kOpsy + 8, 2, 0); + + uint16 y = kOpsy + 11; + + for (int slot = 0; slot < 7; slot++) { + if (slot == data.byte(kCurrentslot)) + showFrame(tempGraphics(), kOpsx + 10, y, 3, 0); + + y += 10; + } +} + } // End of namespace DreamGen diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index 6140f3d0d4..741abd807f 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -393,5 +393,6 @@ void notHeldError(); void useGun(); void identifyOb(); + void showSlots(); #endif |