www.pudn.com > jq_transfile.ARJ > IMAGE2.PRG
*********************************************************
*
* Name: Image2
* 此程序演示简单动画
*
**********************************************************
set talk off
set esca off
set curs off
set path to ..
do LoadSDK && 装入SDK
priv all like P_*
P_Color='B/W,W+/B,W/W,W+/B,W/B,W+/B,GR/W,W/B,N/W,W+/W'
=DefiWind("Demo",1,2,srows()-2,scols()-3,;
"colo &P_Color titl '基本图形特技演示 加速 减速'")
=ActiWind("Demo")
Demo_X1=C2X(1)
Demo_Y1=R2Y(1)
Demo_X2=C2X(wcol("Demo")-1)
Demo_Y2=R2Y(wrow("Demo"))
=DnRect(Demo_X1-1,Demo_Y1-1,Demo_X2+1,Demo_Y2+1)
do Image2_1
=ReleWind('Demo')
retu
func DELAY
para DELAYSCN
priv VSTART
if P_Delay>0.00011
VSTART=seco()
do whil seco()Demo_X2-32,Demo_X2-32,P_Obj[P_i,1]))
P_Obj[P_i,2]=iif(P_Obj[P_i,2]Demo_Y2-32,Demo_Y2-32,P_Obj[P_i,2]))
=PutImage(P_Obj[P_i,1], P_Obj[P_i,2], P_Obj[P_i,4]) && draw Img */
endf
P_Key=0
for P_J=1 to 600
&& Draw the Saucer */
for P_I=1 to P_ObjNum
P_StepX=iif(rand()<0.5,P_Step,-P_Step)
P_StepY=iif(rand()<0.5,P_Step,-P_Step)
=PutImage(P_Obj[P_i,1], P_Obj[P_i,2], P_Obj[P_i,4]) && draw Img */
=delay(P_Delay)
P_Obj[P_i,1]=P_Obj[P_i,1]+P_StepX
P_Obj[P_i,2]=P_Obj[P_i,2]+P_StepY
P_Obj[P_i,1]=iif(P_Obj[P_i,1]Demo_X2-32,Demo_X2-32,P_Obj[P_i,1]))
P_Obj[P_i,2]=iif(P_Obj[P_i,2]Demo_Y2-32,Demo_Y2-32,P_Obj[P_i,2]))
=PutImage(P_Obj[P_i,1],P_Obj[P_i,2],P_Obj[P_i,4]) && erase Img */
endf
P_Key=0
if chrs()
P_Key=inke("H")
clea type
endi
if P_Key=5
P_Delay=iif(P_Delay>0.0001,P_Delay*0.7,P_Delay)
endi
if P_Key=24
P_Delay=iif(P_Delay<=0.5,P_Delay*1.3,P_Delay)
endi
if P_Key=27
exit
endi
endf
for P_Counter=1 to P_ObjNum
=ReleImage(P_Obj[P_Counter,4])
endf
=SetPutMode(_COPY)
retu