*** empty log message ***
authorSam Lantinga <slouken@libsdl.org>
Tue, 07 Feb 2006 10:40:14 +0000
changeset 133962802d9d7c87
parent 1338 604d73db6802
child 1340 58b114ef50e7
*** empty log message ***
src/video/SDL_blit_N.c
src/video/math_private.h
     1.1 --- a/src/video/SDL_blit_N.c	Tue Feb 07 09:29:18 2006 +0000
     1.2 +++ b/src/video/SDL_blit_N.c	Tue Feb 07 10:40:14 2006 +0000
     1.3 @@ -21,6 +21,7 @@
     1.4  */
     1.5  
     1.6  #include "SDL_types.h"
     1.7 +#include "SDL_string.h"
     1.8  #include "SDL_video.h"
     1.9  #include "SDL_blit.h"
    1.10  #include "SDL_byteorder.h"
    1.11 @@ -657,9 +658,7 @@
    1.12      Uint32 *dst = (Uint32 *) info->d_pixels;
    1.13      int dstskip = info->d_skip;
    1.14      SDL_PixelFormat *srcfmt = info->src;
    1.15 -    int srcbpp = srcfmt->BytesPerPixel;
    1.16      SDL_PixelFormat *dstfmt = info->dst;
    1.17 -    int dstbpp = dstfmt->BytesPerPixel;
    1.18      vector unsigned int vzero = vec_splat_u32(0);
    1.19      vector unsigned char vpermute = calc_swizzle32(srcfmt, dstfmt);
    1.20      if (dstfmt->Amask && !srcfmt->Amask) {
    1.21 @@ -670,8 +669,8 @@
    1.22          }
    1.23      }
    1.24  
    1.25 -    assert(srcbpp == 4);
    1.26 -    assert(dstbpp == 4);
    1.27 +    assert(srcfmt->BytesPerPixel == 4);
    1.28 +    assert(dstfmt->BytesPerPixel == 4);
    1.29  
    1.30      while (height--) {
    1.31          vector unsigned char valigner;
    1.32 @@ -737,9 +736,7 @@
    1.33      Uint32 *dst = (Uint32 *) info->d_pixels;
    1.34      int dstskip = info->d_skip;
    1.35      SDL_PixelFormat *srcfmt = info->src;
    1.36 -    int srcbpp = srcfmt->BytesPerPixel;
    1.37      SDL_PixelFormat *dstfmt = info->dst;
    1.38 -    int dstbpp = dstfmt->BytesPerPixel;
    1.39      vector unsigned int vzero = vec_splat_u32(0);
    1.40      vector unsigned char vpermute = calc_swizzle32(srcfmt, dstfmt);
    1.41      if (dstfmt->Amask && !srcfmt->Amask) {
    1.42 @@ -750,8 +747,8 @@
    1.43          }
    1.44      }
    1.45  
    1.46 -    assert(srcbpp == 4);
    1.47 -    assert(dstbpp == 4);
    1.48 +    assert(srcfmt->BytesPerPixel == 4);
    1.49 +    assert(dstfmt->BytesPerPixel == 4);
    1.50  
    1.51      while (height--) {
    1.52          vector unsigned char valigner;
     2.1 --- a/src/video/math_private.h	Tue Feb 07 09:29:18 2006 +0000
     2.2 +++ b/src/video/math_private.h	Tue Feb 07 10:40:14 2006 +0000
     2.3 @@ -19,8 +19,10 @@
     2.4  
     2.5  #include "SDL_endian.h"
     2.6  
     2.7 -typedef Sint32 int32_t;
     2.8 -typedef Uint32 u_int32_t;
     2.9 +#define int32_t 	math_int32_t
    2.10 +#define u_int32_t	math_u_int32_t
    2.11 +typedef Sint32 math_int32_t;
    2.12 +typedef Uint32 math_u_int32_t;
    2.13  
    2.14  /* The original fdlibm code used statements like:
    2.15  	n0 = ((*(int*)&one)>>29)^1;		* index of high word *