mirror of
https://codeberg.org/ACME-Corporation/cub3d.git
synced 2025-12-06 01:48:08 +01:00
dev: moved my_mlx_get_pixel function in draw utils for easier access
This commit is contained in:
parent
aed03e79c3
commit
7a1e8c18df
4 changed files with 15 additions and 11 deletions
|
|
@ -6,7 +6,7 @@
|
|||
/* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/07/31 13:17:39 by kcolin #+# #+# */
|
||||
/* Updated: 2025/08/05 14:59:24 by kcolin ### ########.fr */
|
||||
/* Updated: 2025/08/06 12:08:33 by tchampio ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -14,6 +14,7 @@
|
|||
#include "../consts.h"
|
||||
#include "ray.h"
|
||||
#include "../renderer/render.h"
|
||||
#include "../draw/drawutils.h"
|
||||
|
||||
t_cardinal_dir get_cardinal(t_ray *ray)
|
||||
{
|
||||
|
|
@ -33,13 +34,6 @@ t_cardinal_dir get_cardinal(t_ray *ray)
|
|||
}
|
||||
}
|
||||
|
||||
static int my_mlx_pixel_get(t_img_data *img, int x, int y)
|
||||
{
|
||||
char *dst;
|
||||
|
||||
dst = img->addr + (y * img->line_length + x * (img->bits_per_pixel / 8));
|
||||
return (*(int *)dst);
|
||||
}
|
||||
|
||||
static int get_color(t_cub3d_data *data, t_ray *ray, int tex_y)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue