Cleanup, remove unused/obsolete code

svn-id: r50403
This commit is contained in:
Filippos Karapetis 2010-06-27 21:29:35 +00:00
parent 4a60ff4090
commit 1faebccce2
5 changed files with 0 additions and 167 deletions

View file

@ -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) { bool Console::cmdHelp(int argc, const char **argv) {
DebugPrintf("\n"); DebugPrintf("\n");
DebugPrintf("Variables\n"); DebugPrintf("Variables\n");

View file

@ -278,23 +278,6 @@ reg_t disassemble(EngineState *s, reg_t pos, int print_bw_tag, int print_bytecod
void script_debug(EngineState *s) { 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 && !g_debugState.breakpointWasHit) { // Are we looking for something special?
if (g_debugState.seeking == kDebugSeekStepOver) { if (g_debugState.seeking == kDebugSeekStepOver) {
// are we above seek-level? resume then // are we above seek-level? resume then

View file

@ -33,59 +33,6 @@
namespace Sci { 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) { Vocabulary::Vocabulary(ResourceManager *resMan) : _resMan(resMan) {
_parserRules = NULL; _parserRules = NULL;
_vocabVersion = kVocabularySCI0; _vocabVersion = kVocabularySCI0;

View file

@ -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) { bool SfxState::isPlaying(Song *song) {
Song *playing_song = _song; Song *playing_song = _song;

View file

@ -187,20 +187,6 @@ int BaseSongIterator::parseMidiCommand(byte *buf, int *result, SongIteratorChann
midi_channel = cmd & 0xf; midi_channel = cmd & 0xf;
paramsleft = MIDI_cmdlen[midi_op]; 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; buf[0] = cmd;
@ -285,25 +271,6 @@ int BaseSongIterator::parseMidiCommand(byte *buf, int *result, SongIteratorChann
case SCI_MIDI_SET_POLYPHONY: case SCI_MIDI_SET_POLYPHONY:
_polyphony[midi_channel] = buf[2]; _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; break;
case SCI_MIDI_SET_REVERB: case SCI_MIDI_SET_REVERB:
@ -359,18 +326,6 @@ int BaseSongIterator::parseMidiCommand(byte *buf, int *result, SongIteratorChann
return 0; return 0;
} else { } 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 */ /* Process as normal MIDI operation */
return 0; return 0;
} }