NXEngine v1.0.0.6
[NXEngine.git] / p_arms.h
blobb5c548b69c561a6c0864c0470d7ebcc2c9f1eaed
2 #ifndef _P_ARMS_H
3 #define _P_ARMS_H
5 // player->weapons[] array
6 enum
8 WPN_NONE = 0,
9 WPN_SNAKE = 1,
10 WPN_POLARSTAR = 2,
11 WPN_FIREBALL = 3,
12 WPN_MGUN = 4,
13 WPN_MISSILE = 5,
14 WPN_BUBBLER = 7,
15 WPN_BLADE = 9,
16 WPN_SUPER_MISSILE = 10,
17 WPN_NEMESIS = 12,
18 WPN_SPUR = 13,
20 WPN_COUNT = 14
23 // stored inside player structure
24 struct Weapon
26 bool hasWeapon; // true if player has this weapon
27 int xp, max_xp[3]; // current XP, & max XP per level
28 uint8_t level; // current level (0=L1 1=L2 2=L3)
29 int ammo; // current ammo (0 = n/a)
30 int maxammo; // max ammo (0 = unlimited)
32 // for rapid fire weapons. if firerate = 0, must push for each shot.
33 int firetimer;
34 int firerate[3];
36 // for recharging weapons
37 int rechargetimer;
38 int rechargerate[3];
40 // for charged-shot weapons (Spur)
41 int chargetimer;
43 void SetFireRate(int l1, int l2, int l3)
45 firerate[0] = l1;
46 firerate[1] = l2;
47 firerate[2] = l3;
50 void SetRechargeRate(int l1, int l2, int l3)
52 rechargerate[0] = l1;
53 rechargerate[1] = l2;
54 rechargerate[2] = l3;
58 // shot types for SetupBullet.
59 // matches the order of bullet_table.
60 enum
62 B_PSTAR_L1,
63 B_PSTAR_L2,
64 B_PSTAR_L3,
66 B_MGUN_L1,
67 B_MGUN_L2,
68 B_MGUN_L2P2,
69 B_MGUN_L2P3,
71 B_MGUN_L3,
72 B_MGUN_L3P2,
73 B_MGUN_L3P3,
74 B_MGUN_L3P4,
75 B_MGUN_L3P5,
77 B_MISSILE_L1,
78 B_MISSILE_L2,
79 B_MISSILE_L3,
81 B_SUPER_MISSILE_L1,
82 B_SUPER_MISSILE_L2,
83 B_SUPER_MISSILE_L3,
85 B_FIREBALL1,
86 B_FIREBALL2,
87 B_FIREBALL3,
89 B_BLADE_L1,
90 B_BLADE_L2,
91 B_BLADE_L3,
93 B_SNAKE_L1,
94 B_SNAKE_L2,
95 B_SNAKE_L3,
97 B_NEMESIS_L1,
98 B_NEMESIS_L2,
99 B_NEMESIS_L3,
101 B_BUBBLER_L1,
102 B_BUBBLER_L2,
103 B_BUBBLER_L3,
105 B_SPUR_L1,
106 B_SPUR_L2,
107 B_SPUR_L3,
109 B_CURLYS_NEMESIS,
111 B_LAST
114 #endif