1 #ifndef P96GFX_INTERN_H
2 #define P96GFX_INTERN_H
4 #include <exec/libraries.h>
5 #include <exec/semaphores.h>
19 struct p96gfx_staticdata
21 struct ExecBase
*cs_SysBase
;
22 struct Library
*cs_GfxBase
;
23 struct Library
*cs_IntuitionBase
;
24 struct Library
*cs_UtilityBase
;
25 struct Library
*cs_OOPBase
;
29 OOP_Class
*basebm
; /* baseclass for CreateObject */
33 OOP_AttrBase hiddAttrBase
;
34 OOP_AttrBase hiddBitMapAttrBase
;
35 OOP_AttrBase hiddP96GFXBitMapAttrBase
;
36 OOP_AttrBase hiddGCAttrBase
;
37 OOP_AttrBase hiddSyncAttrBase
;
38 OOP_AttrBase hiddPixFmtAttrBase
;
39 OOP_AttrBase hiddGfxAttrBase
;
40 OOP_AttrBase hiddP96GfxAttrBase
;
41 OOP_AttrBase hiddColorMapAttrBase
;
43 OOP_MethodID hiddBitMapBase
;
44 OOP_MethodID hiddColorMapBase
;
45 OOP_MethodID hiddGfxBase
;
46 OOP_MethodID hiddP96GfxBase
;
48 struct List foundCards
;
51 struct p96gfx_carddata
53 struct Node p96gfx_Node
;
54 struct TagItem
*p96gfxcd_Tags
;
56 char *p96gfx_HWResTmplt
;
59 struct List bitmaplist
;
60 struct Library
*CardBase
;
62 struct P96GfxBitMapData
*disp
;
65 struct ModeInfo
*modeinfo
;
66 struct ModeInfo
*fakemodeinfo
;
71 ULONG vram_used
, fram_used
;
72 struct MemHeader
*vmem
;
74 WORD sprite_width
, sprite_height
;
81 UWORD dwidth
, dheight
;
87 struct ViewPort
*viewport
;
88 void (*acb
)(void *data
, void *bm
);
91 struct SignalSemaphore HWLock
;
92 struct SignalSemaphore MultiBMLock
;
97 struct Library library
;
99 struct p96gfx_staticdata csd
;
103 #define CSD(cl) (&((struct P96GFXclbase *)cl->UserData)->csd)
105 #define SysBase (csd->cs_SysBase)
106 #define OOPBase (csd->cs_OOPBase)
107 #define UtilityBase (csd->cs_UtilityBase)
109 #define __IHidd (csd->hiddAttrBase)
110 #define __IHidd_BitMap (csd->hiddBitMapAttrBase)
111 #define __IHidd_BitMap_P96 (csd->hiddP96GFXBitMapAttrBase)
112 #define __IHidd_GC (csd->hiddGCAttrBase)
113 #define __IHidd_Sync (csd->hiddSyncAttrBase)
114 #define __IHidd_PixFmt (csd->hiddPixFmtAttrBase)
115 #define __IHidd_Gfx (csd->hiddGfxAttrBase)
116 #define __IHidd_P96Gfx (csd->hiddP96GfxAttrBase)
117 //#define __IHidd_Attr (csd->hiddAttrBase)
118 #define __IHidd_ColorMap (csd->hiddColorMapAttrBase)
120 #define HiddBitMapBase (csd->hiddBitMapBase)
121 #define HiddColorMapBase (csd->hiddColorMapBase)
122 #define HiddGfxBase (csd->hiddGfxBase)
123 #define HiddP96GfxBase (csd->hiddP96GfxBase)
125 #define LOCK_HW {ObtainSemaphore(&(cid)->HWLock);}
126 #define UNLOCK_HW {ReleaseSemaphore(&(cid)->HWLock);}
128 #define LOCK_MULTI_BITMAP {ObtainSemaphore(&(cid)->MultiBMLock);}
129 #define UNLOCK_MULTI_BITMAP {ReleaseSemaphore(&(cid)->MultiBMLock);}