diff options
author | Bertrand Augereau | 2011-08-16 04:01:40 +0200 |
---|---|---|
committer | Bertrand Augereau | 2011-08-16 04:26:27 +0200 |
commit | 5783a303b90255be3d8d8b354c7bdb2c10a7e46f (patch) | |
tree | 585c29cf7b3bb099787602a89f88d60e53963d19 | |
parent | 1fb3cb182f6b71a681c646d35e56322de3e38660 (diff) | |
download | scummvm-rg350-5783a303b90255be3d8d8b354c7bdb2c10a7e46f.tar.gz scummvm-rg350-5783a303b90255be3d8d8b354c7bdb2c10a7e46f.tar.bz2 scummvm-rg350-5783a303b90255be3d8d8b354c7bdb2c10a7e46f.zip |
DREAMWEB: 'madmode' ported to C++
-rwxr-xr-x | devtools/tasmrecover/tasm-recover | 1 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.cpp | 14 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.h | 3 | ||||
-rw-r--r-- | engines/dreamweb/sprite.cpp | 10 | ||||
-rw-r--r-- | engines/dreamweb/stubs.h | 1 |
5 files changed, 13 insertions, 16 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover index 376e2dc39f..937a8eb671 100755 --- a/devtools/tasmrecover/tasm-recover +++ b/devtools/tasmrecover/tasm-recover @@ -113,6 +113,7 @@ generator = cpp(context, "DreamGen", blacklist = [ 'showpanel', 'updatepeople', 'madmantext', + 'madmode', ], skip_output = [ # These functions are processed but not output 'dreamweb', diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index 34bb64b58c..782de3ceb9 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -1694,19 +1694,6 @@ notendtelly: showgamereel(); } -void DreamGenContext::madmode() { - STACK_CHECK; - data.word(kWatchingtime) = 2; - data.byte(kPointermode) = 0; - _cmp(data.byte(kCombatcount), 65); - if (flags.c()) - return /* (iswatchmad) */; - _cmp(data.byte(kCombatcount), 70); - if (!flags.c()) - return /* (iswatchmad) */; - data.byte(kPointermode) = 2; -} - void DreamGenContext::priesttext() { STACK_CHECK; _cmp(es.word(bx+3), 2); @@ -19069,7 +19056,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) { case addr_priest: priest(); break; case addr_madmanstelly: madmanstelly(); break; case addr_madman: madman(); break; - case addr_madmode: madmode(); break; case addr_priesttext: priesttext(); break; case addr_textforend: textforend(); break; case addr_textformonk: textformonk(); break; diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index be3c1221f6..3a19f816fa 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -654,7 +654,6 @@ public: static const uint16 addr_textformonk = 0xc0f0; static const uint16 addr_textforend = 0xc0ec; static const uint16 addr_priesttext = 0xc0e8; - static const uint16 addr_madmode = 0xc0e4; static const uint16 addr_madman = 0xc0dc; static const uint16 addr_madmanstelly = 0xc0d8; static const uint16 addr_priest = 0xc0d4; @@ -1806,7 +1805,7 @@ public: void textforend(); void showdiarykeys(); void dontloadseg(); - void madmode(); + //void madmode(); void intro3text(); void allocatemem(); void sortoutmap(); diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp index 0da5faa111..971a52fa0c 100644 --- a/engines/dreamweb/sprite.cpp +++ b/engines/dreamweb/sprite.cpp @@ -846,5 +846,15 @@ void DreamGenContext::madman() { madmode(); } +void DreamGenContext::madmode() { + data.word(kWatchingtime) = 2; + data.byte(kPointermode) = 0; + if (data.byte(kCombatcount) < (isCD() ? 65 : 63)) + return; + if (data.byte(kCombatcount) >= (isCD() ? 70 : 68)) + return; + data.byte(kPointermode) = 2; +} + } /*namespace dreamgen */ diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index 81fbf0e1e9..7e7d97e93d 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -129,5 +129,6 @@ void showpanel(); void updatepeople(); void madmantext(); + void madmode(); bool isCD(); |