Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 22, 2009, 11:16:34 PM (15 years ago)
Author:
rgrieder
Message:

Updated OIS library (still 1.2, but CVS version).
There have been some little fixes and support for force feedback on Linux (but this doesn't concern us for now…)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/resource2/src/ois/OISEffect.h

    r1505 r5668  
    6060                        PeriodicForce,
    6161                        ConditionalForce,
    62                         CustomForce
     62                        CustomForce,
     63                        _ForcesNumber // Always keep in last position.
    6364                };
     65
     66                static const char* getForceTypeName(EForce eValue);
    6467
    6568                //! Type of effect
     
    7982                        Inertia,     //ConditionalForce
    8083                        Spring,      //ConditionalForce
    81                         Custom       //CustomForce
     84                        Custom,      //CustomForce
     85                        _TypesNumber // Always keep in last position.
    8286                };
     87
     88                static const char* getEffectTypeName(EType eValue);
    8389
    8490                //! Direction of the Force
     
    9298                        South,
    9399                        SouthWest,
    94                         West
     100                        West,
     101                        _DirectionsNumber // Always keep in last position.
    95102                };
     103
     104                static const char* getDirectionName(EDirection eValue);
    96105
    97106                /**
     
    168177                An optional envelope to be applied to the start/end of an effect. If any of
    169178                these values are nonzero, then the envelope will be used in setting up the
    170                 effect. Not currently utilised.. But, will be soon.
     179                effect.
    171180        */
    172181        class _OISExport Envelope : public ForceEffect
     
    178187  #pragma warning (disable : 4800)
    179188#endif
    180                 bool isUsed() { return attackLength | attackLevel | fadeLength | fadeLevel; }
     189                bool isUsed() const { return attackLength | attackLevel | fadeLength | fadeLevel; }
    181190#if defined(OIS_MSVC_COMPILER)
    182191  #pragma warning (pop)
    183192#endif
    184193
    185                 unsigned short attackLength;
     194                // Duration of the attack (microseconds)
     195                unsigned int attackLength;
     196
     197                // Absolute level at the beginning of the attack (0 to 10K)
     198                // (automatically signed when necessary by FF core according to effect level sign)
    186199                unsigned short attackLevel;
    187                 unsigned short fadeLength;
     200
     201                // Duration of fade (microseconds)
     202                unsigned int fadeLength;
     203
     204                // Absolute level at the end of fade (0 to 10K)
     205                // (automatically signed when necessary by FF core according to effect level sign)
    188206                unsigned short fadeLevel;
    189207        };
     
    211229                RampEffect() : startLevel(0), endLevel(0) {}
    212230
    213         class Envelope envelope; //Optional envolope
     231        class Envelope envelope; //Optional envelope
    214232                signed short startLevel;  //-10K to +10k
    215233                signed short endLevel;    //-10K to +10k
Note: See TracChangeset for help on using the changeset viewer.