Rev 4499 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4499 | Rev 4506 | ||
---|---|---|---|
1 | #ifndef __KOS_32_SYS_H__ |
1 | #ifndef __KOS_32_SYS_H__ |
2 | #define __KOS_32_SYS_H__ |
2 | #define __KOS_32_SYS_H__ |
3 | 3 | ||
4 | #include |
4 | #include |
5 | #include |
5 | #include |
6 | #include |
6 | #include |
7 | 7 | ||
8 | //#ifdef CONFIG_DEBUF |
8 | //#ifdef CONFIG_DEBUF |
9 | // #define DBG(format,...) printf(format,##__VA_ARGS__) |
9 | // #define DBG(format,...) printf(format,##__VA_ARGS__) |
10 | //#else |
10 | //#else |
11 | // #define DBG(format,...) |
11 | // #define DBG(format,...) |
12 | //#endif |
12 | //#endif |
13 | 13 | ||
14 | #define TYPE_3_BORDER_WIDTH 5 |
14 | #define TYPE_3_BORDER_WIDTH 5 |
15 | 15 | ||
16 | typedef unsigned int color_t; |
16 | typedef unsigned int color_t; |
17 | 17 | ||
18 | typedef union __attribute__((packed)) |
18 | typedef union __attribute__((packed)) |
19 | { |
19 | { |
20 | uint32_t val; |
20 | uint32_t val; |
21 | struct |
21 | struct |
22 | { |
22 | { |
23 | short x; |
23 | short x; |
24 | short y; |
24 | short y; |
25 | }; |
25 | }; |
26 | }pos_t; |
26 | }pos_t; |
27 | 27 | ||
28 | typedef union __attribute__((packed)) |
28 | typedef union __attribute__((packed)) |
29 | { |
29 | { |
30 | uint32_t val; |
30 | uint32_t val; |
31 | struct |
31 | struct |
32 | { |
32 | { |
33 | uint8_t state; |
33 | uint8_t state; |
34 | uint8_t code; |
34 | uint8_t code; |
35 | uint16_t ctrl_key; |
35 | uint16_t ctrl_key; |
36 | }; |
36 | }; |
37 | }oskey_t; |
37 | }oskey_t; |
38 | 38 | ||
39 | typedef struct |
39 | typedef struct |
40 | { |
40 | { |
41 | unsigned handle; |
41 | unsigned handle; |
42 | unsigned io_code; |
42 | unsigned io_code; |
43 | void *input; |
43 | void *input; |
44 | int inp_size; |
44 | int inp_size; |
45 | void *output; |
45 | void *output; |
46 | int out_size; |
46 | int out_size; |
47 | }ioctl_t; |
47 | }ioctl_t; |
48 | 48 | ||
49 | 49 | ||
50 | static inline |
50 | static inline |
51 | void DefineButton(uint32_t x_w, uint32_t y_h, uint32_t id, uint32_t color) |
51 | void DefineButton(uint32_t x_w, uint32_t y_h, uint32_t id, uint32_t color) |
52 | { |
52 | { |
53 | __asm__ __volatile__( |
53 | __asm__ __volatile__( |
54 | "int $0x40" |
54 | "int $0x40" |
55 | ::"a"(8), |
55 | ::"a"(8), |
56 | "b"(x_w), |
56 | "b"(x_w), |
57 | "c"(y_h), |
57 | "c"(y_h), |
58 | "d"(id), |
58 | "d"(id), |
59 | "S"(color)); |
59 | "S"(color)); |
60 | 60 | ||
61 | 61 | ||
62 | }; |
62 | }; |
63 | 63 | ||
64 | static inline |
64 | static inline |
65 | uint32_t get_skin_height(void) |
65 | uint32_t get_skin_height(void) |
66 | { |
66 | { |
67 | uint32_t height; |
67 | uint32_t height; |
68 | 68 | ||
69 | __asm__ __volatile__( |
69 | __asm__ __volatile__( |
70 | "int $0x40 \n\t" |
70 | "int $0x40 \n\t" |
71 | :"=a"(height) |
71 | :"=a"(height) |
72 | :"a"(48),"b"(4)); |
72 | :"a"(48),"b"(4)); |
73 | return height; |
73 | return height; |
74 | } |
74 | } |
75 | 75 | ||
76 | static inline |
76 | static inline |
77 | void BeginDraw(void) |
77 | void BeginDraw(void) |
78 | { |
78 | { |
79 | __asm__ __volatile__( |
79 | __asm__ __volatile__( |
80 | "int $0x40" ::"a"(12),"b"(1)); |
80 | "int $0x40" ::"a"(12),"b"(1)); |
81 | }; |
81 | }; |
82 | 82 | ||
83 | static inline |
83 | static inline |
84 | void EndDraw(void) |
84 | void EndDraw(void) |
85 | { |
85 | { |
86 | __asm__ __volatile__( |
86 | __asm__ __volatile__( |
87 | "int $0x40" ::"a"(12),"b"(2)); |
87 | "int $0x40" ::"a"(12),"b"(2)); |
88 | }; |
88 | }; |
89 | 89 | ||
90 | static inline void DrawWindow(int x, int y, int w, int h, const char *name, |
90 | static inline void DrawWindow(int x, int y, int w, int h, const char *name, |
91 | color_t workcolor, uint32_t style) |
91 | color_t workcolor, uint32_t style) |
92 | { |
92 | { |
93 | 93 | ||
94 | __asm__ __volatile__( |
94 | __asm__ __volatile__( |
95 | "int $0x40" |
95 | "int $0x40" |
96 | ::"a"(0), |
96 | ::"a"(0), |
97 | "b"((x << 16) | ((w-1) & 0xFFFF)), |
97 | "b"((x << 16) | ((w-1) & 0xFFFF)), |
98 | "c"((y << 16) | ((h-1) & 0xFFFF)), |
98 | "c"((y << 16) | ((h-1) & 0xFFFF)), |
99 | "d"((style << 24) | (workcolor & 0xFFFFFF)), |
99 | "d"((style << 24) | (workcolor & 0xFFFFFF)), |
100 | "D"(name)); |
100 | "D"(name), |
- | 101 | "S"(0)); |
|
101 | }; |
102 | }; |
102 | 103 | ||
103 | static inline |
104 | static inline |
104 | pos_t get_mouse_pos(void) |
105 | pos_t get_mouse_pos(void) |
105 | { |
106 | { |
106 | pos_t val; |
107 | pos_t val; |
107 | 108 | ||
108 | __asm__ __volatile__( |
109 | __asm__ __volatile__( |
109 | "int $0x40 \n\t" |
110 | "int $0x40 \n\t" |
110 | "rol $16, %%eax" |
111 | "rol $16, %%eax" |
111 | :"=a"(val) |
112 | :"=a"(val) |
112 | :"a"(37),"b"(1)); |
113 | :"a"(37),"b"(1)); |
113 | return val; |
114 | return val; |
114 | } |
115 | } |
115 | 116 | ||
116 | static inline |
117 | static inline |
117 | pos_t get_cursor_pos(void) |
118 | pos_t get_cursor_pos(void) |
118 | { |
119 | { |
119 | pos_t val; |
120 | pos_t val; |
120 | 121 | ||
121 | __asm__ __volatile__( |
122 | __asm__ __volatile__( |
122 | "int $0x40 \n\t" |
123 | "int $0x40 \n\t" |
123 | "rol $16, %%eax" |
124 | "rol $16, %%eax" |
124 | :"=a"(val) |
125 | :"=a"(val) |
125 | :"a"(37),"b"(0)); |
126 | :"a"(37),"b"(0)); |
126 | return val; |
127 | return val; |
127 | } |
128 | } |
128 | 129 | ||
129 | static inline |
130 | static inline |
130 | uint32_t get_mouse_buttons(void) |
131 | uint32_t get_mouse_buttons(void) |
131 | { |
132 | { |
132 | uint32_t val; |
133 | uint32_t val; |
133 | 134 | ||
134 | __asm__ __volatile__( |
135 | __asm__ __volatile__( |
135 | "int $0x40" |
136 | "int $0x40" |
136 | :"=a"(val) |
137 | :"=a"(val) |
137 | :"a"(37),"b"(2)); |
138 | :"a"(37),"b"(2)); |
138 | return val; |
139 | return val; |
139 | }; |
140 | }; |
140 | 141 | ||
141 | static inline |
142 | static inline |
142 | uint32_t get_mouse_wheels(void) |
143 | uint32_t get_mouse_wheels(void) |
143 | { |
144 | { |
144 | uint32_t val; |
145 | uint32_t val; |
145 | 146 | ||
146 | __asm__ __volatile__( |
147 | __asm__ __volatile__( |
147 | "int $0x40 \n\t" |
148 | "int $0x40 \n\t" |
148 | "rol $16, %%eax" |
149 | "rol $16, %%eax" |
149 | :"=a"(val) |
150 | :"=a"(val) |
150 | :"a"(37),"b"(7)); |
151 | :"a"(37),"b"(7)); |
151 | return val; |
152 | return val; |
152 | }; |
153 | }; |
153 | 154 | ||
154 | static inline |
155 | static inline |
155 | uint32_t wait_for_event(uint32_t time) |
156 | uint32_t wait_for_event(uint32_t time) |
156 | { |
157 | { |
157 | uint32_t val; |
158 | uint32_t val; |
158 | __asm__ __volatile__( |
159 | __asm__ __volatile__( |
159 | "int $0x40" |
160 | "int $0x40" |
160 | :"=a"(val) |
161 | :"=a"(val) |
161 | :"a"(23), "b"(time)); |
162 | :"a"(23), "b"(time)); |
162 | return val; |
163 | return val; |
163 | }; |
164 | }; |
164 | 165 | ||
165 | static inline uint32_t check_os_event() |
166 | static inline uint32_t check_os_event() |
166 | { |
167 | { |
167 | uint32_t val; |
168 | uint32_t val; |
168 | __asm__ __volatile__( |
169 | __asm__ __volatile__( |
169 | "int $0x40" |
170 | "int $0x40" |
170 | :"=a"(val) |
171 | :"=a"(val) |
171 | :"a"(11)); |
172 | :"a"(11)); |
172 | return val; |
173 | return val; |
173 | }; |
174 | }; |
174 | 175 | ||
175 | static inline uint32_t get_os_event() |
176 | static inline uint32_t get_os_event() |
176 | { |
177 | { |
177 | uint32_t val; |
178 | uint32_t val; |
178 | __asm__ __volatile__( |
179 | __asm__ __volatile__( |
179 | "int $0x40" |
180 | "int $0x40" |
180 | :"=a"(val) |
181 | :"=a"(val) |
181 | :"a"(10)); |
182 | :"a"(10)); |
182 | return val; |
183 | return val; |
183 | }; |
184 | }; |
184 | 185 | ||
185 | static inline |
186 | static inline |
186 | uint32_t get_tick_count(void) |
187 | uint32_t get_tick_count(void) |
187 | { |
188 | { |
188 | uint32_t val; |
189 | uint32_t val; |
189 | __asm__ __volatile__( |
190 | __asm__ __volatile__( |
190 | "int $0x40" |
191 | "int $0x40" |
191 | :"=a"(val) |
192 | :"=a"(val) |
192 | :"a"(26),"b"(9)); |
193 | :"a"(26),"b"(9)); |
193 | return val; |
194 | return val; |
194 | }; |
195 | }; |
195 | 196 | ||
196 | static inline |
197 | static inline |
197 | oskey_t get_key(void) |
198 | oskey_t get_key(void) |
198 | { |
199 | { |
199 | oskey_t val; |
200 | oskey_t val; |
200 | __asm__ __volatile__( |
201 | __asm__ __volatile__( |
201 | "int $0x40" |
202 | "int $0x40" |
202 | :"=a"(val) |
203 | :"=a"(val) |
203 | :"a"(2)); |
204 | :"a"(2)); |
204 | return val; |
205 | return val; |
205 | } |
206 | } |
206 | 207 | ||
207 | static inline |
208 | static inline |
208 | uint32_t get_os_button() |
209 | uint32_t get_os_button() |
209 | { |
210 | { |
210 | uint32_t val; |
211 | uint32_t val; |
211 | __asm__ __volatile__( |
212 | __asm__ __volatile__( |
212 | "int $0x40" |
213 | "int $0x40" |
213 | :"=a"(val) |
214 | :"=a"(val) |
214 | :"a"(17)); |
215 | :"a"(17)); |
215 | return val>>8; |
216 | return val>>8; |
216 | }; |
217 | }; |
217 | 218 | ||
218 | static inline uint32_t get_service(char *name) |
219 | static inline uint32_t get_service(char *name) |
219 | { |
220 | { |
220 | uint32_t retval = 0; |
221 | uint32_t retval = 0; |
221 | asm volatile ("int $0x40" |
222 | asm volatile ("int $0x40" |
222 | :"=a"(retval) |
223 | :"=a"(retval) |
223 | :"a"(68),"b"(16),"c"(name) |
224 | :"a"(68),"b"(16),"c"(name) |
224 | :"memory"); |
225 | :"memory"); |
225 | 226 | ||
226 | return retval; |
227 | return retval; |
227 | }; |
228 | }; |
228 | 229 | ||
229 | static inline int call_service(ioctl_t *io) |
230 | static inline int call_service(ioctl_t *io) |
230 | { |
231 | { |
231 | int retval; |
232 | int retval; |
232 | 233 | ||
233 | asm volatile("int $0x40" |
234 | asm volatile("int $0x40" |
234 | :"=a"(retval) |
235 | :"=a"(retval) |
235 | :"a"(68),"b"(17),"c"(io) |
236 | :"a"(68),"b"(17),"c"(io) |
236 | :"memory","cc"); |
237 | :"memory","cc"); |
237 | 238 | ||
238 | return retval; |
239 | return retval; |
239 | }; |
240 | }; |
240 | 241 | ||
241 | 242 | ||
242 | static inline |
243 | static inline |
243 | void draw_line(int xs, int ys, int xe, int ye, color_t color) |
244 | void draw_line(int xs, int ys, int xe, int ye, color_t color) |
244 | { |
245 | { |
245 | __asm__ __volatile__( |
246 | __asm__ __volatile__( |
246 | "int $0x40" |
247 | "int $0x40" |
247 | ::"a"(38), "d"(color), |
248 | ::"a"(38), "d"(color), |
248 | "b"((xs << 16) | xe), |
249 | "b"((xs << 16) | xe), |
249 | "c"((ys << 16) | ye)); |
250 | "c"((ys << 16) | ye)); |
250 | } |
251 | } |
251 | 252 | ||
252 | 253 | ||
253 | 254 | ||
254 | static inline |
255 | static inline |
255 | void draw_bar(int x, int y, int w, int h, color_t color) |
256 | void draw_bar(int x, int y, int w, int h, color_t color) |
256 | { |
257 | { |
257 | __asm__ __volatile__( |
258 | __asm__ __volatile__( |
258 | "int $0x40" |
259 | "int $0x40" |
259 | ::"a"(13), "d"(color), |
260 | ::"a"(13), "d"(color), |
260 | "b"((x << 16) | w), |
261 | "b"((x << 16) | w), |
261 | "c"((y << 16) | h)); |
262 | "c"((y << 16) | h)); |
262 | } |
263 | } |
263 | 264 | ||
264 | static inline |
265 | static inline |
265 | void draw_bitmap(void *bitmap, int x, int y, int w, int h) |
266 | void draw_bitmap(void *bitmap, int x, int y, int w, int h) |
266 | { |
267 | { |
267 | __asm__ __volatile__( |
268 | __asm__ __volatile__( |
268 | "int $0x40" |
269 | "int $0x40" |
269 | ::"a"(7), "b"(bitmap), |
270 | ::"a"(7), "b"(bitmap), |
270 | "c"((w << 16) | h), |
271 | "c"((w << 16) | h), |
271 | "d"((x << 16) | y)); |
272 | "d"((x << 16) | y)); |
272 | } |
273 | } |
273 | 274 | ||
274 | static inline |
275 | static inline |
275 | void draw_text_sys(const char *text, int x, int y, int len, color_t color) |
276 | void draw_text_sys(const char *text, int x, int y, int len, color_t color) |
276 | { |
277 | { |
277 | __asm__ __volatile__( |
278 | __asm__ __volatile__( |
278 | "int $0x40" |
279 | "int $0x40" |
279 | ::"a"(4),"d"(text), |
280 | ::"a"(4),"d"(text), |
280 | "b"((x << 16) | y), |
281 | "b"((x << 16) | y), |
281 | "S"(len),"c"(color)); |
282 | "S"(len),"c"(color)); |
282 | } |
283 | } |
283 | 284 | ||
284 | static inline void yield(void) |
285 | static inline void yield(void) |
285 | { |
286 | { |
286 | __asm__ __volatile__( |
287 | __asm__ __volatile__( |
287 | "int $0x40" |
288 | "int $0x40" |
288 | ::"a"(68), "b"(1)); |
289 | ::"a"(68), "b"(1)); |
289 | }; |
290 | }; |
290 | 291 | ||
291 | static inline void delay(uint32_t time) |
292 | static inline void delay(uint32_t time) |
292 | { |
293 | { |
293 | __asm__ __volatile__( |
294 | __asm__ __volatile__( |
294 | "int $0x40" |
295 | "int $0x40" |
295 | ::"a"(5), "b"(time) |
296 | ::"a"(5), "b"(time) |
296 | :"memory"); |
297 | :"memory"); |
297 | }; |
298 | }; |
298 | 299 | ||
299 | static inline |
300 | static inline |
300 | void *user_alloc(size_t size) |
301 | void *user_alloc(size_t size) |
301 | { |
302 | { |
302 | void *val; |
303 | void *val; |
303 | __asm__ __volatile__( |
304 | __asm__ __volatile__( |
304 | "int $0x40" |
305 | "int $0x40" |
305 | :"=a"(val) |
306 | :"=a"(val) |
306 | :"a"(68),"b"(12),"c"(size)); |
307 | :"a"(68),"b"(12),"c"(size)); |
307 | return val; |
308 | return val; |
308 | } |
309 | } |
309 | 310 | ||
310 | static inline |
311 | static inline |
311 | int user_free(void *mem) |
312 | int user_free(void *mem) |
312 | { |
313 | { |
313 | int val; |
314 | int val; |
314 | __asm__ __volatile__( |
315 | __asm__ __volatile__( |
315 | "int $0x40" |
316 | "int $0x40" |
316 | :"=a"(val) |
317 | :"=a"(val) |
317 | :"a"(68),"b"(13),"c"(mem)); |
318 | :"a"(68),"b"(13),"c"(mem)); |
318 | return val; |
319 | return val; |
319 | } |
320 | } |
320 | 321 | ||
321 | static inline |
322 | static inline |
322 | int *user_unmap(void *base, size_t offset, size_t size) |
323 | int *user_unmap(void *base, size_t offset, size_t size) |
323 | { |
324 | { |
324 | void *val; |
325 | void *val; |
325 | __asm__ __volatile__( |
326 | __asm__ __volatile__( |
326 | "int $0x40" |
327 | "int $0x40" |
327 | :"=a"(val) |
328 | :"=a"(val) |
328 | :"a"(68),"b"(26),"c"(base),"d"(offset),"S"(size)); |
329 | :"a"(68),"b"(26),"c"(base),"d"(offset),"S"(size)); |
329 | return val; |
330 | return val; |
330 | } |
331 | } |
331 | 332 | ||
332 | typedef union |
333 | typedef union |
333 | { |
334 | { |
334 | struct |
335 | struct |
335 | { |
336 | { |
336 | void *data; |
337 | void *data; |
337 | size_t size; |
338 | size_t size; |
338 | }; |
339 | }; |
339 | unsigned long long raw; |
340 | unsigned long long raw; |
340 | }ufile_t; |
341 | }ufile_t; |
341 | 342 | ||
342 | 343 | ||
343 | static inline ufile_t load_file(const char *path) |
344 | static inline ufile_t load_file(const char *path) |
344 | { |
345 | { |
345 | ufile_t uf; |
346 | ufile_t uf; |
346 | 347 | ||
347 | __asm__ __volatile__ ( |
348 | __asm__ __volatile__ ( |
348 | "int $0x40" |
349 | "int $0x40" |
349 | :"=A"(uf.raw) |
350 | :"=A"(uf.raw) |
350 | :"a" (68), "b"(27),"c"(path)); |
351 | :"a" (68), "b"(27),"c"(path)); |
351 | 352 | ||
352 | return uf; |
353 | return uf; |
353 | }; |
354 | }; |
354 | 355 | ||
355 | 356 | ||
356 | static inline int GetScreenSize() |
357 | static inline int GetScreenSize() |
357 | { |
358 | { |
358 | int retval; |
359 | int retval; |
359 | 360 | ||
360 | __asm__ __volatile__( |
361 | __asm__ __volatile__( |
361 | "int $0x40" |
362 | "int $0x40" |
362 | :"=a"(retval) |
363 | :"=a"(retval) |
363 | :"a"(61), "b"(1)); |
364 | :"a"(61), "b"(1)); |
364 | return retval; |
365 | return retval; |
365 | } |
366 | } |
366 | 367 | ||
367 | static inline |
368 | static inline |
368 | uint32_t load_cursor(void *path, uint32_t flags) |
369 | uint32_t load_cursor(void *path, uint32_t flags) |
369 | { |
370 | { |
370 | uint32_t val; |
371 | uint32_t val; |
371 | __asm__ __volatile__( |
372 | __asm__ __volatile__( |
372 | "int $0x40" |
373 | "int $0x40" |
373 | :"=a"(val) |
374 | :"=a"(val) |
374 | :"a"(37), "b"(4), "c"(path), "d"(flags)); |
375 | :"a"(37), "b"(4), "c"(path), "d"(flags)); |
375 | return val; |
376 | return val; |
376 | } |
377 | } |
377 | 378 | ||
378 | static inline |
379 | static inline |
379 | uint32_t set_cursor(uint32_t cursor) |
380 | uint32_t set_cursor(uint32_t cursor) |
380 | { |
381 | { |
381 | uint32_t old; |
382 | uint32_t old; |
382 | __asm__ __volatile__( |
383 | __asm__ __volatile__( |
383 | "int $0x40" |
384 | "int $0x40" |
384 | :"=a"(old) |
385 | :"=a"(old) |
385 | :"a"(37), "b"(5), "c"(cursor)); |
386 | :"a"(37), "b"(5), "c"(cursor)); |
386 | return old; |
387 | return old; |
387 | } |
388 | } |
388 | 389 | ||
389 | static inline |
390 | static inline |
390 | int destroy_cursor(uint32_t cursor) |
391 | int destroy_cursor(uint32_t cursor) |
391 | { |
392 | { |
392 | int ret; |
393 | int ret; |
393 | __asm__ __volatile__( |
394 | __asm__ __volatile__( |
394 | "int $0x40" |
395 | "int $0x40" |
395 | :"=a"(ret) |
396 | :"=a"(ret) |
396 | :"a"(37), "b"(6), "c"(cursor) |
397 | :"a"(37), "b"(6), "c"(cursor) |
397 | :"memory"); |
398 | :"memory"); |
398 | return ret; |
399 | return ret; |
399 | }; |
400 | }; |
400 | 401 | ||
401 | static inline void get_proc_info(char *info) |
402 | static inline void get_proc_info(char *info) |
402 | { |
403 | { |
403 | __asm__ __volatile__( |
404 | __asm__ __volatile__( |
404 | "int $0x40" |
405 | "int $0x40" |
405 | : |
406 | : |
406 | :"a"(9), "b"(info), "c"(-1)); |
407 | :"a"(9), "b"(info), "c"(-1)); |
407 | } |
408 | } |
408 | 409 | ||
409 | static inline |
410 | static inline |
410 | void* user_realloc(void *mem, size_t size) |
411 | void* user_realloc(void *mem, size_t size) |
411 | { |
412 | { |
412 | void *val; |
413 | void *val; |
413 | __asm__ __volatile__( |
414 | __asm__ __volatile__( |
414 | "int $0x40" |
415 | "int $0x40" |
415 | :"=a"(val) |
416 | :"=a"(val) |
416 | :"a"(68),"b"(20),"c"(size),"d"(mem) |
417 | :"a"(68),"b"(20),"c"(size),"d"(mem) |
417 | :"memory"); |
418 | :"memory"); |
418 | 419 | ||
419 | return val; |
420 | return val; |
420 | } |
421 | } |
421 | 422 | ||
422 | 423 | ||
423 | void *get_resource(void *data, uint32_t id); |
424 | void *get_resource(void *data, uint32_t id); |
424 | 425 | ||
425 | struct blit_call |
426 | struct blit_call |
426 | { |
427 | { |
427 | int dstx; |
428 | int dstx; |
428 | int dsty; |
429 | int dsty; |
429 | int w; |
430 | int w; |
430 | int h; |
431 | int h; |
431 | 432 | ||
432 | int srcx; |
433 | int srcx; |
433 | int srcy; |
434 | int srcy; |
434 | int srcw; |
435 | int srcw; |
435 | int srch; |
436 | int srch; |
436 | 437 | ||
437 | unsigned char *bitmap; |
438 | unsigned char *bitmap; |
438 | int stride; |
439 | int stride; |
439 | }; |
440 | }; |
440 | 441 | ||
441 | void Blit(void *bitmap, int dst_x, int dst_y, |
442 | void Blit(void *bitmap, int dst_x, int dst_y, |
442 | int src_x, int src_y, int w, int h, |
443 | int src_x, int src_y, int w, int h, |
443 | int src_w, int src_h, int stride); |
444 | int src_w, int src_h, int stride); |
444 | 445 | ||
445 | 446 | ||
446 | #endif><>><>><>><>><>><>><>><>><>><> |
447 | #endif><>><>><>><>><>><>><>><>><>><> |