effect.h (494B)
1 #pragma once 2 3 typedef struct Effect effect_t; 4 5 #include "game.h" 6 #include "util.h" 7 8 typedef enum { 9 EFFECT_FALL, 10 EFFECT_BREAK, 11 EFFECT_PARTICLE, 12 } effect_e; 13 14 struct Effect { 15 effect_e type; 16 pos_t pos; 17 fz_timer_t *timer; 18 int count; 19 }; 20 21 effect_t *effect_create(pos_t pos, effect_e type); 22 void effect_update(effect_t *effect, game_t *game); 23 void effect_draw(effect_t *effect, game_t *game); 24 void effect_free(effect_t *effect); 25 26 void effect_play(pos_t pos, effect_e type, game_t *game);