added some sprites

This commit is contained in:
djonker 2023-11-02 03:26:29 +01:00
parent 8c5d85c11d
commit 598dfa0672
51 changed files with 12 additions and 6 deletions

BIN
assets/ammo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 813 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
assets/bkey.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 901 B

BIN
assets/die1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
assets/die2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
assets/die3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
assets/die4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
assets/die5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
assets/fire1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

BIN
assets/fire2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
assets/fire3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
assets/food.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1018 B

BIN
assets/ggun.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
assets/ggun1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1003 B

BIN
assets/ggun2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
assets/ggun3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
assets/ggun4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
assets/ggun5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
assets/gkey.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 889 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 393 B

BIN
assets/guard1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
assets/guard2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
assets/guard3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
assets/guard4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
assets/guard5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
assets/gun1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 984 B

BIN
assets/gun2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
assets/gun3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
assets/gun4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
assets/gun5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
assets/hlamp.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 955 B

BIN
assets/hpkit.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 871 B

BIN
assets/knife1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 697 B

BIN
assets/knife2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 887 B

BIN
assets/knife3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 963 B

BIN
assets/knife4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
assets/knife5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 963 B

BIN
assets/mgun.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
assets/mgun1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 816 B

BIN
assets/mgun2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
assets/mgun3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
assets/mgun4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
assets/mgun5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

BIN
assets/slamp.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
assets/treasure1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 865 B

BIN
assets/treasure2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1008 B

BIN
assets/treasure3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
assets/treasure4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 994 B

View File

@ -6,7 +6,7 @@
/* By: houtworm <codam@houtworm.net> +#+ */ /* By: houtworm <codam@houtworm.net> +#+ */
/* +#+ */ /* +#+ */
/* Created: 2023/10/26 16:49:12 by houtworm #+# #+# */ /* Created: 2023/10/26 16:49:12 by houtworm #+# #+# */
/* Updated: 2023/11/01 15:43:34 by houtworm ######## odam.nl */ /* Updated: 2023/11/01 21:41:55 by houtworm ######## odam.nl */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */

View File

@ -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/10/29 19:33:50 by houtworm ######## odam.nl */ /* Updated: 2023/11/02 02:21:54 by houtworm ######## odam.nl */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -24,6 +24,12 @@ void ft_movementkeys(t_varlist *vl)
distance = vl->sidedistx - vl->deltadistx; distance = vl->sidedistx - vl->deltadistx;
if (mlx_is_mouse_down(vl->mlx, MLX_MOUSE_BUTTON_LEFT)) if (mlx_is_mouse_down(vl->mlx, MLX_MOUSE_BUTTON_LEFT))
ft_putendl("shoot"); ft_putendl("shoot");
if (mlx_is_key_down(vl->mlx, MLX_KEY_SPACE))
ft_putendl("jump");
if (mlx_is_key_down(vl->mlx, MLX_KEY_LEFT_CONTROL))
vl->hoffset = 0;
else
vl->hoffset = 50;
if (mlx_is_key_down(vl->mlx, MLX_KEY_W)) if (mlx_is_key_down(vl->mlx, MLX_KEY_W))
{ {
if (vl->map[(int)(vl->posx + vl->dirx * vl->movespeed)][(int)vl->posy] == '0' && distance > 0.4) if (vl->map[(int)(vl->posx + vl->dirx * vl->movespeed)][(int)vl->posy] == '0' && distance > 0.4)
@ -94,6 +100,10 @@ void ft_movementkeys(t_varlist *vl)
vl->planex = vl->planex * cos(-vl->rotspeed) - vl->planey * sin(-vl->rotspeed); vl->planex = vl->planex * cos(-vl->rotspeed) - vl->planey * sin(-vl->rotspeed);
vl->planey = oldplanex * sin(-vl->rotspeed) + vl->planey * cos(-vl->rotspeed); vl->planey = oldplanex * sin(-vl->rotspeed) + vl->planey * cos(-vl->rotspeed);
} }
if (mlx_is_key_down(vl->mlx, MLX_KEY_LEFT_SHIFT))
vl->run = 2;
else
vl->run = 1;
} }
void keyhook(mlx_key_data_t kd, void *param) void keyhook(mlx_key_data_t kd, void *param)
@ -110,10 +120,6 @@ void keyhook(mlx_key_data_t kd, void *param)
} }
if ((kd.key == MLX_KEY_H || kd.key == MLX_KEY_F1) && kd.action == MLX_PRESS) if ((kd.key == MLX_KEY_H || kd.key == MLX_KEY_F1) && kd.action == MLX_PRESS)
ft_putendl("H is pressed"); ft_putendl("H is pressed");
if (kd.modifier == MLX_SHIFT)
vl->run = 2;
else
vl->run = 1;
} }
void scrollhook(double xdelta, double ydelta, void *param) void scrollhook(double xdelta, double ydelta, void *param)