Subversion Repositories spk

Rev

Rev 264 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 264 Rev 273
Line 567... Line 567...
567
										line.tokenise(L";", strs);
567
										line.tokenise(L";", strs);
568
										for (size_t j = 0; j < strs.size(); j++)
568
										for (size_t j = 0; j < strs.size(); j++)
569
										{
569
										{
570
											if ( !entries )
570
											if ( !entries )
571
											{
571
											{
572
												line = line.tokens(L";", j + 1);
572
												line = line.tokens(L";", static_cast<int>(j + 1));
573
												if ( !line.empty() )
573
												if ( !line.empty() )
574
													done = false;
574
													done = false;
575
												break;
575
												break;
576
											}
576
											}
577
 
577
 
Line 1046... Line 1046...
1046
 
1046
 
1047
		// tships files
1047
		// tships files
1048
		wsprintf(buf, L"%hs", fname.c_str());
1048
		wsprintf(buf, L"%hs", fname.c_str());
1049
		if ( tmpFile.startRead() ) {
1049
		if ( tmpFile.startRead() ) {
1050
			*/
1050
			*/
1051
		ZipAdd(hz, fname.c_str(), (void *)fileData.c_str(), fileData.length() * sizeof(wchar_t));
1051
		ZipAdd(hz, fname.c_str(), (void *)fileData.c_str(), static_cast<unsigned int>(fileData.length() * sizeof(wchar_t)));
1052
		//}
1052
		//}
1053
	}
1053
	}
1054
}
1054
}
1055
 
1055
 
1056
bool CXspFile::loadPackageData(const Utils::WString &sFirst, const Utils::WString &sRest, const Utils::WString &sMainGame, Utils::WStringList &otherGames, Utils::WStringList &gameAddons, CProgressInfo *progress)
1056
bool CXspFile::loadPackageData(const Utils::WString &sFirst, const Utils::WString &sRest, const Utils::WString &sMainGame, Utils::WStringList &otherGames, Utils::WStringList &gameAddons, CProgressInfo *progress)
Line 2397... Line 2397...
2397
					{
2397
					{
2398
						Utils::WString sId = line.mid(pos, endpos);
2398
						Utils::WString sId = line.mid(pos, endpos);
2399
						int id = sId;
2399
						int id = sId;
2400
						if ( sId.length() > 4 ) {
2400
						if ( sId.length() > 4 ) {
2401
							id = sId.right(4);
2401
							id = sId.right(4);
2402
							currentGameID = sId.left(sId.length() - 4);
2402
							currentGameID = sId.left(static_cast<long>(sId.length() - 4));
2403
						}
2403
						}
2404
 
2404
 
2405
						if ( currentGameID >= lastAddedGameID && id == 17 )
2405
						if ( currentGameID >= lastAddedGameID && id == 17 )
2406
							inpage = true;
2406
							inpage = true;
2407
					}
2407
					}
Line 2613... Line 2613...
2613
			if ( turret.contains(L"(") )
2613
			if ( turret.contains(L"(") )
2614
			{
2614
			{
2615
				oldPos = turret.tokens(L"(", 2).token(L")", 1);
2615
				oldPos = turret.tokens(L"(", 2).token(L")", 1);
2616
				turret = turret.token(L"(", 1);
2616
				turret = turret.token(L"(", 1);
2617
			}
2617
			}
2618
			int pos = cockpits.findPos(turret);
2618
			size_t pos = cockpits.findPos(turret);
2619
			if ( pos < 0 )	pos = oldPos;
2619
			if ( pos < 0 )	pos = oldPos;
2620
			if (static_cast<size_t>(pos) >= cockpits.size()) pos = 0;
2620
			if (static_cast<size_t>(pos) >= cockpits.size()) pos = 0;
2621
			data = data.replaceToken(L";", 32 + (t * 2), (long)pos);
2621
			data = data.replaceToken(L";", 32 + (t * 2), (long)pos);
2622
		}
2622
		}
2623
	}
2623
	}