diff --git a/radiant/preferences.cpp b/radiant/preferences.cpp index c7c9129..da42e67 100644 --- a/radiant/preferences.cpp +++ b/radiant/preferences.cpp @@ -3338,6 +3338,9 @@ void CGameInstall::BuildDialog() { case GAME_ET: gtk_combo_box_append_text( GTK_COMBO_BOX( combo ), _( "Wolfenstein: Enemy Territory" ) ); break; + case GAME_QL: + gtk_combo_box_append_text( GTK_COMBO_BOX( combo ), _( "Quake Live" ) ); + break; } iGame++; } @@ -3449,6 +3452,9 @@ void CGameInstall::Run() { case GAME_ET: gameFilePath += "et.game"; break; + case GAME_QL: + gameFilePath += "ql.game"; + break; } Sys_Printf( "game file: %s\n", gameFilePath.GetBuffer() ); @@ -3622,6 +3628,29 @@ void CGameInstall::Run() { fprintf( fg, " basegame=\"etmain\"\n" ); break; } + case GAME_QL: { +/*#ifdef _WIN32 + fprintf( fg, " "ENGINE_ATTRIBUTE "=\"ql.exe\"\n"); +#elif __linux__ + fprintf( fg, " "ENGINE_ATTRIBUTE "=\"ql\"\n" ); +#endif*/ + fprintf( fg, " "TOOLS_ATTRIBUTE "=\"%sinstalls/"QL_PACK "/game\"\n", g_strAppPath.GetBuffer() ); + fprintf( fg, " prefix=\".ql\"\n" ); + Str source = g_strAppPath.GetBuffer(); + source += "installs/"; + source += QL_PACK; + source += "/install/"; + Str dest = m_strEngine.GetBuffer(); + radCopyTree( source.GetBuffer(), dest.GetBuffer() ); + // Hardcoded fix for "missing" shaderlist in gamepack + dest += "/baseq3/scripts/shaderlist.txt"; + if(CheckFile(dest.GetBuffer()) != PATH_FILE) { + source += "baseq3/scripts/default_shaderlist.txt"; + radCopyFile(source.GetBuffer(),dest.GetBuffer()); + } + fprintf( fg, " basegame=\"baseq3\"\n" ); + break; + } } fprintf( fg, "/>\n" ); fclose( fg ); @@ -3674,6 +3703,9 @@ void CGameInstall::ScanGames() { if ( stricmp( dirname, ET_PACK ) == 0 ) { m_availGames[ iGame++ ] = GAME_ET; } + if ( stricmp( dirname, QL_PACK ) == 0 ) { + m_availGames[ iGame++ ] = GAME_QL; + } } Sys_Printf( "No installable games found in: %s\n", pakPaths.GetBuffer() ); diff --git a/radiant/preferences.h b/radiant/preferences.h index 3d06471..4b9bc36 100644 --- a/radiant/preferences.h +++ b/radiant/preferences.h @@ -214,6 +214,7 @@ void Dump(); #define JA_PACK "JAPack" #define REACTION_PACK "ReactionPack" #define ET_PACK "ETPack" +#define QL_PACK "QLPack" class CGameInstall : public Dialog { public: @@ -238,6 +239,7 @@ enum gameType_e { GAME_JA, GAME_REACTION, GAME_ET, + GAME_QL, GAME_COUNT };