Feature request > 2D

GETSPRITESIZE img, width%%, height%%, animframes%%

(1/2) > >>

spacefractal:
as above tell, this is very much needed, because its so annoying when there is no commands to tell how many frames there is in a animation, so you need to do various workaround (why?).

by now its simply just return the whole image size, but actuelly its should have returned the framesize, which its dosent do that. Howover this is property by design, not a bug.

animframes%% should of course only been optimal, not required. IF that is not possible, then GETANIMFRAMES img, animframes%% could been used as a new command.

kanonet:
Thee is no animated sprite file format. Actually it is just a single, normal, big sprite that contains all frames. When you kload it with LOADANIM you tell him the wide and high of each frame. So if you get the total size of the sprite you know how many frames it contains.

The number of frames should be easy to calculate, must be something like this if im not totally wring:
framenumber = spritehight/tilehigh*spritewidth/tilewith

spacefractal:
I know and do that, but it's should still tracked by glbasic own. So hence it's a little request, not a bug  :)

kanonet:
Hmm i dont think we need a command for something that can be done with 2 lines of glb code. But lets see what Gernot says to this.

fuzzy70:
Personally I cannot see the point of such of a command. On the very rare occasion that I do use LOADANIM I know exactly how many frames there are otherwise I wouldn't have created that amount of frames.

The way I deal with all my sprites is with types anyway which holds frames/width/height/filename/handle etc which makes things easier to manage.

Lee

Navigation

[0] Message Index

[#] Next page

Go to full version