Portions of an Image

BlitzMax Forums/BlitzMax Beginners Area/Portions of an Image

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..