diff options
author | Bertrand Augereau | 2011-08-17 01:16:05 +0200 |
---|---|---|
committer | Bertrand Augereau | 2011-08-17 01:46:52 +0200 |
commit | ca32fb2b34e36d5d02452d6f6c6c1c9f56f9a6b9 (patch) | |
tree | 1c8fadf3d8f3159a51c1f5debd4369e838dc8885 /engines | |
parent | 8892f2ec709e4565c5cfa10496f9b192a3fe2d9d (diff) | |
download | scummvm-rg350-ca32fb2b34e36d5d02452d6f6c6c1c9f56f9a6b9.tar.gz scummvm-rg350-ca32fb2b34e36d5d02452d6f6c6c1c9f56f9a6b9.tar.bz2 scummvm-rg350-ca32fb2b34e36d5d02452d6f6c6c1c9f56f9a6b9.zip |
DREAMWEB: Ported 'movemap' to C++
Diffstat (limited to 'engines')
-rw-r--r-- | engines/dreamweb/dreamgen.cpp | 35 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.h | 3 | ||||
-rw-r--r-- | engines/dreamweb/sprite.cpp | 21 | ||||
-rw-r--r-- | engines/dreamweb/stubs.cpp | 3 | ||||
-rw-r--r-- | engines/dreamweb/stubs.h | 1 |
5 files changed, 24 insertions, 39 deletions
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index 782de3ceb9..ff15a3e7ac 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -2615,40 +2615,6 @@ notfudge: data.byte(kHavedoneobs) = 0; } -void DreamGenContext::movemap() { - STACK_CHECK; - _cmp(ah, 32); - if (!flags.z()) - goto notmapup2; - _sub(data.byte(kMapy), 20); - data.byte(kNowinnewroom) = 1; - return; -notmapup2: - _cmp(ah, 16); - if (!flags.z()) - goto notmapupspec; - _sub(data.byte(kMapy), 10); - data.byte(kNowinnewroom) = 1; - return; -notmapupspec: - _cmp(ah, 8); - if (!flags.z()) - goto notmapdownspec; - _add(data.byte(kMapy), 10); - data.byte(kNowinnewroom) = 1; - return; -notmapdownspec: - _cmp(ah, 2); - if (!flags.z()) - goto notmaprightspec; - _add(data.byte(kMapx), 11); - data.byte(kNowinnewroom) = 1; - return; -notmaprightspec: - _sub(data.byte(kMapx), 11); - data.byte(kNowinnewroom) = 1; -} - void DreamGenContext::deleverything() { STACK_CHECK; al = data.byte(kMapysize); @@ -19088,7 +19054,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) { case addr_reelsonscreen: reelsonscreen(); break; case addr_soundonreels: soundonreels(); break; case addr_reconstruct: reconstruct(); break; - case addr_movemap: movemap(); break; case addr_deleverything: deleverything(); break; case addr_dumpeverything: dumpeverything(); break; case addr_showpcx: showpcx(); break; diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index 3a19f816fa..e5661aa866 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -621,7 +621,6 @@ public: static const uint16 addr_showpcx = 0xc1cc; static const uint16 addr_dumpeverything = 0xc1c4; static const uint16 addr_deleverything = 0xc1c0; - static const uint16 addr_movemap = 0xc1b4; static const uint16 addr_reconstruct = 0xc1ac; static const uint16 addr_soundonreels = 0xc1a8; static const uint16 addr_reelsonscreen = 0xc1a0; @@ -1892,7 +1891,7 @@ public: void showman(); void readmouse2(); void newplace(); - void movemap(); + //void movemap(); void loadsample(); void usecardreader1(); void usecardreader2(); diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp index 971a52fa0c..2ecdac3fed 100644 --- a/engines/dreamweb/sprite.cpp +++ b/engines/dreamweb/sprite.cpp @@ -856,5 +856,26 @@ void DreamGenContext::madmode() { data.byte(kPointermode) = 2; } +void DreamGenContext::movemap(uint8 param) { + switch (param) { + case 32: + data.byte(kMapy) -= 20; + break; + case 16: + data.byte(kMapy) -= 10; + break; + case 8: + data.byte(kMapy) += 10; + break; + case 2: + data.byte(kMapx) += 11; + break; + default: + data.byte(kMapx) -= 11; + break; + } + data.byte(kNowinnewroom) = 1; +} + } /*namespace dreamgen */ diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index 2ea9779135..c978d8d475 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -879,8 +879,7 @@ void DreamGenContext::dealwithspecial(uint8 firstParam, uint8 secondParam) { } else if (type == 6) { data.byte(kNewlocation) = secondParam; } else { - ah = secondParam; - movemap(); + movemap(secondParam); } } diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index 7e7d97e93d..9886e1b712 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -130,5 +130,6 @@ void updatepeople(); void madmantext(); void madmode(); + void movemap(uint8 param); bool isCD(); |