SAS Sprite Editor
BlitzMax Forums/BlitzMax Programming/SAS Sprite Editor
| ||
http://www.scottshaver2000.com/blitz/sasspriteeditor/sasspriteeditor.zip =================================================================== Version: 0.0.1 Release Date: 11/26/2006 Changes: First release basic sprite creation is in but the collision editing isn't. Windows exes are included, so is the source code so you can compile it on Mac and Linux, although the GUI might be a bit off on those platforms. The matching sprites module is also included, with source. This first version doesn't yet have the collision region editing. You can however create any number of animations for a single sprite. Using this you can reduce the following code: ' load the images SetMaskColor(0,0,0) Global image:TImage = LoadAnimImage("im_guy.png",32,32,0,52,FILTEREDIMAGE|MASKEDIMAGE) Global pimage:TImage = LoadAnimImage("ice_penguin.png",32,32,0,10,FILTEREDIMAGE|MASKEDIMAGE) ' create the running man sprite Global guy:Sprite = Sprite.Create(32,32,image,"HERO") ' setting the filename is important if you want the editor to ' load this sprite or you want to avoid having to manually load the image ' when reading in the sprite file. guy.SetImageFilename("im_guy.png") ' Create the animations Global runRight:SpriteAnim = SpriteAnim.Create(0,12,50,"RUN RIGHT") Global runLeft:SpriteAnim = SpriteAnim.Create(13,25,50,"RUN LEFT") Global jumpRight:SpriteAnim = SpriteAnim.Create(26,37,50,"JUMP RIGHT") Global jumpLeft:SpriteAnim = SpriteAnim.Create(39,50,50,"JUMP LEFT") Global standRight:SpriteAnim = SpriteAnim.Create(38,38,50,"STAND RIGHT") Global standLeft:SpriteAnim = SpriteAnim.Create(51,51,50,"STAND LEFT") guy.AddAnim(runRight) guy.AddAnim(runLeft) guy.AddAnim(jumpRight) guy.AddAnim(jumpLeft) guy.AddAnim(standRight) guy.AddAnim(standLeft) guy.SetCurrentAnim("RUN RIGHT") guy.SetPosition(GraphicsWidth()/2,GraphicsHeight()/2) ' create the penguin sprite Global pen:Sprite = Sprite.Create(32,32,pimage,"PEN") ' setting the filename is important if you want the editor to ' load this sprite or you want to avoid having to manually load the image ' when reading in the sprite file. pen.SetImageFilename("ice_penguin.png") ' Create the animations Global dance:SpriteAnim = SpriteAnim.Create(0,9,50,"DANCE") pen.AddAnim(dance) pen.SetCurrentAnim("DANCE") pen.SetPosition(GraphicsWidth()/2+50,GraphicsHeight()/2) To this: Global guy:Sprite = SpriteFactory.MakeSprite("guy.sprite") Global pen:Sprite = SpriteFactory.MakeSprite("penguin.sprite") |
| ||
may i be the first to say - another sterlin piece of work, thx alot :D |
| ||
Thanks, when I get it completed I have another editor to write that will use the tile maps and the sprites together to add in game behaviors to the sprites. |
| ||
=================================================================== Version: 0.0.2 Release Date: 11/26/2006 Added the 2x animation panel. Fixed a bug with the bounce flag crashing the program. start and end index values for anims can be equal now. |
| ||
opps, I just realized the link in the first post was wrong, it's fixed now. And I had the wrong file up on the site. Go ahead and get it now. |
| ||
=================================================================== Version: 0.0.3 Release Date: 11/30/2006 Fixed a resize problem with the anim canvas objects. Fixed a redraw problem with the anim canvas objects. Added a popup message when the spirte image can't be loaded. |
| ||
=================================================================== Version: 1.0.0 Release Date: 1/1/2007 Fixed a redraw issue with the splitter. Fixed a save window size problem when the close icon is hit Fixed a save window position Had to adjust for the SetDirPrefix call in the sprites mod Fixed a bug in the clode sprite menu option |