1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- #ifndef ALPS_H_INCLUDED
- #define ALPS_H_INCLUDED
- #include "eruta.h"
- #include "camera.h"
- struct AlpsDrop_ {
- Point position;
- Point velocity;
- double life;
- };
- typedef struct AlpsDrop_ AlpsDrop;
- typedef struct AlpsShower_ AlpsShower;
- typedef struct AlpsParticle_ AlpsParticle;
- typedef struct Alps_ Alps;
- #define ALPS_SHOWER_DROPS 2000
- struct AlpsShower_ {
- int intensity;
- float abberation;
- Point velocity;
- AlpsDrop drops[ALPS_SHOWER_DROPS];
-
- Camera * camera;
- };
- struct AlpsParticle_ {
- Point position;
- Point velocity;
- Point acceleration;
- int type;
- double life;
- double abberation;
- ALLEGRO_COLOR color;
- ALLEGRO_BITMAP * bitmap;
- };
- void alpsshower_init
- (AlpsShower * rain, Camera * camera, int intensity, float abberation, Point velocity);
- void alpsshower_draw(AlpsShower * rain, Camera * camera);
- void alpsshower_update(AlpsShower * rain, double dt);
- struct Alps_ {
- struct AlpsShower_ shower;
- };
- void alps_init(Alps * self, Camera * camera);
- void alps_done(Alps * self);
- void alps_update(Alps * self, double dt);
- void alps_draw(Alps * self);
- void alps_start_shower(Alps * self);
- void alps_stop_shower(Alps * self);
- #endif
|