blob: ecd8250fb70c6fadee9f3f77a9484fd056ad419d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#pragma once
#include <SDL2/SDL.h>
#include "entity.h"
extern SDL_Window *window;
extern SDL_Renderer *renderer;
extern unsigned input_pressed, input_held;
extern struct entities {
struct entity player[1];
struct entity enemy[64];
unsigned enemies;
struct projectile projectile[64];
unsigned projectiles;
struct warp warp[16];
unsigned warps;
struct particle particle[64];
unsigned particles;
} entities, next_entities;
extern enum game_state {
STATE_PLAYING,
STATE_FADE_IN,
STATE_FADE_OUT,
} game_state;
extern char *game_level, *game_next_level;
extern char *save_file_name;
void entities_free(struct entities *entities);
int entities_load(struct entities *entities, char *data, size_t size, size_t input_bytes);
int game_load_level(char *level);
|