Mercurial > sdl-ios-xcode
comparison src/video/SDL_blit_copy.c @ 2267:c785543d1843
Okay, still some bugs, but everything builds again...
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sat, 18 Aug 2007 05:39:09 +0000 |
parents | bee005ace1bf |
children | cc15254e44b6 |
comparison
equal
deleted
inserted
replaced
2266:e61ad15a205f | 2267:c785543d1843 |
---|---|
93 { | 93 { |
94 Uint8 *src, *dst; | 94 Uint8 *src, *dst; |
95 int w, h; | 95 int w, h; |
96 int srcskip, dstskip; | 96 int srcskip, dstskip; |
97 | 97 |
98 w = info->dst_w * info->dst->BytesPerPixel; | 98 w = info->dst_w * info->dst_fmt->BytesPerPixel; |
99 h = info->dst_h; | 99 h = info->dst_h; |
100 src = info->src; | 100 src = info->src; |
101 dst = info->dst; | 101 dst = info->dst; |
102 srcskip = w + info->s_skip; | 102 srcskip = info->src_pitch; |
103 dstskip = w + info->dst_pitch; | 103 dstskip = info->dst_pitch; |
104 | 104 |
105 #ifdef __SSE__ | 105 #ifdef __SSE__ |
106 if (SDL_HasSSE() && !((uintptr_t) src & 15) && !((uintptr_t) dst & 15)) { | 106 if (SDL_HasSSE() && !((uintptr_t) src & 15) && !((uintptr_t) dst & 15)) { |
107 while (h--) { | 107 while (h--) { |
108 SDL_memcpySSE(dst, src, w); | 108 SDL_memcpySSE(dst, src, w); |
137 { | 137 { |
138 Uint8 *src, *dst; | 138 Uint8 *src, *dst; |
139 int w, h; | 139 int w, h; |
140 int skip; | 140 int skip; |
141 | 141 |
142 w = info->dst_w * info->dst->BytesPerPixel; | 142 w = info->dst_w * info->dst_fmt->BytesPerPixel; |
143 h = info->dst_h; | 143 h = info->dst_h; |
144 src = info->src; | 144 src = info->src; |
145 dst = info->dst; | 145 dst = info->dst; |
146 skip = w + info->s_skip; | 146 skip = info->src_pitch; |
147 if ((dst < src) || (dst >= (src + h * skip))) { | 147 if ((dst < src) || (dst >= (src + h * skip))) { |
148 SDL_BlitCopy(info); | 148 SDL_BlitCopy(info); |
149 } else { | 149 } else { |
150 src += ((h - 1) * skip); | 150 src += ((h - 1) * skip); |
151 dst += ((h - 1) * skip); | 151 dst += ((h - 1) * skip); |