[Supertux-Commit] r5783 - trunk/supertux-editor/supertux-editor/Tiles
mmlosh at millhouse.dreamhost.com
mmlosh at millhouse.dreamhost.com
Thu Sep 25 10:22:59 PDT 2008
Author: mmlosh
Date: 2008-09-25 10:22:57 -0700 (Thu, 25 Sep 2008)
New Revision: 5783
Modified:
trunk/supertux-editor/supertux-editor/Tiles/Tileset.cs
Log:
editor changes that are reflecting current state of .strf files (it should be usable now, attributes specified by "datas" are not supported yet)
Modified: trunk/supertux-editor/supertux-editor/Tiles/Tileset.cs
===================================================================
--- trunk/supertux-editor/supertux-editor/Tiles/Tileset.cs 2008-09-24 01:54:25 UTC (rev 5782)
+++ trunk/supertux-editor/supertux-editor/Tiles/Tileset.cs 2008-09-25 17:22:57 UTC (rev 5783)
@@ -136,7 +136,7 @@
props.GetUIntList("attributes", attributes);
if(ids.Count != width * height)
throw new ApplicationException("Must have width*height ids in tiles block");
- if(attributes.Count != width * height)
+ if((attributes.Count != width * height) && attributes.Count > 0) //missing atributes == all-are-0-attributes
throw new ApplicationException("Must have width*height attributes in tiles block");
int id = 0;
@@ -154,7 +154,7 @@
tile.Images = new List<Tile.ImageResource>();
tile.Images.Add(res);
tile.Id = ids[id];
- tile.Attributes = (Tile.Attribute) attributes[id];
+ tile.Attributes = (attributes.Count > 0)?(Tile.Attribute) attributes[id]:0; //missing atributes == all-are-0-attributes
while(tiles.Count <= tile.Id)
tiles.Add(null);
More information about the Supertux-Commit
mailing list