]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
* added nexuiz and quake2 gamepack support
authormattn <mattn>
Mon, 24 Mar 2008 16:53:15 +0000 (16:53 +0000)
committermattn <mattn>
Mon, 24 Mar 2008 16:53:15 +0000 (16:53 +0000)
git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/branches/ZeroRadiant@237 8a3a26a2-13c4-0310-b231-cf6edde360e5

radiant/preferences.cpp
radiant/preferences.h

index 7a0f6d2f3bc03ecbced0cd464fb25c0068a0063c..ecd4d0a1d6f895ab095cdb0ff2c385365a473d92 100644 (file)
@@ -3160,6 +3160,9 @@ void CGameInstall::BuildDialog() {
        int iGame = 0;
        while ( m_availGames[ iGame ] != GAME_NONE ) {
                switch ( m_availGames[ iGame ] ) {
+               case GAME_Q2:
+                       combo_list = g_list_append( combo_list, "Quake II" );
+                       break;
                case GAME_Q3:
                        combo_list = g_list_append( combo_list, "Quake III Arena (including mods)" );
                        break;
@@ -3175,6 +3178,9 @@ void CGameInstall::BuildDialog() {
                case GAME_WARSOW:
                        combo_list = g_list_append( combo_list, "Warsow" );
                        break;
+               case GAME_NEXUIZ:
+                       combo_list = g_list_append( combo_list, "Nexuiz" );
+                       break;
                }
                iGame++;
        }
@@ -3241,6 +3247,16 @@ void CGameInstall::Run() {
        fprintf( fg, "  gametools=\"%sgames/%s\"\n", g_strAppPath.GetBuffer(), m_strName.GetBuffer() );
        fprintf( fg, "  enginepath=\"%s\"\n", m_strEngine.GetBuffer() );
        switch ( m_availGames[ m_nComboSelect ] ) {
+       case GAME_Q2: {
+               fprintf( fg, "  prefix=\".quake2\"\n" );
+               Str source = g_strAppPath.GetBuffer();
+               source += "installs/";
+               source += Q2_PACK;
+               Str dest = m_strEngine.GetBuffer();
+               CopyTree( source.GetBuffer(), dest.GetBuffer() );
+               fprintf( fg, "  basegame=\"baseq2\"\n" );
+               break;
+       }
        case GAME_Q3: {
                fprintf( fg, "  prefix=\".q3a\"\n" );
                Str source = g_strAppPath.GetBuffer();
@@ -3291,6 +3307,16 @@ void CGameInstall::Run() {
                fprintf( fg, "  basegame=\"basewsw\"\n" );
                break;
        }
+       case GAME_NEXUIZ: {
+               fprintf( fg, "  prefix=\".nexuiz\"\n" );
+               Str source = g_strAppPath.GetBuffer();
+               source += "installs/";
+               source += NEXUIZ_PACK;
+               Str dest = m_strEngine.GetBuffer();
+               CopyTree( source.GetBuffer(), dest.GetBuffer() );
+               fprintf( fg, "  basegame=\"data\"\n" );
+               break;
+       }
        }
        fprintf( fg, "/>\n" );
        fclose( fg );
@@ -3325,6 +3351,12 @@ void CGameInstall::ScanGames() {
                if ( stricmp( dirname, WARSOW_PACK ) == 0 ) {
                        m_availGames[ iGame++ ] = GAME_WARSOW;
                }
+               if ( stricmp( dirname, NEXUIZ_PACK ) == 0 ) {
+                       m_availGames[ iGame++ ] = GAME_NEXUIZ;
+               }
+               if ( stricmp( dirname, Q2_PACK ) == 0 ) {
+                       m_availGames[ iGame++ ] = GAME_Q2;
+               }
        }
 }
 
index 76e1432ff2acea88ca5aa7501ba7bcfc70b85240..00e2b15dfde8df3901dedaf3c009087c874174a3 100644 (file)
@@ -203,6 +203,8 @@ select games, copy editing assets and write out configuration files
 #define UFOAI_PACK "UFOAIPack"
 #define Q2W_PACK "Q2WPack"
 #define WARSOW_PACK "WarsowPack"
+#define NEXUIZ_PACK "NexuizPack"
+#define Q2_PACK "Q2Pack"
 
 class CGameInstall : public Dialog {
 public:
@@ -218,6 +220,8 @@ public:
                GAME_UFOAI,
                GAME_Q2W,
                GAME_WARSOW,
+               GAME_NEXUIZ,
+               GAME_Q2,
                GAME_COUNT
        };