]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
* added quake2world support
authormattn <mattn@8a3a26a2-13c4-0310-b231-cf6edde360e5>
Mon, 24 Mar 2008 16:12:40 +0000 (16:12 +0000)
committermattn <mattn@8a3a26a2-13c4-0310-b231-cf6edde360e5>
Mon, 24 Mar 2008 16:12:40 +0000 (16:12 +0000)
* finished warsow support
* NOTE: This should really be generalized

git-svn-id: https://zerowing.idsoftware.com/svn/radiant/GtkRadiant/branches/ZeroRadiant@235 8a3a26a2-13c4-0310-b231-cf6edde360e5

radiant/preferences.cpp
radiant/preferences.h

index 38e5599bb9adad375ba785e79d0773ae94c3e1fb..7a0f6d2f3bc03ecbced0cd464fb25c0068a0063c 100644 (file)
@@ -3169,6 +3169,9 @@ void CGameInstall::BuildDialog() {
                case GAME_UFOAI:
                        combo_list = g_list_append( combo_list, "UFO: Alien Invasion" );
                        break;
+               case GAME_Q2W:
+                       combo_list = g_list_append( combo_list, "Quake2World" );
+                       break;
                case GAME_WARSOW:
                        combo_list = g_list_append( combo_list, "Warsow" );
                        break;
@@ -3268,11 +3271,27 @@ void CGameInstall::Run() {
                fprintf( fg, "  basegame=\"base\"\n" );
                break;
        }
-       case GAME_WARSOW:
+       case GAME_Q2W: {
+               fprintf( fg, "  prefix=\".quake2world\"\n" );
+               Str source = g_strAppPath.GetBuffer();
+               source += "installs/";
+               source += Q2W_PACK;
+               Str dest = m_strEngine.GetBuffer();
+               CopyTree( source.GetBuffer(), dest.GetBuffer() );
+               fprintf( fg, "  basegame=\"default\"\n" );
+               break;
+       }
+       case GAME_WARSOW: {
                fprintf( fg, "  prefix=\".warsow\"\n" );
+               Str source = g_strAppPath.GetBuffer();
+               source += "installs/";
+               source += WARSOW_PACK;
+               Str dest = m_strEngine.GetBuffer();
+               CopyTree( source.GetBuffer(), dest.GetBuffer() );
                fprintf( fg, "  basegame=\"basewsw\"\n" );
                break;
        }
+       }
        fprintf( fg, "/>\n" );
        fclose( fg );
 }
@@ -3300,6 +3319,12 @@ void CGameInstall::ScanGames() {
                if ( stricmp( dirname, UFOAI_PACK ) == 0 ) {
                        m_availGames[ iGame++ ] = GAME_UFOAI;
                }
+               if ( stricmp( dirname, Q2W_PACK ) == 0 ) {
+                       m_availGames[ iGame++ ] = GAME_Q2W;
+               }
+               if ( stricmp( dirname, WARSOW_PACK ) == 0 ) {
+                       m_availGames[ iGame++ ] = GAME_WARSOW;
+               }
        }
 }
 
index 8a75b281a7afcde9e587390d6319ede4e6cda6b6..76e1432ff2acea88ca5aa7501ba7bcfc70b85240 100644 (file)
@@ -201,6 +201,8 @@ select games, copy editing assets and write out configuration files
 #define Q3_PACK "Q3Pack"
 #define URT_PACK "UrTPack"
 #define UFOAI_PACK "UFOAIPack"
+#define Q2W_PACK "Q2WPack"
+#define WARSOW_PACK "WarsowPack"
 
 class CGameInstall : public Dialog {
 public:
@@ -214,6 +216,7 @@ public:
                GAME_Q3 = 1,
                GAME_URT,
                GAME_UFOAI,
+               GAME_Q2W,
                GAME_WARSOW,
                GAME_COUNT
        };