aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-03-05 14:34:44 -0800
committerAlon Zakai <alonzakai@gmail.com>2013-03-05 14:34:44 -0800
commit570af9b25d3d60fa9c52ab8ad13ad8eafaf82a2e (patch)
treebb0796f86c47cbcdb10b6d57307ac34fcbe65603
parentdaed1bdade84f5aa3c18d87dbad1858998e5d7c1 (diff)
fix coding convention stuff
-rw-r--r--src/library_sdl.js44
1 files changed, 24 insertions, 20 deletions
diff --git a/src/library_sdl.js b/src/library_sdl.js
index 30735a0b..d707a8bf 100644
--- a/src/library_sdl.js
+++ b/src/library_sdl.js
@@ -1467,35 +1467,40 @@ var LibrarySDL = {
// "Note: Does not check if the channel has been paused."
Mix_Playing: function(id) {
if (id === -1) {
- var count = 0;
- for (var i = 0; i < SDL.audios.length; i++)
- count += SDL.Mix_Playing(i);
- return count;
+ var count = 0;
+ for (var i = 0; i < SDL.audios.length; i++) {
+ count += SDL.Mix_Playing(i);
+ }
+ return count;
}
var info = SDL.audios[id];
- if (info && info.audio && !info.audio.paused)
+ if (info && info.audio && !info.audio.paused) {
return 1;
+ }
return 0;
},
Mix_Pause: function(id) {
if (id === -1) {
- for (var i = 0; i<SDL.audios.length;i++)
- SDL.Mix_Pause(i);
- return;
+ for (var i = 0; i<SDL.audios.length;i++) {
+ SDL.Mix_Pause(i);
+ }
+ return;
}
var info = SDL.audios[id];
- if (info && info.audio)
+ if (info && info.audio) {
info.audio.pause();
+ }
},
// http://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_39.html#SEC39
Mix_Paused: function(id) {
if (id === -1) {
- var pausedCount = 0;
- for (var i = 0; i<SDL.audios.length;i++)
- pausedCount += SDL.Mix_Paused(i);
- return pausedCount;
+ var pausedCount = 0;
+ for (var i = 0; i<SDL.audios.length;i++) {
+ pausedCount += SDL.Mix_Paused(i);
+ }
+ return pausedCount;
}
var info = SDL.audios[id];
if (info && info.audio && info.audio.paused) {
@@ -1510,15 +1515,14 @@ var LibrarySDL = {
// http://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_33.html#SEC33
Mix_Resume: function(id) {
- if (id === -1)
- {
- for (var i = 0; i<SDL.audios.length;i++)
- SDL.Mix_Resume(i);
- return;
+ if (id === -1) {
+ for (var i = 0; i<SDL.audios.length;i++) {
+ SDL.Mix_Resume(i);
+ }
+ return;
}
var info = SDL.audios[id];
- if (info && info.audio)
- {
+ if (info && info.audio) {
info.audio.play();
}
},