Partical systems
meinaW

Hello

Can anyone please point me to a tutorial on particle systems using allegro I have tried this one:
http://pixwiki.bafsoft.com/wiki/index.php/Issue2:ParticleTutorial
( but for some reason it wont compile )

ixilom

what exactly is the problem?

Marcel

Hi meinaW,

it would be nice, if you could post the compiler errors. I think you had just minor mistake in you code.

greetz ;)

meinaW

Sorry that i hvnt answered in a while (i got tight school work heading into exams)

anyways these are the compiler errors that i get:

tmp->x = float(rand()%(SCREEN_W+40))-20;
conversion from `double' to non-scalar type `fix' requested

tmp->dx = r*sin(direction);
conversion from `double' to non-scalar type `fix' requested

i use dev-c++ on windows

Johan Peitz

I'd write the first one like this instead (but I don't know if that solves the problem):

tmp->x = (float)(rand()%(SCREEN_W + 40)) - 20;

The second one should be solved by including math.h.

meinaW

Thanks Johan Peitz

adding math.h solved both errors

Thread #591103. Printed from Allegro.cc