aboutsummaryrefslogtreecommitdiff
path: root/world.h
blob: 7f1952007810170e874e46c97a5d1e4479a010b8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#ifndef world_h
#define world_h

#include "components.h"

#define max_entities 256

typedef int Entity;

typedef struct {
	int entity_count;

	unsigned char bitmask[max_entities];

	CSprite sprites[max_entities];
	CPosition positions[max_entities];
} World;

void init_world(World* world);
Entity new_entity(World* world);
void add_components(World* world, Entity e, CType bits);
void remove_components(World* world, Entity e, CType bits);

#endif