diff options
author | Filippos Karapetis | 2010-06-27 21:29:35 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-06-27 21:29:35 +0000 |
commit | 1faebccce25ac422f65ab9616b9a7ecb647894a8 (patch) | |
tree | 01bfa9f14fe235931aae12b34d9009acb8e5b8eb | |
parent | 4a60ff409050e8f3da6065f2a44d78d31c4f34b9 (diff) | |
download | scummvm-rg350-1faebccce25ac422f65ab9616b9a7ecb647894a8.tar.gz scummvm-rg350-1faebccce25ac422f65ab9616b9a7ecb647894a8.tar.bz2 scummvm-rg350-1faebccce25ac422f65ab9616b9a7ecb647894a8.zip |
Cleanup, remove unused/obsolete code
svn-id: r50403
-rw-r--r-- | engines/sci/console.cpp | 8 | ||||
-rw-r--r-- | engines/sci/engine/scriptdebug.cpp | 17 | ||||
-rw-r--r-- | engines/sci/parser/vocabulary.cpp | 53 | ||||
-rw-r--r-- | engines/sci/sound/iterator/core.cpp | 44 | ||||
-rw-r--r-- | engines/sci/sound/iterator/iterator.cpp | 45 |
5 files changed, 0 insertions, 167 deletions
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp index 4bc68fd813..611d1481ad 100644 --- a/engines/sci/console.cpp +++ b/engines/sci/console.cpp @@ -285,14 +285,6 @@ void Console::postEnter() { } } - -#if 0 -// Unused -#define LOOKUP_SPECIES(species) (\ - (species >= 1000) ? species : *(s->_classTable[species].scriptposp) \ - + s->_classTable[species].class_offset) -#endif - bool Console::cmdHelp(int argc, const char **argv) { DebugPrintf("\n"); DebugPrintf("Variables\n"); diff --git a/engines/sci/engine/scriptdebug.cpp b/engines/sci/engine/scriptdebug.cpp index b8a0987865..d730856332 100644 --- a/engines/sci/engine/scriptdebug.cpp +++ b/engines/sci/engine/scriptdebug.cpp @@ -278,23 +278,6 @@ reg_t disassemble(EngineState *s, reg_t pos, int print_bw_tag, int print_bytecod void script_debug(EngineState *s) { - // Do we support a separate console? - -#if 0 - if (sci_debug_flags & _DEBUG_FLAG_LOGGING) { - printf("%d: acc=%04x:%04x ", scriptStepCounter, PRINT_REG(s->r_acc)); - disassemble(s, s->xs->addr.pc, 0, 1); - if (s->seeking == kDebugSeekGlobal) - printf("Global %d (0x%x) = %04x:%04x\n", s->seekSpecial, - s->seekSpecial, PRINT_REG(s->script_000->_localsBlock->_locals[s->seekSpecial])); - } -#endif - -#if 0 - if (!g_debugState.debugging) - return; -#endif - if (g_debugState.seeking && !g_debugState.breakpointWasHit) { // Are we looking for something special? if (g_debugState.seeking == kDebugSeekStepOver) { // are we above seek-level? resume then diff --git a/engines/sci/parser/vocabulary.cpp b/engines/sci/parser/vocabulary.cpp index 00448f5d51..e48a9cdfda 100644 --- a/engines/sci/parser/vocabulary.cpp +++ b/engines/sci/parser/vocabulary.cpp @@ -33,59 +33,6 @@ namespace Sci { -#if 0 - -#define VOCAB_RESOURCE_CLASSES 996 -/** - * Vocabulary class names. - * These strange names were taken from an SCI01 interpreter. - */ -const char *class_names[] = {"", - "", - "conj", // conjunction - "ass", // ? - "pos", // preposition ? - "art", // article - "adj", // adjective - "pron", // pronoun - "noun", // noun - "auxv", // auxillary verb - "adv", // adverb - "verb", // verb - "", - "", - "", - "" - }; - -int *vocab_get_classes(ResourceManager *resMan, int* count) { - Resource* r; - int *c; - unsigned int i; - - if ((r = resMan->findResource(ResourceId(kResourceTypeVocab, VOCAB_RESOURCE_CLASSES), 0)) == NULL) - return 0; - - c = (int *)malloc(sizeof(int) * r->size / 2); - for (i = 2; i < r->size; i += 4) { - c[i/4] = READ_LE_UINT16(r->data + i); - } - *count = r->size / 4; - - return c; -} - -int vocab_get_class_count(ResourceManager *resMan) { - Resource* r; - - if ((r = resMan->findResource(ResourceId(kResourceTypeVocab, VOCAB_RESOURCE_CLASSES), 0)) == 0) - return 0; - - return r->size / 4; -} - -#endif - Vocabulary::Vocabulary(ResourceManager *resMan) : _resMan(resMan) { _parserRules = NULL; _vocabVersion = kVocabularySCI0; diff --git a/engines/sci/sound/iterator/core.cpp b/engines/sci/sound/iterator/core.cpp index e2e62c83b7..9ecd00f54c 100644 --- a/engines/sci/sound/iterator/core.cpp +++ b/engines/sci/sound/iterator/core.cpp @@ -384,50 +384,6 @@ void SfxState::thawTime() { } } -#if 0 -// Unreferenced - removed -static void _dump_playing_list(SfxState *self, char *msg) { - Song *song = self->_song; - - fprintf(stderr, "[] Song list : [ "); - song = *(self->_songlib.lib); - while (song) { - fprintf(stderr, "%08lx:%d ", song->handle, song->_status); - song = song->_nextPlaying; - } - fprintf(stderr, "]\n"); - - fprintf(stderr, "[] Play list (%s) : [ " , msg); - - while (song) { - fprintf(stderr, "%08lx ", song->handle); - song = song->_nextPlaying; - } - - fprintf(stderr, "]\n"); -} -#endif - -#if 0 -static void _dump_songs(SfxState *self) { - Song *song = self->_song; - - fprintf(stderr, "Cue iterators:\n"); - song = *(self->_songlib.lib); - while (song) { - fprintf(stderr, " **\tHandle %08x (p%d): status %d\n", - song->handle, song->_priority, song->_status); - SIMSG_SEND(song->_it, SIMSG_PRINT(1)); - song = song->_next; - } - - if (self->_player) { - fprintf(stderr, "Audio iterator:\n"); - self->_player->iterator_message(SongIterator::Message(0, SIMSG_PRINT(1))); - } -} -#endif - bool SfxState::isPlaying(Song *song) { Song *playing_song = _song; diff --git a/engines/sci/sound/iterator/iterator.cpp b/engines/sci/sound/iterator/iterator.cpp index 5d9d63e5af..62560b631f 100644 --- a/engines/sci/sound/iterator/iterator.cpp +++ b/engines/sci/sound/iterator/iterator.cpp @@ -187,20 +187,6 @@ int BaseSongIterator::parseMidiCommand(byte *buf, int *result, SongIteratorChann midi_channel = cmd & 0xf; paramsleft = MIDI_cmdlen[midi_op]; -#if 0 - if (1) { - fprintf(stderr, "[IT]: off=%x, cmd=%02x, takes %d args ", - channel->offset - 1, cmd, paramsleft); - fprintf(stderr, "[%02x %02x <%02x> %02x %02x %02x]\n", - _data[channel->offset-3], - _data[channel->offset-2], - _data[channel->offset-1], - _data[channel->offset], - _data[channel->offset+1], - _data[channel->offset+2]); - } -#endif - buf[0] = cmd; @@ -285,25 +271,6 @@ int BaseSongIterator::parseMidiCommand(byte *buf, int *result, SongIteratorChann case SCI_MIDI_SET_POLYPHONY: _polyphony[midi_channel] = buf[2]; - -#if 0 - { - Sci1SongIterator *self1 = (Sci1SongIterator *)this; - int i; - int voices = 0; - for (i = 0; i < self1->_numChannels; i++) { - voices += _polyphony[i]; - } - - printf("SET_POLYPHONY(%d, %d) for a total of %d voices\n", midi_channel, buf[2], voices); - printf("[iterator] DEBUG: Polyphony = [ "); - for (i = 0; i < self1->_numChannels; i++) - printf("%d ", _polyphony[i]); - printf("]\n"); - printf("[iterator] DEBUG: Importance = [ "); - printf("]\n"); - } -#endif break; case SCI_MIDI_SET_REVERB: @@ -359,18 +326,6 @@ int BaseSongIterator::parseMidiCommand(byte *buf, int *result, SongIteratorChann return 0; } else { -#if 0 - /* Perform remapping, if neccessary */ - if (cmd != SCI_MIDI_SET_SIGNAL - && cmd < 0xf0) { /* Not a generic command */ - int chan = cmd & 0xf; - int op = cmd & 0xf0; - - chan = channel_remap[chan]; - buf[0] = chan | op; - } -#endif - /* Process as normal MIDI operation */ return 0; } |