int gamemode;
char *gamename;
char *gamedirname;
+char *gamescreenshotname;
char com_modname[MAX_OSPATH] = "";
case GAME_NORMAL:
gamename = "DarkPlaces-Quake";
gamedirname = "";
+ gamescreenshotname = "dp";
break;
case GAME_HIPNOTIC:
gamename = "Darkplaces-Hipnotic";
gamedirname = "hipnotic";
+ gamescreenshotname = "dp";
break;
case GAME_ROGUE:
gamename = "Darkplaces-Rogue";
gamedirname = "rogue";
+ gamescreenshotname = "dp";
break;
case GAME_NEHAHRA:
gamename = "DarkPlaces-Nehahra";
gamedirname = "nehahra";
+ gamescreenshotname = "dp";
break;
case GAME_NEXUIZ:
gamename = "Nexuiz";
gamedirname = "data";
+ gamescreenshotname = "nexuiz";
break;
case GAME_TRANSFUSION:
gamename = "Transfusion";
gamedirname = "basetf";
+ gamescreenshotname = "transfusion";
break;
case GAME_GOODVSBAD2:
gamename = "GoodVs.Bad2";
gamedirname = "rts";
+ gamescreenshotname = "gvb2";
break;
case GAME_TEU:
gamename = "TheEvilUnleashed";
gamedirname = "baseteu";
+ gamescreenshotname = "teu";
break;
case GAME_BATTLEMECH:
gamename = "Battlemech";
gamedirname = "base";
+ gamescreenshotname = "battlemech";
break;
case GAME_ZYMOTIC:
gamename = "Zymotic";
gamedirname = "data";
+ gamescreenshotname = "zymotic";
break;
case GAME_FNIGGIUM:
gamename = "Fniggium";
gamedirname = "data";
+ gamescreenshotname = "fniggium";
break;
case GAME_SETHERAL:
gamename = "Setheral";
gamedirname = "data";
+ gamescreenshotname = "setheral";
break;
case GAME_SOM:
gamename = "Son of Man";
gamedirname = "data";
+ gamescreenshotname = "som";
break;
case GAME_TENEBRAE:
gamename = "DarkPlaces-Tenebrae";
gamedirname = "tenebrae";
+ gamescreenshotname = "dp";
break;
default:
Sys_Error("COM_InitGameType: unknown gamemode %i\n", gamemode);
FS_Init ();
Log_Init ();
COM_CheckRegistered ();
-
- COM_InitGameType();
}
return;
}
- switch(gamemode)
- {
- case GAME_NORMAL:
- Cvar_SetQuick (&scr_screenshot_name, "dp");
- break;
- case GAME_HIPNOTIC:
- Cvar_SetQuick (&scr_screenshot_name, "hipnotic");
- break;
- case GAME_ROGUE:
- Cvar_SetQuick (&scr_screenshot_name, "rogue");
- break;
- case GAME_NEHAHRA:
- Cvar_SetQuick (&scr_screenshot_name, "nehahra");
- break;
- case GAME_NEXUIZ:
- Cvar_SetQuick (&scr_screenshot_name, "nexuiz");
- break;
- case GAME_TRANSFUSION:
- Cvar_SetQuick (&scr_screenshot_name, "transfusion");
- break;
- case GAME_GOODVSBAD2:
- Cvar_SetQuick (&scr_screenshot_name, "gvb2");
- break;
- case GAME_TEU:
- Cvar_SetQuick (&scr_screenshot_name, "teu");
- break;
- case GAME_BATTLEMECH:
- Cvar_SetQuick (&scr_screenshot_name, "battlemech");
- break;
- case GAME_ZYMOTIC:
- Cvar_SetQuick (&scr_screenshot_name, "zymotic");
- break;
- case GAME_FNIGGIUM:
- Cvar_SetQuick (&scr_screenshot_name, "fniggium");
- break;
- case GAME_SETHERAL:
- Cvar_SetQuick (&scr_screenshot_name, "setheral");
- break;
- case GAME_SOM:
- Cvar_SetQuick (&scr_screenshot_name, "som");
- break;
- case GAME_TENEBRAE:
- Cvar_SetQuick (&scr_screenshot_name, "tenebrae");
- break;
- default:
- Cvar_SetQuick (&scr_screenshot_name, "dp");
- break;
- }
-
// start up with GAMENAME by default (id1)
strlcpy (com_modname, GAMENAME, sizeof (com_modname));
FS_AddGameDirectory (va("%s/"GAMENAME, fs_basedir));
+ Cvar_SetQuick (&scr_screenshot_name, gamescreenshotname);
// add the game-specific path, if any
if (gamedirname[0])
// -game <gamedir>
// Adds basedir/gamedir as an override game
- i = COM_CheckParm ("-game");
- if (i && i < com_argc-1)
+ // LordHavoc: now supports multiple -game directories
+ for (i = 1;i < com_argc;i++)
{
- fs_modified = true;
- strlcpy (com_modname, com_argv[i+1], sizeof (com_modname));
- FS_AddGameDirectory (va("%s/%s", fs_basedir, com_argv[i+1]));
- Cvar_SetQuick (&scr_screenshot_name, com_modname);
+ if (!com_argv[i])
+ continue;
+ if (!strcmp (com_argv[i], "-game") && i < com_argc-1)
+ {
+ i++;
+ fs_modified = true;
+ strlcpy (com_modname, com_argv[i], sizeof (com_modname));
+ FS_AddGameDirectory (va("%s/%s", fs_basedir, com_argv[i]));
+ Cvar_SetQuick (&scr_screenshot_name, com_modname);
+ }
}
}