mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-15 06:18:33 +00:00
VOYEUR: Fix memory leak when quitting in showTitleScreen()
This commit is contained in:
parent
afb785e5c1
commit
bc8486a76b
@ -381,41 +381,46 @@ bool VoyeurEngine::doLock() {
|
||||
}
|
||||
|
||||
void VoyeurEngine::showTitleScreen() {
|
||||
if (_bVoy->getBoltGroup(0x500)) {
|
||||
_graphicsManager->_backgroundPage = _bVoy->getPictureResource(0x500);
|
||||
if (!_bVoy->getBoltGroup(0x500))
|
||||
return;
|
||||
|
||||
(*_graphicsManager->_vPort)->setupViewPort();
|
||||
flipPageAndWait();
|
||||
_graphicsManager->_backgroundPage = _bVoy->getPictureResource(0x500);
|
||||
|
||||
// Immediate palette load to show the initial screen
|
||||
CMapResource *cMap = _bVoy->getCMapResource(0x501);
|
||||
assert(cMap);
|
||||
cMap->_steps = 60;
|
||||
cMap->startFade();
|
||||
(*_graphicsManager->_vPort)->setupViewPort();
|
||||
flipPageAndWait();
|
||||
|
||||
// Wait briefly
|
||||
_eventsManager->delayClick(200);
|
||||
if (shouldQuit())
|
||||
return;
|
||||
|
||||
// Fade out the screen
|
||||
cMap = _bVoy->getCMapResource(0x504);
|
||||
cMap->_steps = 30;
|
||||
cMap->startFade();
|
||||
|
||||
flipPageAndWaitForFade();
|
||||
if (shouldQuit())
|
||||
return;
|
||||
|
||||
_graphicsManager->screenReset();
|
||||
_eventsManager->delayClick(200);
|
||||
|
||||
// Voyeur title
|
||||
playRL2Video("a1100100.rl2");
|
||||
_graphicsManager->screenReset();
|
||||
// Immediate palette load to show the initial screen
|
||||
CMapResource *cMap = _bVoy->getCMapResource(0x501);
|
||||
assert(cMap);
|
||||
cMap->_steps = 60;
|
||||
cMap->startFade();
|
||||
|
||||
// Wait briefly
|
||||
_eventsManager->delayClick(200);
|
||||
if (shouldQuit()) {
|
||||
_bVoy->freeBoltGroup(0x500);
|
||||
return;
|
||||
}
|
||||
|
||||
// Fade out the screen
|
||||
cMap = _bVoy->getCMapResource(0x504);
|
||||
cMap->_steps = 30;
|
||||
cMap->startFade();
|
||||
|
||||
flipPageAndWaitForFade();
|
||||
if (shouldQuit()) {
|
||||
_bVoy->freeBoltGroup(0x500);
|
||||
return;
|
||||
}
|
||||
|
||||
_graphicsManager->screenReset();
|
||||
_eventsManager->delayClick(200);
|
||||
|
||||
// Voyeur title
|
||||
playRL2Video("a1100100.rl2");
|
||||
_graphicsManager->screenReset();
|
||||
|
||||
_bVoy->freeBoltGroup(0x500);
|
||||
}
|
||||
|
||||
void VoyeurEngine::doOpening() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user