ScummVM API documentation
combat_path_finder.h
1/* ScummVM - Graphic Adventure Engine
2 *
3 * ScummVM is the legal property of its developers, whose names
4 * are too numerous to list here. Please refer to the COPYRIGHT
5 * file distributed with this source distribution.
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 *
20 */
21
22#ifndef NUVIE_PATHFINDER_COMBAT_PATH_FINDER_H
23#define NUVIE_PATHFINDER_COMBAT_PATH_FINDER_H
24
25#include "ultima/nuvie/pathfinder/actor_path_finder.h"
26
27namespace Ultima {
28namespace Nuvie {
29
30typedef enum {
31 PATHFINDER_NONE,
32 PATHFINDER_CHASE,
33 PATHFINDER_FLEE
34} CombatPathFinderMode;
35
37protected:
38 Actor *target;
39 CombatPathFinderMode target_mode;
40
41 bool update_location() override;
42
43 uint8 max_dist;
44
45public:
48 ~CombatPathFinder() override;
49 bool set_flee_mode(Actor *actor);
50 bool set_chase_mode(Actor *actor);
51 bool set_mode(CombatPathFinderMode mode, Actor *actor);
52 void set_distance(uint8 dist) {
53 max_dist = dist;
54 }
55
56 bool get_next_move(MapCoord &step) override;
57 bool reached_goal() override;
58};
59
60} // End of namespace Nuvie
61} // End of namespace Ultima
62
63#endif
Definition: actor.h:174
Definition: actor_path_finder.h:33
Definition: combat_path_finder.h:36
Definition: map.h:84