From 30d1c9b30b5642efcba66bdc7956f4d7e321fc97 Mon Sep 17 00:00:00 2001 From: kartofen Date: Thu, 11 Aug 2022 21:45:03 +0300 Subject: more used friendly --- src/tilemap.h | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'src/tilemap.h') diff --git a/src/tilemap.h b/src/tilemap.h index e945f06..74344dd 100644 --- a/src/tilemap.h +++ b/src/tilemap.h @@ -1,17 +1,24 @@ #ifndef TILEMAP_H #define TILEMAP_H -void set(int i, int n); -int is_set(int i, int n); +// 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 i); +void collapse(int t, int n); +size_t count_entropy(int t); +void init_tilemap(); -void mask(int i, int m, int r); void generate_tile_masks(small_t* tile_connections); -void init_tilemap(); +// applly a mask m, r (from tile_masks) +// to tile t in tilemap +void mask(int t, int m, int r); + -size_t count_entropy(int i); -void collapse(int i, int n); -int has_collapsed(int i); -int get_collapsed_tile(int i); #endif -- cgit v1.2.3