aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/main.c b/main.c
index cb3ba73..a80e1fb 100644
--- a/main.c
+++ b/main.c
@@ -32,7 +32,7 @@
#define PIOVER2 1.570796327f
#define INVSQRT2 0.707106781f
-void fatal_sdl()
+static void fatal_sdl()
{
fprintf(stderr, "%s\n", SDL_GetError());
SDL_ShowSimpleMessageBox(
@@ -83,7 +83,7 @@ struct BulletPool {
struct BulletPool player_bullets;
-bool bullets_shoot(struct BulletPool *pool, const vec2 position, const vec2 velocity)
+static bool bullets_shoot(struct BulletPool *pool, const vec2 position, const vec2 velocity)
{
if (pool->used >= MAX_BULLETS) {
return false;
@@ -117,7 +117,7 @@ static bool is_point_in_screen(const vec2 position)
return true;
}
-void bullets_integrate(struct BulletPool *pool)
+static void bullets_integrate(struct BulletPool *pool)
{
for (uint32_t i = 0; i < MAX_BULLETS; ++i) {
if (!viszero(pool->bullets[i].velocity)) {
@@ -131,7 +131,7 @@ void bullets_integrate(struct BulletPool *pool)
}
}
-void bullets_draw(const struct BulletPool *pool, SDL_Renderer *ren)
+static void bullets_draw(const struct BulletPool *pool, SDL_Renderer *ren)
{
uint32_t num_bullets = 0;
SDL_Point points[MAX_BULLETS];
@@ -171,7 +171,7 @@ struct Player {
#define PLAYER_RENDER_RADIUS INVSQRT2
-void player_create(struct Player *player, const vec2 position, const float update_rate)
+static void player_create(struct Player *player, const vec2 position, const float update_rate)
{
*player = (struct Player){
.body = {
@@ -187,7 +187,7 @@ void player_create(struct Player *player, const vec2 position, const float updat
};
}
-void player_input(struct Player *player, const Uint8 *keys)
+static void player_input(struct Player *player, const Uint8 *keys)
{
struct KinematicBody *body = &player->body;
bool update_direction = false;
@@ -226,7 +226,7 @@ void player_input(struct Player *player, const Uint8 *keys)
}
}
-void kinematic_integrate(struct KinematicBody *body)
+static void kinematic_integrate(struct KinematicBody *body)
{
body->angle += body->angular_velocity;
while (body->angle < 0.0f) body->angle += TWOPI;
@@ -246,7 +246,7 @@ void kinematic_integrate(struct KinematicBody *body)
body->position = vadd(body->position, body->velocity);
}
-void kinematic_wrap(struct KinematicBody *body)
+static void kinematic_wrap(struct KinematicBody *body)
{
while (body->position.x > SCREEN_WIDTH_F + body->collision_radius) {
body->position.x -= SCREEN_WIDTH_F;