effect_position.c
changeset 373 6271eafc6e70
parent 359 83eaf245b7e7
child 379 c300eee1d1e4
     1.1 --- a/effect_position.c	Sat Jul 21 05:54:10 2007 +0000
     1.2 +++ b/effect_position.c	Sat Jul 21 06:37:58 2007 +0000
     1.3 @@ -387,16 +387,17 @@
     1.4  
     1.5      for (i = 0; i < len; i += sizeof (Uint32)) {
     1.6  #if (SDL_BYTEORDER == SDL_BIG_ENDIAN)
     1.7 -        *(p++) = (d[l[(*p & 0xFF000000) >> 24]] << 24) |
     1.8 -                 (d[r[(*p & 0x00FF0000) >> 16]] << 16) |
     1.9 -                 (d[l[(*p & 0x0000FF00) >>  8]] <<  8) |
    1.10 -                 (d[r[(*p & 0x000000FF)      ]]      ) ;
    1.11 +        *p = (d[l[(*p & 0xFF000000) >> 24]] << 24) |
    1.12 +             (d[r[(*p & 0x00FF0000) >> 16]] << 16) |
    1.13 +             (d[l[(*p & 0x0000FF00) >>  8]] <<  8) |
    1.14 +             (d[r[(*p & 0x000000FF)      ]]      ) ;
    1.15  #else
    1.16 -        *(p++) = (d[r[(*p & 0xFF000000) >> 24]] << 24) |
    1.17 -                 (d[l[(*p & 0x00FF0000) >> 16]] << 16) |
    1.18 -                 (d[r[(*p & 0x0000FF00) >>  8]] <<  8) |
    1.19 -                 (d[l[(*p & 0x000000FF)      ]]      ) ;
    1.20 +        *p = (d[r[(*p & 0xFF000000) >> 24]] << 24) |
    1.21 +             (d[l[(*p & 0x00FF0000) >> 16]] << 16) |
    1.22 +             (d[r[(*p & 0x0000FF00) >>  8]] <<  8) |
    1.23 +             (d[l[(*p & 0x000000FF)      ]]      ) ;
    1.24  #endif
    1.25 +        ++p;
    1.26      }
    1.27  }
    1.28  
    1.29 @@ -577,16 +578,17 @@
    1.30  
    1.31      for (i = 0; i < len; i += sizeof (Uint32)) {
    1.32  #if (SDL_BYTEORDER == SDL_BIG_ENDIAN)
    1.33 -        *(p++) = (d[l[((Sint16)(Sint8)((*p & 0xFF000000) >> 24))+128]] << 24) |
    1.34 -                 (d[r[((Sint16)(Sint8)((*p & 0x00FF0000) >> 16))+128]] << 16) |
    1.35 -                 (d[l[((Sint16)(Sint8)((*p & 0x0000FF00) >>  8))+128]] <<  8) |
    1.36 -                 (d[r[((Sint16)(Sint8)((*p & 0x000000FF)      ))+128]]      ) ;
    1.37 +        *p = (d[l[((Sint16)(Sint8)((*p & 0xFF000000) >> 24))+128]] << 24) |
    1.38 +             (d[r[((Sint16)(Sint8)((*p & 0x00FF0000) >> 16))+128]] << 16) |
    1.39 +             (d[l[((Sint16)(Sint8)((*p & 0x0000FF00) >>  8))+128]] <<  8) |
    1.40 +             (d[r[((Sint16)(Sint8)((*p & 0x000000FF)      ))+128]]      ) ;
    1.41  #else
    1.42 -        *(p++) = (d[r[((Sint16)(Sint8)((*p & 0xFF000000) >> 24))+128]] << 24) |
    1.43 -                 (d[l[((Sint16)(Sint8)((*p & 0x00FF0000) >> 16))+128]] << 16) |
    1.44 -                 (d[r[((Sint16)(Sint8)((*p & 0x0000FF00) >>  8))+128]] <<  8) |
    1.45 -                 (d[l[((Sint16)(Sint8)((*p & 0x000000FF)      ))+128]]      ) ;
    1.46 +        *p = (d[r[((Sint16)(Sint8)((*p & 0xFF000000) >> 24))+128]] << 24) |
    1.47 +             (d[l[((Sint16)(Sint8)((*p & 0x00FF0000) >> 16))+128]] << 16) |
    1.48 +             (d[r[((Sint16)(Sint8)((*p & 0x0000FF00) >>  8))+128]] <<  8) |
    1.49 +             (d[l[((Sint16)(Sint8)((*p & 0x000000FF)      ))+128]]      ) ;
    1.50  #endif
    1.51 +        ++p;
    1.52      }
    1.53  
    1.54  
    1.55 @@ -1519,7 +1521,7 @@
    1.56      Uint16 format;
    1.57      int channels;
    1.58      position_args *args = NULL;
    1.59 -    Sint16 room_angle;
    1.60 +    Sint16 room_angle = 0;
    1.61  
    1.62      Mix_QuerySpec(NULL, &format, &channels);
    1.63      f = get_position_effect_func(format, channels);