-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
splitting qstat.h #16
Comments
Why not doing: /* SERVER BUILTIN TYPES */
server_type builtin_types[] =
{
#include types/q_server.h
#include types/h2_server.h
#include types/qw_server.h
…
{
Q_UNKNOWN_TYPE, /* id */
"", /* type_prefix */
"", /* type_string */
"", /* type_option */
"", /* game_name */
0, /* master */
0, /* default_port */
0, /* port_offset */
0, /* flags */
"", /* game_rule */
"", /* template_var */
NULL, /* status_packet */
0, /* status_len */
NULL, /* player_packet */
0, /* player_len */
NULL, /* rule_packet */
0, /* rule_len */
(char*) NULL, /* master_packet */
0, /* master_len */
NULL, /* master_protocol */
NULL, /* master_query */
NULL, /* display_player_func */
NULL, /* display_rule_func */
NULL, /* display_raw_player_func */
NULL, /* display_raw_rule_func */
NULL, /* display_xml_player_func */
NULL, /* display_xml_rule_func */
NULL, /* display_json_player_func */
NULL, /* display_json_rule_func */
NULL, /* status_query_func */
NULL, /* rule_query_func */
NULL, /* player_query_func */
NULL, /* packet_func */
}
}; with {
/* QUAKE */
Q_SERVER, /* id */
"QS", /* type_prefix */
"qs", /* type_string */
"-qs", /* type_option */
"Quake", /* game_name */
0, /* master */
Q_DEFAULT_PORT, /* default_port */
0, /* port_offset */
TF_RAW_STYLE_QUAKE, /* flags */
"*gamedir", /* game_rule */
"QUAKE", /* template_var */
(char*) &q_serverinfo, /* status_packet */
Q_SERVERINFO_LEN, /* status_len */
(char*) &q_player, /* player_packet */
Q_HEADER_LEN+1, /* player_len */
(char*) &q_rule, /* rule_packet */
sizeof(q_rule), /* rule_len */
NULL, /* master_packet */
0, /* master_len */
NULL, /* master_protocol */
NULL, /* master_query */
standard_display_q_player_info, /* display_player_func */
standard_display_server_rules, /* display_rule_func */
raw_display_q_player_info, /* display_raw_player_func */
raw_display_server_rules, /* display_raw_rule_func */
xml_display_q_player_info, /* display_xml_player_func */
xml_display_server_rules, /* display_xml_rule_func */
json_display_q_player_info, /* display_json_player_func */
json_display_server_rules, /* display_json_rule_func */
send_qserver_request_packet, /* status_query_func */
NULL, /* rule_query_func */
NULL, /* player_query_func */
deal_with_q_packet, /* packet_func */
}, or something like that? |
Would be better to have each module register itself instead of all the static stuff. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
is there a way to split qstat.h?
It's a 3000 line array…
The text was updated successfully, but these errors were encountered: