Debian Codegraph @

Descent3/bnode.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 --- HISTORICAL COMMENTS FOLLOW ---
19
20 * $Logfile: /DescentIII/main/bnode.h $
21 * $Revision: 13 $
22 * $Date: 5/06/99 5:18p $
23 * $Author: Chris $
24 *
25 * BOA Helper Node structs and externs
26 *
27 * $Log: /DescentIII/main/bnode.h $
28 *
29 * 13 5/06/99 5:18p Chris
30 * Updated the BNode system - vastly improved error checking and verify
31 *
32 * 12 5/03/99 12:56a 3dsmax
33 * Knocked MAX_BNODES_PER_ROOM down to 127 after reading the comment about
34 * a byte count in the portal struct.
35 *
36 * 11 5/03/99 12:50a 3dsmax
37 * Changed MAX_BNODES_PER_ROOM from 100 to 200 for Luke. (MattT)
38 *
39 * 10 4/29/99 1:59a Chris
40 * Added the portal blockage support
41 *
42 * 9 4/28/99 5:33a Chris
43 * Further improved the BNode system. (It actually works inside and
44 * outside now)
45 *
46 * 8 4/27/99 3:01a Chris
47 * Improving Bnode stuff
48 *
49 * 7 4/26/99 11:11a Chris
50 * Updated Bnode system
51 *
52 * 6 4/25/99 9:02p Chris
53 * Improving the Bnode system
54 *
55 * 5 4/18/99 4:35p Matt
56 * Changed BNode_FreeRoom() to take a room pointer instead of a room
57 * number, since it was being called for rooms in the scrap buffer, which
58 * weren't in the room list. Also added code to InitRoom() to init the
59 * bnode data.
60 *
61 * 4 4/18/99 5:39a Chris
62 * Vastly improved the path node system
63 *
64 * 3 4/15/99 5:48p Chris
65 * Fixed a bug with rendering the BOAPath nodes
66 *
67 * 2 4/14/99 3:13p Chris
68 * Beginning to add BoaNode stuff
69 *
70 * $NoKeywords: $
71 */
72
73 #ifndef BNODE_H_
74 #define BNODE_H_cxx . . $ `Descent3/bnode.h:74:9`!
75
76 #include "vecmat_external.h"cxx . . $ `<file>/lib/vecmat_external.h`/
77
78 #define MAX_BNODE_SIZEcxx . . $ `Descent3/bnode.h:78:9`! 20.0f
79 // Not bigger than 127 - char bnode - in portal struct
80 #define MAX_BNODES_PER_ROOMcxx . . $ `Descent3/bnode.h:80:9`! 127
81
82 struct bn_edgecxx . . $ bn_edge# {
83 int16_tcxx . . $ int16_t# end_roomcxx . . $ bn_edge#end_room.;
84 char end_indexcxx . . $ bn_edge#end_index.;
85
86 int16_tcxx . . $ int16_t# flagscxx . . $ bn_edge#flags.;
87 int16_tcxx . . $ int16_t# costcxx . . $ bn_edge#cost.;
88
89 float max_radcxx . . $ bn_edge#max_rad.;
90 };
91
92 struct bn_nodecxx . . $ bn_node# {
93 vectorcxx . . $ vector# poscxx . . $ bn_node#pos.;
94 int num_edgescxx . . $ bn_node#num_edges.;
95 bn_edgecxx . . $ bn_edge# *edgescxx . . $ bn_node#edges.;
96 };
97
98 struct bn_listcxx . . $ bn_list# {
99 int num_nodescxx . . $ bn_list#num_nodes.;
100 bn_nodecxx . . $ bn_node# *nodescxx . . $ bn_list#nodes.;
101 };
102
103 struct roomcxx . . $ room#;
104
105 extern void BNode_FreeRoomcxx . . $ BNode_FreeRoom(cd8c4e8cd0ee4c38).(roomcxx . . $ room# *rp);
106 extern void BNode_ClearBNodeInfocxx . . $ BNode_ClearBNodeInfo(49f6e7a06ebc5aa8).(void);
107
108 bn_listcxx . . $ bn_list# *BNode_GetBNListPtrcxx . . $ BNode_GetBNListPtr(a42128dcaf4239a4).(int roomnum, bool f_in_load_level = false);
109
110 extern bn_listcxx . . $ bn_list# BNode_terrain_listcxx . . $ BNode_terrain_list.[8];
111 extern bool BNode_allocatedcxx . . $ BNode_allocated.;
112 extern bool BNode_verifiedcxx . . $ BNode_verified.;
113 void BNode_RemapTerrainRoomscxx . . $ BNode_RemapTerrainRooms(3e454b8ccf442868).(int old_hri, int new_hri);
114
115 extern int BNode_Pathcxx . . $ BNode_Path.[MAX_BNODES_PER_ROOMcxx . . $ `Descent3/bnode.h:80:9`!];
116 extern int BNode_PathNumNodescxx . . $ BNode_PathNumNodes.;
117 extern bool BNode_FindPathcxx . . $ BNode_FindPath(88bfc9447631a049).(int start_room, int i, int j, float rad);
118 extern int BNode_FindDirLocalVisibleBNodecxx . . $ BNode_FindDirLocalVisibleBNode(d2d3175ccbf91b7d).(int roomnum, vectorcxx . . $ vector# *pos, vectorcxx . . $ vector# *fvec, float rad);
119 extern int BNode_FindClosestLocalVisibleBNodecxx . . $ BNode_FindClosestLocalVisibleBNode(fadc9d1e831a2875).(int roomnum, vectorcxx . . $ vector# *pos, float rad);
120
121 #endif