Xonotic
resources.qh File Reference
#include "all.inc"
+ Include dependency graph for resources.qh:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Resource
 

Macros

#define REGISTER_RESOURCE(id, inst)   REGISTER(Resources, RES, id, m_id, inst)
 

Functions

 REGISTER_RESOURCE (NONE, NEW(Resource))
 Describes the available resource types. More...
 
 REGISTRY (Resources, BITS(4))
 
 REGISTRY_CHECK (Resources)
 
 REGISTRY_SORT (Resources)
 
 STATIC_INIT (Resources_renumber)
 

Variables

int ammo_cells
 
int ammo_fuel
 
int ammo_nails
 
int ammo_none
 
int ammo_plasma
 
int ammo_rockets
 
int ammo_shells
 
const int RES_AMOUNT_HARD_LIMIT = 999
 Unconditional maximum amount of resources the entity can have. More...
 
const int RES_LIMIT_NONE = -1
 

Macro Definition Documentation

◆ REGISTER_RESOURCE

#define REGISTER_RESOURCE (   id,
  inst 
)    REGISTER(Resources, RES, id, m_id, inst)

Definition at line 35 of file resources.qh.

Function Documentation

◆ REGISTER_RESOURCE()

REGISTER_RESOURCE ( NONE  ,
NEW(Resource  
)

Describes the available resource types.

Indicates the lack of resource. Use with caution.

◆ REGISTRY()

REGISTRY ( Resources  ,
BITS(4)   
)

◆ REGISTRY_CHECK()

REGISTRY_CHECK ( Resources  )

◆ REGISTRY_SORT()

REGISTRY_SORT ( Resources  )

◆ STATIC_INIT()

STATIC_INIT ( Resources_renumber  )

Definition at line 42 of file resources.qh.

References FOREACH.

42 { FOREACH(Resources, true, it.m_id = i); }
#define FOREACH(list, cond, body)
Definition: iter.qh:19

Variable Documentation

◆ ammo_cells

int ammo_cells

Definition at line 18 of file resources.qh.

Referenced by REGISTER_RESOURCE().

◆ ammo_fuel

int ammo_fuel

Definition at line 24 of file resources.qh.

Referenced by REGISTER_RESOURCE().

◆ ammo_nails

int ammo_nails

Definition at line 16 of file resources.qh.

Referenced by REGISTER_RESOURCE().

◆ ammo_none

int ammo_none

Definition at line 14 of file resources.qh.

◆ ammo_plasma

int ammo_plasma

Definition at line 23 of file resources.qh.

Referenced by REGISTER_RESOURCE().

◆ ammo_rockets

int ammo_rockets

Definition at line 17 of file resources.qh.

Referenced by REGISTER_RESOURCE().

◆ ammo_shells

int ammo_shells

Definition at line 15 of file resources.qh.

Referenced by REGISTER_RESOURCE().

◆ RES_AMOUNT_HARD_LIMIT

const int RES_AMOUNT_HARD_LIMIT = 999

Unconditional maximum amount of resources the entity can have.

Definition at line 45 of file resources.qh.

Referenced by GetResourceLimit().

◆ RES_LIMIT_NONE