aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkartofen <mladenovnasko0@gmail.com>2022-10-13 21:25:06 +0300
committerkartofen <mladenovnasko0@gmail.com>2022-10-13 21:25:06 +0300
commit744115fe481b928b2de4930a9b9c41794dce10e0 (patch)
tree303cfb8bae18c25ce3beb723f4d7f5c2af8856a9
parentaf0cf5646bb703daf5f777f478017b46f137ed99 (diff)
add some comments
-rw-r--r--src/main.c4
-rw-r--r--src/typedef.h2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index 13c2ed1..07675b7 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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>