effect_position.c
changeset 114 83ab4ef4458b
parent 113 c0c3018bd787
child 132 5707e5165d84
     1.1 --- a/effect_position.c	Tue Sep 11 19:14:36 2001 +0000
     1.2 +++ b/effect_position.c	Tue Sep 11 19:33:01 2001 +0000
     1.3 @@ -26,8 +26,8 @@
     1.4  
     1.5  #include <stdio.h>
     1.6  #include <stdlib.h>
     1.7 -#include <sys/time.h>
     1.8 -#include <unistd.h>
     1.9 +#include <string.h>
    1.10 +
    1.11  #include "SDL.h"
    1.12  #include "SDL_mixer.h"
    1.13  
    1.14 @@ -438,8 +438,8 @@
    1.15  
    1.16      args->left_u8 = left;
    1.17      args->right_u8 = right;
    1.18 -    args->left_f = ((float) left) / 255.0;
    1.19 -    args->right_f = ((float) right) / 255.0;
    1.20 +    args->left_f = ((float) left) / 255.0f;
    1.21 +    args->right_f = ((float) right) / 255.0f;
    1.22      if (!args->in_use) {
    1.23          args->in_use = 1;
    1.24          return(Mix_RegisterEffect(channel, f, _Eff_PositionDone, (void *) args));
    1.25 @@ -474,7 +474,7 @@
    1.26      }
    1.27  
    1.28      args->distance_u8 = distance;
    1.29 -    args->distance_f = ((float) distance) / 255.0;
    1.30 +    args->distance_f = ((float) distance) / 255.0f;
    1.31      if (!args->in_use) {
    1.32          args->in_use = 1;
    1.33          return(Mix_RegisterEffect(channel, f, _Eff_PositionDone, (void *) args));
    1.34 @@ -491,8 +491,6 @@
    1.35      int channels;
    1.36      position_args *args = NULL;
    1.37      Uint8 left = 255, right = 255;
    1.38 -    int flip;
    1.39 -    float angle_f;
    1.40  
    1.41      Mix_QuerySpec(NULL, &format, &channels);
    1.42      f = get_position_effect_func(format);
    1.43 @@ -537,11 +535,11 @@
    1.44      distance = 255 - distance;  /* flip it to scale Mix_SetDistance() uses. */
    1.45  
    1.46      args->left_u8 = left;
    1.47 -    args->left_f = ((float) left) / 255.0;
    1.48 +    args->left_f = ((float) left) / 255.0f;
    1.49      args->right_u8 = right;
    1.50 -    args->right_f = ((float) right) / 255.0;
    1.51 +    args->right_f = ((float) right) / 255.0f;
    1.52      args->distance_u8 = distance;
    1.53 -    args->distance_f = ((float) distance) / 255.0;
    1.54 +    args->distance_f = ((float) distance) / 255.0f;
    1.55      if (!args->in_use) {
    1.56          args->in_use = 1;
    1.57          return(Mix_RegisterEffect(channel, f, _Eff_PositionDone, (void *) args));