Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » Partical systems

This thread is locked; no one can reply to it. rss feed Print
Partical systems
meinaW
Member #7,943
November 2006

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
Member #7,167
April 2006
avatar

what exactly is the problem?

___________________________________________
Democracy in Sweden? Not since 2008-Jun-18.
<someone> The lesbians next door bought me a rolex for my birthday.
<someone> I think they misunderstood when I said I wanna watch...

Marcel
Member #8,543
April 2007

Hi meinaW,

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

greetz ;)

--- Where the german seems to dwell... ---

meinaW
Member #7,943
November 2006

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
Member #9
April 2000
avatar

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.

--
johan peitz :: things I made

meinaW
Member #7,943
November 2006

Thanks Johan Peitz

adding math.h solved both errors

Go to: