include/SDL_haptic.h
branchgsoc2008_force_feedback
changeset 2487 4c8e25ef2d97
parent 2486 24dd8b8669fa
child 2488 8e2bdbccf7ff
     1.1 --- a/include/SDL_haptic.h	Tue Jul 01 16:19:54 2008 +0000
     1.2 +++ b/include/SDL_haptic.h	Tue Jul 01 16:42:12 2008 +0000
     1.3 @@ -47,28 +47,20 @@
     1.4  
     1.5  /* Different effects that can be generated */
     1.6  #define SDL_HAPTIC_CONSTANT   (1<<0)
     1.7 -#define SDL_HAPTIC_PERIODIC   (1<<1)
     1.8 -#define SDL_HAPTIC_RAMP       (1<<2)
     1.9 -#define SDL_HAPTIC_SPRING     (1<<3)
    1.10 -#define SDL_HAPTIC_FRICTION   (1<<4)
    1.11 -#define SDL_HAPTIC_DAMPER     (1<<5)
    1.12 -#define SDL_HAPTIC_INERTIA    (1<<6)
    1.13 -#define SDL_HAPTIC_CUSTOM     (1<<7)
    1.14 -#define SDL_HAPTIC_GAIN       (1<<8)
    1.15 -#define SDL_HAPTIC_AUTOCENTER (1<<9)
    1.16 -
    1.17 -
    1.18 -/*
    1.19 - * Different waveforms a SDL_HAPTIC_PERIODIC effect can have.
    1.20 - */
    1.21 -typedef enum SDL_waveform {
    1.22 -   SDL_WAVEFORM_SINE,
    1.23 -   SDL_WAVEFORM_SQUARE,
    1.24 -   SDL_WAVEFORM_TRIANGLE,
    1.25 -   SDL_WAVEFORM_SAWTOOTHUP,
    1.26 -   SDL_WAVEFORM_SAWTOOTHDOWN,
    1.27 -   SDL_WAVEFORM_CUSTOM
    1.28 -} SDL_waveform;
    1.29 +#define SDL_HAPTIC_SINE       (1<<1)
    1.30 +#define SDL_HAPTIC_SQUARE     (1<<2)
    1.31 +#define SDL_HAPTIC_TRIANGLE   (1<<3)
    1.32 +#define SDL_HAPTIC_SAWTOOTHUP (1<<4)
    1.33 +#define SDL_HAPTIC_SAWTOOTHDOWN (1<<5)
    1.34 +#define SDL_HAPTIC_RAMP       (1<<6)
    1.35 +#define SDL_HAPTIC_SPRING     (1<<7)
    1.36 +#define SDL_HAPTIC_FRICTION   (1<<8)
    1.37 +#define SDL_HAPTIC_DAMPER     (1<<9)
    1.38 +#define SDL_HAPTIC_INERTIA    (1<<10)
    1.39 +#define SDL_HAPTIC_CUSTOM     (1<<11)
    1.40 +/* These last two are features the device has, not effects */
    1.41 +#define SDL_HAPTIC_GAIN       (1<<12)
    1.42 +#define SDL_HAPTIC_AUTOCENTER (1<<13)
    1.43  
    1.44  
    1.45  /*
    1.46 @@ -115,7 +107,7 @@
    1.47  } SDL_HapticConstant;
    1.48  typedef struct SDL_HapticPeriodic {
    1.49     /* Header */
    1.50 -   Uint16 type; /* SDL_HAPTIC_PERIODIC */
    1.51 +   Uint16 type; /* SDL_HAPTIC_{SINE,SQUARE,TRIANGLE,SAWTOOTHUP,SAWTOOTHDOWN} */
    1.52     Uint16 direction;
    1.53  
    1.54     /* Replay */
    1.55 @@ -127,7 +119,6 @@
    1.56     Uint16 interval;
    1.57  
    1.58     /* Periodic */
    1.59 -   SDL_waveform waveform; /* Type of effect */
    1.60     Uint16 period; /* Period of the wave */
    1.61     Sint16 magnitude; /* Peak value */
    1.62     Sint16 offset; /* Mean value of the wave */