2 /// \brief Header file that describes the functions related to game items.
3 /// \copyright GNU GPLv2 or any later version.
7 /// \brief Initializes the item according to classname.
8 /// \param[in,out] item Item to initialize.
9 /// \param[in] class_name Class name to use.
10 /// \return No return.
11 void Item_Initialize(entity item, string class_name);
13 /// \brief Creates a loot item.
14 /// \param[in] class_name Class name of the item.
15 /// \param[in] position Position of the item.
16 /// \param[in] velocity of the item.
17 /// \param[in] time_to_live Amount of time after which the item will disappear.
18 /// \return Item on success, NULL otherwise.
19 entity Item_CreateLoot(string class_name, vector position, vector vel,
22 /// \brief Initializes the loot item.
23 /// \param[in] class_name Class name of the item.
24 /// \param[in] position Position of the item.
25 /// \param[in] velocity of the item.
26 /// \param[in] time_to_live Amount of time after which the item will disappear.
27 /// \return True on success, false otherwise.
28 /// \nore This function is useful if you want to set some item properties before
30 bool Item_InitializeLoot(entity item, string class_name, vector position,
31 vector vel, float time_to_live);
33 /// \brief Returns whether the item is loot.
34 /// \param[in] item Item to check.
35 /// \return True if the item is loot, false otherwise.
36 bool Item_IsLoot(entity item);
38 /// \brief Sets the item loot status.
39 /// \param[in,out] item Item to adjust.
40 /// \param[in] loot Whether item is loot.
41 /// \return No return.
42 void Item_SetLoot(entity item, bool loot);
44 // Item spawn functions.
45 // If a function is declared like this:
47 // You need to call it like this:
48 // spawnfunc_foo(item);
50 spawnfunc(item_health_small);
51 spawnfunc(item_health_medium);
52 spawnfunc(item_health_big);
53 spawnfunc(item_health_mega);
54 spawnfunc(item_armor_small);
55 spawnfunc(item_armor_medium);
56 spawnfunc(item_armor_big);
57 spawnfunc(item_armor_mega);
58 spawnfunc(item_shells);
59 spawnfunc(item_bullets);
60 spawnfunc(item_rockets);
61 spawnfunc(item_cells);
62 spawnfunc(item_plasma);
64 spawnfunc(item_strength);
65 spawnfunc(item_invincible);
66 spawnfunc(item_fuel_regen);
67 spawnfunc(item_jetpack);