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.cpp

    r1505 r5668  
    2929//Perhaps a case of a crazy extreme optimizer :/ (moved to header)
    3030//const unsigned int Effect::OIS_INFINITE = 0xFFFFFFFF;
     31
     32//------------------------------------------------------------------------------//
     33static const char* pszEForceString[] =
     34  { "UnknownForce",
     35    "ConstantForce",
     36    "RampForce",
     37    "PeriodicForce",
     38    "ConditionalForce",
     39    "CustomForce" };
     40
     41const char* Effect::getForceTypeName(Effect::EForce eValue)
     42{
     43  return (eValue >= 0 && eValue < _ForcesNumber) ? pszEForceString[eValue] : "<Bad force type>";
     44}
     45
     46static const char* pszETypeString[] =
     47  { "Unknown",
     48    "Constant",
     49    "Ramp",
     50    "Square", "Triangle", "Sine", "SawToothUp", "SawToothDown",
     51    "Friction", "Damper", "Inertia", "Spring",
     52    "Custom" };
     53
     54const char* Effect::getEffectTypeName(Effect::EType eValue)
     55{
     56  return (eValue >= 0 && eValue < _TypesNumber) ? pszETypeString[eValue] : "<Bad effect type>";
     57}
     58
     59static const char* pszEDirectionString[] =
     60  { "NorthWest", "North", "NorthEast", "East", "SouthEast", "South", "SouthWest", "West"};
     61
     62const char* Effect::getDirectionName(Effect::EDirection eValue)
     63{
     64  return (eValue >= 0 && eValue < _DirectionsNumber) ? pszEDirectionString[eValue] : "<Bad direction>";
     65}
    3166
    3267//------------------------------------------------------------------------------//
Note: See TracChangeset for help on using the changeset viewer.