ScummVM API documentation
sched_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_SCHED_PATH_FINDER_H
23
#define NUVIE_PATHFINDER_SCHED_PATH_FINDER_H
24
25
#include "ultima/nuvie/pathfinder/actor_path_finder.h"
26
27
namespace
Ultima
{
28
namespace
Nuvie {
29
30
/* Long-range pathfinder for NPCs.
31
*/
32
class
SchedPathFinder
:
public
ActorPathFinder
{
33
protected
:
34
uint32 prev_step_i, next_step_i;
/* step counters */
35
36
public
:
37
/* Pass 'path_type' to define search rules and methods to be used. The
38
PathFinder is responsible for deleting it when finished. */
39
SchedPathFinder
(
Actor
*a,
MapCoord
g,
Path
*path_type);
40
~
SchedPathFinder
()
override
;
41
42
bool
get_next_move(
MapCoord
&step)
override
;
/* returns the next step in the path */
43
bool
find_path()
override
;
/* gets a NEW path from location->goal */
44
void
actor_moved()
override
;
/* update location and step counters */
45
46
bool
check_loc(
const
MapCoord
&loc)
override
;
// ignores other actors
47
protected
:
48
bool
is_location_in_path();
49
void
incr_step();
50
};
51
52
}
// End of namespace Nuvie
53
}
// End of namespace Ultima
54
55
#endif
Ultima::Nuvie::Actor
Definition:
actor.h:178
Ultima::Nuvie::Path
Definition:
path.h:36
Ultima::Nuvie::SchedPathFinder
Definition:
sched_path_finder.h:32
Ultima
Definition:
detection.h:27
Ultima::Nuvie::MapCoord
Definition:
map.h:84
Ultima::Nuvie::ActorPathFinder
Definition:
actor_path_finder.h:33
engines
ultima
nuvie
pathfinder
sched_path_finder.h
Generated on Mon Dec 23 2024 09:21:25 for ScummVM API documentation by
1.8.13