Subversion Repositories spk

Rev

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

Rev 101 Rev 112
Line 17... Line 17...
17
 
17
 
18
	CGameDirectories::~CGameDirectories(void)
18
	CGameDirectories::~CGameDirectories(void)
19
	{
19
	{
20
		clear();
20
		clear();
21
		delete _pDirs;
21
		delete _pDirs;
22
		_lControlledDirs.MemoryClear();
22
		_lControlledDirs.clear();
23
	}
23
	}
24
 
24
 
25
	bool CGameDirectories::add(const Utils::String &dir, const Utils::String &name, int iGame, const Utils::String &addon, bool bLoad)
25
	bool CGameDirectories::add(const Utils::String &dir, const Utils::String &name, int iGame, const Utils::String &addon, bool bLoad)
26
	{
26
	{
27
		for ( std::vector<SGameDir *>::iterator itr = _pDirs->begin(); itr != _pDirs->end(); itr++ ) {
27
		for ( std::vector<SGameDir *>::iterator itr = _pDirs->begin(); itr != _pDirs->end(); itr++ ) {
Line 191... Line 191...
191
		return NULL;
191
		return NULL;
192
	}
192
	}
193
 
193
 
194
	void CGameDirectories::syncWithControlled(CGameExe *exe)
194
	void CGameDirectories::syncWithControlled(CGameExe *exe)
195
	{
195
	{
196
		for(CListNode<Utils::SStringList> *node = _lControlledDirs.Front(); node; node = node->next()) {
196
		for(Utils::CStringListIterator itr = _lControlledDirs.begin(); itr != _lControlledDirs.end(); itr++) {
197
			Utils::SStringList *str = node->Data();
-
 
198
			add(exe->GetProperDir(str->str), str->;data, exe->;GetGameType(str->str), exe->GetAddonDir(str->str), true);
197
			add(exe->GetProperDir((*itr)->str), (*itr)->data, exe->GetGameType((*itr)->str), exe->GetAddonDir((*itr)->str), true);
199
		}
198
		}
200
	}
199
	}
201
 
200
 
202
	Utils::String CGameDirectories::findText(int iLanguage, int iPage, int iID, Utils::String missing)
201
	Utils::String CGameDirectories::findText(int iLanguage, int iPage, int iID, Utils::String missing)
203
	{
202
	{
Line 388... Line 387...
388
		_pDirs->push_back(gd);
387
		_pDirs->push_back(gd);
389
	}
388
	}
390
 
389
 
391
	void CGameDirectories::_updateControlledDirs(const Utils::String &mydoc)
390
	void CGameDirectories::_updateControlledDirs(const Utils::String &mydoc)
392
	{
391
	{
393
		_lControlledDirs.MemoryClear();
392
		_lControlledDirs.clear();
394
 
393
 
395
		CFileIO configFile(mydoc + "/Egosoft/pluginmanager.dat");
394
		CFileIO configFile(mydoc + "/Egosoft/pluginmanager.dat");
396
		if ( configFile.startRead() ) {
395
		if ( configFile.startRead() ) {
397
			while(!configFile.atEnd()) {
396
			while(!configFile.atEnd()) {
398
				Utils::String line = configFile.readEndOfLine();
397
				Utils::String line = configFile.readEndOfLine();