Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
guide.qh File Reference
Include dependency graph for guide.qh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  TopicSource

Macros

#define _REGISTRY_SOURCE(id, arr_name, register_arr, cond1, cond2, cond3, num_conds)
#define _REGISTRY_SOURCE_FILL(arr_name, register_arr, cond1, cond2, cond3, num_conds, filter_cond)
#define REGISTRY_SOURCE(...)
#define REGISTRY_SOURCE_3(id, arr_name, register_arr)
#define REGISTRY_SOURCE_4(id, arr_name, register_arr, cond1)
#define REGISTRY_SOURCE_5(id, arr_name, register_arr, cond1, cond2)
#define REGISTRY_SOURCE_6(id, arr_name, register_arr, cond1, cond2, cond3)
#define TOPICS(X)

Functions

 !startsWith (it.registered_id, "WEP_OVERKILL_")
 REGISTRY_SOURCE (ItemSource, Items, Items, !it.instanceOfPowerup &&it.instanceOfAmmo, !it.instanceOfPowerup &&it.instanceOfHealth, !it.instanceOfPowerup &&it.instanceOfArmor) REGISTRY_SOURCE(WeaponSource
 startsWith (it.registered_id, "WEP_OVERKILL_") &&!(it.spawnflags &WEP_FLAG_SUPERWEAPON)

Variables

bool instanceOfAmmo
bool instanceOfArmor
bool instanceOfHealth
bool instanceOfPowerup
bool m_hidden
 Weapons

Macro Definition Documentation

◆ _REGISTRY_SOURCE

#define _REGISTRY_SOURCE ( id,
arr_name,
register_arr,
cond1,
cond2,
cond3,
num_conds )
Value:
ArrayList arr_name##_MENU; \
int arr_name##_MENU_COUNT; \
STATIC_INIT_LATE(arr_name##_MENU) \
{ \
AL_NEW(arr_name##_MENU, REGISTRY_MAX(register_arr), NULL, e); \
_REGISTRY_SOURCE_FILL(arr_name, register_arr, cond1, cond2, cond3, num_conds, true); \
} \
CLASS(id, DataSource) \
METHOD(id, getEntry, entity(id this, int i, void(string, string) returns)) \
{ \
entity e = AL_gete(arr_name##_MENU, i); \
if (returns) \
e.display(e, returns); \
return e; \
} \
METHOD(id, reload, int(id this, string filter)) \
{ \
arr_name##_MENU_COUNT = 0; \
_REGISTRY_SOURCE_FILL(arr_name, register_arr, cond1, cond2, cond3, num_conds, \
(filter == "" ? true : (strstrofs(strtolower(it.message ? it.message : it.m_name), strtolower(filter), 0) >= 0))); \
return arr_name##_MENU_COUNT; \
} \
ENDCLASS(id)
entity ArrayList
Definition arraylist.qh:3
#define AL_gete(this, idx)
Definition arraylist.qh:56
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
string strtolower(string s)
entity() spawn
#define strstrofs
#define NULL
Definition post.qh:14
#define REGISTRY_MAX(id)
Definition registry.qh:17

Definition at line 52 of file guide.qh.

52#define _REGISTRY_SOURCE(id, arr_name, register_arr, cond1, cond2, cond3, num_conds) \
53ArrayList arr_name##_MENU; \
54int arr_name##_MENU_COUNT; \
55STATIC_INIT_LATE(arr_name##_MENU) \
56{ \
57 AL_NEW(arr_name##_MENU, REGISTRY_MAX(register_arr), NULL, e); \
58 _REGISTRY_SOURCE_FILL(arr_name, register_arr, cond1, cond2, cond3, num_conds, true); \
59} \
60CLASS(id, DataSource) \
61 METHOD(id, getEntry, entity(id this, int i, void(string, string) returns)) \
62 { \
63 entity e = AL_gete(arr_name##_MENU, i); \
64 if (returns) \
65 e.display(e, returns); \
66 return e; \
67 } \
68 METHOD(id, reload, int(id this, string filter)) \
69 { \
70 arr_name##_MENU_COUNT = 0; \
71 _REGISTRY_SOURCE_FILL(arr_name, register_arr, cond1, cond2, cond3, num_conds, \
72 (filter == "" ? true : (strstrofs(strtolower(it.message ? it.message : it.m_name), strtolower(filter), 0) >= 0))); \
73 return arr_name##_MENU_COUNT; \
74 } \
75ENDCLASS(id)

◆ _REGISTRY_SOURCE_FILL

#define _REGISTRY_SOURCE_FILL ( arr_name,
register_arr,
cond1,
cond2,
cond3,
num_conds,
filter_cond )
Value:
if (num_conds >= 1) \
FOREACH(register_arr, !it.m_hidden && (cond1) && (filter_cond), { \
AL_sete(arr_name##_MENU, arr_name##_MENU_COUNT, it); \
++arr_name##_MENU_COUNT; \
}); \
if (num_conds >= 2) \
FOREACH(register_arr, !it.m_hidden && (cond2) && (filter_cond), { \
AL_sete(arr_name##_MENU, arr_name##_MENU_COUNT, it); \
++arr_name##_MENU_COUNT; \
}); \
if (num_conds >= 3) \
FOREACH(register_arr, !it.m_hidden && (cond3) && (filter_cond), { \
AL_sete(arr_name##_MENU, arr_name##_MENU_COUNT, it); \
++arr_name##_MENU_COUNT; \
});

Definition at line 35 of file guide.qh.

35#define _REGISTRY_SOURCE_FILL(arr_name, register_arr, cond1, cond2, cond3, num_conds, filter_cond) \
36if (num_conds >= 1) \
37 FOREACH(register_arr, !it.m_hidden && (cond1) && (filter_cond), { \
38 AL_sete(arr_name##_MENU, arr_name##_MENU_COUNT, it); \
39 ++arr_name##_MENU_COUNT; \
40 }); \
41if (num_conds >= 2) \
42 FOREACH(register_arr, !it.m_hidden && (cond2) && (filter_cond), { \
43 AL_sete(arr_name##_MENU, arr_name##_MENU_COUNT, it); \
44 ++arr_name##_MENU_COUNT; \
45 }); \
46if (num_conds >= 3) \
47 FOREACH(register_arr, !it.m_hidden && (cond3) && (filter_cond), { \
48 AL_sete(arr_name##_MENU, arr_name##_MENU_COUNT, it); \
49 ++arr_name##_MENU_COUNT; \
50 });

◆ REGISTRY_SOURCE

#define REGISTRY_SOURCE ( ...)
Value:
#define REGISTRY_SOURCE(...)
Definition guide.qh:77
#define OVERLOAD(F,...)
Definition misc.qh:12
#define EVAL(...)
Definition misc.qh:4

Definition at line 77 of file guide.qh.

◆ REGISTRY_SOURCE_3

#define REGISTRY_SOURCE_3 ( id,
arr_name,
register_arr )
Value:
_REGISTRY_SOURCE(id, arr_name, register_arr, true, false, false, 1)
#define _REGISTRY_SOURCE(id, arr_name, register_arr, cond1, cond2, cond3, num_conds)
Definition guide.qh:52

Definition at line 78 of file guide.qh.

◆ REGISTRY_SOURCE_4

#define REGISTRY_SOURCE_4 ( id,
arr_name,
register_arr,
cond1 )
Value:
_REGISTRY_SOURCE(id, arr_name, register_arr, cond1, false, false, 1)

Definition at line 79 of file guide.qh.

◆ REGISTRY_SOURCE_5

#define REGISTRY_SOURCE_5 ( id,
arr_name,
register_arr,
cond1,
cond2 )
Value:
_REGISTRY_SOURCE(id, arr_name, register_arr, cond1, cond2, false, 2)

Definition at line 80 of file guide.qh.

◆ REGISTRY_SOURCE_6

#define REGISTRY_SOURCE_6 ( id,
arr_name,
register_arr,
cond1,
cond2,
cond3 )
Value:
_REGISTRY_SOURCE(id, arr_name, register_arr, cond1, cond2, cond3, 3)

Definition at line 81 of file guide.qh.

◆ TOPICS

#define TOPICS ( X)
Value:
X(NEW(IntroductionSource), _("Introduction"), "gametype_tdm") \
X(NEW(MovementSource), _("Movement"), "gametype_inv") \
X(NEW(GametypeSource), _("Gametypes"), "gametype_dm") \
X(NEW(WeaponSource), _("Weapons"), "gametype_duel") \
X(NEW(ItemSource), _("Items"), "gametype_kh") \
X(NEW(PowerupSource), _("Powerups"), "gametype_dom") \
X(NEW(BuffSource), _("Buffs"), "gametype_ka") \
X(NEW(NadeSource), _("Nades"), "gametype_ft") \
X(NEW(MonsterSource), _("Monsters"), "gametype_lms") \
X(NEW(VehicleSource), _("Vehicles"), "gametype_rc") \
X(NEW(TurretSource), _("Turrets"), "gametype_as") \
X(NEW(MutatorSource), _("Mutators"), "gametype_nb") \
X(NEW(ModSource), _("Mods"), "gametype_ons") \
#define X()
#define NEW(cname,...)
Definition oo.qh:117

Definition at line 8 of file guide.qh.

8#define TOPICS(X) \
9 X(NEW(IntroductionSource), _("Introduction"), "gametype_tdm") \
10 X(NEW(MovementSource), _("Movement"), "gametype_inv") \
11 X(NEW(GametypeSource), _("Gametypes"), "gametype_dm") \
12 X(NEW(WeaponSource), _("Weapons"), "gametype_duel") \
13 X(NEW(ItemSource), _("Items"), "gametype_kh") \
14 X(NEW(PowerupSource), _("Powerups"), "gametype_dom") \
15 X(NEW(BuffSource), _("Buffs"), "gametype_ka") \
16 X(NEW(NadeSource), _("Nades"), "gametype_ft") \
17 X(NEW(MonsterSource), _("Monsters"), "gametype_lms") \
18 X(NEW(VehicleSource), _("Vehicles"), "gametype_rc") \
19 X(NEW(TurretSource), _("Turrets"), "gametype_as") \
20 X(NEW(MutatorSource), _("Mutators"), "gametype_nb") \
21 X(NEW(ModSource), _("Mods"), "gametype_ons") \
22 /**/

Referenced by TopicSource::getEntry(), TopicSource::reload(), and XonoticGuideTab_topicChangeNotify().

Function Documentation

◆ !startsWith()

!startsWith ( it. registered_id,
"WEP_OVERKILL_"  )

◆ REGISTRY_SOURCE()

REGISTRY_SOURCE ( ItemSource ,
Items ,
Items ,
!it.instanceOfPowerup &&it. instanceOfAmmo,
!it.instanceOfPowerup &&it. instanceOfHealth,
!it.instanceOfPowerup &&it. instanceOfArmor )

◆ startsWith()

startsWith ( it. registered_id,
"WEP_OVERKILL_"  ) &

References startsWith, and WEP_FLAG_SUPERWEAPON.

Variable Documentation

◆ instanceOfAmmo

bool instanceOfAmmo

Definition at line 30 of file guide.qh.

Referenced by RandomItems_GetRandomVanillaItemClassName().

◆ instanceOfArmor

bool instanceOfArmor

Definition at line 32 of file guide.qh.

Referenced by RandomItems_GetRandomVanillaItemClassName().

◆ instanceOfHealth

bool instanceOfHealth

Definition at line 31 of file guide.qh.

Referenced by RandomItems_GetRandomVanillaItemClassName().

◆ instanceOfPowerup

bool instanceOfPowerup

Definition at line 33 of file guide.qh.

Referenced by RandomItems_GetRandomVanillaItemClassName().

◆ m_hidden

bool m_hidden

Definition at line 29 of file guide.qh.

Referenced by REGISTER_RESOURCE().

◆ Weapons

Weapons

Definition at line 113 of file guide.qh.

Referenced by _WepSet_FromWeapon(), accuracy_reset(), ammo_pickupevalfunc(), bot_cmd_select_weapon(), CL_Weapon_GetShotOrg(), client_hasweapon(), Dump_Weapon_Settings(), fixPriorityList(), GiveItems(), GiveRandomWeapons(), GiveWeapon(), havocbot_ai(), havocbot_chooseweapon(), havocbot_chooseweapon_checkreload(), HUD_Notify(), HUD_Weapons(), Item_GiveTo(), Item_Initialise(), Item_RandomFromList(), Item_RespawnCountdown(), KeyBinds_BuildList(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), NET_HANDLE(), NET_HANDLE(), NET_HANDLE(), NET_HANDLE(), NIX_CanChooseWeapon(), NIX_ChooseNextWeapon(), NIX_GiveCurrentWeapon(), notif_arg_item_wepammo(), PlayerDamage(), PlayerStats_GameReport_Accuracy(), PlayerStats_GameReport_Init(), PutPlayerInServer(), RandomItems_GetRandomVanillaItemClassName(), readlevelcvars(), readplayerstartcvars(), ReadWepSet(), REGISTER_MUTATOR(), REGISTER_MUTATOR(), REGISTER_SETTINGS(), REGISTER_WEAPON(), Scoreboard_AccuracyStats_Draw(), Scoreboard_AccuracyStats_WouldDraw(), spawnfunc(), spritelookupblinkvalue(), spritelookupcolor(), spritelookupicon(), spritelookuptext(), StartItem(), STATIC_INIT(), STATIC_INIT(), TEST(), W_CycleWeapon(), W_DropEvent(), W_FixWeaponOrder_BuildImpulseList_cmp(), W_GetCycleWeapon(), W_GiveWeapon(), W_IsWeaponThrowable(), W_LastWeapon(), W_NameWeaponOrder_MapFunc(), W_NextWeaponOnImpulse(), W_NumberWeaponOrder_MapFunc(), W_PROP_reload(), W_RandomWeapons(), W_ThrowNewWeapon(), Weapon_from_impulse(), Weapon_from_name(), weapon_pickupevalfunc(), weapons_all(), weapons_devall(), weapons_most(), weapons_start(), WriteWepSet(), XonoticKeyBinder_resizeNotify(), XonoticMutatorsDialog_fill(), XonoticWeaponsList_drawListBoxItem(), XonoticWeaponsList_resizeNotify(), and XonoticWeaponsList_toString().