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#include "main.h"
19
20#include "waypoint_brush.h"
21#include "waypoints.h"
22#include "basemap.h"
23
24//=============================================================================
25// Waypoint Brush
26
27WaypointBrush::WaypointBrush() :
28 Brush() {
29 ////
30}
31
32WaypointBrush::~WaypointBrush() {
33 ////
34}
35
36void WaypointBrush::setWaypoint(Waypoint* wp) {
37 if (wp) {
38 waypoint_name = wp->name;
39 } else {
40 waypoint_name = "";
41 }
42}
43
44std::string WaypointBrush::getWaypoint() const {
45 return waypoint_name;
46}
47
48bool WaypointBrush::canDraw(BaseMap* map, const Position& position) const {
49 return map->getTile(position) != nullptr;
50}
51
52void WaypointBrush::undraw(BaseMap* map, Tile* tile) {
53 // Never called
54 ASSERT(false);
55}
56
57void WaypointBrush::draw(BaseMap* map, Tile* tile, void* parameter) {
58 // Never called
59 ASSERT(false);
60}
61