Game Development Reference
In-Depth Information
int pos = m_ToonFile.GetPosition();
TRACE(”CToon3DAXCtrl::ToonFileLoading %i\n”,pos);
//Attempt to initialise the document
if (!toon3d.m_init){
CArchive ar(&m_ToonFile.m_Cache, CArchive::load);
m_ToonFile.m_Cache.SeekToBegin();
if (!toon3d.Initialise(ar)){
m_ToonFile.m_Cache.SeekToEnd();
return;
}
m_ToonFile.m_Cache.SeekToEnd();
}
//Process the loading file
while (pos >= toon3d.m_sceneSize[toon3d.m_sceneLoading]){
scn = toon3d.sceneList.Index2Scene(toon3d.m_sceneLoading);
if (scn){
CArchive ar(&m_ToonFile.m_Cache, CArchive::load);
if (toon3d.m_sceneLoading){
m_ToonFile.m_Cache.Seek(
toon3d.m_sceneSize[toon3d.m_sceneLoading-1],
CFile::begin);
}else{
m_ToonFile.m_Cache.Seek(
10 + toon3d.m_sceneTotal * sizeof(int), CFile::begin);
}
if (scn->Load(ar,toon3d.m_ver)){
TRACE(”CToon3DAXCtrl::ToonFileLoading Scene %i loaded\n”,
toon3d.m_sceneLoading);
//Flush the Archive and the file to ensure that position is
//correctly set
m_ToonFile.m_Cache.SeekToEnd();
if (!playing && toon3d.m_sceneLoading >=
toon3d.m_sceneIndex){
TRACE(”CToon3DAXCtrl::ToonFileLoading Playing
initialised\n”);
scn=toon3d.sceneList.Index2Scene(toon3d.m_sceneIndex);
toon3d.SetMovieScene(scn);
if (toon3d.m_useloadscene && toon3d.m_sceneIndex==0){
playing=FALSE;
toon3d.m_sceneIndex=1;
Search Nedrilad ::




Custom Search