diff --git a/xqf/ChangeLog b/xqf/ChangeLog index 9a39d49..560cd7a 100644 --- a/xqf/ChangeLog +++ b/xqf/ChangeLog @@ -1,3 +1,6 @@ +Oct 08, 2003: Ludwig Nussel +- stub functions for savage + Oct 06, 2003: Jordi Mallach - remove non-ASCII character from source, which broke gettext 0.12. - update QuakeForge's HexenWorld port. diff --git a/xqf/src/game.c b/xqf/src/game.c index 141b524..300610d 100644 --- a/xqf/src/game.c +++ b/xqf/src/game.c @@ -57,9 +57,8 @@ static struct player *q3_parse_player(char *tokens[], int num, struct server *s) static struct player *t2_parse_player(char *tokens[], int num, struct server *s); static struct player *hl_parse_player(char *tokens[], int num, struct server *s); static struct player *un_parse_player(char *tokens[], int num, struct server *s); -static void un_analyze_serverinfo (struct server *s); static struct player *descent3_parse_player(char *tokens[], int num, struct server *s); -static void descent3_analyze_serverinfo (struct server *s); +static struct player *savage_parse_player (char *token[], int n, struct server *s); static void quake_parse_server (char *tokens[], int num, struct server *s); @@ -68,6 +67,9 @@ static void q2_analyze_serverinfo (struct server *s); static void hl_analyze_serverinfo (struct server *s); static void t2_analyze_serverinfo (struct server *s); static void q3_analyze_serverinfo (struct server *s); +static void un_analyze_serverinfo (struct server *s); +static void descent3_analyze_serverinfo (struct server *s); +static void savage_analyze_serverinfo (struct server *s); static int quake_config_is_valid (struct server *s); static int quake3_config_is_valid (struct server *s); @@ -86,6 +88,7 @@ static int t2_exec (const struct condef *con, int forkit); static int gamespy_exec (const struct condef *con, int forkit); static int exec_generic (const struct condef *con, int forkit); static int ssam_exec (const struct condef *con, int forkit); +static int savage_exec (const struct condef *con, int forkit); static GList *q1_custom_cfgs (char *dir, char *game); static GList *qw_custom_cfgs (char *dir, char *game); @@ -859,6 +862,42 @@ struct game games[] = { MOHAA_SERVER, }, + { + SAS_SERVER, // server_type + GAME_CONNECT, // flags + "Savage", // name + 11235, // default_port + 0, // default_master_port + "SAS", // id + "SAS", // qstat_str + "-sas", // qstat_option + NULL, // qstat_master_option + &savage_pix, // pixmap + + savage_parse_player, // parse_player + quake_parse_server, // parse_server + savage_analyze_serverinfo, // analyze_serverinfo + config_is_valid_generic, // config_is_valid + NULL, // write_config + savage_exec, // exec_client + NULL, // custom_cfgs + quake_save_info, // save_info + NULL, // init_maps + NULL, // has_map + NULL, // get_mapshot + NULL, // arch_identifier + NULL, // identify_cpu + NULL, // identify_os + NULL, // cmd + NULL, // dir + NULL, // real_dir + NULL, // game_cfg + NULL, // games_data + NULL, // Custom arguments + NULL, // pd + }, + + // any game using the gamespy protocol { GPS_SERVER, // server_type @@ -1028,6 +1067,7 @@ void init_games() game_set_attribute(SSAM_SERVER,"suggest_commands",strdup("ssamtfe")); game_set_attribute(SSAMSE_SERVER,"suggest_commands",strdup("ssamtse")); game_set_attribute(MOHAA_SERVER,"suggest_commands",strdup("mohaa")); + game_set_attribute(SAS_SERVER,"suggest_commands",strdup("savage")); game_set_attribute(SFS_SERVER,"game_notes",strdup(_ ("Note: Soldier of Fortune will not connect to a server correctly\n"\ @@ -1355,6 +1395,12 @@ static struct player *un_parse_player (char *token[], int n, struct server *s) { return player; } +static struct player *savage_parse_player (char *token[], int n, struct server *s) +{ +#warning TODO + return NULL; +} + static void quake_parse_server (char *token[], int n, struct server *server) { /* This does both Quake (?) and Unreal servers @@ -1489,6 +1535,11 @@ static void un_analyze_serverinfo (struct server *s) { } } +static void savage_analyze_serverinfo (struct server *s) +{ +#warning TODO +} + static void descent3_analyze_serverinfo (struct server *s) { char **info_ptr; @@ -3324,6 +3375,11 @@ static int ut_exec (const struct condef *con, int forkit) { return retval; } +static int savage_exec(const struct condef *con, int forkit) +{ +#warning TODO + return 0; +} // this one just passes the ip address as first parameter diff --git a/xqf/src/pixmaps.c b/xqf/src/pixmaps.c index 990721b..46ab093 100644 --- a/xqf/src/pixmaps.c +++ b/xqf/src/pixmaps.c @@ -61,6 +61,7 @@ #include "xpm/gamespy3d.xpm" #include "xpm/ssam.xpm" #include "xpm/mohaa.xpm" +#include "xpm/savage.xpm" #include "xpm/green-plus.xpm" #include "xpm/red-minus.xpm" @@ -124,6 +125,7 @@ struct pixmap descent3_pix; struct pixmap gamespy3d_pix; struct pixmap ssam_pix; struct pixmap mohaa_pix; +struct pixmap savage_pix; struct pixmap gplus_pix; struct pixmap rminus_pix; @@ -235,6 +237,7 @@ void free_pixmaps (void) { free_pixmap (&gamespy3d_pix); free_pixmap (&ssam_pix); free_pixmap (&mohaa_pix); + free_pixmap (&savage_pix); free_pixmap (&gplus_pix); free_pixmap (&rminus_pix); @@ -316,6 +319,7 @@ void init_pixmaps (GtkWidget *window) { create_pixmap (window, &gamespy3d_pix, gamespy3d_xpm); create_pixmap (window, &ssam_pix, ssam_xpm); create_pixmap (window, &mohaa_pix, mohaa_xpm); + create_pixmap (window, &savage_pix, savage_xpm); create_pixmap (window, &gplus_pix, green_plus_xpm); create_pixmap (window, &rminus_pix, red_minus_xpm); diff --git a/xqf/src/pixmaps.h b/xqf/src/pixmaps.h index b40fc0f..7df9f8a 100644 --- a/xqf/src/pixmaps.h +++ b/xqf/src/pixmaps.h @@ -70,6 +70,7 @@ extern struct pixmap descent3_pix; extern struct pixmap gamespy3d_pix; extern struct pixmap ssam_pix; extern struct pixmap mohaa_pix; +extern struct pixmap savage_pix; extern struct pixmap gplus_pix; extern struct pixmap rminus_pix; diff --git a/xqf/src/source.c b/xqf/src/source.c index d15a72f..e58b053 100644 --- a/xqf/src/source.c +++ b/xqf/src/source.c @@ -1029,6 +1029,8 @@ static char *builtin_masters_update_info[] = { "ADD UT2S http://ut2003master.epicgames.com/serverlist/full-all.txt Epic", "ADD UT2S http://ut2003master.epicgames.com/serverlist/demo-all.txt Epic Demo", + "ADD SAS http://masterserver.savagedemo.s2games.com/gamelist.dat S2 Games", + NULL }; diff --git a/xqf/src/stat.c b/xqf/src/stat.c index ee09bcb..d8f6154 100644 --- a/xqf/src/stat.c +++ b/xqf/src/stat.c @@ -130,6 +130,14 @@ static int parse_master_output (char *str, struct stat_conn *conn) { struct userver *us; struct host *h; +#warning TODO parse function for savage + if(conn->master->type == SAS_SERVER && conn->master->master_type == MASTER_HTTP) + { + xqf_error("savage not yet implemented"); + conn->master->state = SOURCE_ERROR; + return FALSE; + } + debug (6, "parse_master_output(%s,%p)",str,conn); n = tokenize_bychar (str, token, 8, QSTAT_DELIM); diff --git a/xqf/src/xpm/savage.xpm b/xqf/src/xpm/savage.xpm new file mode 100644 index 0000000..5f3bab3 --- /dev/null +++ b/xqf/src/xpm/savage.xpm @@ -0,0 +1,36 @@ +/* XPM */ +static char * savage_xpm[] = { +"16 16 17 1", +" c None", +". c #070504", +"+ c #4C473B", +"@ c #B6A382", +"# c #82673F", +"$ c #8A7654", +"% c #4A3A25", +"& c #D7C68F", +"* c #463116", +"= c #AA946D", +"- c #584833", +"; c #D2B256", +"> c #99835E", +", c #C8B898", +"' c #221A0F", +") c #DED4C4", +"! c #6F522B", +" =&,$> ", +" ,,&,#$# ", +" =)@,&$$!- ", +" @@>,&#>#!- ", +" =>>$,,>>>!! ", +" $$#$>+++++>#->$", +" @!*!$.....$!*!$", +"=&!'#=$+.+$=!'#;", +"=;#.#@=@.,=$!.>&", +"!;>.>@=@.,>$#.;&", +" >;-==>@.,=$!'&>", +" #+->>@.,>$%*! ", +" '%$.>-' ", +" ..... ", +" ", +" "}; diff --git a/xqf/src/xqf.h b/xqf/src/xqf.h index 78e80c3..ce15ef9 100644 --- a/xqf/src/xqf.h +++ b/xqf/src/xqf.h @@ -117,6 +117,7 @@ enum server_type { SSAM_SERVER, SSAMSE_SERVER, MOHAA_SERVER, + SAS_SERVER, GPS_SERVER, UNKNOWN_SERVER };