Author: esr Date: Wed Jun 13 20:41:31 2007 New Revision: 18266 URL: http://svn.gna.org/viewcvs/wesnoth?rev=18266&view=rev Log: Clean up some macros in UtBS, improve the wmllint stack checker.
Modified: trunk/data/campaigns/Under_the_Burning_Suns/scenarios/05_Struggle.cfg trunk/data/campaigns/Under_the_Burning_Suns/utils/macros.cfg trunk/data/tools/wmllint Modified: trunk/data/campaigns/Under_the_Burning_Suns/scenarios/05_Struggle.cfg URL: http://svn.gna.org/viewcvs/wesnoth/trunk/data/campaigns/Under_the_Burning_Suns/scenarios/05_Struggle.cfg?rev=18266&r1=18265&r2=18266&view=diff ============================================================================== --- trunk/data/campaigns/Under_the_Burning_Suns/scenarios/05_Struggle.cfg (original) +++ trunk/data/campaigns/Under_the_Burning_Suns/scenarios/05_Struggle.cfg Wed Jun 13 20:41:31 2007 @@ -1945,7 +1945,7 @@ value=$number_enemies [/set_variable] -{LOOP i} +{STARTLOOP i} [if] [variable] @@ -2011,7 +2011,7 @@ {CLEAR_VARIABLE unitstats} -{NEXT i} +{ENDLOOP i} #destroy ally's villages in the tunnels @@ -2307,7 +2307,7 @@ value=$number_to_kill [/set_variable] - {LOOP i} + {STARTLOOP i} [store_locations] x=24-46 @@ -2405,7 +2405,7 @@ fire_event=no [/kill] - {NEXT i} + {ENDLOOP i} [message] description=Dwarf Leader Modified: trunk/data/campaigns/Under_the_Burning_Suns/utils/macros.cfg URL: http://svn.gna.org/viewcvs/wesnoth/trunk/data/campaigns/Under_the_Burning_Suns/utils/macros.cfg?rev=18266&r1=18265&r2=18266&view=diff ============================================================================== --- trunk/data/campaigns/Under_the_Burning_Suns/utils/macros.cfg (original) +++ trunk/data/campaigns/Under_the_Burning_Suns/utils/macros.cfg Wed Jun 13 20:41:31 2007 @@ -33,8 +33,8 @@ [/set_variable] #enddef -#create a loop that runs X times -#define LOOP VAR +#define STARTLOOP VAR +# Loop VAR times, counting from -VAR to -1. [set_variable] name={VAR} multiply=-1 @@ -45,7 +45,18 @@ name={VAR} less_than=0 [/variable] - [do] + [do] #enddef + +# Same as mainline NEXT +#define ENDLOOP VAR +# Macro to end a WML clause that iterates over an array. + [set_variable] + name={VAR} + add=1 + [/set_variable] + [/do] +[/while] +{CLEAR_VARIABLE {VAR}} #enddef # create a unit with full upkeep Modified: trunk/data/tools/wmllint URL: http://svn.gna.org/viewcvs/wesnoth/trunk/data/tools/wmllint?rev=18266&r1=18265&r2=18266&view=diff ============================================================================== --- trunk/data/tools/wmllint (original) +++ trunk/data/tools/wmllint Wed Jun 13 20:41:31 2007 @@ -535,7 +535,7 @@ #print '"%s", line %d: %s' % (filename, lineno+1, tagstack) # It's an error if the tag stack is nonempty at the end of any file: if tagstack: - print >>sys.stderr, '"%s", line %d: tag stack nonempty at end of file.' % (filename, lineno) + print >>sys.stderr, '"%s", line %d: tag stack nonempty (%s) at end of file.' % (filename, lineno, tagstack) tagstack = [] # Track which maps are modified, we'll use this later for determining # which files get a .map extension. _______________________________________________ Wesnoth-commits mailing list Wesnoth-commits@gna.org https://mail.gna.org/listinfo/wesnoth-commits