6 #include "world_entity.h"
8 #include "ent_skateshop.c"
9 #include "ent_objective.c"
10 #include "ent_challenge.c"
11 #include "ent_relay.c"
13 typedef void (*fn_entity_call_handler
)( world_instance
*, ent_call
*);
15 VG_STATIC
void entity_call( world_instance
*world
, ent_call
*call
){
16 u32 type
= mdl_entity_id_type( call
->id
);
18 fn_entity_call_handler table
[] = {
19 [k_ent_volume
] = ent_volume_call
,
20 [k_ent_audio
] = ent_audio_call
,
21 [k_ent_skateshop
] = ent_skateshop_call
,
22 [k_ent_objective
] = ent_objective_call
,
23 [k_ent_ccmd
] = ent_ccmd_call
,
24 [k_ent_gate
] = ent_gate_call
,
25 [k_ent_relay
] = ent_relay_call
,
26 [k_ent_challenge
] = ent_challenge_call
29 if( type
>= vg_list_size(table
) ){
30 vg_error( "call to entity type: %u is out of range\n", type
);
34 fn_entity_call_handler fn
= table
[ type
];
37 vg_error( "call to entity type: %u is undefined\n", type
);