- stub functions for savage

git-svn-id: http://svn.code.sf.net/p/xqf/code/trunk@514 d2ac09be-c843-0410-8b1f-f8a84130e0ec
This commit is contained in:
Ludwig Nussel 2003-10-08 23:06:36 +00:00 committed by l-n
parent dd4f70d88d
commit 65172da9ce
8 changed files with 113 additions and 2 deletions

View File

@ -1,3 +1,6 @@
Oct 08, 2003: Ludwig Nussel <l-n@users.sourceforge.net>
- stub functions for savage
Oct 06, 2003: Jordi Mallach <jordi@sindominio.net>
- remove non-ASCII character from source, which broke gettext 0.12.
- update QuakeForge's HexenWorld port.

View File

@ -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

View File

@ -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);

View File

@ -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;

View File

@ -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
};

View File

@ -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);

36
xqf/src/xpm/savage.xpm Normal file
View File

@ -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",
" =&,$> ",
" ,,&,#$# ",
" =)@,&$$!- ",
" @@>,&#>#!- ",
" =>>$,,>>>!! ",
" $$#$>+++++>#->$",
" @!*!$.....$!*!$",
"=&!'#=$+.+$=!'#;",
"=;#.#@=@.,=$!.>&",
"!;>.>@=@.,>$#.;&",
" >;-==>@.,=$!'&>",
" #+->>@.,>$%*! ",
" '%$.>-' ",
" ..... ",
" ",
" "};

View File

@ -117,6 +117,7 @@ enum server_type {
SSAM_SERVER,
SSAMSE_SERVER,
MOHAA_SERVER,
SAS_SERVER,
GPS_SERVER,
UNKNOWN_SERVER
};