projects
/
csrpg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b03442f
)
created and drawing board - axis are incorrect though
author
matthew
<matthew@owens.tech>
Sun, 29 Jul 2018 19:50:45 +0000
(19:50 +0000)
committer
matthew
<matthew@owens.tech>
Sun, 29 Jul 2018 19:50:45 +0000
(19:50 +0000)
common/board.c
patch
|
blob
|
history
nogl/main.c
patch
|
blob
|
history
diff --git
a/common/board.c
b/common/board.c
index
56c8ef7
..
33918fe
100644
(file)
--- 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
(file)
--- a/
nogl/main.c
+++ b/
nogl/main.c
@@
-45,6
+45,7
@@
int main()
printf("#");
}
}
+ printf("\n");
}
strcpy(str, "Hello... |");