/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* draw.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: dkaiser mlx, wall_texture); mlx_resize_image(wall_image, 48, 48); game->map.tile_size.x = 48; game->map.tile_size.y = 48; x = 0; while (x < game->map.grid_size.x) { y = 0; while (y < game->map.grid_size.y) { if (game->map.tiles[y * game->map.grid_size.x + x] == WALL) mlx_image_to_window(game->mlx, wall_image, x * game->map.tile_size.x, y * game->map.tile_size.y); y++; } x++; } return (0); } int draw(t_game *game) { game->player.img->instances[0].x = game->player.position.x; game->player.img->instances[0].y = game->player.position.y; return (0); }