diff options
| author | Charles <sircharlesaze@gmail.com> | 2020-01-30 14:18:41 +0100 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2020-01-30 14:18:41 +0100 |
| commit | 679b5dced1d73d9284bab8965e2f3bf37b3056f4 (patch) | |
| tree | 1ec6a302f6ceb63296322b3b8f03107290157450 /render.c | |
| parent | 01e713026d462f3adf5b3e6f0b2785d0fa7c9bc2 (diff) | |
| download | cub3d-679b5dced1d73d9284bab8965e2f3bf37b3056f4.tar.gz cub3d-679b5dced1d73d9284bab8965e2f3bf37b3056f4.tar.bz2 cub3d-679b5dced1d73d9284bab8965e2f3bf37b3056f4.zip | |
fixed ceilling/floor color
Diffstat (limited to 'render.c')
| -rw-r--r-- | render.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -6,7 +6,7 @@ /* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/01/11 13:37:17 by cacharle #+# #+# */ -/* Updated: 2020/01/30 13:38:35 by cacharle ### ########.fr */ +/* Updated: 2020/01/30 14:16:36 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ @@ -23,7 +23,6 @@ int render_update(void *param) exit(EXIT_SUCCESS); return (0); } - ft_bzero(state->window.data, state->window.width * state->window.height * 4); render_update_window(state); mlx_put_image_to_window(state->mlx_ptr, state->window_ptr, state->window.id, 0, 0); return (0); @@ -69,16 +68,14 @@ void render_window_column(t_state *state, t_render_state *rstate) { int i; t_color white; - t_color black; white.hexcode = 0x00ffffff; - black.hexcode = 0x00000000; i = 0; while (i < rstate->draw_start) ((t_color*)state->window.data)[i++ * state->window.width + rstate->x] = state->ceilling_color; while (i < rstate->draw_end) ((t_color*)state->window.data)[i++ * state->window.width + rstate->x] = white; - while (i < state->window_height) + while (i < state->window.height) ((t_color*)state->window.data)[i++ * state->window.width + rstate->x] = state->floor_color; /* while (++i < rstate->draw_start) */ |
