mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-06 14:00:39 +00:00
Merge pull request #658 from Azaezel/alpha40/imageArrayProfileFixes
imageasset array profile fixes
This commit is contained in:
commit
2bb4d34efd
15 changed files with 66 additions and 48 deletions
|
|
@ -304,13 +304,13 @@ if (m##name##AssetId != StringTable->EmptyString())\
|
|||
#pragma region Arrayed Asset Macros
|
||||
|
||||
//Arrayed Assets
|
||||
#define DECLARE_IMAGEASSET_ARRAY(className, name, profile, max) public: \
|
||||
#define DECLARE_IMAGEASSET_ARRAY(className, name, max) public: \
|
||||
static const U32 sm##name##Count = max;\
|
||||
GFXTexHandle m##name[max];\
|
||||
StringTableEntry m##name##Name[max]; \
|
||||
StringTableEntry m##name##AssetId[max];\
|
||||
AssetPtr<ImageAsset> m##name##Asset[max];\
|
||||
GFXTextureProfile * m##name##Profile = &profile;\
|
||||
GFXTextureProfile * m##name##Profile[max];\
|
||||
public: \
|
||||
const StringTableEntry get##name##File(const U32& index) const { return m##name##Name[index]; }\
|
||||
void set##name##File(const FileName &_in, const U32& index) { m##name##Name[index] = StringTable->insert(_in.c_str());}\
|
||||
|
|
@ -374,7 +374,7 @@ public: \
|
|||
}\
|
||||
if (get##name(index) != StringTable->EmptyString() && m##name##Name[index] != StringTable->insert("texhandle"))\
|
||||
{\
|
||||
m##name[index].set(get##name(index), m##name##Profile, avar("%s() - mTextureObject (line %d)", __FUNCTION__, __LINE__));\
|
||||
m##name[index].set(get##name(index), m##name##Profile[index], avar("%s() - mTextureObject (line %d)", __FUNCTION__, __LINE__));\
|
||||
}\
|
||||
else\
|
||||
{\
|
||||
|
|
@ -445,6 +445,15 @@ public: \
|
|||
return ret;\
|
||||
}
|
||||
|
||||
#define INIT_IMAGEASSET_ARRAY(name, profile, index) \
|
||||
{\
|
||||
m##name##Name[index] = StringTable->EmptyString(); \
|
||||
m##name##AssetId[index] = StringTable->EmptyString(); \
|
||||
m##name##Asset[index] = NULL;\
|
||||
m##name[index] = NULL;\
|
||||
m##name##Profile[index] = &profile;\
|
||||
}
|
||||
|
||||
#define DEF_IMAGEASSET_ARRAY_BINDS(className,name)\
|
||||
DefineEngineMethod(className, get##name, const char*, (S32 index), , "get name")\
|
||||
{\
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ SplashData::SplashData()
|
|||
U32 i;
|
||||
for (i = 0; i < NUM_TEX; i++)
|
||||
{
|
||||
INIT_ASSET_ARRAY(Texture, i);
|
||||
INIT_IMAGEASSET_ARRAY(Texture, GFXStaticTextureSRGBProfile, i);
|
||||
}
|
||||
|
||||
for( i=0; i<NUM_TIME_KEYS; i++ )
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ public:
|
|||
F32 times[ NUM_TIME_KEYS ];
|
||||
LinearColorF colors[ NUM_TIME_KEYS ];
|
||||
|
||||
DECLARE_IMAGEASSET_ARRAY(SplashData, Texture, GFXStaticTextureSRGBProfile, NUM_TEX);
|
||||
DECLARE_IMAGEASSET_ARRAY(SplashData, Texture, NUM_TEX);
|
||||
DECLARE_IMAGEASSET_ARRAY_SETGET(SplashData, Texture)
|
||||
|
||||
ExplosionData* explosion;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue