本文整理汇总了C++中FitIniFile::getFileMTime方法的典型用法代码示例。如果您正苦于以下问题:C++ FitIniFile::getFileMTime方法的具体用法?C++ FitIniFile::getFileMTime怎么用?C++ FitIniFile::getFileMTime使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FitIniFile
的用法示例。
在下文中一共展示了FitIniFile::getFileMTime方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateMissionInfo
void LogisticsSaveDialog::updateMissionInfo()
{
if ( !selectedName.Length() )
{
statics[MAP_STATIC].setColor( 0 );
return;
}
if ( bCampaign )
{
updateCampaignMissionInfo();
return;
}
FullPathFileName fileName;
fileName.init( savePath, selectedName, ".fit" );
FitIniFile file;
if ( NO_ERR == file.open( fileName ) )
{
char tmp[256];
char tmp2[256];
char real[1024];
file.seekBlock( "General" );
tmp[0] = 0;
file.readIdString( "CampaignName", tmp, 255);
_splitpath( tmp, NULL, NULL, tmp2, NULL );
strcpy( real, tmp2 );
strcat( real, "\n" );
if ( NO_ERR == file.readIdString( "MissionName", tmp, 255 ) )
{
strcat( real, tmp );
strcat( real, "\n" );
}
if ( NO_ERR == file.readIdString( "MissionFileName", tmp, 255 ) )
{
long textureHandle = MissionBriefingScreen::getMissionTGA( tmp );
statics[MAP_STATIC].setTexture( textureHandle );
statics[MAP_STATIC].setUVs( 0, 127, 127, 0 );
statics[MAP_STATIC].setColor( 0xffffffff );
}
else
statics[MAP_STATIC].setColor( 0 );
long cBills;
file.readIdLong( "CBills", cBills );
cLoadString( IDS_DIALOG_CBILLS, tmp2, 255 );
sprintf( tmp, tmp2, cBills );
strcat( real, tmp );
strcat( real, "\n" );
time_t time = file.getFileMTime();
struct tm* ptm = localtime(&time);
char* timeStr = gos_GetFormattedTime( ptm->tm_hour, ptm->tm_min, ptm->tm_sec );
char* dateStr = gos_GetFormattedDate( 0, ptm->tm_year + 1900, ptm->tm_mon + 1, ptm->tm_mday );
cLoadString( IDS_DIALOG_TIME, tmp2, 255 );
sprintf( tmp, tmp2, dateStr, timeStr );
strcat( real, tmp );
textObjects[2].setText( real );
}
else
{
textObjects[2].setText( "" );
statics[MAP_STATIC].setColor( 0 );
}
}