From 20a618045943af4df7ac21d298c4a3db4c414129 Mon Sep 17 00:00:00 2001 From: Arnaud Boutonné Date: Sun, 26 Sep 2010 11:32:52 +0000 Subject: HUGO: Add H1 Dos intro svn-id: r52902 --- engines/hugo/display.cpp | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'engines/hugo/display.cpp') diff --git a/engines/hugo/display.cpp b/engines/hugo/display.cpp index 78f99315c1..ba316e3923 100644 --- a/engines/hugo/display.cpp +++ b/engines/hugo/display.cpp @@ -410,6 +410,38 @@ void Screen::userHelp() { "ESC - Return to game"); } +void Screen::drawShape(int x, int y, int color1, int color2) { +#define shapeSize 24 + + for (int i = 0; i < shapeSize; i++) { + for (int j = 0; j < i; j++) { + _backBuffer[320 * (y + i) + (x + shapeSize + j - i)] = color1; + _frontBuffer[320 * (y + i) + (x + shapeSize + j - i)] = color1; + _backBuffer[320 * (y + i) + (x + shapeSize + j)] = color2; + _frontBuffer[320 * (y + i) + (x + shapeSize + j)] = color2; + _backBuffer[320 * (y + (2 * shapeSize - 1) - i) + (x + shapeSize + j - i)] = color1; + _frontBuffer[320 * (y + (2 * shapeSize - 1) - i) + (x + shapeSize + j - i)] = color1; + _backBuffer[320 * (y + (2 * shapeSize - 1) - i) + (x + shapeSize + j)] = color2; + _frontBuffer[320 * (y + (2 * shapeSize - 1) - i) + (x + shapeSize + j)] = color2; + } + } +} + +void Screen::drawRectangle(bool filledFl, uint16 x1, uint16 y1, uint16 x2, uint16 y2, int color) { + assert(x1 <= x2); + assert(y1 <= y2); + + if (filledFl) { + for (int i = y1; i < y2; i++) + for (int j = x1; j < x2; j++) { + _backBuffer[320 * i + j] = color; + _frontBuffer[320 * i + j] = color; + } + } else { + warning("STUB: drawRectangle()"); + } +}; + Screen_v1d::Screen_v1d(HugoEngine &vm) : Screen(vm) { } -- cgit v1.2.3