diff options
author | Eugene Sandulenko | 2013-08-06 01:50:16 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2013-09-06 14:51:11 +0300 |
commit | 7257d8804b8b05d8078055b9e705ea0cbe7e465f (patch) | |
tree | 998acda5eb887c348675b4233b70d587f1d3aa82 /engines/fullpipe/statics.cpp | |
parent | ab190d2f0b4c102d277b16adf66269d9a6380b81 (diff) | |
download | scummvm-rg350-7257d8804b8b05d8078055b9e705ea0cbe7e465f.tar.gz scummvm-rg350-7257d8804b8b05d8078055b9e705ea0cbe7e465f.tar.bz2 scummvm-rg350-7257d8804b8b05d8078055b9e705ea0cbe7e465f.zip |
FULLPIPE: Implement CGameLoader::applyPicAniInfos()
Diffstat (limited to 'engines/fullpipe/statics.cpp')
-rw-r--r-- | engines/fullpipe/statics.cpp | 43 |
1 files changed, 42 insertions, 1 deletions
diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index d54b1d1c89..72a10807f5 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -79,6 +79,10 @@ StaticANIObject::StaticANIObject() { _someDynamicPhaseIndex = -1; } +StaticANIObject::StaticANIObject(StaticANIObject *src) : GameObject(src) { + warning("STUB: StaticANIObject(src)"); +} + bool StaticANIObject::load(MfcArchive &file) { debug(5, "StaticANIObject::load()"); @@ -269,7 +273,7 @@ void StaticANIObject::draw() { angle = _field_30 ^ 0x4000; } - if (!_movement || _flags & 0x20) { + if (!_movement || (_flags & 0x20)) { _statics->getSomeXY(point); _statics->_x = _ox - point.x; _statics->_y = _oy - point.y; @@ -356,6 +360,43 @@ void StaticANIObject::update(int counterdiff) { warning("STUB: StaticANIObject::update(%d)", counterdiff); } +bool StaticANIObject::setPicAniInfo(PicAniInfo *picAniInfo) { + if (!(picAniInfo->type & 3)) { + warning("StaticANIObject::setPicAniInfo(): Wrong type: %d", picAniInfo->type); + + return false; + } + + if (picAniInfo->type & 3) { + setOXY(picAniInfo->ox, picAniInfo->oy); + _priority = picAniInfo->priority; + _field_4 = picAniInfo->field_8; + setFlags(picAniInfo->flags); + _field_8 = picAniInfo->field_24; + } + + if (picAniInfo->type & 1) { + _messageQueueId = picAniInfo->type >> 16; + + if (picAniInfo->staticsId) + _statics = getStaticsById(picAniInfo->staticsId); + else + _statics = 0; + + if (picAniInfo->movementId) { + _movement = getMovementById(picAniInfo->movementId); + if (_movement) + _movement->setDynamicPhaseIndex(picAniInfo->dynamicPhaseIndex); + } else { + _movement = 0; + } + + setSomeDynamicPhaseIndex(picAniInfo->someDynamicPhaseIndex); + } + + return true; +} + Statics::Statics() { _staticsId = 0; _picture = 0; |