Subversion Repositories spk

Rev

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

Rev 116 Rev 170
Line 28... Line 28...
28
	m_sID = id;
28
	m_sID = id;
29
	m_pShip = NULL;
29
	m_pShip = NULL;
30
 
30
 
31
	m_pInfo = new CProgressInfoDone;
31
	m_pInfo = new CProgressInfoDone;
32
	m_pInfo->UpdateStatus(IMPORTSHIP_NONE);
32
	m_pInfo->UpdateStatus(IMPORTSHIP_NONE);
33
	m_lModels = NULL;
33
	_lModels = NULL;
34
	m_iStatus = IMPORTSHIP_SCENE;
34
	m_iStatus = IMPORTSHIP_SCENE;
35
 
35
 
36
	_sShipName = shipName;
36
	_sShipName = shipName;
37
}
37
}
38
 
38
 
Line 61... Line 61...
61
 
61
 
62
		m_iStatus = IMPORTSHIP_EXTRACTSCENE;
62
		m_iStatus = IMPORTSHIP_EXTRACTSCENE;
63
	}
63
	}
64
	else if ( m_iStatus == IMPORTSHIP_EXTRACTSCENE )
64
	else if ( m_iStatus == IMPORTSHIP_EXTRACTSCENE )
65
	{
65
	{
66
		m_lModels = m_pShip->ReadSceneModels();
66
		if(!m_pShip->readSceneModels(*_lModels) || _lModels->empty())
67
		if ( !m_lModels ) {
67
		{
68
			m_bError = true;
68
			m_bError = true;
69
			m_sError = "Unable to read the scene file to extract model data";
69
			m_sError = "Unable to read the scene file to extract model data";
70
		}
70
		}
71
		++m_iStatus;
71
		++m_iStatus;
72
	}
72
	}
Line 75... Line 75...
75
		m_pShip->PackAllFiles();
75
		m_pShip->PackAllFiles();
76
		m_iStatus = IMPORTSHIP_DONE;
76
		m_iStatus = IMPORTSHIP_DONE;
77
	}
77
	}
78
	else if ( m_iStatus > IMPORTSHIP_EXTRACTSCENE )
78
	else if ( m_iStatus > IMPORTSHIP_EXTRACTSCENE )
79
	{
79
	{
80
		m_bError = !m_pShip->processSceneFileSection(m_iStatus, m_pVfs, m_lModels, m_pInfo);
80
		m_bError = !m_pShip->processSceneFileSection(m_iStatus, m_pVfs, *_lModels, m_pInfo);
81
		if ( m_bError ) m_sError = "Unable to process scene file (Status=" + (long)m_iStatus;
81
		if ( m_bError ) m_sError = "Unable to process scene file (Status=" + (long)m_iStatus;
82
		++m_iStatus;
82
		++m_iStatus;
83
	}
83
	}
84
}
84
}
85
 
85
 
Line 121... Line 121...
121
}
121
}
122
 
122
 
123
void ImportShip::_cleanUp()
123
void ImportShip::_cleanUp()
124
{
124
{
125
	delete m_pInfo;
125
	delete m_pInfo;
126
	if ( m_lModels )
126
	if ( _lModels )
127
		delete m_lModels;
127
		delete _lModels;
128
}
128
}
129
}
129
}