70 |
|
/* followed by the string */ |
71 |
|
} TLINE; |
72 |
|
|
73 |
< |
#define TLSTR(l) ((char *)(l+1)) |
73 |
> |
#define TLSTR(l) ((char *)((l)+1)) |
74 |
|
|
75 |
|
typedef struct { |
76 |
|
FVECT right, down; /* right and down unit vectors */ |
93 |
|
register OBJREC *m; |
94 |
|
RAY *r; |
95 |
|
{ |
96 |
< |
double v[3]; |
96 |
> |
FVECT v; |
97 |
|
int foreground; |
98 |
|
/* get transformed position */ |
99 |
|
if (r->rox != NULL) |
177 |
|
/* compute vectors */ |
178 |
|
fcross(DxR, D, R); |
179 |
|
fcross(t->right, DxR, D); |
180 |
< |
d = DOT(D,D) / DOT(t->right,t->right); |
180 |
> |
d = DOT(D,D)/DOT(t->right,t->right); |
181 |
|
for (i = 0; i < 3; i++) |
182 |
|
t->right[i] *= d; |
183 |
|
fcross(t->down, R, DxR); |
184 |
< |
d = DOT(R,R) / DOT(t->down,t->down); |
184 |
> |
d = DOT(R,R)/DOT(t->down,t->down); |
185 |
|
for (i = 0; i < 3; i++) |
186 |
|
t->down[i] *= d; |
187 |
|
/* get text */ |
238 |
|
if (tp == NULL) |
239 |
|
return; |
240 |
|
for (tlp = tp->tl.next; tlp != NULL; tlp = tlp->next); |
241 |
< |
free(TLSTR(tlp)); |
241 |
> |
free((char *)tlp); |
242 |
|
free((char *)tp); |
243 |
|
m->os = NULL; |
244 |
|
} |
250 |
|
{ |
251 |
|
register TEXT *tp; |
252 |
|
register TLINE *tlp; |
253 |
< |
double v[3], y, x; |
253 |
> |
FVECT v; |
254 |
> |
double y, x; |
255 |
|
int col; |
256 |
|
register int lno; |
257 |
|
/* first, compute position in text */ |
258 |
+ |
tp = gettext(m); |
259 |
|
v[0] = p[0] - m->oargs.farg[0]; |
260 |
|
v[1] = p[1] - m->oargs.farg[1]; |
261 |
|
v[2] = p[2] - m->oargs.farg[2]; |
266 |
|
x -= (double)col; |
267 |
|
y = (lno+1) - y; |
268 |
|
/* get the font character */ |
267 |
– |
tp = gettext(m); |
269 |
|
for (tlp = tp->tl.next; tlp != NULL; tlp = tlp->next) |
270 |
|
if (--lno < 0) |
271 |
|
break; |