Debian Codegraph @

Descent3/aipath.h

raw symbols SCIP
1 /*
2 * Descent 3
3 * Copyright (C) 2024 Parallax Software
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19 #ifndef AIPATH_H_
20 #define AIPATH_H_
21
22 #include "object.h"
23 #include "pstypes.h"
24 #include "aistruct.h"
25
26 // Exported functions
27 extern void AIPathMoveTurnTowardsNode(object *obj, vector *mdir, bool *f_moved);
28 // void AIPathMoveTowardsRoom(object *obj, int room_index);
29 extern bool AIPathSetAsStaticPath(object *obj, void *goal_ptr, int path_id, int start_node, int end_node, int cur_node);
30 extern bool AIPathAllocPath(object *obj, ai_frame *ai_info, void *goal_ptr, int *start_room, vector *start_pos,
31 int *end_room, vector *end_pos, float rad, int flags, int handle, int ignore_obj = -1);
32 extern bool AIPathInitPath(ai_path_info *aip);
33 extern bool AIPathFreePath(ai_path_info *aip);
34 extern bool AIFindAltPath(object *obj, int i, int j, float *dist = NULL);
35
36 extern bool AIPathAtEnd(ai_path_info *aip);
37 extern bool AIPathAtStart(ai_path_info *aip);
38 extern bool AIPathGetNextNodePos(ai_path_info *aip, vector *pos, int *room = NULL);
39 extern bool AIPathGetPrevNodePos(ai_path_info *aip, vector *pos, int *room = NULL);
40 extern bool AIPathGetCurrentNodePos(ai_path_info *aip, vector *pos, int *room = NULL);
41
42 #ifdef _DEBUG
43 extern bool MakeTestPath(int *start_room, vector *pos);
44
45 extern int AIPath_test_end_room;
46 extern vector AIPath_test_end_pos;
47 #endif
48
49 #endif