aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/sfx
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/sfx')
-rw-r--r--engines/sci/sfx/core.cpp1
-rw-r--r--engines/sci/sfx/iterator.cpp16
-rw-r--r--engines/sci/sfx/seq/gm.cpp1
-rw-r--r--engines/sci/sfx/seq/instrument-map.h1
-rw-r--r--engines/sci/sfx/seq/sequencers.cpp1
-rw-r--r--engines/sci/sfx/softseq.h1
-rw-r--r--engines/sci/sfx/softseq/adlib.cpp1
-rw-r--r--engines/sci/sfx/softseq/amiga.cpp1
-rw-r--r--engines/sci/sfx/songlib.cpp1
9 files changed, 15 insertions, 9 deletions
diff --git a/engines/sci/sfx/core.cpp b/engines/sci/sfx/core.cpp
index f985fef7aa..1831ae14fc 100644
--- a/engines/sci/sfx/core.cpp
+++ b/engines/sci/sfx/core.cpp
@@ -25,7 +25,6 @@
/* Sound subsystem core: Event handler, sound player dispatching */
-#include "sci/tools.h"
#include "sci/sci.h"
#include "sci/sfx/core.h"
#include "sci/sfx/iterator.h"
diff --git a/engines/sci/sfx/iterator.cpp b/engines/sci/sfx/iterator.cpp
index 5c458b4200..12f6850e7f 100644
--- a/engines/sci/sfx/iterator.cpp
+++ b/engines/sci/sfx/iterator.cpp
@@ -31,7 +31,6 @@
#include "sci/sfx/iterator_internal.h"
#include "sci/engine/state.h" // for sfx_player_tell_synth :/
#include "sci/sfx/core.h" // for sfx_player_tell_synth
-#include "sci/tools.h"
#include "sound/audiostream.h"
#include "sound/mixer.h"
@@ -46,6 +45,21 @@ static const int MIDI_cmdlen[16] = {0, 0, 0, 0, 0, 0, 0, 0,
/*#define DEBUG_DECODING*/
/*#define DEBUG_VERBOSE*/
+/** Find first set bit in bits and return its index. Returns 0 if bits is 0. */
+static int sci_ffs(int bits) {
+ if (!bits)
+ return 0;
+
+ int retval = 1;
+
+ while (!(bits & 1)) {
+ retval++;
+ bits >>= 1;
+ }
+
+ return retval;
+}
+
static void print_tabs_id(int nr, songit_id_t id) {
while (nr-- > 0)
fprintf(stderr, "\t");
diff --git a/engines/sci/sfx/seq/gm.cpp b/engines/sci/sfx/seq/gm.cpp
index 40f6a602b8..2fe5675150 100644
--- a/engines/sci/sfx/seq/gm.cpp
+++ b/engines/sci/sfx/seq/gm.cpp
@@ -25,7 +25,6 @@
#include "common/util.h"
-#include "sci/tools.h"
#include "sci/sfx/sequencer.h"
#include "sci/sfx/device.h"
#include "sci/sfx/seq/instrument-map.h"
diff --git a/engines/sci/sfx/seq/instrument-map.h b/engines/sci/sfx/seq/instrument-map.h
index c223e68a33..1e8a63076b 100644
--- a/engines/sci/sfx/seq/instrument-map.h
+++ b/engines/sci/sfx/seq/instrument-map.h
@@ -28,7 +28,6 @@
#ifndef SCI_SFX_SEQ_INSTRUMENT_MAP_H
#define SCI_SFX_SEQ_INSTRUMENT_MAP_H
-#include "sci/tools.h"
#include "sci/sfx/device.h"
namespace Sci {
diff --git a/engines/sci/sfx/seq/sequencers.cpp b/engines/sci/sfx/seq/sequencers.cpp
index 1a0cd68c2d..98dde97652 100644
--- a/engines/sci/sfx/seq/sequencers.cpp
+++ b/engines/sci/sfx/seq/sequencers.cpp
@@ -24,7 +24,6 @@
*/
#include "../sequencer.h"
-#include "sci/tools.h"
namespace Sci {
diff --git a/engines/sci/sfx/softseq.h b/engines/sci/sfx/softseq.h
index 32ad98f4b9..31741785ae 100644
--- a/engines/sci/sfx/softseq.h
+++ b/engines/sci/sfx/softseq.h
@@ -29,7 +29,6 @@
#include "common/error.h"
#include "sci/sfx/sfx_pcm.h"
#include "sci/sfx/sequencer.h"
-#include "sci/tools.h"
namespace Sci {
diff --git a/engines/sci/sfx/softseq/adlib.cpp b/engines/sci/sfx/softseq/adlib.cpp
index 7343ba1237..15e1ed9089 100644
--- a/engines/sci/sfx/softseq/adlib.cpp
+++ b/engines/sci/sfx/softseq/adlib.cpp
@@ -24,7 +24,6 @@
*/
#include "sci/sci.h"
-#include "sci/tools.h"
#include "sci/sfx/iterator.h"
#include "sound/fmopl.h"
diff --git a/engines/sci/sfx/softseq/amiga.cpp b/engines/sci/sfx/softseq/amiga.cpp
index ff4057be3a..6094201169 100644
--- a/engines/sci/sfx/softseq/amiga.cpp
+++ b/engines/sci/sfx/softseq/amiga.cpp
@@ -23,7 +23,6 @@
*
*/
-#include "sci/tools.h"
#include "sci/sfx/softseq.h"
#include "common/file.h"
diff --git a/engines/sci/sfx/songlib.cpp b/engines/sci/sfx/songlib.cpp
index 0fe6440e7a..7cf26ff453 100644
--- a/engines/sci/sfx/songlib.cpp
+++ b/engines/sci/sfx/songlib.cpp
@@ -23,7 +23,6 @@
*
*/
-#include "sci/tools.h"
#include "sci/sfx/core.h"
#include "sci/sfx/iterator.h"