RE: [AD] RLE clipping speedup

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Title: RE: [AD] RLE clipping speedup

> I'm not convinced by these lines:
>
> +      for (y=0; y<s->h; ++y) {
> +         /* relocate pointers to be based at s->dat */
> +         s->lines[y] = (signed char*)((int)s->lines[y] +
> (int)s->dat);
> +      }
>
> Don't the 's->lines[y]' need to be scaled according to the
> pixel size ?

This is already done, the code you mention merely offsets the
precomputed pointers to start at s->dat. The "scaling" is done
automagically when the lines array is filled. The scaling is
in fact implicit, as the creation of the RLE_SPRITE already
scales its increments by the right size, and I use the pointers
it yields to fill lines, so that's why there is no explicit
scaling anywhere.

--
Vincent Penquerc'h



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/