aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2020-02-03 02:27:54 +0100
committerCharles <sircharlesaze@gmail.com>2020-02-03 02:27:54 +0100
commit0ca2404b509ef4ddc4e19996cdbe3edbbba6d339 (patch)
tree28321d75ebf590b491eb956a7481cf750f0f7d44 /src/main.c
parent628f82dbb9d44dfda7ebde0a54b6559b275e204c (diff)
downloadcub3d-0ca2404b509ef4ddc4e19996cdbe3edbbba6d339.tar.gz
cub3d-0ca2404b509ef4ddc4e19996cdbe3edbbba6d339.tar.bz2
cub3d-0ca2404b509ef4ddc4e19996cdbe3edbbba6d339.zip
sprite from lodev and capture from random stackoverflow thread, now lets understand this nightmare
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c84
1 files changed, 41 insertions, 43 deletions
diff --git a/src/main.c b/src/main.c
index 0d9ecea..95256d2 100644
--- a/src/main.c
+++ b/src/main.c
@@ -6,7 +6,7 @@
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/11/15 06:39:39 by cacharle #+# #+# */
-/* Updated: 2020/02/01 14:00:48 by cacharle ### ########.fr */
+/* Updated: 2020/02/02 19:22:09 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
@@ -29,46 +29,44 @@ int main(int argc, char **argv)
return (0);
}
-/*
-int main(int argc, char **argv)
-{
- (void)argc;
- t_state *s = parse_check(parse(argv[1]));
- if (s == NULL)
- return (1);
- printf("R %d %d\n", s->window.width, s->window.height);
- printf("NO %s\n", s->textures_path[TEX_NORTH]);
- printf("SO %s\n", s->textures_path[TEX_SOUTH]);
- printf("WE %s\n", s->textures_path[TEX_WEST]);
- printf("EA %s\n\n", s->textures_path[TEX_EAST]);
- printf("S %s\n", s->textures_path[TEX_SPRITE]);
- printf("F %d,%d,%d\n", s->floor_color.rgb.r, s->floor_color.rgb.g, s->floor_color.rgb.b);
- printf("C %d,%d,%d\n\n", s->ceilling_color.rgb.r, s->ceilling_color.rgb.g, s->ceilling_color.rgb.b);
- printf("%dx%d\n", s->map_height, s->map_width);
- for (int i = 0; i < s->map_height; i++)
- {
- for (int j = 0; j < s->map_width; j++)
- {
- if (s->map[i][j] == CELL_WALL)
- printf("#");
- else if (s->map[i][j] == CELL_EMPTY)
- printf(" ");
- else
- printf("%d", s->map[i][j]);
- if (j != s->map_width - 1)
- printf(" ");
- }
- printf("\n");
- }
- printf("post state_new\n");
- if ((s = state_new(s)) == NULL)
- {
- printf("Error: state new");
- return 1;
- }
- printf("state->pos [%f %f]\n", s->pos.x, s->pos.y);
- state_destroy(s);
- return 0;
-}
-*/
+/* int main(int argc, char **argv) */
+/* { */
+/* (void)argc; */
+/* t_state *s = parse_check(parse(argv[1])); */
+/* if (s == NULL) */
+/* return (1); */
+/* printf("R %d %d\n", s->window.width, s->window.height); */
+/* printf("NO %s\n", s->textures_path[TEX_NORTH]); */
+/* printf("SO %s\n", s->textures_path[TEX_SOUTH]); */
+/* printf("WE %s\n", s->textures_path[TEX_WEST]); */
+/* printf("EA %s\n\n", s->textures_path[TEX_EAST]); */
+/* printf("S %s\n", s->textures_path[TEX_SPRITE]); */
+/* printf("F %d,%d,%d\n", s->floor_color.rgb.r, s->floor_color.rgb.g, s->floor_color.rgb.b); */
+/* printf("C %d,%d,%d\n\n", s->ceilling_color.rgb.r, s->ceilling_color.rgb.g, s->ceilling_color.rgb.b); */
+/* printf("%dx%d\n", s->map_height, s->map_width); */
+/* for (int i = 0; i < s->map_height; i++) */
+/* { */
+/* for (int j = 0; j < s->map_width; j++) */
+/* { */
+/* if (s->map[i][j] == CELL_WALL) */
+/* printf("#"); */
+/* else if (s->map[i][j] == CELL_EMPTY) */
+/* printf(" "); */
+/* else */
+/* printf("%d", s->map[i][j]); */
+/* if (j != s->map_width - 1) */
+/* printf(" "); */
+/* } */
+/* printf("\n"); */
+/* } */
+/* printf("post state_new\n"); */
+/* if ((s = state_new(s)) == NULL) */
+/* { */
+/* printf("Error: state new"); */
+/* return 1; */
+/* } */
+/* printf("state->pos [%f %f]\n", s->pos.x, s->pos.y); */
+/* state_destroy(s); */
+/* return 0; */
+/* } */