Added support for STVEF gamepack.

This commit is contained in:
Walter Julius Hennecke 2013-06-29 14:02:26 +02:00
parent 8c35fd8d9f
commit 15b4df2caf
2 changed files with 32 additions and 0 deletions

View File

@ -3372,6 +3372,9 @@ void CGameInstall::BuildDialog() {
case GAME_QL:
gtk_combo_box_append_text( GTK_COMBO_BOX( combo ), _( "Quake Live" ) );
break;
case GAME_STVEF:
gtk_combo_box_append_text( GTK_COMBO_BOX( combo ), _( "Star Trek - Voyager: Elite Force" ) );
break;
}
iGame++;
}
@ -3486,6 +3489,9 @@ void CGameInstall::Run() {
case GAME_QL:
gameFilePath += "ql.game";
break;
case GAME_STVEF:
gameFilePath += "stvef.game";
break;
}
Sys_Printf( "game file: %s\n", gameFilePath.GetBuffer() );
@ -3681,6 +3687,27 @@ void CGameInstall::Run() {
fprintf( fg, " basegame=\"baseq3\"\n" );
break;
}
case GAME_STVEF: {
fprintf( fg, " "TOOLS_ATTRIBUTE "=\"%sinstalls/"STVEF_PACK "/game\"\n", g_strAppPath.GetBuffer() );
fprintf( fg, " prefix=\".stvef\"\n" );
Str source = g_strAppPath.GetBuffer();
source += "installs/";
source += STVEF_PACK;
source += "/install/";
Str dest = m_strEngine.GetBuffer();
radCopyTree( source.GetBuffer(), dest.GetBuffer() );
// Hardcoded fix for "missing" shaderlist in gamepack
dest += "/base/scripts/shaderlist.txt";
if(CheckFile(dest.GetBuffer()) != PATH_FILE) {
source += "base/scripts/default_shaderlist.txt";
radCopyFile(source.GetBuffer(),dest.GetBuffer());
}
fprintf( fg, " basegame=\"baseEF\"\n" );
fprintf( fg, " shaderpath=\"scripts\"\n" );
fprintf( fg, " default_scale=\"0.25\"\n" );
fprintf( fg, " caulk_shader=\"textures/common/caulk\"\n" );
break;
}
}
fprintf( fg, "/>\n" );
fclose( fg );
@ -3736,6 +3763,9 @@ void CGameInstall::ScanGames() {
if ( stricmp( dirname, QL_PACK ) == 0 ) {
m_availGames[ iGame++ ] = GAME_QL;
}
if ( stricmp( dirname, STVEF_PACK ) == 0 ) {
m_availGames[ iGame++ ] = GAME_STVEF;
}
}
Sys_Printf( "No installable games found in: %s\n",
pakPaths.GetBuffer() );

View File

@ -213,6 +213,7 @@ void Dump();
#define REACTION_PACK "ReactionPack"
#define ET_PACK "ETPack"
#define QL_PACK "QLPack"
#define STVEF_PACK "STVEFPack"
class CGameInstall : public Dialog {
public:
@ -238,6 +239,7 @@ enum gameType_e {
GAME_REACTION,
GAME_ET,
GAME_QL,
GAME_STVEF,
GAME_COUNT
};