PCBrawl/inc/bullet.h

22 lines
391 B
C

#pragma once
#include "type.h"
struct Bullet {
struct Vec2 pos;
struct Vec2 dir;
int v;
int active;
};
struct Bullet_table {
int n;
struct Bullet *bullets;
};
void bullet_table_init(void);
void bullet_table_update(void);
void bullet_table_draw(int timer);
void bullet_destroy(struct Bullet *bullet);
void bullet_fire(int x, int y, int dir_x, int dir_y, int v);
int bullet_nb(void);