common.bmx 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. ' Copyright (c) 2014-2022 Bruce A Henderson
  2. '
  3. ' This software is provided 'as-is', without any express or implied
  4. ' warranty. In no event will the authors be held liable for any damages
  5. ' arising from the use of this software.
  6. '
  7. ' Permission is granted to anyone to use this software for any purpose,
  8. ' including commercial applications, and to alter it and redistribute it
  9. ' freely, subject to the following restrictions:
  10. '
  11. ' 1. The origin of this software must not be misrepresented; you must not
  12. ' claim that you wrote the original software. If you use this software
  13. ' in a product, an acknowledgment in the product documentation would be
  14. ' appreciated but is not required.
  15. '
  16. ' 2. Altered source versions must be plainly marked as such, and must not be
  17. ' misrepresented as being the original software.
  18. '
  19. ' 3. This notice may not be removed or altered from any source
  20. ' distribution.
  21. '
  22. SuperStrict
  23. Extern
  24. Function SDL_NumSensors:Int()
  25. Function SDL_SensorGetDeviceType:ESDLSensorType(deviceIndex:Int)
  26. Function SDL_SensorGetDeviceName:Byte Ptr(deviceIndex:Int)
  27. Function SDL_SensorGetDeviceNonPortableType:Int(deviceIndex:Int)
  28. Function SDL_SensorGetDeviceInstanceID:Int(deviceIndex:Int)
  29. Function SDL_SensorOpen:Byte Ptr(deviceIndex:Int)
  30. Function SDL_SensorFromInstanceID:Byte Ptr(instanceId:Int)
  31. Function SDL_SensorGetName:Byte Ptr(handle:Byte Ptr)
  32. Function SDL_SensorGetType:ESDLSensorType(handle:Byte Ptr)
  33. Function SDL_SensorGetNonPortableType:Int(handle:Byte Ptr)
  34. Function SDL_SensorGetInstanceID:Int(handle:Byte Ptr)
  35. Function SDL_SensorGetData:Int(handle:Byte Ptr, data:Float Ptr, numValues:Int)
  36. Function SDL_SensorClose(handle:Byte Ptr)
  37. Function SDL_SensorUpdate()
  38. End Extern
  39. Rem
  40. bbdoc: The different sensors defined by SDL.
  41. End Rem
  42. Enum ESDLSensorType
  43. INVALID = -1
  44. UNKNOWN
  45. ACCEL
  46. GYRO
  47. End Enum
  48. Const SDL_STANDARD_GRAVITY:Float = 9.80665