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_RAW_BRUSH_H
19#define RME_RAW_BRUSH_H
20
21#include "brush.h"
22
23//=============================================================================
24// RAWBrush, draw items like SimOne's editor
25
26class RAWBrush : public Brush {
27public:
28 RAWBrush(uint16_t itemid); // Create a RAWBrush of the specified type
29 virtual ~RAWBrush();
30
31 bool isRaw() const {
32 return true;
33 }
34 RAWBrush* asRaw() {
35 return static_cast<RAWBrush*>(this);
36 }
37
38 virtual bool canDraw(BaseMap* map, const Position& position) const {
39 return true;
40 }
41 virtual void draw(BaseMap* map, Tile* tile, void* parameter);
42 virtual void undraw(BaseMap* map, Tile* tile);
43
44 virtual bool canDrag() const {
45 return true;
46 }
47 virtual int getLookID() const;
48 virtual std::string getName() const;
49 ItemType* getItemType() const {
50 return itemtype;
51 }
52 uint16_t getItemID() const;
53
54protected:
55 ItemType* itemtype;
56};
57
58#endif
59