[Scummvm-cvs-logs] CVS: scummvm/gob draw.cpp,1.9,1.10 driver_vga.cpp,1.8,1.9
Gregory Montoir
cyx at users.sourceforge.net
Mon Jun 6 13:43:19 CEST 2005
Update of /cvsroot/scummvm/scummvm/gob
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1484/gob
Modified Files:
draw.cpp driver_vga.cpp
Log Message:
VGAVideoDriver::drawLine implementation
Index: draw.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gob/draw.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- draw.cpp 8 May 2005 21:49:41 -0000 1.9
+++ draw.cpp 6 Jun 2005 20:42:44 -0000 1.10
@@ -359,7 +359,7 @@
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);
Index: driver_vga.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gob/driver_vga.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- driver_vga.cpp 26 Apr 2005 06:34:52 -0000 1.8
+++ driver_vga.cpp 6 Jun 2005 20:42:44 -0000 1.9
@@ -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 @@
}
}
+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) {
More information about the Scummvm-git-logs
mailing list