Example #1
0
void	Surface_Init()
{
	Msg("* ImageLibrary version: %s",FreeImage_GetVersion());

    formats.format_register("tga");
	Surface_FormatExt(FIF_BMP);
	Surface_FormatExt(FIF_ICO);
	Surface_FormatExt(FIF_JPEG);
	Surface_FormatExt(FIF_JNG);
	Surface_FormatExt(FIF_KOALA);
	Surface_FormatExt(FIF_LBM);
	Surface_FormatExt(FIF_MNG);
	Surface_FormatExt(FIF_PBM);
	Surface_FormatExt(FIF_PBMRAW);
	Surface_FormatExt(FIF_PCD);
	Surface_FormatExt(FIF_PCX);
	Surface_FormatExt(FIF_PGM);
	Surface_FormatExt(FIF_PGMRAW);
	Surface_FormatExt(FIF_PNG);
	Surface_FormatExt(FIF_PPM);
	Surface_FormatExt(FIF_PPMRAW);
	Surface_FormatExt(FIF_RAS);
	Surface_FormatExt(FIF_TARGA);
	Surface_FormatExt(FIF_TIFF);
	Surface_FormatExt(FIF_WBMP);
	Surface_FormatExt(FIF_PSD);
	Surface_FormatExt(FIF_IFF);

	Msg("* %d supported formats",formats.size());
}
Example #2
0
BOOL	Surface_Detect(string_path& F, LPSTR N)
{
	for (u32 i=0; i<formats.size(); i++)
	{
		FS.update_path	(F,"$textures$",strconcat(sizeof(F),F,N,".",formats[i]));
		int h = _open(F,O_RDONLY|O_BINARY);
		if (h>0)	{
			_close(h);
			return TRUE;
		}
	}
	return FALSE;
}
Example #3
0
BOOL	Surface_Detect(string_path& F, LPSTR N)
{
#ifndef PRIQUEL
	for (u32 i=0; i<formats.size(); i++)
#endif // PRIQUEL
	{
#ifdef PRIQUEL
		FS.update_path	(F,"$game_textures$",strconcat(sizeof(F),F,N,".dds"));
#else // PRIQUEL
		FS.update_path	(F,"$textures$",strconcat(sizeof(F),F,N,".",formats[i]));
#endif // PRIQUEL
		int h = _open(F,O_RDONLY|O_BINARY);
		if (h>0)	{
			_close(h);
			return TRUE;
		}
	}
	return FALSE;
}