Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions wfc.h
Original file line number Diff line number Diff line change
Expand Up @@ -1314,6 +1314,9 @@ static struct wfc__tile *wfc__create_tiles_overlapping(struct wfc_image *image,
int xcnt = image->width - tile_width + 1;
int ycnt = image->height - tile_height + 1;

struct wfc__tile *tiles = NULL;
int base_tile_cnt = 0;

if (expand_image) {
xcnt = image->width;
ycnt = image->height;
Expand All @@ -1331,15 +1334,15 @@ static struct wfc__tile *wfc__create_tiles_overlapping(struct wfc_image *image,
if (rotate_tiles)
*tile_cnt *= 4;

struct wfc__tile *tiles = wfc__create_tiles(*tile_cnt);
tiles = wfc__create_tiles(*tile_cnt);
if (tiles == NULL)
goto CLEANUP;


if (!wfc__add_overlapping_images(tiles, image, xcnt, ycnt, tile_width, tile_height))
goto CLEANUP;

int base_tile_cnt = xcnt * ycnt;
base_tile_cnt = xcnt * ycnt;
if (xflip_tiles) {
if (!wfc__add_flipped_images(tiles, base_tile_cnt, 0))
goto CLEANUP;
Expand Down