diff options
| -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) { | 
