#include "animation.h" #include "asset.h" #include "obj.h" #include "render.h" void init_particle(Particle* p, int x, int y, int anim, int bmp) { p->x = x; p->y = y; p->frame = 0; p->anim = anim; p->bmp = bmp; } int update_particle(Particle* p) { const Animation* a = get_animation(p->anim); return update_anim(a, &p->frame, &p->rect); } void ren_particle(const Particle* p, Renderer* r) { const Bitmap* b = get_bitmap(p->bmp); ren_map( r, p->x, p->y, &p->rect, b ); }