208,6 → 208,22 |
|
} |
|
void grx_clear(DWORD color) |
{ |
if (!grx_info || grx_info->var.bits_per_pixel != 16) return; |
|
DWORD addr; |
WORD dx, y; |
|
addr = (DWORD)(grx_info->screen_base); |
dx = grx_info->var.xres * 2; |
|
for (y = 0; y < grx_info->var.yres; y++) { |
memsetw((LIN_ADDR)addr, color, dx); |
addr += dx; |
} |
} |
|
void grx_rect(WORD x1, WORD y1, WORD x2, WORD y2, DWORD color) |
{ |
WORD bpr; |
264,6 → 280,8 |
int xerr=0, yerr=0, deltax, deltay; |
int incx, incy; |
|
if (!grx_info || grx_info->var.bits_per_pixel != 16) return; |
|
bpr = grx_info->var.xres * 2; |
addr = (DWORD)(grx_info->screen_base); |
deltax = x2 - x1; /* compute both distances */ |
330,6 → 348,9 |
|
static void circlepixels(WORD x, WORD y, WORD sx, WORD sy, DWORD c) |
{ |
|
if (!grx_info || grx_info->var.bits_per_pixel != 16) return; |
|
grx_plot(sx + x, sy + y, c); |
grx_plot(sx - x, sy + y, c); |
grx_plot(sx + x, sy - y, c); |
369,6 → 390,9 |
|
static __inline__ void discpixels(WORD x, WORD y, WORD sx, WORD sy, DWORD c) |
{ |
|
if (!grx_info || grx_info->var.bits_per_pixel != 16) return; |
|
grx_line(sx + x, sy + y, sx + x, sy - y, c); |
grx_line(sx - x, sy + y, sx - x, sy - y, c); |
grx_line(sx + y, sy + x, sx + y, sy - x , c); |