¼«Ê¬¤Î¥¹¥¯¥ê¥×¥È¤Ë̵Â̤ò´¶¤¸¤Æ¤·¤Þ¤¦¤Î¤Ç³§¤µ¤ó¤Ë²þÁ±¤·¤Æ¤¤¤¿¤À¤¤¿¤¤¤Ç¤¹¡£
x=6 //¥¢¥¤¥³¥ó¤Î²£¤Î¿ô ix=96 //¥¢¥¤¥³¥ó¤Î²£Éý scx=15 //¥¹¥¯¥í¡¼¥ë¥Ð¡¼¤ÎÉý winx=640-scx //Ž½Ž¸ŽÛŽ°ŽÙŽÊŽÞŽ°¤ò½ü¤¯¥¦¥£¥ó¥É¥¦¤Î²£Éý winy=480 //¥¦¥£¥ó¥É¥¦¤Î½ÄÉý spax=(winx-6*ix)/(x+1) //¥¢¥¤¥³¥ó¤Î²£´Ö³Ö spay=15 //¥¢¥¤¥³¥ó¤Î½Ä´Ö³Ö pcs=300 //¥¢¥¤¥³¥ó¤Î¿ô num=pcs/x //½ÄÎó¤Î¿ô //¥¹¥¯¥í¡¼¥ë¥Ð¡¼¤Î¢¬¢¥Ü¥¿¥ó¤Î½ÄÉý scbut=(winy-2*scx)*((winy-2*scx)*100)/(num*(ix+spay))/100 //¥¹¥¯¥í¡¼¥ë¥Ð¡¼¤Î¢¬¢¥Ü¥¿¥ó¤ÎyºÂɸ¡Ê¢¬¥Ü¥¿¥óÈ´¤¡Ë scpos=0 //¥¢¥¤¥³¥ó¤À¤±¤ò¤º¤é¡¼¤Ã¤Èʤ٤ë¥Ð¥Ã¥Õ¥¡ buffer 1,640,(ix+spay)*pcs repeat pcs/x //¤º¤é¡¼¤Ã¤ÈÉÁ²è pos 0,ix+spay gcopy 1,0,0,winx,(ix+spay)*lin repeat x i=cnt+1 color:boxf winx-(spax+ix)*i,spay,winx-(spax+ix)*i+ix,spay+ix pos winx-(spax+ix)*i,spay+3 color 255,255,255:mes 6*lin+i loop lin+=1 await 0 loop //¥á¥¤¥ó¥¦¥£¥ó¥É¥¦ screen 0,640,480 onclick gosub *onc color:boxf winx,0,winx+scx,winy gosub *draw color 255,255,255 gosub *onup:gosub *ondown:gosub *onbutton //¥Û¥¤¡¼¥ë¤ÎÆ°¤¤ò´Æ»ë¤¹¤ë¥á¥¤¥ó¥ë¡¼¥×(¡©) repeat mw=mousew if mw!0{ scpos+=mw/-20 //¤³¤³¤ÏŬÅö¤Ë¤·¤¿¤Î¤ÇÆ°¤¯¤«¤É¤¦¤« gosub *draw title "wheel "+scpos } wait 1 loop stop *onc mx=mousex:my=mousey if mx>(640-scx){ //¥Þ¥¦¥¹¤¬¥¹¥¯¥í¡¼¥ë¥Ð¡¼Æâ¤ËÆþ¤Ã¤Æ¤¤¤¿¤é //¥Þ¥¦¥¹¤¬¢¬¥Ü¥¿¥ó¤ò²¡¤·¤¿¤È¤ if my<scx{ color 0,255,255:gosub *onup repeat getkey key,1 if key=0:break scpos-=2 gosub *draw title "¢¬ "+scpos wait 1 loop color 255,255,255:gosub *onup } //¥Þ¥¦¥¹¤¬¢¥Ü¥¿¥ó¤ò²¡¤·¤¿¤È¤ if my>(winy-scx){ color 0,255,255:gosub *ondown repeat getkey key,1 if key=0:break scpos+=2 gosub *draw title "¢ "+scpos wait 1 loop color 255,255,255:gosub *ondown } //¥Þ¥¦¥¹¤¬¢¬¢¥Ü¥¿¥ó¤ò²¡¤·¤¿¤È¤ if my>(scx+scpos) and my<(scx+scpos+scbut){ my=my-scx-scpos repeat getkey key,1 if key=0:break scpos=mousey-my-scx gosub *draw title "¢¬¢ "+scpos wait 1 loop color 255,255,255:gosub *onbutton } }else{ //¥Þ¥¦¥¹¤¬¥¢¥¤¥³¥ó¤ò²¡¤·¤¿¤È¤ if mx\(ix+spax)-spax>0 and (my+y)\(ix+spay)-spay>0{ //¥Þ¥¦¥¹¤ÎºÂɸ¤Èscpos¤«¤é¥¢¥¤¥³¥ó¤ÎÈÖ¹æ¤ò¼èÆÀ title "hit "+(pcs-((my+y)/(ix+spay)*x)-mx/(ix+spax)) }else:title "out" } return *draw //²èÌ̤ÎÉÁ²è¤È¥¹¥¯¥í¡¼¥ë¥Ð¡¼¤Î¢¬¢¥Ü¥¿¥ó¤ÎÉÁ²è //---¤³¤³¤Çscpos¤ÎĶ¤¨¤¹¤®¤òËɤ° if scpos<0:scpos=0 if scpos>(winy-scx*2-scbut):scpos=(winy-scx*2-scbut) y=scpos*(num*(ix+spay)-480+scx)/(winy-2*scx-scbut) redraw 0 color:boxf winx,scx,winx+scx,winy-scx color 0,255,255:gosub *onbutton pos 0,0:gcopy 1,0,y,640-scx,480+y redraw 1 return *onup //¢¬¥Ü¥¿¥ó¤ÎºÆÉÁ²è boxf winx+1,1,winx+scx-2,scx-2 return *ondown //¢¥Ü¥¿¥ó¤ÎºÆÉÁ²è boxf winx+1,winy-scx+1,winx+scx-2,winy-2 return *onbutton //¢¬¢¥Ü¥¿¥ó¤ÎºÆÉÁ²è boxf winx+1,scx+scpos+1,winx+scx-2,scx+scpos+scbut-2 return
¤¿¤á¤·¤ËÁȤó¤À¥¹¥¯¥ê¥×¥È¤Ç¤¹
Ê£¿ô¤Î¥Ü¥¿¥ó¤ò°·¤¦¤Î¤Ëifʸ¤Ç¸ÄÊ̤˽èÍý¤µ¤·¤Æ¤¤¤ë¤Î¤Ç
¤½¤Îʬ̵Â̤¬Â¿¤¤µ¤¤¬¤·¤Þ¤¹¡£
¤Þ¤À½é¿´¼Ô¤Ê¤Î¤Ç¤É¤Î¤è¤¦¤Ë²þÁ±¤¹¤ì¤ÐÎɤ¤¤¬Ê¬¤«¤ê¤Þ¤»¤ó¡£
ʬ¤«¤ê¤Ë¤¯¤¤¥¹¥¯¥ê¥×¥È¤À¤È»×¤¤¤Þ¤¹¤¬¡¢¤è¤í¤·¤¯¤ª´ê¤¤¤·¤Þ¤¹¡£