2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
5 Desc: Graphics function BltClear()
8 #include "graphics_intern.h"
10 /*****************************************************************************
13 #include <proto/graphics.h>
15 AROS_LH3(void, BltClear
,
18 AROS_LHA(void *, memBlock
, A1
),
19 AROS_LHA(ULONG
, bytecount
, D0
),
20 AROS_LHA(ULONG
, flags
, D1
),
23 struct GfxBase
*, GfxBase
, 50, Graphics
)
26 Use the blitter for clearing a block of Chip-Ram.
29 memBlock - pointer to beginning of memory to be cleared
30 flags - set bit 0 to force function to wait until
31 the blitter - if used - is done
32 set bit 1 for row/bytesperrow - mode
33 bytecount - if bit 1 is set to 1: bytecount contains an even number
35 if bit 1 is set to 0: low 16 bits are taken as number of
36 bytes per row and upper 16 bits
37 are taken as number of rows.
40 A cleared block of Chip-Ram.
43 THIS FUNCTION IS DEPRECATED except if you want to simply clear
51 InitGels(), Animate(), graphics/rastport.h, graphics/gels.h
57 *****************************************************************************/
63 if (0 != (flags
& 2) )
64 /* use row/bytesperrow */
65 bytecount
= (bytecount
& 0xFFFF) * (bytecount
>> 16);
67 /* we have an even number of BYTES to clear here */
68 /* but use LONGS for clearing the block */
72 ((ULONG
*)memBlock
)[count
++] = 0;
73 /* see whether we had an odd number of WORDS */
74 if (0 != (bytecount
& 2))
75 ((UWORD
*)memBlock
)[(count
* 2)] = 0;