From 15b4df2cafdd9f36aa27d8cb9c7323807b99aaf2 Mon Sep 17 00:00:00 2001 From: Walter Julius Hennecke Date: Sat, 29 Jun 2013 14:02:26 +0200 Subject: [PATCH] Added support for STVEF gamepack. --- radiant/preferences.cpp | 30 ++++++++++++++++++++++++++++++ radiant/preferences.h | 2 ++ 2 files changed, 32 insertions(+) diff --git a/radiant/preferences.cpp b/radiant/preferences.cpp index 2cd2210f..865eb23d 100644 --- a/radiant/preferences.cpp +++ b/radiant/preferences.cpp @@ -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() ); diff --git a/radiant/preferences.h b/radiant/preferences.h index 4076f7ad..62b67768 100644 --- a/radiant/preferences.h +++ b/radiant/preferences.h @@ -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 };