src/video/SDL_blit.h
changeset 2267 c785543d1843
parent 2266 e61ad15a205f
child 2824 4dba7aa7ea77
equal deleted inserted replaced
2266:e61ad15a205f 2267:c785543d1843
    60 #define SDL_CPU_SSE                 0x00000004
    60 #define SDL_CPU_SSE                 0x00000004
    61 #define SDL_CPU_SSE2                0x00000008
    61 #define SDL_CPU_SSE2                0x00000008
    62 #define SDL_CPU_ALTIVEC_PREFETCH    0x00000010
    62 #define SDL_CPU_ALTIVEC_PREFETCH    0x00000010
    63 #define SDL_CPU_ALTIVEC_NOPREFETCH  0x00000020
    63 #define SDL_CPU_ALTIVEC_NOPREFETCH  0x00000020
    64 
    64 
    65 typedef struct {
    65 typedef struct
       
    66 {
    66     Uint8 *src;
    67     Uint8 *src;
    67     int src_w, src_h;
    68     int src_w, src_h;
    68     int src_pitch;
    69     int src_pitch;
       
    70     int src_skip;
    69     Uint8 *dst;
    71     Uint8 *dst;
    70     int dst_w, dst_h;
    72     int dst_w, dst_h;
    71     int dst_pitch;
    73     int dst_pitch;
       
    74     int dst_skip;
    72     SDL_PixelFormat *src_fmt;
    75     SDL_PixelFormat *src_fmt;
    73     SDL_PixelFormat *dst_fmt;
    76     SDL_PixelFormat *dst_fmt;
    74     Uint8 *table;
    77     Uint8 *table;
    75     int flags;
    78     int flags;
    76     Uint32 colorkey;
    79     Uint32 colorkey;
    77     Uint8 r, g, b, a;
    80     Uint8 r, g, b, a;
    78 } SDL_BlitInfo;
    81 } SDL_BlitInfo;
    79 
    82 
    80 typedef void (SDLCALL * SDL_BlitFunc)(SDL_BlitInfo *info);
    83 typedef void (SDLCALL * SDL_BlitFunc) (SDL_BlitInfo * info);
    81 
    84 
    82 typedef struct {
    85 typedef struct
       
    86 {
    83     Uint32 src_format;
    87     Uint32 src_format;
    84     Uint32 dst_format;
    88     Uint32 dst_format;
    85     int flags;
    89     int flags;
    86     int cpu;
    90     int cpu;
    87     SDL_BlitFunc func;
    91     SDL_BlitFunc func;
   102 } SDL_BlitMap;
   106 } SDL_BlitMap;
   103 
   107 
   104 /* Functions found in SDL_blit.c */
   108 /* Functions found in SDL_blit.c */
   105 extern int SDL_CalculateBlit(SDL_Surface * surface);
   109 extern int SDL_CalculateBlit(SDL_Surface * surface);
   106 
   110 
   107 /* Blit function tables in SDL_blit_*.c */
   111 /* Functions found in SDL_blit_*.c */
   108 extern SDL_BlitFuncEntry SDL_BlitFuncTable0[];
   112 extern SDL_BlitFunc SDL_CalculateBlit0(SDL_Surface * surface);
   109 extern SDL_BlitFuncEntry SDL_BlitFuncTable1[];
   113 extern SDL_BlitFunc SDL_CalculateBlit1(SDL_Surface * surface);
   110 extern SDL_BlitFuncEntry SDL_BlitFuncTableN[];
   114 extern SDL_BlitFunc SDL_CalculateBlitN(SDL_Surface * surface);
       
   115 extern SDL_BlitFunc SDL_CalculateBlitA(SDL_Surface * surface);
   111 
   116 
   112 /*
   117 /*
   113  * Useful macros for blitting routines
   118  * Useful macros for blitting routines
   114  */
   119  */
   115 
   120