diff options
author | Gregory Montoir | 2005-06-06 20:42:44 +0000 |
---|---|---|
committer | Gregory Montoir | 2005-06-06 20:42:44 +0000 |
commit | 54df4a6e5b42f786e0bc40faae98165d51a5c42f (patch) | |
tree | 967240535d23dec2aa4dcccaf7d4db7d4616515a /gob | |
parent | 050a1eaace702a930104c0f0613d958f9f2e1123 (diff) | |
download | scummvm-rg350-54df4a6e5b42f786e0bc40faae98165d51a5c42f.tar.gz scummvm-rg350-54df4a6e5b42f786e0bc40faae98165d51a5c42f.tar.bz2 scummvm-rg350-54df4a6e5b42f786e0bc40faae98165d51a5c42f.zip |
VGAVideoDriver::drawLine implementation
svn-id: r18360
Diffstat (limited to 'gob')
-rw-r--r-- | gob/draw.cpp | 2 | ||||
-rw-r--r-- | gob/driver_vga.cpp | 9 |
2 files changed, 9 insertions, 2 deletions
diff --git a/gob/draw.cpp b/gob/draw.cpp index 2ea12fc3d4..fa4e121503 100644 --- a/gob/draw.cpp +++ b/gob/draw.cpp @@ -359,7 +359,7 @@ void draw_spriteOperation(int16 operation) { break; case DRAW_DRAWLINE: - vid_fillRect(draw_spritesArray[draw_destSurface], + vid_drawLine(draw_spritesArray[draw_destSurface], draw_destSpriteX, draw_destSpriteY, draw_spriteRight, draw_spriteBottom, draw_frontColor); diff --git a/gob/driver_vga.cpp b/gob/driver_vga.cpp index dddc7e2cb6..ed703c81ce 100644 --- a/gob/driver_vga.cpp +++ b/gob/driver_vga.cpp @@ -20,6 +20,7 @@ * */ #include "gob/driver_vga.h" +#include "graphics/primitives.h" #ifdef _MSC_VER #define STUB_FUNC printf("STUB:") @@ -101,8 +102,14 @@ void VGAVideoDriver::drawLetter(unsigned char item, int16 x, int16 y, FontDesc * } } +static void plotPixel(int x, int y, int color, void *data) { + SurfaceDesc *dest = (SurfaceDesc *)data; + if (x >= 0 && x < dest->width && y >= 0 && y < dest->height) + dest->vidPtr[(y * dest->width) + x] = color; +} + void VGAVideoDriver::drawLine(SurfaceDesc *dest, int16 x0, int16 y0, int16 x1, int16 y1, byte color) { - STUB_FUNC; + Graphics::drawLine(x0, y0, x1, y1, color, &plotPixel, dest); } void VGAVideoDriver::drawPackedSprite(byte *sprBuf, int16 width, int16 height, int16 x, int16 y, byte transp, SurfaceDesc *dest) { |