diff options
author | Bertrand Augereau | 2011-11-23 15:49:49 +0100 |
---|---|---|
committer | Bertrand Augereau | 2011-11-23 16:25:38 +0100 |
commit | 658fe0aa106603a662cbb6ccd382e5a89ecf1142 (patch) | |
tree | 2a0c376219d090f66c6e694c15af839225f9d7fd /engines/dreamweb | |
parent | 7843073c0eba240e5270be90c87bb708cce2d2cc (diff) | |
download | scummvm-rg350-658fe0aa106603a662cbb6ccd382e5a89ecf1142.tar.gz scummvm-rg350-658fe0aa106603a662cbb6ccd382e5a89ecf1142.tar.bz2 scummvm-rg350-658fe0aa106603a662cbb6ccd382e5a89ecf1142.zip |
DREAMWEB: 'look' ported to C++
Diffstat (limited to 'engines/dreamweb')
-rw-r--r-- | engines/dreamweb/dreamgen.cpp | 25 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.h | 5 | ||||
-rw-r--r-- | engines/dreamweb/stubs.cpp | 13 | ||||
-rw-r--r-- | engines/dreamweb/stubs.h | 1 |
4 files changed, 16 insertions, 28 deletions
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index 34fa14c1c0..0a69411ee5 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -4894,31 +4894,6 @@ void DreamGenContext::drawfloor() { es = pop(); } -void DreamGenContext::look() { - STACK_CHECK; - _cmp(data.word(kWatchingtime), 0); - if (!flags.z()) - { blank(); return; }; - _cmp(data.byte(kPointermode), 2); - if (flags.z()) - { blank(); return; }; - _cmp(data.byte(kCommandtype), 241); - if (flags.z()) - goto alreadylook; - data.byte(kCommandtype) = 241; - al = 25; - commandonly(); -alreadylook: - _cmp(data.word(kMousebutton), 1); - if (!flags.z()) - return /* (nolook) */; - ax = data.word(kMousebutton); - _cmp(ax, data.word(kOldbutton)); - if (flags.z()) - return /* (nolook) */; - dolook(); -} - void DreamGenContext::dolook() { STACK_CHECK; createpanel(); diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index 606961c84c..462a2b00fa 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -377,7 +377,6 @@ public: static const uint16 addr_getback1 = 0xc47c; static const uint16 addr_redrawmainscrn = 0xc478; static const uint16 addr_dolook = 0xc474; - static const uint16 addr_look = 0xc470; static const uint16 addr_drawfloor = 0xc428; static const uint16 addr_deleteextext = 0xc420; static const uint16 addr_deleteexframe = 0xc41c; @@ -1477,6 +1476,7 @@ public: //void quickquit(); //void showpointer(); void usecooker(); + //void look(); void loadmenu(); void checkforemm(); //void checkifpathison(); @@ -1662,7 +1662,7 @@ public: //void showcurrentfile(); //void turnpathoff(); //void copyname(); - void look(); + //void madmantext(); void setmouse(); //void checkone(); //void transferinv(); @@ -1682,7 +1682,6 @@ public: void dmaend(); //void quickquit2(); //void twodigitnum(); - //void madmantext(); void dumpcurrent(); //void textforend(); void showdiarykeys(); diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index bd3439a77b..60fdf5d342 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -2274,5 +2274,18 @@ void DreamGenContext::autolook() { dolook(); } +void DreamGenContext::look() { + if (data.word(kWatchingtime) || (data.byte(kPointermode) == 2)) { + blank(); + return; + } + if (data.byte(kCommandtype) != 241) { + data.byte(kCommandtype) = 241; + commandonly(25); + } + if ((data.word(kMousebutton) == 1) && (data.word(kMousebutton) != data.word(kOldbutton))) + dolook(); +} + } /*namespace dreamgen */ diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index 39d1758974..42acc88131 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -332,5 +332,6 @@ void findroominloc(); void reelsonscreen(); void reconstruct(); + void look(); void autolook(); |