;小ネタいろいろ

;雪や花吹雪を降らせるためのスクリプト。
@sin_effect_snow
;雪が降るエフェクトです。
%name="effect/01_yuki/yuki"
sp "sin_yuki",{name={""+%name+"0100.png",""+%name+"0101.png",""+%name+"0102.png",""+%name+"0103.png",""+%name+"0104.png",""+%name+"0105.png",""+%name+"0106.png",""+%name+"0107.png",""+%name+"0108.png",""+%name+"0109.png",""+%name+"0110.png",""+%name+"0111.png",""+%name+"0112.png",""+%name+"0113.png",""+%name+"0115.png",""+%name+"0116.png",""+%name+"0117.png",""+%name+"0118.png",""+%name+"0119.png",""+%name+"0120.png"},x=0,y=0,z=998,animtime=150,animtype="normal"}:print #c
return

@sin_effect_snow_end
;雪消す
spdelete "sin_yuki":print #f,250
return

@sin_effect_sakura
;桜が降るエフェクトです。
%name="effect/02_sakura/sakura"
sp "sin_sakura",{name={""+%name+"0001.png",""+%name+"0002.png",""+%name+"0003.png",""+%name+"0004.png",""+%name+"0005.png",""+%name+"0006.png",""+%name+"0007.png",""+%name+"0008.png",""+%name+"0009.png",""+%name+"0010.png",""+%name+"0011.png",""+%name+"0012.png",""+%name+"0013.png",""+%name+"0014.png",""+%name+"0015.png",""+%name+"0016.png",""+%name+"0017.png",""+%name+"0018.png",""+%name+"0019.png",""+%name+"0020.png",""+%name+"0021.png",""+%name+"0022.png",""+%name+"0023.png",""+%name+"0024.png",""+%name+"0025.png",""+%name+"0026.png",""+%name+"0027.png",""+%name+"0028.png",""+%name+"0029.png",""+%name+"0030.png",""+%name+"0031.png",""+%name+"0032.png",""+%name+"0033.png",""+%name+"0034.png",""+%name+"0035.png",""+%name+"0036.png",""+%name+"0037.png",""+%name+"0038.png",""+%name+"0039.png",""+%name+"0040.png",""+%name+"0041.png",""+%name+"0042.png",""+%name+"0043.png",""+%name+"0044.png",""+%name+"0045.png",""+%name+"0046.png",""+%name+"0047.png",""+%name+"0048.png",""+%name+"0049.png",""+%name+"0050.png",""+%name+"0051.png",""+%name+"0052.png",""+%name+"0053.png",""+%name+"0054.png",""+%name+"0055.png",""+%name+"0056.png",""+%name+"0057.png",""+%name+"0058.png",""+%name+"0059.png",""+%name+"0060.png",""+%name+"0061.png",""+%name+"0062.png",""+%name+"0063.png",""+%name+"0064.png",""+%name+"0065.png",""+%name+"0066.png",""+%name+"0067.png",""+%name+"0068.png",""+%name+"0069.png",""+%name+"0070.png",""+%name+"0071.png",""+%name+"0072.png",""+%name+"0073.png",""+%name+"0074.png",""+%name+"0075.png",""+%name+"0076.png",""+%name+"0077.png",""+%name+"0078.png",""+%name+"0079.png",""+%name+"0080.png",""+%name+"0081.png",""+%name+"0082.png",""+%name+"0083.png",""+%name+"0084.png",""+%name+"0085.png",""+%name+"0086.png",""+%name+"0087.png",""+%name+"0088.png",""+%name+"0089.png",""+%name+"0090.png",""+%name+"0091.png",""+%name+"0092.png",""+%name+"0093.png",""+%name+"0094.png",""+%name+"0095.png",""+%name+"0096.png",""+%name+"0097.png",""+%name+"0098.png",""+%name+"0099.png",""+%name+"0100.png",""+%name+"0101.png",""+%name+"0102.png",""+%name+"0103.png",""+%name+"0104.png",""+%name+"0105.png",""+%name+"0106.png",""+%name+"0107.png",""+%name+"0108.png",""+%name+"0109.png",""+%name+"0110.png",""+%name+"0111.png",""+%name+"0112.png",""+%name+"0113.png",""+%name+"0114.png",""+%name+"0115.png",""+%name+"0116.png",""+%name+"0117.png",""+%name+"0118.png",""+%name+"0119.png",""+%name+"0120.png",""+%name+"0121.png",""+%name+"0122.png",""+%name+"0123.png",""+%name+"0124.png",""+%name+"0125.png",""+%name+"0126.png",""+%name+"0127.png",""+%name+"0128.png",""+%name+"0129.png",""+%name+"0130.png",""+%name+"0131.png",""+%name+"0132.png",""+%name+"0133.png",""+%name+"0134.png",""+%name+"0135.png",""+%name+"0136.png",""+%name+"0137.png",""+%name+"0138.png",""+%name+"0139.png",""+%name+"0140.png",""+%name+"0141.png",""+%name+"0142.png",""+%name+"0143.png",""+%name+"0144.png",""+%name+"0145.png",""+%name+"0146.png",""+%name+"0147.png",""+%name+"0148.png",""+%name+"0149.png",""+%name+"0150.png",""+%name+"0151.png",""+%name+"0152.png",""+%name+"0153.png",""+%name+"0154.png",""+%name+"0155.png",""+%name+"0156.png",""+%name+"0157.png",""+%name+"0158.png",""+%name+"0159.png",""+%name+"0160.png",""+%name+"0161.png",""+%name+"0162.png",""+%name+"0163.png",""+%name+"0164.png",""+%name+"0165.png",""+%name+"0166.png",""+%name+"0167.png",""+%name+"0168.png",""+%name+"0169.png",""+%name+"0170.png",""+%name+"0171.png",""+%name+"0172.png",""+%name+"0173.png",""+%name+"0174.png",""+%name+"0175.png",""+%name+"0176.png",""+%name+"0177.png",""+%name+"0178.png",""+%name+"0179.png",""+%name+"0180.png",""+%name+"0181.png",""+%name+"0182.png",""+%name+"0183.png",""+%name+"0184.png",""+%name+"0185.png",""+%name+"0186.png",""+%name+"0187.png",""+%name+"0188.png",""+%name+"0189.png",""+%name+"0190.png",""+%name+"0191.png",""+%name+"0192.png",""+%name+"0193.png",""+%name+"0194.png",""+%name+"0195.png",""+%name+"0196.png",""+%name+"0197.png",""+%name+"0198.png"},x=0,y=0,z=998,animtime=100,animtype="delete"}:print #c
return

@sin_effect_sakura_end
;桜消す
spdelete "sin_sakura":print #f,250
return


@sin_sinario
;■シナリオ見るかどうかの選択肢
spset "title",10
setu_01="イベントを見る"
setu_02="イベントを見ない"
skip 0
	sp "title:y",{name={"?"+setu_01+",menu0","?"+setu_01+",menu1"},x=50,y=330+30,z=0}
	sp "title:n",{name={"?"+setu_02+",menu0","?"+setu_02+",menu1"},x=50,y=330+30*2,z=0}
	print #c
	btnclear "title"
	btn "title:y"
	btn "title:n"
	@sin_sel_title_lp
	btnexec %ret,"title",{func=1}
if %ret=="#F1" then gosub @sin_ss
	if %ret=="y" then yesno=1 : spsetdelete "title" : return
	if %ret=="n" then yesno=0 : spsetdelete "title" : return
	goto @sin_sel_title_lp


return

















@tou_kaisi
;■塔に入る際のエフェクト
spset "title",0
;■背景画像（黒）
sp "title:hpdame",{name="sin_system\black.png",x=0,y=0,z=1}
print #u,500,"sin_system\ef_02.png"
wait 800,1
spsetdelete "title"
;print #u,500,"sin_system\ef_02.png"
return












;■スクリーンショットとる（Ｆ１）
@sin_ss
getscreenshot "screenshot"
bresize "screenshot",1280,720
;■現在の時刻を取得してファイル名にする→現在問い合わせ中
;time %year,%month,%day,%hour,%min,%sec
;ssname=STR(%year)
;ssname=ssname+STR(%day)
;ssname=ssname+STR(%hour)
;ssname=ssname+STR(%min)
;ssname=ssname+STR(%sec)
;■仮置き（ファイルは0〜）
ssname="ss_"
%i=""
%year=0
for %0=0 to 10000000
	%i=STR(%0)
	ssname=ssname+%i+".png"
	flag=filechk(ssname) 
;	filetime %i,%year,%month,%day,%hour,%min,%sec
	if flag==0 then exit
	ssname="ss_"
next
;filetime %i,%year,%month,%day,%hour,%min,%sec
time %year,%month,%day,%hour,%min,%sec
%ssname=STR(%year)
%ssname=%ssname+STR(%month)
%ssname=%ssname+STR(%day)
%ssname=%ssname+STR(%hour)
%ssname=%ssname+STR(%min)
%ssname=%ssname+STR(%sec)

ssname=%ssname+ssname
;ssname=ssname+
;ssname=".png"
bsave "screenshot",ssname
;okbox "スクリーンショットをss.pngに保存しました。","保存確認"
ssname="スクリーンショットを"+ssname+"に保存しました。"
okbox ssname,"保存確認"
bdelete "screenshot"
return

;■自作コンフィグ---------------------------------------------------------------------------------------------------
@sin_config
spset "cfg",100
sp "cfg:bg",{name="sin_system\config\config_bg.png",x=0,y=0,z=1000}

@sin_config_btnload
btnclear "cfg"

;スクリーンモードはAlt+ENTERや最大化ボタンでも変化します。必ず、状態をチェックして対応してください。
if getscreen()==0 then
	sp "cfg:window",{name="sin_system\config\config_settei.png",x=40+20,y=100-10,z=10}
	sp "cfg:full",{name={"sin_system\config\config_0.png","sin_system\config\config_sel.png"},x=220,y=100-10,z=10}
	btn "cfg:full"
else
	sp "cfg:window",{name={"sin_system\config\config_0.png","sin_system\config\config_sel.png"},x=60,y=90,z=10}
	sp "cfg:full",{name="sin_system\config\config_settei.png",x=220,y=90,z=10}
	btn "cfg:window"
end if

;■ここから

;■文字の表示速度
sp "cfg:text1",{name={"sin_system\config\config_0.png","sin_system\config\config_sel.png"},x=40,y=200-10,z=10}	;遅い
sp "cfg:text2",{name={"sin_system\config\config_0.png","sin_system\config\config_sel.png"},x=120,y=200-10,z=10}
sp "cfg:text3",{name={"sin_system\config\config_0.png","sin_system\config\config_sel.png"},x=206,y=200-10,z=10}
sp "cfg:text4",{name={"sin_system\config\config_0.png","sin_system\config\config_sel.png"},x=280,y=200-10,z=10}

if _textspeed==1 then
	sp "cfg:text1",{name="sin_system\config\config_settei.png",x=40,y=200-10,z=10}
	btn "cfg:text2"
	btn "cfg:text3"
	btn "cfg:text4"
endif

if _textspeed==3 then
	sp "cfg:text2",{name="sin_system\config\config_settei.png",x=120,y=200-10,z=10}
	btn "cfg:text1"
	btn "cfg:text3"
	btn "cfg:text4"
endif

if _textspeed==5 then
	sp "cfg:text3",{name="sin_system\config\config_settei.png",x=206,y=200-10,z=10}
	btn "cfg:text1"
	btn "cfg:text2"
	btn "cfg:text4"
endif

if _textspeed==6 then
	sp "cfg:text4",{name="sin_system\config\config_settei.png",x=280,y=200-10,z=10}
	btn "cfg:text1"
	btn "cfg:text2"
	btn "cfg:text3"
endif

;■オート文字の表示速度
sp "cfg:atext1",{name={"sin_system\config\config_0.png","sin_system\config\config_sel.png"},x=420,y=200-10,z=10}	;遅い
sp "cfg:atext2",{name={"sin_system\config\config_0.png","sin_system\config\config_sel.png"},x=495,y=200-10,z=10}
sp "cfg:atext3",{name={"sin_system\config\config_0.png","sin_system\config\config_sel.png"},x=583,y=200-10,z=10}
sp "cfg:atext4",{name={"sin_system\config\config_0.png","sin_system\config\config_sel.png"},x=650,y=200-10,z=10}

if _autospeed==1 then
	sp "cfg:atext1",{name="sin_system\config\config_settei.png",x=420,y=200-10,z=10}
	btn "cfg:atext2"
	btn "cfg:atext3"
	btn "cfg:atext4"
endif

if _autospeed==3 then
	sp "cfg:atext2",{name="sin_system\config\config_settei.png",x=495,y=200-10,z=10}
	btn "cfg:atext1"
	btn "cfg:atext3"
	btn "cfg:atext4"
endif

if _autospeed==5 then
	sp "cfg:atext3",{name="sin_system\config\config_settei.png",x=583,y=200-10,z=10}
	btn "cfg:atext1"
	btn "cfg:atext2"
	btn "cfg:atext4"
endif

if _autospeed==6 then
	sp "cfg:atext4",{name="sin_system\config\config_settei.png",x=650,y=200-10,z=10}
	btn "cfg:atext1"
	btn "cfg:atext2"
	btn "cfg:atext3"
endif

;■bgm音量
sp "cfg:bgm1",{name={"sin_system\config\config_0.png","sin_system\config\config_sel.png"},x=55,y=300,z=10}	;遅い
sp "cfg:bgm2",{name={"sin_system\config\config_0.png","sin_system\config\config_sel.png"},x=115,y=300,z=10}	;遅い
sp "cfg:bgm3",{name={"sin_system\config\config_0.png","sin_system\config\config_sel.png"},x=171,y=300,z=10}	;遅い
sp "cfg:bgm4",{name={"sin_system\config\config_0.png","sin_system\config\config_sel.png"},x=222,y=300,z=10}	;遅い

if _bgmvol==0 then
	sp "cfg:bgm1",{name="sin_system\config\config_settei.png",x=55,y=300,z=10}
	btn "cfg:bgm2"
	btn "cfg:bgm3"
	btn "cfg:bgm4"
endif
if _bgmvol==1 then
	sp "cfg:bgm2",{name="sin_system\config\config_settei.png",x=115,y=300,z=10}
	btn "cfg:bgm1"
	btn "cfg:bgm3"
	btn "cfg:bgm4"
endif
if _bgmvol==2 then
	sp "cfg:bgm3",{name="sin_system\config\config_settei.png",x=171,y=300,z=10}
	btn "cfg:bgm1"
	btn "cfg:bgm2"
	btn "cfg:bgm4"
endif
if _bgmvol==6 then
	sp "cfg:bgm4",{name="sin_system\config\config_settei.png",x=222,y=300,z=10}
	btn "cfg:bgm2"
	btn "cfg:bgm3"
	btn "cfg:bgm1"
endif

;■se音量
sp "cfg:se1",{name={"sin_system\config\config_0.png","sin_system\config\config_sel.png"},x=421,y=300-10,z=10}	;遅い
sp "cfg:se2",{name={"sin_system\config\config_0.png","sin_system\config\config_sel.png"},x=490,y=300-10,z=10}	;遅い
sp "cfg:se3",{name={"sin_system\config\config_0.png","sin_system\config\config_sel.png"},x=546,y=300-10,z=10}	;遅い
sp "cfg:se4",{name={"sin_system\config\config_0.png","sin_system\config\config_sel.png"},x=596,y=300-10,z=10}	;遅い

if _sevol==0 then
	sp "cfg:se1",{name="sin_system\config\config_settei.png",x=421,y=300-10,z=10}
	btn "cfg:se2"
	btn "cfg:se3"
	btn "cfg:se4"
endif
if _sevol==1 then
	sp "cfg:se2",{name="sin_system\config\config_settei.png",x=490,y=300-10,z=10}
	btn "cfg:se1"
	btn "cfg:se3"
	btn "cfg:se4"
endif
if _sevol==2 then
	sp "cfg:se3",{name="sin_system\config\config_settei.png",x=546,y=300-10,z=10}
	btn "cfg:se1"
	btn "cfg:se2"
	btn "cfg:se4"
endif
if _sevol==6 then
	sp "cfg:se4",{name="sin_system\config\config_settei.png",x=596,y=300-10,z=10}
	btn "cfg:se2"
	btn "cfg:se3"
	btn "cfg:se1"
endif

sp "cfg:title6",{name={"sin_system\config\config_0.png","sin_system\config\config_sel.png"},x=407,y=490,z=10}	;遅い
sp "cfg:title7",{name={"sin_system\config\config_0.png","sin_system\config\config_sel.png"},x=515,y=490,z=10}	;遅い

;■ここまでしーんーせーかー自作箇所

btn "cfg:title6"
btn "cfg:title7"


@sin_config_loop
btnexec %ret,"cfg",{sizechange=1} ; コンフィグではウィンドウサイズ変化に対応。表示に反映させます。
if %ret=="title6" then
	yesnobox %ret,"リセットしますか？","リセット確認"
	if %ret==1 then reset else goto @sin_config_loop
end if
if %ret=="title7" then
	yesnobox %ret,"終了しますか？","終了確認"
	if %ret==1 then quit else goto @sin_config_loop
end if
if %ret==#r then spsetdelete "cfg":spvisible "window:config_s",0:print #c:return	;■20160130追加
if %ret=="window" then setscreen 0:goto @sin_config_btnload
if %ret=="full" then setscreen 1:goto @sin_config_btnload
if %ret==#sizechange then goto @sin_config_btnload ; Alt+ENTERもしくは最大化ボタン対策
;■以下、改変ではなくしーんーせーかー自作箇所
if %ret=="text1" then _textspeed=1 : goto @sin_config_btnload
if %ret=="text2" then _textspeed=3 : goto @sin_config_btnload
if %ret=="text3" then _textspeed=5 : goto @sin_config_btnload
if %ret=="text4" then _textspeed=6 : goto @sin_config_btnload
if %ret=="atext1" then _autospeed=1 : goto @sin_config_btnload
if %ret=="atext2" then _autospeed=3 : goto @sin_config_btnload
if %ret=="atext3" then _autospeed=5 : goto @sin_config_btnload
if %ret=="atext4" then _autospeed=6 : goto @sin_config_btnload
;if %ret=="bgm1" then _bgmvol=0 : bgmvolume -10000 : goto @sin_config_btnload
if %ret=="bgm1" then
_bgmvol=0
bgmvolume -10000
goto @sin_config_btnload
endif
if %ret=="bgm2" then
_bgmvol=1
bgmvolume -1000
goto @sin_config_btnload
endif
if %ret=="bgm3" then
_bgmvol=2
bgmvolume -500
goto @sin_config_btnload
endif
;if %ret=="bgm4" then _bgmvol=6 : bgmvolume 0 : goto @sin_config_btnload
if %ret=="bgm4" then
_bgmvol=6
bgmvolume 0
goto @sin_config_btnload
endif

if %ret=="se1" then
_sevol=0
sevolume -10000
goto @sin_config_btnload
endif
if %ret=="se2" then
_sevol=1
sevolume -1000
goto @sin_config_btnload
endif
if %ret=="se3" then
_sevol=2
sevolume -500
goto @sin_config_btnload
endif
;if %ret=="se4" then _sevol=6 : sevolume 0 : goto @sin_config_btnload
if %ret=="se4" then
_sevol=6
sevolume 0
goto @sin_config_btnload
endif
goto @sin_config_loop
































;■自作ゲームセーブデータ（10ページ）--------------------------------------------------------------------------------
@sin_saveload_gets
getscreenshot "save"
;bresize "save",120,90
bresize "save",107,60
return

@sin_saveload
;getscreenshot "save"
;bresize "save",120,90
















@sin_sl_01
spset "data",10

if issave==0 then
sp "data:bg",{name="sin_system\config\load_bg.png",x=0,y=0,z=1000}
else
sp "data:bg",{name="sin_system\config\save_bg.png",x=0,y=0,z=1000}
endif

;■20170419１０ページまで拡張する------------------------------------------------------------------------------------

%saveload_page=STR(_saveload[0])
sp "data:page",{name={"?"+%saveload_page+",text"},x=700,y=5,z=10}	;■ページ数

%_saveload[1]=_saveload[0]+1
%saveload_page=STR(_saveload[0])
sp "data:page_2",{name={"?次,text","?次,text"},x=700+30*3,y=5,z=10}	;■後ろ

%_saveload[1]=_saveload[0]-1
%saveload_page=STR(_saveload[0])
sp "data:page_0",{name={"?前,text","?前,text"},x=700-30*3,y=5,z=10}	;■前

if _saveload[0]==1 then spdelete "data:page_0" : _saveload[1]=1
if _saveload[0]==10 then spdelete "data:page_2"

;-------------------------------------------------------------------------------------------------------------------
%x=0
%y=0
for %0=_saveload[1] to _saveload[1]+11
%b=STR(%0)
%a="data:"+%b

;sp %a,{name="*g120,90,#FF000000,#FFFFFFFF,0,0",x=40+300*%x,y=70+120*%y,z=140}	;■画像変更可能
sp %a,{name="sin_system/sandl.png",x=40+300*%x,y=70+120*%y,z=140}	;■画像変更可能

flag=schk(%0) 
if flag==1 then
	sp %a,{name="savedata\"+%b+".png",x=40+300*%x,y=70+120*%y,z=110}
	savetime %0,%year,%month,%day,%hour,%min,%sec
;	%str="?"+strf("%4d",%year)+"/"+strf("%02d",%month)+"/"+strf("%02d",%day)+" "+strf("%02d",%hour)+":"+strf("%02d",%min)+":"+strf("%02d",%sec)
	%str="?"+strf("%4d",%year)+"/"+strf("%02d",%month)+"/"+strf("%02d",%day)+" "+strf("%02d",%hour)+":"+strf("%02d",%min)
	%c="data:c"+%b
	sp %c,{name={%str+",save0"},x=40+300*%x,y=160+120*%y,z=150}
;■20170419テキスト追加
;■20170605テキストが表示されない場合の処理追加
;	save_text 表示文字列
;	%save_text=left(save_text,10)
flag=isdef(_save_text[%0])
if flag==0 then goto @sin_a
	%d="data:m"+%b
	sp %d,{name={"*400,400,#00000000"},x=40+120+300*%x,y=70+120*%y,z=150}
	spformat %d,0,_save_text[%0],{font="save0",x=1,y=1,w=8,h=6}
@sin_a

endif
%x=%X+1
if %x==4 then %x=0 : %y=%y+1
next

;■NEWマークを呼び出す。（0以外）
	;■一応、最新のファイルがあるかチェック
	%flag=schk(_sin_saveload_new) 
	if %flag==0 then
		;■何もしない（ファイルが存在しないため）
	else
		;■ページにない場合は表示しない
		if _sin_saveload_new>=1 and _sin_saveload_new<=12 and _saveload[0]==1 then gosub @sin_sl_new:goto @sin_s01

		if _sin_saveload_new>=13 and _sin_saveload_new<=12*2 and _saveload[0]==2 then gosub @sin_sl_new:goto @sin_s01

		if _sin_saveload_new>=13+12 and _sin_saveload_new<=12*3 and _saveload[0]==3 then gosub @sin_sl_new:goto @sin_s01

		if _sin_saveload_new>=13+12*2 and _sin_saveload_new<=12*4 and _saveload[0]==4 then gosub @sin_sl_new:goto @sin_s01

		if _sin_saveload_new>=13+12*3 and _sin_saveload_new<=12*5 and _saveload[0]==5 then gosub @sin_sl_new:goto @sin_s01

		if _sin_saveload_new>=13+12*4 and _sin_saveload_new<=12*6 and _saveload[0]==6 then gosub @sin_sl_new:goto @sin_s01

		if _sin_saveload_new>=13+12*5 and _sin_saveload_new<=12*7 and _saveload[0]==7 then gosub @sin_sl_new:goto @sin_s01

		if _sin_saveload_new>=13+12*6 and _sin_saveload_new<=12*8 and _saveload[0]==8 then gosub @sin_sl_new:goto @sin_s01

		if _sin_saveload_new>=13+12*7 and _sin_saveload_new<=12*9 and _saveload[0]==9 then gosub @sin_sl_new:goto @sin_s01

		if _sin_saveload_new>=13+12*8 and _sin_saveload_new<=12*10 and _saveload[0]==10 then gosub @sin_sl_new:goto @sin_s01

		if _sin_saveload_new>=13+12*9 and _sin_saveload_new<=12*11 and _saveload[0]==11 then gosub @sin_sl_new:goto @sin_s01

		if _sin_saveload_new>=13+12*10 and _sin_saveload_new<=12*12 and _saveload[0]==12 then gosub @sin_sl_new:goto @sin_s01

		if _sin_saveload_new>=13+12*11 and _sin_saveload_new<=12*13 and _saveload[0]==13 then gosub @sin_sl_new:goto @sin_s01

		if _sin_saveload_new>=13+12*12 and _sin_saveload_new<=12*14 and _saveload[0]==14 then gosub @sin_sl_new:goto @sin_s01

		if _sin_saveload_new>=13+12*13 and _sin_saveload_new<=12*15 and _saveload[0]==15 then gosub @sin_sl_new:goto @sin_s01

		if _sin_saveload_new>=13+12*14 and _sin_saveload_new<=12*16 and _saveload[0]==16 then gosub @sin_sl_new:goto @sin_s01

		if _sin_saveload_new>=13+12*15 and _sin_saveload_new<=12*17 and _saveload[0]==17 then gosub @sin_sl_new:goto @sin_s01

		if _sin_saveload_new>=13+12*16 and _sin_saveload_new<=12*18 and _saveload[0]==18 then gosub @sin_sl_new:goto @sin_s01

		if _sin_saveload_new>=13+12*17 and _sin_saveload_new<=12*19 and _saveload[0]==19 then gosub @sin_sl_new:goto @sin_s01

		if _sin_saveload_new>=13+12*18 and _sin_saveload_new<=12*20 and _saveload[0]==20 then gosub @sin_sl_new:goto @sin_s01

		if _sin_saveload_new>=13+12*20 and _sin_saveload_new<=12*21 and _saveload[0]==21 then gosub @sin_sl_new:goto @sin_s01

		if _sin_saveload_new>=13+12*21 and _sin_saveload_new<=12*22 and _saveload[0]==22 then gosub @sin_sl_new:goto @sin_s01

		if _sin_saveload_new>=13+12*22 and _sin_saveload_new<=12*23 and _saveload[0]==23 then gosub @sin_sl_new:goto @sin_s01

		if _sin_saveload_new>=13+12*23 and _sin_saveload_new<=12*24 and _saveload[0]==24 then gosub @sin_sl_new:goto @sin_s01

	endif

@sin_s01

print #c
@sin_sl
btnclear "data"

for %0=_saveload[1] to _saveload[1]+19
%b=STR(%0)
%a="data:"+%b
	btn %a
next
;■20170419ページ移動用
btn "data:page_2",{on="S(rpg_sozai\se\sin_click.ogg)"}
btn "data:page_0",{on="S(rpg_sozai\se\sin_click.ogg)"}

@sin_sl_loop
btnexec %ret,"data"

if %ret==#r then bdelete "save" : spsetdelete "data" : spvisible "window:save_s",0:spvisible "window:load_s",0:print #c:return	;■いろいろ削除して元に戻る

;■20170419ページ移動-----------------------------------------------------------------------------------------

if %ret=="page_2" then _saveload[0]=_saveload[0]+1 : _saveload[1]=_saveload[1]+12 : goto @sin_saveload
if %ret=="page_0" then _saveload[0]=_saveload[0]-1 : _saveload[1]=_saveload[1]-12 : goto @sin_saveload

;----------------------------------------------------------------------------------------------------------------


;okbox %ret,"保存確認"

	for %0=_saveload[1] to _saveload[1]+19
	ret=STR(%0)
if %ret==ret then
	i=num(%ret)
	%i=STR(i)
	if issave==0 then
gosub @sin_load_ka
	if a==1 then
		ii=schk(i)
;%ret=STR(ii)
;okbox %ret,"保存確認"
		if ii==1 then
		load i
		else
		goto @sin_sl_01
		endif
		endif
	else
gosub @sin_load_ka
	if a==1 then
	save i
;		ret1=STR(i)
;	okbox ret1,"セーブ番号"

	;■文字列を保存する
;	l=len(save_text)
	z=zlen(save_text)
;	%lc=right(save_text,l)
;	%ld=mid(save_text,0,l)
;	ret1=STR(l)
;okbox ret1,"バイト数"
;	ret2=STR(z)
;okbox ret2,"全角文字"
	;■もし文字列が超えるなら削除する
	;■20170914オーバーフロー対策しました（46から40文字へ減少）
	if z>40 then save_text=left(save_text,40*3)
;okbox save_text,"文字"
	_save_text[i]=save_text
	;■ナンバーiにnewマークを付ける。
		_sin_saveload_new=i
		gosub @sin_sl_new
	gosub @sin_sl_syori
	else
	goto @sin_sl_01
endif
endif
goto @sin_sl_01
endif
	next


goto @sin_sl_loop



@sin_sl_syori
%a=STR(i)
savename="savedata\"+%a+".png"
bsave "save",savename	;ゲームのスクショを保存する
return

bdelete "save"	;■データ画面から出るときに消す
return

@sin_load_ka
	;sp "data:bg_ka",{name="sin_system\config\load_ka.png",x=0,y=0,z=100}
if issave==0 then
sp "data:bg_ka",{name="sin_system\config\load_ka.png",cx=1280/2,cy=720/2,z=100}
else
sp "data:bg_ka",{name="sin_system\config\save_ka.png",cx=1280/2,cy=720/2,z=100}
endif
	sp "data:se1",{name={"sin_system\config\config_0.png","sin_system\config\config_sel.png"},x=540,y=315,z=10}
	sp "data:se2",{name={"sin_system\config\config_0.png","sin_system\config\config_sel.png"},x=680,y=315,z=10}
	print #c
	@sin_load_ka_loop
	btnclear "data"
	btn "data:se1"
	btn "data:se2"
	btnexec %ret,"data"
		if %ret=="se1" then a=1 : gosub @sin_data_delete : return
		if %ret=="se2" then a=0 : gosub @sin_data_delete : return
	goto @sin_load_ka_loop

@sin_data_delete
	spdelete "data:bg_ka"
	spdelete "data:se1"
	spdelete "data:se2"
	print #c
return

@sin_sl_new
	;■NEWマークを付ける。
samx=40
samy=70
%x=1
%y=0
	for %0=_saveload[1] to _saveload[1]+19
;	for %0=1 to 16	;■１６回繰り返す
;■こちらはおっけ。
;okbox str(_sin_saveload_new),"セーブスロット"
;okbox str(%0),"new"
		if _sin_saveload_new==%0 then exit	;■もし_sin_saveload_newと%0が同じなら、そこでストップする
		if %x==4 then %x=0 : %y=%y+1
		samx=40+300*%x
		samy=70+120*%y
		;■以下、足す
		%x=%x+1
	next
;	ret1=STR(_sin_saveload_new)
;	okbox ret1,"バイト数"
;okbox str(%0),"%0"
;okbox str(_sin_saveload_new),"_sin_saveload_new"
		sp "data:new",{name="?ＮＥＷ！,new",x=samx,y=samy,z=109}	;■画像変更可能
		
return

;■ノベルモードとＡＤＶモードの変更
@sin_novel_01
;■ノベルモードに変更
novelmode 1
novelmode=1
spsetdelete "window"
gosub @load_window
return

@sin_novel_00
;■ＡＤＶモードに変更
novelmode 0
novelmode=0
spsetdelete "window"
gosub @load_window
return

@sin_btn
;■ボタン画像に変更する
sp "window:erase", {name="sin_system/window/wincl.png",x=960-30*1,y=540+50,z=100};
sp "window:skip",  {name="sin_system/window/skip.png",x=960-30*2,y=540+50,z=100};
sp "window:auto",  {name="sin_system/window/a.png",x=960-30*3,y=540+50,z=100};
sp "window:save",  {name="sin_system/window/save.png",x=960-30*4,y=540+50,z=100};
sp "window:load",  {name="sin_system/window/load.png",x=960-30*5,y=540+50,z=100};
sp "window:log",   {name="sin_system/window/log.png",x=960-30*6,y=540+50,z=100};
sp "window:config",{name="sin_system/window/config.png",x=960-30*7,y=540+50,z=100};

;■ボタン画像に変更する（20200907文字付きボタンへ変更）横上一列
sp "window:erase", {name="sin_system/window2/winoff_off.png",x=1280-70*1,y=380+50,z=100};
sp "window:skip",  {name="sin_system/window2/skip_off.png",x=1280-70*2,y=380+50,z=100};
sp "window:auto",  {name="sin_system/window2/auto_off.png",x=1280-70*3,y=380+50,z=100};
sp "window:save",  {name="sin_system/window2/save_off.png",x=1280-70*4,y=380+50,z=100};
sp "window:load",  {name="sin_system/window2/load_off.png",x=1280-70*5,y=380+50,z=100};
sp "window:log",   {name="sin_system/window2/log_off.png",x=1280-70*6,y=380+50,z=100};
sp "window:config",{name="sin_system/window2/config_off.png",x=1280-70*7,y=380+50,z=100};

;■ボタン画像に変更する（20200907文字付きボタンへ変更）縦一列
sp "window:erase", {name="sin_system/window2/winoff_off.png",x=1280-70*1,y=720-26-28*6,z=100};
sp "window:skip",  {name="sin_system/window2/skip_off.png",x=1280-70*1,y=720-26-28*5,z=100};
sp "window:auto",  {name="sin_system/window2/auto_off.png",x=1280-70*1,y=720-26-28*4,z=100};
sp "window:save",  {name="sin_system/window2/save_off.png",x=1280-70*1,y=720-26-28*3,z=100};
sp "window:load",  {name="sin_system/window2/load_off.png",x=1280-70*1,y=720-26-28*2,z=100};
sp "window:log",   {name="sin_system/window2/log_off.png",x=1280-70*1,y=720-26-28*1,z=100};
sp "window:config",{name="sin_system/window2/config_off.png",x=1280-70*1,y=720-26,z=100};

;■説明文を出します（上手く出ればいいけれど）
;sp "window:erase_s",{name={"?　,text2","?ウィンドウを消します,text2"},x=960-100*2,y=620,z=100}
;spvisible "window:erase_s",0
;sp "window:skip_s",{name={"?　,text2","?既読スキップします,text2"},x=960-90*2,y=620,z=100}
;spvisible "window:skip_s",0
;sp "window:auto_s",{name={"?　,text2","?自動で読み進めます,text2"},x=960-90*2,y=620,z=100}
;spvisible "window:auto_s",0
;sp "window:save_s",{name={"?　,text2","?セーブ画面を開きます,text2"},x=960-100*2,y=620,z=100}
;spvisible "window:save_s",0
;sp "window:load_s",{name={"?　,text2","?ロード画面を開きます,text2"},x=960-100*2,y=620,z=100}
;spvisible "window:load_s",0
;sp "window:log_s",{name={"?　,text2","?ログを表示します,text2"},x=960-80*2,y=620,z=100}
;spvisible "window:log_s",0
;sp "window:config_s",{name={"?　,text2","?設定画面を開きます,text2"},x=960-90*2,y=620,z=100}
;spvisible "window:load_s",0

;■20181215説明文はセルで管理します(20200907セーブ・ロード等変更)
;sp "window:erase_s",{name={"?ウィンドウを消します,text2","?既読スキップします,text2","?自動で読み進めます,text2","?セーブ画面を開きます,text2","?ロード画面を開きます,text2","?ログを表示します,text2","?設定画面を開きます,text2"},x=960-100*2,y=620,z=100}

return

;背景画像のエフェクト
@bg_effect
	;黒背景エフェクト
	bg "bg\black.png",#u,500,"sin_system\ef_02.png"
	window 0
	print #u,500,"sin_system\ef_02.png"
return

;白フラッシュ
@bg_w01_effect
spset "w",0
sp "w:1",{name="*#FFFFFFFF",x=0,y=0,z=0}
print #F,100
wait 150,1
spsetdelete "w"
print #C
return

;----------------------------------------------------
@sin_1hyouzi_01
;１行のみ黒背景
spset "hyouzi",10
sp "hyouzi:setubg",{name="*1280,30,#FF000000",cx=1280/2,cy=720/2,xs=1,ys=1,rot=0,z=100,cell=0}
sp "hyouzi:setu",{name="?"+setumei+",text",cx=1280/2,cy=720/2,z=0}
print #C
click
spdelete "hyouzi:setubg":spdelete "hyouzi:setu"
print #C
return

;-----------------------------------------------------
;		一行ログ
;---------------------------------------------------------------------------------
@sin_log


spset "log",100
%x=420
%y=300
sp "log:7",{name="?"+log[7]+",log_text",x=%x,y=%y-30*6,z=10,a=100}
sp "log:6",{name="?"+log[6]+",log_text",x=%x,y=%y-30*5,z=10,a=150}
sp "log:5",{name="?"+log[5]+",log_text",x=%x,y=%y-30*4,z=10}
sp "log:4",{name="?"+log[4]+",log_text",x=%x,y=%y-30*3,z=10}
sp "log:3",{name="?"+log[3]+",log_text",x=%x,y=%y-30*2,z=10}
sp "log:2",{name="?"+log[2]+",log_text",x=%x,y=%y-30*1,z=10,a=150}
sp "log:1",{name="?"+log[1]+",log_text",x=%x,y=%y,z=10,a=100}

log[7]=log[6]
log[6]=log[5]
log[5]=log[4]
log[4]=log[3]
log[3]=log[2]
log[2]=log[1]

;表示
print #C
return


;----------------------------------------------
;テキストのボタン隠し
;----------------------------------------------
@sin_textw_btn_kakusi
spvisible "window:erase",0
spvisible "window:skip",0
spvisible "window:auto",0
spvisible "window:save",0
spvisible "window:load",0
spvisible "window:log",0
spvisible "window:config",0
spvisible "window:erase_s",0
print #c
return

;テキストのボタン表示
@sin_textw_btn_hyouzi
spvisible "window:erase",1
spvisible "window:skip",1
spvisible "window:auto",1
spvisible "window:save",1
spvisible "window:load",1
spvisible "window:log",1
spvisible "window:config",1
spvisible "window:erase_s",1
print #c
return

;----------------------------------------------
;汎用選択肢(改変推奨)文字選択肢その１戦闘用
;-----------------------------------------------
@sin_select_001
;来る前に設定しておく選択肢
;sin_ssl_kazu	;選択肢の数
;sin_sei[1]〜	;文字選択肢の内容
;sin_return[1]〜	;戻り先指定
spsetvisible "window",1
gosub @sin_textw_btn_kakusi
;■文字消す（シナリオの途中とかでね）
spdelete "window:nametext" ;■名前のタグ消す
spfill "window:text",0,#00000000:print #C	;★バグというか。真ん中に数値入れないとダメ


spset "title",10
;選択肢の位置変数
skip 0

;	sp "title:n",{name={"?"+setu_02+",menu0","?"+setu_02+",menu1"},x=50,y=330+30*2,z=0}
	%name=sin_sei[1]
	sp "title:1",{name={"?"+%name+",text_","?"+%name+",text"},x=sel_x,y=sel_y,z=0}
if sin_ssl_kazu>=2 then
	%name=sin_sei[2]
	sp "title:2",{name={"?"+%name+",text_","?"+%name+",text"},x=sel_x,y=sel_y+35*1,z=0}
endif
if sin_ssl_kazu>=3 then
	%name=sin_sei[3]
	sp "title:3",{name={"?"+%name+",text_","?"+%name+",text"},x=sel_x,y=sel_y+35*2,z=0}
endif
if sin_ssl_kazu>=4 then
	%name=sin_sei[4]
	sp "title:4",{name={"?"+%name+",text_","?"+%name+",text"},x=sel_x,y=sel_y+35*3,z=0}
endif
if sin_ssl_kazu>=5 then
	%name=sin_sei[5]
	sp "title:5",{name={"?"+%name+",text_","?"+%name+",text"},x=sel_x,y=sel_y+35*4,z=0}
endif
	
	print #c
	btnclear "title"
	btn "title:1",{on="S(rpg_sozai\se\sin_click.ogg)"}
	btn "title:2",{on="S(rpg_sozai\se\sin_click.ogg)"}
	btn "title:3",{on="S(rpg_sozai\se\sin_click.ogg)"}
	btn "title:4",{on="S(rpg_sozai\se\sin_click.ogg)"}
	btn "title:5",{on="S(rpg_sozai\se\sin_click.ogg)"}
	@sin_select_001_lp
	btnexec %ret,"title",{wheel=1,func=1}
if %ret=="#F1" then gosub @sin_ss
	if %ret=="1" then spsetdelete "title" : return sin_return[1]
	if %ret=="2" then spsetdelete "title" : return sin_return[2]
	if %ret=="3" then spsetdelete "title" : return sin_return[3]
	if %ret=="4" then spsetdelete "title" : return sin_return[4]
	if %ret=="5" then spsetdelete "title" : return sin_return[5]
if %ret=="log" or %ret==#wu then spsetvisible "title",0:gosub @backlog:spsetvisible "title",1:print #c:goto @sin_select_001_lp	
	goto @sin_select_001_lp
return

;----------------------------------------------
;汎用選択肢(改変推奨)文字選択肢その１ふつう用
;-----------------------------------------------
@sin_select_002
;来る前に設定しておく選択肢
;sin_ssl_kazu	;選択肢の数
;sin_sei[1]〜	;文字選択肢の内容
;sin_return[1]〜	;戻り先指定
spsetvisible "window",1
gosub @sin_textw_btn_hyouzi
;■文字消す（シナリオの途中とかでね）
spdelete "window:nametext" ;■名前のタグ消す
spfill "window:text",0,#00000000:print #C	;★バグというか。真ん中に数値入れないとダメ

spset "title",10
;選択肢の位置変数
skip 0

;■ボタン画像に変更する（20200907文字付きボタンへ変更）縦一列
sp "title:erase", {name="sin_system/window2/winoff_off.png",x=1280-70*1,y=720-26-28*6,z=100};
sp "title:skip",  {name="sin_system/window2/skip_off.png",x=1280-70*1,y=720-26-28*5,z=100};
sp "title:auto",  {name="sin_system/window2/auto_off.png",x=1280-70*1,y=720-26-28*4,z=100};
sp "title:save",  {name="sin_system/window2/save_off.png",x=1280-70*1,y=720-26-28*3,z=100};
sp "title:load",  {name="sin_system/window2/load_off.png",x=1280-70*1,y=720-26-28*2,z=100};
sp "title:log",   {name="sin_system/window2/log_off.png",x=1280-70*1,y=720-26-28*1,z=100};
sp "title:config",{name="sin_system/window2/config_off.png",x=1280-70*1,y=720-26,z=100};

;	sp "title:n",{name={"?"+setu_02+",menu0","?"+setu_02+",menu1"},x=50,y=330+30*2,z=0}
	%name=sin_sei[1]
	sp "title:1",{name={"?"+%name+",text_","?"+%name+",text"},x=sel_x,y=sel_y,z=0}
if sin_ssl_kazu>=2 then
	%name=sin_sei[2]
	sp "title:2",{name={"?"+%name+",text_","?"+%name+",text"},x=sel_x,y=sel_y+35*1,z=0}
endif
if sin_ssl_kazu>=3 then
	%name=sin_sei[3]
	sp "title:3",{name={"?"+%name+",text_","?"+%name+",text"},x=sel_x,y=sel_y+35*2,z=0}
endif
if sin_ssl_kazu>=4 then
	%name=sin_sei[4]
	sp "title:4",{name={"?"+%name+",text_","?"+%name+",text"},x=sel_x,y=sel_y+35*3,z=0}
endif
if sin_ssl_kazu>=5 then
	%name=sin_sei[5]
	sp "title:5",{name={"?"+%name+",text_","?"+%name+",text"},x=sel_x,y=sel_y+35*4,z=0}
endif
if sin_ssl_kazu>=6 then
	%name=sin_sei[6]
	sp "title:6",{name={"?"+%name+",text_","?"+%name+",text"},x=sel_x,y=sel_y+35*5,z=0}
endif
	
	print #c
	btnclear "title"
	btn "title:1",{on="S(rpg_sozai\se\sin_click.ogg)"}
	btn "title:2",{on="S(rpg_sozai\se\sin_click.ogg)"}
	btn "title:3",{on="S(rpg_sozai\se\sin_click.ogg)"}
	btn "title:4",{on="S(rpg_sozai\se\sin_click.ogg)"}
	btn "title:5",{on="S(rpg_sozai\se\sin_click.ogg)"}
	btn "title:6",{on="S(rpg_sozai\se\sin_click.ogg)"}
btn "title:erase",{on="S(rpg_sozai\se\sin_click.ogg)"}
btn "title:skip",{on="S(rpg_sozai\se\sin_click.ogg)"}
btn "title:auto",{on="S(rpg_sozai\se\sin_click.ogg)"}
if kaisou==0 then btn "title:save",{on="S(rpg_sozai\se\sin_click.ogg)"}
if kaisou==0 then btn "title:load",{on="S(rpg_sozai\se\sin_click.ogg)"}
btn "title:log",{on="S(rpg_sozai\se\sin_click.ogg)"}
btn "title:config",{on="S(rpg_sozai\se\sin_click.ogg)"}
	@sin_select_002_lp
	btnexec %ret,"title",{wheel=1,func=1}
if %ret=="#F1" then gosub @sin_ss
	if %ret=="1" then spsetdelete "title" : return sin_return[1]
	if %ret=="2" then spsetdelete "title" : return sin_return[2]
	if %ret=="3" then spsetdelete "title" : return sin_return[3]
	if %ret=="4" then spsetdelete "title" : return sin_return[4]
	if %ret=="5" then spsetdelete "title" : return sin_return[5]
	if %ret=="6" then spsetdelete "title" : return sin_return[6]
if %ret=="erase" or %ret==#r then spsetvisible "title",0:spsetvisible "window",0:spsetvisible "ste",0:print #c:lrclick:spsetvisible "title",1:spsetvisible "window",1:spsetvisible "ste",1:print #c:goto @sin_select_002_lp
if %ret=="save" then gosub @sin_saveload_gets:spsetvisible "title",0:issave=1:gosub @saveload:spsetvisible "title",1:goto @sin_select_002_lp
if %ret=="load" then spsetvisible "title",0:issave=0:gosub @saveload:spsetvisible "title",1:goto @sin_select_002_lp
if %ret=="log" or %ret==#wu then spsetvisible "title",0:gosub @backlog:spsetvisible "title",1:print #c:goto @sin_select_002_lp
if %ret=="config" then spsetvisible "title",0:gosub @config:spsetvisible "title",1:goto @sin_select_002_lp
	goto @sin_select_002_lp
return

;////////////////////////////////////////
@bg_updown
;■背景画像を下から上へ移動させる命令文。基本、デフォルトのbgと同じ。画像の位置が変わるだけ。
for %0=0 to -240	;720から920まで上げるため。
	spmove "bg",0,%0
	print #F,1
next
return

;////////////////////
;	左に説明、右に選択肢というちょっと変わった選択肢
;/////////////////////
@cin_select_r
;■文字消す（シナリオの途中とかでね）
spdelete "window:nametext" ;■名前のタグ消す
spfill "window:text",0,#00000000:print #C	;★バグというか。真ん中に数値入れないと
spset "title",10
;■ボタン画像に変更する（20200907文字付きボタンへ変更）縦一列
sp "title:erase", {name="sin_system/window2/winoff_off.png",x=1280-70*1,y=720-26-28*6,z=100};
sp "title:skip",  {name="sin_system/window2/skip_off.png",x=1280-70*1,y=720-26-28*5,z=100};
sp "title:auto",  {name="sin_system/window2/auto_off.png",x=1280-70*1,y=720-26-28*4,z=100};
sp "title:save",  {name="sin_system/window2/save_off.png",x=1280-70*1,y=720-26-28*3,z=100};
sp "title:load",  {name="sin_system/window2/load_off.png",x=1280-70*1,y=720-26-28*2,z=100};
sp "title:log",   {name="sin_system/window2/log_off.png",x=1280-70*1,y=720-26-28*1,z=100};
sp "title:config",{name="sin_system/window2/config_off.png",x=1280-70*1,y=720-26,z=100};

;★
;%r=str(cin_sp_syu)
;okbox %r,"画像と文字列の分岐"


if cin_sp_syu==1 then
;画像
;%name="chr/00_syu"+".png"
	%name=cin_goto_select[1]
sp "title:01",{name={""+%name+"",""+%name+""},x=sel_x,y=sel_y,z=0}
if sin_sel_kazu>=2 then
	%name=cin_goto_select[2]
sp "title:02",{name={""+%name+"",""+%name+""},x=sel_x,y=sel_y+35*1,z=0}
eneif
if sin_sel_kazu>=3 then
	%name=cin_goto_select[3]
sp "title:03",{name={""+%name+"",""+%name+""},x=sel_x,y=sel_y+35*2,z=0}
endif
if sin_sel_kazu>=4 then
	%name=cin_goto_select[4]
sp "title:04",{name={""+%name+"",""+%name+""},x=sel_x,y=sel_y+35*3,z=0}
endif
if sin_sel_kazu>=5 then
	%name=cin_goto_select[5]
sp "title:05",{name={""+%name+"",""+%name+""}x=sel_x,y=sel_y+35*4,z=0}
endif
if sin_sel_kazu>=6 then
	%name=cin_goto_select[6]
sp "title:06",{name={""+%name+"",""+%name+""},x=sel_x,y=sel_y+35*5,z=0}
endif
if sin_sel_kazu>=7 then
	%name=cin_goto_select[7]
sp "title:07",{name={""+%name+"",""+%name+""},x=sel_x,y=sel_y+35*6,z=0}
endif
endif
endif

;%r=STR(cin_sp_syu)
;okbox %r,"ここで分岐"
;%r=cin_goto_select[1]
;okbox %r,"文字列内容"
;通る？
if cin_sp_syu==0 then
;%r=cin_goto_select[1]
;okbox %r,""

;文字列（汎用のため、選択肢に入れておく）後半改造して、別の文字列入れるのもできる
	%name=cin_goto_select[1]
sp "title:01",{name={"?"+%name+",menu2","?"+%name+",menu1"},x=sel_x,y=sel_y+35*0,z=0}
;%r=str(x)+"/"+str(y)
;okbox %r,""

if sin_sel_kazu>=2 then
	%name=cin_goto_select[2]
sp "title:02",{name={"?"+%name+",menu2","?"+%name+",menu1"},x=sel_x,y=sel_y+35*1,z=0}
endif
if sin_sel_kazu>=3 then
	%name=cin_goto_select[3]
sp "title:03",{name={"?"+%name+",menu2","?"+%name+",menu1"},x=sel_x,y=sel_y+35*2,z=0}
endif
if sin_sel_kazu>=4 then
	%name=cin_goto_select[4]
sp "title:04",{name={"?"+%name+",menu2","?"+%name+",menu1"},x=sel_x,y=sel_y+35*3,z=0}
endif
if sin_sel_kazu>=5 then
	%name=cin_goto_select[5]
sp "title:05",{name={"?"+%name+",menu2","?"+%name+",menu1"},x=sel_x,y=sel_y+35*4,z=0}
endif
if sin_sel_kazu>=6 then
	%name=cin_goto_select[6]
sp "title:06",{name={"?"+%name+",menu2","?"+%name+",menu1"},x=sel_x,y=sel_y+35*5,z=0}
endif
if sin_sel_kazu>=7 then
	%name=cin_goto_select[7]
sp "title:07",{name={"?"+%name+",menu2","?"+%name+",menu1"},x=sel_x,y=sel_y+35*6,z=0}
endif
endif
endif
endif
;★
;%r=str(cin_sp_syu)
;okbox %r,"画像と文字列の分岐"


;Pに置く絵などのスプライト(絵は仮です)
%name="chr/00_syu.png"
sp "title:a01a",{name=""+%name+"",x=100,y=200,z=0}
%name="chr/00_syu.png"
sp "title:a02a",{name=""+%name+"",x=10,y=250,z=0}
%name="chr/00_syu.png"
sp "title:a03a",{name=""+%name+"",x=50,y=250,z=0}
%name="chr/00_syu.png"
sp "title:a04a",{name=""+%name+"",x=70,y=250,z=0}
%name="chr/00_syu.png"
sp "title:a05a",{name=""+%name+"",x=30,y=250,z=0}
%name="chr/00_syu.png"
sp "title:a06a",{name=""+%name+"",x=10,y=300,z=0}
%name="chr/00_syu.png"
sp "title:a07a",{name=""+%name+"",x=20,y=250,z=0}
;ここは非表示にするので、一括で。
for %0=1 to 10
%name="title:a0"+str(%0)+"a"
spvisible %name,0
next
;for %0=1 to 10
;%name="title:0"+str(%0)
;spvisible %name,1
;next
;-------------------------------以下、なるはず。
print #c

btnclear "title"
;Pに説明などのスプライト入れる
btn "title:01",{on="S(rpg_sozai\se\sin_click.ogg)P(title:a01a,1)",off="C(title:a01a)"}
btn "title:02",{on="S(rpg_sozai\se\sin_click.ogg)P(title:a02a,1)",off="C(title:a02a)"}
btn "title:03",{on="S(rpg_sozai\se\sin_click.ogg)P(title:a03a,1)",off="C(title:a03a)"}
btn "title:04",{on="S(rpg_sozai\se\sin_click.ogg)P(title:a04a,1)",off="C(title:a04a)"}
btn "title:05",{on="S(rpg_sozai\se\sin_click.ogg)P(title:a05a,1)",off="C(title:a05a)"}
btn "title:06",{on="S(rpg_sozai\se\sin_click.ogg)P(title:a06a,1)",off="C(title:a06a)"}
btn "title:07",{on="S(rpg_sozai\se\sin_click.ogg)P(title:a07a,1)",off="C(title:a07a)"}
btn "title:erase",{on="S(rpg_sozai\se\sin_click.ogg)"}
btn "title:skip",{on="S(rpg_sozai\se\sin_click.ogg)"}
btn "title:auto",{on="S(rpg_sozai\se\sin_click.ogg)"}
if kaisou==0 then btn "title:save",{on="S(rpg_sozai\se\sin_click.ogg)"}
if kaisou==0 then btn "title:load",{on="S(rpg_sozai\se\sin_click.ogg)"}
btn "title:log",{on="S(rpg_sozai\se\sin_click.ogg)"}
btn "title:config",{on="S(rpg_sozai\se\sin_click.ogg)"}

@cin_select_r_lp
btnexec %ret,"title",{func=1}
if %ret=="#F1" then gosub @sin_ss
;以下、結果。結果後どこに帰るか、変数に入れておくと楽。
if %ret=="01" then spsetdelete "title" : goto cin_goto[1]
if %ret=="02" then spsetdelete "title" : goto cin_goto[2]
if %ret=="03" then spsetdelete "title" : goto cin_goto[3]
if %ret=="04" then spsetdelete "title" : goto cin_goto[4]
if %ret=="05" then spsetdelete "title" : goto cin_goto[5]
if %ret=="06" then spsetdelete "title" : goto cin_goto[6]
if %ret=="07" then spsetdelete "title" : goto cin_goto[7]

if %ret=="erase" or %ret==#r then spsetvisible "title",0:spsetvisible "window",0:spsetvisible "ste",0:print #c:lrclick:spsetvisible "title",1:spsetvisible "window",1:spsetvisible "ste",1:print #c:goto @cin_select_r_lp
if %ret=="save" then gosub @sin_saveload_gets:spsetvisible "title",0:issave=1:gosub @saveload:spsetvisible "title",1:goto @cin_select_r_lp
if %ret=="load" then spsetvisible "title",0:issave=0:gosub @saveload:spsetvisible "title",1:goto @cin_select_r_lp
if %ret=="log" or %ret==#wu then spsetvisible "title",0:gosub @backlog:spsetvisible "title",1:print #c:goto @cin_select_r_lp
if %ret=="config" then spsetvisible "title",0:gosub @config:spsetvisible "title",1:goto @cin_select_r_lp
goto @cin_select_r_lp

;/////////////////////////////////////////////////////////////////////





