[Super-tux-commit] supertux/contrib/tilemanager Application.cs,1.5,1.6 TileSet.cs,1.2,1.3
Brought to you by:
wkendrick
From: Matze B. <mat...@us...> - 2004-11-23 16:48:02
|
Update of /cvsroot/super-tux/supertux/contrib/tilemanager In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29597/contrib/tilemanager Modified Files: Application.cs TileSet.cs Log Message: added jam build system, please try it out - the advantage would be that it already supports all the stuff we need Index: Application.cs =================================================================== RCS file: /cvsroot/super-tux/supertux/contrib/tilemanager/Application.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Application.cs 23 Nov 2004 02:00:29 -0000 1.5 +++ Application.cs 23 Nov 2004 16:47:23 -0000 1.6 @@ -254,8 +254,18 @@ return; } foreach(Tile tile in Selection) { - if(tile.ID != -1) - tile.ID = id++; + if(tile.ID == -1) + continue; + + int oldid = tile.ID; + tile.ID = id++; + // remap in all tilegroups... + foreach(TileGroup tilegroup in tileset.TileGroups) { + int idx = tilegroup.Tiles.IndexOf(oldid); + if(idx >= 0) { + tilegroup.Tiles[idx] = tile.ID; + } + } } FillTileList(); SelectionChanged(); Index: TileSet.cs =================================================================== RCS file: /cvsroot/super-tux/supertux/contrib/tilemanager/TileSet.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- TileSet.cs 22 Nov 2004 01:52:34 -0000 1.2 +++ TileSet.cs 23 Nov 2004 16:47:23 -0000 1.3 @@ -30,7 +30,8 @@ break; case "tiles": do { - Tiles.Add(parser.IntegerValue); + if(!Tiles.Contains(parser.IntegerValue)) + Tiles.Add(parser.IntegerValue); } while(parser.Parse() && parser.Type == Parser.LispType.INTEGER); break; |