暂无描述

sound.h 2.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /****************************************************************************
  2. * Copyright (C) 2015-2016 by the SotS Team *
  3. * *
  4. * This file is part of Sovereign of the Skies. *
  5. * *
  6. * Sovereign of the Skies is free software: you can redistribute it *
  7. * and/or modify it *
  8. * under the terms of the GNU Lesser General Public License as published *
  9. * by the Free Software Foundation, either version 3 of the License, or *
  10. * (at your option) any later version provided you include a copy of the *
  11. * licence and this header. *
  12. * *
  13. * Sovereign of the Skies is distributed in the hope that it will be *
  14. * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of *
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
  16. * GNU Lesser General Public License for more details. *
  17. * *
  18. * You should have received a copy of the GNU Lesser General Public *
  19. * License along with Sovereign of the Skies. *
  20. * If not, see <http://www.gnu.org/licenses/>. *
  21. ****************************************************************************/
  22. /**
  23. * @file callback.h
  24. * @author ipatix
  25. * @date 15 dec 2016
  26. * @brief Manage callbacks and tasks
  27. *
  28. * This header file provides methods to interact with callbacks and
  29. * the task handler. It also defines the superstate structure,
  30. * which contains callback information, sprite pointers, kesypad etc.
  31. */
  32. #ifndef SOUND_H_
  33. #define SOUND_H_
  34. #include "types.h"
  35. typedef struct music_player_area music_player_area;
  36. typedef struct music_player_track music_player_track;
  37. typedef struct song_header song_header;
  38. typedef struct
  39. {
  40. music_player_area *ma;
  41. music_player_track *ta;
  42. u32 tn;
  43. } m_play_table;
  44. typedef struct
  45. {
  46. song_header *so;
  47. u16 ms, me;
  48. } song_table;
  49. extern m_play_table mplay_table[];
  50. extern song_table _songtable[];
  51. void m4aSongNumStart(u16 songid);
  52. void MPlayStart_rev01(music_player_area *ma, song_header *so);
  53. void MPlayContinue(music_player_area *ma);
  54. void MPlayAllStop(void);
  55. // battle and map related stuff
  56. void current_map_music_set(u16);
  57. void current_map_music_set_to_zero(void);
  58. void current_map_music_fadeout(u8);
  59. #endif