diff options
Diffstat (limited to 'engines/sky')
-rw-r--r-- | engines/sky/grid.cpp | 6 | ||||
-rw-r--r-- | engines/sky/logic.cpp | 9 | ||||
-rw-r--r-- | engines/sky/sky.cpp | 7 |
3 files changed, 18 insertions, 4 deletions
diff --git a/engines/sky/grid.cpp b/engines/sky/grid.cpp index d9b7a17351..7b473c7934 100644 --- a/engines/sky/grid.cpp +++ b/engines/sky/grid.cpp @@ -255,8 +255,10 @@ void Grid::removeGrid(uint32 x, uint32 y, uint32 width, Compact *cpt) { } uint8 *Grid::giveGrid(uint32 pScreen) { - assert((_gridConvertTable[pScreen] >= 0) && (_gridConvertTable[pScreen] < TOT_NO_GRIDS)); - return _gameGrids[_gridConvertTable[pScreen]]; + if ((_gridConvertTable[pScreen] >= 0) && (_gridConvertTable[pScreen] < TOT_NO_GRIDS)) { + return _gameGrids[_gridConvertTable[pScreen]]; + } + return 0; } } // End of namespace Sky diff --git a/engines/sky/logic.cpp b/engines/sky/logic.cpp index ccfbfbbd62..991fbe19d0 100644 --- a/engines/sky/logic.cpp +++ b/engines/sky/logic.cpp @@ -1702,6 +1702,15 @@ bool Logic::fnQuit(uint32 a, uint32 b, uint32 c) { } bool Logic::fnSpeakMe(uint32 targetId, uint32 mesgNum, uint32 animNum) { + /* WORKAROUND for #2687172: When Mrs. Piermont is talking + on the phone in her apartment, ignore her fnSpeakMe calls + on other screens, as the lack of speech files for these lines + will cause Foster's speech to be aborted if the timing is bad. + */ + if (targetId == 0x4039 && animNum == 0x9B && Logic::_scriptVariables[SCREEN] != 38) { + return false; + } + stdSpeak(_skyCompact->fetchCpt(targetId), mesgNum, animNum, 0); return false; //drop out of script } diff --git a/engines/sky/sky.cpp b/engines/sky/sky.cpp index 47cc65e96d..e85da6297a 100644 --- a/engines/sky/sky.cpp +++ b/engines/sky/sky.cpp @@ -208,8 +208,11 @@ Common::Error SkyEngine::go() { _skyScreen->recreate(); _skyScreen->spriteEngine(); if (_debugger->showGrid()) { - _skyScreen->showGrid(_skyLogic->_skyGrid->giveGrid(Logic::_scriptVariables[SCREEN])); - _skyScreen->forceRefresh(); + uint8 *grid = _skyLogic->_skyGrid->giveGrid(Logic::_scriptVariables[SCREEN]); + if (grid) { + _skyScreen->showGrid(grid); + _skyScreen->forceRefresh(); + } } _skyScreen->flip(); |