convert line ends
[canaan.git] / prj / cam / src / dark / crzombie.c
blob384cb22228c01d7608b1f72ff600b6572bc6ea1d
1 /*
2 @Copyright Looking Glass Studios, Inc.
3 1996,1997,1998,1999,2000 Unpublished Work.
4 */
6 // $Header: r:/t2repos/thief2/src/dark/crzombie.c,v 1.4 1998/10/23 01:49:18 CCAROLLO Exp $
7 // XXX this could really a DLL. just contains humanoid-specific data
9 #include <creatur_.h>
10 #include <crzombie.h>
11 #include <drkcret.h> // to get actor type definition
13 #include <dbmem.h> // must be last included header
15 #define HUMANOID_PHYS_RADIUS 1.0
17 #define SWORD_PHYS_RADIUS 0.3
19 static sCrPhysModOffset g_SwordPhysOffsets[] = \
21 { 14, 16, 0.75, SWORD_PHYS_RADIUS},
22 { 14, 16, 0.5, SWORD_PHYS_RADIUS},
23 { 15, 17, 0.75, SWORD_PHYS_RADIUS},
24 { 17, 17, 0, SWORD_PHYS_RADIUS},
27 static sCrPhysModOffsetTable g_WeaponPhysTable = \
29 sizeof(g_SwordPhysOffsets)/sizeof(g_SwordPhysOffsets[0]), g_SwordPhysOffsets
33 static sCrPhysModOffset g_aZomPhysModOffsets[] = \
35 { 8, 8, 0.0, 0.7},
36 { 18, 9, 0.7, 0.8},
39 // Joints
40 #define LTOE 0
41 #define RTOE 1
42 #define LANKLE 2
43 #define RANKLE 3
44 #define LKNEE 4
45 #define RKNEE 5
46 #define LHIP 6
47 #define RHIP 7
48 #define BUTT 8
49 #define NECK 9
50 #define LSHLDR 10
51 #define RSHLDR 11
52 #define LELBOW 12
53 #define RELBOW 13
54 #define LWRIST 14
55 #define RWRIST 15
56 #define LFINGER 16
57 #define RFINGER 17
58 #define ABDOMEN 18
59 #define HEAD 19
60 #define LSHLDRIN 20
61 #define RSHLDRIN 21
62 #define LWEAP 22
63 #define RWEAP 23
65 // mapping from joint id to exposed joint enum
66 static int g_aZomJointMap[] =
68 -1,
69 19,
71 18,
73 10,
74 11,
75 12,
76 13,
77 14,
78 15,
79 16,
80 17,
89 -1,
92 // array of mappings from jointIDs -> parent jointIDs
93 static int g_aZomJointParents[] =
95 LANKLE, // LTOE
96 RANKLE, // RTOE
97 LKNEE, // LANKLE
98 RKNEE, // RANKLE
99 LHIP, // LKNEE
100 RHIP, // RKNEE
101 BUTT, // LHIP
102 BUTT, // RHIP
103 BUTT, // BUTT
104 ABDOMEN, // NECK
105 ABDOMEN, // LSHLDR
106 ABDOMEN, // RSHLDR
107 LSHLDR, // LELBOW
108 RSHLDR, // RELBOW
109 LELBOW, // LWRIST
110 RELBOW, // RWRIST
111 LWRIST, // LFINGER
112 RWRIST, // RFINGER
113 BUTT, // ABDOMEN
114 NECK, // HEAD
117 static torso g_aDefTorsos[2]= {\
118 {BUTT,-1,3,{LHIP,RHIP,ABDOMEN}},
119 {ABDOMEN,0,3,{LSHLDR,RSHLDR,NECK}},
122 static limb g_aDefLimbs[5]= {\
123 {0,1,3,{LHIP,LKNEE,LANKLE,LTOE}},
124 {0,1,3,{RHIP,RKNEE,RANKLE,RTOE}},
125 {1,0,3,{LSHLDR,LELBOW,LWRIST,LFINGER}},
126 {1,0,3,{RSHLDR,RELBOW,RWRIST,RFINGER}},
127 {1,0,1,{NECK,HEAD}},
130 static int g_FootJoints[2]={ LANKLE, RANKLE };
132 const sCreatureDesc sCrZombieDesc = \
134 kDATYPE_Humanoid, // actor type
135 2, // num torsos
136 5, // num limbs
137 20, // num joints
138 "expzom", // default lengths filename
139 2, // number of phys models
140 HUMANOID_PHYS_RADIUS, // default phys radius
141 g_aZomPhysModOffsets, // array of phys model offsets
142 g_aZomJointParents, // joint parent mapping
143 g_aZomJointMap,
144 2, // num feet
145 g_FootJoints, // foot joints
146 g_aDefTorsos, // default torso values (if lengths file not found)
147 g_aDefLimbs, // default limb values (if lengths file not found)
148 kDCrWeap_NumWeapons, // number of weapons
149 &g_WeaponPhysTable, // weapon physics model offsets
150 FALSE, // always ballistic
151 TRUE, // uses head tracking