mirror of
https://codeberg.org/ACME-Corporation/cub3d.git
synced 2025-12-06 09:58:09 +01:00
fix: various rendering issues
- Correct rendering on whole window if window is not square - Multiple crashes eliminated - Sprites no longer lag behind player movement/rotation
This commit is contained in:
parent
98e0119c91
commit
fcb08f6447
4 changed files with 9 additions and 11 deletions
|
|
@ -6,7 +6,7 @@
|
|||
/* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/07/17 14:14:30 by kcolin #+# #+# */
|
||||
/* Updated: 2025/08/11 11:03:22 by tchampio ### ########.fr */
|
||||
/* Updated: 2025/08/12 14:23:27 by kcolin ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -39,11 +39,9 @@ int game_loop(t_cub3d_data *data)
|
|||
char *fps_string;
|
||||
|
||||
data->last_tick = get_milliseconds();
|
||||
mlx_destroy_image(data->mlx, data->img_data->img);
|
||||
data->img_data->img = mlx_new_image(data->mlx, WIDTH, HEIGHT);
|
||||
reset_matrix(data);
|
||||
raycaster(data, &ray);
|
||||
move_player(data);
|
||||
raycaster(data, &ray);
|
||||
sprite_caster(data);
|
||||
matrix_to_image(data);
|
||||
draw_map(data->map, &data->player, data->img_data);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue