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

Go to the source code of this file.

Macros

#define ACCUMULATE_FUNCTION(func, otherfunc)
#define CALL_ACCUMULATED_FUNCTION(func)
#define CHECK_MAX_COUNT(name, max, count, type)
#define SET_FIELD_COUNT(field, first, count)
#define SET_FIRST_OR_LAST(input, first, count)

Functions

void ACCUMULATE_call (string func)

Macro Definition Documentation

◆ ACCUMULATE_FUNCTION

#define ACCUMULATE_FUNCTION ( func,
otherfunc )
Value:
.float _ACCUMULATE_##func##__##otherfunc;

Definition at line 31 of file accumulate.qh.

31 #define ACCUMULATE_FUNCTION(func, otherfunc) \
32 .float _ACCUMULATE_##func##__##otherfunc;

◆ CALL_ACCUMULATED_FUNCTION

#define CALL_ACCUMULATED_FUNCTION ( func)
Value:
void ACCUMULATE_call(string func)
Definition accumulate.qh:33

Definition at line 45 of file accumulate.qh.

45 #define CALL_ACCUMULATED_FUNCTION(func) \
46 ACCUMULATE_call( #func)

Referenced by GenericCommand_restartnotifs().

◆ CHECK_MAX_COUNT

#define CHECK_MAX_COUNT ( name,
max,
count,
type )
Value:
if (count > max) { error(strcat("Maximum ", type, " hit: ", #name, ": ", ftos(count), ".\n")); }
float count
Definition powerups.qc:22
string name
Definition menu.qh:30
string ftos(float f)
float max(float f,...)
strcat(_("^F4Countdown stopped!"), "\n^BG", _("Teams are too unbalanced."))
#define error
Definition pre.qh:6

Definition at line 55 of file accumulate.qh.

55#define CHECK_MAX_COUNT(name, max, count, type) \
56 if (count > max) { error(strcat("Maximum ", type, " hit: ", #name, ": ", ftos(count), ".\n")); }

◆ SET_FIELD_COUNT

#define SET_FIELD_COUNT ( field,
first,
count )
Value:
if (!field) { field = (first + count); ++count; }

Definition at line 53 of file accumulate.qh.

53#define SET_FIELD_COUNT(field, first, count) \
54 if (!field) { field = (first + count); ++count; }

◆ SET_FIRST_OR_LAST

#define SET_FIRST_OR_LAST ( input,
first,
count )
Value:
if (!input) { input = (first + count); }

Definition at line 51 of file accumulate.qh.

51#define SET_FIRST_OR_LAST(input, first, count) \
52 if (!input) { input = (first + count); }

Function Documentation

◆ ACCUMULATE_call()

void ACCUMULATE_call ( string func)

Definition at line 33 of file accumulate.qh.

34 {
35 float i;
36 float n = numentityfields();
37 string funcprefix = strcat("_ACCUMULATE_", func, "__");
38 float funcprefixlen = strlen(funcprefix);
39 for (i = 0; i < n; ++i)
40 {
41 string name = entityfieldname(i);
42 if (substring(name, 0, funcprefixlen) == funcprefix) callfunction(substring(name, funcprefixlen, -1));
43 }
44 }
#define strlen
string substring(string s, float start, float length)
void callfunction(...)

References callfunction(), name, strcat(), strlen, and substring().