Changeset 5668 for code/branches/resource2/src/ois/OISEffect.h
- Timestamp:
- Aug 22, 2009, 11:16:34 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/resource2/src/ois/OISEffect.h
r1505 r5668 60 60 PeriodicForce, 61 61 ConditionalForce, 62 CustomForce 62 CustomForce, 63 _ForcesNumber // Always keep in last position. 63 64 }; 65 66 static const char* getForceTypeName(EForce eValue); 64 67 65 68 //! Type of effect … … 79 82 Inertia, //ConditionalForce 80 83 Spring, //ConditionalForce 81 Custom //CustomForce 84 Custom, //CustomForce 85 _TypesNumber // Always keep in last position. 82 86 }; 87 88 static const char* getEffectTypeName(EType eValue); 83 89 84 90 //! Direction of the Force … … 92 98 South, 93 99 SouthWest, 94 West 100 West, 101 _DirectionsNumber // Always keep in last position. 95 102 }; 103 104 static const char* getDirectionName(EDirection eValue); 96 105 97 106 /** … … 168 177 An optional envelope to be applied to the start/end of an effect. If any of 169 178 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. 171 180 */ 172 181 class _OISExport Envelope : public ForceEffect … … 178 187 #pragma warning (disable : 4800) 179 188 #endif 180 bool isUsed() { return attackLength | attackLevel | fadeLength | fadeLevel; }189 bool isUsed() const { return attackLength | attackLevel | fadeLength | fadeLevel; } 181 190 #if defined(OIS_MSVC_COMPILER) 182 191 #pragma warning (pop) 183 192 #endif 184 193 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) 186 199 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) 188 206 unsigned short fadeLevel; 189 207 }; … … 211 229 RampEffect() : startLevel(0), endLevel(0) {} 212 230 213 class Envelope envelope; //Optional env olope231 class Envelope envelope; //Optional envelope 214 232 signed short startLevel; //-10K to +10k 215 233 signed short endLevel; //-10K to +10k
Note: See TracChangeset
for help on using the changeset viewer.