Debian Codegraph @

tools/heretic2/qcommon/reference.h

raw symbols SCIP
1 /*
2 Copyright (C) 1999-2007 id Software, Inc. and contributors.
3 For a list of contributors, see the accompanying CONTRIBUTORS file.
4
5 This file is part of GtkRadiant.
6
7 GtkRadiant 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 2 of the License, or
10 (at your option) any later version.
11
12 GtkRadiant 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 GtkRadiant; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21
22 #ifndef REFERENCE_H
23 #define REFERENCE_H
24
25 #include "placement.h"
26
27 #define MAX_REFPOINTS 16
28 #define REF_MINCULLTIME 1.0
29
30 typedef struct Reference_s
31 {
32 int activecount;
33 Placement_t placement;
34 } Reference_t;
35
36 typedef struct LERPedReferences_s
37 {
38 int refType;
39 int *jointIDs;
40 float lastUpdate;
41 Reference_t references[MAX_REFPOINTS];
42 Reference_t oldReferences[MAX_REFPOINTS];
43 } LERPedReferences_t;
44
45 // Reference Types
46 enum {
47 REF_NULL = -1,
48 REF_CORVUS, //0
49 REF_INSECT, //1
50 REF_PRIESTESS, //2
51 REF_MORK, //3
52 NUM_REFERENCED //4
53 };
54
55 // Corvus Reference Points
56 enum {
57 CORVUS_LEFTHAND, //0
58 CORVUS_RIGHTHAND,
59 CORVUS_LEFTFOOT,
60 CORVUS_RIGHTFOOT,
61 CORVUS_STAFF,
62 CORVUS_BLADE,
63 CORVUS_HELL_HEAD,
64 NUM_REFERENCES_CORVUS //7
65 };
66
67 // Tchekrik Reference Points
68 enum {
69 INSECT_STAFF, //0
70 INSECT_SWORD,
71 INSECT_SPEAR,
72 INSECT_RIGHTFOOT,
73 INSECT_LEFTFOOT,
74 NUM_REFERENCES_INSECT //5
75 };
76
77 // High Priestess Reference Points
78 enum {
79 PRIESTESS_BACK, //0
80 PRIESTESS_STAFF,
81 PRIESTESS_LHAND,
82 PRIESTESS_RHAND,
83 PRIESTESS_RFOOT,
84 PRIESTESS_LFOOT,
85 NUM_REFERENCES_PRIESTESS //6
86 };
87
88 // Morcalavin Reference Points
89 enum
90 {
91 MORK_STAFFREF, //0
92 MORK_RFOOTREF, //1
93 MORK_LFOOTREF, //2
94 MORK_RHANDREF, //3
95 MORK_LHANDREF, //4
96 MORK_LEYEREF, //5
97 MORK_REYEREF, //6
98 NUM_REFERENCES_MORK //7
99 };
100
101 #define CORVUS_LIMBS_MASK ( ( 1 << CORVUS_LEFTHAND ) | ( 1 << CORVUS_RIGHTHAND ) | ( 1 << CORVUS_LEFTFOOT ) | ( 1 << CORVUS_RIGHTFOOT ) )
102 #define CORVUS_WEAPON_MASK ( ( 1 << CORVUS_STAFF ) | ( 1 << CORVUS_BLADE ) | ( 1 << CORVUS_HELL_HEAD ) )
103 #define CORVUS_MASK ( CORVUS_LIMBS_MASK | CORVUS_WEAPON_MASK )
104
105 #define INSECT_MASK ( ( 1 << INSECT_STAFF ) | ( 1 << INSECT_SWORD ) | ( 1 << INSECT_SPEAR ) | ( 1 << INSECT_RIGHTFOOT ) | ( 1 << INSECT_LEFTFOOT ) )
106
107 #define PRIESTESS_MASK ( ( 1 << PRIESTESS_BACK ) | ( 1 << PRIESTESS_STAFF ) | ( 1 << PRIESTESS_LHAND ) | ( 1 << PRIESTESS_RHAND ) | ( 1 << PRIESTESS_RFOOT ) | ( 1 << PRIESTESS_LFOOT ) )
108
109 #define MORK_MASK ( ( 1 << MORK_STAFFREF ) | ( 1 << MORK_RFOOTREF ) | ( 1 << MORK_LFOOTREF ) | ( 1 << MORK_RHANDREF ) | ( 1 << MORK_LHANDREF ) | ( 1 << MORK_LEYEREF ) | ( 1 << MORK_REYEREF ) )
110
111 extern char *referenceRootNames[];
112 extern int referenceRootNameOffsets[];
113 extern int numReferences[];
114
115 void EnableRefPoints( LERPedReferences_t *refInfo, int mask );
116 void DisableRefPoints( LERPedReferences_t *refInfo, int mask );
117
118 void InitReferenceMngr();
119 void ReleaseReferenceMngr();
120
121 LERPedReferences_t *LERPedReferences_new( int init_refType );
122 void LERPedReferences_delete( LERPedReferences_t *toDelete );
123
124 #endif