|
|
@ -51,6 +51,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com |
|
|
|
#include "plPlates.h" |
|
|
|
#include "plPlates.h" |
|
|
|
|
|
|
|
|
|
|
|
#include "../plJPEG/plJPEG.h" |
|
|
|
#include "../plJPEG/plJPEG.h" |
|
|
|
|
|
|
|
#include "../plGImage/plPNG.h" |
|
|
|
#include "../plGImage/plMipmap.h" |
|
|
|
#include "../plGImage/plMipmap.h" |
|
|
|
#include "../plSurface/plLayer.h" |
|
|
|
#include "../plSurface/plLayer.h" |
|
|
|
#include "../plSurface/hsGMaterial.h" |
|
|
|
#include "../plSurface/hsGMaterial.h" |
|
|
@ -59,6 +60,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com |
|
|
|
#include "hsGDeviceRef.h" |
|
|
|
#include "hsGDeviceRef.h" |
|
|
|
#include "hsResMgr.h" |
|
|
|
#include "hsResMgr.h" |
|
|
|
#include "plPipeDebugFlags.h" |
|
|
|
#include "plPipeDebugFlags.h" |
|
|
|
|
|
|
|
#include "../plClientResMgr/plClientResMgr.h" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// A bit of a hack so that we will have the correct instance in the SceneViewer
|
|
|
|
// A bit of a hack so that we will have the correct instance in the SceneViewer
|
|
|
@ -542,6 +544,33 @@ void plPlate::ReloadFromJPEGResource( const char *resName, UInt32 colorKey ) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void plPlate::CreateFromResourceDat(const char *resName) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (resName) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
plMipmap* resTexture = TRACKED_NEW plMipmap; |
|
|
|
|
|
|
|
resTexture->CopyFrom(plClientResMgr::Instance().getResource(resName)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
char keyName[128]; |
|
|
|
|
|
|
|
sprintf( keyName, "PlateResource#%d", fMagicUniqueKeyInt++ ); |
|
|
|
|
|
|
|
hsgResMgr::ResMgr()->NewKey(keyName, resTexture, plLocation::kGlobalFixedLoc); |
|
|
|
|
|
|
|
CreateMaterial(resTexture->GetWidth(), resTexture->GetHeight(), true, resTexture); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
// Null resource request - Create a blank Material instead
|
|
|
|
|
|
|
|
CreateMaterial(32, 32, true); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void plPlate::ReloadFromResourceDat(const char *resName) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (resName) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
fMipmap->CopyFrom(plClientResMgr::Instance().getResource(resName)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//// ILink ///////////////////////////////////////////////////////////////////
|
|
|
|
//// ILink ///////////////////////////////////////////////////////////////////
|
|
|
|
// Links a plate into a plate list, but also sorts by decreasing depth,
|
|
|
|
// Links a plate into a plate list, but also sorts by decreasing depth,
|
|
|
|
// so the plate won't actually necessarily be added after the pointer
|
|
|
|
// so the plate won't actually necessarily be added after the pointer
|
|
|
|