-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathweapon.h
97 lines (75 loc) · 1.67 KB
/
weapon.h
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#ifndef WEAPON_H
#define WEAPON_H
#include <math.h>
#include <SDL.h>
#include <SDL_image.h>
#include "bullet.h"
#define LOW_GRADE_WEAPONS 4
#define MID_GRADE_WEAPONS 4
#define HIGH_GRADE_WEAPONS 4
#define SUPERIOR_GRADE_WEAPONS 5
#define ULTRA_GRADE_WEAPONS 5
typedef enum
{
/* low grade weapons */
needle_gun,
dot_gun,
blue_dot_gun,
blue_laser,
red_laser,
BOSS_needle_blaster,
BOSS_red_laser_thrower,
/* mid grade weapons */
needle_thrower,
dot_thrower,
blue_dot_shooter,
blue_double_laser,
red_double_laser,
BOSS_dark_blaster,
BOSS_red_plus_thrower,
/* high grade weapons */
blue_tripple_laser,
blue_energy_gun,
blue_needle_thrower,
e_gun,
red_plus_shooter,
red_energy_gun,
BOSS_plus_blaster,
BOSS_dark_cannon,
BOSS_minus_thrower,
/* superior grade weapon */
binary_gun,
blue_quadro_laser,
blue_energy_blaster,
dark_energy_blaster,
heavy_minus_blaster,
red_binary_gun,
red_plus_blaster,
red_energy_blaster,
blue_blaster,
dark_blaster,
BOSS_z_cannon,
BOSS_energy_blaster,
BOSS_plus_thrower,
/* ultra weapons */
ultimate_blue_laser,
ultraheavy_minus_blaster,
ultraheavy_plus_blaster,
greycode_deathblaster,
venn_shockwaver,
WEAPON_TYPE_MAX
}weapon_type;
typedef struct
{
bullet_type blt_type;
int bullets;
int splitter;
int atk;
double fire_rate;
double scatter_angle;
double bullet_speed;
}weapon;
extern int init_weapons(void);
extern void weapon_shot(const bullet_team team, const weapon_type type, enemy *shot_by, Uint32 *last_shot,
const double fire_rate, const double x, const double y, const int dir_x, const int atk);
#endif