1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-18 19:29:09 +00:00

Plate resource plString

This commit is contained in:
2014-01-11 19:53:32 -05:00
committed by Michael Hansen
parent b10795b9cb
commit 9e0330feea
4 changed files with 21 additions and 30 deletions

View File

@ -238,9 +238,9 @@ plMipmap *plPlate::CreateMaterial( uint32_t width, uint32_t height, bool with
//// CreateFromResource //////////////////////////////////////////////////////
// Creates a plate's material from a resource of the given name.
void plPlate::CreateFromResource(const char *resName)
void plPlate::CreateFromResource(const plString& resName)
{
if (resName)
if (!resName.IsEmpty())
{
plMipmap* resTexture = new plMipmap;
resTexture->CopyFrom(plClientResMgr::Instance().getResource(resName));
@ -256,9 +256,9 @@ void plPlate::CreateFromResource(const char *resName)
}
}
void plPlate::ReloadFromResource(const char *resName)
void plPlate::ReloadFromResource(const plString& resName)
{
if (resName)
if (!resName.IsEmpty())
{
fMipmap->CopyFrom(plClientResMgr::Instance().getResource(resName));
}

View File

@ -144,8 +144,8 @@ class plPlate
void SetSize( float width, float height, bool adjustByAspectRatio = false );
plMipmap *CreateMaterial( uint32_t width, uint32_t height, bool withAlpha, plMipmap* texture = NULL );
void CreateFromResource( const char *resName );
void ReloadFromResource( const char *resName );
void CreateFromResource(const plString& resName);
void ReloadFromResource(const plString& resName);
};
//// plGraphPlate Class Definition ///////////////////////////////////////////