add q3map2 build to scons
git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/branches/ZeroRadiant@193 8a3a26a2-13c4-0310-b231-cf6edde360e5
This commit is contained in:
@@ -342,8 +342,7 @@ static void j_putGrayScanlineToRGB (unsigned char* jpegline, int widthPix, unsig
|
||||
}
|
||||
}
|
||||
|
||||
static int _LoadJPGBuff (void *src_buffer, int src_size, unsigned char **pic, int *width, int *height)
|
||||
{
|
||||
static int LoadJPGBuff( void *src_buffer, int src_size, unsigned char **pic, int *width, int *height ) {
|
||||
struct jpeg_decompress_struct cinfo;
|
||||
struct my_jpeg_error_mgr jerr;
|
||||
JSAMPARRAY buffer;
|
||||
@@ -392,18 +391,16 @@ static int _LoadJPGBuff (void *src_buffer, int src_size, unsigned char **pic, in
|
||||
return 0;
|
||||
}
|
||||
|
||||
void LoadJPG (const char *filename, unsigned char **pic, int *width, int *height)
|
||||
{
|
||||
void LoadJPG( const char *filename, unsigned char **pic, int *width, int *height ) {
|
||||
unsigned char *fbuffer = NULL;
|
||||
int nLen = vfsLoadFile ((char *)filename, (void **)&fbuffer, 0 );
|
||||
if (nLen == -1)
|
||||
return;
|
||||
|
||||
if (_LoadJPGBuff (fbuffer, nLen, pic, width, height) != 0)
|
||||
{
|
||||
if ( LoadJPGBuff( fbuffer, nLen, pic, width, height ) != 0 ) {
|
||||
g_FuncTable.m_pfnSysPrintf( "WARNING: JPEG library failed to load %s because %s\n", filename, *pic );
|
||||
*pic = NULL;
|
||||
}
|
||||
|
||||
vfsFreeFile (fbuffer);
|
||||
vfsFreeFile( fbuffer );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user