little cleanup
This commit is contained in:
parent
4932da0ad3
commit
bd890b5798
@ -6,7 +6,7 @@
|
|||||||
/* By: djonker <codam@houtworm.net> +#+ */
|
/* By: djonker <codam@houtworm.net> +#+ */
|
||||||
/* +#+ */
|
/* +#+ */
|
||||||
/* Created: 2023/10/27 14:36:42 by djonker #+# #+# */
|
/* Created: 2023/10/27 14:36:42 by djonker #+# #+# */
|
||||||
/* Updated: 2023/11/05 06:45:03 by houtworm ######## odam.nl */
|
/* Updated: 2023/11/05 07:28:58 by houtworm ######## odam.nl */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
/* By: houtworm <codam@houtworm.net> +#+ */
|
/* By: houtworm <codam@houtworm.net> +#+ */
|
||||||
/* +#+ */
|
/* +#+ */
|
||||||
/* Created: 2023/10/26 16:54:20 by houtworm #+# #+# */
|
/* Created: 2023/10/26 16:54:20 by houtworm #+# #+# */
|
||||||
/* Updated: 2023/11/05 07:23:45 by houtworm ######## odam.nl */
|
/* Updated: 2023/11/05 07:29:26 by houtworm ######## odam.nl */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
/* By: houtworm <codam@houtworm.net> +#+ */
|
/* By: houtworm <codam@houtworm.net> +#+ */
|
||||||
/* +#+ */
|
/* +#+ */
|
||||||
/* Created: 2023/10/26 16:54:20 by houtworm #+# #+# */
|
/* Created: 2023/10/26 16:54:20 by houtworm #+# #+# */
|
||||||
/* Updated: 2023/11/05 07:23:20 by houtworm ######## odam.nl */
|
/* Updated: 2023/11/05 07:32:02 by houtworm ######## odam.nl */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
/* By: houtworm <codam@houtworm.net> +#+ */
|
/* By: houtworm <codam@houtworm.net> +#+ */
|
||||||
/* +#+ */
|
/* +#+ */
|
||||||
/* Created: 2023/10/26 16:50:23 by houtworm #+# #+# */
|
/* Created: 2023/10/26 16:50:23 by houtworm #+# #+# */
|
||||||
/* Updated: 2023/11/05 05:18:53 by houtworm ######## odam.nl */
|
/* Updated: 2023/11/05 07:36:08 by houtworm ######## odam.nl */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
/* By: houtworm <codam@houtworm.net> +#+ */
|
/* By: houtworm <codam@houtworm.net> +#+ */
|
||||||
/* +#+ */
|
/* +#+ */
|
||||||
/* Created: 2023/10/26 16:50:23 by houtworm #+# #+# */
|
/* Created: 2023/10/26 16:50:23 by houtworm #+# #+# */
|
||||||
/* Updated: 2023/11/05 05:42:54 by houtworm ######## odam.nl */
|
/* Updated: 2023/11/05 07:35:52 by houtworm ######## odam.nl */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@ -48,4 +48,3 @@ void scrollhook(double xdelta, double ydelta, void *param)
|
|||||||
if (ydelta < 0)
|
if (ydelta < 0)
|
||||||
ft_putendl("Next Weapon");
|
ft_putendl("Next Weapon");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
/* By: houtworm <codam@houtworm.net> +#+ */
|
/* By: houtworm <codam@houtworm.net> +#+ */
|
||||||
/* +#+ */
|
/* +#+ */
|
||||||
/* Created: 2023/10/26 14:13:07 by houtworm #+# #+# */
|
/* Created: 2023/10/26 14:13:07 by houtworm #+# #+# */
|
||||||
/* Updated: 2023/11/05 04:55:32 by houtworm ######## odam.nl */
|
/* Updated: 2023/11/05 07:35:27 by houtworm ######## odam.nl */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@ -45,7 +45,9 @@ void ft_pickup(t_varlist *vl)
|
|||||||
while (vl->sprite[i].x)
|
while (vl->sprite[i].x)
|
||||||
{
|
{
|
||||||
if ((int)vl->sprite[i].x == (int)vl->posx)
|
if ((int)vl->sprite[i].x == (int)vl->posx)
|
||||||
|
{
|
||||||
if ((int)vl->sprite[i].y == (int)vl->posy)
|
if ((int)vl->sprite[i].y == (int)vl->posy)
|
||||||
|
{
|
||||||
if (vl->sprite[i].type == 4)
|
if (vl->sprite[i].type == 4)
|
||||||
{
|
{
|
||||||
while (vl->sprite[i].x)
|
while (vl->sprite[i].x)
|
||||||
@ -56,6 +58,8 @@ void ft_pickup(t_varlist *vl)
|
|||||||
vl->spritecount--;
|
vl->spritecount--;
|
||||||
vl->treasure++;
|
vl->treasure++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -97,7 +101,7 @@ int main(int argc, char **argv)
|
|||||||
if (argc == 2)
|
if (argc == 2)
|
||||||
vl = ft_parseconfigfile(vl, argv[1]);
|
vl = ft_parseconfigfile(vl, argv[1]);
|
||||||
else
|
else
|
||||||
ft_errorexit("Please include a .cub file ", "", 2); // we could start with a menu here
|
ft_errorexit("Please include a .cub file ", "", 2);
|
||||||
if (!vl.img || (mlx_image_to_window(vl.mlx, vl.img, 0, 0) < 0))
|
if (!vl.img || (mlx_image_to_window(vl.mlx, vl.img, 0, 0) < 0))
|
||||||
ft_errorexit("image to window failed ", "main", 1);
|
ft_errorexit("image to window failed ", "main", 1);
|
||||||
mlx_key_hook(vl.mlx, &keyhook, &vl);
|
mlx_key_hook(vl.mlx, &keyhook, &vl);
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
/* By: houtworm <codam@houtworm.net> +#+ */
|
/* By: houtworm <codam@houtworm.net> +#+ */
|
||||||
/* +#+ */
|
/* +#+ */
|
||||||
/* Created: 2023/10/26 16:48:55 by houtworm #+# #+# */
|
/* Created: 2023/10/26 16:48:55 by houtworm #+# #+# */
|
||||||
/* Updated: 2023/11/05 04:42:46 by houtworm ######## odam.nl */
|
/* Updated: 2023/11/05 07:33:11 by houtworm ######## odam.nl */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user