effect_position.c
changeset 441 f86cc112a195
parent 440 fc0d5e4bc358
child 442 884a700fb3ff
equal deleted inserted replaced
440:fc0d5e4bc358 441:f86cc112a195
   127         *ptr = (Uint8) (((float) *ptr) * args->distance_f);
   127         *ptr = (Uint8) (((float) *ptr) * args->distance_f);
   128         ptr++;
   128         ptr++;
   129         len--;
   129         len--;
   130     }
   130     }
   131 
   131 
   132     if (args->room_angle == 0)
   132     if (args->room_angle == 180)
   133     for (i = 0; i < len; i += sizeof (Uint8) * 2) {
   133     for (i = 0; i < len; i += sizeof (Uint8) * 2) {
   134         /* must adjust the sample so that 0 is the center */
   134         /* must adjust the sample so that 0 is the center */
   135         *ptr = (Uint8) ((Sint8) ((((float) (Sint8) (*ptr - 128)) 
   135         *ptr = (Uint8) ((Sint8) ((((float) (Sint8) (*ptr - 128)) 
   136             * args->right_f) * args->distance_f) + 128);
   136             * args->right_f) * args->distance_f) + 128);
   137         ptr++;
   137         ptr++;