From 9efefdbced8af533e09f7cba703ccbe31dfa6f80 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 10 Jul 2011 20:02:17 +1000 Subject: 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. --- engines/cge/talk.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'engines') 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) { -- cgit v1.2.3