Hi all,
I have managed to break the Spritesheet sample - it does not seem to like single/few small sprites. With either a single 32x64 sprite or two sprites of this size it borks out with the error printed at the bottom of this post. It will work with 3 sprites of this size, OR two sprites if one of them is larger. Is there a minimum size for the spritesheet, or is it something i am doing wrong?
(Also, i'd like to push the spritesheetpipeline and spritesheetruntime into a "utility library" instead of having them seperate projects; is this possible?)
Thanks,
Eljay.
Error reported:
Error 1 Building content threw ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: destinationRegion
at Microsoft.Xna.Framework.Content.Pipeline.Graphics.BitmapContent.ValidateCopyArguments(BitmapContent sourceBitmap, Rectangle sourceRegion, BitmapContent destinationBitmap, Rectangle destinationRegion)
at Microsoft.Xna.Framework.Content.Pipeline.Graphics.BitmapContent.Copy(BitmapContent sourceBitmap, Rectangle sourceRegion, BitmapContent destinationBitmap, Rectangle destinationRegion)
at SpriteSheetPipeline.SpritePacker.CopySpritesToOutput(List`1 sprites, IList`1 sourceSprites, ICollection`1 outputSprites, Int32 width, Int32 height) in C:\Documents and Settings\Jon\My Documents\Visual Studio 2005\Projects\BattleMap\SpriteSheetSample\SpriteSheetPipeline\SpritePacker.cs:line 107
at SpriteSheetPipeline.SpritePacker.PackSprites(IList`1 sourceSprites, ICollection`1 outputSprites, ContentProcessorContext context) in C:\Documents and Settings\Jon\My Documents\Visual Studio 2005\Projects\BattleMap\SpriteSheetSample\SpriteSheetPipeline\SpritePacker.cs:line 80
at SpriteSheetPipeline.SpriteSheetProcessor.Process(String[] input, ContentProcessorContext context) in C:\Documents and Settings\Jon\My Documents\Visual Studio 2005\Projects\BattleMap\SpriteSheetSample\SpriteSheetPipeline\SpriteSheetProcessor.cs:line 57
at Microsoft.Xna.Framework.Content.Pipeline.ContentProcessor`2.Microsoft.Xna.Framework.Content.Pipeline.IContentProcessor.Process(Object input, ContentProcessorContext context)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.BuildAssetWorker(BuildItem item)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.BuildAsset(BuildItem item)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.RunTheBuild()
at Microsoft.Xna.Framework.Content.Pipeline.Tasks.BuildContent.RemoteProxy.RunTheBuild(BuildCoordinatorSettings settings, TimestampCache timestampCache, ITaskItem[] sourceAssets, String[]& outputContent, String[]& rebuiltContent, String[]& intermediates, Dictionary`2& dependencyTimestamps, KeyValuePair`2[]& warnings) D:\JF\Projects\BattleMap\BattleMap\Content\SpriteSheets\otherSprites.xml BattleMap