diff options
author | Bertrand Augereau | 2011-12-04 19:00:04 +0100 |
---|---|---|
committer | Bertrand Augereau | 2011-12-04 19:22:01 +0100 |
commit | b7f416b3d906d017eaac869cf5bb473fec43eab7 (patch) | |
tree | a83e34563b51632539a38f074ea1c1ad6a379b67 /engines | |
parent | dfd1ff2db33f16b3a9c8e832aeb1bced4c1ea0d8 (diff) | |
download | scummvm-rg350-b7f416b3d906d017eaac869cf5bb473fec43eab7.tar.gz scummvm-rg350-b7f416b3d906d017eaac869cf5bb473fec43eab7.tar.bz2 scummvm-rg350-b7f416b3d906d017eaac869cf5bb473fec43eab7.zip |
DREAMWEB: 'delChar' ported to C++
Diffstat (limited to 'engines')
-rw-r--r-- | engines/dreamweb/dreamgen.cpp | 28 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.h | 1 | ||||
-rw-r--r-- | engines/dreamweb/monitor.cpp | 13 | ||||
-rw-r--r-- | engines/dreamweb/stubs.h | 1 |
4 files changed, 14 insertions, 29 deletions
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index e0e5809f66..d5efcf7e80 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -5405,34 +5405,6 @@ void DreamGenContext::makeCaps() { _sub(al, 32); } -void DreamGenContext::delChar() { - STACK_CHECK; - _dec(data.word(kCurpos)); - si = data.word(kCurpos); - _add(si, si); - es = cs; - _add(si, 1964); - es.byte(si) = 0; - al = es.byte(si+1); - ah = 0; - _sub(data.word(kMonadx), ax); - _sub(data.word(kCurslocx), ax); - di = data.word(kMonadx); - bx = data.word(kMonady); - ds = data.word(kMapstore); - ax = data.word(kCurpos); - _xchg(al, ah); - si = ax; - cl = 8; - ch = 8; - multiPut(); - di = data.word(kMonadx); - bx = data.word(kMonady); - cl = al; - ch = 8; - multiDump(); -} - void DreamGenContext::execCommand() { STACK_CHECK; es = cs; diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index d93136f4f0..bd42cabeb1 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -633,7 +633,6 @@ public: void manAsleep2(); void moreTalk(); void startTalk(); - void delChar(); void getAnyAd(); void endGame(); void usePipe(); diff --git a/engines/dreamweb/monitor.cpp b/engines/dreamweb/monitor.cpp index ebd160a98f..fff38d3801 100644 --- a/engines/dreamweb/monitor.cpp +++ b/engines/dreamweb/monitor.cpp @@ -148,6 +148,19 @@ void DreamGenContext::input() { } } +void DreamGenContext::delChar() { + char *inputLine = (char *)cs.ptr(kInputline, 0); + --data.word(kCurpos); + inputLine[data.word(kCurpos) * 2] = 0; + uint8 width = inputLine[data.word(kCurpos) * 2 + 1]; + data.word(kMonadx) -= width; + data.word(kCurslocx) -= width; + uint16 offset = data.word(kCurpos); + offset = ((offset & 0x00ff) << 8) | ((offset & 0xff00) >> 8); + multiPut(getSegment(data.word(kMapstore)).ptr(offset, 0), data.word(kMonadx), data.word(kMonady), 8, 8); + multiDump(data.word(kMonadx), data.word(kMonady), al, 8); +} + void DreamGenContext::printCurs() { uint16 x = data.word(kCurslocx); uint16 y = data.word(kCurslocy); diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index ffc0d4b1b2..e2edd897b6 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -45,6 +45,7 @@ void saveLoad(); void printCurs(); void delCurs(); + void delChar(); void hangOnCurs(uint16 frameCount); void hangOnCurs(); void multiDump(); |