コード例 #1
0
  /// \brief
	///  Overridden function to gather resource dependencies
	///
	/// \param snapshot
	///  snapshot info
	///
	TERRAIN_IMPEXP virtual void GetDependencies(VResourceSnapshot &snapshot)
  {
    // A decoration model instance may occur multiple times, and gathering the mesh's dependencies
    // can be rather costly. Thus, only gather mesh dependencies once.
    if (m_spMesh != NULL && snapshot.FindResourceEntry(m_spMesh) == NULL)
    {
      m_spMesh->GetDependencies(snapshot);
    }
  }
コード例 #2
0
void VFmodSoundResource::GetDependencies(VResourceSnapshot &snapshot)
{
  if (!IsStreaming())
  {
    VManagedResource::GetDependencies(snapshot);
    IVFileInStream *pFile = Vision::File.Open(GetFilename());
    if (pFile)
    {
      // patch the file size afterwards
      VResourceSnapshotEntry *pEntry = snapshot.FindResourceEntry(this);
      VASSERT(pEntry!=NULL)
        if (pEntry)
        {
          pEntry->m_iFileSize = pFile->GetSize();
          pEntry->SetCustomIntValue(0,m_iSoundFlags);
        }
        pFile->Close();
    }
  }