aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2011-07-10 20:02:17 +1000
committerPaul Gilbert2011-07-10 20:02:17 +1000
commit9efefdbced8af533e09f7cba703ccbe31dfa6f80 (patch)
treeda50253a8909176b2d22ac974873df70b5a4f7bd /engines
parenta693ff2ecfa960b25ac33a936ef8b7b6055e68ae (diff)
downloadscummvm-rg350-9efefdbced8af533e09f7cba703ccbe31dfa6f80.tar.gz
scummvm-rg350-9efefdbced8af533e09f7cba703ccbe31dfa6f80.tar.bz2
scummvm-rg350-9efefdbced8af533e09f7cba703ccbe31dfa6f80.zip
CGE: Fixed the display of text in the name entry dialog
Whilst the 'melting' effect of entered text was very amusing, it did need to be fixed.
Diffstat (limited to 'engines')
-rw-r--r--engines/cge/talk.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/engines/cge/talk.cpp b/engines/cge/talk.cpp
index b6f276c452..146c720667 100644
--- a/engines/cge/talk.cpp
+++ b/engines/cge/talk.cpp
@@ -249,16 +249,14 @@ void Talk::putLine(int line, const char *text) {
// set desired line pointer
v += (TEXT_VM + (FONT_HIG + TEXT_LS) * line) * lsiz;
+ p = v; // assume blanked line above text
// clear whole rectangle
- p = v; // assume blanked line above text
- memmove(p, p - lsiz, rsiz);
- p += psiz; // tricky replicate lines for plane 0
- memmove(p, p - lsiz, rsiz);
- p += psiz; // same for plane 1
- memmove(p, p - lsiz, rsiz);
- p += psiz; // same for plane 2
- memmove(p, p - lsiz, rsiz);
+ assert((rsiz % lsiz) == 0);
+ for (int planeCtr = 0; planeCtr < 4; ++planeCtr, p += psiz) {
+ for (byte *pDest = p; pDest < (p + (rsiz - lsiz)); pDest += lsiz)
+ Common::copy(p - lsiz, p, pDest);
+ }
// paint text line
if (text) {