Subastra
Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Enumerations | Functions
require.h File Reference
#include "../engine/entity.h"
#include "../engine/input.h"
#include "../engine/world.h"
#include "../names.h"
#include "../rendering/context.h"
Include dependency graph for require.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  system_payload_t
 
struct  system_req_t
 
struct  system_requirements_declaration_t
 

Macros

#define SYSTEM_REQ_PTR_REQUIRED   ((void *)1)
 Sentinel value. Marks the system resourc as required. The scheduler must guarantee exclusive access.
 
#define SYSTEM_REQ_PTR_UNUSED   ((void *)0)
 Sentinel value. Marks the system resource as unused. The scheduler must provide a NULL pointer.
 
#define SYSTEM_REQ_NO_DEPS   0, 0
 

Typedefs

typedef void(* system_runner_f) (system_payload_t payload, allocator_t temporary_allocator)
 

Enumerations

enum  system_phase_t {
  SYSTEM_PHASE_PRE_UPDATE , SYSTEM_PHASE_UPDATE , SYSTEM_PHASE_FIXED_UPDATE , SYSTEM_PHASE_POST_UPDATE ,
  SYSTEM_PHASE_PRE_RENDER , SYSTEM_PHASE_RENDER , SYSTEM_PHASE_POST_RENDER , SYSTEM_PHASE_count
}
 
enum  system_resource_mask_t { SYSTEM_RESOURCE_MASK_WORLD = 0b1 , SYSTEM_RESOURCE_MASK_INPUT = 0b10 , SYSTEM_RESOURCE_MASK_RENDERING_CONTEXT = 0b100 , SYSTEM_RESOURCE_MASK_SYSTEM_SPECIFIC_DATA = 0b1000 }
 

Functions

static const char * system_phase_to_str (system_phase_t phase)
 
static system_payload_t system_payload_new (world_t *world, input_t *input, rendering_ctx_t *rendering_ctx, double dt, double fdt)
 
static system_payload_t system_payload_new_inherit (system_req_t requirements, system_payload_t *parent)
 Copy the parameters specified in the requirements into a new payload.
 
static system_req_t system_req_new (name_t name, system_resource_mask_t resources)
 
static void system_req_entity_kinds_const (system_req_t *req, entity_kind_mask_t entity_kind_mask)
 
static void system_req_entity_kinds_mut (system_req_t *req, entity_kind_mask_t entity_kind_mask)
 
static entity_iter_t system_payload_entity_iter (system_payload_t *payload)
 

Macro Definition Documentation

◆ SYSTEM_REQ_NO_DEPS

#define SYSTEM_REQ_NO_DEPS   0, 0

◆ SYSTEM_REQ_PTR_REQUIRED

#define SYSTEM_REQ_PTR_REQUIRED   ((void *)1)

Sentinel value. Marks the system resourc as required. The scheduler must guarantee exclusive access.

◆ SYSTEM_REQ_PTR_UNUSED

#define SYSTEM_REQ_PTR_UNUSED   ((void *)0)

Sentinel value. Marks the system resource as unused. The scheduler must provide a NULL pointer.

Typedef Documentation

◆ system_runner_f

typedef void(* system_runner_f) (system_payload_t payload, allocator_t temporary_allocator)

Enumeration Type Documentation

◆ system_phase_t

Enumerator
SYSTEM_PHASE_PRE_UPDATE 
SYSTEM_PHASE_UPDATE 
SYSTEM_PHASE_FIXED_UPDATE 
SYSTEM_PHASE_POST_UPDATE 
SYSTEM_PHASE_PRE_RENDER 
SYSTEM_PHASE_RENDER 
SYSTEM_PHASE_POST_RENDER 
SYSTEM_PHASE_count 

◆ system_resource_mask_t

Enumerator
SYSTEM_RESOURCE_MASK_WORLD 
SYSTEM_RESOURCE_MASK_INPUT 
SYSTEM_RESOURCE_MASK_RENDERING_CONTEXT 
SYSTEM_RESOURCE_MASK_SYSTEM_SPECIFIC_DATA 

Function Documentation

◆ system_payload_entity_iter()

static entity_iter_t system_payload_entity_iter ( system_payload_t payload)
static

◆ system_payload_new()

static system_payload_t system_payload_new ( world_t world,
input_t input,
rendering_ctx_t rendering_ctx,
double  dt,
double  fdt 
)
static

◆ system_payload_new_inherit()

static system_payload_t system_payload_new_inherit ( system_req_t  requirements,
system_payload_t parent 
)
static

Copy the parameters specified in the requirements into a new payload.

Returns
the payload with the skipped fields zero-ed out

◆ system_phase_to_str()

static const char * system_phase_to_str ( system_phase_t  phase)
static

◆ system_req_entity_kinds_const()

static void system_req_entity_kinds_const ( system_req_t req,
entity_kind_mask_t  entity_kind_mask 
)
static

◆ system_req_entity_kinds_mut()

static void system_req_entity_kinds_mut ( system_req_t req,
entity_kind_mask_t  entity_kind_mask 
)
static

◆ system_req_new()

static system_req_t system_req_new ( name_t  name,
system_resource_mask_t  resources 
)
static