103 |
|
|
104 |
|
|
105 |
|
#define LEAFSIZ (3*sizeof(float)+sizeof(int32)+\ |
106 |
< |
sizeof(TMbright)+6*sizeof(BYTE)) |
106 |
> |
sizeof(TMbright)+6*sizeof(uby8)) |
107 |
|
|
108 |
|
extern int |
109 |
|
qtAllocLeaves( /* allocate space for n leaves */ |
132 |
|
qtL.wp = (float (*)[3])qtL.base; |
133 |
|
qtL.wd = (int32 *)(qtL.wp + n); |
134 |
|
qtL.brt = (TMbright *)(qtL.wd + n); |
135 |
< |
qtL.chr = (BYTE (*)[3])(qtL.brt + n); |
136 |
< |
qtL.rgb = (BYTE (*)[3])(qtL.chr + n); |
135 |
> |
qtL.chr = (uby8 (*)[3])(qtL.brt + n); |
136 |
> |
qtL.rgb = (uby8 (*)[3])(qtL.chr + n); |
137 |
|
qtL.nl = n; |
138 |
|
qtL.tml = qtL.bl = qtL.tl = 0; |
139 |
|
falleaves = -1; |
379 |
|
tmCvColrs(tmGlobal, &qtL.brt[li], qtL.chr[li], (COLR *)c, 1); |
380 |
|
if (putleaf(li, 1)) { |
381 |
|
if (mapit) |
382 |
< |
tmMapPixels(tmGlobal, (BYTE *)(qtL.rgb+li), qtL.brt+li, |
383 |
< |
(BYTE *)(qtL.chr+li), 1); |
382 |
> |
tmMapPixels(tmGlobal, (uby8 *)(qtL.rgb+li), qtL.brt+li, |
383 |
> |
(uby8 *)(qtL.chr+li), 1); |
384 |
|
if (--rayqleft == 0) |
385 |
|
dev_flush(); /* flush output */ |
386 |
|
} |
434 |
|
if (tmComputeMapping(tmGlobal, 0., 0., 0.) != TM_E_OK) |
435 |
|
return(0); |
436 |
|
} |
437 |
< |
if (tmMapPixels(tmGlobal, (BYTE *)(qtL.rgb+aorg), qtL.brt+aorg, |
438 |
< |
(BYTE *)(qtL.chr+aorg), alen) != TM_E_OK) |
437 |
> |
if (tmMapPixels(tmGlobal, (uby8 *)(qtL.rgb+aorg), qtL.brt+aorg, |
438 |
> |
(uby8 *)(qtL.chr+aorg), alen) != TM_E_OK) |
439 |
|
return(0); |
440 |
|
if (blen > 0) |
441 |
< |
tmMapPixels(tmGlobal, (BYTE *)(qtL.rgb+borg), qtL.brt+borg, |
442 |
< |
(BYTE *)(qtL.chr+borg), blen); |
441 |
> |
tmMapPixels(tmGlobal, (uby8 *)(qtL.rgb+borg), qtL.brt+borg, |
442 |
> |
(uby8 *)(qtL.chr+borg), blen); |
443 |
|
qtL.tml = qtL.tl; |
444 |
|
return(1); |
445 |
|
} |