1 /*
2  * client/Decoration.hpp
3  *
4  * This file is part of Leges Motus, a networked, 2D shooter set in zero gravity.
5  *
6  * Copyright 2009-2010 Andrew Ayer, Nathan Partlan, Jeffrey Pfau
7  *
8  * Leges Motus is free and open source software.  You may redistribute it and/or
9  * modify it under the terms of version 2, or (at your option) version 3, of the
10  * GNU General Public License (GPL), as published by the Free Software Foundation.
11  *
12  * Leges Motus is distributed in the hope that it will be useful, but WITHOUT ANY
13  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14  * PARTICULAR PURPOSE.  See the full text of the GNU General Public License for
15  * further detail.
16  *
17  * For a full copy of the GNU General Public License, please see the COPYING file
18  * in the root of the source code tree.  You may also retrieve a copy from
19  * <http://www.gnu.org/licenses/gpl-2.0.txt>, or request a copy by writing to the
20  * Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
21  * 02111-1307  USA
22  *
23  */
24 
25 #ifndef LM_CLIENT_DECORATION_HPP
26 #define LM_CLIENT_DECORATION_HPP
27 
28 #include "BaseMapObject.hpp"
29 #include "MapObjectParams.hpp"
30 #include <string>
31 
32 namespace LM {
33 	class Decoration : public BaseMapObject {
34 	private:
35 		std::string		m_graphic_name;
36 		MapObjectParams		m_params;
37 		Graphic*		m_graphic;
38 
39 	public:
40 		explicit Decoration (Point pos);
41 
get_graphic() const42 		virtual Graphic*	get_graphic () const { return m_graphic; }
get_bounding_shape() const43 		virtual const Shape*	get_bounding_shape () const { return NULL; }
44 
is_jumpable() const45 		virtual bool	is_jumpable () const { return false; }
is_shootable() const46 		virtual bool	is_shootable () const { return false; }
is_collidable() const47 		virtual bool	is_collidable () const { return false; }
is_interactive() const48 		virtual bool	is_interactive () const { return false; }
is_engaged() const49 		virtual bool	is_engaged () const { return false; }
shot(GameController & gc,Player & shooter,Point point_hit,double direction)50 		virtual bool	shot (GameController& gc, Player& shooter, Point point_hit, double direction) { return false; }
collide(GameController & gc,Player & player,Point old_position,double angle_of_incidence)51 		virtual void	collide (GameController& gc, Player& player, Point old_position, double angle_of_incidence) { }
interact(GameController & gc,Player & player)52 		virtual void	interact (GameController& gc, Player& player) { }
disengage(GameController & gc,Player & player)53 		virtual void	disengage (GameController& gc, Player& player) { }
54 		virtual void	init (MapReader& reader, ClientMap& map);
55 	};
56 }
57 
58 #endif
59