Author: esr
Date: Fri Feb 12 15:10:51 2010
New Revision: 41170
URL: http://svn.gna.org/viewcvs/wesnoth?rev=41170&view=rev
Log:
More typechecking for macro arguments. No mismatches in mainline.
Modified:
trunk/data/core/terrain-graphics/buildings.cfg
trunk/data/core/terrain-graphics/castles.cfg
trunk/data/core/terrain-graphics/forestcastle.cfg
trunk/data/tools/wesnoth/wmltools.py
Modified: trunk/data/core/terrain-graphics/buildings.cfg
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/data/core/terrain-graphics/buildings.cfg?rev=41170&r1=41169&r2=41170&view=diff
==============================================================================
--- trunk/data/core/terrain-graphics/buildings.cfg (original)
+++ trunk/data/core/terrain-graphics/buildings.cfg Fri Feb 12 15:10:51 2010
@@ -13,7 +13,7 @@
[/terrain_graphics]
#enddef
-#define BUILDING_PROBABILITY TERRAIN IMAGE_WML PROBABILITY
+#define BUILDING_PROBABILITY TERRAIN IMAGE_WML PROB
[terrain_graphics]
[tile]
x=0
@@ -21,7 +21,7 @@
type={TERRAIN}
{IMAGE_WML}
[/tile]
- probability={PROBABILITY}
+ probability={PROB}
set_flag=building-{TERRAIN}
no_flag=building-{TERRAIN}
[/terrain_graphics]
Modified: trunk/data/core/terrain-graphics/castles.cfg
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/data/core/terrain-graphics/castles.cfg?rev=41170&r1=41169&r2=41170&view=diff
==============================================================================
--- trunk/data/core/terrain-graphics/castles.cfg (original)
+++ trunk/data/core/terrain-graphics/castles.cfg Fri Feb 12 15:10:51 2010
@@ -1,5 +1,5 @@
#textdomain wesnoth
-#define TERRAIN_ADJACENT_CORNER_LAYER TERRAIN1 TERRAIN2 TERRAIN3 LAYER POS
IMAGESTEM
+#define TERRAIN_ADJACENT_CORNER_LAYER TERRAIN1 TERRAIN2 TERRAIN3 LAYER
BASE_POSITION IMAGESTEM
[terrain_graphics]
map="
3
@@ -19,7 +19,7 @@
[/tile]
[image]
- base={POS}
+ base={BASE_POSITION}
layer={LAYER}
name={imageste...@r0
[/image]
@@ -27,7 +27,7 @@
[/terrain_graphics]
#enddef
-#define TERRAIN_ADJACENT_CORNER TERRAIN1 TERRAIN2 TERRAIN3 POS IMAGESTEM
+#define TERRAIN_ADJACENT_CORNER TERRAIN1 TERRAIN2 TERRAIN3 BASE_POSITION
IMAGESTEM
[terrain_graphics]
map="
3
@@ -47,14 +47,14 @@
[/tile]
[image]
- base={POS}
+ base={BASE_POSITION}
name={imageste...@r0
[/image]
rotations=ne,e,se,sw,w,nw
[/terrain_graphics]
#enddef
-#define TERRAIN_ADJACENT_CORNER_FLAG1 TERRAIN1 TERRAIN2 TERRAIN3 POS FLAG
IMAGESTEM
+#define TERRAIN_ADJACENT_CORNER_FLAG1 TERRAIN1 TERRAIN2 TERRAIN3 BASE_POSITION
FLAG IMAGESTEM
[terrain_graphics]
map="
3
@@ -75,14 +75,14 @@
[/tile]
[image]
- base={POS}
+ base={BASE_POSITION}
name={imageste...@r0
[/image]
rotations=ne,e,se,sw,w,nw
[/terrain_graphics]
#enddef
-#define TERRAIN_ADJACENT_CORNER_PROB TERRAIN1 TERRAIN2 TERRAIN3 POS IMAGESTEM
PROB
+#define TERRAIN_ADJACENT_CORNER_PROB TERRAIN1 TERRAIN2 TERRAIN3 BASE_POSITION
IMAGESTEM PROB
[terrain_graphics]
map="
3
@@ -104,7 +104,7 @@
[/tile]
[image]
- base={POS}
+ base={BASE_POSITION}
name={imageste...@r0
[/image]
probability={PROB}
Modified: trunk/data/core/terrain-graphics/forestcastle.cfg
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/data/core/terrain-graphics/forestcastle.cfg?rev=41170&r1=41169&r2=41170&view=diff
==============================================================================
--- trunk/data/core/terrain-graphics/forestcastle.cfg (original)
+++ trunk/data/core/terrain-graphics/forestcastle.cfg Fri Feb 12 15:10:51 2010
@@ -2,7 +2,7 @@
#-----------------------------------------------------------------
# Forest<->Castle|Encampment special cases
#-----------------------------------------------------------------
-#define FORESTADJCASTLEA FID ID PROB TILE_IMAGE
+#define FORESTADJCASTLEA FOREST_ID ID PROB TILE_IMAGE
[terrain_graphics]
map="
, 1
@@ -18,7 +18,7 @@
[tile]
pos=2
- type={FID}
+ type={FOREST_ID}
no_flag="overlay"
set_flag="overlay"
[/tile]
@@ -33,7 +33,7 @@
[/terrain_graphics]
#enddef
-#define FORESTADJCASTLES FID ID PROB TILE_IMAGE
+#define FORESTADJCASTLES FOREST_ID ID PROB TILE_IMAGE
[terrain_graphics]
map="
, 1
@@ -49,7 +49,7 @@
[tile]
pos=2
- type={FID}
+ type={FOREST_ID}
no_flag="overlay"
set_flag="overlay"
[/tile]
@@ -64,7 +64,7 @@
[/terrain_graphics]
#enddef
-#define FORESTADJCASTLEO FID ID PROB TILE_IMAGE
+#define FORESTADJCASTLEO FOREST_ID ID PROB TILE_IMAGE
[terrain_graphics]
map="
, 1
@@ -80,7 +80,7 @@
[tile]
pos=2
- type={FID}
+ type={FOREST_ID}
no_flag="overlay"
set_flag="overlay"
[/tile]
@@ -95,7 +95,7 @@
[/terrain_graphics]
#enddef
-#define FORESTADJCASTLE FID ID PROB TILE_IMAGE
+#define FORESTADJCASTLE FOREST_ID ID PROB TILE_IMAGE
[terrain_graphics]
map="
, 1
@@ -111,7 +111,7 @@
[tile]
pos=2
- type={FID}
+ type={FOREST_ID}
no_flag="overlay"
set_flag="overlay"
[/tile]
@@ -131,7 +131,7 @@
# Shallow and deep Water, mountain, desert hill & mountain,
# swamp and villages
#-----------------------------------------------------------------
-#define FORESTADJ FID ID PROB TILE_IMAGE
+#define FORESTADJ FOREST_ID ID PROB TILE_IMAGE
[terrain_graphics]
map="
, 1
@@ -147,7 +147,7 @@
[tile]
pos=2
- type={FID}
+ type={FOREST_ID}
no_flag="overlay"
set_flag="overlay"
[/tile]
@@ -162,7 +162,7 @@
[/terrain_graphics]
#enddef
-#define MOUNTAINADJCASTLEA FID ID PROB TILE_IMAGE
+#define MOUNTAINADJCASTLEA FOREST_ID ID PROB TILE_IMAGE
[terrain_graphics]
map="
, 1
@@ -178,7 +178,7 @@
[tile]
pos=2
- type={FID}
+ type={FOREST_ID}
no_flag="overlay"
set_flag="overlay"
[/tile]
Modified: trunk/data/tools/wesnoth/wmltools.py
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/data/tools/wesnoth/wmltools.py?rev=41170&r1=41169&r2=41170&view=diff
==============================================================================
--- trunk/data/tools/wesnoth/wmltools.py (original)
+++ trunk/data/tools/wesnoth/wmltools.py Fri Feb 12 15:10:51 2010
@@ -159,7 +159,7 @@
ftype = "alignment"
elif f == "TERRAIN":
ftype = "terrain_code"
- elif f.startswith("ADJACENT") or f in ("TERRAIN_PATTERN"):
+ elif f.startswith("ADJACENT") or f.startswith("TERRAINLIST") or f ==
"TERRAIN_PATTERN":
ftype = "terrain_pattern"
elif f in ("NAME", "VAR", "IMAGESTEM", "ID", "FLAG") or
f.endswith("_NAME") or f.endswith("_ID"):
ftype = "name"
@@ -205,7 +205,7 @@
atype = "terrain_code"
elif a.endswith(".wav") or a.endswith(".ogg"):
atype = "sound"
- elif a.startswith('"') and a.endswith('"') or a.startswith("_"):
+ elif a.startswith('"') and a.endswith('"') or (a.startswith("_") and a !=
'_s'):
atype = "stringliteral"
elif "=" in a:
atype = "filter"
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits