use ceiling and floor colors from the map file
This commit is contained in:
parent
6eb1479fc5
commit
184c8a60af
3 changed files with 19 additions and 7 deletions
|
|
@ -6,7 +6,7 @@
|
|||
/* By: mc <mc@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/10/14 14:55:05 by greg #+# #+# */
|
||||
/* Updated: 2024/11/07 00:54:17 by mc ### ########.fr */
|
||||
/* Updated: 2024/11/07 19:27:54 by mc ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -121,13 +121,13 @@ static void draw_vertical_line(int x, u_int32_t *img_data,
|
|||
while (y++ < SCREEN_HEIGHT)
|
||||
{
|
||||
if (y < draw_start)
|
||||
img_data[y * SCREEN_WIDTH + x] = COLOR_CEILING;
|
||||
img_data[y * SCREEN_WIDTH + x] = g_map.color_ceiling;
|
||||
else if (y < draw_end)
|
||||
{
|
||||
draw_wall(tex, ray, line_height, x, y, img_data);
|
||||
}
|
||||
else
|
||||
img_data[y * SCREEN_WIDTH + x] = COLOR_FLOOR;
|
||||
img_data[y * SCREEN_WIDTH + x] = g_map.color_floor;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue