Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 30, 2009, 2:22:00 AM (15 years ago)
Author:
rgrieder
Message:

Merged resource2 branch back to trunk.

IMPORTANT NOTE:
Upon this merge you need to specifically call your data directory "data_extern" when checking it out (when you don't provide a name, it will be just called 'trunk').
The new CMake variable is EXTERNAL_DATA_DIRECTORY. DATA_DIRECTORY now points to the one the source part of the repository.
UPDATE YOUR DATA DIRECTORY AS WELL!!!

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/ois/OISForceFeedback.cpp

    r1505 r5695  
    2727
    2828//-------------------------------------------------------------//
    29 void ForceFeedback::_addEffectTypes( Effect::EForce force, Effect::EType type )
     29ForceFeedback::ForceFeedback() : mSetGainSupport(false), mSetAutoCenterSupport(false)
    3030{
    31         if( force == Effect::UnknownForce || type == Effect::Unknown )
    32                 OIS_EXCEPT( E_General, "Unknown Force||Type was added too effect list..." );
    33 
    34         mSupportedEffects[force] = type;
    3531}
    3632
    3733//-------------------------------------------------------------//
    38 const ForceFeedback::SupportedEffectList&
    39                                                 ForceFeedback::getSupportedEffects() const
     34void ForceFeedback::_addEffectTypes( Effect::EForce force, Effect::EType type )
     35{
     36        if( force <= Effect::UnknownForce || force >= Effect::_ForcesNumber
     37                || type <= Effect::Unknown || type >= Effect::_TypesNumber )
     38                OIS_EXCEPT( E_General, "Can't add unknown effect Force/Type to the supported list" );
     39
     40        mSupportedEffects.insert(std::pair<Effect::EForce, Effect::EType>(force, type));
     41}
     42
     43//-------------------------------------------------------------//
     44void ForceFeedback::_setGainSupport( bool on )
     45{
     46        mSetGainSupport = on;
     47}
     48
     49//-------------------------------------------------------------//
     50void ForceFeedback::_setAutoCenterSupport( bool on )
     51{
     52        mSetAutoCenterSupport = on;
     53}
     54
     55//-------------------------------------------------------------//
     56const ForceFeedback::SupportedEffectList& ForceFeedback::getSupportedEffects() const
    4057{
    4158        return mSupportedEffects;
    4259}
     60
     61//-------------------------------------------------------------//
     62bool ForceFeedback::supportsEffect(Effect::EForce force, Effect::EType type) const
     63{
     64    const std::pair<SupportedEffectList::const_iterator, SupportedEffectList::const_iterator>
     65            iterRange = mSupportedEffects.equal_range(force);
     66        SupportedEffectList::const_iterator iter;
     67        for (iter = iterRange.first; iter != iterRange.second; iter++)
     68        {
     69          if ((*iter).second == type)
     70                return true;
     71        }
     72
     73        return false;
     74}
Note: See TracChangeset for help on using the changeset viewer.