Browse Source

Added effect getters.
Improved documentation.

woollybah 7 years ago
parent
commit
9f8a648c94
3 changed files with 450 additions and 12 deletions
  1. 41 5
      sdlhaptic.mod/common.bmx
  2. 144 0
      sdlhaptic.mod/glue.c
  3. 265 7
      sdlhaptic.mod/sdlhaptic.bmx

+ 41 - 5
sdlhaptic.mod/common.bmx

@@ -91,7 +91,7 @@ Extern
 	
 	Function bmx_sdl_haptic_SDLHapticConstant_new:Byte Ptr()
 	Function bmx_sdl_haptic_SDLHapticConstant_Direction:Byte Ptr(handle:Byte Ptr)
-	Function bmx_sdl_haptic_SDLHapticConstant_SetLength(handle:Byte Ptr, value:Int)
+	Function bmx_sdl_haptic_SDLHapticConstant_SetLength(handle:Byte Ptr, value:UInt)
 	Function bmx_sdl_haptic_SDLHapticConstant_SetDelay(handle:Byte Ptr, value:Short)
 	Function bmx_sdl_haptic_SDLHapticConstant_SetButton(handle:Byte Ptr, value:Short)
 	Function bmx_sdl_haptic_SDLHapticConstant_SetInterval(handle:Byte Ptr, value:Short)
@@ -100,10 +100,18 @@ Extern
 	Function bmx_sdl_haptic_SDLHapticConstant_SetAttackLevel(handle:Byte Ptr, value:Short)
 	Function bmx_sdl_haptic_SDLHapticConstant_SetFadeLength(handle:Byte Ptr, value:Short)
 	Function bmx_sdl_haptic_SDLHapticConstant_SetFadeLevel(handle:Byte Ptr, value:Short)
+	Function bmx_sdl_haptic_SDLHapticConstant_GetLength:UInt(handle:Byte Ptr)
+	Function bmx_sdl_haptic_SDLHapticConstant_GetDelay:Short(handle:Byte Ptr)
+	Function bmx_sdl_haptic_SDLHapticConstant_GetButton:Short(handle:Byte Ptr)
+	Function bmx_sdl_haptic_SDLHapticConstant_GetInterval:Short(handle:Byte Ptr)
+	Function bmx_sdl_haptic_SDLHapticConstant_GetAttackLength:Short(handle:Byte Ptr)
+	Function bmx_sdl_haptic_SDLHapticConstant_GetAttackLevel:Short(handle:Byte Ptr)
+	Function bmx_sdl_haptic_SDLHapticConstant_GetFadeLength:Short(handle:Byte Ptr)
+	Function bmx_sdl_haptic_SDLHapticConstant_GetFadeLevel:Short(handle:Byte Ptr)
 
 	Function bmx_sdl_haptic_SDLHapticPeriodic_new:Byte Ptr(waveType:Int)
 	Function bmx_sdl_haptic_SDLHapticPeriodic_Direction:Byte Ptr(handle:Byte Ptr)
-	Function bmx_sdl_haptic_SDLHapticPeriodic_SetLength(handle:Byte Ptr, value:Int)
+	Function bmx_sdl_haptic_SDLHapticPeriodic_SetLength(handle:Byte Ptr, value:UInt)
 	Function bmx_sdl_haptic_SDLHapticPeriodic_SetDelay(handle:Byte Ptr, value:Short)
 	Function bmx_sdl_haptic_SDLHapticPeriodic_SetButton(handle:Byte Ptr, value:Short)
 	Function bmx_sdl_haptic_SDLHapticPeriodic_SetInterval(handle:Byte Ptr, value:Short)
@@ -115,10 +123,18 @@ Extern
 	Function bmx_sdl_haptic_SDLHapticPeriodic_SetAttackLevel(handle:Byte Ptr, value:Short)
 	Function bmx_sdl_haptic_SDLHapticPeriodic_SetFadeLength(handle:Byte Ptr, value:Short)
 	Function bmx_sdl_haptic_SDLHapticPeriodic_SetFadeLevel(handle:Byte Ptr, value:Short)
+	Function bmx_sdl_haptic_SDLHapticPeriodic_GetLength:UInt(handle:Byte Ptr)
+	Function bmx_sdl_haptic_SDLHapticPeriodic_GetDelay:Short(handle:Byte Ptr)
+	Function bmx_sdl_haptic_SDLHapticPeriodic_GetButton:Short(handle:Byte Ptr)
+	Function bmx_sdl_haptic_SDLHapticPeriodic_GetInterval:Short(handle:Byte Ptr)
+	Function bmx_sdl_haptic_SDLHapticPeriodic_GetAttackLength:Short(handle:Byte Ptr)
+	Function bmx_sdl_haptic_SDLHapticPeriodic_GetAttackLevel:Short(handle:Byte Ptr)
+	Function bmx_sdl_haptic_SDLHapticPeriodic_GetFadeLength:Short(handle:Byte Ptr)
+	Function bmx_sdl_haptic_SDLHapticPeriodic_GetFadeLevel:Short(handle:Byte Ptr)
 
 	Function bmx_sdl_haptic_SDLHapticCondition_new:Byte Ptr(effectType:Int)
 	Function bmx_sdl_haptic_SDLHapticCondition_Direction:Byte Ptr(handle:Byte Ptr)
-	Function bmx_sdl_haptic_SDLHapticCondition_SetLength(handle:Byte Ptr, value:Int)
+	Function bmx_sdl_haptic_SDLHapticCondition_SetLength(handle:Byte Ptr, value:UInt)
 	Function bmx_sdl_haptic_SDLHapticCondition_SetDelay(handle:Byte Ptr, value:Short)
 	Function bmx_sdl_haptic_SDLHapticCondition_SetButton(handle:Byte Ptr, value:Short)
 	Function bmx_sdl_haptic_SDLHapticCondition_SetInterval(handle:Byte Ptr, value:Short)
@@ -128,10 +144,14 @@ Extern
 	Function bmx_sdl_haptic_SDLHapticCondition_SetLeftCoeff(handle:Byte Ptr, value1:Int, value2:Int, value3:Int)
 	Function bmx_sdl_haptic_SDLHapticCondition_SetDeadband(handle:Byte Ptr, value1:Short, value2:Short, value3:Short)
 	Function bmx_sdl_haptic_SDLHapticCondition_SetCenter(handle:Byte Ptr, value1:Int, value2:Int, value3:Int)
+	Function bmx_sdl_haptic_SDLHapticCondition_GetLength:UInt(handle:Byte Ptr)
+	Function bmx_sdl_haptic_SDLHapticCondition_GetDelay:Short(handle:Byte Ptr)
+	Function bmx_sdl_haptic_SDLHapticCondition_GetButton:Short(handle:Byte Ptr)
+	Function bmx_sdl_haptic_SDLHapticCondition_GetInterval:Short(handle:Byte Ptr)
 
 	Function bmx_sdl_haptic_SDLHapticRamp_new:Byte Ptr()
 	Function bmx_sdl_haptic_SDLHapticRamp_Direction:Byte Ptr(handle:Byte Ptr)
-	Function bmx_sdl_haptic_SDLHapticRamp_SetLength(handle:Byte Ptr, value:Int)
+	Function bmx_sdl_haptic_SDLHapticRamp_SetLength(handle:Byte Ptr, value:UInt)
 	Function bmx_sdl_haptic_SDLHapticRamp_SetDelay(handle:Byte Ptr, value:Short)
 	Function bmx_sdl_haptic_SDLHapticRamp_SetButton(handle:Byte Ptr, value:Short)
 	Function bmx_sdl_haptic_SDLHapticRamp_SetInterval(handle:Byte Ptr, value:Short)
@@ -141,6 +161,14 @@ Extern
 	Function bmx_sdl_haptic_SDLHapticRamp_SetAttackLevel(handle:Byte Ptr, value:Short)
 	Function bmx_sdl_haptic_SDLHapticRamp_SetFadeLength(handle:Byte Ptr, value:Short)
 	Function bmx_sdl_haptic_SDLHapticRamp_SetFadeLevel(handle:Byte Ptr, value:Short)
+	Function bmx_sdl_haptic_SDLHapticRamp_GetLength:UInt(handle:Byte Ptr)
+	Function bmx_sdl_haptic_SDLHapticRamp_GetDelay:Short(handle:Byte Ptr)
+	Function bmx_sdl_haptic_SDLHapticRamp_GetButton:Short(handle:Byte Ptr)
+	Function bmx_sdl_haptic_SDLHapticRamp_GetInterval:Short(handle:Byte Ptr)
+	Function bmx_sdl_haptic_SDLHapticRamp_GetAttackLength:Short(handle:Byte Ptr)
+	Function bmx_sdl_haptic_SDLHapticRamp_GetAttackLevel:Short(handle:Byte Ptr)
+	Function bmx_sdl_haptic_SDLHapticRamp_GetFadeLength:Short(handle:Byte Ptr)
+	Function bmx_sdl_haptic_SDLHapticRamp_GetFadeLevel:Short(handle:Byte Ptr)
 
 	Function bmx_sdl_haptic_SDLHapticLeftRight_new:Byte Ptr()
 	Function bmx_sdl_haptic_SDLHapticLeftRight_SetLength(handle:Byte Ptr, value:Int)
@@ -149,7 +177,7 @@ Extern
 
 	Function bmx_sdl_haptic_SDLHapticCustom_new:Byte Ptr()
 	Function bmx_sdl_haptic_SDLHapticCustom_Direction:Byte Ptr(handle:Byte Ptr)
-	Function bmx_sdl_haptic_SDLHapticCustom_SetLength(handle:Byte Ptr, value:Int)
+	Function bmx_sdl_haptic_SDLHapticCustom_SetLength(handle:Byte Ptr, value:UInt)
 	Function bmx_sdl_haptic_SDLHapticCustom_SetDelay(handle:Byte Ptr, value:Short)
 	Function bmx_sdl_haptic_SDLHapticCustom_SetButton(handle:Byte Ptr, value:Short)
 	Function bmx_sdl_haptic_SDLHapticCustom_SetInterval(handle:Byte Ptr, value:Short)
@@ -160,6 +188,14 @@ Extern
 	Function bmx_sdl_haptic_SDLHapticCustom_SetAttackLevel(handle:Byte Ptr, value:Short)
 	Function bmx_sdl_haptic_SDLHapticCustom_SetFadeLength(handle:Byte Ptr, value:Short)
 	Function bmx_sdl_haptic_SDLHapticCustom_SetFadeLevel(handle:Byte Ptr, value:Short)
+	Function bmx_sdl_haptic_SDLHapticCustom_GetLength:UInt(handle:Byte Ptr)
+	Function bmx_sdl_haptic_SDLHapticCustom_GetDelay:Short(handle:Byte Ptr)
+	Function bmx_sdl_haptic_SDLHapticCustom_GetButton:Short(handle:Byte Ptr)
+	Function bmx_sdl_haptic_SDLHapticCustom_GetInterval:Short(handle:Byte Ptr)
+	Function bmx_sdl_haptic_SDLHapticCustom_GetAttackLength:Short(handle:Byte Ptr)
+	Function bmx_sdl_haptic_SDLHapticCustom_GetAttackLevel:Short(handle:Byte Ptr)
+	Function bmx_sdl_haptic_SDLHapticCustom_GetFadeLength:Short(handle:Byte Ptr)
+	Function bmx_sdl_haptic_SDLHapticCustom_GetFadeLevel:Short(handle:Byte Ptr)
 
 	Function bmx_sdl_haptic_SDLHapticDirection_SetType(handle:Byte Ptr, value:Int)
 	Function bmx_sdl_haptic_SDLHapticDirection_SetDir(handle:Byte Ptr, value1:Short, value2:Short, value3:Short)

+ 144 - 0
sdlhaptic.mod/glue.c

@@ -74,6 +74,38 @@ void bmx_sdl_haptic_SDLHapticConstant_SetFadeLevel(SDL_HapticConstant * effect,
 	effect->fade_level = value;
 }
 
+Uint32 bmx_sdl_haptic_SDLHapticConstant_GetLength(SDL_HapticConstant * effect) {
+	return effect->length;
+}
+
+Uint16 bmx_sdl_haptic_SDLHapticConstant_GetDelay(SDL_HapticConstant * effect) {
+	return effect->delay;
+}
+
+Uint16 bmx_sdl_haptic_SDLHapticConstant_GetButton(SDL_HapticConstant * effect) {
+	return effect->button;
+}
+
+Uint16 bmx_sdl_haptic_SDLHapticConstant_GetInterval(SDL_HapticConstant * effect) {
+	return effect->interval;
+}
+
+Uint16 bmx_sdl_haptic_SDLHapticConstant_GetAttackLength(SDL_HapticConstant * effect) {
+	return effect->attack_length;
+}
+
+Uint16 bmx_sdl_haptic_SDLHapticConstant_GetAttackLevel(SDL_HapticConstant * effect) {
+	return effect->attack_level;
+}
+
+Uint16 bmx_sdl_haptic_SDLHapticConstant_GetFadeLength(SDL_HapticConstant * effect) {
+	return effect->fade_length;
+}
+
+Uint16 bmx_sdl_haptic_SDLHapticConstant_GetFadeLevel(SDL_HapticConstant * effect) {
+	return effect->fade_level;
+}
+
 // --------------------------------------------------------
 
 SDL_HapticPeriodic * bmx_sdl_haptic_SDLHapticPeriodic_new(int waveType) {
@@ -134,6 +166,38 @@ void bmx_sdl_haptic_SDLHapticPeriodic_SetFadeLevel(SDL_HapticPeriodic * effect,
 	effect->fade_level = value;
 }
 
+Uint32 bmx_sdl_haptic_SDLHapticPeriodic_GetLength(SDL_HapticPeriodic * effect) {
+	return effect->length;
+}
+
+Uint16 bmx_sdl_haptic_SDLHapticPeriodic_GetDelay(SDL_HapticPeriodic * effect) {
+	return effect->delay;
+}
+
+Uint16 bmx_sdl_haptic_SDLHapticPeriodic_GetButton(SDL_HapticPeriodic * effect) {
+	return effect->button;
+}
+
+Uint16 bmx_sdl_haptic_SDLHapticPeriodic_GetInterval(SDL_HapticPeriodic * effect) {
+	return effect->interval;
+}
+
+Uint16 bmx_sdl_haptic_SDLHapticPeriodic_GetAttackLength(SDL_HapticPeriodic * effect) {
+	return effect->attack_length;
+}
+
+Uint16 bmx_sdl_haptic_SDLHapticPeriodic_GetAttackLevel(SDL_HapticPeriodic * effect) {
+	return effect->attack_level;
+}
+
+Uint16 bmx_sdl_haptic_SDLHapticPeriodic_GetFadeLength(SDL_HapticPeriodic * effect) {
+	return effect->fade_length;
+}
+
+Uint16 bmx_sdl_haptic_SDLHapticPeriodic_GetFadeLevel(SDL_HapticPeriodic * effect) {
+	return effect->fade_level;
+}
+
 // --------------------------------------------------------
 
 SDL_HapticCondition * bmx_sdl_haptic_SDLHapticCondition_new(int effectType) {
@@ -198,6 +262,22 @@ void bmx_sdl_haptic_SDLHapticCondition_SetCenter(SDL_HapticCondition * effect, i
 	effect->center[2] = value3;
 }
 
+Uint32 bmx_sdl_haptic_SDLHapticCondition_GetLength(SDL_HapticCondition * effect) {
+	return effect->length;
+}
+
+Uint16 bmx_sdl_haptic_SDLHapticCondition_GetDelay(SDL_HapticCondition * effect) {
+	return effect->delay;
+}
+
+Uint16 bmx_sdl_haptic_SDLHapticCondition_GetButton(SDL_HapticCondition * effect) {
+	return effect->button;
+}
+
+Uint16 bmx_sdl_haptic_SDLHapticCondition_GetInterval(SDL_HapticCondition * effect) {
+	return effect->interval;
+}
+
 // --------------------------------------------------------
 
 SDL_HapticRamp * bmx_sdl_haptic_SDLHapticRamp_new() {
@@ -250,6 +330,38 @@ void bmx_sdl_haptic_SDLHapticRamp_SetFadeLevel(SDL_HapticRamp * effect, Uint16 v
 	effect->fade_level = value;
 }
 
+Uint32 bmx_sdl_haptic_SDLHapticRamp_GetLength(SDL_HapticRamp * effect) {
+	return effect->length;
+}
+
+Uint16 bmx_sdl_haptic_SDLHapticRamp_GetDelay(SDL_HapticRamp * effect) {
+	return effect->delay;
+}
+
+Uint16 bmx_sdl_haptic_SDLHapticRamp_GetButton(SDL_HapticRamp * effect) {
+	return effect->button;
+}
+
+Uint16 bmx_sdl_haptic_SDLHapticRamp_GetInterval(SDL_HapticRamp * effect) {
+	return effect->interval;
+}
+
+Uint16 bmx_sdl_haptic_SDLHapticRamp_GetAttackLength(SDL_HapticRamp * effect) {
+	return effect->attack_length;
+}
+
+Uint16 bmx_sdl_haptic_SDLHapticRamp_GetAttackLevel(SDL_HapticRamp * effect) {
+	return effect->attack_level;
+}
+
+Uint16 bmx_sdl_haptic_SDLHapticRamp_GetFadeLength(SDL_HapticRamp * effect) {
+	return effect->fade_length;
+}
+
+Uint16 bmx_sdl_haptic_SDLHapticRamp_GetFadeLevel(SDL_HapticRamp * effect) {
+	return effect->fade_level;
+}
+
 // --------------------------------------------------------
 
 SDL_HapticLeftRight * bmx_sdl_haptic_SDLHapticLeftRight_new() {
@@ -327,6 +439,38 @@ void bmx_sdl_haptic_SDLHapticCustom_SetFadeLevel(SDL_HapticCustom * effect, Uint
 	effect->fade_level = value;
 }
 
+Uint32 bmx_sdl_haptic_SDLHapticCustom_GetLength(SDL_HapticCustom * effect) {
+	return effect->length;
+}
+
+Uint16 bmx_sdl_haptic_SDLHapticCustom_GetDelay(SDL_HapticCustom * effect) {
+	return effect->delay;
+}
+
+Uint16 bmx_sdl_haptic_SDLHapticCustom_GetButton(SDL_HapticCustom * effect) {
+	return effect->button;
+}
+
+Uint16 bmx_sdl_haptic_SDLHapticCustom_GetInterval(SDL_HapticCustom * effect) {
+	return effect->interval;
+}
+
+Uint16 bmx_sdl_haptic_SDLHapticCustom_GetAttackLength(SDL_HapticCustom * effect) {
+	return effect->attack_length;
+}
+
+Uint16 bmx_sdl_haptic_SDLHapticCustom_GetAttackLevel(SDL_HapticCustom * effect) {
+	return effect->attack_level;
+}
+
+Uint16 bmx_sdl_haptic_SDLHapticCustom_GetFadeLength(SDL_HapticCustom * effect) {
+	return effect->fade_length;
+}
+
+Uint16 bmx_sdl_haptic_SDLHapticCustom_GetFadeLevel(SDL_HapticCustom * effect) {
+	return effect->fade_level;
+}
+
 // --------------------------------------------------------
 
 void bmx_sdl_haptic_SDLHapticDirection_SetType(SDL_HapticDirection * direction, int value) {

+ 265 - 7
sdlhaptic.mod/sdlhaptic.bmx

@@ -22,7 +22,7 @@
 SuperStrict
 
 Rem
-bbdoc: 
+bbdoc: Control of haptic (force feedback) devices.
 End Rem
 Module SDL.SDLHaptic
 
@@ -31,7 +31,7 @@ Import SDL.SDLJoystick
 Import "common.bmx"
 
 Rem
-bbdoc: 
+bbdoc: A haptic device.
 End Rem
 Type TSDLHaptic
 
@@ -97,21 +97,22 @@ Type TSDLHaptic
 	End Method
 	
 	Rem
-	bbdoc: 
+	bbdoc: Gets the implementation dependent name of the haptic device.
 	End Rem
 	Function Name:String(device:Int)
 		Return String.FromUTF8String(SDL_HapticName(device))
 	End Function
 	
 	Rem
-	bbdoc: 
+	bbdoc: Gets the index of the haptic device.
 	End Rem
 	Method Index:Int()
 		Return SDL_HapticIndex(hapticPtr)
 	End Method
 	
 	Rem
-	bbdoc: 
+	bbdoc: Checks if the haptic device at the designated index has been opened.
+	returns: Returns True if it has been opened, False if it hasn't or on failure.
 	End Rem
 	Function Opened:Int(device:Int)
 		Return SDL_HapticOpened(device)
@@ -315,12 +316,12 @@ Type TSDLHapticDirection
 End Type
 
 Rem
-bbdoc: 
+bbdoc: A generic template for any haptic effect.
 End Rem
 Type TSDLHapticEffect
 
 	Field effectPtr:Byte Ptr
-
+	
 	Rem
 	bbdoc: 
 	End Rem
@@ -346,6 +347,62 @@ Type TSDLHapticConstant Extends TSDLHapticEffect
 		effectPtr = bmx_sdl_haptic_SDLHapticConstant_new()
 	End Method
 
+	Rem
+	bbdoc: Returns the duration of effect (ms).
+	End Rem
+	Method GetLength:UInt()
+		Return bmx_sdl_haptic_SDLHapticConstant_GetLength(effectPtr)
+	End Method
+
+	Rem
+	bbdoc: Returns the delay before starting effect.
+	End Rem
+	Method GetDelay:Short()
+		Return bmx_sdl_haptic_SDLHapticConstant_GetDelay(effectPtr)
+	End Method
+	
+	Rem
+	bbdoc: Returns the button that triggers effect.
+	End Rem
+	Method GetButton:Short()
+		Return bmx_sdl_haptic_SDLHapticConstant_GetButton(effectPtr)
+	End Method
+	
+	Rem
+	bbdoc: Returns how soon before effect can be triggered again.
+	End Rem
+	Method GetInterval:Short()
+		Return bmx_sdl_haptic_SDLHapticConstant_GetInterval(effectPtr)
+	End Method
+	
+	Rem
+	bbdoc: Returns the duration of the attack (ms).
+	End Rem
+	Method GetAttackLength:Short()
+		Return bmx_sdl_haptic_SDLHapticConstant_GetAttackLength(effectPtr)
+	End Method
+	
+	Rem
+	bbdoc: Returns the level at the start of the attack.
+	End Rem
+	Method GetAttackLevel:Short()
+		Return bmx_sdl_haptic_SDLHapticConstant_GetAttackLevel(effectPtr)
+	End Method
+	
+	Rem
+	bbdoc: Returns the duration of the fade out (ms).
+	End Rem
+	Method GetFadeLength:Short()
+		Return bmx_sdl_haptic_SDLHapticConstant_GetFadeLength(effectPtr)
+	End Method
+	
+	Rem
+	bbdoc: Returns the level at the end of the fade.
+	End Rem
+	Method GetFadeLevel:Short()
+		Return bmx_sdl_haptic_SDLHapticConstant_GetFadeLevel(effectPtr)
+	End Method
+	
 	Rem
 	bbdoc: Returns the effect direction.
 	about: This instance is owned by the effect, and any changes will apply only to this effect.
@@ -356,6 +413,7 @@ Type TSDLHapticConstant Extends TSDLHapticEffect
 	
 	Rem
 	bbdoc: Sets the duration of the effect.
+	about: You can pass SDL_HAPTIC_INFINITY to length instead of a 0-32767 value.
 	End Rem
 	Method SetLength(value:UInt)
 		bmx_sdl_haptic_SDLHapticConstant_SetLength(effectPtr, value)
@@ -433,6 +491,62 @@ Type TSDLHapticPeriodic Extends TSDLHapticEffect
 		effectPtr = bmx_sdl_haptic_SDLHapticPeriodic_new(waveType)
 	End Method
 
+	Rem
+	bbdoc: Returns the duration of effect (ms).
+	End Rem
+	Method GetLength:UInt()
+		Return bmx_sdl_haptic_SDLHapticPeriodic_GetLength(effectPtr)
+	End Method
+
+	Rem
+	bbdoc: Returns the delay before starting effect.
+	End Rem
+	Method GetDelay:Short()
+		Return bmx_sdl_haptic_SDLHapticPeriodic_GetDelay(effectPtr)
+	End Method
+	
+	Rem
+	bbdoc: Returns the button that triggers effect.
+	End Rem
+	Method GetButton:Short()
+		Return bmx_sdl_haptic_SDLHapticPeriodic_GetButton(effectPtr)
+	End Method
+	
+	Rem
+	bbdoc: Returns how soon before effect can be triggered again.
+	End Rem
+	Method GetInterval:Short()
+		Return bmx_sdl_haptic_SDLHapticPeriodic_GetInterval(effectPtr)
+	End Method
+	
+	Rem
+	bbdoc: Returns the duration of the attack (ms).
+	End Rem
+	Method GetAttackLength:Short()
+		Return bmx_sdl_haptic_SDLHapticPeriodic_GetAttackLength(effectPtr)
+	End Method
+	
+	Rem
+	bbdoc: Returns the level at the start of the attack.
+	End Rem
+	Method GetAttackLevel:Short()
+		Return bmx_sdl_haptic_SDLHapticPeriodic_GetAttackLevel(effectPtr)
+	End Method
+	
+	Rem
+	bbdoc: Returns the duration of the fade out (ms).
+	End Rem
+	Method GetFadeLength:Short()
+		Return bmx_sdl_haptic_SDLHapticPeriodic_GetFadeLength(effectPtr)
+	End Method
+	
+	Rem
+	bbdoc: Returns the level at the end of the fade.
+	End Rem
+	Method GetFadeLevel:Short()
+		Return bmx_sdl_haptic_SDLHapticPeriodic_GetFadeLevel(effectPtr)
+	End Method
+	
 	Rem
 	bbdoc: Returns the effect direction.
 	about: This instance is owned by the effect, and any changes will apply only to this effect.
@@ -443,6 +557,7 @@ Type TSDLHapticPeriodic Extends TSDLHapticEffect
 
 	Rem
 	bbdoc: Sets the duration of the effect.
+	about: You can pass SDL_HAPTIC_INFINITY to length instead of a 0-32767 value.
 	End Rem
 	Method SetLength(value:UInt)
 		bmx_sdl_haptic_SDLHapticPeriodic_SetLength(effectPtr, value)
@@ -547,6 +662,34 @@ Type TSDLHapticCondition Extends TSDLHapticEffect
 		effectPtr = bmx_sdl_haptic_SDLHapticCondition_new(effectType)
 	End Method
 
+	Rem
+	bbdoc: Returns the duration of effect (ms).
+	End Rem
+	Method GetLength:UInt()
+		Return bmx_sdl_haptic_SDLHapticCondition_GetLength(effectPtr)
+	End Method
+
+	Rem
+	bbdoc: Returns the delay before starting effect.
+	End Rem
+	Method GetDelay:Short()
+		Return bmx_sdl_haptic_SDLHapticCondition_GetDelay(effectPtr)
+	End Method
+	
+	Rem
+	bbdoc: Returns the button that triggers effect.
+	End Rem
+	Method GetButton:Short()
+		Return bmx_sdl_haptic_SDLHapticCondition_GetButton(effectPtr)
+	End Method
+	
+	Rem
+	bbdoc: Returns how soon before effect can be triggered again.
+	End Rem
+	Method GetInterval:Short()
+		Return bmx_sdl_haptic_SDLHapticCondition_GetInterval(effectPtr)
+	End Method
+
 	Rem
 	bbdoc: Returns the effect direction.
 	about: This instance is owned by the effect, and any changes will apply only to this effect.
@@ -557,6 +700,7 @@ Type TSDLHapticCondition Extends TSDLHapticEffect
 
 	Rem
 	bbdoc: Sets the duration of the effect.
+	about: You can pass SDL_HAPTIC_INFINITY to length instead of a 0-32767 value.
 	End Rem
 	Method SetLength(value:UInt)
 		bmx_sdl_haptic_SDLHapticCondition_SetLength(effectPtr, value)
@@ -639,6 +783,62 @@ Type TSDLHapticRamp Extends TSDLHapticEffect
 		effectPtr = bmx_sdl_haptic_SDLHapticRamp_new()
 	End Method
 
+	Rem
+	bbdoc: Returns the duration of effect (ms).
+	End Rem
+	Method GetLength:UInt()
+		Return bmx_sdl_haptic_SDLHapticRamp_GetLength(effectPtr)
+	End Method
+
+	Rem
+	bbdoc: Returns the delay before starting effect.
+	End Rem
+	Method GetDelay:Short()
+		Return bmx_sdl_haptic_SDLHapticRamp_GetDelay(effectPtr)
+	End Method
+	
+	Rem
+	bbdoc: Returns the button that triggers effect.
+	End Rem
+	Method GetButton:Short()
+		Return bmx_sdl_haptic_SDLHapticRamp_GetButton(effectPtr)
+	End Method
+	
+	Rem
+	bbdoc: Returns how soon before effect can be triggered again.
+	End Rem
+	Method GetInterval:Short()
+		Return bmx_sdl_haptic_SDLHapticRamp_GetInterval(effectPtr)
+	End Method
+	
+	Rem
+	bbdoc: Returns the duration of the attack (ms).
+	End Rem
+	Method GetAttackLength:Short()
+		Return bmx_sdl_haptic_SDLHapticRamp_GetAttackLength(effectPtr)
+	End Method
+	
+	Rem
+	bbdoc: Returns the level at the start of the attack.
+	End Rem
+	Method GetAttackLevel:Short()
+		Return bmx_sdl_haptic_SDLHapticRamp_GetAttackLevel(effectPtr)
+	End Method
+	
+	Rem
+	bbdoc: Returns the duration of the fade out (ms).
+	End Rem
+	Method GetFadeLength:Short()
+		Return bmx_sdl_haptic_SDLHapticRamp_GetFadeLength(effectPtr)
+	End Method
+	
+	Rem
+	bbdoc: Returns the level at the end of the fade.
+	End Rem
+	Method GetFadeLevel:Short()
+		Return bmx_sdl_haptic_SDLHapticRamp_GetFadeLevel(effectPtr)
+	End Method
+
 	Rem
 	bbdoc: Returns the effect direction.
 	about: This instance is owned by the effect, and any changes will apply only to this effect.
@@ -649,6 +849,7 @@ Type TSDLHapticRamp Extends TSDLHapticEffect
 
 	Rem
 	bbdoc: Sets the duration of the effect.
+	about: This effect does not support a duration of SDL_HAPTIC_INFINITY.
 	End Rem
 	Method SetLength(value:UInt)
 		bmx_sdl_haptic_SDLHapticRamp_SetLength(effectPtr, value)
@@ -764,6 +965,62 @@ Type TSDLHapticCustom Extends TSDLHapticEffect
 		effectPtr = bmx_sdl_haptic_SDLHapticCustom_new()
 	End Method
 
+	Rem
+	bbdoc: Returns the duration of effect (ms).
+	End Rem
+	Method GetLength:UInt()
+		Return bmx_sdl_haptic_SDLHapticCustom_GetLength(effectPtr)
+	End Method
+
+	Rem
+	bbdoc: Returns the delay before starting effect.
+	End Rem
+	Method GetDelay:Short()
+		Return bmx_sdl_haptic_SDLHapticCustom_GetDelay(effectPtr)
+	End Method
+	
+	Rem
+	bbdoc: Returns the button that triggers effect.
+	End Rem
+	Method GetButton:Short()
+		Return bmx_sdl_haptic_SDLHapticCustom_GetButton(effectPtr)
+	End Method
+	
+	Rem
+	bbdoc: Returns how soon before effect can be triggered again.
+	End Rem
+	Method GetInterval:Short()
+		Return bmx_sdl_haptic_SDLHapticCustom_GetInterval(effectPtr)
+	End Method
+	
+	Rem
+	bbdoc: Returns the duration of the attack (ms).
+	End Rem
+	Method GetAttackLength:Short()
+		Return bmx_sdl_haptic_SDLHapticCustom_GetAttackLength(effectPtr)
+	End Method
+	
+	Rem
+	bbdoc: Returns the level at the start of the attack.
+	End Rem
+	Method GetAttackLevel:Short()
+		Return bmx_sdl_haptic_SDLHapticCustom_GetAttackLevel(effectPtr)
+	End Method
+	
+	Rem
+	bbdoc: Returns the duration of the fade out (ms).
+	End Rem
+	Method GetFadeLength:Short()
+		Return bmx_sdl_haptic_SDLHapticCustom_GetFadeLength(effectPtr)
+	End Method
+	
+	Rem
+	bbdoc: Returns the level at the end of the fade.
+	End Rem
+	Method GetFadeLevel:Short()
+		Return bmx_sdl_haptic_SDLHapticCustom_GetFadeLevel(effectPtr)
+	End Method
+
 	Rem
 	bbdoc: Returns the effect direction.
 	about: This instance is owned by the effect, and any changes will apply only to this effect.
@@ -774,6 +1031,7 @@ Type TSDLHapticCustom Extends TSDLHapticEffect
 
 	Rem
 	bbdoc: Sets the duration of the effect.
+	about: You can pass SDL_HAPTIC_INFINITY to length instead of a 0-32767 value.
 	End Rem
 	Method SetLength(value:UInt)
 		bmx_sdl_haptic_SDLHapticCustom_SetLength(effectPtr, value)