SpriteSet: Size query
BlitzMax Forums/BlitzMax Beginners Area/SpriteSet: Size query
| ||
I'm trying to animate this old amiga lemmings spriteset. The trouble I'm having is figuring out the size of each sprite.I'm only interested in the top two lines.![]() This is my code, I calculate that the sprites are 36,54 but it doesn't appear correct when run. Anyone got any suggestions? [code] Graphics 800,600,0 'set gfx mode Incbin "../gfx/lemmings.jpg" Global myimage:TImage = LoadAnimImage("../gfx/lemmings.jpg",36,54,0,5) Global FrameTimer = MilliSecs() Global frame:Int = 0 SetClsColor 255,255,255 HideMouse While Not KeyHit(KEY_ESCAPE) 'Escape Cls DrawImage myimage,100,100,frame If frame > 3 Then frame = 0 If MilliSecs() > FrameTimer + 100 FrameTimer = MilliSecs() frame:+1 EndIf Flip Wend End [code] |
| ||
You can use StripAnimmakerLite to create animstrips from this image. You can get the program at the end of tutorial 12 here Good Luck |
| ||
Thanks. I understand how to animate sprites, I'm more interested in figuring out what size these individual sprites are. |
| ||
You could scan for the pixel that seperates each frame and store x,y,w,h for each frame somewhere. this wont prolly work with images directly, so you would need to split them up some how (using pixmaps instead feks). |
| ||
I think you will need to turn the image into strips for example![]() and another example ![]() thats what programs like StripAnimMakerLite are for |