stratagus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Stratagus-CVS] stratagus/src/ui menus.c


From: Jimmy Salmon
Subject: [Stratagus-CVS] stratagus/src/ui menus.c
Date: Wed, 29 Oct 2003 01:07:30 -0500

CVSROOT:        /cvsroot/stratagus
Module name:    stratagus
Branch:         
Changes by:     Jimmy Salmon <address@hidden>   03/10/29 01:07:30

Modified files:
        src/ui         : menus.c 

Log message:
        Only check for swamp tileset if GameName is wc2

Patches:
Index: stratagus/src/ui/menus.c
diff -u stratagus/src/ui/menus.c:1.579 stratagus/src/ui/menus.c:1.580
--- stratagus/src/ui/menus.c:1.579      Tue Oct 28 19:08:09 2003
+++ stratagus/src/ui/menus.c    Wed Oct 29 01:07:29 2003
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//     $Id: menus.c,v 1.579 2003/10/29 00:08:09 mohydine Exp $
+//     $Id: menus.c,v 1.580 2003/10/29 06:07:29 jsalmon3 Exp $
 
 //@{
 
@@ -7239,35 +7239,31 @@
 */
 global void InitMenuFunctions(void)
 {
-    Menu *menu;
+    // FIXME: This must be removed!
+    // FIXME: Use wartool and fix the ccls instead!
+    if (!strcmp(GameName, "wc2")) {
+       Menu *menu;
 
-    //
-    // Autodetect the swamp tileset
-    //
-    strcpy(MenuMapFullPath, StratagusLibPath);
-    if (MenuMapFullPath[0]) {
-       strcat(MenuMapFullPath, "/graphics/tilesets/");
-    }
-    strcat(MenuMapFullPath, "swamp");
-    //
-    // FIXME: Johns: this didn't work if the files are in ZIP archive.
-    //
-    if (access(MenuMapFullPath, F_OK) != 0) {
-       // ARI FIXME: Hack to disable Expansion Gfx..
-       // also shows how to add new tilesets....
-       // - FIXME2:
-       // With new dynamic tileset configuration this
-       // should read what siod-config gave us and
-       // build the menu from that..
-       menu = FindMenu("menu-custom-game");
-       menu->Items[14].d.pulldown.noptions = 4;
-       menu = FindMenu("menu-multi-setup");
-       menu->Items[29].d.pulldown.noptions = 4;
+       //
+       //  FIXME: Hack to disable Expansion Gfx..
+       //
+       strcpy(MenuMapFullPath, StratagusLibPath);
+       if (MenuMapFullPath[0]) {
+           strcat(MenuMapFullPath, "/graphics/tilesets/");
+       }
+       strcat(MenuMapFullPath, "swamp");
+       if (access(MenuMapFullPath, F_OK) != 0) {
+           menu = FindMenu("menu-custom-game");
+           menu->Items[14].d.pulldown.noptions = 4;
+           menu = FindMenu("menu-multi-setup");
+           menu->Items[29].d.pulldown.noptions = 4;
+       }
     }
 
 #ifdef SAVE_MENU_CCL
     {
-       FILE *fd=fopen("menus.ccl","wb");
+       FILE* fd;
+       fd = fopen("menus.ccl", "wb");
        SaveMenus(fd);
        fclose(fd);
     }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]