aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2016-04-22 13:16:44 -0400
committerPaul Gilbert2016-07-10 16:11:43 -0400
commita719b0585fed6bcbce48e924d65cca5d9ff80bf8 (patch)
treeabac9fd82ab6cea171aeba95538cd51757f96ee4
parent48e9387f2dacc09fff656d8c493a048c520a5c13 (diff)
downloadscummvm-rg350-a719b0585fed6bcbce48e924d65cca5d9ff80bf8.tar.gz
scummvm-rg350-a719b0585fed6bcbce48e924d65cca5d9ff80bf8.tar.bz2
scummvm-rg350-a719b0585fed6bcbce48e924d65cca5d9ff80bf8.zip
TITANIC: Beginnings of slider logic
-rw-r--r--engines/titanic/pet_control/pet_slider.cpp15
-rw-r--r--engines/titanic/pet_control/pet_slider.h39
2 files changed, 50 insertions, 4 deletions
diff --git a/engines/titanic/pet_control/pet_slider.cpp b/engines/titanic/pet_control/pet_slider.cpp
index dad78d6a1e..4abf0227a1 100644
--- a/engines/titanic/pet_control/pet_slider.cpp
+++ b/engines/titanic/pet_control/pet_slider.cpp
@@ -21,6 +21,7 @@
*/
#include "titanic/pet_control/pet_slider.h"
+#include "titanic/pet_control/pet_control.h"
namespace Titanic {
@@ -86,4 +87,18 @@ void CPetSlider::proc18() {
}
+/*------------------------------------------------------------------------*/
+
+void CPetSoundSlider::setupBackground(const CString &name, CPetControl *petControl) {
+ if (petControl) {
+ _background = petControl->getHiddenObject(name);
+ }
+}
+
+void CPetSoundSlider::setupThumb(const CString &name, CPetControl *petControl) {
+ if (petControl) {
+ _thumb = petControl->getHiddenObject(name);
+ }
+}
+
} // End of namespace Titanic
diff --git a/engines/titanic/pet_control/pet_slider.h b/engines/titanic/pet_control/pet_slider.h
index b3ba60fd41..a30697a023 100644
--- a/engines/titanic/pet_control/pet_slider.h
+++ b/engines/titanic/pet_control/pet_slider.h
@@ -25,9 +25,12 @@
#include "titanic/support/rect.h"
#include "titanic/support/string.h"
+#include "titanic/core/game_object.h"
namespace Titanic {
+class CPetControl;
+
class CPetSlider {
private:
int _field4;
@@ -44,9 +47,25 @@ private:
public:
CPetSlider();
- virtual void proc1() {}
- virtual void proc2() {}
- virtual void proc3() {}
+ /**
+ * Setup the background
+ */
+ virtual void setupBackground(const CString &name, CPetControl *petControl) {}
+
+ /**
+ * Setup the thumb
+ */
+ virtual void setupThumb(const CString &name, CPetControl *petControl) {}
+
+ /**
+ * Setup the background
+ */
+ virtual void setupBackground(const CString &name, CTreeItem *treeItem) {}
+
+ /**
+ * Setup the thumb
+ */
+ virtual void setupThumb(const CString &name, CTreeItem *treeItem) {}
/**
* Reset the slider
@@ -81,9 +100,21 @@ public:
class CPetSoundSlider : public CPetSlider {
public:
-
+ CGameObject *_background;
+ CGameObject *_thumb;
public:
+ CPetSoundSlider() : CPetSlider(), _background(nullptr),
+ _thumb(0) {}
+ /**
+ * Setup the background
+ */
+ virtual void setupBackground(const CString &name, CPetControl *petControl);
+
+ /**
+ * Setup the thumb
+ */
+ virtual void setupThumb(const CString &name, CPetControl *petControl);
};
} // End of namespace Titanic