]> de.git.xonotic.org Git - xonotic/netradiant.git/blob - tools/quake2/qdata_heretic2/qcommon/reference.h
9acdc56bc70fc3f9cc1cb16bd717a642da1f9365
[xonotic/netradiant.git] / tools / quake2 / qdata_heretic2 / qcommon / reference.h
1 /*\r
2 Copyright (C) 1999-2007 id Software, Inc. and contributors.\r
3 For a list of contributors, see the accompanying CONTRIBUTORS file.\r
4 \r
5 This file is part of GtkRadiant.\r
6 \r
7 GtkRadiant is free software; you can redistribute it and/or modify\r
8 it under the terms of the GNU General Public License as published by\r
9 the Free Software Foundation; either version 2 of the License, or\r
10 (at your option) any later version.\r
11 \r
12 GtkRadiant is distributed in the hope that it will be useful,\r
13 but WITHOUT ANY WARRANTY; without even the implied warranty of\r
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
15 GNU General Public License for more details.\r
16 \r
17 You should have received a copy of the GNU General Public License\r
18 along with GtkRadiant; if not, write to the Free Software\r
19 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\r
20 */\r
21 \r
22 #ifndef REFERENCE_H\r
23 #define REFERENCE_H\r
24 \r
25 #include "placement.h"\r
26 \r
27 #define MAX_REFPOINTS           16\r
28 #define REF_MINCULLTIME         1.0\r
29 \r
30 typedef struct Reference_s\r
31 {\r
32         int activecount;\r
33         Placement_t placement;\r
34 } Reference_t;\r
35 \r
36 typedef struct LERPedReferences_s\r
37 {\r
38         int                     refType;\r
39         int                     *jointIDs;\r
40         float           lastUpdate;\r
41         Reference_t references[MAX_REFPOINTS];\r
42         Reference_t oldReferences[MAX_REFPOINTS];\r
43 } LERPedReferences_t;\r
44 \r
45 // Reference Types\r
46 enum {\r
47         REF_NULL = -1,\r
48         REF_CORVUS,//0\r
49         REF_INSECT,//1\r
50         REF_PRIESTESS,//2\r
51         REF_MORK,//3\r
52         NUM_REFERENCED//4\r
53 };\r
54 \r
55 // Corvus Reference Points\r
56 enum {\r
57         CORVUS_LEFTHAND,//0\r
58         CORVUS_RIGHTHAND,\r
59         CORVUS_LEFTFOOT,\r
60         CORVUS_RIGHTFOOT,\r
61         CORVUS_STAFF,\r
62         CORVUS_BLADE,\r
63         CORVUS_HELL_HEAD,\r
64         NUM_REFERENCES_CORVUS//7\r
65 };\r
66 \r
67 // Tchekrik Reference Points\r
68 enum {\r
69         INSECT_STAFF,//0\r
70         INSECT_SWORD,\r
71         INSECT_SPEAR,\r
72         INSECT_RIGHTFOOT,\r
73         INSECT_LEFTFOOT,\r
74         NUM_REFERENCES_INSECT//5\r
75 };\r
76 \r
77 // High Priestess Reference Points\r
78 enum {\r
79         PRIESTESS_BACK,//0\r
80         PRIESTESS_STAFF,\r
81         PRIESTESS_LHAND,\r
82         PRIESTESS_RHAND,\r
83         PRIESTESS_RFOOT,\r
84         PRIESTESS_LFOOT,\r
85         NUM_REFERENCES_PRIESTESS//6\r
86 };\r
87 \r
88 // Morcalavin Reference Points\r
89 enum \r
90 {\r
91         MORK_STAFFREF,//0\r
92         MORK_RFOOTREF,//1\r
93         MORK_LFOOTREF,//2\r
94         MORK_RHANDREF,//3\r
95         MORK_LHANDREF,//4\r
96         MORK_LEYEREF,//5\r
97         MORK_REYEREF,//6\r
98         NUM_REFERENCES_MORK//7\r
99 };\r
100 \r
101 #define CORVUS_LIMBS_MASK       ((1 << CORVUS_LEFTHAND) | (1 << CORVUS_RIGHTHAND) | (1 << CORVUS_LEFTFOOT) | (1 << CORVUS_RIGHTFOOT))\r
102 #define CORVUS_WEAPON_MASK      ((1 << CORVUS_STAFF) | (1 << CORVUS_BLADE) | (1 << CORVUS_HELL_HEAD))\r
103 #define CORVUS_MASK                     (CORVUS_LIMBS_MASK | CORVUS_WEAPON_MASK)\r
104 \r
105 #define INSECT_MASK                     ((1 << INSECT_STAFF) | (1 << INSECT_SWORD) | (1 << INSECT_SPEAR) | (1 << INSECT_RIGHTFOOT) | (1 << INSECT_LEFTFOOT))\r
106 \r
107 #define PRIESTESS_MASK          ((1 << PRIESTESS_BACK) | (1 << PRIESTESS_STAFF) | (1 << PRIESTESS_LHAND) | (1 << PRIESTESS_RHAND) | (1 << PRIESTESS_RFOOT) | (1 << PRIESTESS_LFOOT))\r
108 \r
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))\r
110 \r
111 extern char *referenceRootNames[];\r
112 extern int referenceRootNameOffsets[];\r
113 extern int numReferences[];\r
114 \r
115 void EnableRefPoints(LERPedReferences_t *refInfo, int mask);\r
116 void DisableRefPoints(LERPedReferences_t *refInfo, int mask);\r
117 \r
118 void InitReferenceMngr();\r
119 void ReleaseReferenceMngr();\r
120 \r
121 LERPedReferences_t *LERPedReferences_new(int init_refType);\r
122 void LERPedReferences_delete(LERPedReferences_t *toDelete);\r
123 \r
124 #endif\r
125 \r
126 \r