-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstruct.h
165 lines (140 loc) · 2.55 KB
/
struct.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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
// (c) 2006 Karol Maciaszek <[email protected]>
#define M_LIGHTS 5
#define M_SCENE_PARTS 15
#define B_LCALF_X 0.7
#define B_LCALF_Y 0.1
#define B_LCALF_Z -4
#define B_LELBOW_X 4.3
#define B_LELBOW_Y 0
#define B_LELBOW_Z 5.3
#define B_LFOOT_X 0.7
#define B_LFOOT_Y 0.1
#define B_LFOOT_Z -7.82
#define B_LFOREARM_X 1.4
#define B_LFOREARM_Y 0
#define B_LFOREARM_Z 5.3
#define B_LHAND_X 7.1
#define B_LHAND_Y 0
#define B_LHAND_Z 5.3
#define B_LTHIGH_X 0.7
#define B_LTHIGH_Y 0
#define B_LTHIGH_Z 0.03
#define B_RCALF_X -0.7
#define B_RCALF_Y 0.1
#define B_RCALF_Z -4
#define B_RELBOW_X -4.3
#define B_RELBOW_Y 0
#define B_RELBOW_Z 5.3
#define B_RFOOT_X -0.7
#define B_RFOOT_Y 0.1
#define B_RFOOT_Z -7.82
#define B_RFOREARM_X -1.4
#define B_RFOREARM_Y 0
#define B_RFOREARM_Z 5.3
#define B_RHAND_X -7.1
#define B_RHAND_Y 0
#define B_RHAND_Z 5.3
#define B_RTHIGH_X -0.7
#define B_RTHIGH_Y 0
#define B_RTHIGH_Z 0.03
typedef struct {
float x, y, z;
float nx, ny, nz;
float tx, ty;
} TVertex;
typedef struct {
float x, y, z, w;
} TVector;
typedef struct {
TVertex *a;
TVertex *b;
TVertex *c;
int iTex;
} TTriangle;
typedef struct {
TVector *v;
float angle;
} TRotate;
typedef struct {
TVertex *p;
TVector *v;
float angle;
} TRotateBy;
typedef struct {
TVector *v;
} TTranslate;
typedef struct {
TTriangle *t;
int iT;
TRotate *rotateA;
TRotate *rotateB;
TRotate *rotateC;
TRotateBy *rotateByA;
TRotateBy *rotateByB;
TRotateBy *rotateByC;
TRotateBy *rotateByD;
TTranslate *translateA;
TTranslate *translateB;
TTranslate *translateC;
} TPart;
typedef struct {
TPart *part;
int iPart;
} TScene;
typedef struct {
int angle;
float radius;
float x;
float y;
float z;
} TCamera;
typedef struct {
int light;
float blinkStep;
int enabled;
TVertex *position;
TVector *diffuse;
TVector *attenuation;
} TLight;
typedef struct {
float step;
} TActionJump;
typedef struct {
float step;
} TActionLCalf;
typedef struct {
float step;
} TActionLElbow;
typedef struct {
float step;
} TActionLFoot;
typedef struct {
float step;
} TActionLForearm;
typedef struct {
float step;
} TActionLHand;
typedef struct {
float step;
} TActionLThigh;
typedef struct {
float step;
} TActionRCalf;
typedef struct {
float step;
} TActionRElbow;
typedef struct {
float step;
} TActionRFoot;
typedef struct {
float step;
} TActionRForearm;
typedef struct {
float step;
} TActionRHand;
typedef struct {
float step;
} TActionRThigh;
typedef struct {
float step;
} TActionSkull;