mirror of
https://github.com/rvtr/TwlToolsRED.git
synced 2025-10-31 06:41:18 -04:00
マスタエディタ:TAD読み込みに失敗したときに以前に読み込んだSRL/TADの出力が正常にできなくなるバグを修正。
git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlToolsRED@85 7061adef-622a-194b-ae81-725974e89856
This commit is contained in:
parent
61382fffd2
commit
dc017fc811
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -29,18 +29,22 @@ using namespace MasterEditorTWL;
|
|||||||
System::Boolean Form1::loadRom( System::String ^infile )
|
System::Boolean Form1::loadRom( System::String ^infile )
|
||||||
{
|
{
|
||||||
System::Boolean result = false;
|
System::Boolean result = false;
|
||||||
this->IsLoadTad = false;
|
|
||||||
if( System::IO::Path::GetExtension( infile )->ToUpper()->Equals( ".TAD" ) ) // 拡張子で判別
|
if( System::IO::Path::GetExtension( infile )->ToUpper()->Equals( ".TAD" ) ) // 拡張子で判別
|
||||||
{
|
{
|
||||||
result = this->loadTad( infile );
|
result = this->loadTad( infile );
|
||||||
if( result )
|
if( result )
|
||||||
{
|
{
|
||||||
this->IsLoadTad = true;
|
this->IsLoadTad = true; // 成功したときのみでないと次のTADの読み込みに失敗したときに
|
||||||
|
// リードフラグの情報が初期化されて失われてしまう
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
result = this->loadSrl( infile );
|
result = this->loadSrl( infile );
|
||||||
|
if( result )
|
||||||
|
{
|
||||||
|
this->IsLoadTad = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -76,14 +80,9 @@ System::Boolean Form1::loadTad( System::String ^tadfile )
|
|||||||
{
|
{
|
||||||
// tadファイルを変換したSRLを一時ファイルに保存
|
// tadファイルを変換したSRLを一時ファイルに保存
|
||||||
System::String ^srlfile = this->getSplitTadTmpFilename();
|
System::String ^srlfile = this->getSplitTadTmpFilename();
|
||||||
if( System::IO::File::Exists( srlfile ) )
|
if( splitTad( tadfile, srlfile ) != 0 ) // 上書きで保存
|
||||||
{
|
|
||||||
System::IO::File::Delete( srlfile ); // すでに存在する場合は削除(連続に読み込んだ場合に起こりうる)
|
|
||||||
}
|
|
||||||
if( splitTad( tadfile, srlfile ) != 0 )
|
|
||||||
{
|
{
|
||||||
this->errMsg( "TADファイルの読み出しに失敗しました。", "Reading TAD file failed." );
|
this->errMsg( "TADファイルの読み出しに失敗しました。", "Reading TAD file failed." );
|
||||||
System::IO::File::Delete( srlfile );
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
System::Boolean result = this->loadSrl( srlfile ); // 一時保存したSRLを読み込み
|
System::Boolean result = this->loadSrl( srlfile ); // 一時保存したSRLを読み込み
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user