diff options
author | Bertrand Augereau | 2011-09-05 21:42:06 +0200 |
---|---|---|
committer | Bertrand Augereau | 2011-09-05 21:42:06 +0200 |
commit | a6b6d05a2c5052a86c9bf3ca31f548c7ba08b5ee (patch) | |
tree | c8abaf9ae6df1c964a8d1ca6dc656ba4dab939d0 /engines/dreamweb/stubs.cpp | |
parent | 1163a83f3587f5ceef41f7c2c429c30e2e8b6887 (diff) | |
download | scummvm-rg350-a6b6d05a2c5052a86c9bf3ca31f548c7ba08b5ee.tar.gz scummvm-rg350-a6b6d05a2c5052a86c9bf3ca31f548c7ba08b5ee.tar.bz2 scummvm-rg350-a6b6d05a2c5052a86c9bf3ca31f548c7ba08b5ee.zip |
DREAMWEB: Ported 'findallryan' to C++
Diffstat (limited to 'engines/dreamweb/stubs.cpp')
-rw-r--r-- | engines/dreamweb/stubs.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index 8985392cfc..51a79d72fa 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -1822,5 +1822,24 @@ void DreamGenContext::showryanpage() { showframe(icons1, kInventx + 167 + 18 * data.byte(kRyanpage), kInventy - 12, 13 + data.byte(kRyanpage), 0); } +void DreamGenContext::findallryan() { + findallryan(es.ptr(di, 60)); +} + +void DreamGenContext::findallryan(uint8 *inv) { + memset(inv, 0xff, 60); + for (size_t i = 0; i < kNumexobjects; ++i) { + DynObject *extra = getexad(i); + if (extra->mapad[0] != 4) + continue; + if (extra->mapad[1] != 0xff) + continue; + uint8 slot = extra->mapad[2]; + assert(slot < 30); + inv[2 * slot + 0] = i; + inv[2 * slot + 1] = 4; + } +} + } /*namespace dreamgen */ |