aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/sfx
diff options
context:
space:
mode:
authorFilippos Karapetis2009-11-29 13:08:40 +0000
committerFilippos Karapetis2009-11-29 13:08:40 +0000
commit64d76a9e5ab1cff905d5a8275ac0a0c28079e538 (patch)
tree6bd146bc469525d019755853cb8d40e0df867dcb /engines/sci/sfx
parentad620b5148575ab02c58953c6da9eedc9ab8b17e (diff)
downloadscummvm-rg350-64d76a9e5ab1cff905d5a8275ac0a0c28079e538.tar.gz
scummvm-rg350-64d76a9e5ab1cff905d5a8275ac0a0c28079e538.tar.bz2
scummvm-rg350-64d76a9e5ab1cff905d5a8275ac0a0c28079e538.zip
Removed unused code
svn-id: r46192
Diffstat (limited to 'engines/sci/sfx')
-rw-r--r--engines/sci/sfx/iterator.cpp26
-rw-r--r--engines/sci/sfx/iterator_internal.h4
2 files changed, 2 insertions, 28 deletions
diff --git a/engines/sci/sfx/iterator.cpp b/engines/sci/sfx/iterator.cpp
index db43b86a9a..8c34212f44 100644
--- a/engines/sci/sfx/iterator.cpp
+++ b/engines/sci/sfx/iterator.cpp
@@ -126,7 +126,6 @@ static int _sci0_get_pcm_data(Sci0SongIterator *self, int *rate, int *xoffset, u
void SongIteratorChannel::init(int id_, int offset_, int end_) {
playmask = PLAYMASK_NONE; /* Disable all channels */
id = id_;
- notes_played = 0;
state = SI_STATE_DELTA_TIME;
loop_timepos = 0;
total_timepos = 0;
@@ -134,12 +133,8 @@ void SongIteratorChannel::init(int id_, int offset_, int end_) {
delay = 0; /* Only used for more than one channel */
last_cmd = 0xfe;
- offset
- = loop_offset
- = initial_offset
- = offset_;
+ offset = loop_offset = initial_offset = offset_;
end = end_;
- saw_notes = 0;
}
void SongIteratorChannel::resetSynthChannels() {
@@ -188,7 +183,6 @@ int BaseSongIterator::parseMidiCommand(byte *buf, int *result, SongIteratorChann
midi_op = cmd >> 4;
midi_channel = cmd & 0xf;
paramsleft = MIDI_cmdlen[midi_op];
- channel->saw_notes |= 1 << midi_channel;
#if 0
if (1) {
@@ -232,8 +226,7 @@ int BaseSongIterator::parseMidiCommand(byte *buf, int *result, SongIteratorChann
if (cmd == SCI_MIDI_EOT) {
/* End of track? */
channel->resetSynthChannels();
- /* fprintf(stderr, "eot; loops = %d, notesplayed=%d\n", loops, channel->notes_played);*/
- if (_loops > 1 /* && channel->notes_played*/) {
+ if (_loops > 1) {
/* If allowed, decrement the number of loops */
if (!(flags & PARSE_FLAG_LOOPS_UNLIMITED))
*result = --_loops;
@@ -248,7 +241,6 @@ int BaseSongIterator::parseMidiCommand(byte *buf, int *result, SongIteratorChann
channel->offset, channel->loop_offset);
#endif
channel->offset = channel->loop_offset;
- channel->notes_played = 0;
channel->state = SI_STATE_DELTA_TIME;
channel->total_timepos = channel->loop_timepos;
channel->last_cmd = 0xfe;
@@ -256,12 +248,6 @@ int BaseSongIterator::parseMidiCommand(byte *buf, int *result, SongIteratorChann
return SI_LOOP;
} else {
channel->state = SI_STATE_FINISHED;
-#ifdef DEBUG_DECODING
- fprintf(stderr, "%s L%d: (%p):%d EOT because"
- " %d notes, %d loops\n",
- __FILE__, __LINE__, this, channel->id,
- channel->notes_played, _loops);
-#endif
return SI_FINISHED;
}
@@ -312,8 +298,6 @@ int BaseSongIterator::parseMidiCommand(byte *buf, int *result, SongIteratorChann
printf("%d ", _polyphony[i]);
printf("]\n");
printf("[iterator] DEBUG: Importance = [ ");
- for (i = 0; i < self1->_numChannels; i++)
- printf("%d ", _importance[i]);
printf("]\n");
}
#endif
@@ -332,7 +316,6 @@ int BaseSongIterator::parseMidiCommand(byte *buf, int *result, SongIteratorChann
if (buf[2] == self1->_hold) {
channel->offset = channel->initial_offset;
- channel->notes_played = 0;
channel->state = SI_STATE_COMMAND;
channel->total_timepos = 0;
@@ -373,9 +356,6 @@ int BaseSongIterator::parseMidiCommand(byte *buf, int *result, SongIteratorChann
return 0;
} else {
- if ((cmd & 0xf0) == 0x90) /* note on? */
- channel->notes_played++;
-
#if 0
/* Perform remapping, if neccessary */
if (cmd != SCI_MIDI_SET_SIGNAL
@@ -806,7 +786,6 @@ int Sci1SongIterator::initSong() {
channel.resetSynthChannels();
_polyphony[_numChannels - 1] = _data[channel.offset - 1] & 15;
- _importance[_numChannels - 1] = _data[channel.offset - 1] >> 4;
channel.playmask = ~0; /* Enable all */
channel_mask |= (1 << channel_nr);
@@ -1123,7 +1102,6 @@ void Sci1SongIterator::init() {
_loops = 0;
_hold = 0;
memset(_polyphony, 0, sizeof(_polyphony));
- memset(_importance, 0, sizeof(_importance));
}
Sci1SongIterator::~Sci1SongIterator() {
diff --git a/engines/sci/sfx/iterator_internal.h b/engines/sci/sfx/iterator_internal.h
index d465fb90f7..54920ba17a 100644
--- a/engines/sci/sfx/iterator_internal.h
+++ b/engines/sci/sfx/iterator_internal.h
@@ -65,12 +65,10 @@ struct SongIteratorChannel {
int initial_offset;
int playmask; ///< Active playmask (MIDI channels to play in here) */
- int notes_played; ///< #of notes played since the last loop start */
int loop_timepos; ///< Total delay for this channel's loop marker */
int total_timepos; ///< Number of ticks since the beginning, ignoring loops */
int timepos_increment; ///< Number of ticks until the next command (to add) */
- int saw_notes; ///< Bitmask of channels we have currently played notes on */
byte last_cmd; ///< Last operation executed, for running status */
public:
@@ -81,8 +79,6 @@ public:
class BaseSongIterator : public SongIterator {
public:
int _polyphony[MIDI_CHANNELS]; ///< # of simultaneous notes on each
- int _importance[MIDI_CHANNELS]; ///< priority rating for each channel, 0 means unrated.
-
int _ccc; ///< Cumulative cue counter, for those who need it
byte _resetflag; ///< for 0x4C -- on DoSound StopSound, do we return to start?