yet again more world load revision
[carveJwlIkooP6JGAAIwe30JlM.git] / world_entity.h
1 #ifndef WORLD_ENTITY_H
2 #define WORLD_ENTITY_H
3
4 #include "world.h"
5 #include "entity.h"
6 #include "bvh.h"
7 #include "save.h"
8
9 VG_STATIC void world_gen_entities_init( world_instance *world );
10 VG_STATIC ent_spawn *world_find_spawn_by_name( world_instance *world,
11 const char *name );
12 VG_STATIC ent_spawn *world_find_closest_spawn( world_instance *world,
13 v3f position );
14 VG_STATIC void world_entity_start( world_instance *world,
15 struct savedata *sav );
16
17 VG_STATIC void ent_volume_call( world_instance *world, ent_call *call );
18 VG_STATIC void ent_audio_call( world_instance *world, ent_call *call );
19 VG_STATIC void ent_ccmd_call( world_instance *world, ent_call *call );
20
21 VG_STATIC void entity_bh_expand_bound( void *user, boxf bound, u32 item_index );
22 VG_STATIC float entity_bh_centroid( void *user, u32 item_index, int axis );
23 VG_STATIC void entity_bh_swap( void *user, u32 ia, u32 ib );
24 VG_STATIC void entity_bh_debug( void *user, u32 item_index );
25 VG_STATIC void entity_bh_closest( void *user, u32 item_index, v3f point,
26 v3f closest );
27
28 static bh_system bh_system_entity_list = {
29 .expand_bound = entity_bh_expand_bound,
30 .item_centroid = entity_bh_centroid,
31 .item_closest = entity_bh_closest,
32 .item_swap = entity_bh_swap,
33 .item_debug = entity_bh_debug,
34 .cast_ray = NULL
35 };
36
37 #endif /* WORLD_ENTITY_H */