FULLPIPE: Implement Background::addPictureObject

This commit is contained in:
Eugene Sandulenko 2013-06-26 19:46:47 -04:00
parent 305692fefe
commit ee5dc16eaa
4 changed files with 24 additions and 3 deletions

View File

@ -51,6 +51,8 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc)
_scrollSpeed = 0;
_currSoundListCount = 0;
_currArchive = 0;
_soundEnabled = true;
_flgSoundList = true;

View File

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

View File

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

View File

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