round_end_music.inc 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #if defined __round_end_music_included
  2. #endinput
  3. #endif
  4. #define __round_end_music_included
  5. public SharedPlugin __pl_round_end_music = {
  6. name = "round-end-music",
  7. file = "round_end_music.smx",
  8. #if defined REQUIRE_PLUGIN
  9. required = 1,
  10. #else
  11. required = 0,
  12. #endif
  13. };
  14. methodmap MusicEntry < KeyValues {
  15. public MusicEntry() {
  16. return view_as<MusicEntry>(new KeyValues("music_entry"));
  17. }
  18. public void SetFilePath(const char[] filePath) {
  19. this.SetString("filepath", filePath);
  20. }
  21. public void GetFilePath(char[] buffer, int maxlen) {
  22. this.GetString("filepath", buffer, maxlen);
  23. }
  24. public void SetTitle(const char[] title) {
  25. this.SetString("title", title);
  26. }
  27. public void GetTitle(char[] buffer, int maxlen) {
  28. this.GetString("title", buffer, maxlen);
  29. }
  30. public void SetSource(const char[] source) {
  31. this.SetString("source", source);
  32. }
  33. public void GetSource(char[] buffer, int maxlen) {
  34. this.GetString("source", buffer, maxlen);
  35. }
  36. }
  37. typedef OnSongsRequested = function void ();
  38. native void REM_RegisterSource(OnSongsRequested callback);
  39. native bool REM_AddSong(MusicEntry song);