+static u32 addon_count( enum addon_type type, u32 ignoreflags ){
+ if( ignoreflags ){
+ u32 typecount = 0, count = 0;
+ for( u32 i=0; typecount<addon_count( type, 0 ); i++ ){
+ addon_reg *reg = &addon_system.registry[i];
+ if( reg->alias.type == type ){
+ typecount ++;
+
+ if( reg->flags & ignoreflags )
+ continue;
+
+ count ++;
+ }
+ }
+
+ return count;
+ }
+ else
+ return addon_system.registry_type_counts[ type ];