CGE2: Handle kCmdSetRef.

Fix Snail during the process.
This commit is contained in:
uruk 2014-06-10 14:38:30 +02:00
parent 71b0a4cc69
commit 85c55333b3
2 changed files with 7 additions and 2 deletions

View File

@ -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) {

View File

@ -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) {