VGAVideoDriver::drawLine implementation
svn-id: r18360
This commit is contained in:
parent
050a1eaace
commit
54df4a6e5b
2 changed files with 9 additions and 2 deletions
|
@ -359,7 +359,7 @@ void draw_spriteOperation(int16 operation) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DRAW_DRAWLINE:
|
case DRAW_DRAWLINE:
|
||||||
vid_fillRect(draw_spritesArray[draw_destSurface],
|
vid_drawLine(draw_spritesArray[draw_destSurface],
|
||||||
draw_destSpriteX, draw_destSpriteY,
|
draw_destSpriteX, draw_destSpriteY,
|
||||||
draw_spriteRight, draw_spriteBottom, draw_frontColor);
|
draw_spriteRight, draw_spriteBottom, draw_frontColor);
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#include "gob/driver_vga.h"
|
#include "gob/driver_vga.h"
|
||||||
|
#include "graphics/primitives.h"
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#define STUB_FUNC printf("STUB:")
|
#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) {
|
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) {
|
void VGAVideoDriver::drawPackedSprite(byte *sprBuf, int16 width, int16 height, int16 x, int16 y, byte transp, SurfaceDesc *dest) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue