diff options
author | Paul Gilbert | 2012-02-12 20:33:54 +1100 |
---|---|---|
committer | Strangerke | 2012-04-06 08:21:01 +0200 |
commit | e9c5437c3ba66dff9ada2a9f05fb6635e0d1a55b (patch) | |
tree | 5f360e36fb87096137c27c5b1046b86695767df8 /engines/mortevielle/graphics.cpp | |
parent | 46427cb61893e2fdb262d1a11a90dcc4d34f411a (diff) | |
download | scummvm-rg350-e9c5437c3ba66dff9ada2a9f05fb6635e0d1a55b.tar.gz scummvm-rg350-e9c5437c3ba66dff9ada2a9f05fb6635e0d1a55b.tar.bz2 scummvm-rg350-e9c5437c3ba66dff9ada2a9f05fb6635e0d1a55b.zip |
MORTEVIELLE: Removed redundant gfx functions, and moved others into ScreenSurface class.
Diffstat (limited to 'engines/mortevielle/graphics.cpp')
-rw-r--r-- | engines/mortevielle/graphics.cpp | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/engines/mortevielle/graphics.cpp b/engines/mortevielle/graphics.cpp index 3450d41cf5..e9c8c1e7e9 100644 --- a/engines/mortevielle/graphics.cpp +++ b/engines/mortevielle/graphics.cpp @@ -1040,4 +1040,59 @@ void ScreenSurface::setPixel(const Common::Point &pt, int palIndex) { *(destP + SCREEN_WIDTH) = palIndex; } +/** + * Write out a string + */ +void ScreenSurface::writeg(const Common::String &l, int c) { + int i, x; + Common::Point pt; + int cecr = 0; + + /* debug('writeg : '+l);*/ + + if (l == "") + return; + hide_mouse(); + pt = _textPos; + + if (res == 2) + i = 6; + else + i = 10; + x = pt.x + i * l.size(); + + switch (c) { + case 1: + case 3 : { + cecr = 0; + box(15, gd, pt.x, pt.y, x, pt.y + 7, 255); + } + break; + case 4 : { + cecr = 0; + } + break; + case 5 : { + cecr = 15; + } + break; + case 0: + case 2 : { + cecr = 15; + box(0, gd, pt.x, pt.y, x, pt.y + 7, 255); + } + break; + } + pt.x += 1; + pt.y += 1; + for (x = 1; x <= (int)l.size(); ++x) { + g_vm->_screenSurface.writeCharacter(Common::Point(pt.x, pt.y), ord(l[x - 1]), cecr); + pt.x += i; + } + show_mouse(); + + // TODO: Move screen updates to main loop once constructed + g_vm->_screenSurface.updateScreen(); +} + } // End of namespace Mortevielle |