MOHAWK; Post rebase fixes :

- Restore invoking resource change
- Update the screen after drawing a conditional image

svn-id: r54604
This commit is contained in:
Bastien Bouclet 2010-11-29 20:52:33 +00:00
parent 200cafd40f
commit e26fb921e9
2 changed files with 9 additions and 8 deletions

View File

@ -473,14 +473,14 @@ void MohawkEngine_Myst::changeToCard(uint16 card) {
error("Unknown sound action %d", soundAction);
}
// Run the entrance script (if present)
runInitScript();
// Update the images of each area too
drawResourceImages();
// TODO: Handle Script Resources
// Run the entrance script (if present)
runInitScript();
// Make sure we have the right cursor showing
_curResource = -1;
checkCurrentResource();

View File

@ -92,12 +92,12 @@ MystResourceType5::MystResourceType5(MohawkEngine_Myst *vm, Common::SeekableRead
void MystResourceType5::handleMouseUp(Common::Point *mouse) {
// MystResource *invoking = this;
// while (invoking->_parent) {
// invoking = invoking->_parent;
// }
MystResource *invoking = this;
while (invoking->_parent) {
invoking = invoking->_parent;
}
_vm->_scriptParser->runScript(_script, this);
_vm->_scriptParser->runScript(_script, invoking);
}
// In Myst/Making of Myst, the paths are hardcoded ala Windows style without extension. Convert them.
@ -448,6 +448,7 @@ void MystResourceType8::drawConditionalDataToScreen(uint16 state) {
imageToDraw = _subImages[subImageId].wdib;
_vm->_gfx->copyImageSectionToScreen(imageToDraw, _subImages[subImageId].rect, _rect);
_vm->_gfx->updateScreen();
}
}