X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=world_entity.h;h=df5cbfadac5c3dc1cb25490652d56352720ec32e;hb=5f6a4f9df6c8accc89f1920bfe9ace3cbac4c4b6;hp=a3c5f331c5e97c8cea455ca908418c1930eb6f07;hpb=a109f126d8adab622e38fbcc2d4281e75255246a;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/world_entity.h b/world_entity.h index a3c5f33..df5cbfa 100644 --- a/world_entity.h +++ b/world_entity.h @@ -1,45 +1,34 @@ -#ifndef WORLD_ENTITY_H -#define WORLD_ENTITY_H - +#pragma once #include "world.h" #include "entity.h" -#include "bvh.h" -#include "save.h" +#include "vg/vg_bvh.h" #include "vg/vg_msg.h" -static void world_gen_entities_init( world_instance *world ); -static ent_spawn *world_find_spawn_by_name( world_instance *world, - const char *name ); -static ent_spawn *world_find_closest_spawn( world_instance *world, - v3f position ); -static void world_default_spawn_pos( world_instance *world, v3f pos ); -static void world_entity_start( world_instance *world, vg_msg *sav ); -static void world_entity_serialize( world_instance *world, vg_msg *sav ); - -static void ent_volume_call( world_instance *world, ent_call *call ); -static void ent_audio_call( world_instance *world, ent_call *call ); -static void ent_ccmd_call( world_instance *world, ent_call *call ); +void world_gen_entities_init( world_instance *world ); +ent_spawn *world_find_spawn_by_name( world_instance *world, + const char *name ); +ent_spawn *world_find_closest_spawn( world_instance *world, + v3f position ); +void world_default_spawn_pos( world_instance *world, v3f pos ); +void world_entity_start( world_instance *world, vg_msg *sav ); +void world_entity_serialize( world_instance *world, vg_msg *sav ); -static void entity_bh_expand_bound( void *user, boxf bound, u32 item_index ); -static float entity_bh_centroid( void *user, u32 item_index, int axis ); -static void entity_bh_swap( void *user, u32 ia, u32 ib ); -static void entity_bh_debug( void *user, u32 item_index ); -static void entity_bh_closest( void *user, u32 item_index, v3f point, - v3f closest ); +void ent_volume_call( world_instance *world, ent_call *call ); +void ent_audio_call( world_instance *world, ent_call *call ); +void ent_ccmd_call( world_instance *world, ent_call *call ); -static void world_entity_focus( u32 entity_id ); -static void world_entity_focus_preupdate(void); -static void world_entity_focus_render(void); -static void world_entity_unfocus(); -static void world_entity_focus_camera( world_instance *world, u32 uid ); +void entity_bh_expand_bound( void *user, boxf bound, u32 item_index ); +float entity_bh_centroid( void *user, u32 item_index, int axis ); +void entity_bh_swap( void *user, u32 ia, u32 ib ); +void entity_bh_debug( void *user, u32 item_index ); +void entity_bh_closest( void *user, u32 item_index, v3f point, + v3f closest ); -static bh_system bh_system_entity_list = { - .expand_bound = entity_bh_expand_bound, - .item_centroid = entity_bh_centroid, - .item_closest = entity_bh_closest, - .item_swap = entity_bh_swap, - .item_debug = entity_bh_debug, - .cast_ray = NULL -}; +void world_entity_focus( u32 entity_id ); +void world_entity_focus_preupdate(void); +void world_entity_focus_render(void); +void world_entity_unfocus(); +void world_entity_focus_camera( world_instance *world, u32 uid ); +void update_ach_models(void); -#endif /* WORLD_ENTITY_H */ +extern bh_system bh_system_entity_list;