cpu.resource(pc-i386) Get this compile again, with acpica.library
[AROS.git] / rom / graphics / syncsbitmap.c
blob93f2faa18ca43b64bf0ef7da4881ed18aba9cc6d
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Graphics function SyncSBitMap()
6 Lang: english
7 */
8 #include <graphics/layers.h>
9 #include <graphics/clip.h>
10 #include "graphics_intern.h"
12 /*****************************************************************************
14 NAME */
15 #include <proto/graphics.h>
17 AROS_LH1(void, SyncSBitMap,
19 /* SYNOPSIS */
20 AROS_LHA(struct Layer *, l, A0),
22 /* LOCATION */
23 struct GfxBase *, GfxBase, 74, Graphics)
25 /* FUNCTION
26 If the layer has a superbitmap all the parts that are visible will
27 be copied into the superbitmap. This is usually not done except when
28 parts of a superbitmapped layer become hidden the visible parts are
29 stored into the superbitmap.
31 INPUTS
32 l - pointer to superbitmapped layer
34 RESULT
35 The superbitmap will be synchronized with the visible part. The
36 superbitmap attached to the layer will be up-to-date with what's
37 really in the layer.
39 NOTES
41 EXAMPLE
43 BUGS
45 SEE ALSO
46 CopySBitMap()
48 INTERNALS
50 HISTORY
52 *****************************************************************************/
54 AROS_LIBFUNC_INIT
56 struct ClipRect * CR = l->ClipRect;
58 if (NULL == l->SuperBitMap || (l->Flags & LAYERSUPER) == 0)
59 return;
61 while (NULL != CR)
63 /* a cliprect of a superbitmapped layer is visible if lobs==NULL*/
64 if (NULL == CR->lobs)
66 /* I have to backup this part into the SuperBitMap! I find the
67 data in the bitmap of the rastport of this layer */
68 BltBitMap(l->rp->BitMap,
69 CR->bounds.MinX,
70 CR->bounds.MinY,
71 l->SuperBitMap,
72 CR->bounds.MinX - l->bounds.MinX - l->Scroll_X,
73 CR->bounds.MinY - l->bounds.MinY - l->Scroll_Y,
74 CR->bounds.MaxX - CR->bounds.MinX + 1,
75 CR->bounds.MaxY - CR->bounds.MinY + 1,
76 0x0c0,
77 0xff,
78 NULL
81 CR = CR->Next;
84 AROS_LIBFUNC_EXIT
85 } /* SyncSBitMap */