aboutsummaryrefslogtreecommitdiff
path: root/src/tilemap.h
blob: a8154e15d6d26e555d9d43b02e44731e98cbef2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef TILEMAP_H
#define TILEMAP_H

extern size_t SWIDTH;
extern size_t SHEIGHT;

// set bit n in tile t in tilemap
void set(int t, int n);
// is bit n set in tile t in tilemap
int is_set(int t, int n);

// self explanatory names
int has_collapsed(int t);
int get_collapsed_tile(int t);
void collapse(int t, int n);
size_t count_entropy(int t);

void init_tilemap();
void destroy_tilemap();

// applly a mask m, r (from tile_masks)
// to tile t in tilemap
void mask(int t, int m, int r);

void print_tilemap();


#endif