ソース名[Clock2]
label C2 sra=65 srb=-10 mra=70 mrb=-10 hra=50 hrb=-8 da=0 ho=-1 mi=-1 se=-1 origin(0,0) col(0xFFFFFF*c) frect(0,0,width,height) origin(width/2,height/2-20) col(0xFFFFFF*!c) setfont("T") rect(-1,-mra-12,1,10) rect(mra+2,-1,10,1) rect(0,mra+2,1,10) rect(-mra-12,0,10,1)
label lp2 unlock(1) key=input(100) if(key==(1<<18)){m=1 goto "Exit"} elsif(key==(1<<13)||key==(1<<14)){goto "C1"} elsif(key==(1<<12)||key==(1<<15)){c=!c goto "C2"} if(se==second){goto "lp2"} se=second lock() col(0xFFFFFF*c) frect(-mra,-mra,mra*2+1,mra*2+1) col(0xFFFFFF*!c) for(i=0;i<=330;i=i+30){ if(i%90==0){i=i+30} if(i<90){dx=1 dy=1} elsif(i<180){dx=1 dy=-1-1} elsif(i<270){dx=-1-1 dy=-1-1} else{dx=-1-1 dy=1} frect((mra+5)*sin(i)/100+dx,(mra+5)*cos(i)/100+dy,2,2) }
line(hra*sin(180-hour*30-minute/2)/100,hra*cos(180-hour*30-minute/2)/100,hrb*sin(180-hour*30-minute/2)/100,hrb*cos(180-hour*30-minute/2)/100)
if(hour*60+minute<90 || hour*60+minute>=630){dx=-1 dy=0} elsif(hour*60+minute<270){dx=0 dy=-1} elsif(hour*60+minute<450){dx=1 dy=0} elsif(hour*60+minute<630){dx=0 dy=1}
line(hra*sin(180-hour*30-minute/2)/100+dx,hra*cos(180-hour*30-minute/2)/100+dy,hrb*sin(180-hour*30-minute/2)/100+dx,hrb*cos(180-hour*30-minute/2)/100+dy)
line(mra*sin(180-minute*6)/100,mra*cos(180-minute*6)/100,mrb*sin(180-minute*6)/100,mrb*cos(180-minute*6)/100)
if(minute>=53 || minute<8){dx=-1 dy=0} elsif(minute<23){dx=0 dy=-1} elsif(minute<38){dx=1 dy=0} elsif(minute<53){dx=0 dy=1} line(mra*sin(180-minute*6)/100+dx,mra*cos(180-minute*6)/100+dy,mrb*sin(180-minute*6)/100+dx,mrb*cos(180-minute*6)/100+dy)
col(0xFF0000) line(sra*sin(180-second*6)/100,sra*cos(180-second*6)/100,srb*sin(180-second*6)/100,srb*cos(180-second*6)/100)
if(da==date){goto "lp2"} da=date col(0xFFFFFF*!c) str=year."/" if(month+1<10){str=str."0"} str=str.(month+1)."/" if(date<10){str=str."0"} str=str.date if(dayofweek==1){str=str."(Sun)"}elsif(dayofweek==2){str=str."(Mon)"}elsif(dayofweek==3){str=str."(Tue)"}elsif(dayofweek==4){str=str."(Wed)"}elsif(dayofweek==5){str=str."(Thu)"}elsif(dayofweek==6){str=str."(Fri)"}elsif(dayofweek==7){str=str."(Sat)"} col(0xFFFFFF*c) frect(-width/2,mra+50-sthigh/2,width,sthigh) col(0xFFFFFF*!c) text(str,0,mra+50,3) goto "lp2"
FrontPage
関数一覧
記号一覧
SPALM入門
作品集
自作関数活用術
ダウンロード先
うpロダ
wikiの使い方
SPALMまでの歴史
現行スレ