Fixed mission description loading
parent
106ec014b8
commit
5223ef1fb1
|
@ -4852,7 +4852,6 @@ void CMainDialog::UpdateSceneChap(int &chap)
|
||||||
|
|
||||||
void CMainDialog::UpdateSceneList(int chap, int &sel)
|
void CMainDialog::UpdateSceneList(int chap, int &sel)
|
||||||
{
|
{
|
||||||
FILE* file = NULL;
|
|
||||||
CWindow* pw;
|
CWindow* pw;
|
||||||
CList* pl;
|
CList* pl;
|
||||||
std::string fileName;
|
std::string fileName;
|
||||||
|
@ -4947,6 +4946,7 @@ void CMainDialog::UpdateSceneList(int chap, int &sel)
|
||||||
#endif*/
|
#endif*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* TODO: ?????
|
||||||
BuildSceneName(fileName, m_sceneName, (chap+1)*100+(j+1));
|
BuildSceneName(fileName, m_sceneName, (chap+1)*100+(j+1));
|
||||||
file = fopen(fileName.c_str(), "r");
|
file = fopen(fileName.c_str(), "r");
|
||||||
if ( file == NULL )
|
if ( file == NULL )
|
||||||
|
@ -4957,7 +4957,8 @@ void CMainDialog::UpdateSceneList(int chap, int &sel)
|
||||||
{
|
{
|
||||||
m_maxList = j+1; // this is not the last!
|
m_maxList = j+1; // this is not the last!
|
||||||
fclose(file);
|
fclose(file);
|
||||||
}
|
}*/
|
||||||
|
m_maxList = j;
|
||||||
|
|
||||||
if ( sel > j-1 ) sel = j-1;
|
if ( sel > j-1 ) sel = j-1;
|
||||||
|
|
||||||
|
@ -5008,7 +5009,6 @@ void CMainDialog::ShowSoluceUpdate()
|
||||||
|
|
||||||
void CMainDialog::UpdateSceneResume(int rank)
|
void CMainDialog::UpdateSceneResume(int rank)
|
||||||
{
|
{
|
||||||
FILE* file = NULL;
|
|
||||||
CWindow* pw;
|
CWindow* pw;
|
||||||
CEdit* pe;
|
CEdit* pe;
|
||||||
CCheck* pc;
|
CCheck* pc;
|
||||||
|
@ -5048,11 +5048,12 @@ void CMainDialog::UpdateSceneResume(int rank)
|
||||||
sprintf(op, "Resume.E");
|
sprintf(op, "Resume.E");
|
||||||
sprintf(op_i18n, "Resume.%c", m_app->GetLanguageChar());
|
sprintf(op_i18n, "Resume.%c", m_app->GetLanguageChar());
|
||||||
|
|
||||||
file = fopen(fileName.c_str(), "r");
|
CInputStream stream;
|
||||||
if ( file == NULL ) return;
|
stream.open(fileName);
|
||||||
|
if (!stream.is_open()) return;
|
||||||
|
|
||||||
name[0] = 0;
|
name[0] = 0;
|
||||||
while ( fgets(line, 500, file) != NULL )
|
while ( stream.getline(line, 500) )
|
||||||
{
|
{
|
||||||
for ( i=0 ; i<500 ; i++ )
|
for ( i=0 ; i<500 ; i++ )
|
||||||
{
|
{
|
||||||
|
@ -5077,7 +5078,7 @@ void CMainDialog::UpdateSceneResume(int rank)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fclose(file);
|
stream.close();
|
||||||
|
|
||||||
pe->SetText(name);
|
pe->SetText(name);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue