Ejemplo n.º 1
0
void AssetEnumerator::CreateFromFilename(const Filename& filename)
	{
	// First, try and get the directory from the archive manager, if it is present
	if (ArchiveManager::IsInstanceCreated())
		{
		archiveDirectory_=siArchiveManager->GetDirectory(filename.GetStringId());
		}

	// If we couldn't get the directory from the archive manager, try to get it from the file system, if it is present
	if (!archiveDirectory_ && Platform::GetPlatform_FileSystem())
		{
		directory_=Platform::GetPlatform_FileSystem()->CreateDirectoryObject(filename.GetString());
		}

	// If we couldn't get the directory from neither the archive manager nor the filesystem, we trigger an assert for
	// debug builds, and just reports the directory as being empty for release builds.
	Assert(archiveDirectory_ || directory_,
		"Error creating AssetEnumerator - No filesystem or archive manager present, or directory not found.");
	}
Ejemplo n.º 2
0
Resource_Font::Resource_Font(const Filename& filename)
	{
	font_=siOldResourceManager->GetFont(filename.GetStringId());
	siOldResourceManager->IncreaseReferenceCount(font_);
	}