diff options
author | Bastien Bouclet | 2010-11-29 20:54:36 +0000 |
---|---|---|
committer | Bastien Bouclet | 2010-11-29 20:54:36 +0000 |
commit | 18e1f4a8c36d907df8c5498b0c0c9f264490455f (patch) | |
tree | b2702c585a33d971c7101fc672a034ba1ebfd055 /engines/mohawk/myst.cpp | |
parent | d8b5319f153b859c4720e35fe791ad2605a86cff (diff) | |
download | scummvm-rg350-18e1f4a8c36d907df8c5498b0c0c9f264490455f.tar.gz scummvm-rg350-18e1f4a8c36d907df8c5498b0c0c9f264490455f.tar.bz2 scummvm-rg350-18e1f4a8c36d907df8c5498b0c0c9f264490455f.zip |
MOHAWK: Added helpher functions to redraw a resource. Do not redraw all the resources on mouse up.
svn-id: r54613
Diffstat (limited to 'engines/mohawk/myst.cpp')
-rw-r--r-- | engines/mohawk/myst.cpp | 16 |
1 files changed, 12 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(); |