5#include "libmythbase/mythconfig.h"
7#define DRAWMETHOD_NORMAL(adr,col) {*(adr) = (col);}
12#define DRAWMETHOD_PLUS(_out,_backbuf,_col) \
14movd_m2r (_backbuf, mm0); \
15paddusb_m2r (_col, mm0); \
16movd_r2m (mm0, _out); \
20#define DRAWMETHOD_PLUS(_out,_backbuf,_col) \
24 unsigned char *bra = (unsigned char*)&(_backbuf);\
25 unsigned char *dra = (unsigned char*)&(_out);\
26 unsigned char *cra = (unsigned char*)&(_col);\
30 if (tra>255) tra=255;\
37#define DRAWMETHOD_OR(adr,col) {*(adr)|=(col);}
40#define DRAWMETHOD_DONE() {__asm__ __volatile__ ("emms");}
42#define DRAWMETHOD_DONE() {}
46#define DRAWMETHOD DRAWMETHOD_PLUS(*p,*p,col)
48static void draw_line (
int *data,
int x1,
int y1,
int x2,
int y2,
int col,
int screenx,
int screeny) {
56 if ((y1 < 0) || (y2 < 0) || (
x1 < 0) || (
x2 < 0) || (y1 >= screeny) || (y2 >= screeny) || (
x1 >= screenx) || (
x2 >= screenx))
75 p = &(data[(screenx * y1) +
x1]);
76 for (y = y1; y <= y2; y++) {
82 p = &(data[(screenx * y2) +
x1]);
83 for (y = y2; y <= y1; y++) {
93 p = &(data[(screenx * y1) +
x1]);
94 for (x =
x1; x <=
x2; x++) {
100 p = &(data[(screenx * y1) +
x2]);
101 for (x =
x2; x <=
x1; x++) {
113 dx = ((dx << 16) / dy);
115 for (y = y1; y <= y2; y++) {
117 p = &(data[(screenx * y) + xx]);
120 if (xx < (screenx - 1)) {
129 dy = ((dy << 16) / dx);
131 for (x =
x1; x <=
x2; x++) {
133 p = &(data[(screenx * yy) + x]);
144 dx = ((dx << 16) / -dy);
146 for (y = y1; y >= y2; y--) {
148 p = &(data[(screenx * y) + xx]);
151 if (xx < (screenx - 1)) {
160 dy = ((dy << 16) / dx);
162 for (x =
x1; x <=
x2; x++) {
164 p = &(data[(screenx * yy) + x]);
static void draw_line(int *data, int x1, int y1, int x2, int y2, int col, int screenx, int screeny)