View difference between Paste ID: RHXJwR02 and 3TpXh4mC
SHOW: | | - or go back to the newest paste.
1
struct studiohdr37_t
2
{
3
	int	id;
4
	int	version;
5
6
	long checksum;	// this has to be the same in the phy and vtx files to load!
7
8
	char name[64];
9
	int	length;
10
11
12
	Vector	eyeposition;	// ideal eye position
13
14
	Vector	illumposition;	// illumination center
15
16
	Vector	hull_min;	// ideal movement hull size
17
	Vector	hull_max;			
18
19
	Vector	view_bbmin;	// clipping bounding box
20
	Vector	view_bbmax;	
21
22
	int	flags;
23
24
	int	numbones;	// bones
25
	int	boneindex;
26
	inline mstudiobone_t *pBone( int i ) const { return (mstudiobone_t *)(((byte *)this) + boneindex) + i; };
27
28
	int	numbonecontrollers;	// bone controllers
29
	int	bonecontrollerindex;
30
	inline mstudiobonecontroller_t *pBonecontroller( int i ) const { return (mstudiobonecontroller_t *)(((byte *)this) + bonecontrollerindex) + i; };
31
32
	int	numhitboxsets;
33
	int	hitboxsetindex; 
34
35
	// Look up hitbox set by index
36
	mstudiohitboxset_t  *pHitboxSet( int i ) const 
37
	{ 
38
		return (mstudiohitboxset_t *)(((byte *)this) + hitboxsetindex ) + i; 
39
	};
40
41
	// Calls through to hitbox to determine size of specified set
42
	inline mstudiobbox_t *pHitbox( int i, int set ) const 
43
	{ 
44
		mstudiohitboxset_t const *s = pHitboxSet( set );
45
		if ( !s )
46
			return NULL;
47
48
		return s->pHitbox( i );
49
	};
50
51
	// Calls through to set to get hitbox count for set
52
	inline int  iHitboxCount( int set ) const
53
	{
54
		mstudiohitboxset_t const *s = pHitboxSet( set );
55
		if ( !s )
56
			return 0;
57
58
		return s->numhitboxes;
59
	};
60
61
	/*
62
	int					numhitboxes;			// complex bounding boxes
63
	int					hitboxindex;			
64
	inline mstudiobbox_t *pHitbox( int i ) const { return (mstudiobbox_t *)(((byte *)this) + hitboxindex) + i; };
65
	*/
66
67
	int	numanim;	// animations/poses
68
	int	animdescindex;	// animation descriptions
69
	inline mstudioanimdesc_t *pAnimdesc( int i ) const { return (mstudioanimdesc_t *)(((byte *)this) + animdescindex) + i; };
70
71
	int 	numanimgroup;
72
	int 	animgroupindex;
73
	inline  mstudioanimgroup_t *pAnimGroup(int i) const	{ return (mstudioanimgroup_t *)(((byte *)this) + animgroupindex) + i; };
74
75
	int 	numbonedesc;
76
	int 	bonedescindex;
77
	inline  mstudiobonedesc_t *pBoneDesc(int i) const { return (mstudiobonedesc_t *)(((byte *)this) + bonedescindex) + i; };
78
79
	int	numseq;		// sequences
80
	int	seqindex;
81
	inline mstudioseqdesc37_t *pSeqdesc( int i ) const { if (i < 0 || i >= numseq) i = 0; return (mstudioseqdesc37_t *)(((byte *)this) + seqindex) + i; };
82
	int	sequencesindexed;	// initialization flag - have the sequences been indexed?
83
84
	int	numseqgroups;		// demand loaded sequences
85
	int	seqgroupindex;
86
	inline  mstudioseqgroup_t *pSeqgroup(int i) const { return (mstudioseqgroup_t *)(((byte *)this) + seqgroupindex) + i; };
87
88
	int	numtextures;		// raw textures
89
	int	textureindex;
90
	inline mstudiotexture_t *pTexture( int i ) const { return (mstudiotexture_t *)(((byte *)this) + textureindex) + i; }; 
91
92
	int	numcdtextures;		// raw textures search paths
93
	int	cdtextureindex;
94
	inline char			*pCdtexture( int i ) const { return (((char *)this) + *((int *)(((byte *)this) + cdtextureindex) + i)); };
95
96
	int	numskinref;		// replaceable textures tables
97
	int	numskinfamilies;
98
	int	skinindex;
99
	inline short		*pSkinref( int i ) const { return (short *)(((byte *)this) + skinindex) + i; };
100
101
	int	numbodyparts;		
102
	int	bodypartindex;
103
	inline mstudiobodyparts_t	*pBodypart( int i ) const { return (mstudiobodyparts_t *)(((byte *)this) + bodypartindex) + i; };
104
105
	int	numattachments;		// queryable attachable points
106
	int	attachmentindex;
107
	inline mstudioattachment_t	*pAttachment( int i ) const { return (mstudioattachment_t *)(((byte *)this) + attachmentindex) + i; };
108
109
	int	numtransitions;		// animation node to animation node transition graph
110
	int	transitionindex;
111
	inline byte	*pTransition( int i ) const { return (byte *)(((byte *)this) + transitionindex) + i; };
112
113
	int	numflexdesc;
114
	int	flexdescindex;
115
	inline mstudioflexdesc_t *pFlexdesc( int i ) const { return (mstudioflexdesc_t *)(((byte *)this) + flexdescindex) + i; };
116
117
	int	numflexcontrollers;
118
	int	flexcontrollerindex;
119
	inline mstudioflexcontroller_t *pFlexcontroller( int i ) const { return (mstudioflexcontroller_t *)(((byte *)this) + flexcontrollerindex) + i; };
120
121
	int	numflexrules;
122
	int	flexruleindex;
123
	inline mstudioflexrule_t *pFlexRule( int i ) const { return (mstudioflexrule_t *)(((byte *)this) + flexruleindex) + i; };
124
125
	int	numikchains;
126
	int	ikchainindex;
127
	inline mstudioikchain_t *pIKChain( int i ) const { return (mstudioikchain_t *)(((byte *)this) + ikchainindex) + i; };
128
129
	int	nummouths;
130
	int	mouthindex;
131
	inline mstudiomouth_t *pMouth( int i ) const { return (mstudiomouth_t *)(((byte *)this) + mouthindex) + i; };
132
133
	int	numposeparameters;
134
	int	poseparamindex;
135
	inline mstudioposeparamdesc_t *pPoseParameter( int i ) const { return (mstudioposeparamdesc_t *)(((byte *)this) + poseparamindex) + i; };
136
137
	int	surfacepropindex;
138
	inline char * const pszSurfaceProp( void ) const { return ((char *)this) + surfacepropindex; }
139
140
	// Key values
141
	int	keyvalueindex;
142
	int	keyvaluesize;
143
	inline const char * KeyValueText( void ) const { return keyvaluesize != 0 ? ((char *)this) + keyvalueindex : NULL; }
144
145
	int	numikautoplaylocks;
146
	int	ikautoplaylockindex;
147
	inline mstudioiklock_t *pIKAutoplayLock( int i ) const { return (mstudioiklock_t *)(((byte *)this) + ikautoplaylockindex) + i; };
148
149
	float mass;		// The collision model mass that jay wanted
150
	int	contents;
151
152
	//int	unused[9];	// remove as appropriate
153
	int	unused[5];	// remove as appropriate
154
};
155
156
// header for demand loaded sequence group data
157
struct studioseqhdr37_t
158
{
159
	int	id;
160
	int	version;
161
162
	char name[64];
163
	int	length;
164
165
	int data;
166
167
	int numbones; // bones
168
	int boneindex;
169
	inline mstudiobonedesc_t *pBone( int i ) const { return (mstudiobonedesc_t *)(((byte *)this) + boneindex) + i; };
170
171
	int numanim; // animations/poses
172
	int animdescindex; // animation descriptions
173
	inline mstudioanimdesc_t  *pAnimdesc( int i ) const { return (mstudioanimdesc_t *)(((byte *)this) + animdescindex) + i; };
174
};