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
166
167
168
|
v->x = (snap(sn, cv[0] * cf->scale[0]) + cf->translate[0]) / sc;
v->y =
-(snap(sn, cv[1] * cf->scale[1]) + cf->translate[1]) / sc;
v->z = (snap(sn, cv[2] * cf->scale[2]) + cf->translate[2]) / sc;
}
}
- (void)renderWithLight:(OFVector3D)light
frame:(int)frame
range:(int)range
position:(OFVector3D)position
yaw:(float)yaw
pitch:(float)pitch
scale:(float)sc
speed:(float)speed
snap:(int)sn
basetime:(int)basetime
{
loopi(range) if (!_mverts[frame + i])[self scaleWithFrame:frame + i
scale:sc
snap:sn];
glPushMatrix();
glTranslatef(position.x, position.y, position.z);
glRotatef(yaw + 180, 0, -1, 0);
glRotatef(pitch, 0, 0, 1);
glColor3fv((float *)&light);
if (_displaylist && frame == 0 && range == 1) {
glCallList(_displaylist);
xtraverts += _displaylistverts;
} else {
if (frame == 0 && range == 1) {
static int displaylistn = 10;
|
|
>
>
|
|
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
166
167
168
169
170
|
v->x = (snap(sn, cv[0] * cf->scale[0]) + cf->translate[0]) / sc;
v->y =
-(snap(sn, cv[1] * cf->scale[1]) + cf->translate[1]) / sc;
v->z = (snap(sn, cv[2] * cf->scale[2]) + cf->translate[2]) / sc;
}
}
- (void)renderWithLight:(OFColor *)light
frame:(int)frame
range:(int)range
position:(OFVector3D)position
yaw:(float)yaw
pitch:(float)pitch
scale:(float)sc
speed:(float)speed
snap:(int)sn
basetime:(int)basetime
{
loopi(range) if (!_mverts[frame + i])[self scaleWithFrame:frame + i
scale:sc
snap:sn];
glPushMatrix();
glTranslatef(position.x, position.y, position.z);
glRotatef(yaw + 180, 0, -1, 0);
glRotatef(pitch, 0, 0, 1);
float red, green, blue;
[light getRed:&red green:&green blue:&blue alpha:NULL];
glColor3f(red, green, blue);
if (_displaylist && frame == 0 && range == 1) {
glCallList(_displaylist);
xtraverts += _displaylistverts;
} else {
if (frame == 0 && range == 1) {
static int displaylistn = 10;
|