icfp11/src/grid.h

27 lines
384 B
C

#ifndef _GRID_H
#define _GRID_H
#define GRID_SPLIT 16
struct grid;
typedef struct grid grid;
struct gridnode;
typedef struct gridnode gridnode;
#include "control.h"
struct gridnode {
grid *g;
GQueue *objects;
};
struct grid {
double left, right, top, bottom;
gridnode nodes[GRID_SPLIT][GRID_SPLIT];
};
void grid_insert(grid* g, object *o);
void grid_split(grid *g);
#endif