diff options
author | uruk | 2014-06-10 14:38:30 +0200 |
---|---|---|
committer | uruk | 2014-06-10 14:38:30 +0200 |
commit | 85c55333b334f18f795118a3a3e4a2d2c210253b (patch) | |
tree | 004b940844bfcf09bdd2e8b422e21f69a9291280 /engines | |
parent | 71b0a4cc69185ee6b6f01b488a958c7c19503c3f (diff) | |
download | scummvm-rg350-85c55333b334f18f795118a3a3e4a2d2c210253b.tar.gz scummvm-rg350-85c55333b334f18f795118a3a3e4a2d2c210253b.tar.bz2 scummvm-rg350-85c55333b334f18f795118a3a3e4a2d2c210253b.zip |
CGE2: Handle kCmdSetRef.
Fix Snail during the process.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/cge2/snail.cpp | 7 | ||||
-rw-r--r-- | engines/cge2/spare.cpp | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/engines/cge2/snail.cpp b/engines/cge2/snail.cpp index 3af4c88d37..6957f8f50e 100644 --- a/engines/cge2/snail.cpp +++ b/engines/cge2/snail.cpp @@ -488,8 +488,11 @@ void CGE2Engine::snFlag(int ref, int val) { warning("STUB: CGE2Engine::snFlag()"); } -void CGE2Engine::snSetRef(Sprite *spr, int val) { - warning("STUB: CGE2Engine::snSetRef()"); +void CGE2Engine::snSetRef(Sprite *spr, int val) { // TODO:: Recheck this! + if (spr) { + spr->_ref = val; + _spare->update(spr); + } } void CGE2Engine::snBackPt(Sprite *spr, int val) { diff --git a/engines/cge2/spare.cpp b/engines/cge2/spare.cpp index 445247177d..63e85e8ed6 100644 --- a/engines/cge2/spare.cpp +++ b/engines/cge2/spare.cpp @@ -79,6 +79,8 @@ void Spare::update(Sprite *spr) { Sprite *sp = locate(spr->_ref); if (sp == nullptr) store(spr); + else + *sp = *spr; } void Spare::dispose(Sprite *spr) { |