diff options
author | Filippos Karapetis | 2009-10-16 23:29:00 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-10-16 23:29:00 +0000 |
commit | e4c23834dd2972c75f6f698f9f55320c1784218f (patch) | |
tree | e2c3c97b794b32ee5ee7890a4c07a0c73ce5cd4c /engines/sci/sfx | |
parent | 0479964ad7bc6f59d10638427f3f68406dd0e05c (diff) | |
download | scummvm-rg350-e4c23834dd2972c75f6f698f9f55320c1784218f.tar.gz scummvm-rg350-e4c23834dd2972c75f6f698f9f55320c1784218f.tar.bz2 scummvm-rg350-e4c23834dd2972c75f6f698f9f55320c1784218f.zip |
Moved sci_ffs() inside iterator.cpp, the only place where it's actually used, and removed tools.*. Also, removed all the unused includes to tools.h from several places
svn-id: r45176
Diffstat (limited to 'engines/sci/sfx')
-rw-r--r-- | engines/sci/sfx/core.cpp | 1 | ||||
-rw-r--r-- | engines/sci/sfx/iterator.cpp | 16 | ||||
-rw-r--r-- | engines/sci/sfx/seq/gm.cpp | 1 | ||||
-rw-r--r-- | engines/sci/sfx/seq/instrument-map.h | 1 | ||||
-rw-r--r-- | engines/sci/sfx/seq/sequencers.cpp | 1 | ||||
-rw-r--r-- | engines/sci/sfx/softseq.h | 1 | ||||
-rw-r--r-- | engines/sci/sfx/softseq/adlib.cpp | 1 | ||||
-rw-r--r-- | engines/sci/sfx/softseq/amiga.cpp | 1 | ||||
-rw-r--r-- | engines/sci/sfx/songlib.cpp | 1 |
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" |