Subversion Repositories spk

Rev

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

Rev 126 Rev 127
Line 439... Line 439...
439
 
439
 
440
			C_File *newFile = NULL;
440
			C_File *newFile = NULL;
441
			int special = 0;
441
			int special = 0;
442
			if ( file.Compare("types/CutData.txt") || file.Compare("types/CutData.pck") )
442
			if ( file.Compare("types/CutData.txt") || file.Compare("types/CutData.pck") )
443
			{
443
			{
444
				newFile = new C_File(CyString(file));
444
				newFile = new C_File(file);
445
				special = 1;
445
				special = 1;
446
			}
446
			}
447
			else if ( file.Compare("types/Bodies.txt") || file.Compare("types/Bodies.pck") )
447
			else if ( file.Compare("types/Bodies.txt") || file.Compare("types/Bodies.pck") )
448
			{
448
			{
449
				newFile = new C_File(CyString(file));
449
				newFile = new C_File(file);
450
				special = 2;
450
				special = 2;
451
			}
451
			}
452
			else if ( file.Compare("types/Animations.txt") || file.Compare("types/Animations.pck") )
452
			else if ( file.Compare("types/Animations.txt") || file.Compare("types/Animations.pck") )
453
			{
453
			{
454
				newFile = new C_File(CyString(file));
454
				newFile = new C_File(file);
455
				special = 3;
455
				special = 3;
456
			}
456
			}
457
			else
457
			else
458
			{
458
			{
459
				newFile = this->AddFile(CFileIO(file).filename(), CFileIO(file).dir(), FILETYPE_SHIPOTHER);
459
				newFile = this->AddFile(CFileIO(file).filename(), CFileIO(file).dir(), FILETYPE_SHIPOTHER);
Line 767... Line 767...
767
	if ( !m_sData.empty() )
767
	if ( !m_sData.empty() )
768
		return m_sData.token(";", TSHIPPOS_CLASS);
768
		return m_sData.token(";", TSHIPPOS_CLASS);
769
	return "OBJ_SHIP_M5";
769
	return "OBJ_SHIP_M5";
770
}
770
}
771
 
771
 
772
bool CXspFile::GeneratePackagerScript(bool wildcard, Utils::CStringList *list, int game, bool datafile)
772
bool CXspFile::GeneratePackagerScript(bool wildcard, Utils::CStringList *list, int game, const Utils::CStringList &gameAddons, bool datafile)
773
{
773
{
774
	if ( !CBaseFile::GeneratePackagerScript(wildcard, list, game, datafile) )
774
	if ( !CBaseFile::GeneratePackagerScript(wildcard, list, game, gameAddons, datafile) )
775
		return false;
775
		return false;
776
 
776
 
777
	list->pushBack("# File Type, Script or Ship");
777
	list->pushBack("# File Type, Script or Ship");
778
	list->pushBack("FileType: Ship");
778
	list->pushBack("FileType: Ship");
779
	list->pushBack("");
779
	list->pushBack("");
Line 895... Line 895...
895
		list->pushBack("");
895
		list->pushBack("");
896
	}
896
	}
897
 
897
 
898
	if ( !datafile )
898
	if ( !datafile )
899
	{
899
	{
900
		if ( !CBaseFile::GeneratePackagerScriptFile(wildcard, list, game) )
900
		if ( !CBaseFile::GeneratePackagerScriptFile(wildcard, list, game, gameAddons) )
901
			return false;
901
			return false;
902
	}
902
	}
903
 
903
 
904
	return true;
904
	return true;
905
}
905
}
Line 1039... Line 1039...
1039
			ZipAdd(hz, buf, data, dataSize);
1039
			ZipAdd(hz, buf, data, dataSize);
1040
		}
1040
		}
1041
	}
1041
	}
1042
}
1042
}
1043
 
1043
 
1044
bool CXspFile::LoadPackageData(const Utils::String &sFirst, const Utils::String &sRest, const Utils::String &sMainGame, Utils::CStringList &otherGames)
1044
bool CXspFile::LoadPackageData(const Utils::String &sFirst, const Utils::String &sRest, const Utils::String &sMainGame, Utils::CStringList &otherGames, Utils::CStringList &gameAddons)
1045
{
1045
{
1046
	if ( sFirst.Compare("Shipyard") )
1046
	if ( sFirst.Compare("Shipyard") )
1047
	{
1047
	{
1048
		for ( int i = SHIPYARD_ARGON; i <= SHIPYARD_MAX; i *= 2 )
1048
		for ( int i = SHIPYARD_ARGON; i <= SHIPYARD_MAX; i *= 2 )
1049
		{
1049
		{
Line 1085... Line 1085...
1085
		this->AddCutData(sRest);
1085
		this->AddCutData(sRest);
1086
	else if ( sFirst.Compare("Animation") )
1086
	else if ( sFirst.Compare("Animation") )
1087
		this->AddAnimation(sRest);
1087
		this->AddAnimation(sRest);
1088
	else if ( sFirst.Compare("Bodies") )
1088
	else if ( sFirst.Compare("Bodies") )
1089
		this->AddBodies(sRest);
1089
		this->AddBodies(sRest);
1090
	else if ( !CBaseFile::LoadPackageData(sFirst, sRest, sMainGame, otherGames) )
1090
	else if ( !CBaseFile::LoadPackageData(sFirst, sRest, sMainGame, otherGames, gameAddons) )
1091
	{
1091
	{
1092
		return false;
1092
		return false;
1093
	}
1093
	}
1094
 
1094
 
1095
	return true;
1095
	return true;