World of Might and Magic
0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
|
The generic template for any haptic effect. Подробнее...
#include <SDL_haptic.h>
Открытые атрибуты | |
Uint16 | type |
SDL_HapticConstant | constant |
SDL_HapticPeriodic | periodic |
SDL_HapticCondition | condition |
SDL_HapticRamp | ramp |
SDL_HapticLeftRight | leftright |
SDL_HapticCustom | custom |
The generic template for any haptic effect.
All values max at 32767 (0x7FFF). Signed values also can be negative. Time values unless specified otherwise are in milliseconds.
You can also pass ::SDL_HAPTIC_INFINITY to length instead of a 0-32767 value. Neither delay, interval, attack_length nor fade_length support ::SDL_HAPTIC_INFINITY. Fade will also not be used since effect never ends.
Additionally, the ::SDL_HAPTIC_RAMP effect does not support a duration of ::SDL_HAPTIC_INFINITY.
Button triggers may not be supported on all devices, it is advised to not use them if possible. Buttons start at index 1 instead of index 0 like the joystick.
If both attack_length and fade_level are 0, the envelope is not used, otherwise both values are used.
Common parts:
Here we have an example of a constant effect evolution in time:
Strength ^ | | effect level --> _________________ | / \ | / \ | / \ | / \ | attack_level --> | \ | | | <--- fade_level | +--------------------------------------------------> Time [--] [---] attack_length fade_length [------------------][-----------------------] delay length
Note either the attack_level or the fade_level may be above the actual effect level.
См. определение в файле SDL_haptic.h строка 800
Uint16 SDL_HapticEffect::type |
Effect type.
См. определение в файле SDL_haptic.h строка 803
SDL_HapticConstant SDL_HapticEffect::constant |
Constant effect.
См. определение в файле SDL_haptic.h строка 804
SDL_HapticPeriodic SDL_HapticEffect::periodic |
Periodic effect.
См. определение в файле SDL_haptic.h строка 805
SDL_HapticCondition SDL_HapticEffect::condition |
Condition effect.
См. определение в файле SDL_haptic.h строка 806
SDL_HapticRamp SDL_HapticEffect::ramp |
Ramp effect.
См. определение в файле SDL_haptic.h строка 807
SDL_HapticLeftRight SDL_HapticEffect::leftright |
Left/Right effect.
См. определение в файле SDL_haptic.h строка 808
SDL_HapticCustom SDL_HapticEffect::custom |
Custom effect.
См. определение в файле SDL_haptic.h строка 809