Cub3D
Loading...
Searching...
No Matches
my_mlx_pixel_put.c
1
/* ************************************************************************** */
2
/* */
3
/* ::: :::::::: */
4
/* my_mlx_pixel_put.c :+: :+: :+: */
5
/* +:+ +:+ +:+ */
6
/* By: kamitsui <kamitsui@student.42tokyo.jp> +#+ +:+ +#+ */
7
/* +#+#+#+#+#+ +#+ */
8
/* Created: 2024/08/26 02:00:13 by kamitsui #+# #+# */
9
/* Updated: 2024/09/30 17:59:11 by kamitsui ### ########.fr */
10
/* */
11
/* ************************************************************************** */
12
13
#include "cub3d.h"
14
15
// Function to put a pixel in the image
16
void
my_mlx_pixel_put(
t_img
*img,
int
x,
int
y,
int
color)
17
{
18
char
*dst;
19
20
dst = img->addr + (y * img->line_length + x * (img->bpp / 8));
21
*(
unsigned
int
*)dst = color;
22
}
s_img
3D or 2D or Texture image
Definition
type_cub3d.h:82
srcs
mlx_utils
my_mlx_pixel_put.c
Generated by
1.9.8