comparison src/video/SDL_blit_0.c @ 2257:340942cfda48

Moved the colorkey and per-surface alpha into the blit info, in preparation for support for general color channel modulation. Removed and consolidated some data in the blit info.
author Sam Lantinga <slouken@libsdl.org>
date Fri, 17 Aug 2007 00:54:53 +0000
parents c121d94672cb
children bee005ace1bf
comparison
equal deleted inserted replaced
2256:e893d24ad8db 2257:340942cfda48
198 int height = info->d_height; 198 int height = info->d_height;
199 Uint8 *src = info->s_pixels; 199 Uint8 *src = info->s_pixels;
200 Uint8 *dst = info->d_pixels; 200 Uint8 *dst = info->d_pixels;
201 int srcskip = info->s_skip; 201 int srcskip = info->s_skip;
202 int dstskip = info->d_skip; 202 int dstskip = info->d_skip;
203 Uint32 ckey = info->src->colorkey; 203 Uint32 ckey = info->ckey;
204 Uint8 *palmap = info->table; 204 Uint8 *palmap = info->table;
205 int c; 205 int c;
206 206
207 /* Set up some basic variables */ 207 /* Set up some basic variables */
208 srcskip += width - (width + 7) / 8; 208 srcskip += width - (width + 7) / 8;
251 int height = info->d_height; 251 int height = info->d_height;
252 Uint8 *src = info->s_pixels; 252 Uint8 *src = info->s_pixels;
253 Uint16 *dstp = (Uint16 *) info->d_pixels; 253 Uint16 *dstp = (Uint16 *) info->d_pixels;
254 int srcskip = info->s_skip; 254 int srcskip = info->s_skip;
255 int dstskip = info->d_skip; 255 int dstskip = info->d_skip;
256 Uint32 ckey = info->src->colorkey; 256 Uint32 ckey = info->ckey;
257 Uint8 *palmap = info->table; 257 Uint8 *palmap = info->table;
258 int c; 258 int c;
259 259
260 /* Set up some basic variables */ 260 /* Set up some basic variables */
261 srcskip += width - (width + 7) / 8; 261 srcskip += width - (width + 7) / 8;
286 int height = info->d_height; 286 int height = info->d_height;
287 Uint8 *src = info->s_pixels; 287 Uint8 *src = info->s_pixels;
288 Uint8 *dst = info->d_pixels; 288 Uint8 *dst = info->d_pixels;
289 int srcskip = info->s_skip; 289 int srcskip = info->s_skip;
290 int dstskip = info->d_skip; 290 int dstskip = info->d_skip;
291 Uint32 ckey = info->src->colorkey; 291 Uint32 ckey = info->ckey;
292 Uint8 *palmap = info->table; 292 Uint8 *palmap = info->table;
293 int c; 293 int c;
294 294
295 /* Set up some basic variables */ 295 /* Set up some basic variables */
296 srcskip += width - (width + 7) / 8; 296 srcskip += width - (width + 7) / 8;
320 int height = info->d_height; 320 int height = info->d_height;
321 Uint8 *src = info->s_pixels; 321 Uint8 *src = info->s_pixels;
322 Uint32 *dstp = (Uint32 *) info->d_pixels; 322 Uint32 *dstp = (Uint32 *) info->d_pixels;
323 int srcskip = info->s_skip; 323 int srcskip = info->s_skip;
324 int dstskip = info->d_skip; 324 int dstskip = info->d_skip;
325 Uint32 ckey = info->src->colorkey; 325 Uint32 ckey = info->ckey;
326 Uint8 *palmap = info->table; 326 Uint8 *palmap = info->table;
327 int c; 327 int c;
328 328
329 /* Set up some basic variables */ 329 /* Set up some basic variables */
330 srcskip += width - (width + 7) / 8; 330 srcskip += width - (width + 7) / 8;
359 int dstskip = info->d_skip; 359 int dstskip = info->d_skip;
360 const SDL_Color *srcpal = info->src->palette->colors; 360 const SDL_Color *srcpal = info->src->palette->colors;
361 SDL_PixelFormat *dstfmt = info->dst; 361 SDL_PixelFormat *dstfmt = info->dst;
362 int dstbpp; 362 int dstbpp;
363 int c; 363 int c;
364 const int A = info->src->alpha; 364 const int A = (info->cmod >> 24);
365 365
366 /* Set up some basic variables */ 366 /* Set up some basic variables */
367 dstbpp = dstfmt->BytesPerPixel; 367 dstbpp = dstfmt->BytesPerPixel;
368 srcskip += width - (width + 7) / 8; 368 srcskip += width - (width + 7) / 8;
369 369
405 SDL_PixelFormat *srcfmt = info->src; 405 SDL_PixelFormat *srcfmt = info->src;
406 SDL_PixelFormat *dstfmt = info->dst; 406 SDL_PixelFormat *dstfmt = info->dst;
407 const SDL_Color *srcpal = srcfmt->palette->colors; 407 const SDL_Color *srcpal = srcfmt->palette->colors;
408 int dstbpp; 408 int dstbpp;
409 int c; 409 int c;
410 const int A = srcfmt->alpha; 410 const int A = (info->cmod >> 24);
411 Uint32 ckey = srcfmt->colorkey; 411 Uint32 ckey = info->ckey;
412 412
413 /* Set up some basic variables */ 413 /* Set up some basic variables */
414 dstbpp = dstfmt->BytesPerPixel; 414 dstbpp = dstfmt->BytesPerPixel;
415 srcskip += width - (width + 7) / 8; 415 srcskip += width - (width + 7) / 8;
416 416