diff --git a/cscene.cpp b/cscene.cpp index c9b1614..bc88573 100644 --- a/cscene.cpp +++ b/cscene.cpp @@ -296,6 +296,46 @@ QList cSceneList::find(cCharacter* lpCharacter) return(sceneList); } +QList cSceneList::find(cPlace* lpPlace) +{ + QList sceneList; + + for(int x = 0;x < count();x++) + { + QList list = at(x)->placeList(); + + for(int y = 0;y < list.count();y++) + { + if(list.at(y)->place() == lpPlace) + { + sceneList.append(at(x)); + break; + } + } + } + return(sceneList); +} + +QList cSceneList::find(cObject* lpObject) +{ + QList sceneList; + + for(int x = 0;x < count();x++) + { + QList list = at(x)->objectList(); + + for(int y = 0;y < list.count();y++) + { + if(list.at(y)->object() == lpObject) + { + sceneList.append(at(x)); + break; + } + } + } + return(sceneList); +} + qint32 cSceneList::nextSort(cChapter* lpChapter) { qint32 iSort = -1; diff --git a/cscene.h b/cscene.h index 26aeee8..015a324 100644 --- a/cscene.h +++ b/cscene.h @@ -406,9 +406,27 @@ public: \fn find \param lpCharacter - \return QList + \return QList */ - QList find(cCharacter* lpCharacter); + QList find(cCharacter* lpCharacter); + + /*! + \brief + + \fn find + \param lpPlace + \return QList + */ + QList find(cPlace* lpPlace); + + /*! + \brief + + \fn find + \param lpObject + \return QList + */ + QList find(cObject* lpObject); /*! \brief