revision 2
[carveJwlIkooP6JGAAIwe30JlM.git] / entity.h
index 2874441a51b56b0cfccd440f72d4800d6a4e93eb..a925318b92be649ec09725ce3a2112572474edc0 100644 (file)
--- 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; i<mdl_arrcount(arr); i++ ){
-      ent_marker *marker = mdl_arritm( arr, i );
-
-      if( !strcmp( mdl_pstr( mdl, marker->pstr_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 );