diff options
-rw-r--r-- | engines/mohawk/myst.cpp | 16 | ||||
-rw-r--r-- | engines/mohawk/myst.h | 2 |
2 files changed, 14 insertions, 4 deletions
diff --git a/engines/mohawk/myst.cpp b/engines/mohawk/myst.cpp index ee010e5d80..c1a6123635 100644 --- a/engines/mohawk/myst.cpp +++ b/engines/mohawk/myst.cpp @@ -250,12 +250,12 @@ Common::Error MohawkEngine_Myst::run() { else if (getFeatures() & GF_DEMO) changeToStack(kDemoStack); else - changeToStack(kSeleniticStack); + changeToStack(kIntroStack); if (getFeatures() & GF_DEMO) changeToCard(2000); else - changeToCard(1282); + changeToCard(1); // Load game from launcher/command line if requested if (ConfMan.hasKey("save_slot") && !(getFeatures() & GF_DEMO)) { @@ -310,8 +310,6 @@ Common::Error MohawkEngine_Myst::run() { debug(2, "Sending mouse up event to resource %d\n", _curResource); _resources[_curResource]->handleMouseUp(&event.mouse); } - - drawResourceImages(); break; case Common::EVENT_LBUTTONDOWN: _mouseClicked = true; @@ -901,6 +899,16 @@ void MohawkEngine_Myst::drawResourceImages() { _gfx->updateScreen(); } +void MohawkEngine_Myst::redrawResource(MystResource *_resource) { + _resource->drawConditionalDataToScreen(_scriptParser->getVar(_resource->getType8Var())); +} + +void MohawkEngine_Myst::redrawArea(uint16 var) { + for (uint16 i = 0; i < _resources.size(); i++) + if (_resources[i]->type == 8 && _resources[i]->getType8Var() == var) + redrawResource(_resources[i]); +} + MystResource *MohawkEngine_Myst::loadResource(Common::SeekableReadStream *rlstStream, MystResource *parent) { MystResource *resource = 0; uint16 type = rlstStream->readUint16LE(); diff --git a/engines/mohawk/myst.h b/engines/mohawk/myst.h index 2a8c1e6a24..9010e5be72 100644 --- a/engines/mohawk/myst.h +++ b/engines/mohawk/myst.h @@ -195,6 +195,8 @@ public: bool _showResourceRects; MystResource *loadResource(Common::SeekableReadStream *rlstStream, MystResource *parent); void setResourceEnabled(uint16 resourceId, bool enable); + void redrawArea(uint16 var); + void redrawResource(MystResource *_resource); void setCacheState(bool state) { _cache.enabled = state; } bool getCacheState(void) { return _cache.enabled; } |