2008-06-26 20:19:47 +02:00
|
|
|
|
2008-09-24 16:30:07 +02:00
|
|
|
#define FILL_RECT 1
|
|
|
|
#define DRAW_RECT 2
|
|
|
|
#define LINE_2P 3
|
|
|
|
#define BLIT 4
|
|
|
|
#define COMPIZ 5
|
2008-10-12 23:59:52 +02:00
|
|
|
#define PX_CREATE 6
|
2008-09-24 16:30:07 +02:00
|
|
|
#define PIXBLIT 7
|
|
|
|
#define PIXLOCK 8
|
|
|
|
#define PIXUNLOCK 9
|
|
|
|
#define PIXDESTROY 10
|
|
|
|
#define TRANSBLIT 11
|
|
|
|
|
2008-06-26 20:19:47 +02:00
|
|
|
|
|
|
|
typedef unsigned int color_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2008-10-12 23:59:52 +02:00
|
|
|
int x;
|
|
|
|
int y;
|
|
|
|
}pt_t;
|
|
|
|
|
|
|
|
/*********** Clipping **********/
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
int xmin;
|
|
|
|
int ymin;
|
|
|
|
int xmax;
|
|
|
|
int ymax;
|
|
|
|
}clip_t, *PTRclip;
|
|
|
|
|
|
|
|
#define CLIP_TOP 1
|
|
|
|
#define CLIP_BOTTOM 2
|
|
|
|
#define CLIP_RIGHT 4
|
|
|
|
#define CLIP_LEFT 8
|
|
|
|
|
|
|
|
int LineClip ( clip_t *clip, int *x1, int *y1, int *x2, int *y2 );
|
|
|
|
|
|
|
|
int BlockClip( clip_t *clip, int *x1, int *y1, int *x2, int* y2 );
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
unsigned width;
|
|
|
|
unsigned height;
|
|
|
|
u32_t format;
|
|
|
|
u32_t flags;
|
|
|
|
unsigned pitch;
|
|
|
|
void *mapped;
|
|
|
|
u32_t handle;
|
|
|
|
}pixmap_t;
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
unsigned width;
|
|
|
|
unsigned height;
|
|
|
|
u32_t format;
|
|
|
|
u32_t flags;
|
|
|
|
|
|
|
|
unsigned pitch;
|
|
|
|
void *mapped;
|
|
|
|
|
|
|
|
unsigned pitch_offset;
|
|
|
|
void *local;
|
|
|
|
}local_pixmap_t;
|
|
|
|
|
|
|
|
//int CreatePixmap(userpixmap_t *io);
|
|
|
|
//int DestroyPixmap(userpixmap_t *io);
|
|
|
|
//int LockPixmap(userpixmap_t *io);
|
|
|
|
//int UnlockPixmap(userpixmap_t *io);
|
2008-07-04 11:14:15 +02:00
|
|
|
|
2008-10-12 23:59:52 +02:00
|
|
|
#define PX_LOCK 1
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
local_pixmap_t *dstpix;
|
|
|
|
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
int x0;
|
|
|
|
int y0;
|
|
|
|
};
|
|
|
|
union
|
|
|
|
{
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
int x1;
|
|
|
|
int y1;
|
|
|
|
};
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
int w;
|
|
|
|
int h;
|
|
|
|
};
|
|
|
|
};
|
2008-07-04 11:14:15 +02:00
|
|
|
color_t color;
|
2008-06-26 20:19:47 +02:00
|
|
|
}draw_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2008-10-12 23:59:52 +02:00
|
|
|
local_pixmap_t *dstpix;
|
2008-07-04 11:14:15 +02:00
|
|
|
|
2008-06-26 20:19:47 +02:00
|
|
|
int x;
|
|
|
|
int y;
|
|
|
|
int w;
|
|
|
|
int h;
|
|
|
|
|
|
|
|
color_t bkcolor;
|
|
|
|
color_t fcolor;
|
|
|
|
|
|
|
|
u32_t bmp0;
|
|
|
|
u32_t bmp1;
|
|
|
|
}fill_t;
|
|
|
|
|
2008-06-27 12:46:14 +02:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
int src_x;
|
|
|
|
int src_y;
|
|
|
|
int dst_x;
|
|
|
|
int dst_y;
|
|
|
|
int w;
|
|
|
|
int h;
|
|
|
|
}blit_t;
|
|
|
|
|
2008-06-26 20:19:47 +02:00
|
|
|
typedef struct
|
|
|
|
{
|
2008-10-12 23:59:52 +02:00
|
|
|
local_pixmap_t *dstpix;
|
2008-07-04 11:14:15 +02:00
|
|
|
int dst_x;
|
|
|
|
int dst_y;
|
2008-07-03 13:35:35 +02:00
|
|
|
|
2008-10-12 23:59:52 +02:00
|
|
|
local_pixmap_t *srcpix;
|
2008-07-04 11:14:15 +02:00
|
|
|
int src_x;
|
|
|
|
int src_y;
|
|
|
|
int w;
|
|
|
|
int h;
|
2008-07-03 13:35:35 +02:00
|
|
|
}pixblit_t;
|
|
|
|
|
|
|
|
|
2008-10-12 23:59:52 +02:00
|
|
|
int Line2P(draw_t *draw);
|
2008-06-26 20:19:47 +02:00
|
|
|
|
|
|
|
int DrawRect(draw_t * draw);
|
|
|
|
int FillRect(fill_t * fill);
|
|
|
|
|
2008-06-27 12:46:14 +02:00
|
|
|
int Blit(blit_t *blit);
|
2008-06-26 20:19:47 +02:00
|
|
|
|
2008-07-02 14:41:34 +02:00
|
|
|
int RadeonComposite( blit_t *blit);
|
|
|
|
|
2008-07-03 13:35:35 +02:00
|
|
|
|
|
|
|
int PixBlit(pixblit_t* blit);
|
2008-07-02 14:41:34 +02:00
|
|
|
|
2008-07-04 11:14:15 +02:00
|
|
|
|
2008-06-26 20:19:47 +02:00
|
|
|
|
2008-07-04 20:52:25 +02:00
|
|
|
|