diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/dreamweb/monitor.cpp | 8 | ||||
-rw-r--r-- | engines/dreamweb/print.cpp | 6 | ||||
-rw-r--r-- | engines/dreamweb/stubs.cpp | 4 | ||||
-rw-r--r-- | engines/dreamweb/stubs.h | 1 |
4 files changed, 12 insertions, 7 deletions
diff --git a/engines/dreamweb/monitor.cpp b/engines/dreamweb/monitor.cpp index cc6ae07147..f8ad1270d5 100644 --- a/engines/dreamweb/monitor.cpp +++ b/engines/dreamweb/monitor.cpp @@ -111,7 +111,7 @@ void DreamGenContext::input() { char *inputLine = (char *)cs.ptr(kInputline, 64); memset(inputLine, 0, 64); data.word(kCurpos) = 0; - printchar((Frame *)segRef(data.word(kTempcharset)).ptr(0, 0), data.word(kMonadx), data.word(kMonady), '>', 0, NULL, NULL); + printchar(tempCharset(), data.word(kMonadx), data.word(kMonady), '>', 0, NULL, NULL); multidump(data.word(kMonadx), data.word(kMonady), 6, 8); data.word(kMonadx) += 6; data.word(kCurslocx) = data.word(kMonadx); @@ -145,7 +145,7 @@ void DreamGenContext::input() { continue; multiget(segRef(data.word(kMapstore)).ptr(data.word(kCurpos) * 256, 0), data.word(kMonadx), data.word(kMonady), 8, 8); uint8 charWidth; - printchar((Frame *)segRef(data.word(kTempcharset)).ptr(0, 0), data.word(kMonadx), data.word(kMonady), currentKey, 0, &charWidth, NULL); + printchar(tempCharset(), data.word(kMonadx), data.word(kMonady), currentKey, 0, &charWidth, NULL); inputLine[data.word(kCurpos) * 2 + 1] = charWidth; data.word(kMonadx) += charWidth; ++data.word(kCurpos); @@ -165,7 +165,7 @@ void DreamGenContext::printcurs() { multiget(textUnder(), x, y, 6, height); ++data.word(kMaintimer); if ((data.word(kMaintimer) & 16) == 0) - showframe((Frame *)segRef(data.word(kTempcharset)).ptr(0, 0), x, y, '/' - 32, 0); + showframe(tempCharset(), x, y, '/' - 32, 0); multidump(x - 6, y, 12, height); } @@ -201,7 +201,7 @@ void DreamGenContext::showcurrentfile() { 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); + printchar(tempCharset(), &x, 37, c, 0, NULL, NULL); } } diff --git a/engines/dreamweb/print.cpp b/engines/dreamweb/print.cpp index 3e305dccf3..3a71c47404 100644 --- a/engines/dreamweb/print.cpp +++ b/engines/dreamweb/print.cpp @@ -244,12 +244,12 @@ void DreamGenContext::monprint() { const char *DreamGenContext::monprint(const char *string) { data.byte(kKerning) = 1; uint16 x = data.word(kMonadx); - Frame *tempCharset = (Frame *)segRef(data.word(kTempcharset)).ptr(0, 0); + Frame *charset = tempCharset(); const char *iterator = string; bool done = false; while (!done) { - uint16 count = getnumber(tempCharset, (const uint8 *)iterator, 166, false, &x); + uint16 count = getnumber(charset, (const uint8 *)iterator, 166, false, &x); do { char c = *iterator++; if (c == ':') @@ -265,7 +265,7 @@ const char *DreamGenContext::monprint(const char *string) { break; } c = engine->modifyChar(c); - printchar(tempCharset, &x, data.word(kMonady), c, 0, NULL, NULL); + printchar(charset, &x, data.word(kMonady), c, 0, NULL, NULL); data.word(kCurslocx) = x; data.word(kCurslocy) = data.word(kMonady); data.word(kMaintimer) = 1; diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index 850b746518..287f4ee459 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -258,6 +258,10 @@ void DreamGenContext::loadtempcharset(const char *fileName) { data.word(kTempcharset) = standardload(fileName); } +Frame *DreamGenContext::tempCharset() { + return (Frame *)segRef(data.word(kTempcharset)).ptr(0, 0); +} + void DreamGenContext::hangoncurs(uint16 frameCount) { for (uint16 i = 0; i < frameCount; ++i) { printcurs(); diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index 2a84492003..893fa68889 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -35,6 +35,7 @@ void loadintotemp3(const char *fileName); void loadtempcharset(); void loadtempcharset(const char *fileName); + Frame *tempCharset(); void printcurs(); void delcurs(); void hangoncurs(uint16 frameCount); |