diff options
author | Paul Gilbert | 2016-11-11 21:14:17 -0500 |
---|---|---|
committer | Paul Gilbert | 2016-11-11 21:14:17 -0500 |
commit | c542c2827f2d8dd65e12b3129cfbbf09dc48f150 (patch) | |
tree | e7a7d2927d94f3338ce653e21241fe774408ae9e /engines/titanic | |
parent | d786b7383f500e9f0f882331a8996f8bc9afe282 (diff) | |
download | scummvm-rg350-c542c2827f2d8dd65e12b3129cfbbf09dc48f150.tar.gz scummvm-rg350-c542c2827f2d8dd65e12b3129cfbbf09dc48f150.tar.bz2 scummvm-rg350-c542c2827f2d8dd65e12b3129cfbbf09dc48f150.zip |
TITANIC: Setup room indexes for each Remote Goto glyph
Diffstat (limited to 'engines/titanic')
-rw-r--r-- | engines/titanic/pet_control/pet_remote_glyphs.cpp | 26 | ||||
-rw-r--r-- | engines/titanic/pet_control/pet_remote_glyphs.h | 10 |
2 files changed, 18 insertions, 18 deletions
diff --git a/engines/titanic/pet_control/pet_remote_glyphs.cpp b/engines/titanic/pet_control/pet_remote_glyphs.cpp index f7354eab49..2e69ad6bce 100644 --- a/engines/titanic/pet_control/pet_remote_glyphs.cpp +++ b/engines/titanic/pet_control/pet_remote_glyphs.cpp @@ -125,22 +125,22 @@ bool CRemoteGotoGlyph::setup(CPetControl *petControl, CPetGlyphs *owner) { setDefaults(_gfxName, petControl); if (owner) - _gfxElement = getElement(7); + _goButton = getElement(7); return true; } void CRemoteGotoGlyph::draw2(CScreenManager *screenManager) { - if (_gfxElement) - _gfxElement->draw(screenManager); + if (_goButton) + _goButton->draw(screenManager); } bool CRemoteGotoGlyph::MouseButtonDownMsg(const Point &pt) { - return _gfxElement && _gfxElement->MouseButtonDownMsg(pt); + return _goButton && _goButton->MouseButtonDownMsg(pt); } bool CRemoteGotoGlyph::MouseButtonUpMsg(const Point &pt) { - if (!_gfxElement || !_gfxElement->MouseButtonUpMsg(pt)) + if (!_goButton || !_goButton->MouseButtonUpMsg(pt)) return false; CPetControl *petControl = getPetControl(); @@ -573,49 +573,49 @@ CSummonPelleratorGlyph::CSummonPelleratorGlyph() : CBasicRemoteGlyph( /*------------------------------------------------------------------------*/ CGotoBottomOfWellGlyph::CGotoBottomOfWellGlyph() : CRemoteGotoGlyph("3PetBotOfWell", - g_vm->_strings[GO_TO_BOTTOM_OF_WELL]) { + g_vm->_strings[GO_TO_BOTTOM_OF_WELL], 10) { } /*------------------------------------------------------------------------*/ CGotoTopOfWellGlyph::CGotoTopOfWellGlyph() : CRemoteGotoGlyph("3PetTopOfWell", - g_vm->_strings[GO_TO_TOP_OF_WELL]) { + g_vm->_strings[GO_TO_TOP_OF_WELL], 32) { } /*------------------------------------------------------------------------*/ CGotoStateroomGlyph::CGotoStateroomGlyph() : CRemoteGotoGlyph("3PetRoom", - g_vm->_strings[GO_TO_STATEROOM]) { + g_vm->_strings[GO_TO_STATEROOM], 33) { } /*------------------------------------------------------------------------*/ CGotoBarGlyph::CGotoBarGlyph() : CRemoteGotoGlyph("3PetBar", - g_vm->_strings[GO_TO_BAR]) { + g_vm->_strings[GO_TO_BAR], 7) { } /*------------------------------------------------------------------------*/ CGotoPromenadeDeckGlyph::CGotoPromenadeDeckGlyph() : CRemoteGotoGlyph("3PetPromDeck", - g_vm->_strings[GO_TO_PROMENADE_DECK]) { + g_vm->_strings[GO_TO_PROMENADE_DECK], 23) { } /*------------------------------------------------------------------------*/ CGotoArboretumGlyph::CGotoArboretumGlyph() : CRemoteGotoGlyph("3PetArboretum", - g_vm->_strings[GO_TO_ARBORETUM]) { + g_vm->_strings[GO_TO_ARBORETUM], 5) { } /*------------------------------------------------------------------------*/ CGotoMusicRoomGlyph::CGotoMusicRoomGlyph() : CRemoteGotoGlyph("3PetMusicRoom", - g_vm->_strings[GO_TO_MUSIC_ROOM]) { + g_vm->_strings[GO_TO_MUSIC_ROOM], 20) { } /*------------------------------------------------------------------------*/ CGotoRestaurantGlyph::CGotoRestaurantGlyph() : CRemoteGotoGlyph("3Pet1stClassRest", - g_vm->_strings[GO_TO_1ST_CLASS_RESTAURANT]) { + g_vm->_strings[GO_TO_1ST_CLASS_RESTAURANT], 1) { } } // End of namespace Titanic diff --git a/engines/titanic/pet_control/pet_remote_glyphs.h b/engines/titanic/pet_control/pet_remote_glyphs.h index 83b6e16a4b..c661a1e2af 100644 --- a/engines/titanic/pet_control/pet_remote_glyphs.h +++ b/engines/titanic/pet_control/pet_remote_glyphs.h @@ -150,13 +150,13 @@ public: class CRemoteGotoGlyph : public CPetRemoteGlyph { protected: int _roomIndex; - CPetGfxElement *_gfxElement; + CPetGfxElement *_goButton; CString _gfxName, _tooltip; public: - CRemoteGotoGlyph() : CPetRemoteGlyph(), _gfxElement(nullptr), _roomIndex(21) {} - CRemoteGotoGlyph(const CString &gfxName, const CString &tooltip) : - CPetRemoteGlyph(), _gfxElement(nullptr), _roomIndex(21), - _gfxName(gfxName), _tooltip(tooltip) {} + CRemoteGotoGlyph() : CPetRemoteGlyph(), _goButton(nullptr), _roomIndex(21) {} + CRemoteGotoGlyph(const CString &gfxName, const CString &tooltip, int roomIndex) : + CPetRemoteGlyph(), _gfxName(gfxName), _tooltip(tooltip), _roomIndex(roomIndex), + _goButton(nullptr) {} /** * Setup the glyph |