Cub3D
 
Loading...
Searching...
No Matches
filter.h File Reference

Header file for filters. More...

#include "data_structure.h"
Include dependency graph for filter.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define LUMA_RED_WEIGHT   0.299
 
#define LUMA_GREEN_WEIGHT   0.587
 
#define LUMA_BLUE_WEIGHT   0.114
 
#define RANDOM_FILTER_ON_ALL   0
 Define if all the textures are modified using the same filter or not.
 

Functions

void add_filter (t_img *img, int filter)
 
void add_filter_protected (t_img *img, int filter)
 
void add_tint (t_img *img, unsigned char red_add, unsigned char green_add, unsigned char blue_add)
 
void add_tint_protected (t_img *img, unsigned char red_add, unsigned char green_add, unsigned char blue_add)
 
void apply_filters_on_textures (t_textures *textures)
 
void filter_overflow (t_color *pixel, t_color filter)
 
void swap_textures (t_map *map)
 
void change_filter (t_data *data, int keycode)
 
void convert_textures_to_black_and_white (t_map *map)
 
void ft_free_alt_textures (t_mlx *mlx, t_map *map)
 

Detailed Description

Header file for filters.

Macro Definition Documentation

◆ LUMA_BLUE_WEIGHT

#define LUMA_BLUE_WEIGHT   0.114

◆ LUMA_GREEN_WEIGHT

#define LUMA_GREEN_WEIGHT   0.587

◆ LUMA_RED_WEIGHT

#define LUMA_RED_WEIGHT   0.299

◆ RANDOM_FILTER_ON_ALL

#define RANDOM_FILTER_ON_ALL   0

Define if all the textures are modified using the same filter or not.

Function Documentation

◆ add_filter()

void add_filter ( t_img * img,
int filter )

◆ add_filter_protected()

void add_filter_protected ( t_img * img,
int filter )
Here is the call graph for this function:

◆ add_tint()

void add_tint ( t_img * img,
unsigned char red_add,
unsigned char green_add,
unsigned char blue_add )

◆ add_tint_protected()

void add_tint_protected ( t_img * img,
unsigned char red_add,
unsigned char green_add,
unsigned char blue_add )
Here is the call graph for this function:

◆ apply_filters_on_textures()

void apply_filters_on_textures ( t_textures * textures)
Here is the call graph for this function:

◆ change_filter()

void change_filter ( t_data * data,
int keycode )
Here is the call graph for this function:

◆ convert_textures_to_black_and_white()

void convert_textures_to_black_and_white ( t_map * map)

◆ filter_overflow()

void filter_overflow ( t_color * pixel,
t_color filter )

◆ ft_free_alt_textures()

void ft_free_alt_textures ( t_mlx * mlx,
t_map * map )

◆ swap_textures()

void swap_textures ( t_map * map)