From 50122472d9c3150bf8f998df2ee4f5d5fc06f5aa Mon Sep 17 00:00:00 2001 From: kartofen Date: Wed, 10 Aug 2022 19:25:53 +0300 Subject: change demo picture --- src/gen_tiles.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'src/gen_tiles.c') diff --git a/src/gen_tiles.c b/src/gen_tiles.c index 072ac1e..5462ee3 100644 --- a/src/gen_tiles.c +++ b/src/gen_tiles.c @@ -5,7 +5,7 @@ #include "typedef.h" #include "ppm.h" -#define TILES 2 +#define TILES 3 #define TILE_WIDTH 3 #define TILE_HEIGHT 3 #define TILE_SZ ((TILE_WIDTH) * (TILE_HEIGHT)) @@ -13,22 +13,22 @@ FILE *fp; // possible types: X T I -char symetry[TILES] = "IT"; +char symetry[TILES] = "XTXIT"; small_t tiles[TILES][TILE_SZ] = { { - // 0, 0, 0, - // 0, 0, 0, - // 0, 0, 0 - // }, { - // 0, 1, 0, - // 1, 1, 1, - // 0, 0, 0 - // }, { - // 0, 1, 0, - // 1, 1, 1, - // 0, 1, 0 - // },{ + 0, 0, 0, + 0, 0, 0, + 0, 0, 0 + }, { + 0, 1, 0, + 1, 1, 1, + 0, 0, 0 + }, { + 0, 1, 0, + 1, 1, 1, + 0, 1, 0 + },{ 0, 1, 0, 0, 1, 0, 0, 1, 0 @@ -40,9 +40,9 @@ small_t tiles[TILES][TILE_SZ] = { }; small_t tiles_connections[TILES][4] = { - // { 0, 0, 0, 0 }, - // { 1, 1, 1, 0 }, - // { 1, 1, 1, 1 }, + { 0, 0, 0, 0 }, + { 1, 1, 1, 0 }, + { 1, 1, 1, 1 }, { 1, 0, 0, 1 }, { 1, 0, 1, 0 }, }; @@ -95,7 +95,7 @@ void save(small_t *t, small_t *n, int i) for(int x = 0; x < TILE_WIDTH; x++) { set_color(pixels, t, x, y, 0, 255, 0); set_color(pixels, t, x, y, 1, 255, 0); - set_color(pixels, t, x, y, 2, 255, 255); + set_color(pixels, t, x, y, 2, 255, 0); } save_as_ppm(file_name, pixels, TILE_WIDTH, TILE_HEIGHT, 1); -- cgit v1.2.3