initial
This commit is contained in:
23
farm/maps.h
Normal file
23
farm/maps.h
Normal file
@@ -0,0 +1,23 @@
|
||||
|
||||
#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);
|
||||
Reference in New Issue
Block a user