ALLEGRO_HAPTIC_CONSTANTS(3)
π ALLEGRO_HAPTIC_CONSTANTS(3) β Library Functions Manual
πΈ NAME
ALLEGRO_HAPTIC_CONSTANTS β Allegro 5 API. Thatβs the name line, bestie, and itβs serving exactly what it says.
β¨ SYNOPSIS
#include <allegro5/allegro.h>
enum ALLEGRO_HAPTIC_CONSTANTS
π DESCRIPTION
Okay so this enum is literally the flag stash for defining haptic effects and capabilities. If a flag is set in the return value of al_get_haptic_capabilities(3), it means the device supports the given effect. The value of these flags should be set into a ALLEGRO_HAPTIC_EFFECT(3) struct to determine what kind of haptic effect should be played.
Here are the flags, in the exact order the page gives them:
ALLEGRO_HAPTIC_RUMBLEβ simple vibration effects. Basic buzz energy, no cap.ALLEGRO_HAPTIC_PERIODICβ periodic, wave-form effects.ALLEGRO_HAPTIC_CONSTANTβ constant effects.ALLEGRO_HAPTIC_SPRINGβ spring effects.ALLEGRO_HAPTIC_FRICTIONβ friction effects.ALLEGRO_HAPTIC_DAMPERβ damper effects.ALLEGRO_HAPTIC_INERTIAβ inertia effects.ALLEGRO_HAPTIC_RAMPβ ramp effects.ALLEGRO_HAPTIC_SQUAREβ square wave periodic effect.ALLEGRO_HAPTIC_TRIANGLEβ triangle wave periodic effect.ALLEGRO_HAPTIC_SINEβ sine wave periodic effect.ALLEGRO_HAPTIC_SAW_UPβ upwards saw wave periodic effect.ALLEGRO_HAPTIC_SAW_DOWNβ downwards saw wave periodic effect.ALLEGRO_HAPTIC_CUSTOMβ custom wave periodic effect.ALLEGRO_HAPTIC_GAINβ the haptic device supports gain setting.ALLEGRO_HAPTIC_ANGLEβ the haptic device supports angle coordinates.ALLEGRO_HAPTIC_RADIUSβ the haptic device supports radius coordinates.ALLEGRO_HAPTIC_AZIMUTHβ the haptic device supports azimuth coordinates.ALLEGRO_HAPTIC_AUTOCENTER
π¦ SINCE
5.1.8. Periodt. π
[Unstable API]: Perhaps could be simplified due to limited support for all the exposed features across all of the platforms. Awaiting feedback from users.
π₯ SEE ALSO
Go peek at al_get_haptic_capabilities(3) and ALLEGRO_HAPTIC_EFFECT(3) next, bestie. Those are the SEE ALSO besties, and they are lowkey important.
π Signed off from the Allegro reference manual β footer says ALLEGRO_HAPTIC_CONSTANTS(3), and thereβs no date line on the footer, so thatβs the whole cute receipt. π«Άβ¨
π¦ where this page comes from
- arch rolling: allegro 5.2.11.3-2 Β· Zlib AND BSD-3-Clause AND OFL-1.1 AND LicenseRef-Custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms