Subversion Repositories spk

Rev

Rev 42 | Rev 49 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 42 Rev 48
Line 4... Line 4...
4
#include "CatFile.h"
4
#include "CatFile.h"
5
 
5
 
6
CXspFile::CXspFile () : CBaseFile()
6
CXspFile::CXspFile () : CBaseFile()
7
{
7
{
8
	SetDefaults ();
8
	SetDefaults ();
9
 
-
 
10
	m_iType = TYPE_XSP;
-
 
11
}
9
}
12
 
10
 
13
void CXspFile::Delete ()
11
void CXspFile::Delete ()
14
{
12
{
15
	CBaseFile::Delete();
13
	CBaseFile::Delete();
Line 287... Line 285...
287
		d->sData = rest.token("|", 1);
285
		d->sData = rest.token("|", 1);
288
		d->sData = d->sData.findReplace ("<::PiPe::>", "|");
286
		d->sData = d->sData.findReplace ("<::PiPe::>", "|");
289
		d->sSection = rest.tokens( "|", 2);
287
		d->sSection = rest.tokens( "|", 2);
290
		m_lDummy.push_back ( d );
288
		m_lDummy.push_back ( d );
291
	}
289
	}
292
	else if ( first == "Comment" )
-
 
293
		m_sDescription = rest.findReplace("<newline>", "<br>");
290
	else if ( first == "Comment" )	this->setDescription(rest.findReplace("<newline>", "<br>"));
294
	else
291
	else
295
		return CBaseFile::ParseValueLine(sLine);
292
		return CBaseFile::ParseValueLine(sLine);
296
 
293
 
297
	return true;
294
	return true;
298
}
295
}
Line 1365... Line 1362...
1365
				return t->sDesc;
1362
				return t->sDesc;
1366
		}
1363
		}
1367
	}
1364
	}
1368
 
1365
 
1369
	// still not found one, return the ships name
1366
	// still not found one, return the ships name
1370
	if ( !m_sDescription.Empty() )
1367
	if ( !this->description().empty() ) return this->description();
1371
		return m_sDescription.ToString();
-
 
1372
	return this->GetShipName(lang);
1368
	return this->GetShipName(lang);
1373
}
1369
}
1374
 
1370
 
1375
bool CXspFile::startExtractShip(CVirtualFileSystem *pVfs, const Utils::String &sId, CProgressInfo *pProgress)
1371
bool CXspFile::startExtractShip(CVirtualFileSystem *pVfs, const Utils::String &sId, CProgressInfo *pProgress)
1376
{
1372
{
Line 2020... Line 2016...
2020
	if ( added )
2016
	if ( added )
2021
	{
2017
	{
2022
		if ( lang == 44 || m_sName.Empty())
2018
		if ( lang == 44 || m_sName.Empty())
2023
		{
2019
		{
2024
			m_sName = shipName;
2020
			m_sName = shipName;
2025
			m_sDescription= shipDesc;
-
 
2026
			m_sDescription = m_sDescription.FindReplace("&amp", "&");
2021
			this->setDescription(shipDesc.findReplace("&amp", "&"));
2027
		}
2022
		}
2028
		this->AddText(lang, shipName, shipDesc);
2023
		this->AddText(lang, shipName, shipDesc);
2029
		return true;	
2024
		return true;	
2030
	}
2025
	}
2031
 
2026