From: matthew Date: Sun, 29 Jul 2018 19:50:45 +0000 (+0000) Subject: created and drawing board - axis are incorrect though X-Git-Url: https://git.owens.tech/assets/static/git-favicon.png/assets/static/git-favicon.png/git?a=commitdiff_plain;h=fbbaf7260b7547439cba4b0cff657ce3c3b8f31c;p=csrpg.git created and drawing board - axis are incorrect though --- diff --git a/common/board.c b/common/board.c index 56c8ef7..33918fe 100644 --- a/common/board.c +++ b/common/board.c @@ -16,10 +16,10 @@ Board *board_init(int sizex, int sizey) b->dimensions.y = sizey; b->tiles = malloc(sizet * sizeof(Tile)); - for(int i = 0; i < sizey; ++i){ - b->tiles[i] = malloc(sizex * sizeof(Tile)); - for(int j = 0; j < sizex; ++j){ - b->tiles[i][j] = tile_init(point3i(i,j,1), PLAINS); + for(int x = 0; x < sizex; ++x){ + b->tiles[x] = malloc(sizey * sizeof(Tile)); + for(int y = 0; y < sizey; ++y){ + b->tiles[x][y] = tile_init(point3i(x,y,1), PLAINS); } } diff --git a/nogl/main.c b/nogl/main.c index 05b76f9..878bc4f 100644 --- a/nogl/main.c +++ b/nogl/main.c @@ -45,6 +45,7 @@ int main() printf("#"); } } + printf("\n"); } strcpy(str, "Hello... |");