diff options
-rw-r--r-- | engines/voyeur/animation.cpp | 4 | ||||
-rw-r--r-- | engines/voyeur/events.cpp | 3 | ||||
-rw-r--r-- | engines/voyeur/files.cpp | 20 | ||||
-rw-r--r-- | engines/voyeur/files.h | 18 | ||||
-rw-r--r-- | engines/voyeur/files_threads.cpp | 1 | ||||
-rw-r--r-- | engines/voyeur/graphics.cpp | 12 | ||||
-rw-r--r-- | engines/voyeur/graphics.h | 4 | ||||
-rw-r--r-- | engines/voyeur/sound.cpp | 9 | ||||
-rw-r--r-- | engines/voyeur/sound.h | 5 | ||||
-rw-r--r-- | engines/voyeur/voyeur.cpp | 2 |
10 files changed, 28 insertions, 50 deletions
diff --git a/engines/voyeur/animation.cpp b/engines/voyeur/animation.cpp index f1126e50bb..855536bea1 100644 --- a/engines/voyeur/animation.cpp +++ b/engines/voyeur/animation.cpp @@ -146,10 +146,6 @@ void RL2Decoder::readNextPacket() { } bool RL2Decoder::seek(const Audio::Timestamp &where) { - // TODO: Ideally, I need a way to clear the audio track's QueuingAudioStream when - // a seek is done. Otherwise, as current, seeking can only be done correctly when - // the video is first loaded. - _soundFrameNumber = -1; return VideoDecoder::seek(where); } diff --git a/engines/voyeur/events.cpp b/engines/voyeur/events.cpp index 9904c9ecc8..c0f0eb5c68 100644 --- a/engines/voyeur/events.cpp +++ b/engines/voyeur/events.cpp @@ -458,8 +458,6 @@ void EventsManager::vDoCycleInt() { byte g = pPal[start * 3 + 1]; byte b = pPal[start * 3 + 2]; - // Move the remainder of the range backwards one entry - // TODO: Is this allowing for overlap properly? Common::copy(&pPal[start * 3 + 3], &pPal[end * 3 + 3], &pPal[start * 3]); // Place the original saved entry at the end of the range @@ -483,7 +481,6 @@ void EventsManager::vDoCycleInt() { byte b = pPal[end * 3 + 2]; // Move the remainder of the range forwards one entry - // TODO: Does this allow for overlap range correctly? Common::copy_backward(&pPal[start * 3], &pPal[end * 3], &pPal[end * 3 + 3]); // Place the original saved entry at the end of the range diff --git a/engines/voyeur/files.cpp b/engines/voyeur/files.cpp index 05e3fee74f..ce2ebc5985 100644 --- a/engines/voyeur/files.cpp +++ b/engines/voyeur/files.cpp @@ -276,8 +276,6 @@ BoltGroup *BoltFile::getBoltGroup(uint16 id, bool process) { } void BoltFile::freeBoltGroup(uint16 id, bool freeEntries) { - // TODO: I currently ignore freeEntries flag, in favour of always - // freeing. Need to check whether this can really ever be false. _state._curLibPtr = this; _state._curGroupPtr = &_groups[(id >> 8) & 0xff]; @@ -286,8 +284,7 @@ void BoltFile::freeBoltGroup(uint16 id, bool freeEntries) { } void BoltFile::freeBoltMember(uint32 id) { - // TODO: Determine whether this is needed, given all group entries are automatically loaded -// warning("TODO: BoltFile::freeBoltMember"); + // No implementation in ScummVM } BoltEntry &BoltFile::getBoltEntryFromLong(uint32 id) { @@ -412,9 +409,7 @@ byte *BoltFile::getBoltMember(uint32 id) { _state._encrypt = (_state._curMemberPtr->_mode & 0x10) != 0; if (_state._curGroupPtr->_processed) { - // TODO: Figure out weird access type. Uncompressed read perhaps? - //int fileDiff = _state._curGroupPtr->_fileOffset - _state._curMemberPtr->_fileOffset; - error("TODO: processed bolt flag"); + error("Processed resources are not supported"); } else { _state._bufStart = _state._decompressBuf; _state._bufSize = DECOMPRESS_SIZE; @@ -618,7 +613,7 @@ BoltGroup::BoltGroup(Common::SeekableReadStream *f): _file(f) { _processed = buffer[0] != 0; _callInitGro = buffer[1] != 0; _termGroIndex = buffer[2]; - _count = buffer[3] ? buffer[3] : 256; // TODO: Added this in. Check it's okay + _count = buffer[3] ? buffer[3] : 256; _fileOffset = READ_LE_UINT32(&buffer[8]); } @@ -665,7 +660,7 @@ BoltEntry::BoltEntry(Common::SeekableReadStream *f, uint16 id): _file(f), _id(id _mode = buffer[0]; _field1 = buffer[1]; _initMethod = buffer[3]; - _xorMask = buffer[4] & 0xff; // TODO: Is this right?? + _xorMask = buffer[4] & 0xff; _size = READ_LE_UINT32(&buffer[4]) & 0xffffff; _fileOffset = READ_LE_UINT32(&buffer[8]); } @@ -685,8 +680,7 @@ BoltEntry::~BoltEntry() { } void BoltEntry::load() { - // TODO: Currently, all entry loading and decompression is done in BoltFile::memberAddr. - // Ideally, a lot of the code should be moved here + // Currently, all entry loading and decompression is done in BoltFile::memberAddr. } /** @@ -1062,10 +1056,11 @@ PictureResource::PictureResource(BoltFilesState &state, const byte *src): byte *imgData = state._curLibPtr->boltEntry(id)._picResource->_imgData; _freeImgData = DisposeAfterUse::NO; + // TODO: Double check code below. Despite different coding in the + // original, both looked like they do the same formula if (_flags & PICFLAG_PIC_OFFSET) { _imgData = imgData + (READ_LE_UINT32(&src[18]) & 0xffff); } else { - warning("TODO: Double-check if this is correct"); _imgData = imgData + (READ_LE_UINT32(&src[18]) & 0xffff); } } @@ -1362,7 +1357,6 @@ void ViewPortResource::setupViewPort(PictureResource *pic, Common::Rect *clipRec } void ViewPortResource::addSaveRect(int pageIndex, const Common::Rect &r) { - // TODO Common::Rect rect = r; if (clipRect(rect)) { diff --git a/engines/voyeur/files.h b/engines/voyeur/files.h index d05cba45c1..ff09bbef2b 100644 --- a/engines/voyeur/files.h +++ b/engines/voyeur/files.h @@ -93,9 +93,10 @@ public: byte *decompress(byte *buf, int size, int mode); void nextBlock(); - void EMSGetFrameAddr(byte **pageFrame) {} // TODO: Maybe? - bool EMSAllocatePages(uint *planeSize) { return false; } // TODO: Maybe? - void EMSMapPageHandle(int planeSize, int idx1, int idx2) {} // TODO: Maybe? + // Methods in the original stubbed under ScummVM + void EMSGetFrameAddr(byte **pageFrame) {} + bool EMSAllocatePages(uint *planeSize) { return false; } + void EMSMapPageHandle(int planeSize, int idx1, int idx2) {} }; class BoltFile { @@ -110,11 +111,12 @@ private: void resolveAll(); byte *getBoltMember(uint32 id); - void termType() {} // TODO - void initMem(int id) {} // TODO - void termMem() {} // TODO - void initGro() {} // TODO - void termGro() {} // TODO + // Methods in the original that are stubbed in ScummVM + void termType() {} + void initMem(int id) {} + void termMem() {} + void initGro() {} + void termGro() {} public: Common::File _file; public: diff --git a/engines/voyeur/files_threads.cpp b/engines/voyeur/files_threads.cpp index 40f4fe6f04..e03e272b6e 100644 --- a/engines/voyeur/files_threads.cpp +++ b/engines/voyeur/files_threads.cpp @@ -462,7 +462,6 @@ void ThreadResource::parsePlayCommands() { _vm->_audioVideoId = -1; parseIndex = 999; } else { - // TODO: Double-check this int count = _vm->_bVoy->getBoltGroup(_vm->_playStampGroupId)->_entries.size(); _vm->_soundManager.stopVOCPlay(); _vm->_eventsManager.getMouseInfo(); diff --git a/engines/voyeur/graphics.cpp b/engines/voyeur/graphics.cpp index af83dbff31..3dee779580 100644 --- a/engines/voyeur/graphics.cpp +++ b/engines/voyeur/graphics.cpp @@ -120,7 +120,7 @@ void GraphicsManager::restoreMCGASaveRect(ViewPortResource *viewPort) { } void GraphicsManager::addRectNoSaveBack(ViewPortResource *viewPort, int idx, const Common::Rect &bounds) { - // TODO: more + // Stubbed/dummy method in the original. } void GraphicsManager::sDrawPic(DisplayResource *srcDisplay, DisplayResource *destDisplay, @@ -290,7 +290,7 @@ void GraphicsManager::sDrawPic(DisplayResource *srcDisplay, DisplayResource *des if (srcPic->_pick == 0xff) { if (srcFlags & DISPFLAG_8) { - error("TODO: sDrawPic"); + error("TODO: sDrawPic variation"); } else { // loc_258B8 srcP = srcImgData + srcOffset; @@ -353,7 +353,7 @@ void GraphicsManager::sDrawPic(DisplayResource *srcDisplay, DisplayResource *des // loc_25D40 if (srcFlags & DISPFLAG_100) { // loc_25D4A - error("TODO: sDrawPic"); + error("TODO: sDrawPic variation"); } else { // loc_2606D destP = (byte *)_screenSurface.getPixels() + screenOffset; @@ -527,7 +527,7 @@ void GraphicsManager::sDrawPic(DisplayResource *srcDisplay, DisplayResource *des if (destFlags & DISPFLAG_8) { // loc_272C3 - error("TODO"); + error("TODO: sDrawPic variation"); } else { destP = destImgData + screenOffset; for (int yp = 0; yp < height1; ++yp) { @@ -899,10 +899,6 @@ void GraphicsManager::sDisplayPic(PictureResource *pic) { _vm->_eventsManager._intPtr._flipWait = true; } -void GraphicsManager::EMSMapPageHandle(int v1, int v2, int v3) { - // TODO -} - void GraphicsManager::flipPage() { Common::Array<ViewPortResource *> &viewPorts = _viewPortListPtr->_entries; bool flipFlag = false; diff --git a/engines/voyeur/graphics.h b/engines/voyeur/graphics.h index 5ba08eda87..322b90970c 100644 --- a/engines/voyeur/graphics.h +++ b/engines/voyeur/graphics.h @@ -102,7 +102,6 @@ public: void restoreMCGASaveRect(ViewPortResource *viewPort); void addRectNoSaveBack(ViewPortResource *viewPort, int idx, const Common::Rect &bounds); - void EMSMapPageHandle(int v1, int v2, int v3); void sDrawPic(DisplayResource *srcDisplay, DisplayResource *destDisplay, const Common::Point &initialOffset); void fillPic(DisplayResource *display, byte onOff = 0); void sDisplayPic(PictureResource *pic); @@ -125,6 +124,9 @@ public: * Synchronizes the game data */ void synchronize(Common::Serializer &s); + + // Methods in the original that are stubbed in ScummVM + void EMSMapPageHandle(int v1, int v2, int v3) {} }; } // End of namespace Voyeur diff --git a/engines/voyeur/sound.cpp b/engines/voyeur/sound.cpp index aab49be851..e81d2891fb 100644 --- a/engines/voyeur/sound.cpp +++ b/engines/voyeur/sound.cpp @@ -40,15 +40,6 @@ void SoundManager::playVOCMap(byte *voc, int vocSize) { _mixer->playStream(Audio::Mixer::kSFXSoundType, &_soundHandle, audioStream); } -bool SoundManager::vocMapStatus() { - error("TODO: vocMapStatus"); - return false; -} - -void SoundManager::continueVocMap() { - // No implementation needed in ScummVM -} - void SoundManager::abortVOCMap() { _mixer->stopHandle(_soundHandle); } diff --git a/engines/voyeur/sound.h b/engines/voyeur/sound.h index 8b4feaaaad..ca05b0bfe0 100644 --- a/engines/voyeur/sound.h +++ b/engines/voyeur/sound.h @@ -42,8 +42,6 @@ public: void setVm(VoyeurEngine *vm) { _vm = vm; } void playVOCMap(byte *voc, int vocSize); - bool vocMapStatus(); - void continueVocMap(); void stopVOCPlay(); void abortVOCMap(); void setVOCOffset(int offset); @@ -52,6 +50,9 @@ public: void startVOCPlay(int soundId); int getVOCStatus(); uint32 getVOCFrame(); + + // Methods in the original that are stubbed in ScummVM + void continueVocMap() {} }; } // End of namespace Voyeur diff --git a/engines/voyeur/voyeur.cpp b/engines/voyeur/voyeur.cpp index 2bdf8c1f1f..b3b920c799 100644 --- a/engines/voyeur/voyeur.cpp +++ b/engines/voyeur/voyeur.cpp @@ -335,7 +335,7 @@ bool VoyeurEngine::doLock() { _soundManager.abortVOCMap(); _soundManager.playVOCMap(buttonVoc, buttonVocSize); - while (_soundManager.vocMapStatus()) { + while (_soundManager.getVOCStatus()) { if (shouldQuit()) break; |