From b4ac4988cca41c2a59e4de99b8fe5392372e21dd Mon Sep 17 00:00:00 2001 From: Littleboy Date: Tue, 28 Jun 2011 22:54:51 -0400 Subject: LASTEXPRESS: Cleanup comments --- engines/lastexpress/data/animation.cpp | 12 ++++++------ engines/lastexpress/data/background.cpp | 2 +- engines/lastexpress/data/font.cpp | 8 ++++---- engines/lastexpress/data/scene.cpp | 8 ++++---- engines/lastexpress/data/sequence.cpp | 14 +++++++------- engines/lastexpress/data/snd.cpp | 4 ++-- engines/lastexpress/data/subtitle.cpp | 4 ++-- 7 files changed, 26 insertions(+), 26 deletions(-) (limited to 'engines/lastexpress/data') diff --git a/engines/lastexpress/data/animation.cpp b/engines/lastexpress/data/animation.cpp index 1cbf7672d1..28d30ec7d1 100644 --- a/engines/lastexpress/data/animation.cpp +++ b/engines/lastexpress/data/animation.cpp @@ -77,7 +77,7 @@ bool Animation::load(Common::SeekableReadStream *stream, int flag) { // Check if there is enough data if (_stream->size() - _stream->pos() < (signed)(numChunks * sizeof(Chunk))) { - debugC(2, kLastExpressDebugGraphics, "NIS file seems to be corrupted!"); + debugC(2, kLastExpressDebugGraphics, "NIS file seems to be corrupted"); return false; } @@ -101,10 +101,10 @@ bool Animation::load(Common::SeekableReadStream *stream, int flag) { bool Animation::process() { if (!_currentChunk) - error("Animation::process - internal error: the current chunk iterator is invalid!"); + error("[Animation::process] Current chunk iterator is invalid"); if (_stream == NULL || _chunks.size() == 0) - error("Trying to show an animation before loading data"); + error("[Animation::process] Trying to show an animation before loading data"); // TODO: - subtract the time paused by the GUI // - Re-implement to be closer to the original engine @@ -191,7 +191,7 @@ bool Animation::process() { break; default: - error(" UNKNOWN chunk type=%x frame=%d size=%d", _currentChunk->type, _currentChunk->frame, _currentChunk->size); + error("[Animation::process] UNKNOWN chunk type=%x frame=%d size=%d", _currentChunk->type, _currentChunk->frame, _currentChunk->size); break; } _currentChunk++; @@ -206,7 +206,7 @@ bool Animation::hasEnded() { Common::Rect Animation::draw(Graphics::Surface *surface) { if (!_overlay) - error("Animation::draw - internal error: the current overlay animation frame is invalid!"); + error("[Animation::draw] Current overlay animation frame is invalid"); // Paint the background if (_backgroundCurrent == 1 && _background1) @@ -242,7 +242,7 @@ AnimFrame *Animation::processChunkFrame(Common::SeekableReadStream *in, const Ch void Animation::processChunkAudio(Common::SeekableReadStream *in, const Chunk &c) { if (!_audio) - error("Animation::processChunkAudio - internal error: the audio stream is invalid!"); + error("[Animation::processChunkAudio] Audio stream is invalid"); // Skip the Snd header, to queue just the audio blocks uint32 size = c.size; diff --git a/engines/lastexpress/data/background.cpp b/engines/lastexpress/data/background.cpp index de6fd7eeae..3d866c26f9 100644 --- a/engines/lastexpress/data/background.cpp +++ b/engines/lastexpress/data/background.cpp @@ -85,7 +85,7 @@ bool Background::load(Common::SeekableReadStream *stream) { Common::Rect Background::draw(Graphics::Surface *surface) { if (!_data) { - debugC(2, kLastExpressDebugGraphics, "Trying to show a background before loading data!"); + debugC(2, kLastExpressDebugGraphics, "Trying to show a background before loading data"); return Common::Rect(); } diff --git a/engines/lastexpress/data/font.cpp b/engines/lastexpress/data/font.cpp index 9a60b88a25..79cf64e617 100644 --- a/engines/lastexpress/data/font.cpp +++ b/engines/lastexpress/data/font.cpp @@ -89,17 +89,17 @@ bool Font::load(Common::SeekableReadStream *stream) { uint16 Font::getCharGlyph(uint16 c) const { //warning("%c", c); if (c >= 0x200) - error("Express::Font: Invalid character %d", c); + error("[Font::getCharGlyph] Invalid character %d", c); return _charMap[c]; } byte *Font::getGlyphImg(uint16 g) { if (!_glyphs) - error("Express::getGlyphImg: Invalid glyphs!"); + error("[Font::getGlyphImg] Invalid glyphs"); if (g >= _numGlyphs) - error("Express::getGlyphImg: Invalid glyph %d (%d available)", g, _numGlyphs); + error("[Font::getGlyphImg] Invalid glyph %d (%d available)", g, _numGlyphs); return _glyphs + g * 18 * 8; } @@ -140,7 +140,7 @@ uint8 Font::getCharWidth(uint16 c) const{ return 10; } else { if (!_glyphWidths) - error("Express::getCharWidth: Invalid glyphs widths!"); + error("[Font::getCharWidth] Invalid glyphs widths"); return _glyphWidths[getCharGlyph(c)]; } diff --git a/engines/lastexpress/data/scene.cpp b/engines/lastexpress/data/scene.cpp index 2ec8e6935d..8f279ffbb3 100644 --- a/engines/lastexpress/data/scene.cpp +++ b/engines/lastexpress/data/scene.cpp @@ -187,10 +187,10 @@ bool Scene::checkHotSpot(const Common::Point &coord, SceneHotspot **hotspot) { SceneHotspot *Scene::getHotspot(uint index) { if (_hotspots.empty()) - error("Scene::getHotspot: scene does not have any hotspots!"); + error("[Scene::getHotspot] Scene does not have any hotspots"); if (index >= _hotspots.size()) - error("Scene::getHotspot: invalid index (was: %d, max: %d)", index, _hotspots.size() - 1); + error("[Scene::getHotspot] Invalid index (was: %d, max: %d)", index, _hotspots.size() - 1); return _hotspots[index]; } @@ -202,7 +202,7 @@ Common::Rect Scene::draw(Graphics::Surface *surface) { Common::String sceneName(_name); sceneName.trim(); if (sceneName.empty()) - error("Scene::draw: This scene is not a valid drawing scene!"); + error("[Scene::draw] This scene is not a valid drawing scene"); // Load background Background *background = ((LastExpressEngine *)g_engine)->getResourceManager()->loadBackground(sceneName); @@ -260,7 +260,7 @@ bool SceneLoader::load(Common::SeekableReadStream *stream) { // Read the default scene to get the total number of scenes Scene *header = Scene::load(_stream); if (!header) - error("SceneLoader::load: Invalid data file!"); + error("[SceneLoader::load] Invalid data file"); debugC(2, kLastExpressDebugScenes, " found %d entries", header->entityPosition); /* Header entityPosition is the scene count */ diff --git a/engines/lastexpress/data/sequence.cpp b/engines/lastexpress/data/sequence.cpp index a27c27de2e..a62348f6c0 100644 --- a/engines/lastexpress/data/sequence.cpp +++ b/engines/lastexpress/data/sequence.cpp @@ -115,7 +115,7 @@ AnimFrame::AnimFrame(Common::SeekableReadStream *in, const FrameInfo &f) : _pale decompFF(in, f); break; default: - error("Unknown frame compression: %d", f.compressionType); + error("[AnimFrame::AnimFrame] Unknown frame compression: %d", f.compressionType); } readPalette(in, f); @@ -379,11 +379,11 @@ bool Sequence::load(Common::SeekableReadStream *stream, byte field30) { // Move stream to start of frame _stream->seek((int32)(_sequenceHeaderSize + i * _sequenceFrameSize), SEEK_SET); if (_stream->eos()) - error("Couldn't seek to the current frame data"); + error("[Sequence::load] Couldn't seek to the current frame data"); // Check if there is enough data if ((unsigned)(_stream->size() - _stream->pos()) < _sequenceFrameSize) - error("The sequence frame does not have a valid header"); + error("[Sequence::load] The sequence frame does not have a valid header"); FrameInfo info; info.read(_stream, true); @@ -397,10 +397,10 @@ bool Sequence::load(Common::SeekableReadStream *stream, byte field30) { FrameInfo *Sequence::getFrameInfo(uint16 index) { if (_frames.size() == 0) - error("Trying to decode a sequence before loading its data"); + error("[Sequence::getFrameInfo] Trying to decode a sequence before loading its data"); if (index > _frames.size() - 1) - error("Invalid sequence frame requested: %d, max %d", index, _frames.size() - 1); + error("[Sequence::getFrameInfo] Invalid sequence frame requested: %d, max %d", index, _frames.size() - 1); return &_frames[index]; } @@ -463,14 +463,14 @@ bool SequenceFrame::nextFrame() { FrameInfo *SequenceFrame::getInfo() { if (!_sequence) - error("SequenceFrame::getFrameInfo: Invalid sequence!"); + error("[SequenceFrame::getInfo] Invalid sequence"); return _sequence->getFrameInfo(_frame); } Common::String SequenceFrame::getName() { if (!_sequence) - error("SequenceFrame::getName: Invalid sequence!"); + error("[SequenceFrame::getName] Invalid sequence"); return _sequence->getName(); } diff --git a/engines/lastexpress/data/snd.cpp b/engines/lastexpress/data/snd.cpp index 3ffe3ca14b..d92ebbc5e3 100644 --- a/engines/lastexpress/data/snd.cpp +++ b/engines/lastexpress/data/snd.cpp @@ -152,7 +152,7 @@ void AppendableSound::queueBuffer(const byte *data, uint32 size) { void AppendableSound::queueBuffer(Common::SeekableReadStream *bufferIn) { if (!_as) - error("AppendableSound::queueBuffer - internal error: the audio stream is invalid!"); + error("[AppendableSound::queueBuffer] Audio stream is invalid"); // Setup the ADPCM decoder uint32 sizeIn = (uint32)bufferIn->size(); @@ -164,7 +164,7 @@ void AppendableSound::queueBuffer(Common::SeekableReadStream *bufferIn) { void AppendableSound::finish() { if (!_as) - error("AppendableSound::queueBuffer - internal error: the audio stream is invalid!"); + error("[AppendableSound::finish] Audio stream is invalid"); if (!_finished) _as->finish(); diff --git a/engines/lastexpress/data/subtitle.cpp b/engines/lastexpress/data/subtitle.cpp index c3a7397b66..0be832cbdd 100644 --- a/engines/lastexpress/data/subtitle.cpp +++ b/engines/lastexpress/data/subtitle.cpp @@ -168,13 +168,13 @@ bool SubtitleManager::load(Common::SeekableReadStream *stream) { // Read header to get the number of subtitles uint32 numSubtitles = stream->readUint16LE(); if (stream->eos()) - error("Cannot read from subtitle file"); + error("[SubtitleManager::load] Cannot read from subtitle file"); debugC(3, kLastExpressDebugSubtitle, "Number of subtitles in file: %d", numSubtitles); // TODO: Check that stream contain enough data //if (stream->size() < (signed)(numSubtitles * sizeof(SubtitleData))) { - //debugC(2, kLastExpressDebugSubtitle, "Subtitle file does not contain valid data!"); + //debugC(2, kLastExpressDebugSubtitle, "Subtitle file does not contain valid data"); //return false; //} -- cgit v1.2.3