[Scummvm-cvs-logs] SF.net SVN: scummvm:[46192] scummvm/trunk/engines/sci/sfx
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Sun Nov 29 14:08:44 CET 2009
Revision: 46192
http://scummvm.svn.sourceforge.net/scummvm/?rev=46192&view=rev
Author: thebluegr
Date: 2009-11-29 13:08:40 +0000 (Sun, 29 Nov 2009)
Log Message:
-----------
Removed unused code
Modified Paths:
--------------
scummvm/trunk/engines/sci/sfx/iterator.cpp
scummvm/trunk/engines/sci/sfx/iterator_internal.h
Modified: scummvm/trunk/engines/sci/sfx/iterator.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/iterator.cpp 2009-11-29 12:24:29 UTC (rev 46191)
+++ scummvm/trunk/engines/sci/sfx/iterator.cpp 2009-11-29 13:08:40 UTC (rev 46192)
@@ -126,7 +126,6 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
_loops = 0;
_hold = 0;
memset(_polyphony, 0, sizeof(_polyphony));
- memset(_importance, 0, sizeof(_importance));
}
Sci1SongIterator::~Sci1SongIterator() {
Modified: scummvm/trunk/engines/sci/sfx/iterator_internal.h
===================================================================
--- scummvm/trunk/engines/sci/sfx/iterator_internal.h 2009-11-29 12:24:29 UTC (rev 46191)
+++ scummvm/trunk/engines/sci/sfx/iterator_internal.h 2009-11-29 13:08:40 UTC (rev 46192)
@@ -65,12 +65,10 @@
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,9 +79,7 @@
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?
int _deviceId; ///< ID of the device we generating events for
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list