aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_switch_weapons.c
blob: c936ed611a67e95f8e20c9ef555edfb6a1ca185c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/* ************************************************************************** */
/*                                                                            */
/*                                                        :::      ::::::::   */
/*   ft_switch_weapons.c                                :+:      :+:    :+:   */
/*                                                    +:+ +:+         +:+     */
/*   By: rbousset <marvin@42.fr>                    +#+  +:+       +#+        */
/*                                                +#+#+#+#+#+   +#+           */
/*   Created: 2020/02/14 17:28:55 by rbousset          #+#    #+#             */
/*   Updated: 2020/02/14 17:28:55 by rbousset         ###   ########lyon.fr   */
/*                                                                            */
/* ************************************************************************** */

#include <cub3d.h>
#include <stdint.h>

int8_t
	ft_switch_weap_one(t_cub *cl)
{
	cl->sfx[6].sfx_play(cl->sfx);
	cl->plist.handles_weapon = 0;
	return (0);
}

int8_t
	ft_switch_weap_two(t_cub *cl)
{
	cl->sfx[8].sfx_play(cl->sfx);
	cl->plist.handles_weapon = 2;
	return (0);
}

int8_t
	ft_switch_weap_three(t_cub *cl)
{
	cl->sfx[10].sfx_play(cl->sfx);
	cl->plist.handles_weapon = 4;
	return (0);
}