;cmdline(起動オプション)を先に読むがリストがあればそっち優先でcmdline無視 if cmdline!="" : exe_file=cmdline : else : exe_file="CardWirth.exe" exist"list.txt" : if strsize>0 : size=strsize : goto *load_file *main ;ファイルの有無チェック exist exe_file if strsize=-1{ dialog"実行ファイル"+exe_file+"がありません",1,"CardWirth not found" end } ;変更してウィンドウ作成 bgscr 2,634,474,2,3,3 : color 255,255,255 : boxf 0,0,winx,winy chgdisp 3 title"CardWirth on 640x480" : color 0,0,0 : pos 10,10 ;ウィンドウ出してCW起動 gsel 2,1 : exec exe_file : wait 200 mes"ゲームを終了してもフルスクリーンが解除されない場合は" mes"下のボタンを押してプログラムを終了させて下さい" button"終了",*en *playing ;アクティブになったら終了処理 ginfo 1 if prmx=-1 : wait 1 : goto *playing *en chgdisp 0 end ;リストがある場合の処理 *load_file sdim file,size : bload"list.txt",file,size : notesel file : notemax max sdim list,size : sdim path,size/max,max : sdim list,size : d=0 repeat max if max<=0{ dialog"リストの全ての行が正常に読み込めませんでした\n起動オプションの確認と通常起動を行いますか?",3,"確認" if stat=6 : goto *main : else : end }else{ if cnt>=max { break } } noteget data,cnt : c=-1 : d+ : strlen a,data repeat a strmid b,data,cnt,2 if b="<>" : c=cnt : break loop if c=-1{ dialog"書式エラーのため以下の行を無視します\n"+d+"行目:"+data,1,"error" notedel cnt : max- : continue cnt } strmid b,data,0,c : strmid path.cnt,data,c+2,a-c-2 list+=""+b+"\n" loop ginfo 0 : screen 0,260,21,0,prmx,prmy : title"CardWirth on 640x480" objmode 2,1 : font"",15 pos 0,0 : objsize 200 : combox n,100,list pos 200,1 : objsize 60,20 : button"起動",*select gsel 0,1 stop *select gsel 0,-1 exe_file=path.n goto *main