diff options
author | Travis Howell | 2006-08-27 05:02:48 +0000 |
---|---|---|
committer | Travis Howell | 2006-08-27 05:02:48 +0000 |
commit | 57bdecb4c6dc6f35a69120201e0b0f2654ac4c65 (patch) | |
tree | c58f07364ae5ba3aa6b5a36d5c7b12eac3684752 /engines/simon/midiparser_s1d.cpp | |
parent | b964c889ed96fede5137fb065ef607126ca1d90a (diff) | |
download | scummvm-rg350-57bdecb4c6dc6f35a69120201e0b0f2654ac4c65.tar.gz scummvm-rg350-57bdecb4c6dc6f35a69120201e0b0f2654ac4c65.tar.bz2 scummvm-rg350-57bdecb4c6dc6f35a69120201e0b0f2654ac4c65.zip |
Update error messages and always report an error if data file load fails
svn-id: r23772
Diffstat (limited to 'engines/simon/midiparser_s1d.cpp')
-rw-r--r-- | engines/simon/midiparser_s1d.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/engines/simon/midiparser_s1d.cpp b/engines/simon/midiparser_s1d.cpp index 95a8431a6a..92e4146a9b 100644 --- a/engines/simon/midiparser_s1d.cpp +++ b/engines/simon/midiparser_s1d.cpp @@ -115,9 +115,7 @@ void MidiParser_S1D::parseNextEvent(EventInfo &info) { // OTherwise fall through to default. default: - printf ("MidiParser_S1D: Warning! Unexpected byte 0x%02X found!\n", (int) info.event); - _abort_parse = true; - _position._play_pos = 0; + error("MidiParser_S1D: Unexpected byte 0x%02X found!\n", (int) info.event); } } @@ -125,10 +123,8 @@ bool MidiParser_S1D::loadMusic(byte *data, uint32 size) { unloadMusic(); byte *pos = data; - if (*(pos++) != 0xFC) { - printf ("Warning: Expected 0xFC header but found 0x%02X instead\n", (int) *pos); - return false; - } + if (*(pos++) != 0xFC) + error("Expected 0xFC header but found 0x%02X instead\n", (int) *pos); // The next 3 bytes MIGHT be tempo, but we skip them and use the default. // setTempo (*(pos++) | (*(pos++) << 8) | (*(pos++) << 16)); |