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