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/gfx.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/gfx.cpp')
-rw-r--r-- | engines/fullpipe/gfx.cpp | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 997c0b620b..c677d0e378 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -119,6 +119,13 @@ PictureObject::PictureObject() { _picture = 0; } +PictureObject::PictureObject(PictureObject *src) : GameObject(src) { + _picture = src->_picture; + _ox2 = _ox; + _oy2 = _oy; + _pictureObject2List = src->_pictureObject2List; +} + bool PictureObject::load(MfcArchive &file, bool bigPicture) { debug(5, "PictureObject::load()"); GameObject::load(file); @@ -164,6 +171,26 @@ void PictureObject::draw() { _picture->draw(_ox, _oy, 0, 0); } +bool PictureObject::setPicAniInfo(PicAniInfo *picAniInfo) { + if (!(picAniInfo->type & 2) || (picAniInfo->type & 1)) { + error("Picture::setPicAniInfo(): Wrong type: %d", picAniInfo->type); + + return false; + } + + if (picAniInfo->type & 2) { + setOXY(picAniInfo->ox, picAniInfo->oy); + _priority = picAniInfo->priority; + _field_4 = picAniInfo->field_8; + setFlags(picAniInfo->flags); + _field_8 = picAniInfo->field_24; + + return true; + } + + return false; +} + GameObject::GameObject() { _field_4 = 0; _flags = 0; @@ -175,6 +202,21 @@ GameObject::GameObject() { _field_8 = 0; } +GameObject::GameObject(GameObject *src) { + _field_4 = 1; + _flags = 0; + _id = src->_id; + + _objectName = (char *)calloc(strlen(src->_objectName) + 1, 1); + strncpy(_objectName, src->_objectName, strlen(src->_objectName)); + + _ox = src->_ox; + _oy = src->_oy; + _priority = src->_priority; + _field_20 = 1; + _field_8 = src->_field_8; +} + bool GameObject::load(MfcArchive &file) { debug(5, "GameObject::load()"); _field_4 = 0; |