4 const int IT_UNLIMITED_WEAPON_AMMO = 1; // when this bit is set, using a weapon does not reduce ammo. Checkpoints can give this powerup.
5 const int IT_UNLIMITED_SUPERWEAPONS = 2; // when this bit is set, superweapons don't expire. Checkpoints can give this powerup.
6 const int IT_CTF_SHIELDED = 4; // set for the flag shield
7 const int IT_USING_JETPACK = 8; // confirmation that button is pressed
8 const int IT_JETPACK = 16; // actual item
9 const int IT_FUEL_REGEN = 32; // fuel regeneration trigger
11 const int IT_FUEL = 128;
12 // -Wdouble-declaration
14 // -Wdouble-declaration
16 // -Wdouble-declaration
17 #define IT_ROCKETS 1024
18 // -Wdouble-declaration
20 const int IT_SUPERWEAPON = 4096;
21 const int IT_STRENGTH = 8192;
22 const int IT_INVINCIBLE = 16384;
23 const int IT_HEALTH = 32768;
24 const int IT_PLASMA = 65536;
26 // shared value space (union):
28 // -Wdouble-declaration
29 #define IT_KEY1 131072
30 // -Wdouble-declaration
31 #define IT_KEY2 262144
34 const int IT_5HP = 524288;
35 const int IT_25HP = 1048576;
36 const int IT_ARMOR_SHARD = 2097152;
37 const int IT_ARMOR = 4194304;
40 const int IT_AMMO = 3968; // IT_FUEL | IT_SHELLS | IT_NAILS | IT_ROCKETS | IT_CELLS | IT_PLASMA;
41 const int IT_PICKUPMASK = 51; // IT_FUEL_REGEN | IT_JETPACK | IT_UNLIMITED_AMMO; // strength and invincible are handled separately
42 const int IT_UNLIMITED_AMMO = 3; // IT_UNLIMITED_SUPERWEAPONS | IT_UNLIMITED_WEAPON_AMMO;
44 #define ITEM_HANDLE(signal, ...) __Item_Send_##signal(__VA_ARGS__)
45 /** If you register a new item, make sure to add it to all.inc */
46 CLASS(GameItem, Object)
47 ATTRIB(GameItem, m_id, int, 0)
48 ATTRIB(GameItem, m_name, string, string_null)
49 ATTRIB(GameItem, m_icon, string, string_null)
50 ATTRIB(GameItem, m_color, vector, '1 1 1')
51 ATTRIB(GameItem, m_waypoint, string, string_null)
52 ATTRIB(GameItem, m_waypointblink, int, 1)
53 METHOD(GameItem, display, void(GameItem this, void(string name, string icon) returns)) {
54 returns(this.m_name, this.m_icon ? sprintf("/gfx/hud/%s/%s", cvar_string("menu_skin"), this.m_icon) : string_null);
56 METHOD(GameItem, show, void(GameItem this)) { LOG_INFO("A game item\n"); }
57 void ITEM_HANDLE(Show, GameItem this) { this.show(this); }