GameBoy (Color) port of the GTA San Andreas arcade game Duality
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.

sound_over.c 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * sound_over.c
  3. * Duality
  4. *
  5. * Copyright (C) 2025 Thomas Buck <thomas@xythobuz.de>
  6. *
  7. * Based on examples from gbdk-2020:
  8. * https://github.com/gbdk-2020/gbdk-2020/blob/develop/gbdk-lib/examples/gb/sound/sound.c
  9. *
  10. * And the docs for the DMG APU:
  11. * https://gbdev.io/pandocs/Audio_Registers.html
  12. *
  13. * This program is free software: you can redistribute it and/or modify
  14. * it under the terms of the GNU General Public License as published by
  15. * the Free Software Foundation, either version 3 of the License, or
  16. * (at your option) any later version.
  17. *
  18. * This program is distributed in the hope that it will be useful,
  19. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  20. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  21. * GNU General Public License for more details.
  22. *
  23. * See <http://www.gnu.org/licenses/>.
  24. */
  25. #include "banks.h"
  26. #include "sound_over.h"
  27. BANKREF(sound_over)
  28. const enum notes over_music[] = {
  29. C3, C3, G3, G3, A3, A3, G3, SILENCE,
  30. F3, F3, E3, E3, D3, D3, C3, SILENCE,
  31. G3, G3, F3, F3, E3, E3, D3, D3,
  32. G3, G3, F3, F3, E3, E3, D3, D3,
  33. C3, C3, G3, G3, A3, A3, G3, SILENCE,
  34. F3, F3, E3, E3, D3, D3, C3, SILENCE,
  35. SILENCE, SILENCE, END
  36. };
  37. const struct music music_over = {
  38. .notes = over_music,
  39. .duration = 200,
  40. };