Pretty sure this is world.h done for now
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#define WORLD_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#define WORLD_WIDTH 256
|
||||
#define WORLD_HEIGHT 256
|
||||
@@ -17,7 +18,22 @@ typedef enum {
|
||||
Q_QUASAR,
|
||||
Q_SUPERNOVA,
|
||||
Q_ANOMALY,
|
||||
Q_SINGULARITY
|
||||
Q_SINGULARITY,
|
||||
Q_COUNT
|
||||
} quadrant_type;
|
||||
|
||||
typedef struct {
|
||||
quadrant_type type;
|
||||
bool is_visited;
|
||||
bool is_discovered;
|
||||
bool is_old;
|
||||
} quadrant;
|
||||
|
||||
typedef struct {
|
||||
quadrant quadrants[WORLD_HEIGHT][WORLD_WIDTH];
|
||||
} world_t;
|
||||
|
||||
void world_generate(world_t *w);
|
||||
const quadrant * world_get_quadrant(const world_t *w, uint16_t x, uint16_t y);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user