s=cmdline:peek a,s,1 if a='p' : goto *sspre if a='s' : goto *ssproc if a='c' : goto *sscfg if a=0 : goto *sscfg dialog "Unknown switch ["+cmdline+"]" end *sscfg width 544,380 : cls 3 : title "雨模様・設定" exist "rain.ini" if strsize=-1 {bcopy "rain.scr","rain.ini" str c0 : c0="2 5 2 1 3 35 35 10 10" bsave "rain.ini",c0,82} str c1 : str c2 : str c3 : str c4 : str c5 : str c6 : str c7 : str c8 : str c9 bload "rain.ini",c1 bload "rain.ini",c2,,10 bload "rain.ini",c3,,20 bload "rain.ini",c4,,30 bload "rain.ini",c5,,40 bload "rain.ini",c6,,50 bload "rain.ini",c7,,60 bload "rain.ini",c8,,70 bload "rain.ini",c9,,80 int c0 : int c1 : int c2 : int c3 : int c4 : int c5 : int c6 : int c7 : int c8 : int c9 gsel 0,2 font "MS ゴシック",13 : objmode 1 color 128,128,128 : line 10,8,530,8 : line 10,371,530,371 : line 5,4,5,375 : line 537,4,537,375 color 255,255,255 : line 10,9,530,9 : line 10,372,530,372 : line 6,4,6,375 : line 538,4,538,375 color 196,196,255 pos 45,20 : input c01,18,20,1 c0=(c1+1)\5 if c0=0 : c0=5 objprm 0,c0 pos 95,22 : mes "輪の最大数 (1〜5)" ;0と5が1重のみ、1がランダムに2重、6が2重に固定 pos 20,50 if (c1=0)|(c1>4) : combox c01_,100,"固定\n変化" : else : combox c01_,100,"変化\n固定" pos 95,52 : mes "輪の数を1から最大数までランダムに変化させるか、最大数に固定するか" pos 45,80 : input c02,18,20,2 : objprm 2,c2 pos 95,82 : mes "輪の大きさ (1〜9)" pos 45,110 : input c03,18,20,2 : objprm 3,c3 pos 95,112 : mes "輪が広がるスピード (1〜9)" pos 45,140 : input c04,18,20,2 : objprm 4,c4 pos 95,142 : mes "輪が広がりきってから消えるまでの時間 (1〜9)" pos 45,170 : input c05,18,20,2 : objprm 5,c5 pos 95,172 : mes "輪が消えてから次の輪が現れるまでの待ち時間 (1〜9)" pos 40,200 : input c06,25,20,2 : objprm 6,c6 pos 95,202 : mes "1重輪と2重輪の間隔 (10〜73)" pos 40,230 : input c07,25,20,2 : objprm 7,c7 pos 95,232 : mes "2重輪と3重輪の間隔 (10〜63)" pos 40,260 : input c08,25,20,2 : objprm 8,c8 pos 95,262 : mes "3重輪と4重輪の間隔 (10〜53)" pos 40,290 : input c09,25,20,2 : objprm 9,c9 pos 95,292 : mes "4重輪と5重輪の間隔 (10〜43)" font "MS 明朝",110 pos 288,200 : mes "}" font "MS ゴシック",12 : color 150,150,250 pos 318,270 : mes "|輪の数によって最大値が制限されます|\n|詳しくはReadMePlease.txtを参照  |" pos 180,330 : button "変更する",*over pos 280,330 : button "やっぱやめる",*ending stop *sspre cls color 100,100,200 : boxf 0,0,150,115 pos 10,20 : font "MS ゴシック",90 : color 150,150,250 : mes "●" pos 11,20 : font "MS ゴシック",88 : color 100,100,200 : mes "●" pos 20,30 : font "MS ゴシック",70 : color 150,150,250 : mes "●" pos 21,31 : font "MS ゴシック",68 : color 100,100,200 : mes "●" pos 30,40 : font "MS ゴシック",50 : color 150,150,250 : mes "●" pos 31,41 : font "MS ゴシック",48 : color 100,100,200 : mes "●" stop *ssproc ax=dispx : ay=dispy : color 100,100,200 bgscr 2,ax,ay,0,0,0 : boxf 0,0,ax,ay exist "rain.ini" ; 同じフォルダ内にiniファイルがあるかどうか調べる if strsize=-1 {bcopy "rain.scr","rain.ini" ; なかったらiniファイルを作ってデフォルトのデータを書き込む str c0 c0="2 5 2 1 3 35 35 10 10" bsave "rain.ini",c0,82} str c1 : str c2 : str c3 : str c4 : str c5 : str c6 : str c7 : str c8 : str c9 bload "rain.ini",c1 bload "rain.ini",c2,,10 bload "rain.ini",c3,,20 bload "rain.ini",c4,,30 bload "rain.ini",c5,,40 bload "rain.ini",c6,,50 bload "rain.ini",c7,,60 bload "rain.ini",c8,,70 bload "rain.ini",c9,,80 int c1 : int c2 : int c3 : int c4 : int c5 : int c6 : int c7 : int c8 : int c9 s=0 if c1=6 : s=3 if c1=7 : s=4 if c1=8 : s=5 if c1=9 : s=6 c2=c2*5 c3=c3*10 c4=c4*20 c5=c5*10 c6-=10 : c62=20+(c6*2) c7=c6+c7 : c72=20+(c7*2) c8=c7+c8 : c82=20+(c8*2) c9=c8+c9 : c92=20+(c9*2) *rain color 100,100,200 : boxf 0,0,ax,ay randomize repeat 40 gettime x,6 : gettime y,7 x=(x\10)*(y/10\10)*(ax/120) rnd y,(ax*3/5) : x=x+y-50 if x<0 : x=0 if x>ax : x=ax-150 rnd y,(ay+50) : y-100 if y<0 : y=0 if y>ay : y=ay-150 a=150 if c1=1 : rnd s,4 if c1=2 : rnd s,5 if c1=3 : rnd s,6 if c1=4 : rnd s,7 repeat c2 : redraw 2 pos x-10,y-10 : font "MS ゴシック",a : color 150,150,250 : mes "●" pos x-9,y-9 : font "MS ゴシック",a-2 : color 100,100,200 : mes "●" if s>2 {pos x+c6,y+c6 : font "MS ゴシック",a-c62 : color 150,150,250 : mes "●" pos x+c6+1,y+c6+1 : font "MS ゴシック",a-c62-2 : color 100,100,200 : mes "●"} if s>3 {pos x+c7,y+c7 : font "MS ゴシック",a-c72 : color 150,150,250 : mes "●" pos x+c7+1,y+c7+1 : font "MS ゴシック",a-c72-2 : color 100,100,200 : mes "●"} if s>4 {pos x+c8,y+c8 : font "MS ゴシック",a-c82 : color 150,150,250 : mes "●" pos x+c8+1,y+c8+1 : font "MS ゴシック",a-c82-2 : color 100,100,200 : mes "●"} if s>5 {pos x+c9,y+c9 : font "MS ゴシック",a-c92 : color 150,150,250 : mes "●" pos x+c9+1,y+c9+1 : font "MS ゴシック",a-c92-2 : color 100,100,200 : mes "●"} redraw 1 : a+=10 : x-=5 : y-=5 : await c3 : loop await c4 pos x-10,y-10 : font "MS ゴシック",a : color 100,100,200 : mes "●" wait c5 : loop goto *rain *over er=0 if (c01<1)|(c01>5) : er+=1 if (c02<1)|(c02>9) : er+=2 if (c03<1)|(c03>9) : er+=4 if (c04<1)|(c04>9) : er+=8 if (c05<1)|(c05>9) : er+=16 if (c01=2)&(c06>73) : er=512 if (c01=3)&(c06+c07>73) : er=513 if (c01=4)&(c06+c07+c08>73) : er=513 if (c01=5)&(c06+c07+c08+c09>73) : er=513 if (c06<10)|(c07<10)|(c08<10) : er=514 if er!0 : goto *error if (c1=0)|(c1>4) : c01=c01-1+((0-c01_+1)*5) : else : c01=c01-1+(c01_*5) str c0 : str c01 : str c02 : str c03 : str c04 : str c05 : str c06 : str c07 : str c08 : str c09 c0=c01+" "+c02+" "+c03+" "+c04+" "+c05+" "+c06+" "+c07+" "+c08+" "+c09 bsave "rain.ini",c0,82 end *error if er=1 : dialog "輪の最大数がおかしいよ",1 if er=2 : dialog "輪の大きさがおかしいよ",1 if (er=3)|(er=5)|(er=6)|(er=9)|(er=10)|(er=12)|(er=17)|(er=18)|(er=20)|(er=24) : dialog "2ヶ所数値がおかしいよ",1 if er=4 : dialog "輪が広がるスピードがおかしいよ",1 if (er=7)|(er=11)|(er=13)|(er=14)|(er=19)|(er=21)|(er=22)|(er=25)|(er=26)|(er=28) : dialog "3ヶ所も数値がおかしいよ",1 if er=8 : dialog "輪が消えるまでの時間がおかしいよ",1 if (er=15)|(er=23)|(er=27)|(er=29)|(er=30) : dialog "4ヶ所も数値がおかしいよ!",1 if er=16 : dialog "前の輪から次の輪までの待ち時間がおかしいよ",1 if er=31 : dialog "もう〜、5ヶ所も変だよ!" if er=512 : dialog "1重輪と2重輪の間隔が広すぎるよ",1 if er=513 : dialog "輪と輪の間隔が広すぎるよ",1 if er=514 : dialog "輪と輪の間隔を10未満にはしないでね",1 goto *sscfg stop *ending end