Linux x86_64 implementation of libglitch : https://github.com/erlehmann/libglitch.git
x86-64
nasm
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

sdl.asm 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. EXTERN SDL_Init
  2. Extern SDL_Quit
  3. Extern SDL_SetVideoMode
  4. Extern SDL_Delay
  5. Extern SDL_OpenAudio
  6. Extern SDL_PauseAudio
  7. Extern SDL_WaitEvent
  8. Extern SDL_GetError
  9. %ifdef SDL1
  10. %define SDL_QUIT 0x0C
  11. %endif
  12. %ifdef SDL2
  13. %define SDL_QUIT 0x100
  14. %define SDL_AUDIODEVICEADDED 0x1100
  15. %endif
  16. %define SDL_SWSURFACE 0
  17. %define AUDIO_U8 0x0008 ; Unsigned 8-bit samples
  18. %define AUDIO_S8 0x8008 ; Signed 8-bit samples
  19. %define AUDIO_U16LSB 0x0010 ; Unsigned 16-bit samples
  20. %define AUDIO_S16LSB 0x8010 ; Signed 16-bit samples
  21. %define AUDIO_U16MSB 0x1010 ; As above, but big-endian byte order
  22. %define AUDIO_S16MSB 0x9010 ; As above, but big-endian byte order
  23. %define AUDIO_U16 AUDIO_U16LSB
  24. %define AUDIO_S16 AUDIO_S16LSB
  25. STRUC SDL_AudioSpec_STRUC
  26. .freq: resw 1
  27. .format: resw 1
  28. .channels: resb 1
  29. .silence: resb 1
  30. .samples: resw 1
  31. .size: resw 1
  32. .callback: resq 1
  33. .userdata: resq 1
  34. ENDSTRUC
  35. %macro def_SDL_AudioSpec 1
  36. %define %1.freq %1+SDL_AudioSpec_STRUC.freq
  37. %define %1.format %1+SDL_AudioSpec_STRUC.format
  38. %define %1.channels %1+SDL_AudioSpec_STRUC.channels
  39. %define %1.silence %1+SDL_AudioSpec_STRUC.silence
  40. %define %1.samples %1+SDL_AudioSpec_STRUC.samples
  41. %define %1.size %1+SDL_AudioSpec_STRUC.size
  42. %define %1.callback %1+SDL_AudioSpec_STRUC.callback
  43. %define %1.userdata %1+SDL_AudioSpec_STRUC.userdata
  44. %1:
  45. ISTRUC SDL_AudioSpec_STRUC
  46. %endmacro