- Added support for Serious Sam, appropriate qstat config with "SMS" game type
required git-svn-id: http://svn.code.sf.net/p/xqf/code/trunk@400 d2ac09be-c843-0410-8b1f-f8a84130e0ec
This commit is contained in:
parent
57edc2a951
commit
588c588f93
@ -1,3 +1,7 @@
|
|||||||
|
Dec 06, 2002: Ludwig Nussel <l-n@users.sourceforge.net>
|
||||||
|
- Added support for Serious Sam, appropriate qstat config with "SMS" game type
|
||||||
|
required
|
||||||
|
|
||||||
Dec 05, 2002: Ludwig Nussel <l-n@users.sourceforge.net>
|
Dec 05, 2002: Ludwig Nussel <l-n@users.sourceforge.net>
|
||||||
- display RTCW voteflags like dmflags
|
- display RTCW voteflags like dmflags
|
||||||
|
|
||||||
|
@ -84,6 +84,7 @@ static int ut_exec (const struct condef *con, int forkit);
|
|||||||
static int t2_exec (const struct condef *con, int forkit);
|
static int t2_exec (const struct condef *con, int forkit);
|
||||||
static int gamespy_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 exec_generic (const struct condef *con, int forkit);
|
||||||
|
static int ssam_exec (const struct condef *con, int forkit);
|
||||||
|
|
||||||
static GList *q1_custom_cfgs (char *dir, char *game);
|
static GList *q1_custom_cfgs (char *dir, char *game);
|
||||||
static GList *qw_custom_cfgs (char *dir, char *game);
|
static GList *qw_custom_cfgs (char *dir, char *game);
|
||||||
@ -652,6 +653,37 @@ struct game games[] = {
|
|||||||
NULL, // real_dir
|
NULL, // real_dir
|
||||||
NULL // game_cfg
|
NULL // game_cfg
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
SSAM_SERVER,
|
||||||
|
GAME_CONNECT,
|
||||||
|
"Serious Sam",
|
||||||
|
25600,
|
||||||
|
0,
|
||||||
|
"SMS",
|
||||||
|
"SMS",
|
||||||
|
"-sms",
|
||||||
|
NULL,
|
||||||
|
&ssam_pix,
|
||||||
|
|
||||||
|
un_parse_player,
|
||||||
|
quake_parse_server,
|
||||||
|
un_analyze_serverinfo,
|
||||||
|
config_is_valid_generic,
|
||||||
|
NULL,
|
||||||
|
ssam_exec,
|
||||||
|
NULL,
|
||||||
|
quake_save_info,
|
||||||
|
NULL, // Custom arguments
|
||||||
|
NULL, // arch_identifier
|
||||||
|
NULL, // identify_cpu
|
||||||
|
NULL, // identify_os
|
||||||
|
NULL, // cmd
|
||||||
|
NULL, // dir
|
||||||
|
NULL, // real_dir
|
||||||
|
NULL // game_cfg
|
||||||
|
},
|
||||||
|
|
||||||
// any game using the gamespy protocol
|
// any game using the gamespy protocol
|
||||||
{
|
{
|
||||||
GPS_SERVER, // server_type
|
GPS_SERVER, // server_type
|
||||||
@ -736,6 +768,7 @@ void init_games()
|
|||||||
game_set_attribute(UN_SERVER,"suggest_commands",strdup("ut"));
|
game_set_attribute(UN_SERVER,"suggest_commands",strdup("ut"));
|
||||||
game_set_attribute(UT2_SERVER,"suggest_commands",strdup("ut2003:ut2003_demo"));
|
game_set_attribute(UT2_SERVER,"suggest_commands",strdup("ut2003:ut2003_demo"));
|
||||||
game_set_attribute(RUNE_SERVER,"suggest_commands",strdup("rune"));
|
game_set_attribute(RUNE_SERVER,"suggest_commands",strdup("rune"));
|
||||||
|
game_set_attribute(SSAM_SERVER,"suggest_commands",strdup("ssamtfe"));
|
||||||
|
|
||||||
game_set_attribute(SFS_SERVER,"game_notes",strdup(_
|
game_set_attribute(SFS_SERVER,"game_notes",strdup(_
|
||||||
("Note: Soldier of Fortune not will connect to a server correctly\n"\
|
("Note: Soldier of Fortune not will connect to a server correctly\n"\
|
||||||
@ -748,6 +781,8 @@ void init_games()
|
|||||||
game_set_attribute(HL_SERVER,"game_notes",strdup(_
|
game_set_attribute(HL_SERVER,"game_notes",strdup(_
|
||||||
("Sample Command Line: wine hl.exe -- hl.exe -console")));
|
("Sample Command Line: wine hl.exe -- hl.exe -console")));
|
||||||
|
|
||||||
|
game_set_attribute(SSAM_SERVER,"game_notes",strdup(_
|
||||||
|
("Note: You need to create a qstat config file for this game to work")));
|
||||||
}
|
}
|
||||||
|
|
||||||
// retreive game specific value that belongs to key, do not free return value!
|
// retreive game specific value that belongs to key, do not free return value!
|
||||||
@ -2941,6 +2976,33 @@ static int exec_generic (const struct condef *con, int forkit) {
|
|||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Serious Sam: only supports +connect
|
||||||
|
static int ssam_exec(const struct condef *con, int forkit) {
|
||||||
|
char *argv[32];
|
||||||
|
int argi = 0;
|
||||||
|
char *cmd;
|
||||||
|
struct game *g = &games[con->s->type];
|
||||||
|
int retval;
|
||||||
|
|
||||||
|
cmd = strdup_strip (g->cmd);
|
||||||
|
|
||||||
|
argv[argi++] = strtok (cmd, delim);
|
||||||
|
while ((argv[argi] = strtok (NULL, delim)) != NULL)
|
||||||
|
argi++;
|
||||||
|
|
||||||
|
if (con->server) {
|
||||||
|
argv[argi++] = "+connect";
|
||||||
|
argv[argi++] = con->server;
|
||||||
|
}
|
||||||
|
|
||||||
|
argv[argi] = NULL;
|
||||||
|
|
||||||
|
retval = client_launch_exec (forkit, g->real_dir, argv, con->s);
|
||||||
|
|
||||||
|
g_free (cmd);
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
// launch any game that uses the gamespy protocol
|
// launch any game that uses the gamespy protocol
|
||||||
// the first argument is the content of gamename field (may be empty),
|
// the first argument is the content of gamename field (may be empty),
|
||||||
// the second one the ip of the server
|
// the second one the ip of the server
|
||||||
|
@ -57,6 +57,7 @@
|
|||||||
#include "xpm/ut2.xpm"
|
#include "xpm/ut2.xpm"
|
||||||
|
|
||||||
#include "xpm/gamespy3d.xpm"
|
#include "xpm/gamespy3d.xpm"
|
||||||
|
#include "xpm/ssam.xpm"
|
||||||
|
|
||||||
#include "xpm/green-plus.xpm"
|
#include "xpm/green-plus.xpm"
|
||||||
#include "xpm/red-minus.xpm"
|
#include "xpm/red-minus.xpm"
|
||||||
@ -118,6 +119,7 @@ struct pixmap ut2_pix;
|
|||||||
struct pixmap rune_pix;
|
struct pixmap rune_pix;
|
||||||
struct pixmap descent3_pix;
|
struct pixmap descent3_pix;
|
||||||
struct pixmap gamespy3d_pix;
|
struct pixmap gamespy3d_pix;
|
||||||
|
struct pixmap ssam_pix;
|
||||||
|
|
||||||
struct pixmap gplus_pix;
|
struct pixmap gplus_pix;
|
||||||
struct pixmap rminus_pix;
|
struct pixmap rminus_pix;
|
||||||
@ -225,6 +227,7 @@ void free_pixmaps (void) {
|
|||||||
free_pixmap (&rune_pix);
|
free_pixmap (&rune_pix);
|
||||||
free_pixmap (&descent3_pix);
|
free_pixmap (&descent3_pix);
|
||||||
free_pixmap (&gamespy3d_pix);
|
free_pixmap (&gamespy3d_pix);
|
||||||
|
free_pixmap (&ssam_pix);
|
||||||
|
|
||||||
free_pixmap (&gplus_pix);
|
free_pixmap (&gplus_pix);
|
||||||
free_pixmap (&rminus_pix);
|
free_pixmap (&rminus_pix);
|
||||||
@ -302,6 +305,7 @@ void init_pixmaps (GtkWidget *window) {
|
|||||||
create_pixmap (window, &rune_pix, rune_xpm);
|
create_pixmap (window, &rune_pix, rune_xpm);
|
||||||
create_pixmap (window, &descent3_pix, descent3_xpm);
|
create_pixmap (window, &descent3_pix, descent3_xpm);
|
||||||
create_pixmap (window, &gamespy3d_pix, gamespy3d_xpm);
|
create_pixmap (window, &gamespy3d_pix, gamespy3d_xpm);
|
||||||
|
create_pixmap (window, &ssam_pix, ssam_xpm);
|
||||||
|
|
||||||
create_pixmap (window, &gplus_pix, green_plus_xpm);
|
create_pixmap (window, &gplus_pix, green_plus_xpm);
|
||||||
create_pixmap (window, &rminus_pix, red_minus_xpm);
|
create_pixmap (window, &rminus_pix, red_minus_xpm);
|
||||||
|
@ -66,6 +66,7 @@ extern struct pixmap ut2_pix;
|
|||||||
extern struct pixmap rune_pix;
|
extern struct pixmap rune_pix;
|
||||||
extern struct pixmap descent3_pix;
|
extern struct pixmap descent3_pix;
|
||||||
extern struct pixmap gamespy3d_pix;
|
extern struct pixmap gamespy3d_pix;
|
||||||
|
extern struct pixmap ssam_pix;
|
||||||
|
|
||||||
extern struct pixmap gplus_pix;
|
extern struct pixmap gplus_pix;
|
||||||
extern struct pixmap rminus_pix;
|
extern struct pixmap rminus_pix;
|
||||||
|
@ -917,7 +917,7 @@ static struct stat_conn *stat_update_master_qstat (struct stat_job *job,
|
|||||||
|
|
||||||
char* masterprotocol;
|
char* masterprotocol;
|
||||||
|
|
||||||
if (!games[m->type].qstat_master_option)
|
if (m->master_type!=MASTER_LAN && !games[m->type].qstat_master_option)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
argv[argi++] = QSTAT_EXEC;
|
argv[argi++] = QSTAT_EXEC;
|
||||||
|
25
xqf/src/xpm/ssam.xpm
Normal file
25
xqf/src/xpm/ssam.xpm
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
/* XPM */
|
||||||
|
/* extracted from SeriousSam.exe with wrestool */
|
||||||
|
static char * ssam_xpm[] = {
|
||||||
|
"16 16 5 1",
|
||||||
|
" c None",
|
||||||
|
". c #FF0000",
|
||||||
|
"+ c #FFFF00",
|
||||||
|
"@ c #000000",
|
||||||
|
"# c #808000",
|
||||||
|
" . ",
|
||||||
|
" .+. ",
|
||||||
|
" ....++.... ",
|
||||||
|
" .+@++++++. ",
|
||||||
|
" .+@+@@@@#+. ",
|
||||||
|
"..++@#@@@@@@+...",
|
||||||
|
" .++@+@@#@#@#+. ",
|
||||||
|
" .++@#@+#@+@@+. ",
|
||||||
|
" .++@#@@@@@@@+. ",
|
||||||
|
"..+@@+@@#++@#+. ",
|
||||||
|
" ..+++#@@@@@+...",
|
||||||
|
" .+++++@@#+. ",
|
||||||
|
" .+++++++++. ",
|
||||||
|
" ....++.... ",
|
||||||
|
" . .. . ",
|
||||||
|
" .. "};
|
@ -114,6 +114,7 @@ enum server_type {
|
|||||||
RUNE_SERVER,
|
RUNE_SERVER,
|
||||||
#endif
|
#endif
|
||||||
DESCENT3_SERVER,
|
DESCENT3_SERVER,
|
||||||
|
SSAM_SERVER,
|
||||||
GPS_SERVER,
|
GPS_SERVER,
|
||||||
UNKNOWN_SERVER
|
UNKNOWN_SERVER
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user