equal
deleted
inserted
replaced
21 */ |
21 */ |
22 #include "SDL_config.h" |
22 #include "SDL_config.h" |
23 |
23 |
24 #ifndef _SDL_blit_h |
24 #ifndef _SDL_blit_h |
25 #define _SDL_blit_h |
25 #define _SDL_blit_h |
|
26 |
|
27 #ifdef __MMX__ |
|
28 #include <mmintrin.h> |
|
29 #endif |
|
30 #ifdef __SSE__ |
|
31 #include <xmmintrin.h> |
|
32 #endif |
26 |
33 |
27 #include "SDL_endian.h" |
34 #include "SDL_endian.h" |
28 |
35 |
29 /* The structure passed to the low level blit functions */ |
36 /* The structure passed to the low level blit functions */ |
30 typedef struct |
37 typedef struct |
90 |
97 |
91 /* |
98 /* |
92 * Useful macros for blitting routines |
99 * Useful macros for blitting routines |
93 */ |
100 */ |
94 |
101 |
|
102 #if defined(__GNUC__) |
|
103 #define DECLARE_ALIGNED(t,v,a) t __attribute__((aligned(a))) v |
|
104 #elif defined(_MSC_VER) |
|
105 #define DECLARE_ALIGNED(t,v,a) t __declspec(align(a)) v |
|
106 #else |
|
107 #define DECLARE_ALIGNED(t,v,a) t v |
|
108 #endif |
|
109 |
95 #define FORMAT_EQUAL(A, B) \ |
110 #define FORMAT_EQUAL(A, B) \ |
96 ((A)->BitsPerPixel == (B)->BitsPerPixel \ |
111 ((A)->BitsPerPixel == (B)->BitsPerPixel \ |
97 && ((A)->Rmask == (B)->Rmask) && ((A)->Amask == (B)->Amask)) |
112 && ((A)->Rmask == (B)->Rmask) && ((A)->Amask == (B)->Amask)) |
98 |
113 |
99 /* Load pixel of the specified format from a buffer and get its R-G-B values */ |
114 /* Load pixel of the specified format from a buffer and get its R-G-B values */ |