*** empty log message ***
authorSam Lantinga <slouken@libsdl.org>
Thu, 07 Feb 2002 17:40:36 +0000
changeset 15901490534f9fe
parent 158 954c719d0359
child 160 c62666b42573
*** empty log message ***
effect_position.c
     1.1 --- a/effect_position.c	Mon Jan 14 19:35:45 2002 +0000
     1.2 +++ b/effect_position.c	Thu Feb 07 17:40:36 2002 +0000
     1.3 @@ -30,6 +30,7 @@
     1.4  
     1.5  #include "SDL.h"
     1.6  #include "SDL_mixer.h"
     1.7 +#include "SDL_endian.h"
     1.8  
     1.9  #define __MIX_INTERNAL_EFFECT__
    1.10  #include "effects_internal.h"
    1.11 @@ -142,7 +143,7 @@
    1.12      p = (Uint32 *) ptr;
    1.13  
    1.14      for (i = 0; i < len; i += sizeof (Uint32)) {
    1.15 -#if (SDL_BYTE_ORDER == SDL_BIG_ENDIAN)
    1.16 +#if (SDL_BYTEORDER == SDL_BIG_ENDIAN)
    1.17          *(p++) = (d[l[(*p & 0xFF000000) >> 24]] << 24) |
    1.18                   (d[r[(*p & 0x00FF0000) >> 16]] << 16) |
    1.19                   (d[l[(*p & 0x0000FF00) >>  8]] <<  8) |
    1.20 @@ -209,7 +210,7 @@
    1.21      p = (Uint32 *) ptr;
    1.22  
    1.23      for (i = 0; i < len; i += sizeof (Uint32)) {
    1.24 -#if (SDL_BYTE_ORDER == SDL_BIG_ENDIAN)
    1.25 +#if (SDL_BYTEORDER == SDL_BIG_ENDIAN)
    1.26          *(p++) = (d[l[((Sint16)(Sint8)((*p & 0xFF000000) >> 24))+128]] << 24) |
    1.27                   (d[r[((Sint16)(Sint8)((*p & 0x00FF0000) >> 16))+128]] << 16) |
    1.28                   (d[l[((Sint16)(Sint8)((*p & 0x0000FF00) >>  8))+128]] <<  8) |
    1.29 @@ -235,10 +236,10 @@
    1.30      int i;
    1.31  
    1.32      for (i = 0; i < len; i += sizeof (Uint16) * 2) {
    1.33 -#if (SDL_BYTE_ORDER == SDL_BIG_ENDIAN)
    1.34 +#if (SDL_BYTEORDER == SDL_BIG_ENDIAN)
    1.35          Uint16 swapl = (Uint16) ((((float) SDL_Swap16(*(ptr))) *
    1.36                                      args->left_f) * args->distance_f);
    1.37 -        Uint16 swapr = (Uint16) (((float) SDL_Swap16(*(ptr+1))) *
    1.38 +        Uint16 swapr = (Uint16) ((((float) SDL_Swap16(*(ptr+1))) *
    1.39                                      args->right_f) * args->distance_f);
    1.40          *(ptr++) = (Uint16) SDL_Swap16(swapl);
    1.41          *(ptr++) = (Uint16) SDL_Swap16(swapr);
    1.42 @@ -257,10 +258,10 @@
    1.43      int i;
    1.44  
    1.45      for (i = 0; i < len; i += sizeof (Sint16) * 2) {
    1.46 -#if (SDL_BYTE_ORDER == SDL_BIG_ENDIAN)
    1.47 +#if (SDL_BYTEORDER == SDL_BIG_ENDIAN)
    1.48          Sint16 swapl = (Sint16) ((((float) SDL_Swap16(*(ptr))) *
    1.49                                      args->left_f) * args->distance_f);
    1.50 -        Sint16 swapr = (Sint16) (((float) SDL_Swap16(*(ptr+1))) *
    1.51 +        Sint16 swapr = (Sint16) ((((float) SDL_Swap16(*(ptr+1))) *
    1.52                                      args->right_f) * args->distance_f);
    1.53          *(ptr++) = (Sint16) SDL_Swap16(swapl);
    1.54          *(ptr++) = (Sint16) SDL_Swap16(swapr);
    1.55 @@ -279,10 +280,10 @@
    1.56      int i;
    1.57  
    1.58      for (i = 0; i < len; i += sizeof (Sint16) * 2) {
    1.59 -#if (SDL_BYTE_ORDER == SDL_LIL_ENDIAN)
    1.60 +#if (SDL_BYTEORDER == SDL_LIL_ENDIAN)
    1.61          Uint16 swapl = (Uint16) ((((float) SDL_Swap16(*(ptr))) *
    1.62                                      args->left_f) * args->distance_f);
    1.63 -        Uint16 swapr = (Uint16) (((float) SDL_Swap16(*(ptr+1))) *
    1.64 +        Uint16 swapr = (Uint16) ((((float) SDL_Swap16(*(ptr+1))) *
    1.65                                      args->right_f) * args->distance_f);
    1.66          *(ptr++) = (Uint16) SDL_Swap16(swapl);
    1.67          *(ptr++) = (Uint16) SDL_Swap16(swapr);
    1.68 @@ -301,10 +302,10 @@
    1.69      int i;
    1.70  
    1.71      for (i = 0; i < len; i += sizeof (Sint16) * 2) {
    1.72 -#if (SDL_BYTE_ORDER == SDL_LIL_ENDIAN)
    1.73 +#if (SDL_BYTEORDER == SDL_LIL_ENDIAN)
    1.74          Sint16 swapl = (Sint16) ((((float) SDL_Swap16(*(ptr))) *
    1.75                                      args->left_f) * args->distance_f);
    1.76 -        Sint16 swapr = (Sint16) (((float) SDL_Swap16(*(ptr+1))) *
    1.77 +        Sint16 swapr = (Sint16) ((((float) SDL_Swap16(*(ptr+1))) *
    1.78                                      args->right_f) * args->distance_f);
    1.79          *(ptr++) = (Sint16) SDL_Swap16(swapl);
    1.80          *(ptr++) = (Sint16) SDL_Swap16(swapr);