mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-17 18:59:09 +00:00
Allow pfJournalBook to load png files from local path (internal)
This commit is contained in:
@ -2478,6 +2478,7 @@ void pfJournalBook::IFreeSource( void )
|
|||||||
|
|
||||||
#ifndef PLASMA_EXTERNAL_RELEASE
|
#ifndef PLASMA_EXTERNAL_RELEASE
|
||||||
#include "plJPEG/plJPEG.h"
|
#include "plJPEG/plJPEG.h"
|
||||||
|
#include "plGImage/plPNG.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
plKey pfJournalBook::IGetMipmapKey( const wchar_t *name, const plLocation &loc )
|
plKey pfJournalBook::IGetMipmapKey( const wchar_t *name, const plLocation &loc )
|
||||||
@ -2486,12 +2487,22 @@ plKey pfJournalBook::IGetMipmapKey( const wchar_t *name, const plLocation &loc
|
|||||||
#ifndef PLASMA_EXTERNAL_RELEASE
|
#ifndef PLASMA_EXTERNAL_RELEASE
|
||||||
if( strchr( cName, '/' ) != nil || strchr( cName, '\\' ) != nil )
|
if( strchr( cName, '/' ) != nil || strchr( cName, '\\' ) != nil )
|
||||||
{
|
{
|
||||||
// For internal use only--we allow local path names of JPEG images, to
|
// For internal use only--allow local path names of PNG and JPEG images, to
|
||||||
// facilitate fast prototyping
|
// facilitate fast prototyping
|
||||||
plMipmap *mip = plJPEG::Instance().ReadFromFile( cName );
|
if( strchr( cName, '.png' ) != nil )
|
||||||
hsgResMgr::ResMgr()->NewKey( cName, mip, loc );
|
{
|
||||||
delete [] cName;
|
plMipmap *mip = plPNG::Instance().ReadFromFile( cName );
|
||||||
return mip->GetKey();
|
hsgResMgr::ResMgr()->NewKey( cName, mip, loc );
|
||||||
|
delete [] cName;
|
||||||
|
return mip->GetKey();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
plMipmap *mip = plJPEG::Instance().ReadFromFile( cName );
|
||||||
|
hsgResMgr::ResMgr()->NewKey( cName, mip, loc );
|
||||||
|
delete [] cName;
|
||||||
|
return mip->GetKey();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user