From ac157b7bc740a1878f22c659fc20a49cf75e9d1f Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Fri, 3 Jan 2014 10:17:40 -1000 Subject: VOYEUR: Workaround for original code causing crash after calling doEvidDisplay --- engines/voyeur/files_threads.cpp | 7 +++++-- engines/voyeur/voyeur_game.cpp | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'engines') diff --git a/engines/voyeur/files_threads.cpp b/engines/voyeur/files_threads.cpp index 0a11f471fa..4a4ec61536 100644 --- a/engines/voyeur/files_threads.cpp +++ b/engines/voyeur/files_threads.cpp @@ -1271,8 +1271,11 @@ void ThreadResource::doRoom() { if (!vm._eventsManager._mouseClicked) vm._eventsManager.delayClick(18000); - vm._bVoy->freeBoltGroup(vm._playStamp1); - vm._bVoy->getBoltGroup(vm._playStamp1); + // WORKAROUND: Done in original, but not now, since freeing and reloading + // the group would invalidate the _backgroundPage picture resource + //vm._bVoy->freeBoltGroup(vm._playStamp1); + //vm._bVoy->getBoltGroup(vm._playStamp1); + dataP = vm._bVoy->memberAddr(vm._playStamp1 + 4); pic1 = vm._bVoy->boltEntry(vm._playStamp1 + 2)._picResource; pic2 = vm._bVoy->boltEntry(vm._playStamp1 + 3)._picResource; diff --git a/engines/voyeur/voyeur_game.cpp b/engines/voyeur/voyeur_game.cpp index 73484d72e9..0a4537f8c8 100644 --- a/engines/voyeur/voyeur_game.cpp +++ b/engines/voyeur/voyeur_game.cpp @@ -1356,8 +1356,8 @@ void VoyeurEngine::doEvidDisplay(int evidId, int eventId) { count = (int16)READ_LE_UINT16(dataP + evidId * 12 + 4); for (int idx = 1; idx <= count; ++idx) { - _bVoy->freeBoltGroup(_voy._field47A + (evidId + idx) * 2); - _bVoy->freeBoltGroup(_voy._field47A + (evidId + idx) * 2 + 1); + _bVoy->freeBoltMember(_voy._field47A + (evidId + idx) * 2); + _bVoy->freeBoltMember(_voy._field47A + (evidId + idx) * 2 + 1); } } -- cgit v1.2.3