6 #include "engine/asset.h"
15 typedef enum BlockType BlockType;
16 typedef struct Block Block;
17 typedef struct BlockGrid BlockGrid;
18 typedef struct GridLocation GridLocation;
36 extern BlockGrid levelGrid;
40 GridLocation gridLocationFromTransform(Transform transform);
42 static inline Block* getBlockFromGrid(BlockGrid grid, size_t x, size_t z) {
43 return grid.blocks[(z * grid.width) + x];
46 static inline void setBlockInGrid(BlockGrid grid, size_t x, size_t z, Block* block) {
47 grid.blocks[(z * grid.width) + x] = block;