Rev 4372 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4372 | Rev 4377 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | #include |
3 | #include |
4 | #include |
4 | #include |
5 | #include |
5 | #include |
6 | #include |
6 | #include |
- | 7 | #include "pixdriver.h" |
|
- | 8 | ||
7 | #include |
9 | #include |
Line 8... | Line 10... | ||
8 | 10 | ||
Line 9... | Line -... | ||
9 | void* load_library(const char *name); |
- | |
10 | - | ||
11 | struct pix_driver |
- | |
12 | { |
- | |
13 | char *name; |
- | |
14 | - | ||
15 | int (*create_bitmap)(bitmap_t * bitmap); |
- | |
16 | int (*destroy_bitmap)(bitmap_t * bitmap); |
- | |
17 | int (*lock_bitmap)(bitmap_t * bitmap); |
- | |
18 | int (*blit)(bitmap_t * bitmap, bool scale, int dst_x, int dst_y, |
- | |
19 | int w, int h, int src_x, int src_y); |
- | |
20 | int (*resize_bitmap)(bitmap_t * bitmap); |
- | |
Line 21... | Line 11... | ||
21 | void (*fini)(void); |
11 | void* load_library(const char *name); |
Line 22... | Line 12... | ||
22 | }; |
12 | |
23 | 13 | ||
Line 200... | Line 190... | ||
200 | 190 | ||
Line 201... | Line 191... | ||
201 | surface_t *sf = to_surface(bitmap); |
191 | surface_t *sf = to_surface(bitmap); |
Line 202... | Line 192... | ||
202 | 192 | ||
203 | if (sf->flags & hw_caps & HW_BIT_BLIT) |
193 | if (sf->flags & hw_caps & HW_BIT_BLIT) |
Line 204... | Line 194... | ||
204 | return pix_driver.blit(bitmap, false, dst_x, dst_y, w, h, src_x, src_y); |
194 | return pix_driver.blit(bitmap, 0, 0, dst_x, dst_y, w, h, src_x, src_y); |
205 | 195 | ||
206 | bc.dstx = dst_x; |
196 | bc.dstx = dst_x; |
207 | bc.dsty = dst_y; |
197 | bc.dsty = dst_y; |
Line 231... | Line 221... | ||
231 | 221 | ||
Line 232... | Line 222... | ||
232 | surface_t *sf = to_surface(bitmap); |
222 | surface_t *sf = to_surface(bitmap); |
Line 233... | Line 223... | ||
233 | 223 | ||
234 | if (sf->flags & hw_caps & HW_TEX_BLIT) |
224 | if (sf->flags & hw_caps & HW_TEX_BLIT) |
Line 235... | Line 225... | ||
235 | return pix_driver.blit(bitmap, true, dst_x, dst_y, w, h, 0, 0); |
225 | return pix_driver.blit(bitmap, 1, 1, dst_x, dst_y, w, h, 0, 0); |
236 | 226 | ||
237 | bc.dstx = dst_x; |
227 | bc.dstx = dst_x; |
238 | bc.dsty = dst_y; |
228 | bc.dsty = dst_y; |