From 1152009b343a1d3c65cb78048f9adaf765c86f3c Mon Sep 17 00:00:00 2001
From: "p.kosyh"
Date: Sun, 1 Nov 2009 11:05:36 +0000
Subject: [PATCH] is_music
---
stead/stead.lua | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/stead/stead.lua b/stead/stead.lua
index 548c5ff..a1f1bff 100644
--- a/stead/stead.lua
+++ b/stead/stead.lua
@@ -2002,9 +2002,6 @@ function get_music()
end
function get_music_loop()
- if game._music_loop == nil then
- return -1; -- no counter, but we want get it
- end
return game._music_loop;
end
@@ -2041,6 +2038,10 @@ function stop_music()
set_music(nil, -1);
end
+function is_music()
+ return game._music ~= nil and game._music_loop ~= -1
+end
+
function get_sound()
return game._sound;
end