diff options
author | Bertrand Augereau | 2011-11-20 14:53:10 +0100 |
---|---|---|
committer | Bertrand Augereau | 2011-11-20 16:44:24 +0100 |
commit | 721b828354018625fda891b39cc88fb298d99033 (patch) | |
tree | ad35a669717b37caae5fa0046521eab6b11c5285 /engines/dreamweb | |
parent | 428beb7f34e1a64a10f24c4259731351e30e3d93 (diff) | |
download | scummvm-rg350-721b828354018625fda891b39cc88fb298d99033.tar.gz scummvm-rg350-721b828354018625fda891b39cc88fb298d99033.tar.bz2 scummvm-rg350-721b828354018625fda891b39cc88fb298d99033.zip |
DREAMWEB:'monmessage' ported to C++
Diffstat (limited to 'engines/dreamweb')
-rw-r--r-- | engines/dreamweb/dreamgen.cpp | 18 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.h | 3 | ||||
-rw-r--r-- | engines/dreamweb/monitor.cpp | 26 | ||||
-rw-r--r-- | engines/dreamweb/stubs.h | 3 |
4 files changed, 21 insertions, 29 deletions
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index 88917ec7a5..053824b283 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -6784,23 +6784,6 @@ notnewlogo: printlogo(); } -void DreamGenContext::monmessage() { - STACK_CHECK; - es = data.word(kTextfile1); - bx = (66*2); - cl = al; - ch = 0; -monmessageloop: - al = es.byte(bx); - _inc(bx); - _cmp(al, '+'); - if (!flags.z()) - goto monmessageloop; - if (--cx) - goto monmessageloop; - monprint(); -} - void DreamGenContext::processtrigger() { STACK_CHECK; _cmp(data.byte(kLasttrigger), '1'); @@ -15192,7 +15175,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) { case addr_searchforstring: searchforstring(); break; case addr_parser: parser(); break; case addr_monitorlogo: monitorlogo(); break; - case addr_monmessage: monmessage(); break; case addr_processtrigger: processtrigger(); break; case addr_triggermessage: triggermessage(); break; case addr_useobject: useobject(); break; diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index ea86f82c6a..d066ef3cd8 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -343,7 +343,6 @@ public: static const uint16 addr_useobject = 0xc580; static const uint16 addr_triggermessage = 0xc574; static const uint16 addr_processtrigger = 0xc570; - static const uint16 addr_monmessage = 0xc56c; static const uint16 addr_monitorlogo = 0xc560; static const uint16 addr_parser = 0xc554; static const uint16 addr_searchforstring = 0xc550; @@ -1919,7 +1918,7 @@ public: void intromusic(); void quitkey(); void processtrigger(); - void monmessage(); + //void monmessage(); void volumeadjust(); void randomnum2(); void loadsecondsample(); diff --git a/engines/dreamweb/monitor.cpp b/engines/dreamweb/monitor.cpp index a5eb06773d..d48bc0a141 100644 --- a/engines/dreamweb/monitor.cpp +++ b/engines/dreamweb/monitor.cpp @@ -60,15 +60,11 @@ void DreamGenContext::usemon() { fadeupmonfirst(); data.word(kMonadx) = 76; data.word(kMonady) = 141; - al = 1; - monmessage(); + monmessage(1); hangoncurs(120); - al = 2; - monmessage(); - cx = 60; - randomaccess(); - al = 3; - monmessage(); + monmessage(2); + randomaccess(60); + monmessage(3); hangoncurs(100); printlogo(); scrollmonitor(); @@ -232,5 +228,19 @@ void DreamGenContext::randomaccess(uint16 count) { accesslightoff(); } +void DreamGenContext::monmessage() { + monmessage(al); +} + +void DreamGenContext::monmessage(uint8 index) { + assert(index > 0); + const char *string = (const char *)segRef(data.word(kTextfile1)).ptr(kTextstart, 0); + for (uint8 i = 0; i < index; ++i) { + while (*string++ != '+') { + } + } + monprint(string); +} + } /*namespace dreamgen */ diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index f587227541..616d48755e 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -312,5 +312,6 @@ void accesslightoff(); void randomaccess(uint16 count); void randomaccess(); - + void monmessage(uint8 index); + void monmessage(); |