aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/pet_control/pet_control.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2016-04-14 18:42:57 -0400
committerPaul Gilbert2016-07-10 16:11:06 -0400
commit1babcc10cfce1458ac07c8e1027c321962cf8f09 (patch)
tree96a950e5834a17e8ce86ee550016ba0bf37414ba /engines/titanic/pet_control/pet_control.cpp
parenta5e90526355a421d23175bd0ac25f7c2bc0d3276 (diff)
downloadscummvm-rg350-1babcc10cfce1458ac07c8e1027c321962cf8f09.tar.gz
scummvm-rg350-1babcc10cfce1458ac07c8e1027c321962cf8f09.tar.bz2
scummvm-rg350-1babcc10cfce1458ac07c8e1027c321962cf8f09.zip
TITANIC: Implemented PET methods for iterating sub-objects
Diffstat (limited to 'engines/titanic/pet_control/pet_control.cpp')
-rw-r--r--engines/titanic/pet_control/pet_control.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/engines/titanic/pet_control/pet_control.cpp b/engines/titanic/pet_control/pet_control.cpp
index a5885502f0..c7dc8d2c21 100644
--- a/engines/titanic/pet_control/pet_control.cpp
+++ b/engines/titanic/pet_control/pet_control.cpp
@@ -354,4 +354,15 @@ void CPetControl::displayMessage(const CString &msg) {
error("TODO: CPetControl::displayMessage");
}
+CGameObject *CPetControl::getFirstObject() const {
+ return static_cast<CGameObject *>(getFirstChild());
+}
+
+CGameObject *CPetControl::getNextObject(CGameObject *prior) const {
+ if (!prior || prior->getParent() != this)
+ return nullptr;
+
+ return static_cast<CGameObject *>(prior->getNextSibling());
+}
+
} // End of namespace Titanic