[Gtkradiant] Diffs for added W:ET/RTCW pack support
Christopher
weblionx at gmail.com
Mon Jul 27 20:30:16 CDT 2009
TTimo,
Thanks, sorry about that. I've attached the diff this time. Do I need
to do this with a certain top-level directory structure, or is how I
have it named OK?
- Chris
On Mon, Jul 27, 2009 at 9:14 PM, Timothee Besset<ttimo at idsoftware.com> wrote:
> Hey Christopher,
>
> You need diff -u and attaching rather than pasting in before people can
> try this and possibly check it in.
>
> Cheers,
> TTimo
>
-------------- next part --------------
diff -u ZeroRadiant_Original/radiant/preferences.cpp ZeroRadiant/radiant/preferences.cpp
--- ZeroRadiant_Original/radiant/preferences.cpp 2009-07-27 20:43:49.000000000 -0400
+++ ZeroRadiant/radiant/preferences.cpp 2009-07-23 23:53:10.000000000 -0400
@@ -3298,6 +3298,12 @@
case GAME_JA:
gtk_combo_box_append_text( GTK_COMBO_BOX( combo ), _("Jedi Academy and mods") );
break;
+ case GAME_WOLF:
+ gtk_combo_box_append_text( GTK_COMBO_BOX( combo ), _("Return to Castle Wolfenstein") );
+ break;
+ case GAME_ET:
+ gtk_combo_box_append_text( GTK_COMBO_BOX( combo ), _("Wolfenstein: Enemy Territory") );
+ break;
}
iGame++;
}
@@ -3488,6 +3494,31 @@
fprintf( fg, " basegame=\"base\"\n" );
break;
}
+ case GAME_WOLF: {
+ fprintf( fg, " "TOOLS_ATTRIBUTE"=\"%sinstalls/WolfPack/game\"\n", g_strAppPath.GetBuffer() );
+ fprintf( fg, " prefix=\".wolf\"\n" );
+ Str source = g_strAppPath.GetBuffer();
+ source += "installs/";
+ source += WOLF_PACK;
+ source += "/install/";
+ Str dest = m_strEngine.GetBuffer();
+ CopyTree( source.GetBuffer(), dest.GetBuffer() );
+ fprintf( fg, " basegame=\"main\"\n" );
+ break;
+ }
+ case GAME_ET: {
+ fprintf( fg, " "TOOLS_ATTRIBUTE"=\"%sinstalls/ETPack/game\"\n", g_strAppPath.GetBuffer() );
+ fprintf( fg, " prefix=\".wolfet\"\n" );
+ Str source = g_strAppPath.GetBuffer();
+ source += "installs/";
+ source += ET_PACK;
+ source += "/install/";
+ Str dest = m_strEngine.GetBuffer();
+ CopyTree( source.GetBuffer(), dest.GetBuffer() );
+ fprintf( fg, " basegame=\"etmain\"\n" );
+ break;
+ }
+
}
fprintf( fg, "/>\n" );
fclose( fg );
@@ -3507,33 +3538,40 @@
pakPaths += "installs/";
FindFiles fileScan( pakPaths.GetBuffer() );
while ( ( dirname = fileScan.NextFile() ) != NULL ) {
+ //NOTE: WeblionX: Made it else-if to stop when found
if ( stricmp( dirname, Q3_PACK ) == 0 ) {
m_availGames[ iGame++ ] = GAME_Q3;
}
- if ( stricmp( dirname, URT_PACK ) == 0 ) {
+ else if ( stricmp( dirname, URT_PACK ) == 0 ) {
m_availGames[ iGame++ ] = GAME_URT;
}
- if ( stricmp( dirname, UFOAI_PACK ) == 0 ) {
+ else if ( stricmp( dirname, UFOAI_PACK ) == 0 ) {
m_availGames[ iGame++ ] = GAME_UFOAI;
}
- if ( stricmp( dirname, Q2W_PACK ) == 0 ) {
+ else if ( stricmp( dirname, Q2W_PACK ) == 0 ) {
m_availGames[ iGame++ ] = GAME_Q2W;
}
- if ( stricmp( dirname, WARSOW_PACK ) == 0 ) {
+ else if ( stricmp( dirname, WARSOW_PACK ) == 0 ) {
m_availGames[ iGame++ ] = GAME_WARSOW;
}
- if ( stricmp( dirname, NEXUIZ_PACK ) == 0 ) {
+ else if ( stricmp( dirname, NEXUIZ_PACK ) == 0 ) {
m_availGames[ iGame++ ] = GAME_NEXUIZ;
}
- if ( stricmp( dirname, Q2_PACK ) == 0 ) {
+ else if ( stricmp( dirname, Q2_PACK ) == 0 ) {
m_availGames[ iGame++ ] = GAME_Q2;
}
- if ( stricmp( dirname, TREMULOUS_PACK ) == 0 ) {
+ else if ( stricmp( dirname, TREMULOUS_PACK ) == 0 ) {
m_availGames[ iGame++ ] = GAME_TREMULOUS;
}
- if ( stricmp( dirname, JA_PACK ) == 0 ) {
+ else if ( stricmp( dirname, JA_PACK ) == 0 ) {
m_availGames[ iGame++ ] = GAME_JA;
}
+ else if ( stricmp( dirname, WOLF_PACK ) == 0 ) {
+ m_availGames[ iGame++ ] = GAME_WOLF;
+ }
+ else if ( stricmp( dirname, ET_PACK ) == 0 ) {
+ m_availGames[ iGame++ ] = GAME_ET;
+ }
}
}
diff -u ZeroRadiant_Original/radiant/preferences.h ZeroRadiant/radiant/preferences.h
--- ZeroRadiant_Original/radiant/preferences.h 2009-07-27 20:43:49.000000000 -0400
+++ ZeroRadiant/radiant/preferences.h 2009-07-23 18:48:45.000000000 -0400
@@ -209,6 +209,8 @@
#define Q2_PACK "Q2Pack"
#define TREMULOUS_PACK "TremulousPack"
#define JA_PACK "JAPack"
+#define WOLF_PACK "WolfPack"
+#define ET_PACK "ETPack"
class CGameInstall : public Dialog {
public:
@@ -231,6 +233,8 @@
GAME_Q2,
GAME_TREMULOUS,
GAME_JA,
+ GAME_WOLF,
+ GAME_ET,
GAME_COUNT
};
More information about the Gtkradiant
mailing list