1 /************************************************************************
2  *                                                                      *
3  *  FreeSynd - a remake of the classic Bullfrog game "Syndicate".       *
4  *                                                                      *
5  *   Copyright (C) 2005  Stuart Binge  <skbinge@gmail.com>              *
6  *   Copyright (C) 2005  Joost Peters  <joostp@users.sourceforge.net>   *
7  *   Copyright (C) 2006  Trent Waddington <qg@biodome.org>              *
8  *   Copyright (C) 2006  Tarjei Knapstad <tarjei.knapstad@gmail.com>    *
9  *   Copyright (C) 2010  Bohdan Stelmakh <chamel@users.sourceforge.net> *
10  *                                                                      *
11  *    This program is free software;  you can redistribute it and / or  *
12  *  modify it  under the  terms of the  GNU General  Public License as  *
13  *  published by the Free Software Foundation; either version 2 of the  *
14  *  License, or (at your option) any later version.                     *
15  *                                                                      *
16  *    This program is  distributed in the hope that it will be useful,  *
17  *  but WITHOUT  ANY WARRANTY;  without even  the implied  warranty of  *
18  *  MERCHANTABILITY  or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  *
19  *  General Public License for more details.                            *
20  *                                                                      *
21  *    You can view the GNU  General Public License, online, at the GNU  *
22  *  project's  web  site;  see <http://www.gnu.org/licenses/gpl.html>.  *
23  *  The full text of the license is also included in the file COPYING.  *
24  *                                                                      *
25  ************************************************************************/
26 
27 #ifndef PATH_H
28 #define PATH_H
29 
30 #include "common.h"
31 #include "pathsurfaces.h"
32 
33 /*!
34  * This structure is used to store movement informations
35  * while ped is moving to a direction.
36  * Used by moveTodir().
37  */
38 struct DirMoveType {
39         int32 dir_orig;
40         int32 dir_last;
41         int32 dir_closest;
42         int32 dir_closer;
43         int32 dir_modifier;
44         int32 modifier_value;
45         // directional movement only
46         // to decide whether to continue movement by changing
47         // direction or not
48         bool bounce;
49         // walkn only on "safe" tiles
50         bool safe_walk;
51         // when closest is used and first movement is successful
52         bool on_new_tile;
clearDirMoveType53         void clear() {
54             dir_last = -1;
55             dir_modifier = 0;
56             modifier_value = 0;
57             bounce = false;
58             on_new_tile = false;
59             safe_walk = true;
60         }
61     };
62 
63 #endif
64