Re: [AD] Optimized rotation routine

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


Grzegorz Adam Hankiewicz wrote:
> I think not including it is the right way as long as
> you manage to put it in an addon.

What are you referring to as `it' here? Of course the
whole thing could be an add-on, but I don't see the
reason not to include at least the faster and more
accurate version of `rotate_sprite()'. What I meant
was to include the new rotate.c and then add as little
as possible to the header files, but still make it
possible for an add-on library to use the low-level
routines together with a custom scanline drawer.

> Besides, I couldn't see anything of the test, it
just
> showed numbers and a few pixels in the top left
> corner of the screen.

Sorry, I forgot to mention that the test just does a
silly test by default (it calls the routine repeatedly
with random arguments, so that I can go and do
something interesting while it checks itself for
correctness). I changed it to do something visible,
then compare speeds and print the results to
allegro.log. The new version is at
http://www.geocities.com/ssven.geo/rotation.html

> I had to remove the random.c file, it gave lot's of
> problem because it redefined functions in stdlib.h.

Strange, I included it so that the program could use
djgpp's better random() function on other platforms,
but obviously that wasn't a good idea...

> I belive the vtable->mask_color is used when you are
> writting a generic algorithm which doesn't care
about
> bitmap's color depth, ie: you still haven't written
> the usual branched switch for color depth
> otimization, or it doesn't improve it significantly.
> You could use it in your switch's default branch,
> just in case.

Good, thank you!

Sven

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/



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