diff options
author | Eugene Sandulenko | 2015-12-29 01:46:39 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2015-12-29 01:46:39 +0100 |
commit | 0c682799a10ea5e4757399ccf7505be8cae404d7 (patch) | |
tree | 8964305c04cf8de7dee4d7ff955578da0d0191be /engines/wage | |
parent | 438eb457047f0dee7a4555de91b1ea46c34082e7 (diff) | |
download | scummvm-rg350-0c682799a10ea5e4757399ccf7505be8cae404d7.tar.gz scummvm-rg350-0c682799a10ea5e4757399ccf7505be8cae404d7.tar.bz2 scummvm-rg350-0c682799a10ea5e4757399ccf7505be8cae404d7.zip |
WAGE: Draw checkered background to simulate desktop
Diffstat (limited to 'engines/wage')
-rw-r--r-- | engines/wage/design.cpp | 8 | ||||
-rw-r--r-- | engines/wage/design.h | 3 | ||||
-rw-r--r-- | engines/wage/gui.cpp | 8 |
3 files changed, 18 insertions, 1 deletions
diff --git a/engines/wage/design.cpp b/engines/wage/design.cpp index e3a63faa50..d61c7ac342 100644 --- a/engines/wage/design.cpp +++ b/engines/wage/design.cpp @@ -405,6 +405,14 @@ void Design::drawBitmap(Graphics::Surface *surface, Common::ReadStream &in, bool } } +void Design::drawFilledRect(Graphics::Surface *surface, Common::Rect &rect, int color, Patterns &patterns, byte fillType) { + plotData pd(surface, &patterns, fillType); + + for (int y = rect.top; y <= rect.bottom; y++) + drawHLine(rect.left, rect.right, y, color, drawPixel, &pd); +} + + void Design::drawFilledRect(Common::Rect &rect, int color, void (*plotProc)(int, int, int, void *), void *data) { for (int y = rect.top; y <= rect.bottom; y++) drawHLine(rect.left, rect.right, y, color, plotProc, data); diff --git a/engines/wage/design.h b/engines/wage/design.h index 97ee92f8db..118fbbb9c0 100644 --- a/engines/wage/design.h +++ b/engines/wage/design.h @@ -68,6 +68,7 @@ public: } void paint(Graphics::Surface *canvas, Patterns &patterns, bool mask); + static void drawFilledRect(Graphics::Surface *surface, Common::Rect &rect, int color, Patterns &patterns, byte fillType); private: byte *_data; @@ -90,7 +91,7 @@ private: void drawPolygonScan(int *polyX, int *polyY, int npoints, Common::Rect &bbox, int color, void (*plotProc)(int, int, int, void *), void *data); void drawEllipse(int x0, int y0, int x1, int y1, bool filled, void (*plotProc)(int, int, int, void *), void *data); - void drawHLine(int x1, int x2, int y, int color, void (*plotProc)(int, int, int, void *), void *data); + static void drawHLine(int x1, int x2, int y, int color, void (*plotProc)(int, int, int, void *), void *data); void drawVLine(int x, int y1, int y2, int color, void (*plotProc)(int, int, int, void *), void *data); void drawThickLine (int x1, int y1, int x2, int y2, int thick, int color, void (*plotProc)(int, int, int, void *), void *data); diff --git a/engines/wage/gui.cpp b/engines/wage/gui.cpp index 317fcc8a68..4f0532801b 100644 --- a/engines/wage/gui.cpp +++ b/engines/wage/gui.cpp @@ -59,10 +59,18 @@ enum { kMenuItemHeight = 19 }; +byte checkers[8] = { 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa }; + Gui::Gui() { _scene = NULL; _sceneDirty = true; _screen.create(g_system->getWidth(), g_system->getHeight(), Graphics::PixelFormat::createFormatCLUT8()); + + Patterns p; + p.push_back(checkers); + Common::Rect r(0, 0, _screen.w, _screen.h); + + Design::drawFilledRect(&_screen, r, kColorBlack, p, 1); } Gui::~Gui() { |