diff options
author | Bertrand Augereau | 2011-08-25 08:03:27 +0200 |
---|---|---|
committer | Bertrand Augereau | 2011-08-25 08:12:27 +0200 |
commit | 50fdbd34b831243166df98262cadad089e4c292b (patch) | |
tree | 5cd295391a7cd57b2a88fb5195e42a6e1e7d013a /engines/dreamweb | |
parent | 24afa11b352ac4012e25426c3a3858e192fb1299 (diff) | |
download | scummvm-rg350-50fdbd34b831243166df98262cadad089e4c292b.tar.gz scummvm-rg350-50fdbd34b831243166df98262cadad089e4c292b.tar.bz2 scummvm-rg350-50fdbd34b831243166df98262cadad089e4c292b.zip |
DREAMWEB: 'waitframes' ported to C++
Diffstat (limited to 'engines/dreamweb')
-rw-r--r-- | engines/dreamweb/dreamgen.cpp | 21 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.h | 3 | ||||
-rw-r--r-- | engines/dreamweb/print.cpp | 15 | ||||
-rw-r--r-- | engines/dreamweb/stubs.h | 1 |
4 files changed, 14 insertions, 26 deletions
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index aab390748d..721ac526e1 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -3926,26 +3926,6 @@ realcreditsearly: data.byte(kLasthardkey) = 0; } -void DreamGenContext::waitframes() { - STACK_CHECK; - push(di); - push(bx); - push(es); - push(si); - push(ds); - readmouse(); - showpointer(); - vsync(); - dumppointer(); - delpointer(); - ax = data.word(kMousebutton); - ds = pop(); - si = pop(); - es = pop(); - bx = pop(); - di = pop(); -} - void DreamGenContext::monprint() { STACK_CHECK; data.byte(kKerning) = 1; @@ -18109,7 +18089,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) { case addr_mode640x480: mode640x480(); break; case addr_set16colpalette: set16colpalette(); break; case addr_realcredits: realcredits(); break; - case addr_waitframes: waitframes(); break; case addr_monprint: monprint(); break; case addr_fillryan: fillryan(); break; case addr_fillopen: fillopen(); break; diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index 2af08a486f..7fc3091819 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -517,7 +517,6 @@ public: static const uint16 addr_fillopen = 0xc324; static const uint16 addr_fillryan = 0xc320; static const uint16 addr_monprint = 0xc314; - static const uint16 addr_waitframes = 0xc308; static const uint16 addr_realcredits = 0xc2f8; static const uint16 addr_set16colpalette = 0xc2f4; static const uint16 addr_mode640x480 = 0xc2f0; @@ -1917,7 +1916,7 @@ public: void searchforfiles(); void monkspeaking(); void fadecalculation(); - void waitframes(); + //void waitframes(); void clearrest(); //void getreelframeax(); void barwoman(); diff --git a/engines/dreamweb/print.cpp b/engines/dreamweb/print.cpp index 26084c35d1..844ad97f29 100644 --- a/engines/dreamweb/print.cpp +++ b/engines/dreamweb/print.cpp @@ -112,10 +112,10 @@ uint8 DreamGenContext::printslow(const uint8 *string, uint16 x, uint16 y, uint8 printboth(charSet, &offset2, y, c1, c2); data.word(kCharshift) = 0; for (int i=0; i<2; ++i) { - waitframes(); - if (ax == 0) + uint16 mouseState = waitframes(); + if (mouseState == 0) continue; - if (ax != data.word(kOldbutton)) { + if (mouseState != data.word(kOldbutton)) { return 1; } } @@ -220,5 +220,14 @@ void DreamGenContext::kernchars() { cl = kernchars(al, ah, cl); } +uint16 DreamGenContext::waitframes() { + readmouse(); + showpointer(); + vsync(); + dumppointer(); + delpointer(); + return data.word(kMousebutton); +} + } /*namespace dreamgen */ diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index df6401323e..17ee0d8f1f 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -190,4 +190,5 @@ void readmouse2(); void readmouse3(); void readmouse4(); + uint16 waitframes(); |