X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=entity.h;h=a925318b92be649ec09725ce3a2112572474edc0;hb=5f6a4f9df6c8accc89f1920bfe9ace3cbac4c4b6;hp=2874441a51b56b0cfccd440f72d4800d6a4e93eb;hpb=a109f126d8adab622e38fbcc2d4281e75255246a;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/entity.h b/entity.h index 2874441..a925318 100644 --- a/entity.h +++ b/entity.h @@ -67,19 +67,23 @@ enum entity_alias{ k_ent_glider = 26 }; -static u32 mdl_entity_id_type( u32 entity_id ){ +static inline u32 mdl_entity_id_type( u32 entity_id ) +{ return (entity_id & 0x0fff0000) >> 16; } -static u32 mdl_entity_id_id( u32 entity_id ){ +static inline u32 mdl_entity_id_id( u32 entity_id ) +{ return entity_id & 0x0000ffff; } -static u32 mdl_entity_id( u32 type, u32 index ){ +static inline u32 mdl_entity_id( u32 type, u32 index ) +{ return (type & 0xfffff)<<16 | (index & 0xfffff); } -enum entity_function{ +enum entity_function +{ k_ent_function_trigger, k_ent_function_particle_spawn, k_ent_function_trigger_leave @@ -414,19 +418,8 @@ struct ent_worldinfo{ u32 flags; }; -static ent_marker *ent_find_marker( mdl_context *mdl, - mdl_array_ptr *arr, const char *alias ) -{ - for( u32 i=0; ipstr_alias ), alias ) ){ - return marker; - } - } - - return NULL; -} +ent_marker *ent_find_marker( mdl_context *mdl, mdl_array_ptr *arr, + const char *alias ); enum channel_behaviour{ k_channel_behaviour_unlimited = 0, @@ -565,4 +558,4 @@ struct ent_glider { }; #include "world.h" -static void entity_call( world_instance *world, ent_call *call ); +void entity_call( world_instance *world, ent_call *call );