Hi Gernot!
Due to bug... http://www.glbasic.com/forum/index.php?topic=9400.0
I think this function are very easy to add with you... ;)
ZOOMANIM (the name says all ;))
Thanks!
Greetings from Cornella de Llobregat, Barcelona.
+1 :good:
Currently Im use this:
FUNCTION ZOOMANIM: Anim,Sprite,PosX,PosY,Zoom
LOCAL Tile=20
LOCAL Escala=Zoom*Tile
LOCAL Origen=Sprite*Tile
STARTPOLY Anim
POLYVECTOR PosX+0, PosY+0 ,0+Origen ,0
POLYVECTOR PosX+0, PosY+Escala ,0+Origen ,Tile
POLYVECTOR PosX+Escala, PosY+Escala ,Tile+Origen ,Tile
POLYVECTOR PosX+Escala, PosY+0 ,Tile+Origen ,0
ENDPOLY
ENDFUNCTION
This code are better!
FUNCTION ZOOMANIM: Anim,Sprite,PosX,PosY,Zoom
LOCAL Tile=30
LOCAL Escala=Zoom*Tile
LOCAL sx,sy,cols,tx,ty
GETSPRITESIZE Anim, sx, sy
cols = INTEGER(sx / Tile)
tx = MOD(Sprite, cols) * Tile
ty = INTEGER(Sprite/cols) * Tile
STARTPOLY Anim
POLYVECTOR PosX+0, PosY+0 ,tx ,ty
POLYVECTOR PosX+0, PosY+Escala ,tx ,ty+Tile
POLYVECTOR PosX+Escala, PosY+Escala ,tx+Tile ,ty+Tile
POLYVECTOR PosX+Escala, PosY+0 ,tx+Tile ,ty
ENDPOLY
ENDFUNCTION
:good: :good: :booze: :-* Thanks
Now you just need it to be able to handle rotation, although I think there is code somewhere that will do that...