Files
ants/farm/maps.h
2026-03-26 18:43:01 +01:00

24 lines
426 B
C

#define MAP_WIDTH 128
#define MAP_HEIGHT 128
#define NUM_CELLS MAP_WIDTH * MAP_HEIGHT
#define MAP_NAME_LENGTH 32
#define CELL_EMPTY 0
#define CELL_WALL 1
#define CELL_FOOD 2
#define CELL_NEST 3
struct Map {
char name[MAP_NAME_LENGTH];
unsigned short nest;
unsigned char cells[MAP_WIDTH * MAP_HEIGHT];
};
struct Maps {
unsigned int num_maps;
struct Map maps;
};
struct Maps* load_maps(char* filename);