mirror of
https://codeberg.org/ACME-Corporation/cub3d.git
synced 2025-12-06 09:58:09 +01:00
removal(main): Removed sprites initialization in main function
This commit is contained in:
parent
fcb08f6447
commit
b7d56363ab
1 changed files with 1 additions and 13 deletions
14
src/main.c
14
src/main.c
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */
|
/* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2025/07/17 14:14:30 by kcolin #+# #+# */
|
/* Created: 2025/07/17 14:14:30 by kcolin #+# #+# */
|
||||||
/* Updated: 2025/08/12 14:23:27 by kcolin ### ########.fr */
|
/* Updated: 2025/08/12 14:48:07 by tchampio ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -64,19 +64,7 @@ int main(int argc, char **argv)
|
||||||
if (argc < 2)
|
if (argc < 2)
|
||||||
return (ft_printf("Error: Missing cub3d file\n"), 1);
|
return (ft_printf("Error: Missing cub3d file\n"), 1);
|
||||||
init_cub3d_data(&data, argv);
|
init_cub3d_data(&data, argv);
|
||||||
// FIXME: Delete this whole piece of code when we will init sprites from
|
|
||||||
// map
|
|
||||||
data.sprite_list = ft_calloc(sizeof(t_sprite *), 3);
|
data.sprite_list = ft_calloc(sizeof(t_sprite *), 3);
|
||||||
data.sprite_list[0] = ft_calloc(sizeof(t_sprite), 1);
|
|
||||||
data.sprite_list[1] = ft_calloc(sizeof(t_sprite), 1);
|
|
||||||
data.sprite_list[0]->x = data.map->startx + 1;
|
|
||||||
data.sprite_list[0]->y = data.map->starty;
|
|
||||||
data.sprite_list[0]->image = load_single_texture(&data,
|
|
||||||
"ressources/box.xpm");
|
|
||||||
data.sprite_list[1]->x = data.map->startx;
|
|
||||||
data.sprite_list[1]->y = data.map->starty - 2;
|
|
||||||
data.sprite_list[1]->image = load_single_texture(&data,
|
|
||||||
"ressources/test_holed.xpm");
|
|
||||||
mlx_hook(data.mlx_win, KeyPress, KeyPressMask, keypress_handler, &data);
|
mlx_hook(data.mlx_win, KeyPress, KeyPressMask, keypress_handler, &data);
|
||||||
mlx_hook(data.mlx_win, KeyRelease, KeyReleaseMask,
|
mlx_hook(data.mlx_win, KeyRelease, KeyReleaseMask,
|
||||||
keyrelease_handler, &data);
|
keyrelease_handler, &data);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue