|
Xonotic
|
#include "log.qh"
Include dependency graph for bits.qh:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Macros | |
| #define | BIT(n) (1 << (n)) |
| Only ever assign into the first 24 bits in QC (so max is BIT(23)). More... | |
| #define | BITS(n) (BIT(n) - 1) |
| #define | BITSET(var, mask, flag) (flag ? (var) | (mask) : (var) & ~(mask)) |
Enumerations | |
| enum | { OP_SET, OP_MIN, OP_MAX, OP_PLUS, OP_MINUS } |
Functions | |
| ERASEABLE bool | GiveBit (entity e,.int fld, int bit, int op, int val) |
| ERASEABLE bool | GiveValue (entity e,.int fld, int op, int val) |
| ERASEABLE int | lowestbit (int f) |
| ERASEABLE int | randombit (int bits) |
| ERASEABLE int | randombits (int bits, int k, bool error_return) |
| #define BIT | ( | n | ) | (1 << (n)) |
Only ever assign into the first 24 bits in QC (so max is BIT(23)).
QC converts the float to int, performs the bit operation, then converts it back. Assigning to the highest bits means some of the low ones might get lost due to float precision.
Definition at line 8 of file bits.qh.
Referenced by _WepSet_FromWeapon(), ClientData_Send(), CSQCModel_Hook_PostUpdate(), CSQCPlayer_ApplyBobbing(), CSQCPlayer_SetCamera(), ctf_DelayedInit(), DelayThink(), EliminatedPlayers_SendEntity(), findperpendicular(), GiveItems(), havocbot_goalrating_ons_controlpoints_attack(), HUD_Mod_CTF(), Item_GiveTo(), Keepaway::Keepaway ::m_isAlwaysSupported(), kh_GetMissingTeams(), MapVote_ReadMask(), MapVote_WriteMask(), MUTATOR_HOOKFUNCTION(), Nagger_ReadyCounted(), Nagger_SendEntity(), Nagger_VoteChanged(), Nagger_VoteCountChanged(), nb_spawnteams(), NET_HANDLE(), NumTeams(), ons_ControlPoint_CanBeLinked(), onslaught_updatelinks(), PlayerScore_Add(), PlayerScore_Clear(), PlayerScore_Set(), PM_check_specialcommand(), relocate_spawnpoint(), Score_ClearAll(), ScoreInfo_Init(), SelectSpawnPoint(), STATIC_INIT(), SUB_UseTargets_Ex(), tdm_DelayedInit(), Team_IndexToBit(), Team_TeamToBit(), TeamBalance_CheckAllowedTeams(), TeamScore_AddToTeam(), TeamScore_SendEntity(), viewloc_PlayerPhysics(), WarpZone_PostTeleportPlayer_Callback(), and WarpZone_Touch().
| #define BITS | ( | n | ) | (BIT(n) - 1) |
Definition at line 9 of file bits.qh.
Referenced by freezetag_Initialize(), invasion_DelayedInit(), kh_Initialize(), Mutator::Mutator ::Mutator(), rc_SetLimits(), REGISTER_MUTATOR(), tdm_DelayedInit(), and TeamBalance_AutoBalanceBots().
| #define BITSET | ( | var, | |
| mask, | |||
| flag | |||
| ) | (flag ? (var) | (mask) : (var) & ~(mask)) |
Definition at line 11 of file bits.qh.
Referenced by buff_Inferno_CalculateTime(), CSQCModel_Hook_PostUpdate(), CSQCModel_Send(), CSQCPlayer_SetCamera(), GetPressedKeys(), MUTATOR_HOOKFUNCTION(), NET_HANDLE(), PM_dodging(), and spawnfunc().
| anonymous enum |
| Enumerator | |
|---|---|
| OP_SET | |
| OP_MIN | |
| OP_MAX | |
| OP_PLUS | |
| OP_MINUS | |
Definition at line 76 of file bits.qh.
Definition at line 85 of file bits.qh.
References ERASEABLE, OP_MAX, OP_MIN, OP_MINUS, OP_PLUS, and OP_SET.
Referenced by GiveItems().
Here is the caller graph for this function:Definition at line 110 of file bits.qh.
References max(), min(), OP_MAX, OP_MIN, OP_MINUS, OP_PLUS, and OP_SET.
Here is the call graph for this function:Definition at line 28 of file bits.qh.
References ERASEABLE, and random().
Referenced by randombits().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 51 of file bits.qh.
References randombit().
Here is the call graph for this function: