diff src/video/SDL_blit_1.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
line wrap: on
line diff
--- a/src/video/SDL_blit_1.c	Thu Aug 16 22:56:18 2007 +0000
+++ b/src/video/SDL_blit_1.c	Fri Aug 17 00:54:53 2007 +0000
@@ -290,7 +290,7 @@
     Uint8 *dst = info->d_pixels;
     int dstskip = info->d_skip;
     Uint8 *palmap = info->table;
-    Uint32 ckey = info->src->colorkey;
+    Uint32 ckey = info->ckey;
 
     if (palmap) {
         while (height--) {
@@ -337,7 +337,7 @@
     Uint16 *dstp = (Uint16 *) info->d_pixels;
     int dstskip = info->d_skip;
     Uint16 *palmap = (Uint16 *) info->table;
-    Uint32 ckey = info->src->colorkey;
+    Uint32 ckey = info->ckey;
 
     /* Set up some basic variables */
     dstskip /= 2;
@@ -369,7 +369,7 @@
     Uint8 *dst = info->d_pixels;
     int dstskip = info->d_skip;
     Uint8 *palmap = info->table;
-    Uint32 ckey = info->src->colorkey;
+    Uint32 ckey = info->ckey;
     int o;
 
     while (height--) {
@@ -402,7 +402,7 @@
     Uint32 *dstp = (Uint32 *) info->d_pixels;
     int dstskip = info->d_skip;
     Uint32 *palmap = (Uint32 *) info->table;
-    Uint32 ckey = info->src->colorkey;
+    Uint32 ckey = info->ckey;
 
     /* Set up some basic variables */
     dstskip /= 4;
@@ -436,7 +436,7 @@
     SDL_PixelFormat *dstfmt = info->dst;
     const SDL_Color *srcpal = info->src->palette->colors;
     int dstbpp;
-    const int A = info->src->alpha;
+    const int A = (info->cmod >> 24);
 
     /* Set up some basic variables */
     dstbpp = dstfmt->BytesPerPixel;
@@ -477,9 +477,9 @@
     SDL_PixelFormat *srcfmt = info->src;
     SDL_PixelFormat *dstfmt = info->dst;
     const SDL_Color *srcpal = info->src->palette->colors;
-    Uint32 ckey = srcfmt->colorkey;
+    Uint32 ckey = info->ckey;
     int dstbpp;
-    const int A = srcfmt->alpha;
+    const int A = (info->cmod >> 24);
 
     /* Set up some basic variables */
     dstbpp = dstfmt->BytesPerPixel;