Fix IO memory access .. SB128 driver makes noises in VMWare - CMI is untested (Curren...
[AROS.git] / rom / graphics / cgx_support.c
blob5219e6a9a5ac18975e5969938a416b15978abe9b
1 #include "graphics_intern.h"
2 #include "gfxfuncsupport.h"
4 /* Private lowlevel functions needed by cybergraphics.library */
6 AROS_LH9(LONG, WritePixels8,
7 AROS_LHA(struct RastPort *,rp, A0),
8 AROS_LHA(UBYTE *,array, A1),
9 AROS_LHA(ULONG, modulo, D0),
10 AROS_LHA(LONG, xstart, D1),
11 AROS_LHA(LONG, ystart, D2),
12 AROS_LHA(LONG, xstop, D3),
13 AROS_LHA(LONG, ystop, D4),
14 AROS_LHA(APTR, pixlut, A2),
15 AROS_LHA(BOOL, do_update, D5),
16 struct GfxBase *, GfxBase, 182, Graphics)
18 AROS_LIBFUNC_INIT
20 return write_pixels_8(rp, array, modulo, xstart, ystart, xstop, ystop, pixlut, do_update, GfxBase);
22 AROS_LIBFUNC_EXIT
25 AROS_LH8(LONG, FillRectPenDrMd,
26 AROS_LHA(struct RastPort *, rp, A0),
27 AROS_LHA(LONG, x1, D0),
28 AROS_LHA(LONG, y1, D1),
29 AROS_LHA(LONG, x2, D2),
30 AROS_LHA(LONG, y2, D3),
31 AROS_LHA(ULONG, pix, D4),
32 AROS_LHA(IPTR, drmd, D5),
33 AROS_LHA(BOOL, do_update, D6),
34 struct GfxBase *, GfxBase, 183, Graphics)
36 AROS_LIBFUNC_INIT
38 return fillrect_pendrmd(rp, x1, y1, x2, y2, pix, drmd, do_update, GfxBase);
40 AROS_LIBFUNC_EXIT
43 AROS_LH6(ULONG, DoRenderFunc,
44 AROS_LHA(struct RastPort *, rp, A0),
45 AROS_LHA(Point *, src, A1),
46 AROS_LHA(struct Rectangle *, rr, A2),
47 AROS_LHA(APTR, render_func, A3),
48 AROS_LHA(APTR, funcdata, A4),
49 AROS_LHA(BOOL, do_update, D0),
50 struct GfxBase *, GfxBase, 184, Graphics)
52 AROS_LIBFUNC_INIT
54 ULONG res;
56 if (!OBTAIN_DRIVERDATA(rp, GfxBase))
57 return -1;
59 res = do_render_func(rp, src, rr, render_func, funcdata, do_update, FALSE, GfxBase);
61 RELEASE_DRIVERDATA(rp, GfxBase);
62 return res;
64 AROS_LIBFUNC_EXIT
67 AROS_LH6(LONG, DoPixelFunc,
68 AROS_LHA(struct RastPort *, rp, A0),
69 AROS_LHA(LONG, x, D0),
70 AROS_LHA(LONG, y, D1),
71 AROS_LHA(APTR, render_func, A1),
72 AROS_LHA(APTR, funcdata, A2),
73 AROS_LHA(BOOL, do_update, D2),
74 struct GfxBase *, GfxBase, 185, Graphics)
76 AROS_LIBFUNC_INIT
78 LONG res;
80 if (!OBTAIN_DRIVERDATA(rp, GfxBase))
81 return -1;
83 res = do_pixel_func(rp, x, y, render_func, funcdata, do_update, GfxBase);
85 RELEASE_DRIVERDATA(rp, GfxBase);
86 return res;
88 AROS_LIBFUNC_EXIT