Example #1
0
void test_logic_init(){
	loop_add(server_loop_code, loop_generate_entry(0, "test_logic_engine", test_logic_engine));
	net_ip_connection_info_t *tmp_conn_info = new net_ip_connection_info_t;
	tmp_conn_info->ip = "127.0.0.1";
	tmp_conn_info->port = NET_IP_SERVER_RECEIVE_PORT;
	net = new net_t();
	net->set_inbound_info(tmp_conn_info->array.id);
}
Example #2
0
void net_init(){
	if(net_init_bool == false){
		net_loop_code.name = "net loop code";
		net_ip_connection_info_t *tmp_conn_info = new net_ip_connection_info_t;
		tmp_conn_info->ip = "127.0.0.1";
		tmp_conn_info->port = NET_SERVER_PORT;
		net = new net_t(argc_, argv_, tmp_conn_info->array.id);
		net_init_bool = true;
		SET_BIT(class_data_settings, CLASS_DATA_COORD_BIT, 1);
		SET_BIT(class_data_settings, CLASS_DATA_MODEL_BIT, 1);
		SET_BIT(class_data_settings, CLASS_DATA_CLIENT_BIT, 1);
		loop_add(&net_loop_code, "net_read_data", net_read_data);
		loop_add(&net_loop_code, "net_pingout", net_pingout);
		loop_add(&net_loop_code, "net_send_data",  net_send_data);
		loop_add(&server_loop_code, "net_engine",  net_engine);
	}else{
		printf("net_init has already been initalized, not re-running the initializer\n");
	}
}
Example #3
0
void input_init(){
	loop_add(loop, loop_generate_entry(0, "input_engine", input_engine));
	input_t *tmp = new input_t();
	tmp->set_keyboard_map_id((new input_keyboard_map_t)->array.id);
}