forked from BloodSharp/sxe-base-v8
-
Notifications
You must be signed in to change notification settings - Fork 0
/
studio.h
146 lines (140 loc) · 6.11 KB
/
studio.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
#ifndef __STUDIO_MODEL_RENDERER__
#define __STUDIO_MODEL_RENDERER__
// Prototypes for original calls
void oInit(void);
int oStudioDrawModel (int flags);
int oStudioDrawPlayer(int flags, struct entity_state_s *pplayer);
mstudioanim_t oStudioGetAnim( model_t *m_pSubModel, mstudioseqdesc_t *pseqdesc );
void oStudioSetUpTransform (int trivial_accept);
void oStudioSetupBones ( void );
void oStudioCalcAttachments ( void );
void oStudioSaveBones( void );
void oStudioMergeBones( model_t *m_pSubModel );
float oStudioEstimateInterpolant( void );
float oStudioEstimateFrame( mstudioseqdesc_t *pseqdesc );
void oStudioFxTransform( cl_entity_t *ent, float transform[3][4] );
void oStudioSlerpBones( vec4_t q1[], float pos1[][3], vec4_t q2[], float pos2[][3], float s );
void oStudioCalcBoneAdj ( float dadt, float *adj, const byte *pcontroller1, const byte *pcontroller2, byte mouthopen );
void oStudioCalcBoneQuaterion( int frame, float s, mstudiobone_t *pbone, mstudioanim_t *panim, float *adj, float *q );
void oStudioCalcBonePosition( int frame, float s, mstudiobone_t *pbone, mstudioanim_t *panim, float *adj, float *pos );
void oStudioCalcRotations( float pos[][3], vec4_t *q, mstudioseqdesc_t *pseqdesc, mstudioanim_t *panim, float f );
void oStudioRenderModel ( void );
void oStudioRenderFinal (void);
void oStudioRenderFinal_Software ( void );
void oStudioRenderFinal_Hardware ( void );
void oStudioPlayerBlend ( mstudioseqdesc_t *pseqdesc, int *pBlend, float *pPitch );
void oStudioEstimateGait ( entity_state_t *pplayer );
void oStudioProcessGait ( entity_state_t *pplayer );
// Prototypes for patch gates
void Init_Gate(void);
void StudioDrawModel_Gate (void);
void StudioDrawPlayer_Gate(void);
void StudioGetAnim_Gate(void);
void StudioSetUpTransform_Gate (void);
void StudioSetupBones_Gate (void);
void StudioCalcAttachments_Gate (void);
void StudioSaveBones_Gate(void);
void StudioMergeBones_Gate(void);
void StudioEstimateInterpolant_Gate(void);
void StudioEstimateFrame_Gate(void);
void StudioFxTransform_Gate(void);
void StudioSlerpBones_Gate(void);
void StudioCalcBoneAdj_Gate (void);
void StudioCalcBoneQuaterion_Gate(void);
void StudioCalcBonePosition_Gate(void);
void StudioCalcRotations_Gate(void);
void StudioRenderModel_Gate (void);
void StudioRenderFinal_Gate (void);
void StudioRenderFinal_Software_Gate (void);
void StudioRenderFinal_Hardware_Gate (void);
void StudioPlayerBlend_Gate (void);
void StudioEstimateGait_Gate (void);
void StudioProcessGait_Gate (void);
// Data definition of pThis
typedef struct
{
double dummy;
double m_clTime;
double m_clOldTime;
int m_fDoInterp;
int m_fGaitEstimation;
int m_nFrameCount;
cvar_t *m_pCvarHiModels;
cvar_t *m_pCvarDeveloper;
cvar_t *m_pCvarDrawEntities;
cl_entity_t *m_pCurrentEntity;
model_t *m_pRenderModel;
player_info_t *m_pPlayerInfo;
int m_nPlayerIndex;
float m_flGaitMovement;
studiohdr_t *m_pStudioHeader;
mstudiobodyparts_t *m_pBodyPart;
mstudiomodel_t *m_pSubModel;
int m_nTopColor;
int m_nBottomColor;
model_t *m_pChromeSprite;
int m_nCachedBones;
char m_nCachedBoneNames[ MAXSTUDIOBONES ][ 32 ];
float m_rgCachedBoneTransform [ MAXSTUDIOBONES ][ 3 ][ 4 ];
float m_rgCachedLightTransform[ MAXSTUDIOBONES ][ 3 ][ 4 ];
float m_fSoftwareXScale, m_fSoftwareYScale;
float m_vUp[ 3 ];
float m_vRight[ 3 ];
float m_vNormal[ 3 ];
float m_vRenderOrigin[ 3 ];
int *m_pStudioModelCount;
int *m_pModelsDrawn;
float (*m_protationmatrix)[ 3 ][ 4 ];
float (*m_paliastransform)[ 3 ][ 4 ];
float (*m_pbonetransform) [ MAXSTUDIOBONES ][ 3 ][ 4 ];
float (*m_plighttransform)[ MAXSTUDIOBONES ][ 3 ][ 4 ];
} *StudioModelRenderer_d;
typedef struct StudioModelRenderer_s
{
void (*CStudioModelRenderer)(void);
void (*Init)(void);
int (*StudioDrawModel) (int flags);
int (*StudioDrawPlayer)(int flags, struct entity_state_s *pplayer);
mstudioanim_t (*StudioGetAnim)( model_t *m_pSubModel, mstudioseqdesc_t *pseqdesc );
void (*StudioSetUpTransform) (int trivial_accept);
void (*StudioSetupBones) ( void );
void (*StudioCalcAttachments) ( void );
void (*StudioSaveBones)( void );
void (*StudioMergeBones)( model_t *m_pSubModel );
float (*StudioEstimateInterpolant)( void );
float (*StudioEstimateFrame)( mstudioseqdesc_t *pseqdesc );
void (*StudioFxTransform)( cl_entity_t *ent, float transform[3][4] );
void (*StudioSlerpBones)( vec4_t q1[], float pos1[][3], vec4_t q2[], float pos2[][3], float s );
void (*StudioCalcBoneAdj) ( float dadt, float *adj, const byte *pcontroller1, const byte *pcontroller2, byte mouthopen );
void (*StudioCalcBoneQuaterion)( int frame, float s, mstudiobone_t *pbone, mstudioanim_t *panim, float *adj, float *q );
void (*StudioCalcBonePosition)( int frame, float s, mstudiobone_t *pbone, mstudioanim_t *panim, float *adj, float *pos );
void (*StudioCalcRotations)( float pos[][3], vec4_t *q, mstudioseqdesc_t *pseqdesc, mstudioanim_t *panim, float f );
void (*StudioRenderModel) ( void );
void (*StudioRenderFinal) (void);
void (*StudioRenderFinal_Software) ( void );
void (*StudioRenderFinal_Hardware) ( void );
void (*StudioPlayerBlend) ( mstudioseqdesc_t *pseqdesc, int *pBlend, float *pPitch );
void (*StudioEstimateGait) ( entity_state_t *pplayer );
void (*StudioProcessGait) ( entity_state_t *pplayer );
} StudioModelRenderer_t, *pStudioModelRenderer_t;
extern float chams_render_viewmodel_r;
extern float chams_render_viewmodel_g;
extern float chams_render_viewmodel_b;
extern float chams_render_viewmodel;
extern float chams_render_third_person_r;
extern float chams_render_third_person_g;
extern float chams_render_third_person_b;
extern float chams_render_third_person;
extern float chams_render_r;
extern float chams_render_g;
extern float chams_render_b;
extern float chams_render;
extern float chams_render_weapon_r;
extern float chams_render_weapon_g;
extern float chams_render_weapon_b;
extern float chams_render_weapon;
extern float chams_render_chicken_r;
extern float chams_render_chicken_g;
extern float chams_render_chicken_b;
extern float chams_render_chicken;
#endif