comparison src/video/SDL_blit.h @ 1895:c121d94672cb

SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
author Sam Lantinga <slouken@libsdl.org>
date Mon, 10 Jul 2006 21:04:37 +0000
parents d910939febfa
children 93994f65c74c
comparison
equal deleted inserted replaced
1894:c69cee13dd76 1895:c121d94672cb
25 #define _SDL_blit_h 25 #define _SDL_blit_h
26 26
27 #include "SDL_endian.h" 27 #include "SDL_endian.h"
28 28
29 /* The structure passed to the low level blit functions */ 29 /* The structure passed to the low level blit functions */
30 typedef struct { 30 typedef struct
31 Uint8 *s_pixels; 31 {
32 int s_width; 32 Uint8 *s_pixels;
33 int s_height; 33 int s_width;
34 int s_skip; 34 int s_height;
35 Uint8 *d_pixels; 35 int s_skip;
36 int d_width; 36 Uint8 *d_pixels;
37 int d_height; 37 int d_width;
38 int d_skip; 38 int d_height;
39 void *aux_data; 39 int d_skip;
40 SDL_PixelFormat *src; 40 void *aux_data;
41 Uint8 *table; 41 SDL_PixelFormat *src;
42 SDL_PixelFormat *dst; 42 Uint8 *table;
43 SDL_PixelFormat *dst;
43 } SDL_BlitInfo; 44 } SDL_BlitInfo;
44 45
45 /* The type definition for the low level blit functions */ 46 /* The type definition for the low level blit functions */
46 typedef void (*SDL_loblit)(SDL_BlitInfo *info); 47 typedef void (*SDL_loblit) (SDL_BlitInfo * info);
47 48
48 /* This is the private info structure for software accelerated blits */ 49 /* This is the private info structure for software accelerated blits */
49 struct private_swaccel { 50 struct private_swaccel
50 SDL_loblit blit; 51 {
51 void *aux_data; 52 SDL_loblit blit;
53 void *aux_data;
52 }; 54 };
53 55
54 /* Blit mapping definition */ 56 /* Blit mapping definition */
55 typedef struct SDL_BlitMap { 57 typedef struct SDL_BlitMap
56 SDL_Surface *dst; 58 {
57 int identity; 59 SDL_Surface *dst;
58 Uint8 *table; 60 int identity;
59 SDL_blit hw_blit; 61 Uint8 *table;
60 SDL_blit sw_blit; 62 SDL_blit sw_blit;
61 struct private_hwaccel *hw_data; 63 struct private_swaccel *sw_data;
62 struct private_swaccel *sw_data; 64
63 65 /* the version count matches the destination; mismatch indicates
64 /* the version count matches the destination; mismatch indicates 66 an invalid mapping */
65 an invalid mapping */ 67 unsigned int format_version;
66 unsigned int format_version;
67 } SDL_BlitMap; 68 } SDL_BlitMap;
68 69
69 70
70 /* Functions found in SDL_blit.c */ 71 /* Functions found in SDL_blit.c */
71 extern int SDL_CalculateBlit(SDL_Surface *surface); 72 extern int SDL_CalculateBlit(SDL_Surface * surface);
72 73
73 /* Functions found in SDL_blit_{0,1,N,A}.c */ 74 /* Functions found in SDL_blit_{0,1,N,A}.c */
74 extern SDL_loblit SDL_CalculateBlit0(SDL_Surface *surface, int complex); 75 extern SDL_loblit SDL_CalculateBlit0(SDL_Surface * surface, int complex);
75 extern SDL_loblit SDL_CalculateBlit1(SDL_Surface *surface, int complex); 76 extern SDL_loblit SDL_CalculateBlit1(SDL_Surface * surface, int complex);
76 extern SDL_loblit SDL_CalculateBlitN(SDL_Surface *surface, int complex); 77 extern SDL_loblit SDL_CalculateBlitN(SDL_Surface * surface, int complex);
77 extern SDL_loblit SDL_CalculateAlphaBlit(SDL_Surface *surface, int complex); 78 extern SDL_loblit SDL_CalculateAlphaBlit(SDL_Surface * surface, int complex);
78 79
79 /* 80 /*
80 * Useful macros for blitting routines 81 * Useful macros for blitting routines
81 */ 82 */
82 83
518 #if defined(_MSC_VER) && (_MSC_VER >= 600) 519 #if defined(_MSC_VER) && (_MSC_VER >= 600)
519 #pragma warning(disable: 4550) 520 #pragma warning(disable: 4550)
520 #endif 521 #endif
521 522
522 #endif /* _SDL_blit_h */ 523 #endif /* _SDL_blit_h */
524 /* vi: set ts=4 sw=4 expandtab: */