function GetFile( title, filename, kakucho )
{
	var	input_file, temp, warning_flag = ON;
	var	i, ele[3];

	if( MACHINE != "WINDOWS" )
	{
		DlogOpen( title, 1 );
		DlogString( 0, "ファイル名", filename, 40 );
		i = DlogWait();
		if( i == 0 )
			return FALSE;
		input_file = MakeFile( DlogAnswer( 0 ), kakucho );
	}
	else
	{
		var t[MAXFILETYPE], i0, ff;
		for (i = 0; i < MAXFILETYPE; i++) {
			t[i] = "";
		}
		if (kakucho == "")
		{
			i0 = 0;
			temp = "";
			if (filename == "")
				ff = FILEFUNC_LOAD;
			else
				ff = FILEFUNC_SAVE;
			
			for (i = 0; i < filefuncs; i++) {
				if (typeof(filefunc[i][ff]) == FUNC)
				{
					t[i0] = filefunc[i][FILEFUNC_COMMENT];
					if (i0 < MAXFILETYPE-1) {
						i0++;
					}
				}
			}
			temp = t[0];
		}
		else if( toupper( kakucho ) == "SUF" )
			temp = "形状ファイル(*.SUF)";
		else if( toupper( kakucho ) == "ATR" )
			temp = "アトリビュートファイル(*.ATR)";
		else if( toupper( kakucho ) == "FSC" )
			temp = "メカデザインデータ(*.FSC)";
		else if( toupper( kakucho ) == "INI" )
			temp = "設定ファイル(*.INI)";
		else if( toupper( kakucho ) == "RSD" )
			temp = "秘密のファイル(*.RSD)";
		else
			temp = "すべてのファイル(*.*)";
		if( filename == "" )
			input_file = DlogFileOpen( title, "", temp, t[1], t[2], t[3], t[4], t[5], t[6], t[7] );
		else
			input_file = DlogFileOpen( title, filename, temp, t[1], t[2], t[3], t[4], t[5], t[6], t[7] );
	}
	if( input_file == "" )
	{
		Warning();
		return FALSE;
	}
	return input_file;
}

//
//	形状セーブ関数
//
function _SaveSuf( filename, savefile_org, obj_flag )
{
	var	i, num;
	var	flag = OFF;
	var	temp1, temp2;
	var	ele[3], savefile;

	temp2 = fullpath(MakeFile( filename, ".suf"));
	savefile = fullpath( MakeFile( savefile_org, ".suf" ));
	num = Objects();
	for( i = 0; i< num; i++ )
	{
		temp1 = toupper( fullpath(MakeFile( ObjFile(i), ".suf")));
		if( temp1 == toupper(temp2))
		{
			SelectObj( i, TRUE, SELECT_UPDATE );
			ObjFile( i , savefile);
			if( obj_flag == TRUE )
			{
				Bunkai( savefile_org, ele );
				ObjName( i, ele[1] );
			}
			if( SelectPolygons() != 0 )
			{
				if( flag == OFF )
				{
					WriteFile( i, FILE_OVERWRITE );
					flag = ON;
				}
				else
					WriteFile( i, FILE_APPEND );
			}
			else
			{
				Message( "オブジェクト " + ObjName(i) + "\n"+
					 "には、面が存在しないのでセーブしません。" );
			}
			ObjEdit( i, FALSE );
		}
	}
}

//
//	アトリセーブ関数
//
function _SaveAtr( filename, savefile )
{
	var	i, num;
	var	flag = OFF;
	var	temp1, temp2;
	var	sel1, sel2;

	sel1 = Select();
	SelectAll( TRUE );
	sel2 = Select();
	PolyInvisible( FALSE );
	temp2 = fullpath(MakeFile(filename,".atr"));
	savefile = fullpath( MakeFile( savefile, ".atr" ));
	num = Attrs();
	for( i = 0; i< num; i++ )
	{
		if( AttrFile(i) != "" )
			temp1 = toupper( fullpath(MakeFile( AttrFile(i), ".atr")));
		else
			temp1 = "";
		if(( temp1 == toupper(temp2) ) | ( temp1 == "" ))
		{
			if( flag == OFF )
				AttrWriteFile( savefile, i, FILE_OVERWRITE );
			else
				AttrWriteFile( savefile, i, FILE_APPEND );
			flag = ON;
		}
		else
		{
			SelectAttr( i, TRUE, SELECT_UPDATE );
			if( SelectPolygons() != 0 )
			if( flag == OFF )
				AttrWriteFile( savefile, i, FILE_OVERWRITE );
			else
				AttrWriteFile( savefile, i, FILE_APPEND );
			flag = ON;
		}
	}
	Select( sel2 );
	PolyInvisible( invisible_flag );
	Select( sel1 );
}

//
//	新規作成
//
function NewData()
{
	var	i, uv[2][2];
	var	flag = OFF;

	for( i = 0; i< Objects();i++ )
	{
		if( ObjEdit( i ))
		{
			flag = TRUE;
			break;
		}
	}
	if( flag )
	{
		Warning();
		DlogOpen( "", 1, "ｷｬﾝｾﾙ " ,"いいえ"," はい " );
		DlogMessage( 0, "データが変更されています。保存しますか？" );
		i = DlogWait();
		if( i == 0 )
			return;
		else if(( i == 2 ) | ( i == RET ))
			SaveAll();
	}
	PolyInvisible( FALSE );
	SelectAll( TRUE, SELECT_UPDATE );
	if( SelectPolygons != 0 )
		PolyDelete();
	while( Objects() > 0 )
		ObjDelete( 0 );
	while( Attrs() > 0 )
		AttrDelete( 0 );
	ObjAppend( default_objname, default_filename );
	AttrAppend( default_atrname, default_atrcode );
	AttrFile( 0, default_atrfile );
	if( EXPERT != TRUE )
	{
		AttrMap( 0, TRUE );
		AttrMapFile( 0, MAPPINGFILE );
		uv[0] = {0,0};
		uv[1] = {MAPWIND-1, MAPWIND-1};
		SetAttrMapWind( 0, uv[0], uv[1] );
		uv[0] = {0,0};
		uv[1] = {UVmax,UVmax};
		SetAttrMapSize( 0, uv[0], uv[1] );
	}
	UpdateObject();
	UpdateAttribute();
	AllInit();
	Polygon();
}

function private _LoadSufFile( filename )
{
	var	i, j, k, temp, temp2, flag = OFF;
	var	key, sel1, sel2, temp_sel, old_max, deleteflag[MAXOBJECT];


	temp = fullpath( filename );
	for( i = 0; i< Objects(); i++ )
	{
		temp2 = fullpath( ObjFile( i ));
		if( toupper(temp2) == toupper(temp) )
		{
			flag = TRUE;
			break;
		}
	}
	if( flag == TRUE )
	{
		flag = FALSE;
		for( i = 0; i< Objects(); i++ )
		{
			if( toupper(temp) == toupper( fullpath(ObjFile(i))))
			{
				if( ObjEdit(i) == TRUE )
				{
					flag = TRUE;
					break;
				}
			}
		}
		if( flag == TRUE )
		{
			Warning();
			DlogOpen( "", 2 , "いいえ", "はい" );
			DlogMessage( 0, "ファイルはすでに読み込まれています。" );
			DlogMessage( 1, "編集中のデータを破棄しますか？" );
			key = DlogWait();
			if( key == 0 )
				return FALSE;
		}
		SelectAll( TRUE );
		sel2 = Select();
		PolyInvisible( FALSE );
		i = 0;
		while( i < Objects() )
		{
			if( toupper( temp) == toupper( fullpath( ObjFile(i))))
			{
				SelectObj( i, TRUE, SELECT_UPDATE );
				temp_sel = Select();
				Select( sel2 );
				PolyDelete( temp_sel );
				sel2 = Select();
				ObjDelete( i );
			}
			else
				i++;
		}
		Select( sel2 );
		PolyInvisible( invisible_flag );
	}
	flag = FALSE;
	old_max = Objects();
	j = 0;
	ReadFile( temp, OBJ_CREATE );
	for( i = old_max; i< Objects(); i++ )
	{
		k = ObjSearch( ObjName( i ));
		if(( k<old_max ) & ( k >= 0 ))
		{
			DlogOpen( "データの上書きを確認", 3, "読み込み中止", "元データを破棄", "新規データを破棄" );
			DlogMessage( 0, "読み込みファイル "+temp );
			DlogMessage( 1, "中に編集中のオブジェクト "+ObjName( i ) );
			DlogMessage( 2, "と同名のオブジェクトが存在します。どうしますか" );
			key = DlogWait();
			if( key == 0 )
			{
				PolyDelete();
				return FALSE;
			}
			else if( key == 1 )
			{
				deleteflag[j] = k;
				j++;
			}
			else
			{
				deleteflag[j] = i;
				j++;
			}
		}
	}
	sel1 = Select();
	for( k = 0; k< j; k++ )
	{
		temp = 0;
		for( i = 0; i< j; i++ )
		{
			if( deleteflag[temp] < deleteflag[i] )
				temp = i;
		}
		SelectObj( deleteflag[temp], TRUE, SELECT_UPDATE );
		temp_sel = Select();
		Select( sel1 );
		PolyDelete( temp_sel );
		sel1 = Select();
		ObjDelete( deleteflag[temp] );
		deleteflag[temp] = -1;
	}
	return TRUE;
}

//
//拡張子から判断して、それらしい形式からファイルを読み込む関数
//
function LoadAnyFile(filename)
{
	var ele[3], i;
	Bunkai( filename, ele );
	for (i = 0; i < filefuncs; i++) {
		if (toupper(ele[2]) == filefunc[i][FILEFUNC_EXT])
			if (typeof(filefunc[i][FILEFUNC_LOAD]) == FUNC)
				break;
	}
	if (i == MAXFILETYPE) {
		Message( "ファイル形式が不明です: *." + ele[2]);
		return FALSE;
	}
	if (call(filefunc[i][FILEFUNC_LOAD], filename) == FALSE) {
		return FALSE;
	}
	return TRUE;
}


function private _Load( atr_flag )
{
	var filename, flag, temp;
	if (filefuncs <= 1)
		filename = GetFile( "データロード", "", "suf" );
	else
		filename = GetFile( "データロード", "", "" );
	if( typeof( filename ) == BOOLEAN )
		return;
	if( access( filename ) == FALSE )
	{
		Warning();
		Message( "ファイルが存在しません" );
		return FALSE;
	}
	if (filefuncs <= 1)
		flag = _LoadSufFile(filename);
	else
		flag = LoadAnyFile(filename);
	if (flag == FALSE)
		return FALSE;

	if( atr_flag == TRUE )
	{
		filename = MakeFile( substr( filename, ( !filename - 4 )), ".atr" );
		if( access( filename ))
			AttrReadFile( filename );
	}

	temp = Objects() -1;
	ObjCurrent( temp );
	UpdateObject();
	UpdateAttribute();
	Update( CLEAR );
	return TRUE;
}



function _Close( filename, name_flag)
{
	var	temp, i, flag = FALSE;
	var	sel1, sel2;

	for( i = 0; i< Objects();i++ )
	{
		if( filename == toupper( fullpath( ObjFile( i ))))
		{
			if( ObjEdit( i ))
			{
				flag = TRUE;
				break;
			}
		}
	}
	if( flag & name_flag )
	{
		Warning();
		DlogOpen( "", 1,"ｷｬﾝｾﾙ ","いいえ"," はい " );
		DlogMessage( 0, "データが変更されています。保存しますか？" );
		i = DlogWait();
		if( i == 0 )
			return;
		else if( ( i == 2 )| (i == RET ))
		{
			_SaveSuf( filename, filename, FALSE );
			if( EXPERT != TRUE )
			{
				temp = substr( filename, ( !filename -4 ));
				_SaveAtr( temp, temp );
			}
		}
	}
	sel1 = Select();
	SelectAll( TRUE );
	sel2 = Select();
	PolyInvisible( FALSE );
	i = 0;
	while( i < Objects())
	{
		if( filename == toupper( fullpath( ObjFile( i ))))
		{
			SelectObj( i, TRUE, SELECT_UPDATE );
			sel1 = sel1 & (!Select());
			sel2 = sel2 & (!Select());
			PolyDelete();
			ObjDelete( i );
		}
		else
			i++;
	}
	Select( sel2 );
	PolyInvisible( invisible_flag );
	Select( sel1 );
}

function _Save( atr_flag )
{
	var	sel1, sel2, temp;

	sel1 = Select();
	SelectAll( TRUE );
	sel2 = Select();
	PolyInvisible( FALSE );
	temp = ObjFile( ObjCurrent());
	_SaveSuf( temp, temp, FALSE );
	if( atr_flag == TRUE )
	{
		temp = substr( temp, (!temp - 4));
		_SaveAtr( temp, temp );
	}
	Select( sel2 );
	PolyInvisible( invisible_flag );
	Select( sel1 );
	UpdateObject();
}

function _SaveSufFile(filename)
{
	_SaveSuf( ObjFile(ObjCurrent()), filename, FALSE );
}

//
//拡張子から判断して、それらしい形式でファイルを出力する関数
//
function SaveAnyFile(filename)
{
	var i, ele[3];

	Bunkai( filename, ele );
	for (i = 0; i < filefuncs; i++) {
		if (toupper(ele[2]) == filefunc[i][FILEFUNC_EXT])
			if (typeof(filefunc[i][FILEFUNC_SAVE]) == FUNC)
				break;
	}
	if (i == MAXFILETYPE) {
		Message( "ファイル形式が不明です: *." + ele[2]);
		return FALSE;
	}
	return call(filefunc[i][FILEFUNC_SAVE], filename);
}

function _Saveas( atr_flag )
{
	var	sel1, sel2, temp, filename;

	sel1 = Select();
	SelectAll( TRUE );
	sel2 = Select();
	PolyInvisible( FALSE );
	temp = ObjFile( ObjCurrent());
	if( atr_flag == TRUE )
	{
		filename = GetFile( "データセーブ", temp, "suf" );
		if( typeof( filename ) == BOOLEAN )
			return;
		_SaveSuf( temp, filename, TRUE );
		temp = substr( temp, (!temp - 4));
		filename = substr( filename, (!filename - 4));
		_SaveAtr( temp, filename );
	}
	else
	{
//		_SaveSuf( temp, filename, FALSE );
		if (filefuncs <= 1)
		{
			filename = GetFile( "データセーブ", temp, "suf" );
			if( typeof( filename ) == BOOLEAN )
				return;
			_SaveSuf( temp, filename, FALSE );
		}
		else
		{
			filename = GetFile( "データセーブ", temp, "" );
			if( typeof( filename ) == BOOLEAN )
				return;
			SaveAnyFile(filename);
		}
	}
	Select( sel2 );
	PolyInvisible( invisible_flag );
	Select( sel1 );
	UpdateObject();
}

function _SaveAll( atr_flag )
{
	var const	maxfilenumber = 64;
	var	i, j, k=0, num;
	var	sel1, sel2;
	var	temp, filename[maxfilenumber];
	var	flag;

	num = Objects();
	for( i = 0; i< num ; i++ )
	{
		if( ObjEdit( i ) == TRUE )
		{
			temp = ObjFile( i );
			flag = TRUE;
			for( j= 0; j< k; j++ )
			{
				if( filename[j] == temp )
					flag = FALSE;
			}
			if( flag == TRUE )
			{
				filename[k] = temp;
				k++;
			}
		}
	}

	sel1 = Select();
	SelectAll( TRUE );
	sel2 = Select();
	PolyInvisible( FALSE );
	for( i = 0; i< k; i++ )
	{
		_SaveSuf( filename[i], filename[i], FALSE );
		if( atr_flag == TRUE )
		{
			temp = substr( filename[i], (!filename[i] - 4));
			_SaveAtr( temp, temp );
		}
	}
	Select( sel2 );
	PolyInvisible( invisible_flag );
	Select( sel1 );
	UpdateObject();
	return TRUE;
}

//
//	子プロセス
//
function Shell()
	Child( getenv( "COMSPEC" ) );

//
//	終了
//
function QuitModel()
{
	var	i;
	var	flag = OFF, return_flag = TRUE;

	for( i = 0; i< Objects();i++ )
	{
		if( ObjEdit( i ))
		{
			flag = TRUE;
			break;
		}
	}
	if( flag )
	{
		Warning();
		DlogOpen( "", 1,"ｷｬﾝｾﾙ ","いいえ"," はい " );
		DlogMessage( 0, "データが変更されています。保存しますか？" );
		i = DlogWait();
		if( i == 0 )
			return_flag =  FALSE;
		else if(( i == 2 ) | ( i == RET ))
		{
			if( EXPERT != TRUE )
				return_flag = _SaveAll( TRUE );
			else
				return_flag = _SaveAll( FALSE );
		}
	}
	if( return_flag == TRUE )
	{
		Quit();
		return TRUE;
	}
	else
		return FALSE;
}

function LoadAtr()
{
	var	filename, temp;
	var	old_max, i, j, k, key;
	var	copyflag[MAXATTR], deleteflag[MAXATTR];

	filename = GetFile( "データロード", "", "atr" );
	if( typeof( filename ) == BOOLEAN )
		return;
	temp = fullpath( filename );
	if( access( filename ) == FALSE )
	{
		Warning();
		Message( "ファイルが存在しません" );
		return FALSE;
	}

	old_max = Attrs();
	AttrReadFile( temp, ATTR_CREATE );
	for( i = old_max; i< Attrs(); i++ )
	{
		k = AttrSearch( AttrName( i ));
		if(( k<old_max ) & ( k >= 0 ))
		{
			if( AttrFile( k ) == "" )
			{
				copyflag[i] = k;
				deleteflag[i] = k;
			}
			else
			{
				DlogOpen( "データの上書きを確認", 3, "読み込み中止", "元データを破棄", "新規データを破棄" );
				DlogMessage( 0, "読み込みファイル "+temp );
				DlogMessage( 1, "中に編集中のアトリビュート "+AttrName( i ) );
				DlogMessage( 2, "と同名のアトリビュートが存在します。どうしますか" );
				key = DlogWait();
				if( key == 0 )
				{
					while( old_max < Attrs() )
						AttrDelete( old_max );
					return FALSE;
				}
				else if( key == 1 )
				{
					copyflag[i] = k;
					deleteflag[i] = k;
				}
				else
				{
					copyflag[i] = k;
					deleteflag[i] = i;
				}
			}
		}
		else
		{
			copyflag[i] = i;
			deleteflag[i] = i;
		}
	}
	for( i = old_max; i< Attrs(); i++ )
	{
		if( copyflag[i] != i )
		{
			if( deleteflag[i] == i )
			{
				AttrFile( copyflag[i], temp );
				AttrCopy( copyflag[i], i );
			}
			else
			{
				AttrFile( copyflag[i], temp );
				AttrCopy( i, copyflag[i] );
			}
		}
		if( copyflag[i] != i )
			AttrName( i, "" );
	}
	j = 0;
	while( j < Attrs() )
	{
		if( AttrName( j ) == "" )
			AttrDelete( j );
		else
			j++;
	}
	UpdateAttribute();
	Update( OVERWRITE );
}

function _SaveAtrforExpert( file, savefile )
{
	var	i, org, savename, temp, flag = FALSE;

	if( file != "" )
		org = toupper(fullpath( file ));
	else
		org = "";
	savename = fullpath( savefile );
	for( i = 0; i< Attrs(); i++ )
	{
		if( AttrFile( i ) != "" )
			temp = toupper(fullpath(AttrFile( i )));
		else
			temp = "";
		if( temp == org )
		{
			AttrFile( i , savename );
			if( flag == TRUE )
				AttrWriteFile( savename, i, FILE_APPEND );
			else
			{
				AttrWriteFile( savename, i, FILE_OVERWRITE );
				flag = TRUE;
			}
		}
	}
}

function Load()
	_Load( TRUE );

function Close()
{
	_Close( toupper( fullpath( ObjFile( ObjCurrent()))), TRUE);
	if( Objects() == 0 )
		Quit();
	else
	{
		UpdateObject();
		Update( CLEAR );
	}
}

function LoadSuf()
	_Load( FALSE );

function Save()
	_Save( TRUE );

function SaveSuf()
	_Save( FALSE );

function Saveas()
	_Saveas( TRUE );

function SaveasSuf()
	_Saveas( FALSE );

function SaveAll()
	_SaveAll( TRUE );

function SaveAllSuf()
	_SaveAll( FALSE );

function SaveasAtr()
{
	var	temp, filename;

	temp = AttrFile( AttrCurrent());
	filename = GetFile( "データセーブ", temp, "atr" );
	if( typeof( filename ) == BOOLEAN )
		return;
	_SaveAtrforExpert( temp, filename );
}

function SaveAtr()
{
	var	temp;
	temp = AttrFile( AttrCurrent() );
	if( temp == "" )
	{
		Warning();
		Message( "ファイル名が設定されていないので、\n"+
			 "セーブできませんでした。" );
		return;
	}
	_SaveAtrforExpert( temp, temp );
}

//
//	ファイルメニュー
//
if( MACHINE == "WINDOWS" )
{
	if( EXPERT != TRUE )
	{
		MenuPosition(
				Menu( "ﾌｧｲﾙ(&F)",
				"新規作成(&N)         ",	NewData,
				"---------------------",	SEPARATE_MENU,
//				"DOGA-L1のﾊﾟｰﾂを新規作成",	NewDataforGENIE,
//				"---------------------",	SEPARATE_MENU,
				"開く...(&O)          ",	Load,
				"閉じる(&C)           ",	Close,
				"---------------------",	SEPARATE_MENU,
//				"ﾒｶﾃﾞｻﾞｲﾝﾃﾞｰﾀを開く...",	LoadMecha,
//				"---------------------",	SEPARATE_MENU,
				"上書き保存           ",	Save,
				"名前を付けて保存...(&A)",	Saveas,
				"すべて保存(&S)       ",	SaveAll,
				"---------------------",	SEPARATE_MENU,
//				"DOGA-L1のﾊﾟｰﾂを登録...",	InstallParts,
//				"---------------------",	SEPARATE_MENU,
				"終了(&X)　           ",	QuitModel
			), Menu_file
		);
	}
	else
	{
		MenuPosition(
			Menu( "ﾌｧｲﾙ(&F)",
				"新規作成(&N)           ",	NewData,
				"-----------------------",	SEPARATE_MENU,
//				"DOGA-L1のﾊﾟｰﾂを新規作成",	NewDataforGENIE,
//				"---------------------",	SEPARATE_MENU,
				"ｵﾌﾞｼﾞｪｸﾄを開く...(&O)  ",	LoadSuf,
				"ｵﾌﾞｼﾞｪｸﾄを閉じる(&C)   ",	Close,
				"-----------------------",	SEPARATE_MENU,
//				"ﾒｶﾃﾞｻﾞｲﾝﾃﾞｰﾀを開く...  ",	LoadMecha,
//				"-----------------------",	SEPARATE_MENU,
				"ｱﾄﾘﾋﾞｭｰﾄを開く...      ",	LoadAtr,MENU_ENABLE,
				"-----------------------",	SEPARATE_MENU,
				"ｵﾌﾞｼﾞｪｸﾄを保存　　　　 ",	SaveSuf,MENU_ENABLE,
				"ｵﾌﾞｼﾞｪｸﾄを別名で保存...(&A)",	SaveasSuf,MENU_ENABLE,
				"ｵﾌﾞｼﾞｪｸﾄを全て保存(&S) ",	SaveAllSuf,MENU_ENABLE,
				"-----------------------",	SEPARATE_MENU,
				"ｱﾄﾘﾋﾞｭｰﾄを保存         ",	SaveAtr,MENU_ENABLE,
				"ｱﾄﾘﾋﾞｭｰﾄを別名で保存...",	SaveasAtr,MENU_ENABLE,
//				"ｱﾄﾘﾋﾞｭｰﾄを全て保存     ",	SaveAllAtr,MENU_ENABLE,
				"-----------------------",	SEPARATE_MENU,
//				"DOGA-L1のﾊﾟｰﾂを登録... ",	InstallParts,
//				"-----------------------",	SEPARATE_MENU,
				"終了(&X)　          　 ",	QuitModel
			), Menu_file
		);
	}
}
else
{
		MenuPosition(
			Menu( "ﾌｧｲﾙ(&F)",
				"新規作成　　           ",	NewData,
				"-----------------------",	SEPARATE_MENU,
				"ｵﾌﾞｼﾞｪｸﾄを開く...      ",	LoadSuf,
				"ｵﾌﾞｼﾞｪｸﾄを閉じる       ",	Close,
				"-----------------------",	SEPARATE_MENU,
				"ｱﾄﾘﾋﾞｭｰﾄを開く...      ",	LoadAtr,MENU_ENABLE,
				"-----------------------",	SEPARATE_MENU,
				"ｵﾌﾞｼﾞｪｸﾄを保存　　　　 ",	SaveSuf,MENU_ENABLE,
				"ｵﾌﾞｼﾞｪｸﾄを別名で保存...",	SaveasSuf,MENU_ENABLE,
				"ｵﾌﾞｼﾞｪｸﾄを全て保存     ",	SaveAllSuf,MENU_ENABLE,
				"-----------------------",	SEPARATE_MENU,
				"ｱﾄﾘﾋﾞｭｰﾄを保存         ",	SaveAtr,MENU_ENABLE,
				"ｱﾄﾘﾋﾞｭｰﾄを別名で保存...",	SaveasAtr,MENU_ENABLE,
//				"ｱﾄﾘﾋﾞｭｰﾄを全て保存     ",	SaveAllAtr,MENU_ENABLE,
				"-----------------------",	SEPARATE_MENU,
				"子プロセス　           ",	Shell,
				"-----------------------",	SEPARATE_MENU,
				"終了    　          　 ",	QuitModel
			), Menu_file
		);
}
filefunc[filefuncs][FILEFUNC_EXT] = "SUF";
filefunc[filefuncs][FILEFUNC_LOAD] = _LoadSufFile;
filefunc[filefuncs][FILEFUNC_SAVE] = _SaveSufFile;
filefunc[filefuncs][FILEFUNC_COMMENT] = "形状ファイル(*.SUF)";
filefuncs++;

