Inexor
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
guns.hpp
Go to the documentation of this file.
1 #pragma once
2 #include "inexor/sound/sound.hpp"
5 
6 #define MAXRAYS 20
7 #define EXP_SELFDAMDIV 2
8 #define EXP_SELFPUSH 2.5f
9 #define EXP_DISTSCALE 1.5f
10 #define BOMB_DAMRAD 20
11 
12 
14 enum
15 {
16  GUN_FIST = 0,
31 };
32 
33 
36 enum
37 {
41 };
42 
43 // hard coded weapons and pickups
44 
46 struct itemstat
47 {
48  int add, // additional ammo/amount for one pickup
49  max, // max amount
50  sound;// pickup sound
51  const char *name;
52  int icon, info;
53 };
54 
56 static const itemstat itemstats[] =
57 {
58  {10, 30, S_ITEMAMMO, "SG", HICON_SG, GUN_SG},
59  {20, 60, S_ITEMAMMO, "CG", HICON_CG, GUN_CG},
60  {5, 15, S_ITEMAMMO, "RL", HICON_RL, GUN_RL},
61  {5, 15, S_ITEMAMMO, "RI", HICON_RIFLE, GUN_RIFLE},
62  {10, 30, S_ITEMAMMO, "GL", HICON_GL, GUN_GL},
63  {30, 120, S_ITEMAMMO, "PI", HICON_PISTOL, GUN_PISTOL},
64  {1, 12, S_ITEMAMMO, "BO", HICON_BOMB, GUN_BOMB},
65  {1, 10, S_ITEMPUP, "BR", HICON_BOMBRADIUS, -1},
66  {1, 7, S_ITEMPUP, "BD", HICON_BOMBDELAY, -1},
67  {25, 100, S_ITEMHEALTH, "H", HICON_HEALTH, -1},
68  {10, 1000, S_ITEMHEALTH, "MH", HICON_HEALTH, -1},
69  {100, 100, S_ITEMARMOUR, "GA", HICON_GREEN_ARMOUR, A_GREEN},
70  {200, 200, S_ITEMARMOUR, "YA", HICON_YELLOW_ARMOUR, A_YELLOW},
71  {20000, 30000, S_ITEMPUP, "Q", HICON_QUAD, -1}
72 };
73 
75 struct guninfo
76 {
79  const char *name, *file; short part;
80 };
81 
83 static const guninfo guns[NUMGUNS] =
84 {
85  {S_PUNCH1, 250, 50, 0, 0, 0, 14, 1, 80, 0, 0, "fist", "chainsaw", 0},
86  {S_SG, 1400, 10, 400, 0, 20, 1024, 20, 80, 0, 0, "shotgun", "shotgun", 0},
87  {S_CG, 100, 30, 100, 0, 7, 1024, 1, 80, 0, 0, "chaingun", "chaingun", 0},
88  {S_RLFIRE, 800, 120, 0, 320, 10, 1024, 1, 160, 40, 0, "rocketlauncher", "rocket", 0},
89  {S_RIFLE, 1500, 100, 0, 0, 30, 2048, 1, 80, 0, 0, "rifle", "rifle", 0},
90  {S_FLAUNCH, 600, 90, 0, 200, 10, 1024, 1, 250, 45, 1500, "grenadelauncher", "grenadelauncher", 0},
91  {S_PISTOL, 500, 35, 50, 0, 7, 1024, 1, 80, 0, 0, "pistol", "pistol", 0},
92  {S_FEXPLODE, 375, 200, 8, 20, 0, 1024, 1, 150, 40, 1500, "bomb", "cannon", 0},
93  {S_FLAUNCH, 200, 20, 0, 200, 1, 1024, 1, 80, 40, 0, "fireball", nullptr, PART_FIREBALL1},
94  {S_ICEBALL, 200, 40, 0, 120, 1, 1024, 1, 80, 40, 0, "iceball", nullptr, PART_FIREBALL2},
95  {S_SLIMEBALL, 200, 30, 0, 640, 1, 1024, 1, 80, 40, 0, "slimeball", nullptr, PART_FIREBALL3},
96  {S_PIGR1, 250, 50, 0, 0, 1, 12, 1, 80, 0, 0, "bite", nullptr, 0},
97  {-1, 0, 120, 0, 0, 0, 0, 1, 80, 40, 0, "barrel", nullptr, 0},
98  {S_FEXPLODE, 375, 200, 8, 20, 0, 1024, 1, 150, 40, 1500, "bomb_splinter", nullptr, 0},
99 
100 };
101 
monster/bot: iceball
Definition: guns.hpp:26
Definition: 3dgui.hpp:20
Definition: sound.hpp:18
Definition: 3dgui.hpp:17
int icon
Definition: guns.hpp:52
Definition: 3dgui.hpp:15
Definition: 3dgui.hpp:23
Definition: guns.hpp:38
static const guninfo guns[NUMGUNS]
create an array of guninfo instances ('guns')
Definition: guns.hpp:83
Definition: sound.hpp:32
Definition: 3dgui.hpp:37
monster/bot: slimeball
Definition: guns.hpp:27
Definition: sound.hpp:32
int exprad
Definition: guns.hpp:78
Definition: sound.hpp:33
Definition: particles.hpp:15
int hitpush
Definition: guns.hpp:78
Definition: 3dgui.hpp:38
const char * file
Definition: guns.hpp:79
const char * name
Definition: guns.hpp:51
Definition: guns.hpp:39
Definition: guns.hpp:40
grenade launcher
Definition: guns.hpp:22
Definition: sound.hpp:18
pickup description structure
Definition: guns.hpp:46
barrel damage
Definition: guns.hpp:29
monster/bot: fireball
Definition: guns.hpp:25
int attackdelay
Definition: guns.hpp:77
static const itemstat itemstats[]
create an array of itemstat instances ('pickups')
Definition: guns.hpp:56
short part
Definition: guns.hpp:79
int kickamount
Definition: guns.hpp:78
Definition: particles.hpp:15
Definition: guns.hpp:30
weapon description structure
Definition: guns.hpp:75
int rays
Definition: guns.hpp:78
int max
Definition: guns.hpp:48
int info
Definition: guns.hpp:52
int ttl
Definition: guns.hpp:78
int damage
Definition: guns.hpp:77
int sound
Definition: guns.hpp:48
int spread
Definition: guns.hpp:77
Definition: guns.hpp:16
Definition: 3dgui.hpp:25
Definition: sound.hpp:17
int add
Definition: guns.hpp:48
Definition: sound.hpp:16
Definition: sound.hpp:17
Definition: particles.hpp:15
rocket launcher
Definition: guns.hpp:20
Definition: sound.hpp:17
int projspeed
Definition: guns.hpp:77
const char * name
Definition: guns.hpp:79
Definition: 3dgui.hpp:28
bite
Definition: guns.hpp:28
Definition: sound.hpp:16
int sound
Definition: guns.hpp:77
int range
Definition: guns.hpp:78
Definition: sound.hpp:21
shotgun
Definition: guns.hpp:18
Definition: sound.hpp:21
Definition: sound.hpp:16
chaingun
Definition: guns.hpp:19
Definition: guns.hpp:21
Definition: guns.hpp:23
Definition: 3dgui.hpp:26
Definition: guns.hpp:17
Definition: sound.hpp:16
Definition: 3dgui.hpp:21
Definition: 3dgui.hpp:22
Definition: 3dgui.hpp:24
Definition: 3dgui.hpp:14
Definition: sound.hpp:32
BOMBERMAN gamemode: bomb.
Definition: guns.hpp:24