2016-03-04 23:37:40 -05:00
|
|
|
/* ScummVM - Graphic Adventure Engine
|
|
|
|
*
|
|
|
|
* ScummVM is the legal property of its developers, whose names
|
|
|
|
* are too numerous to list here. Please refer to the COPYRIGHT
|
|
|
|
* file distributed with this source distribution.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2016-03-31 13:05:17 -04:00
|
|
|
#ifndef TITANIC_PET_GFX_ELEMENT_H
|
|
|
|
#define TITANIC_PET_GFX_ELEMENT_H
|
2016-03-04 23:37:40 -05:00
|
|
|
|
2016-03-30 20:11:02 -04:00
|
|
|
#include "titanic/pet_control/pet_element.h"
|
2016-03-04 23:37:40 -05:00
|
|
|
|
|
|
|
namespace Titanic {
|
|
|
|
|
2016-03-31 13:05:17 -04:00
|
|
|
class CPetGfxElement: public CPetElement {
|
2016-04-18 22:52:11 -04:00
|
|
|
public:
|
2016-03-30 21:01:51 -04:00
|
|
|
CGameObject *_object0;
|
|
|
|
CGameObject *_object1;
|
|
|
|
CGameObject *_object2;
|
2016-03-04 23:37:40 -05:00
|
|
|
public:
|
2016-03-31 13:05:17 -04:00
|
|
|
CPetGfxElement() : CPetElement(), _object0(nullptr), _object1(nullptr),
|
2016-03-30 21:01:51 -04:00
|
|
|
_object2(nullptr) {}
|
|
|
|
|
|
|
|
/**
|
2016-03-31 19:55:45 -04:00
|
|
|
* Setup the element
|
2016-03-30 21:01:51 -04:00
|
|
|
*/
|
2016-03-31 13:05:17 -04:00
|
|
|
virtual void setup(PetElementMode mode, const CString &name,
|
2016-03-30 21:01:51 -04:00
|
|
|
CPetControl *petControl);
|
2016-03-04 23:37:40 -05:00
|
|
|
|
2016-03-31 19:55:45 -04:00
|
|
|
/**
|
2016-04-17 21:08:42 -04:00
|
|
|
* Reset the element
|
2016-03-31 19:55:45 -04:00
|
|
|
*/
|
2016-04-30 08:29:11 -04:00
|
|
|
virtual void reset(const CString &name, CPetControl *petControl,
|
|
|
|
PetElementMode mode = MODE_UNSELECTED);
|
2016-03-30 21:43:07 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Draw the item
|
|
|
|
*/
|
|
|
|
virtual void draw(CScreenManager *screenManager);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Draw the item
|
|
|
|
*/
|
|
|
|
virtual void draw(CScreenManager *screenManager, const Common::Point &destPos);
|
2016-03-04 23:37:40 -05:00
|
|
|
|
2016-03-30 21:01:51 -04:00
|
|
|
/**
|
|
|
|
* Get the bounds for the element
|
|
|
|
*/
|
2016-04-30 20:13:34 -04:00
|
|
|
virtual Rect getBounds() const;
|
2016-03-04 23:37:40 -05:00
|
|
|
|
2016-03-30 21:01:51 -04:00
|
|
|
/**
|
|
|
|
* Get the game object associated with this item
|
|
|
|
*/
|
|
|
|
virtual CGameObject *getObject() const;
|
2017-09-09 18:18:25 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets the explicit bounds set for the graphic element,
|
|
|
|
* ignoring any associated sub-object bounds
|
|
|
|
*/
|
|
|
|
const Rect &getRawBounds() const { return _bounds; }
|
2016-03-04 23:37:40 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
} // End of namespace Titanic
|
|
|
|
|
2016-03-31 13:05:17 -04:00
|
|
|
#endif /* TITANIC_PET_GFX_ELEMENT_H */
|