diff options
author | Paul Gilbert | 2016-04-21 22:45:37 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-07-10 16:11:39 -0400 |
commit | 282ed45c77e81f1a5d2f0663c516d455dd7a8032 (patch) | |
tree | cda0c22f347a90c8741c288a969c96a7ce9ac4cb | |
parent | b398a5001bb128c5e53d6ac5426b926de6b73893 (diff) | |
download | scummvm-rg350-282ed45c77e81f1a5d2f0663c516d455dd7a8032.tar.gz scummvm-rg350-282ed45c77e81f1a5d2f0663c516d455dd7a8032.tar.bz2 scummvm-rg350-282ed45c77e81f1a5d2f0663c516d455dd7a8032.zip |
TITANIC: Beginnings of CPetSound
-rw-r--r-- | engines/titanic/pet_control/pet_slider.h | 8 | ||||
-rw-r--r-- | engines/titanic/pet_control/pet_sound.cpp | 31 | ||||
-rw-r--r-- | engines/titanic/pet_control/pet_sound.h | 20 |
3 files changed, 57 insertions, 2 deletions
diff --git a/engines/titanic/pet_control/pet_slider.h b/engines/titanic/pet_control/pet_slider.h index acad55c4ae..b3ba60fd41 100644 --- a/engines/titanic/pet_control/pet_slider.h +++ b/engines/titanic/pet_control/pet_slider.h @@ -24,6 +24,7 @@ #define TITANIC_PET_SLIDER_H #include "titanic/support/rect.h" +#include "titanic/support/string.h" namespace Titanic { @@ -46,7 +47,12 @@ public: virtual void proc1() {} virtual void proc2() {} virtual void proc3() {} - virtual void proc4() {} + + /** + * Reset the slider + */ + virtual void reset(const CString &name) {} + virtual void proc5() {} virtual void proc6() {} diff --git a/engines/titanic/pet_control/pet_sound.cpp b/engines/titanic/pet_control/pet_sound.cpp index b236b1ab3d..6c6c2ead64 100644 --- a/engines/titanic/pet_control/pet_sound.cpp +++ b/engines/titanic/pet_control/pet_sound.cpp @@ -20,10 +20,39 @@ * */ -#include "titanic/pet_control/pet_real_life.h" +#include "titanic/pet_control/pet_sound.h" #include "titanic/pet_control/pet_control.h" namespace Titanic { +CPetSound::CPetSound() : CPetGlyph(), _field198(0), _field19C(0) { +} + +bool CPetSound::setup(CPetControl *petControl, CPetGlyphs *owner) { + CPetGlyph::setup(petControl, owner); + // TODO + + return true; +} + +bool CPetSound::reset() { + CPetControl *pet = getPetControl(); + if (pet) { + setName("PetSound", pet); + _element.reset("PetVolChannels", pet, MODE_UNSELECTED); + _slider1.reset("PetVolSlug"); + _slider2.reset("PetVolSlug"); + _slider3.reset("PetVolSlug"); + _slider4.reset("PetVolSlug"); + + CPetSection *section = getPetSection(); + uint col = section->getColor(0); + for (int idx = 0; idx < 4; ++idx) + _text[idx].setColor(0, col); + } + + return false; +} + } // End of namespace Titanic diff --git a/engines/titanic/pet_control/pet_sound.h b/engines/titanic/pet_control/pet_sound.h index fcd8e9a1d9..e52cccabf8 100644 --- a/engines/titanic/pet_control/pet_sound.h +++ b/engines/titanic/pet_control/pet_sound.h @@ -26,12 +26,32 @@ #include "titanic/pet_control/pet_glyphs.h" #include "titanic/pet_control/pet_gfx_element.h" #include "titanic/pet_control/pet_text.h" +#include "titanic/pet_control/pet_slider.h" namespace Titanic { class CPetSound : public CPetGlyph { private: + CPetGfxElement _element; + CPetSlider _slider1; + CPetSlider _slider2; + CPetSlider _slider3; + CPetSlider _slider4; + CPetText _text[4]; + int _field198; + int _field19C; public: + CPetSound(); + + /** + * Setup the glyph + */ + virtual bool setup(CPetControl *petControl, CPetGlyphs *owner); + + /** + * Reset the glyph + */ + virtual bool reset(); }; } // End of namespace Titanic |