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) \
23 unsigned char *bra = (unsigned char*)&(_backbuf);\
24 unsigned char *dra = (unsigned char*)&(_out);\
25 unsigned char *cra = (unsigned char*)&(_col);\
29 if (tra>255) tra=255;\
36#define DRAWMETHOD_OR(adr,col) {*(adr)|=(col);}
39#define DRAWMETHOD_DONE() {__asm__ __volatile__ ("emms");}
41#define DRAWMETHOD_DONE() {}
45#define DRAWMETHOD DRAWMETHOD_PLUS(*p,*p,col)
47static void draw_line (
int *data,
int x1,
int y1,
int x2,
int y2,
int col,
int screenx,
int screeny) {
55 if ((y1 < 0) || (y2 < 0) || (
x1 < 0) || (
x2 < 0) || (y1 >= screeny) || (y2 >= screeny) || (
x1 >= screenx) || (
x2 >= screenx))
74 p = &(data[(screenx * y1) +
x1]);
75 for (y = y1; y <= y2; y++) {
81 p = &(data[(screenx * y2) +
x1]);
82 for (y = y2; y <= y1; y++) {
92 p = &(data[(screenx * y1) +
x1]);
93 for (x =
x1; x <=
x2; x++) {
99 p = &(data[(screenx * y1) +
x2]);
100 for (x =
x2; x <=
x1; x++) {
112 dx = ((dx << 16) / dy);
114 for (y = y1; y <= y2; y++) {
116 p = &(data[(screenx * y) + xx]);
119 if (xx < (screenx - 1)) {
128 dy = ((dy << 16) / dx);
130 for (x =
x1; x <=
x2; x++) {
132 p = &(data[(screenx * yy) + x]);
143 dx = ((dx << 16) / -dy);
145 for (y = y1; y >= y2; y--) {
147 p = &(data[(screenx * y) + xx]);
150 if (xx < (screenx - 1)) {
159 dy = ((dy << 16) / dx);
161 for (x =
x1; x <=
x2; x++) {
163 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)