Subversion Repositories spk

Rev

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

Rev 59 Rev 94
Line 256... Line 256...
256
		this->iVariation = entries[50].ToInt();
256
		this->iVariation = entries[50].ToInt();
257
		this->iRotationAccel = entries[51].ToInt();
257
		this->iRotationAccel = entries[51].ToInt();
258
		if ( entries[52].IsNumber() )
258
		if ( entries[52].IsNumber() )
259
			this->iClass = entries[52].ToInt();
259
			this->iClass = entries[52].ToInt();
260
		else
260
		else
261
			this->iClass = CShipData::ConvertShipClass(entries[52]);
261
			this->iClass = CShipData::ConvertShipClass(entries[52].ToString());
262
		this->iTurretCount = entries[53].ToInt();
262
		this->iTurretCount = entries[53].ToInt();
263
 
263
 
264
		// now read in the turret data
264
		// now read in the turret data
265
		int pos = 54;
265
		int pos = 54;
266
		for ( int i = 0; i < this->iTurretCount; i++ )
266
		for ( int i = 0; i < this->iTurretCount; i++ )
Line 405... Line 405...
405
	}
405
	}
406
 
406
 
407
	return 0;
407
	return 0;
408
}
408
}
409
 
409
 
410
int CShipData::ConvertShipClass(CyString shipclass)
410
int CShipData::ConvertShipClass(const Utils::String &shipclass)
411
{
411
{
412
	for ( int i = 0; i < OBJ_SHIP_MAX; i++ )
412
	for ( int i = 0; i < OBJ_SHIP_MAX; i++ )
413
	{
413
	{
414
		int c = CShipData::GetShipClassFromNum(i);
414
		int c = CShipData::GetShipClassFromNum(i);
415
		if ( CShipData::ConvertShipClass(c).Compare(shipclass) )
415
		if ( CShipData::ConvertShipClass(c).Compare(shipclass) )
Line 417... Line 417...
417
	}
417
	}
418
 
418
 
419
	return OBJ_SHIP_TL;
419
	return OBJ_SHIP_TL;
420
}
420
}
421
 
421
 
422
CyString CShipData::ConvertShipClass(int shipclass)
422
Utils::String CShipData::ConvertShipClass(int shipclass)
423
{
423
{
424
	switch ( shipclass )
424
	switch ( shipclass )
425
	{
425
	{
426
		case OBJ_SHIP_TL:
426
		case OBJ_SHIP_TL:
427
			return "OBJ_SHIP_TL";
427
			return "OBJ_SHIP_TL";