Cub3D
Loading...
Searching...
No Matches
destroy_texture_image.c
1/* ************************************************************************** */
2/* */
3/* ::: :::::::: */
4/* destroy_texture_image.c :+: :+: :+: */
5/* +:+ +:+ +:+ */
6/* By: kamitsui <kamitsui@student.42tokyo.jp> +#+ +:+ +#+ */
7/* +#+#+#+#+#+ +#+ */
8/* Created: 2024/10/07 01:01:38 by kamitsui #+# #+# */
9/* Updated: 2024/12/21 15:00:19 by kamitsui ### ########.fr */
10/* */
11/* ************************************************************************** */
12
13#include "cub3d.h"
14
15void destroy_texture_image(void *mlx, t_texture *texture, int flag)
16{
17 int i;
18 int bit;
19
20 i = 0;
21 while (i < 4)
22 {
23 bit = 0x01 << i;
24 if (flag & bit)
25 mlx_destroy_image(mlx, texture[i].img_tex.img);
26 i++;
27 }
28}
29// reference cub3d.h
30//# define BIT_NORTH 0x01 // 0000 0000 0001
31//# define BIT_WEST 0x02 // 0000 0000 0010
32//# define BIT_EAST 0x04 // 0000 0000 0100
33//# define BIT_SOUTH 0x08 // 0000 0000 1000
texture
Definition type_cub3d.h:94