#include "registration.h" #include #include tc_entity_type_s *tc_player_entity_type_g = NULL; void tc_fn_create_player_entity(tc_entity_s *entity) { entity->type = tc_player_entity_type_g; entity->specific = NULL; } void tc_fn_delete_player_entity(tc_entity_s *entity) { if(entity->specific != NULL) free(entity->specific); tc_deallocate_entity(entity); } void tc_fn_send_event_player_entity(tc_entity_s *entity, tc_entity_event_s event) { } void tc_register_player_entity() { tc_entity_type_s type; type.internal_name = "player"; type.display_name = "Player"; type.instances_capacity = 8; type.functions.fn_create = (tc_entity_create_fn) tc_fn_create_player_entity; type.functions.fn_delete = tc_fn_delete_player_entity; type.functions.fn_send_event = tc_fn_send_event_player_entity; tc_register_entity_type(type); tc_player_entity_type_g = tc_get_entity_type_with_name("player"); }