stratagus-cvs
[Top][All Lists]
Advanced

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

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


From: Russell Smith
Subject: [Stratagus-CVS] stratagus/src/ui ccl_ui.c
Date: Wed, 10 Sep 2003 18:47:29 -0400

CVSROOT:        /cvsroot/stratagus
Module name:    stratagus
Branch:         
Changes by:     Russell Smith <address@hidden>  03/09/10 18:47:28

Modified files:
        src/ui         : ccl_ui.c 

Log message:
        Begining of buttons for units with rescourses.

Patches:
Index: stratagus/src/ui/ccl_ui.c
diff -u stratagus/src/ui/ccl_ui.c:1.121 stratagus/src/ui/ccl_ui.c:1.122
--- stratagus/src/ui/ccl_ui.c:1.121     Wed Sep  3 09:30:43 2003
+++ stratagus/src/ui/ccl_ui.c   Wed Sep 10 18:47:28 2003
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//     $Id: ccl_ui.c,v 1.121 2003/09/03 13:30:43 martinxyz Exp $
+//     $Id: ccl_ui.c,v 1.122 2003/09/10 22:47:28 mr-russ Exp $
 
 //@{
 
@@ -3062,6 +3062,25 @@
            value=gh_car(list);
            list=gh_cdr(list);
            ba.Hint=gh_scm2newstr(value,NULL);
+       } else if( gh_eq_p(value,gh_symbol2scm("for-unit-with-resource")) )
+           // FIXME: ba.UnitMask shouldn't be a string
+           value=gh_car(list);
+           list=gh_cdr(list);
+           s1=strdup(",");
+           while( !gh_null_p(value) ) {
+               s2=gh_scm2newstr(gh_car(value),NULL);
+               s1=realloc(s1,strlen(s1)+strlen(s2)+2);
+               strcat(s1,s2);
+               strcat(s1,",");
+               value=gh_cdr(value);
+               free(s2);
+           }
+           ba.UnitMask=s1;
+           //If not allowed, allow for when have a resource
+           if( !strncmp(ba.UnitMask,",R,",3) ) {
+               free(ba.UnitMask);
+               ba.UnitMask=strdup("R");
+           }
        } else if( gh_eq_p(value,gh_symbol2scm("for-unit")) ) {
            // FIXME: ba.UnitMask shouldn't be a string
            value=gh_car(list);




reply via email to

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