1//////////////////////////////////////////////////////////////////////
2// This file is part of Remere's Map Editor
3//////////////////////////////////////////////////////////////////////
4// Remere's Map Editor is free software: you can redistribute it and/or modify
5// it under the terms of the GNU General Public License as published by
6// the Free Software Foundation, either version 3 of the License, or
7// (at your option) any later version.
8//
9// Remere's Map Editor is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12// GNU General Public License for more details.
13//
14// You should have received a copy of the GNU General Public License
15// along with this program. If not, see <http://www.gnu.org/licenses/>.
16//////////////////////////////////////////////////////////////////////
17
18#ifndef RME_CREATURE_BRUSH_H
19#define RME_CREATURE_BRUSH_H
20
21#include "brush.h"
22
23//=============================================================================
24// CreatureBrush, place creatures
25
26class CreatureBrush : public Brush {
27public:
28 CreatureBrush(CreatureType* type); // Create a RAWBrush of the specified type
29 virtual ~CreatureBrush();
30
31 bool isCreature() const {
32 return true;
33 }
34 CreatureBrush* asCreature() {
35 return static_cast<CreatureBrush*>(this);
36 }
37
38 virtual bool canDraw(BaseMap* map, const Position& position) const;
39 virtual void draw(BaseMap* map, Tile* tile, void* parameter);
40 void draw_creature(BaseMap* map, Tile* tile);
41 virtual void undraw(BaseMap* map, Tile* tile);
42
43 CreatureType* getType() const {
44 return creature_type;
45 }
46
47 virtual int getLookID() const; // We don't have a look type, this will always return 0
48 virtual std::string getName() const;
49 virtual bool canDrag() const {
50 return false;
51 }
52 virtual bool canSmear() const {
53 return true;
54 }
55 virtual bool oneSizeFitsAll() const {
56 return true;
57 }
58
59protected:
60 CreatureType* creature_type;
61};
62
63#endif
64