+static u32 mdl_entity_id_type( u32 entity_id )
+{
+ return (entity_id & 0xffff0000) >> 16;
+}
+
+static u32 mdl_entity_id_id( u32 entity_id )
+{
+ return entity_id & 0x0000ffff;
+}
+
+static u32 mdl_entity_id( u32 type, u32 index )
+{
+ return (type & 0xfffff)<<16 | (index & 0xfffff);
+}