From: mattn Date: Mon, 24 Mar 2008 16:12:40 +0000 (+0000) Subject: * added quake2world support X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=27415e3b2689e4735f7e4e03c08153c9ab0476b5;p=xonotic%2Fnetradiant.git * added quake2world support * 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 --- diff --git a/radiant/preferences.cpp b/radiant/preferences.cpp index 38e5599b..7a0f6d2f 100644 --- a/radiant/preferences.cpp +++ b/radiant/preferences.cpp @@ -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; + } } } diff --git a/radiant/preferences.h b/radiant/preferences.h index 8a75b281..76e1432f 100644 --- a/radiant/preferences.h +++ b/radiant/preferences.h @@ -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 };