Portions of an Image

BlitzMax Forums/BlitzMax Beginners Area/Portions of an Image

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

If all your sprites are the same size you could use LoadAnimImage and draw the individual sprites by drawing the different frames. You don't have to use it for animated sprites...

e.g. if you had 100 32x32 pixel sprites..
sprite = loadanimimage ("sprites.png",32,32,0,100,MASKEDIMAGE)
drawimage sprite,x,y,0    ' draws 1st sprite
drawimage sprite,x,y,1    ' draws 2nd sprite
drawimage sprite,x,y,2    ' draws 3rd sprite, etc


..dunno if this is better/worse than the DrawImageRect method, or just different..