Rev 882 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
882 | serge | 1 | |
1002 | serge | 2 | |
3 | |||
882 | serge | 4 | #include "system.h" |
5 | |||
6 | |||
7 | |||
8 | |||
9 | static pixmap_t scrn_pixmap; |
||
10 | |||
11 | |||
12 | |||
13 | |||
14 | #define HS_VERTICAL 1 |
||
15 | #define HS_FDIAGONAL 2 |
||
16 | #define HS_BDIAGONAL 3 |
||
17 | #define HS_CROSS 4 |
||
18 | #define HS_DIAGCROSS 5 |
||
19 | |||
20 | |||
21 | |||
22 | { 0xFF000000, 0xFF000000, /* HORIZONTAL */ |
||
23 | 0x22222222, 0x22222222, /* VERTICAL */ |
||
24 | 0x11224488, 0x11224488, /* FDIAGONAL */ |
||
25 | 0x44221188, 0x44221188, /* BDIAGONAL */ |
||
26 | 0xFF111111, 0xFF111111, /* CROSS */ |
||
27 | 0x10284482, 0x01824428 /* DCROSS */ |
||
28 | }; |
||
29 | |||
30 | |||
31 | |||
32 | int available; /**< Count of available items in this slab. */ |
||
33 | void *start; /**< Start address of first item. */ |
||
34 | void *nextavail; /**< The index of next available item. */ |
||
35 | } slab_t; |
||
36 | |||
37 | |||
38 | static pixmap_t pixmaps[64]; |
||
39 | static slab_t br_slab; |
||
40 | static slab_t px_slab; |
||
41 | |||
42 | |||
43 | { |
||
44 | int p; |
||
45 | int i; |
||
46 | |||
47 | |||
48 | int scrnbpp; |
||
49 | int scrnpitch; |
||
50 | |||
51 | |||
52 | return FALSE; |
||
53 | |||
54 | |||
55 | return FALSE; |
||
56 | |||
57 | |||
58 | scrnpitch = GetScreenPitch(); |
||
59 | |||
60 | |||
61 | scrn_clip.ymin = 0; |
||
62 | scrn_clip.xmax = (scrnsize >> 16) - 1; |
||
63 | scrn_clip.ymax = (scrnsize & 0xFFFF) - 1; |
||
64 | |||
65 | |||
66 | scrn_pixmap.height = scrnsize & 0xFFFF; |
||
67 | scrn_pixmap.format = PICT_a8r8g8b8; |
||
68 | scrn_pixmap.flags = PX_MEM_LOCAL; |
||
1002 | serge | 69 | scrn_pixmap.pitch = scrnpitch; |
882 | serge | 70 | scrn_pixmap.mapped = (void*)LFB_BASE; |
1002 | serge | 71 | |
882 | serge | 72 | |
73 | br_slab.start = brushes; |
||
74 | br_slab.nextavail = brushes; |
||
75 | |||
76 | |||
77 | { |
||
78 | *(int *)p = p+sizeof(brush_t); |
||
79 | p = p+sizeof(brush_t); |
||
80 | }; |
||
81 | |||
82 | |||
83 | px_slab.start = pixmaps; |
||
84 | px_slab.nextavail = pixmaps; |
||
85 | |||
86 | |||
87 | { |
||
88 | *(int *)p = p+sizeof(pixmap_t); |
||
89 | p = p+sizeof(pixmap_t); |
||
90 | }; |
||
91 | |||
92 | |||
93 | if(srv_hw2d == 0) |
||
94 | srv_hw2d = load_service("/rd/1/drivers/ati2d.drv"); |
||
95 | |||
96 | |||
97 | }; |
||
98 | |||
99 | |||
100 | |||
101 | #include "pixmap.inc" |
||
102 | #include "brush.inc" |
||
103 | #include "draw.inc" |
||
104 | |||
105 | |||
106 | { |
||
107 | char *name; |
||
108 | void *f; |
||
109 | }export_t; |
||
110 | |||
111 | |||
112 | char szVersion[] = "version"; |
||
113 | |||
114 | |||
115 | //char szLineClip[] = "LineClip"; |
||
116 | |||
117 | |||
118 | char szDestroyPixmap[] = "DestroyPixmap"; |
||
119 | char szLockPixmap[] = "LockPixmap"; |
||
120 | char szUnlockPixmap[] = "UnlockPixmap"; |
||
121 | char szGetPixmapPitch[] = "GetPixmapPitch"; |
||
122 | |||
123 | |||
124 | char szCreateMonoBrush[] = "CreateMonoBrush"; |
||
125 | char szDestroyBrush[] = "DestroyBrush"; |
||
126 | |||
127 | |||
128 | char szLine[] = "Line"; |
||
129 | char szDrawRect[] = "DrawRect"; |
||
130 | char szFillRect[] = "FillRect"; |
||
131 | char szBlit[] = "Blit"; |
||
132 | char szTransparentBlit[] = "TransparentBlit"; |
||
133 | char szBlitAlpha[] = "BlitAlpha"; |
||
1002 | serge | 134 | |
882 | serge | 135 | |
136 | |||
137 | { |
||
138 | { szStart, start }, |
||
139 | { szVersion, (void*)0x00010001 }, |
||
140 | |||
141 | |||
142 | // { szLineClip, LineClip }, |
||
143 | |||
144 | |||
145 | { szDestroyPixmap, DestroyPixmap }, |
||
146 | { szLockPixmap, LockPixmap }, |
||
147 | { szUnlockPixmap, UnlockPixmap }, |
||
148 | { szGetPixmapPitch, GetPixmapPitch }, |
||
149 | |||
150 | |||
151 | { szCreateMonoBrush, CreateMonoBrush }, |
||
152 | { szDestroyBrush, DestroyBrush }, |
||
153 | |||
154 | |||
155 | { szLine, Line }, |
||
156 | { szDrawRect, DrawRect }, |
||
157 | { szFillRect, FillRect }, |
||
158 | { szBlit, Blit }, |
||
159 | { szTransparentBlit, TransparentBlit }, |
||
160 | { szBlitAlpha, BlitAlpha }, |
||
1002 | serge | 161 | |
882 | serge | 162 | |
163 | };>>>>> |
||
164 |