const char* gameuserdirname;
} gamemode_info_t;
-static const gamemode_info_t gamemode_info [] =
-{// prog_name cmdline gamename gamedirname gamescreenshotname
+static const gamemode_info_t gamemode_info [GAME_COUNT] =
+{// prog_name cmdline gamename basegame modgame screenshotprefix userdir
// GAME_NORMAL
// COMMANDLINEOPTION: Game: -quake runs the game Quake (default)
// GAME_EDU2P
// COMMANDLINEOPTION: Game: -edu2p runs the game Edu2 prototype
{ "edu2p", "-edu2p", "EDU2 Prototype", "id1", "edu2", "edu2_p", "edu2prototype" },
+// GAME_BLADEMASTER
+// COMMANDLINEOPTION: Game: -blademaster runs the game Prophecy: Return of the BladeMaster
+{ "blademaster", "-blademaster", "Prophecy: Return of the BladeMaster", "basebm", NULL, "blademaster", "blademaster" },
+// GAME_PROPHECY
+// COMMANDLINEOPTION: Game: -prophecy runs the game Quake (default)
+{ "prophecy", "-prophecy", "Prophecy", "data", NULL, "prophecy", "prophecy" },
};
void COM_InitGameType (void)
{
int result;
+#if _MSC_VER >= 1400
+ result = _vsnprintf_s (buffer, buffersize, _TRUNCATE, format, args);
+#else
result = vsnprintf (buffer, buffersize, format, args);
+#endif
if (result < 0 || (size_t)result >= buffersize)
{
buffer[buffersize - 1] = '\0';
// set the key/value and append the remaining text
char tempbuffer[4096];
strlcpy(tempbuffer, buffer + pos2, sizeof(tempbuffer));
- sprintf(buffer + pos, "\\%s\\%s%s", key, value, tempbuffer);
+ dpsnprintf(buffer + pos, bufferlength - pos, "\\%s\\%s%s", key, value, tempbuffer);
}
else
{