37 lines
1.6 KiB
C
37 lines
1.6 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* :::::::: */
|
|
/* render.h :+: :+: */
|
|
/* +:+ */
|
|
/* By: qmennen <qmennen@student.codam.nl> +#+ */
|
|
/* +#+ */
|
|
/* Created: 2025/04/15 16:28:16 by qmennen #+# #+# */
|
|
/* Updated: 2025/06/10 19:30:21 by whaffman ######## odam.nl */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#ifndef RENDER_H
|
|
# define RENDER_H
|
|
|
|
# include "cub3d.h"
|
|
# define MIN_SPRITE_DIST 0.1
|
|
|
|
void render_map(t_game *game);
|
|
t_render cast_ray(t_game *game, int x);
|
|
void cast_rays(t_game *game);
|
|
void render_sprites(t_render *render, t_game *game);
|
|
double dda(t_render *render, t_vec2 ray_dir, t_vec2 pos, t_map *map);
|
|
void draw_floor(t_game *game);
|
|
void draw_line(t_game *game, t_render render, int x);
|
|
unsigned int get_texture_color(mlx_texture_t *texture,
|
|
t_render render, t_vec2_int tex);
|
|
|
|
void sort_sprites(t_game *game);
|
|
void calculate_sprite_dist(t_game *game);
|
|
void cam_fraction(t_game *game, t_sprite *sprite);
|
|
unsigned int calculate_alpha(double dist);
|
|
unsigned int sample_texture_color(t_sprite *sprite,
|
|
t_vec2_int tex, int n);
|
|
|
|
#endif
|