From a09a39794cb4b9d0ca59b588a09e4dbcd1d6a5ad Mon Sep 17 00:00:00 2001 From: Bertrand Augereau Date: Fri, 18 Nov 2011 17:38:19 +0100 Subject: DREAMWEB: 'showcurrentfile' ported to C++ NB: This commit doesn't change the (wrong) layout of the file text --- engines/dreamweb/dreamgen.cpp | 21 --------------------- engines/dreamweb/dreamgen.h | 3 +-- engines/dreamweb/monitor.cpp | 10 ++++++++++ engines/dreamweb/stubs.h | 1 + 4 files changed, 12 insertions(+), 23 deletions(-) (limited to 'engines') diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index 86a81ef4f2..66df739b9d 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -6926,26 +6926,6 @@ notnewlogo: printlogo(); } -void DreamGenContext::showcurrentfile() { - STACK_CHECK; - di = 178; - bx = 37; - si = 2970+1; -curfileloop: - al = cs.byte(si); - _cmp(al, 0); - if (flags.z()) - return /* (finishfile) */; - _inc(si); - push(si); - modifychar(); - ds = data.word(kTempcharset); - ah = 0; - printchar(); - si = pop(); - goto curfileloop; -} - void DreamGenContext::monmessage() { STACK_CHECK; es = data.word(kTextfile1); @@ -15358,7 +15338,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) { case addr_searchforstring: searchforstring(); break; case addr_parser: parser(); break; case addr_monitorlogo: monitorlogo(); break; - case addr_showcurrentfile: showcurrentfile(); break; case addr_monmessage: monmessage(); break; case addr_processtrigger: processtrigger(); break; case addr_triggermessage: triggermessage(); break; diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index bfb54c8425..e4ad5f827e 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -344,7 +344,6 @@ public: static const uint16 addr_triggermessage = 0xc574; static const uint16 addr_processtrigger = 0xc570; static const uint16 addr_monmessage = 0xc56c; - static const uint16 addr_showcurrentfile = 0xc568; static const uint16 addr_monitorlogo = 0xc560; static const uint16 addr_parser = 0xc554; static const uint16 addr_searchforstring = 0xc550; @@ -1688,7 +1687,7 @@ public: //void fillryan(); void drawitall(); void usestereo(); - void showcurrentfile(); + //void showcurrentfile(); //void turnpathoff(); //void copyname(); void look(); diff --git a/engines/dreamweb/monitor.cpp b/engines/dreamweb/monitor.cpp index 530acc19a9..41df8c490b 100644 --- a/engines/dreamweb/monitor.cpp +++ b/engines/dreamweb/monitor.cpp @@ -201,5 +201,15 @@ void DreamGenContext::scrollmonitor() { bx = pop(); } +void DreamGenContext::showcurrentfile() { + uint16 x = 178; + const char *currentFile = (const char *)cs.ptr(kCurrentfile+1, 0); + while (*currentFile) { + char c = *currentFile++; + c = engine->modifyChar(c); + printchar((const Frame *)segRef(data.word(kTempcharset)).ptr(0, 0), &x, 37, c, 0, NULL, NULL); + } +} + } /*namespace dreamgen */ diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index f8fc3b8a37..2fdb7c044c 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -300,5 +300,6 @@ void printlogo(); void usemon(); void scrollmonitor(); + void showcurrentfile(); void input(); -- cgit v1.2.3