* added quake2world support

* finished warsow support
* NOTE: This should really be generalized

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/branches/ZeroRadiant@235 8a3a26a2-13c4-0310-b231-cf6edde360e5
This commit is contained in:
mattn 2008-03-24 16:12:40 +00:00
parent db4ab5daaa
commit a22b11f22d
2 changed files with 29 additions and 1 deletions

View file

@ -3169,6 +3169,9 @@ void CGameInstall::BuildDialog() {
case GAME_UFOAI: case GAME_UFOAI:
combo_list = g_list_append( combo_list, "UFO: Alien Invasion" ); combo_list = g_list_append( combo_list, "UFO: Alien Invasion" );
break; break;
case GAME_Q2W:
combo_list = g_list_append( combo_list, "Quake2World" );
break;
case GAME_WARSOW: case GAME_WARSOW:
combo_list = g_list_append( combo_list, "Warsow" ); combo_list = g_list_append( combo_list, "Warsow" );
break; break;
@ -3268,11 +3271,27 @@ void CGameInstall::Run() {
fprintf( fg, " basegame=\"base\"\n" ); fprintf( fg, " basegame=\"base\"\n" );
break; 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" ); 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" ); fprintf( fg, " basegame=\"basewsw\"\n" );
break; break;
} }
}
fprintf( fg, "/>\n" ); fprintf( fg, "/>\n" );
fclose( fg ); fclose( fg );
} }
@ -3300,6 +3319,12 @@ void CGameInstall::ScanGames() {
if ( stricmp( dirname, UFOAI_PACK ) == 0 ) { if ( stricmp( dirname, UFOAI_PACK ) == 0 ) {
m_availGames[ iGame++ ] = GAME_UFOAI; 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;
}
} }
} }

View file

@ -201,6 +201,8 @@ select games, copy editing assets and write out configuration files
#define Q3_PACK "Q3Pack" #define Q3_PACK "Q3Pack"
#define URT_PACK "UrTPack" #define URT_PACK "UrTPack"
#define UFOAI_PACK "UFOAIPack" #define UFOAI_PACK "UFOAIPack"
#define Q2W_PACK "Q2WPack"
#define WARSOW_PACK "WarsowPack"
class CGameInstall : public Dialog { class CGameInstall : public Dialog {
public: public:
@ -214,6 +216,7 @@ public:
GAME_Q3 = 1, GAME_Q3 = 1,
GAME_URT, GAME_URT,
GAME_UFOAI, GAME_UFOAI,
GAME_Q2W,
GAME_WARSOW, GAME_WARSOW,
GAME_COUNT GAME_COUNT
}; };