little cleanup

This commit is contained in:
djonker 2023-11-05 07:37:08 +01:00
parent 4932da0ad3
commit bd890b5798
7 changed files with 23 additions and 20 deletions

View File

@ -6,7 +6,7 @@
/* By: djonker <codam@houtworm.net> +#+ */
/* +#+ */
/* 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 */
/* */
/* ************************************************************************** */

View File

@ -6,7 +6,7 @@
/* By: houtworm <codam@houtworm.net> +#+ */
/* +#+ */
/* 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 */
/* */
/* ************************************************************************** */

View File

@ -6,7 +6,7 @@
/* By: houtworm <codam@houtworm.net> +#+ */
/* +#+ */
/* 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 */
/* */
/* ************************************************************************** */

View File

@ -6,7 +6,7 @@
/* By: houtworm <codam@houtworm.net> +#+ */
/* +#+ */
/* 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 */
/* */
/* ************************************************************************** */
@ -17,7 +17,7 @@ void keyhook(mlx_key_data_t kd, void *param)
t_varlist *vl;
vl = param;
vl->w =vl->w;
vl->w = vl->w;
if (mlx_is_key_down(vl->mlx, MLX_KEY_ESCAPE))
{
ft_putendl("escape is pressed");

View File

@ -6,7 +6,7 @@
/* By: houtworm <codam@houtworm.net> +#+ */
/* +#+ */
/* 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)
ft_putendl("Next Weapon");
}

View File

@ -6,7 +6,7 @@
/* By: houtworm <codam@houtworm.net> +#+ */
/* +#+ */
/* 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)
{
if ((int)vl->sprite[i].x == (int)vl->posx)
{
if ((int)vl->sprite[i].y == (int)vl->posy)
{
if (vl->sprite[i].type == 4)
{
while (vl->sprite[i].x)
@ -56,6 +58,8 @@ void ft_pickup(t_varlist *vl)
vl->spritecount--;
vl->treasure++;
}
}
}
i++;
}
}
@ -97,7 +101,7 @@ int main(int argc, char **argv)
if (argc == 2)
vl = ft_parseconfigfile(vl, argv[1]);
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))
ft_errorexit("image to window failed ", "main", 1);
mlx_key_hook(vl.mlx, &keyhook, &vl);

View File

@ -6,7 +6,7 @@
/* By: houtworm <codam@houtworm.net> +#+ */
/* +#+ */
/* 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 */
/* */
/* ************************************************************************** */