diff options
author | Eugene Sandulenko | 2013-06-26 19:46:47 -0400 |
---|---|---|
committer | Eugene Sandulenko | 2013-09-06 14:48:16 +0300 |
commit | ee5dc16eaa138bfeca7f914b4314ef03bcfd7352 (patch) | |
tree | 974d99d01fd85db6602d7bbbe13c901254cb8e6f /engines | |
parent | 305692fefe567228441e6edea5225d0b4853a9f8 (diff) | |
download | scummvm-rg350-ee5dc16eaa138bfeca7f914b4314ef03bcfd7352.tar.gz scummvm-rg350-ee5dc16eaa138bfeca7f914b4314ef03bcfd7352.tar.bz2 scummvm-rg350-ee5dc16eaa138bfeca7f914b4314ef03bcfd7352.zip |
FULLPIPE: Implement Background::addPictureObject
Diffstat (limited to 'engines')
-rw-r--r-- | engines/fullpipe/fullpipe.cpp | 2 | ||||
-rw-r--r-- | engines/fullpipe/gfx.cpp | 20 | ||||
-rw-r--r-- | engines/fullpipe/gfx.h | 3 | ||||
-rw-r--r-- | engines/fullpipe/scene.cpp | 2 |
4 files changed, 24 insertions, 3 deletions
diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index a6a52bbccb..9db96ae01d 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -51,6 +51,8 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc) _scrollSpeed = 0; _currSoundListCount = 0; + _currArchive = 0; + _soundEnabled = true; _flgSoundList = true; diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 79a1e1da70..531bfd92bf 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -74,7 +74,25 @@ bool Background::load(MfcArchive &file) { } void Background::addPictureObject(PictureObject *pct) { - warning("STUB: Background::addPictureObject"); + if (pct->_field_4) + renumPictures(pct); + + bool inserted = false; + for (uint i = 0; i < _picObjList.size(); i++) { + if (((PictureObject *)_picObjList[i])->_priority == pct->_priority) { + _picObjList.insert_at(i, pct); + inserted = true; + break; + } + } + + if (!inserted) { + _picObjList.push_back(pct); + } +} + +void Background::renumPictures(PictureObject *pct) { + warning("STUB: Background::renumPictures"); } PictureObject::PictureObject() { diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index edf884dbca..b8f6194848 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -89,7 +89,7 @@ class PictureObject : public GameObject { class Background : public CObject { protected: - CPtrList _list; + CPtrList _picObjList; char *_stringObj; int _x; int _y; @@ -103,6 +103,7 @@ class Background : public CObject { Background(); virtual bool load(MfcArchive &file); void addPictureObject(PictureObject *pct); + void renumPictures(PictureObject *pct); }; class Shadows : public CObject { diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index 3a9b96cdfc..ee7a4dd570 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -174,7 +174,7 @@ bool Scene::load(MfcArchive &file) { _libHandle = g_fullpipe->_currArchive; - if (_list.size() > 0 && _stringObj && strlen(_stringObj) > 1) { + if (_picObjList.size() > 0 && _stringObj && strlen(_stringObj) > 1) { char fname[260]; strcpy(fname, _stringObj); |