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/monitor.cpp | |
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/monitor.cpp')
-rw-r--r-- | engines/dreamweb/monitor.cpp | 26 |
1 files changed, 18 insertions, 8 deletions
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 */ |