diff options
author | Filippos Karapetis | 2011-12-24 01:00:57 +0200 |
---|---|---|
committer | Filippos Karapetis | 2011-12-24 01:02:43 +0200 |
commit | 1cb1df369953b6bc9cfac555cc165cb972c96f8f (patch) | |
tree | e272bd64b3429dfcc20f4df51a891d738739daf7 | |
parent | c3fad04dea55afe9412c7518c71fea22a0b9819b (diff) | |
download | scummvm-rg350-1cb1df369953b6bc9cfac555cc165cb972c96f8f.tar.gz scummvm-rg350-1cb1df369953b6bc9cfac555cc165cb972c96f8f.tar.bz2 scummvm-rg350-1cb1df369953b6bc9cfac555cc165cb972c96f8f.zip |
DREAMWEB: Port 'incryanpage' to C++
-rwxr-xr-x | devtools/tasmrecover/tasm-recover | 1 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.cpp | 34 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.h | 1 | ||||
-rw-r--r-- | engines/dreamweb/stubs.cpp | 19 | ||||
-rw-r--r-- | engines/dreamweb/stubs.h | 1 |
5 files changed, 21 insertions, 35 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover index bebdc1446e..b75b0d363d 100755 --- a/devtools/tasmrecover/tasm-recover +++ b/devtools/tasmrecover/tasm-recover @@ -516,6 +516,7 @@ generator = cpp(context, "DreamGen", blacklist = [ 'hotelbell', 'hotelcontrol', 'identifyob', + 'incryanpage', 'initialinv', 'initialmoncols', 'initman', diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index 265b215af6..17f862c411 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -284,40 +284,6 @@ findopen2a: goto findopen1a; } -void DreamGenContext::incRyanPage() { - STACK_CHECK; - _cmp(data.byte(kCommandtype), 222); - if (flags.z()) - goto alreadyincryan; - data.byte(kCommandtype) = 222; - al = 31; - commandOnly(); -alreadyincryan: - ax = data.word(kMousebutton); - _cmp(ax, data.word(kOldbutton)); - if (flags.z()) - return /* (noincryan) */; - _and(ax, 1); - if (!flags.z()) - goto doincryan; - return; -doincryan: - ax = data.word(kMousex); - _sub(ax, (80)+167); - data.byte(kRyanpage) = -1; -findnewpage: - _inc(data.byte(kRyanpage)); - _sub(ax, 18); - if (!flags.c()) - goto findnewpage; - delPointer(); - fillRyan(); - readMouse(); - showPointer(); - workToScreen(); - delPointer(); -} - void DreamGenContext::getObTextStart() { STACK_CHECK; es = data.word(kFreedesc); diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index f836b58577..b620b2179d 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -486,7 +486,6 @@ public: void read(); void searchForString(); void selectOpenOb(); - void incRyanPage(); void searchForFiles(); void getExAd(); void swapWithInv(); diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index b302bce18b..9efb49b873 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -3769,4 +3769,23 @@ void DreamGenContext::edensFlatReminders() { data.byte(kProgresspoints)++; // got card } +void DreamGenContext::incRyanPage() { + if (data.byte(kCommandtype) != 222) { + data.byte(kCommandtype) = 222; + commandOnly(31); + } + + if (data.word(kMousebutton) == data.word(kOldbutton) || (data.word(kMousebutton) & 1)) + return; + + data.byte(kRyanpage) = (data.word(kMousex) - (kInventx + 167)) / 18; + + delPointer(); + fillRyan(); + readMouse(); + showPointer(); + workToScreenCPP(); + delPointer(); + +} } // End of namespace DreamGen diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index a58bb259be..83b4ebfcae 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -338,5 +338,6 @@ void inToInv(); void outOfInv(); void edensFlatReminders(); + void incRyanPage(); #endif |