r4493@vps: verhaegs | 2007-04-19 14:44:00 -0400
[AROS.git] / rom / hyperlayers / initlayers.c
blob8254b0d4bc8af0b57ae01cb53cd8ffc5fc7942eb
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: english
7 */
8 #include <aros/libcall.h>
9 #include <proto/exec.h>
10 #include <proto/alib.h>
12 #define DEBUG 0
13 #include <aros/debug.h>
14 #undef kprintf
16 /*****************************************************************************
18 NAME */
19 #include <proto/layers.h>
20 #include "layers_intern.h"
22 AROS_LH1(void, InitLayers,
24 /* SYNOPSIS */
25 AROS_LHA(struct Layer_Info *, li, A0),
27 /* LOCATION */
28 struct LayersBase *, LayersBase, 5, Layers)
30 /* FUNCTION
31 Initializes the supplied Layer_Info, so it's ready for use.
32 Leaves the Layer_Info in an unlocked state.
34 INPUTS
35 li -- pointer to Layer_Info structure
37 RESULT
39 NOTES
40 This function is obsolete. Use NewLayerInfo() instead.
42 EXAMPLE
44 BUGS
46 SEE ALSO
47 NewLayerInfo
49 INTERNALS
51 HISTORY
52 27-11-96 digulla automatically created from
53 layers_lib.fd and clib/layers_protos.h
55 *****************************************************************************/
57 AROS_LIBFUNC_INIT
58 AROS_LIBBASE_EXT_DECL(struct LayersBase *,LayersBase)
60 UWORD i;
62 D(bug("InitLayers(li @ $%lx)\n", li));
64 /* init LayerInfo structure with all zeros */
65 for(i = 0; i < sizeof(struct Layer_Info); i++)
66 ((UBYTE *)li)[i] = 0;
68 NewList((struct List *)&li->gs_Head);
70 InitSemaphore(&li->Lock);
72 li->fatten_count = -1;
73 li->Flags = LIFLG_SUPPORTS_OFFSCREEN_LAYERS;
75 AROS_LIBFUNC_EXIT
76 } /* InitLayers */