etc um using this code (a none rotate support throught here):
FUNCTION PaintImage: Name$, x#, y#, alpha#, zoom#, xspot, yspot, special=0
LOCAL h#, w#, img, hh#, ww#, xx#, yy#, SH, SW, i#, r#
IF Name$=0
img=GetStr$(Name$, "Sprites") // Just a name based sprite FUNCTION rather than number. NOT need FOR test here at all.
ELSE
img=Name$
ENDIF
GETSPRITESIZE img, w, h
IF special<0
LOCAL animw=GetStr$(Name$+".w", "Anim"); animw=w/animw
LOCAL animh=GetStr$(Name$+".h", "Anim"); animh=h/animh
w=w/animw
h=h/animh
ENDIF
// some alpha code in that way I prefer. Not a issue in the real alphamode, its just me :-D
SetAlphaMode(alpha#)
// math placement for hotspots
IF xspot=-1 THEN PX=x#
IF xspot=0 THEN PX=ScreenWidth/2.0-(w#*zoom#/2.0)+x#
IF xspot=1 THEN PX=ScreenWidth-w#*zoom#-x#
IF yspot=-1 THEN PY=y#
IF yspot=0 THEN PY=ScreenHeight/2.0-(h*zoom#/2.0)+y#
IF yspot=1 THEN PY=ScreenHeight-h#*zoom#-y#
PW=w*zoom#
PH=h*zoom#
IF PY-PH>ScreenHeight OR PX-PW>ScreenWidth OR PY<-PH OR PX<-PW THEN RETURN
IF alpha#=0 THEN RETURN
IF special<0
LOCAL www=(PX#-((1-zoom#)*w#)/2)
IF PX#-((1-zoom#)*w#)/2>-PW#
STRETCHANIM img, INTEGER(-special)-1, PX#-((1-zoom#)*w#)/2, PY#-((1-zoom#)*h#)/2, PW#, PH#
ENDIF
ELSEIF special=0 OR special=1
ZOOMSPRITE img, PX#-((1-zoom#)*w#)/2, PY#-((1-zoom#)*h#)/2, PW#/w#, PH#/h#
ELSEIF special=2
ZOOMSPRITE img, PX#-((1-zoom#)*w#)/2, PY#-((1-zoom#)*h#)/2, -PW#/w#, PH#/h#
ENDIF
ENDFUNCTION
Its works nice (few array based functions missing here, but you got the idea what its happens), the function (which should of course massure both height and width, not just frames). Alternative the command could been GETANIMSIZE img, w, h, and then massure the rest.
Fell free to use the code of course, if you want to use that and modify it to your own needs, and its of couse a completly none priotity "issue".