comparison src/video/SDL_blit.h @ 1662:782fd950bd46 SDL-1.3

Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API. WARNING: None of the video drivers have been updated for the new API yet! The API is still under design and very fluid. The code is now run through a consistent indent format: indent -i4 -nut -nsc -br -ce The headers are being converted to automatically generate doxygen documentation.
author Sam Lantinga <slouken@libsdl.org>
date Sun, 28 May 2006 13:04:16 +0000
parents d910939febfa
children 4da1ee79c9af
comparison
equal deleted inserted replaced
1661:281d3f4870e5 1662:782fd950bd46
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 hw_blit;
61 struct private_hwaccel *hw_data; 63 SDL_blit sw_blit;
62 struct private_swaccel *sw_data; 64 struct private_hwaccel *hw_data;
63 65 struct private_swaccel *sw_data;
64 /* the version count matches the destination; mismatch indicates 66
65 an invalid mapping */ 67 /* the version count matches the destination; mismatch indicates
66 unsigned int format_version; 68 an invalid mapping */
69 unsigned int format_version;
67 } SDL_BlitMap; 70 } SDL_BlitMap;
68 71
69 72
70 /* Functions found in SDL_blit.c */ 73 /* Functions found in SDL_blit.c */
71 extern int SDL_CalculateBlit(SDL_Surface *surface); 74 extern int SDL_CalculateBlit (SDL_Surface * surface);
72 75
73 /* Functions found in SDL_blit_{0,1,N,A}.c */ 76 /* Functions found in SDL_blit_{0,1,N,A}.c */
74 extern SDL_loblit SDL_CalculateBlit0(SDL_Surface *surface, int complex); 77 extern SDL_loblit SDL_CalculateBlit0 (SDL_Surface * surface, int complex);
75 extern SDL_loblit SDL_CalculateBlit1(SDL_Surface *surface, int complex); 78 extern SDL_loblit SDL_CalculateBlit1 (SDL_Surface * surface, int complex);
76 extern SDL_loblit SDL_CalculateBlitN(SDL_Surface *surface, int complex); 79 extern SDL_loblit SDL_CalculateBlitN (SDL_Surface * surface, int complex);
77 extern SDL_loblit SDL_CalculateAlphaBlit(SDL_Surface *surface, int complex); 80 extern SDL_loblit SDL_CalculateAlphaBlit (SDL_Surface * surface, int complex);
78 81
79 /* 82 /*
80 * Useful macros for blitting routines 83 * Useful macros for blitting routines
81 */ 84 */
82 85
518 #if defined(_MSC_VER) && (_MSC_VER >= 600) 521 #if defined(_MSC_VER) && (_MSC_VER >= 600)
519 #pragma warning(disable: 4550) 522 #pragma warning(disable: 4550)
520 #endif 523 #endif
521 524
522 #endif /* _SDL_blit_h */ 525 #endif /* _SDL_blit_h */
526 /* vi: set ts=4 sw=4 expandtab: */