diff options
author | kartofen <mladenovnasko0@gmail.com> | 2022-10-13 21:25:06 +0300 |
---|---|---|
committer | kartofen <mladenovnasko0@gmail.com> | 2022-10-13 21:25:06 +0300 |
commit | 744115fe481b928b2de4930a9b9c41794dce10e0 (patch) | |
tree | 303cfb8bae18c25ce3beb723f4d7f5c2af8856a9 | |
parent | af0cf5646bb703daf5f777f478017b46f137ed99 (diff) |
add some comments
-rw-r--r-- | src/main.c | 4 | ||||
-rw-r--r-- | src/typedef.h | 2 |
2 files changed, 4 insertions, 2 deletions
@@ -7,7 +7,7 @@ #include "tiles.h" #include "tilemap.h" -// amount of tiles +// amount of different tiles and their rotations size_t TILES; // width and height of a single tile @@ -72,7 +72,7 @@ void collapse_this(int i) size_t t = possibilities[rand() % psz]; collapse(i, t); // collapse a random tile - // apply a bitmask, based on the direction + // apply a bitmask, on tiles around the newly collapsed tile if(i / SWIDTH != 0) // up if(!(has_collapsed(i-SWIDTH))) mask(i-SWIDTH, t, 0); diff --git a/src/typedef.h b/src/typedef.h index cf7787e..730b32a 100644 --- a/src/typedef.h +++ b/src/typedef.h @@ -3,7 +3,9 @@ // useful definitions +// max tiles that can be loaded #define TILES_CAP 128 +// max amount of tiles in a tilemap that is being generated #define TILEMAP_CAP 16384 #include <stdint.h> |