code duplication prune. should aid in stability

This commit is contained in:
AzaezelX 2021-10-03 02:56:26 -05:00
parent 10f2453cee
commit 98a079a797
123 changed files with 632 additions and 966 deletions

View file

@ -85,7 +85,7 @@ AccumulationVolume::AccumulationVolume()
mWorldToObj.identity(); mWorldToObj.identity();
// Accumulation Texture. // Accumulation Texture.
INIT_IMAGEASSET(Texture); INIT_ASSET(Texture);
resetWorldBox(); resetWorldBox();
} }
@ -236,7 +236,7 @@ U32 AccumulationVolume::packUpdate( NetConnection *connection, U32 mask, BitStre
if (stream->writeFlag(mask & InitialUpdateMask)) if (stream->writeFlag(mask & InitialUpdateMask))
{ {
PACK_IMAGEASSET(connection, Texture); PACK_ASSET(connection, Texture);
} }
return retMask; return retMask;
@ -248,7 +248,7 @@ void AccumulationVolume::unpackUpdate( NetConnection *connection, BitStream *str
if (stream->readFlag()) if (stream->readFlag())
{ {
UNPACK_IMAGEASSET(connection, Texture); UNPACK_ASSET(connection, Texture);
//setTexture(mTextureName); //setTexture(mTextureName);
} }
} }

View file

@ -62,7 +62,7 @@ class AccumulationVolume : public ScenePolyhedralSpace
virtual void _renderObject( ObjectRenderInst* ri, SceneRenderState* state, BaseMatInstance* overrideMat ); virtual void _renderObject( ObjectRenderInst* ri, SceneRenderState* state, BaseMatInstance* overrideMat );
DECLARE_IMAGEASSET(AccumulationVolume, Texture, onTextureChanged, GFXStaticTextureSRGBProfile); DECLARE_IMAGEASSET(AccumulationVolume, Texture, onTextureChanged, GFXStaticTextureSRGBProfile);
DECLARE_IMAGEASSET_NET_SETGET(AccumulationVolume, Texture, -1); DECLARE_ASSET_NET_SETGET(AccumulationVolume, Texture, -1);
void onTextureChanged() {} void onTextureChanged() {}

View file

@ -47,7 +47,7 @@
#include "sim/netConnection.h" #include "sim/netConnection.h"
#include <string> #include <string>
#include "assetMacroHelpers.h"
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
class ImageAsset : public AssetBase class ImageAsset : public AssetBase
{ {
@ -273,45 +273,6 @@ public: \
}\ }\
bool name##Valid() {return (get##name() != StringTable->EmptyString() && m##name##Asset->getStatus() == AssetBase::Ok); } bool name##Valid() {return (get##name() != StringTable->EmptyString() && m##name##Asset->getStatus() == AssetBase::Ok); }
#define DECLARE_IMAGEASSET_SETGET(className, name)\
static bool _set##name##Data(void* obj, const char* index, const char* data)\
{\
bool ret = false;\
className* object = static_cast<className*>(obj);\
ret = object->_set##name(StringTable->insert(data));\
return ret;\
}
#define DECLARE_IMAGEASSET_NET_SETGET(className, name, bitmask)\
static bool _set##name##Data(void* obj, const char* index, const char* data)\
{\
bool ret = false;\
className* object = static_cast<className*>(obj);\
ret = object->_set##name(StringTable->insert(data));\
if(ret)\
object->setMaskBits(bitmask);\
return ret;\
}
#define DEF_IMAGEASSET_BINDS(className,name)\
DefineEngineMethod(className, get##name, const char*, (), , "get name")\
{\
return object->get##name(); \
}\
DefineEngineMethod(className, get##name##Asset, const char*, (), , assetText(name, asset reference))\
{\
return object->m##name##AssetId; \
}\
DefineEngineMethod(className, set##name, bool, (const char* map), , assetText(name,assignment. first tries asset then flat file.))\
{\
return object->_set##name(StringTable->insert(map));\
}
#define INIT_IMAGEASSET(name) \
m##name##Name = StringTable->EmptyString(); \
m##name##AssetId = StringTable->EmptyString(); \
m##name##Asset = NULL;
#ifdef TORQUE_SHOW_LEGACY_FILE_FIELDS #ifdef TORQUE_SHOW_LEGACY_FILE_FIELDS
#define INITPERSISTFIELD_IMAGEASSET(name, consoleClass, docs) \ #define INITPERSISTFIELD_IMAGEASSET(name, consoleClass, docs) \
@ -326,11 +287,6 @@ DefineEngineMethod(className, set##name, bool, (const char* map), , assetText(na
#endif // SHOW_LEGACY_FILE_FIELDS #endif // SHOW_LEGACY_FILE_FIELDS
#define CLONE_IMAGEASSET(name) \
m##name##Name = other.m##name##Name;\
m##name##AssetId = other.m##name##AssetId;\
m##name##Asset = other.m##name##Asset;
#define LOAD_IMAGEASSET(name)\ #define LOAD_IMAGEASSET(name)\
if (m##name##AssetId != StringTable->EmptyString())\ if (m##name##AssetId != StringTable->EmptyString())\
{\ {\
@ -342,43 +298,6 @@ if (m##name##AssetId != StringTable->EmptyString())\
else Con::warnf("Warning: %s::LOAD_IMAGEASSET(%s)-%s", mClassName, m##name##AssetId, ImageAsset::getAssetErrstrn(assetState).c_str());\ else Con::warnf("Warning: %s::LOAD_IMAGEASSET(%s)-%s", mClassName, m##name##AssetId, ImageAsset::getAssetErrstrn(assetState).c_str());\
} }
#define PACKDATA_IMAGEASSET(name)\
if (stream->writeFlag(m##name##Asset.notNull()))\
{\
stream->writeString(m##name##Asset.getAssetId());\
}\
else\
stream->writeString(m##name##Name);
#define UNPACKDATA_IMAGEASSET(name)\
if (stream->readFlag())\
{\
m##name##AssetId = stream->readSTString();\
_set##name(m##name##AssetId);\
}\
else\
{\
m##name##Name = stream->readSTString();\
_set##name(m##name##Name);\
}\
#define PACK_IMAGEASSET(netconn, name)\
if (stream->writeFlag(m##name##Asset.notNull()))\
{\
NetStringHandle assetIdStr = m##name##Asset.getAssetId();\
netconn->packNetStringHandleU(stream, assetIdStr);\
}\
else\
stream->writeString(m##name##Name);
#define UNPACK_IMAGEASSET(netconn, name)\
if (stream->readFlag())\
{\
m##name##AssetId = StringTable->insert(netconn->unpackNetStringHandleU(stream).getString());\
_set##name(m##name##AssetId);\
}\
else\
m##name##Name = stream->readSTString();
#pragma endregion #pragma endregion
@ -542,13 +461,6 @@ DefineEngineMethod(className, set##name, bool, (const char* map, S32 index), , a
return object->_set##name(StringTable->insert(map), index);\ return object->_set##name(StringTable->insert(map), index);\
} }
#define INIT_IMAGEASSET_ARRAY(name, index) \
{\
m##name##Name[index] = StringTable->EmptyString(); \
m##name##AssetId[index] = StringTable->EmptyString(); \
m##name##Asset[index] = NULL;\
}
#ifdef TORQUE_SHOW_LEGACY_FILE_FIELDS #ifdef TORQUE_SHOW_LEGACY_FILE_FIELDS
#define INITPERSISTFIELD_IMAGEASSET_ARRAY(name, arraySize, consoleClass, docs) \ #define INITPERSISTFIELD_IMAGEASSET_ARRAY(name, arraySize, consoleClass, docs) \
@ -563,13 +475,6 @@ DefineEngineMethod(className, set##name, bool, (const char* map, S32 index), , a
#endif #endif
#define CLONE_IMAGEASSET_ARRAY(name, index) \
{\
m##name##Name[index] = other.m##name##Name[index];\
m##name##AssetId[index] = other.m##name##AssetId[index];\
m##name##Asset[index] = other.m##name##Asset[index];\
}
#define LOAD_IMAGEASSET_ARRAY(name, index)\ #define LOAD_IMAGEASSET_ARRAY(name, index)\
if (m##name##AssetId[index] != StringTable->EmptyString())\ if (m##name##AssetId[index] != StringTable->EmptyString())\
{\ {\
@ -581,44 +486,6 @@ if (m##name##AssetId[index] != StringTable->EmptyString())\
else Con::warnf("Warning: %s::LOAD_IMAGEASSET(%s)-%s", mClassName, m##name##AssetId[index], ImageAsset::getAssetErrstrn(assetState).c_str());\ else Con::warnf("Warning: %s::LOAD_IMAGEASSET(%s)-%s", mClassName, m##name##AssetId[index], ImageAsset::getAssetErrstrn(assetState).c_str());\
} }
#define PACKDATA_IMAGEASSET_ARRAY(name, index)\
if (stream->writeFlag(m##name##Asset[index].notNull()))\
{\
stream->writeString(m##name##Asset[index].getAssetId());\
}\
else\
stream->writeString(m##name##Name[index]);
#define UNPACKDATA_IMAGEASSET_ARRAY(name, index)\
if (stream->readFlag())\
{\
m##name##AssetId[index] = stream->readSTString();\
_set##name(m##name##AssetId[index], index);\
}\
else\
{\
m##name##Name[index] = stream->readSTString();\
_set##name(m##name##Name[index], index);\
}\
#define PACK_IMAGEASSET_ARRAY(netconn, name, index)\
if (stream->writeFlag(m##name##Asset[index].notNull()))\
{\
NetStringHandle assetIdStr = m##name##Asset[index].getAssetId();\
netconn->packNetStringHandleU(stream, assetIdStr);\
}\
else\
stream->writeString(m##name##Name[index]);
#define UNPACK_IMAGEASSET_ARRAY(netconn, name, index)\
if (stream->readFlag())\
{\
m##name##AssetId[index] = StringTable->insert(netconn->unpackNetStringHandleU(stream).getString());\
_set##name(m##name##AssetId[index], index);\
}\
else\
m##name##Name[index] = stream->readSTString();
#pragma endregion #pragma endregion

View file

@ -54,6 +54,7 @@
#include "materials/materialDefinition.h" #include "materials/materialDefinition.h"
#include "materials/customMaterialDefinition.h" #include "materials/customMaterialDefinition.h"
#include "materials/materialManager.h" #include "materials/materialManager.h"
#include "assetMacroHelpers.h"
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
class MaterialAsset : public AssetBase class MaterialAsset : public AssetBase
@ -262,46 +263,6 @@ public: \
}\ }\
bool is##name##Valid() {return (get##name() != StringTable->EmptyString() && m##name##Asset->getStatus() == AssetBase::Ok); } bool is##name##Valid() {return (get##name() != StringTable->EmptyString() && m##name##Asset->getStatus() == AssetBase::Ok); }
#define DECLARE_MATERIALASSET_SETGET(className, name)\
static bool _set##name##Data(void* obj, const char* index, const char* data)\
{\
bool ret = false;\
className* object = static_cast<className*>(obj);\
ret = object->_set##name(StringTable->insert(data));\
return ret;\
}
#define DECLARE_MATERIALASSET_NET_SETGET(className, name, bitmask)\
static bool _set##name##Data(void* obj, const char* index, const char* data)\
{\
bool ret = false;\
className* object = static_cast<className*>(obj);\
ret = object->_set##name(StringTable->insert(data));\
if(ret)\
object->setMaskBits(bitmask);\
return ret;\
}
#define DEF_MATERIALASSET_BINDS(className,name)\
DefineEngineMethod(className, get##name, const char*, (), , "get name")\
{\
return object->get##name(); \
}\
DefineEngineMethod(className, get##name##Asset, const char*, (), , assetText(name, asset reference))\
{\
return object->m##name##AssetId; \
}\
DefineEngineMethod(className, set##name, bool, (const char* mat), , assetText(name,assignment. first tries asset then material name.))\
{\
return object->_set##name(StringTable->insert(mat));\
}
#define INIT_MATERIALASSET(name) \
m##name##Name = StringTable->EmptyString(); \
m##name##AssetId = StringTable->EmptyString(); \
m##name##Asset = NULL;\
m##name = NULL;
#ifdef TORQUE_SHOW_LEGACY_FILE_FIELDS #ifdef TORQUE_SHOW_LEGACY_FILE_FIELDS
#define INITPERSISTFIELD_MATERIALASSET(name, consoleClass, docs) \ #define INITPERSISTFIELD_MATERIALASSET(name, consoleClass, docs) \
@ -316,11 +277,6 @@ DefineEngineMethod(className, set##name, bool, (const char* mat), , assetText(na
#endif // SHOW_LEGACY_FILE_FIELDS #endif // SHOW_LEGACY_FILE_FIELDS
#define CLONE_MATERIALASSET(name) \
m##name##Name = other.m##name##Name;\
m##name##AssetId = other.m##name##AssetId;\
m##name##Asset = other.m##name##Asset;
#define LOAD_MATERIALASSET(name)\ #define LOAD_MATERIALASSET(name)\
if (m##name##AssetId != StringTable->EmptyString())\ if (m##name##AssetId != StringTable->EmptyString())\
{\ {\
@ -331,45 +287,6 @@ if (m##name##AssetId != StringTable->EmptyString())\
}\ }\
else Con::warnf("Warning: %s::LOAD_MATERIALASSET(%s)-%s", mClassName, m##name##AssetId, MaterialAsset::getAssetErrstrn(assetState).c_str());\ else Con::warnf("Warning: %s::LOAD_MATERIALASSET(%s)-%s", mClassName, m##name##AssetId, MaterialAsset::getAssetErrstrn(assetState).c_str());\
} }
#define PACKDATA_MATERIALASSET(name)\
if (stream->writeFlag(m##name##Asset.notNull()))\
{\
stream->writeString(m##name##Asset.getAssetId());\
}\
else\
stream->writeString(m##name##Name);
#define UNPACKDATA_MATERIALASSET(name)\
if (stream->readFlag())\
{\
m##name##AssetId = stream->readSTString();\
_set##name(m##name##AssetId);\
}\
else\
{\
m##name##Name = stream->readSTString();\
_set##name(m##name##Name);\
}\
#define PACK_MATERIALASSET(netconn, name)\
if (stream->writeFlag(m##name##Asset.notNull()))\
{\
NetStringHandle assetIdStr = m##name##Asset.getAssetId();\
netconn->packNetStringHandleU(stream, assetIdStr);\
}\
else\
stream->writeString(m##name##Name);
#define UNPACK_MATERIALASSET(netconn, name)\
if (stream->readFlag())\
{\
m##name##AssetId = StringTable->insert(netconn->unpackNetStringHandleU(stream).getString());\
_set##name(m##name##AssetId);\
}\
else\
m##name##Name = stream->readSTString();
#pragma endregion #pragma endregion
#endif // _ASSET_BASE_H_ #endif // _ASSET_BASE_H_

View file

@ -60,6 +60,7 @@
#ifndef _BITSTREAM_H_ #ifndef _BITSTREAM_H_
#include "core/stream/bitStream.h" #include "core/stream/bitStream.h"
#endif #endif
#include "assetMacroHelpers.h"
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
class ShapeAsset : public AssetBase class ShapeAsset : public AssetBase
{ {
@ -324,46 +325,6 @@ public: \
}\ }\
bool is##name##Valid() {return (get##name() != StringTable->EmptyString() && m##name##Asset->getStatus() == AssetBase::Ok); } bool is##name##Valid() {return (get##name() != StringTable->EmptyString() && m##name##Asset->getStatus() == AssetBase::Ok); }
#define DECLARE_SHAPEASSET_SETGET(className, name)\
static bool _set##name##Data(void* obj, const char* index, const char* data)\
{\
bool ret = false;\
className* object = static_cast<className*>(obj);\
ret = object->_set##name(StringTable->insert(data));\
return ret;\
}
#define DECLARE_SHAPEASSET_NET_SETGET(className, name, bitmask)\
static bool _set##name##Data(void* obj, const char* index, const char* data)\
{\
bool ret = false;\
className* object = static_cast<className*>(obj);\
ret = object->_set##name(StringTable->insert(data));\
if(ret)\
object->setMaskBits(bitmask);\
return ret;\
}
#define DEF_SHAPEASSET_BINDS(className,name)\
DefineEngineMethod(className, get##name, String, (), , "get name")\
{\
return object->get##name(); \
}\
DefineEngineMethod(className, get##name##Asset, String, (), , assetText(name, asset reference))\
{\
return object->m##name##AssetId; \
}\
DefineEngineMethod(className, set##name, bool, (const char* shape), , assetText(name,assignment. first tries asset then flat file.))\
{\
return object->_set##name(StringTable->insert(shape));\
}
#define INIT_SHAPEASSET(name) \
m##name##Name = StringTable->EmptyString(); \
m##name##AssetId = StringTable->EmptyString(); \
m##name##Asset = NULL; \
m##name = NULL;
#ifdef TORQUE_SHOW_LEGACY_FILE_FIELDS #ifdef TORQUE_SHOW_LEGACY_FILE_FIELDS
#define INITPERSISTFIELD_SHAPEASSET(name, consoleClass, docs) \ #define INITPERSISTFIELD_SHAPEASSET(name, consoleClass, docs) \
@ -378,49 +339,6 @@ DefineEngineMethod(className, set##name, bool, (const char* shape), , assetText
#endif // SHOW_LEGACY_FILE_FIELDS #endif // SHOW_LEGACY_FILE_FIELDS
#define CLONE_SHAPEASSET(name) \
m##name##Name = other.m##name##Name;\
m##name##AssetId = other.m##name##AssetId;\
m##name##Asset = other.m##name##Asset;\
#define PACKDATA_SHAPEASSET(name)\
if (stream->writeFlag(m##name##Asset.notNull()))\
{\
stream->writeString(m##name##Asset.getAssetId());\
}\
else\
stream->writeString(m##name##Name);
#define UNPACKDATA_SHAPEASSET(name)\
if (stream->readFlag())\
{\
m##name##AssetId = stream->readSTString();\
_set##name(m##name##AssetId);\
}\
else\
{\
m##name##Name = stream->readSTString();\
_set##name(m##name##Name);\
}
#define PACK_SHAPEASSET(netconn, name)\
if (stream->writeFlag(m##name##Asset.notNull()))\
{\
NetStringHandle assetIdStr = m##name##Asset.getAssetId();\
netconn->packNetStringHandleU(stream, assetIdStr);\
}\
else\
stream->writeString(m##name##Name);
#define UNPACK_SHAPEASSET(netconn, name)\
if (stream->readFlag())\
{\
m##name##AssetId = StringTable->insert(netconn->unpackNetStringHandleU(stream).getString());\
_set##name(m##name##AssetId);\
}\
else\
m##name##Name = stream->readSTString();
#pragma endregion #pragma endregion
#pragma region Arrayed Asset Macros #pragma region Arrayed Asset Macros
@ -526,58 +444,6 @@ public: \
}\ }\
bool is##name##Valid(const U32& id) {return (get##name(id) != StringTable->EmptyString() && m##name##Asset[id]->getStatus() == AssetBase::Ok); } bool is##name##Valid(const U32& id) {return (get##name(id) != StringTable->EmptyString() && m##name##Asset[id]->getStatus() == AssetBase::Ok); }
#define DECLARE_SHAPEASSET_ARRAY_SETGET(className, name)\
static bool _set##name##Data(void* obj, const char* index, const char* data)\
{\
if (!index) return false;\
U32 idx = dAtoi(index);\
if (idx >= sm##name##Count)\
return false;\
bool ret = false;\
className* object = static_cast<className*>(obj);\
ret = object->_set##name(StringTable->insert(data), idx);\
return ret;\
}
#define DECLARE_SHAPEASSET_ARRAY_NET_SETGET(className, name, bitmask)\
static bool _set##name##Data(void* obj, const char* index, const char* data)\
{\
if (!index) return false;\
U32 idx = dAtoi(index);\
if (idx >= sm##name##Count)\
return false;\
bool ret = false;\
className* object = static_cast<className*>(obj);\
ret = object->_set##name(StringTable->insert(data), idx);\
if(ret)\
object->setMaskBits(bitmask);\
return ret;\
}
#define DEF_SHAPEASSET_ARRAY_BINDS(className,name)\
DefineEngineMethod(className, get##name, String, (S32 index), , "get name")\
{\
return object->get##name(index); \
}\
DefineEngineMethod(className, get##name##Asset, String, (S32 index), , assetText(name, asset reference))\
{\
if(index >= className::sm##name##Count || index < 0)\
return "";\
return object->m##name##AssetId[index]; \
}\
DefineEngineMethod(className, set##name, bool, (const char* shape, S32 index), , assetText(name,assignment. first tries asset then flat file.))\
{\
return object->_set##name(StringTable->insert(shape), index);\
}
#define INIT_SHAPEASSET_ARRAY(name, index) \
{\
m##name##Name[index] = StringTable->EmptyString(); \
m##name##AssetId[index] = StringTable->EmptyString(); \
m##name##Asset[index] = NULL; \
m##name[index] = NULL;\
}
#ifdef TORQUE_SHOW_LEGACY_FILE_FIELDS #ifdef TORQUE_SHOW_LEGACY_FILE_FIELDS
#define INITPERSISTFIELD_SHAPEASSET_ARRAY(name, arraySize, consoleClass, docs) \ #define INITPERSISTFIELD_SHAPEASSET_ARRAY(name, arraySize, consoleClass, docs) \
@ -592,51 +458,6 @@ DefineEngineMethod(className, set##name, bool, (const char* shape, S32 index),
#endif // SHOW_LEGACY_FILE_FIELDS #endif // SHOW_LEGACY_FILE_FIELDS
#define CLONE_SHAPEASSET_ARRAY(name, index) \
{\
m##name##Name[index] = other.m##name##Name[index];\
m##name##AssetId[index] = other.m##name##AssetId[index];\
m##name##Asset[index] = other.m##name##Asset[index];\
}
#define PACKDATA_SHAPEASSET_ARRAY(name, index)\
if (stream->writeFlag(m##name##Asset[index].notNull()))\
{\
stream->writeString(m##name##Asset[index].getAssetId());\
}\
else\
stream->writeString(m##name##Name[index]);
#define UNPACKDATA_SHAPEASSET_ARRAY(name, index)\
if (stream->readFlag())\
{\
m##name##AssetId[index] = stream->readSTString();\
_set##name(m##name##AssetId[index], index);\
}\
else\
{\
m##name##Name[index] = stream->readSTString();\
_set##name(m##name##Name[index], index);\
}
#define PACK_SHAPEASSET_ARRAY(netconn, name, index)\
if (stream->writeFlag(m##name##Asset[index].notNull()))\
{\
NetStringHandle assetIdStr = m##name##Asset[index].getAssetId();\
netconn->packNetStringHandleU(stream, assetIdStr);\
}\
else\
stream->writeString(m##name##Name[index]);
#define UNPACK_SHAPEASSET_ARRAY(netconn, name, index)\
if (stream->readFlag())\
{\
m##name##AssetId[index] = StringTable->insert(netconn->unpackNetStringHandleU(stream).getString());\
_set##name(m##name##AssetId[index], index);\
}\
else\
m##name##Name[index] = stream->readSTString();
#pragma endregion #pragma endregion
#endif #endif

View file

@ -57,6 +57,7 @@
#include "sfx/sfxProfile.h" #include "sfx/sfxProfile.h"
#endif // !_SFXPROFILE_H_ #endif // !_SFXPROFILE_H_
#include "assetMacroHelpers.h"
class SFXResource; class SFXResource;
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@ -275,46 +276,6 @@ public: \
}\ }\
bool is##name##Valid() { return (get##name() != StringTable->EmptyString() && m##name##Asset->getStatus() == AssetBase::Ok); } bool is##name##Valid() { return (get##name() != StringTable->EmptyString() && m##name##Asset->getStatus() == AssetBase::Ok); }
#define DECLARE_SOUNDASSET_SETGET(className, name)\
static bool _set##name##Data(void* obj, const char* index, const char* data)\
{\
bool ret = false;\
className* object = static_cast<className*>(obj);\
ret = object->_set##name(StringTable->insert(data));\
return ret;\
}
#define DECLARE_SOUNDASSET_NET_SETGET(className, name, bitmask)\
static bool _set##name##Data(void* obj, const char* index, const char* data)\
{\
bool ret = false;\
className* object = static_cast<className*>(obj);\
ret = object->_set##name(StringTable->insert(data));\
if(ret)\
object->setMaskBits(bitmask);\
return ret;\
}
#define DEF_SOUNDASSET_BINDS(className,name)\
DefineEngineMethod(className, get##name, String, (), , "get name")\
{\
return object->get##name(); \
}\
DefineEngineMethod(className, get##name##Asset, String, (), , assetText(name, asset reference))\
{\
return object->m##name##AssetId; \
}\
DefineEngineMethod(className, set##name, bool, (const char* shape), , assetText(name,assignment. first tries asset then flat file.))\
{\
return object->_set##name(StringTable->insert(shape));\
}
#define INIT_SOUNDASSET(name) \
m##name##Name = StringTable->EmptyString(); \
m##name##AssetId = StringTable->EmptyString(); \
m##name##Asset = NULL; \
m##name = NULL;\
#ifdef TORQUE_SHOW_LEGACY_FILE_FIELDS #ifdef TORQUE_SHOW_LEGACY_FILE_FIELDS
#define INITPERSISTFIELD_SOUNDASSET(name, consoleClass, docs) \ #define INITPERSISTFIELD_SOUNDASSET(name, consoleClass, docs) \
@ -329,49 +290,6 @@ DefineEngineMethod(className, set##name, bool, (const char* shape), , assetText
#endif // TORQUE_SHOW_LEGACY_FILE_FIELDS #endif // TORQUE_SHOW_LEGACY_FILE_FIELDS
#define CLONE_SOUNDASSET(name) \
m##name##Name = other.m##name##Name;\
m##name##AssetId = other.m##name##AssetId;\
m##name##Asset = other.m##name##Asset;\
#define PACKDATA_SOUNDASSET(name)\
if (stream->writeFlag(m##name##Asset.notNull()))\
{\
stream->writeString(m##name##Asset.getAssetId());\
}\
else\
stream->writeString(m##name##Name);
#define UNPACKDATA_SOUNDASSET(name)\
if (stream->readFlag())\
{\
m##name##AssetId = stream->readSTString();\
_set##name(m##name##AssetId);\
}\
else\
{\
m##name##Name = stream->readSTString();\
_set##name(m##name##Name);\
}
#define PACK_SOUNDASSET(netconn, name)\
if (stream->writeFlag(m##name##Asset.notNull()))\
{\
NetStringHandle assetIdStr = m##name##Asset.getAssetId();\
netconn->packNetStringHandleU(stream, assetIdStr);\
}\
else\
stream->writeString(m##name##Name);
#define UNPACK_SOUNDASSET(netconn, name)\
if (stream->readFlag())\
{\
m##name##AssetId = StringTable->insert(netconn->unpackNetStringHandleU(stream).getString());\
_set##name(m##name##AssetId);\
}\
else\
m##name##Name = stream->readSTString();
#pragma endregion #pragma endregion
#pragma region Arrayed Asset Macros #pragma region Arrayed Asset Macros
@ -491,57 +409,6 @@ public: \
}\ }\
bool is##name##Valid(const U32& id) {return (get##name(id) != StringTable->EmptyString() && m##name##Asset[id]->getStatus() == AssetBase::Ok); } bool is##name##Valid(const U32& id) {return (get##name(id) != StringTable->EmptyString() && m##name##Asset[id]->getStatus() == AssetBase::Ok); }
#define DECLARE_SOUNDASSET_ARRAY_SETGET(className, name)\
static bool _set##name##Data(void* obj, const char* index, const char* data)\
{\
if(!index) return false;\
U32 idx = dAtoi(index);\
if (idx >= sm##name##Count)\
return false;\
bool ret = false;\
className* object = static_cast<className*>(obj);\
ret = object->_set##name(StringTable->insert(data), idx);\
return ret;\
}
#define DECLARE_SOUNDASSET_ARRAY_NET_SETGET(className, name, bitmask)\
static bool _set##name##Data(void* obj, const char* index, const char* data)\
{\
if (!index) return false;\
U32 idx = dAtoi(index);\
if (idx >= sm##name##Count)\
return false;\
bool ret = false;\
className* object = static_cast<className*>(obj);\
ret = object->_set##name(StringTable->insert(data, idx));\
if(ret)\
object->setMaskBits(bitmask);\
return ret;\
}
#define DEF_SOUNDASSET_ARRAY_BINDS(className,name)\
DefineEngineMethod(className, get##name, const char*, (S32 index), , "get name")\
{\
return object->get##name(index); \
}\
DefineEngineMethod(className, get##name##Asset, const char*, (S32 index), , assetText(name, asset reference))\
{\
if(index >= className::sm##name##Count || index < 0)\
return "";\
return object->m##name##AssetId[index]; \
}\
DefineEngineMethod(className, set##name, bool, (const char* map, S32 index), , assetText(name,assignment. first tries asset then flat file.))\
{\
return object->_set##name(StringTable->insert(map), index);\
}
#define INIT_SOUNDASSET_ARRAY(name, index) \
{\
m##name##Name[index] = StringTable->EmptyString(); \
m##name##AssetId[index] = StringTable->EmptyString(); \
m##name##Asset[index] = NULL;\
m##name[index] = NULL;\
}
#ifdef TORQUE_SHOW_LEGACY_FILE_FIELDS #ifdef TORQUE_SHOW_LEGACY_FILE_FIELDS
@ -557,14 +424,6 @@ DefineEngineMethod(className, set##name, bool, (const char* map, S32 index), , a
#endif #endif
#define CLONE_SOUNDASSET_ARRAY(name, index) \
{\
m##name##Name[index] = other.m##name##Name[index];\
m##name##AssetId[index] = other.m##name##AssetId[index];\
m##name##Asset[index] = other.m##name##Asset[index];\
m##name[index] = = other.m##name[index];\
}
#define LOAD_SOUNDASSET_ARRAY(name, index)\ #define LOAD_SOUNDASSET_ARRAY(name, index)\
if (m##name##AssetId[index] != StringTable->EmptyString())\ if (m##name##AssetId[index] != StringTable->EmptyString())\
{\ {\
@ -576,75 +435,6 @@ if (m##name##AssetId[index] != StringTable->EmptyString())\
else Con::warnf("Warning: %s::LOAD_IMAGEASSET(%s)-%s", mClassName, m##name##AssetId[index], ImageAsset::getAssetErrstrn(assetState).c_str());\ else Con::warnf("Warning: %s::LOAD_IMAGEASSET(%s)-%s", mClassName, m##name##AssetId[index], ImageAsset::getAssetErrstrn(assetState).c_str());\
} }
#define PACKDATA_SOUNDASSET_ARRAY(name, index)\
if (stream->writeFlag(m##name##Asset[index].notNull()))\
{\
stream->writeString(m##name##Asset[index].getAssetId());\
}\
else\
stream->writeString(m##name##Name[index]);
#define UNPACKDATA_SOUNDASSET_ARRAY(name, index)\
if (stream->readFlag())\
{\
m##name##AssetId[index] = stream->readSTString();\
_set##name(m##name##AssetId[index], index);\
}\
else\
{\
m##name##Name[index] = stream->readSTString();\
_set##name(m##name##AssetId[index], index);\
}
#define PACK_SOUNDASSET_ARRAY(netconn, name, index)\
if (stream->writeFlag(m##name##Asset[index].notNull()))\
{\
NetStringHandle assetIdStr = m##name##Asset[index].getAssetId();\
netconn->packNetStringHandleU(stream, assetIdStr);\
}\
else\
stream->writeString(m##name##Name[index]);
#define UNPACK_SOUNDASSET_ARRAY(netconn, name, index)\
if (stream->readFlag())\
{\
m##name##AssetId[index] = StringTable->insert(netconn->unpackNetStringHandleU(stream).getString());\
_set##name(m##name##AssetId[index], index);\
}\
else\
{\
m##name##Name[index] = stream->readSTString();\
_set##name(m##name##AssetId[index], index);\
}
#define PACKDATA_SOUNDASSET_ARRAY_ENUMED(name, enumType, index )\
{\
if (stream->writeFlag(m##name##Asset[index].notNull()))\
{\
stream->writeString(m##name##Asset[index].getAssetId());\
const char* enumString = castConsoleTypeToString(static_cast<enumType>(index));\
Con::printf("pack: %s = %s",enumString, m##name##AssetId[index]);\
}\
else\
stream->writeString(m##name##Name[index]);\
}
#define UNPACKDATA_SOUNDASSET_ARRAY_ENUMED(name, enumType, index )\
{\
if (stream->readFlag())\
{\
m##name##AssetId[index] = stream->readSTString();\
_set##name(m##name##AssetId[index], index);\
const char* enumString = castConsoleTypeToString(static_cast<enumType>(index));\
Con::printf("unpack: %s = %s",enumString, m##name##AssetId[index]);\
}\
else\
{\
m##name##Name[index] = stream->readSTString();\
_set##name(m##name##AssetId[index], index);\
}\
}
#define assetEnumNameConcat(x,suff)(new std::string( x + std::string(#suff)))->c_str() #define assetEnumNameConcat(x,suff)(new std::string( x + std::string(#suff)))->c_str()
#define INITPERSISTFIELD_SOUNDASSET_ENUMED(name, enumType, maxValue, consoleClass, docs) \ #define INITPERSISTFIELD_SOUNDASSET_ENUMED(name, enumType, maxValue, consoleClass, docs) \
@ -652,7 +442,7 @@ if (m##name##AssetId[index] != StringTable->EmptyString())\
{\ {\
const char* enumString = castConsoleTypeToString(static_cast<enumType>(i));\ const char* enumString = castConsoleTypeToString(static_cast<enumType>(i));\
if (enumString && enumString[0])\ if (enumString && enumString[0])\
{ Con::printf("%s", enumString);\ {\
addField(assetEnumNameConcat(enumString, File), TypeSoundFilename, Offset(m##name##Name[i], consoleClass), assetText(name, docs), AbstractClassRep::FIELD_HideInInspectors); \ addField(assetEnumNameConcat(enumString, File), TypeSoundFilename, Offset(m##name##Name[i], consoleClass), assetText(name, docs), AbstractClassRep::FIELD_HideInInspectors); \
addField(assetEnumNameConcat(enumString, Asset), TypeSoundAssetId, Offset(m##name##AssetId[i], consoleClass), assetText(name, asset reference.));\ addField(assetEnumNameConcat(enumString, Asset), TypeSoundAssetId, Offset(m##name##AssetId[i], consoleClass), assetText(name, asset reference.));\
}\ }\

View file

@ -0,0 +1,274 @@
//-----------------------------------------------------------------------------
// Copyright (c) 2013 GarageGames, LLC
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
//general class-injection hooks for asset support. not all cases are needed for every class/usage.
//-----------------------------------------------------------------------------
/// INDIVIDUALIZED CLASS ENTRIES
//-----------------------------------------------------------------------------
//iniitalization
#define INIT_ASSET(name) \
m##name##Name = StringTable->EmptyString(); \
m##name##AssetId = StringTable->EmptyString(); \
m##name##Asset = NULL;\
m##name = NULL;
// copy constructor
#define CLONE_ASSET(name) \
m##name##Name = other.m##name##Name;\
m##name##AssetId = other.m##name##AssetId;\
m##name##Asset = other.m##name##Asset;\
m##name = other.m##name
// addProtectedField acessors
#define DECLARE_ASSET_SETGET(className, name)\
static bool _set##name##Data(void* obj, const char* index, const char* data)\
{\
bool ret = false;\
className* object = static_cast<className*>(obj);\
ret = object->_set##name(StringTable->insert(data));\
return ret;\
}
// addProtectedField acessors for networked objects (sets a flag)
#define DECLARE_ASSET_NET_SETGET(className, name, bitmask)\
static bool _set##name##Data(void* obj, const char* index, const char* data)\
{\
bool ret = false;\
className* object = static_cast<className*>(obj);\
ret = object->_set##name(StringTable->insert(data));\
if(ret)\
object->setMaskBits(bitmask);\
return ret;\
}
//network send - datablock
#define PACKDATA_ASSET(name)\
if (stream->writeFlag(m##name##Asset.notNull()))\
{\
stream->writeString(m##name##Asset.getAssetId());\
}\
else\
stream->writeString(m##name##Name);
//network recieve - datablock
#define UNPACKDATA_ASSET(name)\
if (stream->readFlag())\
{\
m##name##AssetId = stream->readSTString();\
_set##name(m##name##AssetId);\
}\
else\
{\
m##name##Name = stream->readSTString();\
_set##name(m##name##Name);\
}
//network send - object-instance
#define PACK_ASSET(netconn, name)\
if (stream->writeFlag(m##name##Asset.notNull()))\
{\
NetStringHandle assetIdStr = m##name##Asset.getAssetId();\
netconn->packNetStringHandleU(stream, assetIdStr);\
}\
else\
stream->writeString(m##name##Name);
//network recieve - object-instance
#define UNPACK_ASSET(netconn, name)\
if (stream->readFlag())\
{\
m##name##AssetId = StringTable->insert(netconn->unpackNetStringHandleU(stream).getString());\
_set##name(m##name##AssetId);\
}\
else\
m##name##Name = stream->readSTString();
//script methods for class.asset acces
//declare general get<entry>, get<entry>Asset and set<entry> methods
#define DEF_ASSET_BINDS(className,name)\
DefineEngineMethod(className, get##name, String, (), , "get name")\
{\
return object->get##name(); \
}\
DefineEngineMethod(className, get##name##Asset, String, (), , assetText(name, asset reference))\
{\
return object->m##name##AssetId; \
}\
DefineEngineMethod(className, set##name, bool, (const char* assetName), , assetText(name,assignment. first tries asset then flat file.))\
{\
return object->_set##name(StringTable->insert(assetName));\
}
//-----------------------------------------------------------------------------
/// ARRAY CLASS ENTRIES
//-----------------------------------------------------------------------------
//iniitalization
#define INIT_ASSET_ARRAY(name, index) \
{\
m##name##Name[index] = StringTable->EmptyString(); \
m##name##AssetId[index] = StringTable->EmptyString(); \
m##name##Asset[index] = NULL;\
m##name[index] = NULL;\
}
// copy constructor
#define CLONE_ASSET_ARRAY(name, index) \
{\
m##name##Name[index] = other.m##name##Name[index];\
m##name##AssetId[index] = other.m##name##AssetId[index];\
m##name##Asset[index] = other.m##name##Asset[index];\
m##name[index] = other.m##name[index];\
}
// addProtectedField acessors
#define DECLARE_ASSET_ARRAY_SETGET(className, name)\
static bool _set##name##Data(void* obj, const char* index, const char* data)\
{\
if(!index) return false;\
U32 idx = dAtoi(index);\
if (idx >= sm##name##Count)\
return false;\
bool ret = false;\
className* object = static_cast<className*>(obj);\
ret = object->_set##name(StringTable->insert(data), idx);\
return ret;\
}
// addProtectedField acessors for networked objects (sets a flag)
#define DECLARE_ASSET_ARRAY_NET_SETGET(className, name, bitmask)\
static bool _set##name##Data(void* obj, const char* index, const char* data)\
{\
if (!index) return false;\
U32 idx = dAtoi(index);\
if (idx >= sm##name##Count)\
return false;\
bool ret = false;\
className* object = static_cast<className*>(obj);\
ret = object->_set##name(StringTable->insert(data), idx);\
if(ret)\
object->setMaskBits(bitmask);\
return ret;\
}
//network send - datablock
#define PACKDATA_ASSET_ARRAY(name, index)\
if (stream->writeFlag(m##name##Asset[index].notNull()))\
{\
stream->writeString(m##name##Asset[index].getAssetId());\
}\
else\
stream->writeString(m##name##Name[index]);
//network recieve - datablock
#define UNPACKDATA_ASSET_ARRAY(name, index)\
if (stream->readFlag())\
{\
m##name##AssetId[index] = stream->readSTString();\
_set##name(m##name##AssetId[index], index);\
}\
else\
{\
m##name##Name[index] = stream->readSTString();\
_set##name(m##name##Name[index], index);\
}
//network send - object-instance
#define PACK_ASSET_ARRAY(netconn, name, index)\
if (stream->writeFlag(m##name##Asset[index].notNull()))\
{\
NetStringHandle assetIdStr = m##name##Asset[index].getAssetId();\
netconn->packNetStringHandleU(stream, assetIdStr);\
}\
else\
stream->writeString(m##name##Name[index]);
//network recieve - object-instance
#define UNPACK_ASSET_ARRAY(netconn, name, index)\
if (stream->readFlag())\
{\
m##name##AssetId[index] = StringTable->insert(netconn->unpackNetStringHandleU(stream).getString());\
_set##name(m##name##AssetId[index], index);\
}\
else\
{\
m##name##Name[index] = stream->readSTString();\
_set##name(m##name##Name[index], index);\
}
//script methods for class.asset acces
//declare general get<entry>, get<entry>Asset and set<entry> methods
//signatures are:
//using DiffuseMap as an example
//material.getDiffuseMap(%layer); //returns the raw file referenced
//material.getDiffuseMapAsset(%layer); //returns the asset id
//material.setDiffuseMap(%texture, %layer); //tries to set the asset and failing that attempts a flat file reference
#define DEF_ASSET_ARRAY_BINDS(className,name)\
DefineEngineMethod(className, get##name, const char*, (S32 index), , "get name")\
{\
return object->get##name(index); \
}\
DefineEngineMethod(className, get##name##Asset, const char*, (S32 index), , assetText(name, asset reference))\
{\
if(index >= className::sm##name##Count || index < 0)\
return "";\
return object->m##name##AssetId[index]; \
}\
DefineEngineMethod(className, set##name, bool, (const char* assetName, S32 index), , assetText(name,assignment. first tries asset then flat file.))\
{\
return object->_set##name(StringTable->insert(assetName), index);\
}
//-----------------------------------------------------------------------------
/// ARRAYS REFERENCED VIA ENUM CLASS ENTRIES
//-----------------------------------------------------------------------------
//
// substite these in to see the enum strings and assigned values
//network send - object-instance
#define PACKDATA_ASSET_ARRAY_ENUMED(name, enumType, index )\
{\
if (stream->writeFlag(m##name##Asset[index].notNull()))\
{\
stream->writeString(m##name##Asset[index].getAssetId());\
const char* enumString = castConsoleTypeToString(static_cast<enumType>(index));\
Con::printf("pack: %s = %s",enumString, m##name##AssetId[index]);\
}\
else\
stream->writeString(m##name##Name[index]);\
}
//network recieve - object-instance
#define UNPACKDATA_ASSET_ARRAY_ENUMED(name, enumType, index )\
{\
if (stream->readFlag())\
{\
m##name##AssetId[index] = stream->readSTString();\
_set##name(m##name##AssetId[index], index);\
const char* enumString = castConsoleTypeToString(static_cast<enumType>(index));\
Con::printf("unpack: %s = %s",enumString, m##name##AssetId[index]);\
}\
else\
{\
m##name##Name[index] = stream->readSTString();\
_set##name(m##name##AssetId[index], index);\
}\
}

View file

@ -290,7 +290,7 @@ ConvexShape::ConvexShape()
mSurfaceUVs.clear(); mSurfaceUVs.clear();
mSurfaceTextures.clear(); mSurfaceTextures.clear();
INIT_MATERIALASSET(Material); INIT_ASSET(Material);
} }
ConvexShape::~ConvexShape() ConvexShape::~ConvexShape()
@ -528,7 +528,7 @@ U32 ConvexShape::packUpdate( NetConnection *conn, U32 mask, BitStream *stream )
if ( stream->writeFlag( mask & UpdateMask ) ) if ( stream->writeFlag( mask & UpdateMask ) )
{ {
PACK_MATERIALASSET(conn, Material); PACK_ASSET(conn, Material);
U32 surfCount = mSurfaces.size(); U32 surfCount = mSurfaces.size();
stream->writeInt( surfCount, 32 ); stream->writeInt( surfCount, 32 );
@ -584,7 +584,7 @@ void ConvexShape::unpackUpdate( NetConnection *conn, BitStream *stream )
if ( stream->readFlag() ) // UpdateMask if ( stream->readFlag() ) // UpdateMask
{ {
UNPACK_MATERIALASSET(conn, Material); UNPACK_ASSET(conn, Material);
mSurfaces.clear(); mSurfaces.clear();
mSurfaceUVs.clear(); mSurfaceUVs.clear();
@ -2171,4 +2171,4 @@ void ConvexShape::Geometry::generate(const Vector< PlaneF > &planes, const Vecto
} }
} }
DEF_MATERIALASSET_BINDS(ConvexShape, Material); DEF_ASSET_BINDS(ConvexShape, Material);

View file

@ -138,14 +138,14 @@ public:
// The name of the Material we will use for rendering // The name of the Material we will use for rendering
DECLARE_MATERIALASSET(surfaceMaterial, Material); DECLARE_MATERIALASSET(surfaceMaterial, Material);
DECLARE_MATERIALASSET_SETGET(surfaceMaterial, Material); DECLARE_ASSET_SETGET(surfaceMaterial, Material);
// The actual Material instance // The actual Material instance
BaseMatInstance* materialInst; BaseMatInstance* materialInst;
surfaceMaterial() surfaceMaterial()
{ {
INIT_MATERIALASSET(Material); INIT_ASSET(Material);
materialInst = NULL; materialInst = NULL;
} }
@ -264,7 +264,7 @@ protected:
protected: protected:
DECLARE_MATERIALASSET(ConvexShape, Material); DECLARE_MATERIALASSET(ConvexShape, Material);
DECLARE_MATERIALASSET_SETGET(ConvexShape, Material); DECLARE_ASSET_SETGET(ConvexShape, Material);
// The actual Material instance // The actual Material instance
BaseMatInstance* mMaterialInst; BaseMatInstance* mMaterialInst;

View file

@ -116,7 +116,7 @@ DebrisData::DebrisData()
terminalVelocity = 0.0f; terminalVelocity = 0.0f;
ignoreWater = true; ignoreWater = true;
INIT_SHAPEASSET(Shape); INIT_ASSET(Shape);
} }
//#define TRACK_DEBRIS_DATA_CLONES //#define TRACK_DEBRIS_DATA_CLONES
@ -152,7 +152,7 @@ DebrisData::DebrisData(const DebrisData& other, bool temp_clone) : GameBaseData(
terminalVelocity = other.terminalVelocity; terminalVelocity = other.terminalVelocity;
ignoreWater = other.ignoreWater; ignoreWater = other.ignoreWater;
CLONE_SHAPEASSET(Shape); CLONE_ASSET(Shape);
textureName = other.textureName; textureName = other.textureName;
explosionId = other.explosionId; // -- for pack/unpack of explosion ptr explosionId = other.explosionId; // -- for pack/unpack of explosion ptr
@ -382,7 +382,7 @@ void DebrisData::packData(BitStream* stream)
stream->writeString( textureName ); stream->writeString( textureName );
PACKDATA_SHAPEASSET(Shape); PACKDATA_ASSET(Shape);
for( S32 i=0; i<DDC_NUM_EMITTERS; i++ ) for( S32 i=0; i<DDC_NUM_EMITTERS; i++ )
{ {
@ -426,7 +426,7 @@ void DebrisData::unpackData(BitStream* stream)
textureName = stream->readSTString(); textureName = stream->readSTString();
UNPACKDATA_SHAPEASSET(Shape); UNPACKDATA_ASSET(Shape);
for( S32 i=0; i<DDC_NUM_EMITTERS; i++ ) for( S32 i=0; i<DDC_NUM_EMITTERS; i++ )
{ {

View file

@ -84,7 +84,7 @@ struct DebrisData : public GameBaseData
bool ignoreWater; bool ignoreWater;
DECLARE_SHAPEASSET(DebrisData, Shape, onShapeChanged); DECLARE_SHAPEASSET(DebrisData, Shape, onShapeChanged);
DECLARE_SHAPEASSET_SETGET(DebrisData, Shape); DECLARE_ASSET_SETGET(DebrisData, Shape);
StringTableEntry textureName; StringTableEntry textureName;

View file

@ -76,7 +76,7 @@ ConsoleDocClass( DecalData,
DecalData::DecalData() DecalData::DecalData()
{ {
size = 5; size = 5;
INIT_MATERIALASSET(Material); INIT_ASSET(Material);
lifeSpan = 5000; lifeSpan = 5000;
fadeTime = 1000; fadeTime = 1000;
@ -258,7 +258,7 @@ void DecalData::packData( BitStream *stream )
stream->write( lookupName ); stream->write( lookupName );
stream->write( size ); stream->write( size );
PACKDATA_MATERIALASSET(Material); PACKDATA_ASSET(Material);
stream->write( lifeSpan ); stream->write( lifeSpan );
stream->write( fadeTime ); stream->write( fadeTime );
@ -287,7 +287,7 @@ void DecalData::unpackData( BitStream *stream )
assignName(lookupName); assignName(lookupName);
stream->read( &size ); stream->read( &size );
UNPACKDATA_MATERIALASSET(Material); UNPACKDATA_ASSET(Material);
_updateMaterial(); _updateMaterial();
stream->read( &lifeSpan ); stream->read( &lifeSpan );

View file

@ -78,7 +78,7 @@ class DecalData : public SimDataBlock
F32 fadeEndPixelSize; F32 fadeEndPixelSize;
DECLARE_MATERIALASSET(DecalData, Material); DECLARE_MATERIALASSET(DecalData, Material);
DECLARE_MATERIALASSET_SETGET(DecalData, Material); DECLARE_ASSET_SETGET(DecalData, Material);
/// Material instance for decal. /// Material instance for decal.
BaseMatInstance *matInst; BaseMatInstance *matInst;

View file

@ -59,7 +59,7 @@ RenderMeshExample::RenderMeshExample()
// Set it as a "static" object that casts shadows // Set it as a "static" object that casts shadows
mTypeMask |= StaticObjectType | StaticShapeObjectType; mTypeMask |= StaticObjectType | StaticShapeObjectType;
INIT_MATERIALASSET(Material); INIT_ASSET(Material);
} }
RenderMeshExample::~RenderMeshExample() RenderMeshExample::~RenderMeshExample()
@ -143,7 +143,7 @@ U32 RenderMeshExample::packUpdate( NetConnection *conn, U32 mask, BitStream *str
// Write out any of the updated editable properties // Write out any of the updated editable properties
if (stream->writeFlag(mask & UpdateMask)) if (stream->writeFlag(mask & UpdateMask))
{ {
PACK_MATERIALASSET(conn, Material); PACK_ASSET(conn, Material);
} }
return retMask; return retMask;
@ -164,7 +164,7 @@ void RenderMeshExample::unpackUpdate(NetConnection *conn, BitStream *stream)
if ( stream->readFlag() ) // UpdateMask if ( stream->readFlag() ) // UpdateMask
{ {
UNPACK_MATERIALASSET(conn, Material); UNPACK_ASSET(conn, Material);
if ( isProperlyAdded() ) if ( isProperlyAdded() )
updateMaterial(); updateMaterial();

View file

@ -74,7 +74,7 @@ class RenderMeshExample : public SceneObject
BaseMatInstance* mMaterialInst; BaseMatInstance* mMaterialInst;
DECLARE_MATERIALASSET(RenderMeshExample, Material); DECLARE_MATERIALASSET(RenderMeshExample, Material);
DECLARE_MATERIALASSET_NET_SETGET(RenderMeshExample, Material, UpdateMask); DECLARE_ASSET_NET_SETGET(RenderMeshExample, Material, UpdateMask);
// The GFX vertex and primitive buffers // The GFX vertex and primitive buffers
GFXVertexBufferHandle< VertexType > mVertexBuffer; GFXVertexBufferHandle< VertexType > mVertexBuffer;

View file

@ -145,7 +145,7 @@ U32 RenderShapeExample::packUpdate( NetConnection *conn, U32 mask, BitStream *st
// Write out any of the updated editable properties // Write out any of the updated editable properties
if ( stream->writeFlag( mask & UpdateMask ) ) if ( stream->writeFlag( mask & UpdateMask ) )
{ {
PACK_SHAPEASSET(conn, Shape); PACK_ASSET(conn, Shape);
// Allow the server object a chance to handle a new shape // Allow the server object a chance to handle a new shape
createShape(); createShape();
@ -169,7 +169,7 @@ void RenderShapeExample::unpackUpdate(NetConnection *conn, BitStream *stream)
if ( stream->readFlag() ) // UpdateMask if ( stream->readFlag() ) // UpdateMask
{ {
UNPACK_SHAPEASSET(conn, Shape); UNPACK_ASSET(conn, Shape);
if ( isProperlyAdded() ) if ( isProperlyAdded() )
createShape(); createShape();

View file

@ -62,7 +62,7 @@ class RenderShapeExample : public SceneObject
// Rendering variables // Rendering variables
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
DECLARE_SHAPEASSET(RenderShapeExample, Shape, onShapeChanged); DECLARE_SHAPEASSET(RenderShapeExample, Shape, onShapeChanged);
DECLARE_SHAPEASSET_SETGET(RenderShapeExample, Shape); DECLARE_ASSET_SETGET(RenderShapeExample, Shape);
// The actual shape instance // The actual shape instance
TSShapeInstance* mShapeInstance; TSShapeInstance* mShapeInstance;

View file

@ -230,7 +230,7 @@ ExplosionData::ExplosionData()
faceViewer = false; faceViewer = false;
INIT_SOUNDASSET(Sound); INIT_ASSET(Sound);
//soundProfile = NULL; //soundProfile = NULL;
particleEmitter = NULL; particleEmitter = NULL;
@ -239,7 +239,7 @@ ExplosionData::ExplosionData()
explosionScale.set(1.0f, 1.0f, 1.0f); explosionScale.set(1.0f, 1.0f, 1.0f);
playSpeed = 1.0f; playSpeed = 1.0f;
INIT_SHAPEASSET(ExplosionShape); INIT_ASSET(ExplosionShape);
explosionAnimation = -1; explosionAnimation = -1;
@ -310,12 +310,12 @@ ExplosionData::ExplosionData(const ExplosionData& other, bool temp_clone) : Game
faceViewer = other.faceViewer; faceViewer = other.faceViewer;
particleDensity = other.particleDensity; particleDensity = other.particleDensity;
particleRadius = other.particleRadius; particleRadius = other.particleRadius;
CLONE_SOUNDASSET(Sound); CLONE_ASSET(Sound);
particleEmitter = other.particleEmitter; particleEmitter = other.particleEmitter;
particleEmitterId = other.particleEmitterId; // -- for pack/unpack of particleEmitter ptr particleEmitterId = other.particleEmitterId; // -- for pack/unpack of particleEmitter ptr
explosionScale = other.explosionScale; explosionScale = other.explosionScale;
playSpeed = other.playSpeed; playSpeed = other.playSpeed;
CLONE_SHAPEASSET(ExplosionShape); CLONE_ASSET(ExplosionShape);
explosionAnimation = other.explosionAnimation; // -- from explosionShape sequence "ambient" explosionAnimation = other.explosionAnimation; // -- from explosionShape sequence "ambient"
dMemcpy( emitterList, other.emitterList, sizeof( emitterList ) ); dMemcpy( emitterList, other.emitterList, sizeof( emitterList ) );
dMemcpy( emitterIDList, other.emitterIDList, sizeof( emitterIDList ) ); // -- for pack/unpack of emitterList ptrs dMemcpy( emitterIDList, other.emitterIDList, sizeof( emitterIDList ) ); // -- for pack/unpack of emitterList ptrs
@ -650,9 +650,9 @@ void ExplosionData::packData(BitStream* stream)
{ {
Parent::packData(stream); Parent::packData(stream);
PACKDATA_SHAPEASSET(ExplosionShape); PACKDATA_ASSET(ExplosionShape);
PACKDATA_SOUNDASSET(Sound); PACKDATA_ASSET(Sound);
if (stream->writeFlag(particleEmitter)) if (stream->writeFlag(particleEmitter))
stream->writeRangedU32(particleEmitter->getId(),DataBlockObjectIdFirst,DataBlockObjectIdLast); stream->writeRangedU32(particleEmitter->getId(),DataBlockObjectIdFirst,DataBlockObjectIdLast);
@ -754,9 +754,9 @@ void ExplosionData::unpackData(BitStream* stream)
{ {
Parent::unpackData(stream); Parent::unpackData(stream);
UNPACKDATA_SHAPEASSET(ExplosionShape); UNPACKDATA_ASSET(ExplosionShape);
UNPACKDATA_SOUNDASSET(Sound); UNPACKDATA_ASSET(Sound);
if (stream->readFlag()) if (stream->readFlag())
particleEmitterId = stream->readRangedU32(DataBlockObjectIdFirst, DataBlockObjectIdLast); particleEmitterId = stream->readRangedU32(DataBlockObjectIdFirst, DataBlockObjectIdLast);

View file

@ -71,7 +71,7 @@ class ExplosionData : public GameBaseData {
F32 particleRadius; F32 particleRadius;
DECLARE_SOUNDASSET(ExplosionData, Sound); DECLARE_SOUNDASSET(ExplosionData, Sound);
DECLARE_SOUNDASSET_SETGET(ExplosionData, Sound); DECLARE_ASSET_SETGET(ExplosionData, Sound);
ParticleEmitterData* particleEmitter; ParticleEmitterData* particleEmitter;
S32 particleEmitterId; S32 particleEmitterId;
@ -80,7 +80,7 @@ class ExplosionData : public GameBaseData {
F32 playSpeed; F32 playSpeed;
DECLARE_SHAPEASSET(ExplosionData, ExplosionShape, onShapeChanged); DECLARE_SHAPEASSET(ExplosionData, ExplosionShape, onShapeChanged);
DECLARE_SHAPEASSET_SETGET(ExplosionData, ExplosionShape); DECLARE_ASSET_SETGET(ExplosionData, ExplosionShape);
S32 explosionAnimation; S32 explosionAnimation;

View file

@ -459,7 +459,7 @@ GroundCover::GroundCover()
mRandomSeed = 1; mRandomSeed = 1;
INIT_MATERIALASSET(Material); INIT_ASSET(Material);
mMaterialInst = NULL; mMaterialInst = NULL;
mMatParams = NULL; mMatParams = NULL;
@ -520,7 +520,7 @@ GroundCover::GroundCover()
mBillboardRects[i].point.set( 0.0f, 0.0f ); mBillboardRects[i].point.set( 0.0f, 0.0f );
mBillboardRects[i].extent.set( 1.0f, 1.0f ); mBillboardRects[i].extent.set( 1.0f, 1.0f );
INIT_SHAPEASSET_ARRAY(Shape, i); INIT_ASSET_ARRAY(Shape, i);
mShapeInstances[i] = NULL; mShapeInstances[i] = NULL;
@ -713,7 +713,7 @@ U32 GroundCover::packUpdate( NetConnection *connection, U32 mask, BitStream *str
// TODO: We could probably optimize a few of these // TODO: We could probably optimize a few of these
// based on reasonable units at some point. // based on reasonable units at some point.
PACK_MATERIALASSET(connection, Material); PACK_ASSET(connection, Material);
stream->write( mRadius ); stream->write( mRadius );
stream->write( mZOffset ); stream->write( mZOffset );
@ -766,7 +766,7 @@ U32 GroundCover::packUpdate( NetConnection *connection, U32 mask, BitStream *str
stream->write( mBillboardRects[i].extent.x ); stream->write( mBillboardRects[i].extent.x );
stream->write( mBillboardRects[i].extent.y ); stream->write( mBillboardRects[i].extent.y );
PACK_SHAPEASSET_ARRAY(connection, Shape, i); PACK_ASSET_ARRAY(connection, Shape, i);
} }
stream->writeFlag( mDebugRenderCells ); stream->writeFlag( mDebugRenderCells );
@ -784,7 +784,7 @@ void GroundCover::unpackUpdate( NetConnection *connection, BitStream *stream )
if (stream->readFlag()) if (stream->readFlag())
{ {
UNPACK_MATERIALASSET(connection, Material); UNPACK_ASSET(connection, Material);
stream->read( &mRadius ); stream->read( &mRadius );
stream->read( &mZOffset ); stream->read( &mZOffset );
@ -837,7 +837,7 @@ void GroundCover::unpackUpdate( NetConnection *connection, BitStream *stream )
stream->read( &mBillboardRects[i].extent.x ); stream->read( &mBillboardRects[i].extent.x );
stream->read( &mBillboardRects[i].extent.y ); stream->read( &mBillboardRects[i].extent.y );
UNPACK_SHAPEASSET_ARRAY(connection, Shape, i); UNPACK_ASSET_ARRAY(connection, Shape, i);
} }
mDebugRenderCells = stream->readFlag(); mDebugRenderCells = stream->readFlag();

View file

@ -269,7 +269,7 @@ protected:
BaseMatInstance* mMaterialInst; BaseMatInstance* mMaterialInst;
DECLARE_MATERIALASSET(GroundCover, Material); DECLARE_MATERIALASSET(GroundCover, Material);
DECLARE_MATERIALASSET_NET_SETGET(GroundCover, Material, InitialUpdateMask); DECLARE_ASSET_NET_SETGET(GroundCover, Material, InitialUpdateMask);
GroundCoverShaderConstData mShaderConstData; GroundCoverShaderConstData mShaderConstData;
@ -341,7 +341,7 @@ protected:
/// The cover shape filenames. /// The cover shape filenames.
DECLARE_SHAPEASSET_ARRAY(GroundCover, Shape, MAX_COVERTYPES); DECLARE_SHAPEASSET_ARRAY(GroundCover, Shape, MAX_COVERTYPES);
DECLARE_SHAPEASSET_ARRAY_NET_SETGET(GroundCover, Shape, -1); DECLARE_ASSET_ARRAY_NET_SETGET(GroundCover, Shape, -1);
/// The cover shape instances. /// The cover shape instances.
TSShapeInstance* mShapeInstances[MAX_COVERTYPES]; TSShapeInstance* mShapeInstances[MAX_COVERTYPES];

View file

@ -238,11 +238,11 @@ void LightningStrikeEvent::process(NetConnection*)
// //
LightningData::LightningData() LightningData::LightningData()
{ {
INIT_SOUNDASSET(StrikeSound); INIT_ASSET(StrikeSound);
for (S32 i = 0; i < MaxThunders; i++) for (S32 i = 0; i < MaxThunders; i++)
{ {
INIT_SOUNDASSET_ARRAY(ThunderSound, i); INIT_ASSET_ARRAY(ThunderSound, i);
} }
for (S32 i = 0; i < MaxTextures; i++) for (S32 i = 0; i < MaxTextures; i++)
@ -335,7 +335,7 @@ void LightningData::packData(BitStream* stream)
U32 i; U32 i;
for (i = 0; i < MaxThunders; i++) for (i = 0; i < MaxThunders; i++)
{ {
PACKDATA_SOUNDASSET_ARRAY(ThunderSound, i); PACKDATA_ASSET_ARRAY(ThunderSound, i);
} }
stream->writeInt(mNumStrikeTextures, 4); stream->writeInt(mNumStrikeTextures, 4);
@ -343,7 +343,7 @@ void LightningData::packData(BitStream* stream)
for (i = 0; i < MaxTextures; i++) for (i = 0; i < MaxTextures; i++)
stream->writeString(strikeTextureNames[i]); stream->writeString(strikeTextureNames[i]);
PACKDATA_SOUNDASSET(StrikeSound); PACKDATA_ASSET(StrikeSound);
} }
void LightningData::unpackData(BitStream* stream) void LightningData::unpackData(BitStream* stream)
@ -353,7 +353,7 @@ void LightningData::unpackData(BitStream* stream)
U32 i; U32 i;
for (i = 0; i < MaxThunders; i++) for (i = 0; i < MaxThunders; i++)
{ {
UNPACKDATA_SOUNDASSET_ARRAY(ThunderSound, i); UNPACKDATA_ASSET_ARRAY(ThunderSound, i);
} }
mNumStrikeTextures = stream->readInt(4); mNumStrikeTextures = stream->readInt(4);
@ -361,7 +361,7 @@ void LightningData::unpackData(BitStream* stream)
for (i = 0; i < MaxTextures; i++) for (i = 0; i < MaxTextures; i++)
strikeTextureNames[i] = stream->readSTString(); strikeTextureNames[i] = stream->readSTString();
UNPACKDATA_SOUNDASSET(StrikeSound); UNPACKDATA_ASSET(StrikeSound);
} }

View file

@ -65,10 +65,10 @@ class LightningData : public GameBaseData
public: public:
DECLARE_SOUNDASSET_ARRAY(LightningData, ThunderSound, MaxThunders); DECLARE_SOUNDASSET_ARRAY(LightningData, ThunderSound, MaxThunders);
DECLARE_SOUNDASSET_ARRAY_SETGET(LightningData, ThunderSound); DECLARE_ASSET_ARRAY_SETGET(LightningData, ThunderSound);
DECLARE_SOUNDASSET(LightningData, StrikeSound); DECLARE_SOUNDASSET(LightningData, StrikeSound);
DECLARE_SOUNDASSET_SETGET(LightningData, StrikeSound); DECLARE_ASSET_SETGET(LightningData, StrikeSound);
StringTableEntry strikeTextureNames[MaxTextures]; StringTableEntry strikeTextureNames[MaxTextures];

View file

@ -122,8 +122,8 @@ ParticleData::ParticleData()
animTexFramesString = NULL; // string of animation frame indices animTexFramesString = NULL; // string of animation frame indices
animTexUVs = NULL; // array of tile vertex UVs animTexUVs = NULL; // array of tile vertex UVs
INIT_IMAGEASSET(Texture); INIT_ASSET(Texture);
INIT_IMAGEASSET(TextureExt); INIT_ASSET(TextureExt);
constrain_pos = false; constrain_pos = false;
start_angle = 0.0f; start_angle = 0.0f;
@ -293,7 +293,7 @@ void ParticleData::packData(BitStream* stream)
stream->writeFloat( times[i], 8); stream->writeFloat( times[i], 8);
} }
//PACKDATA_IMAGEASSET(Texture); //PACKDATA_ASSET(Texture);
for (i = 0; i < 4; i++) for (i = 0; i < 4; i++)
mathWrite(*stream, texCoords[i]); mathWrite(*stream, texCoords[i]);
@ -307,7 +307,7 @@ void ParticleData::packData(BitStream* stream)
stream->writeInt(framesPerSec, 8); stream->writeInt(framesPerSec, 8);
} }
//PACKDATA_IMAGEASSET(TextureExt); //PACKDATA_ASSET(TextureExt);
stream->writeFlag(constrain_pos); stream->writeFlag(constrain_pos);
stream->writeFloat(start_angle/360.0f, 11); stream->writeFloat(start_angle/360.0f, 11);
@ -378,7 +378,7 @@ void ParticleData::unpackData(BitStream* stream)
times[i] = stream->readFloat(8); times[i] = stream->readFloat(8);
} }
//UNPACKDATA_IMAGEASSET(Texture); //UNPACKDATA_ASSET(Texture);
for (i = 0; i < 4; i++) for (i = 0; i < 4; i++)
mathRead(*stream, &texCoords[i]); mathRead(*stream, &texCoords[i]);
@ -391,7 +391,7 @@ void ParticleData::unpackData(BitStream* stream)
framesPerSec = stream->readInt(8); framesPerSec = stream->readInt(8);
} }
//UNPACKDATA_IMAGEASSET(Texture); //UNPACKDATA_ASSET(Texture);
constrain_pos = stream->readFlag(); constrain_pos = stream->readFlag();
start_angle = 360.0f*stream->readFloat(11); start_angle = 360.0f*stream->readFloat(11);
@ -763,12 +763,12 @@ ParticleData::ParticleData(const ParticleData& other, bool temp_clone) : SimData
animTexFramesString = other.animTexFramesString; animTexFramesString = other.animTexFramesString;
animTexFrames = other.animTexFrames; // -- parsed from animTexFramesString animTexFrames = other.animTexFrames; // -- parsed from animTexFramesString
CLONE_IMAGEASSET(Texture); CLONE_ASSET(Texture);
spinBias = other.spinBias; spinBias = other.spinBias;
randomizeSpinDir = other.randomizeSpinDir; randomizeSpinDir = other.randomizeSpinDir;
CLONE_IMAGEASSET(TextureExt); CLONE_ASSET(TextureExt);
constrain_pos = other.constrain_pos; constrain_pos = other.constrain_pos;
start_angle = other.start_angle; start_angle = other.start_angle;
@ -804,4 +804,4 @@ void ParticleData::onPerformSubstitutions()
reload(errorBuffer); reload(errorBuffer);
} }
DEF_IMAGEASSET_BINDS(ParticleData, Texture); DEF_ASSET_BINDS(ParticleData, Texture);

View file

@ -87,7 +87,7 @@ class ParticleData : public SimDataBlock
Vector<U8> animTexFrames; Vector<U8> animTexFrames;
DECLARE_IMAGEASSET(ParticleData, Texture, onImageChanged, GFXStaticTextureSRGBProfile); DECLARE_IMAGEASSET(ParticleData, Texture, onImageChanged, GFXStaticTextureSRGBProfile);
DECLARE_IMAGEASSET_SETGET(ParticleData, Texture); DECLARE_ASSET_SETGET(ParticleData, Texture);
static bool protectedSetSizes(void* object, const char* index, const char* data); static bool protectedSetSizes(void* object, const char* index, const char* data);
static bool protectedSetTimes(void* object, const char* index, const char* data); static bool protectedSetTimes(void* object, const char* index, const char* data);
@ -118,7 +118,7 @@ public:
bool randomizeSpinDir; bool randomizeSpinDir;
public: public:
DECLARE_IMAGEASSET(ParticleData, TextureExt, onImageChanged, GFXStaticTextureSRGBProfile); DECLARE_IMAGEASSET(ParticleData, TextureExt, onImageChanged, GFXStaticTextureSRGBProfile);
DECLARE_IMAGEASSET_SETGET(ParticleData, TextureExt); DECLARE_ASSET_SETGET(ParticleData, TextureExt);
bool constrain_pos; bool constrain_pos;
F32 start_angle; F32 start_angle;

View file

@ -127,13 +127,13 @@ ConsoleDocClass( PrecipitationData,
//---------------------------------------------------------- //----------------------------------------------------------
PrecipitationData::PrecipitationData() PrecipitationData::PrecipitationData()
{ {
INIT_SOUNDASSET(Sound); INIT_ASSET(Sound);
INIT_IMAGEASSET(Drop); INIT_ASSET(Drop);
mDropShaderName = StringTable->EmptyString(); mDropShaderName = StringTable->EmptyString();
INIT_IMAGEASSET(Splash); INIT_ASSET(Splash);
mSplashShaderName = StringTable->EmptyString(); mSplashShaderName = StringTable->EmptyString();
@ -206,13 +206,13 @@ void PrecipitationData::packData(BitStream* stream)
{ {
Parent::packData(stream); Parent::packData(stream);
PACKDATA_SOUNDASSET(Sound); PACKDATA_ASSET(Sound);
PACKDATA_IMAGEASSET(Drop); PACKDATA_ASSET(Drop);
stream->writeString(mDropShaderName); stream->writeString(mDropShaderName);
PACKDATA_IMAGEASSET(Splash); PACKDATA_ASSET(Splash);
stream->writeString(mSplashShaderName); stream->writeString(mSplashShaderName);
stream->write(mDropsPerSide); stream->write(mDropsPerSide);
@ -223,13 +223,13 @@ void PrecipitationData::unpackData(BitStream* stream)
{ {
Parent::unpackData(stream); Parent::unpackData(stream);
UNPACKDATA_SOUNDASSET(Sound); UNPACKDATA_ASSET(Sound);
UNPACKDATA_IMAGEASSET(Drop); UNPACKDATA_ASSET(Drop);
mDropShaderName = stream->readSTString(); mDropShaderName = stream->readSTString();
UNPACKDATA_IMAGEASSET(Splash); UNPACKDATA_ASSET(Splash);
mSplashShaderName = stream->readSTString(); mSplashShaderName = stream->readSTString();
stream->read(&mDropsPerSide); stream->read(&mDropsPerSide);

View file

@ -47,15 +47,15 @@ class PrecipitationData : public GameBaseData
public: public:
DECLARE_SOUNDASSET(PrecipitationData, Sound); DECLARE_SOUNDASSET(PrecipitationData, Sound);
DECLARE_SOUNDASSET_SETGET(PrecipitationData, Sound); DECLARE_ASSET_SETGET(PrecipitationData, Sound);
DECLARE_IMAGEASSET(PrecipitationData, Drop, onDropChanged, GFXStaticTextureSRGBProfile); ///< Texture for drop particles DECLARE_IMAGEASSET(PrecipitationData, Drop, onDropChanged, GFXStaticTextureSRGBProfile); ///< Texture for drop particles
DECLARE_IMAGEASSET_SETGET(PrecipitationData, Drop); DECLARE_ASSET_SETGET(PrecipitationData, Drop);
StringTableEntry mDropShaderName; ///< The name of the shader used for raindrops StringTableEntry mDropShaderName; ///< The name of the shader used for raindrops
DECLARE_IMAGEASSET(PrecipitationData, Splash, onSplashChanged, GFXStaticTextureSRGBProfile); ///< Texture for splash particles DECLARE_IMAGEASSET(PrecipitationData, Splash, onSplashChanged, GFXStaticTextureSRGBProfile); ///< Texture for splash particles
DECLARE_IMAGEASSET_SETGET(PrecipitationData, Splash); DECLARE_ASSET_SETGET(PrecipitationData, Splash);
StringTableEntry mSplashShaderName; ///< The name of the shader used for raindrops StringTableEntry mSplashShaderName; ///< The name of the shader used for raindrops

View file

@ -70,7 +70,7 @@ SplashData::SplashData()
//soundProfile = NULL; //soundProfile = NULL;
//soundProfileId = 0; //soundProfileId = 0;
INIT_SOUNDASSET(Sound); INIT_ASSET(Sound);
scale.set(1, 1, 1); scale.set(1, 1, 1);
@ -98,7 +98,7 @@ SplashData::SplashData()
U32 i; U32 i;
for (i = 0; i < NUM_TEX; i++) for (i = 0; i < NUM_TEX; i++)
{ {
INIT_IMAGEASSET_ARRAY(Texture, i); INIT_ASSET_ARRAY(Texture, i);
} }
for( i=0; i<NUM_TIME_KEYS; i++ ) for( i=0; i<NUM_TIME_KEYS; i++ )
@ -163,7 +163,7 @@ void SplashData::packData(BitStream* stream)
{ {
Parent::packData(stream); Parent::packData(stream);
PACKDATA_SOUNDASSET(Sound); PACKDATA_ASSET(Sound);
mathWrite(*stream, scale); mathWrite(*stream, scale);
stream->write(delayMS); stream->write(delayMS);
@ -208,7 +208,7 @@ void SplashData::packData(BitStream* stream)
for( i=0; i<NUM_TEX; i++ ) for( i=0; i<NUM_TEX; i++ )
{ {
PACKDATA_IMAGEASSET_ARRAY(Texture, i); PACKDATA_ASSET_ARRAY(Texture, i);
} }
} }
@ -219,7 +219,7 @@ void SplashData::unpackData(BitStream* stream)
{ {
Parent::unpackData(stream); Parent::unpackData(stream);
UNPACKDATA_SOUNDASSET(Sound); UNPACKDATA_ASSET(Sound);
mathRead(*stream, &scale); mathRead(*stream, &scale);
stream->read(&delayMS); stream->read(&delayMS);
@ -264,7 +264,7 @@ void SplashData::unpackData(BitStream* stream)
for( i=0; i<NUM_TEX; i++ ) for( i=0; i<NUM_TEX; i++ )
{ {
UNPACKDATA_IMAGEASSET_ARRAY(Texture, i); UNPACKDATA_ASSET_ARRAY(Texture, i);
} }
} }

View file

@ -96,7 +96,7 @@ public:
//S32 soundProfileId; //S32 soundProfileId;
DECLARE_SOUNDASSET(SplashData, Sound); DECLARE_SOUNDASSET(SplashData, Sound);
DECLARE_SOUNDASSET_SETGET(SplashData, Sound); DECLARE_ASSET_SETGET(SplashData, Sound);
ParticleEmitterData* emitterList[NUM_EMITTERS]; ParticleEmitterData* emitterList[NUM_EMITTERS];
S32 emitterIDList[NUM_EMITTERS]; S32 emitterIDList[NUM_EMITTERS];

View file

@ -87,7 +87,7 @@ GroundPlane::GroundPlane()
mConvexList = new Convex; mConvexList = new Convex;
mTypeMask |= TerrainLikeObjectType; mTypeMask |= TerrainLikeObjectType;
INIT_MATERIALASSET(Material); INIT_ASSET(Material);
} }
GroundPlane::~GroundPlane() GroundPlane::~GroundPlane()
@ -199,7 +199,7 @@ U32 GroundPlane::packUpdate( NetConnection* connection, U32 mask, BitStream* str
stream->write( mScaleU ); stream->write( mScaleU );
stream->write( mScaleV ); stream->write( mScaleV );
PACK_MATERIALASSET(connection, Material); PACK_ASSET(connection, Material);
return retMask; return retMask;
} }
@ -212,7 +212,7 @@ void GroundPlane::unpackUpdate( NetConnection* connection, BitStream* stream )
stream->read( &mScaleU ); stream->read( &mScaleU );
stream->read( &mScaleV ); stream->read( &mScaleV );
UNPACK_MATERIALASSET(connection, Material); UNPACK_ASSET(connection, Material);
// If we're added then something possibly changed in // If we're added then something possibly changed in
// the editor... do an update of the material and the // the editor... do an update of the material and the

View file

@ -108,7 +108,7 @@ private:
BaseMatInstance* mMaterialInst; BaseMatInstance* mMaterialInst;
DECLARE_MATERIALASSET(GroundPlane, Material); DECLARE_MATERIALASSET(GroundPlane, Material);
DECLARE_MATERIALASSET_NET_SETGET(GroundPlane, Material, -1); DECLARE_ASSET_NET_SETGET(GroundPlane, Material, -1);
PhysicsBody *mPhysicsRep; PhysicsBody *mPhysicsRep;

View file

@ -99,7 +99,7 @@ LevelInfo::LevelInfo()
mAdvancedLightmapSupport = true; mAdvancedLightmapSupport = true;
INIT_IMAGEASSET(AccuTexture); INIT_ASSET(AccuTexture);
// Register with the light manager activation signal, and we need to do it first // Register with the light manager activation signal, and we need to do it first
// so the advanced light bin manager can be instructed about MRT lightmaps // so the advanced light bin manager can be instructed about MRT lightmaps
@ -215,7 +215,7 @@ U32 LevelInfo::packUpdate(NetConnection *conn, U32 mask, BitStream *stream)
sfxWrite( stream, mSoundAmbience ); sfxWrite( stream, mSoundAmbience );
stream->writeInt( mSoundDistanceModel, 1 ); stream->writeInt( mSoundDistanceModel, 1 );
PACK_IMAGEASSET(conn, AccuTexture); PACK_ASSET(conn, AccuTexture);
return retMask; return retMask;
} }
@ -262,7 +262,7 @@ void LevelInfo::unpackUpdate(NetConnection *conn, BitStream *stream)
SFX->setDistanceModel( mSoundDistanceModel ); SFX->setDistanceModel( mSoundDistanceModel );
} }
UNPACK_IMAGEASSET(conn, AccuTexture); UNPACK_ASSET(conn, AccuTexture);
setLevelAccuTexture(getAccuTexture()); setLevelAccuTexture(getAccuTexture());
} }

View file

@ -105,7 +105,7 @@ class LevelInfo : public NetObject
protected: protected:
DECLARE_IMAGEASSET(LevelInfo, AccuTexture, onAccuTextureChanged, GFXStaticTextureSRGBProfile); DECLARE_IMAGEASSET(LevelInfo, AccuTexture, onAccuTextureChanged, GFXStaticTextureSRGBProfile);
DECLARE_IMAGEASSET_SETGET(LevelInfo, AccuTexture); DECLARE_ASSET_SETGET(LevelInfo, AccuTexture);
void onAccuTextureChanged() {} void onAccuTextureChanged() {}

View file

@ -133,7 +133,7 @@ LightFlareData::LightFlareData()
for ( U32 i = 0; i < MAX_ELEMENTS; i++ ) for ( U32 i = 0; i < MAX_ELEMENTS; i++ )
mElementDist[i] = -1.0f; mElementDist[i] = -1.0f;
INIT_IMAGEASSET(FlareTexture); INIT_ASSET(FlareTexture);
} }
LightFlareData::~LightFlareData() LightFlareData::~LightFlareData()
@ -219,7 +219,7 @@ void LightFlareData::packData( BitStream *stream )
stream->writeFlag( mFlareEnabled ); stream->writeFlag( mFlareEnabled );
PACKDATA_IMAGEASSET(FlareTexture); PACKDATA_ASSET(FlareTexture);
stream->write( mScale ); stream->write( mScale );
stream->write( mOcclusionRadius ); stream->write( mOcclusionRadius );
@ -244,7 +244,7 @@ void LightFlareData::unpackData( BitStream *stream )
mFlareEnabled = stream->readFlag(); mFlareEnabled = stream->readFlag();
UNPACKDATA_IMAGEASSET(FlareTexture); UNPACKDATA_ASSET(FlareTexture);
stream->read( &mScale ); stream->read( &mScale );
stream->read( &mOcclusionRadius ); stream->read( &mOcclusionRadius );

View file

@ -121,7 +121,7 @@ protected:
bool mFlareEnabled; bool mFlareEnabled;
DECLARE_IMAGEASSET(LightFlareData, FlareTexture, onImageChanged, GFXStaticTextureSRGBProfile); DECLARE_IMAGEASSET(LightFlareData, FlareTexture, onImageChanged, GFXStaticTextureSRGBProfile);
DECLARE_IMAGEASSET_SETGET(LightFlareData, FlareTexture); DECLARE_ASSET_SETGET(LightFlareData, FlareTexture);
F32 mOcclusionRadius; F32 mOcclusionRadius;
bool mRenderReflectPass; bool mRenderReflectPass;

View file

@ -74,7 +74,7 @@ PhysicsDebrisData::PhysicsDebrisData()
lifetime = 5.0f; lifetime = 5.0f;
lifetimeVariance = 0.0f; lifetimeVariance = 0.0f;
INIT_SHAPEASSET(Shape); INIT_ASSET(Shape);
} }
bool PhysicsDebrisData::onAdd() bool PhysicsDebrisData::onAdd()
@ -215,7 +215,7 @@ void PhysicsDebrisData::packData(BitStream* stream)
stream->write( waterDampingScale ); stream->write( waterDampingScale );
stream->write( buoyancyDensity ); stream->write( buoyancyDensity );
PACKDATA_SHAPEASSET(Shape); PACKDATA_ASSET(Shape);
} }
void PhysicsDebrisData::unpackData(BitStream* stream) void PhysicsDebrisData::unpackData(BitStream* stream)
@ -236,7 +236,7 @@ void PhysicsDebrisData::unpackData(BitStream* stream)
stream->read( &waterDampingScale ); stream->read( &waterDampingScale );
stream->read( &buoyancyDensity ); stream->read( &buoyancyDensity );
UNPACKDATA_SHAPEASSET(Shape); UNPACKDATA_ASSET(Shape);
} }
DefineEngineMethod( PhysicsDebrisData, preload, void, (), , DefineEngineMethod( PhysicsDebrisData, preload, void, (), ,

View file

@ -87,7 +87,7 @@ public:
bool castShadows; bool castShadows;
DECLARE_SHAPEASSET(PhysicsDebrisData, Shape, onShapeChanged); DECLARE_SHAPEASSET(PhysicsDebrisData, Shape, onShapeChanged);
DECLARE_SHAPEASSET_SETGET(PhysicsDebrisData, Shape); DECLARE_ASSET_SETGET(PhysicsDebrisData, Shape);
PhysicsDebrisData(); PhysicsDebrisData();

View file

@ -78,7 +78,7 @@ PhysicsShapeData::PhysicsShapeData()
buoyancyDensity( 0.0f ), buoyancyDensity( 0.0f ),
simType( SimType_ClientServer ) simType( SimType_ClientServer )
{ {
INIT_SHAPEASSET(Shape); INIT_ASSET(Shape);
} }
PhysicsShapeData::~PhysicsShapeData() PhysicsShapeData::~PhysicsShapeData()
@ -180,7 +180,7 @@ void PhysicsShapeData::packData( BitStream *stream )
{ {
Parent::packData( stream ); Parent::packData( stream );
PACKDATA_SHAPEASSET(Shape); PACKDATA_ASSET(Shape);
stream->write( mass ); stream->write( mass );
stream->write( dynamicFriction ); stream->write( dynamicFriction );
@ -204,7 +204,7 @@ void PhysicsShapeData::unpackData( BitStream *stream )
{ {
Parent::unpackData(stream); Parent::unpackData(stream);
UNPACKDATA_SHAPEASSET(Shape); UNPACKDATA_ASSET(Shape);
stream->read( &mass ); stream->read( &mass );
stream->read( &dynamicFriction ); stream->read( &dynamicFriction );

View file

@ -75,7 +75,7 @@ public:
public: public:
DECLARE_SHAPEASSET(PhysicsShapeData, Shape, onShapeChanged); DECLARE_SHAPEASSET(PhysicsShapeData, Shape, onShapeChanged);
DECLARE_SHAPEASSET_SETGET(PhysicsShapeData, Shape); DECLARE_ASSET_SETGET(PhysicsShapeData, Shape);
/// The shared unscaled collision shape. /// The shared unscaled collision shape.
PhysicsCollisionRef colShape; PhysicsCollisionRef colShape;

View file

@ -186,7 +186,6 @@ PlayerData::ActionAnimationDef PlayerData::ActionAnimationList[NumTableActionAni
}; };
//----------------------------------------------------------------------------
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
typedef PlayerData::Sounds playerSoundsEnum; typedef PlayerData::Sounds playerSoundsEnum;
@ -216,6 +215,8 @@ EndImplementEnumType;
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
//----------------------------------------------------------------------------
IMPLEMENT_CO_DATABLOCK_V1(PlayerData); IMPLEMENT_CO_DATABLOCK_V1(PlayerData);
ConsoleDocClass( PlayerData, ConsoleDocClass( PlayerData,
@ -297,7 +298,7 @@ PlayerData::PlayerData()
imageAnimPrefixFP = StringTable->EmptyString(); imageAnimPrefixFP = StringTable->EmptyString();
for (U32 i=0; i<ShapeBase::MaxMountedImages; ++i) for (U32 i=0; i<ShapeBase::MaxMountedImages; ++i)
{ {
INIT_SHAPEASSET_ARRAY(ShapeFP, i); INIT_ASSET_ARRAY(ShapeFP, i);
mCRCFP[i] = 0; mCRCFP[i] = 0;
mValidShapeFP[i] = false; mValidShapeFP[i] = false;
} }
@ -422,7 +423,7 @@ PlayerData::PlayerData()
boxHeadFrontPercentage = 1; boxHeadFrontPercentage = 1;
for (S32 i = 0; i < MaxSounds; i++) for (S32 i = 0; i < MaxSounds; i++)
INIT_SOUNDASSET_ARRAY(PlayerSound, i); INIT_ASSET_ARRAY(PlayerSound, i);
footPuffEmitter = NULL; footPuffEmitter = NULL;
footPuffID = 0; footPuffID = 0;
@ -1048,9 +1049,7 @@ void PlayerData::initPersistFields()
endGroup( "Interaction: Footsteps" ); endGroup( "Interaction: Footsteps" );
addGroup( "Interaction: Sounds" ); addGroup( "Interaction: Sounds" );
INITPERSISTFIELD_SOUNDASSET_ENUMED(PlayerSound, playerSoundsEnum, PlayerData::Sounds::MaxSounds, PlayerData, "Sounds related to player interaction."); INITPERSISTFIELD_SOUNDASSET_ENUMED(PlayerSound, playerSoundsEnum, PlayerData::Sounds::MaxSounds, PlayerData, "Sounds related to player interaction.");
endGroup( "Interaction: Sounds" ); endGroup( "Interaction: Sounds" );
addGroup( "Interaction: Splashes" ); addGroup( "Interaction: Splashes" );
@ -1275,7 +1274,7 @@ void PlayerData::packData(BitStream* stream)
stream->write(minLateralImpactSpeed); stream->write(minLateralImpactSpeed);
for (U32 i = 0; i < MaxSounds; i++) for (U32 i = 0; i < MaxSounds; i++)
PACKDATA_SOUNDASSET_ARRAY_ENUMED(PlayerSound, PlayerData::Sounds, i); PACKDATA_ASSET_ARRAY(PlayerSound, i);
mathWrite(*stream, boxSize); mathWrite(*stream, boxSize);
mathWrite(*stream, crouchBoxSize); mathWrite(*stream, crouchBoxSize);
@ -1343,7 +1342,7 @@ void PlayerData::packData(BitStream* stream)
stream->writeString(imageAnimPrefixFP); stream->writeString(imageAnimPrefixFP);
for (U32 i=0; i<ShapeBase::MaxMountedImages; ++i) for (U32 i=0; i<ShapeBase::MaxMountedImages; ++i)
{ {
PACKDATA_SHAPEASSET_ARRAY(ShapeFP, i); PACKDATA_ASSET_ARRAY(ShapeFP, i);
// computeCRC is handled in ShapeBaseData // computeCRC is handled in ShapeBaseData
if (computeCRC) if (computeCRC)
@ -1456,7 +1455,7 @@ void PlayerData::unpackData(BitStream* stream)
stream->read(&minLateralImpactSpeed); stream->read(&minLateralImpactSpeed);
for (U32 i = 0; i < MaxSounds; i++) for (U32 i = 0; i < MaxSounds; i++)
UNPACKDATA_SOUNDASSET_ARRAY_ENUMED(PlayerSound, PlayerData::Sounds, i); UNPACKDATA_ASSET_ARRAY(PlayerSound, i);
mathRead(*stream, &boxSize); mathRead(*stream, &boxSize);
mathRead(*stream, &crouchBoxSize); mathRead(*stream, &crouchBoxSize);
@ -1523,7 +1522,7 @@ void PlayerData::unpackData(BitStream* stream)
imageAnimPrefixFP = stream->readSTString(); imageAnimPrefixFP = stream->readSTString();
for (U32 i=0; i<ShapeBase::MaxMountedImages; ++i) for (U32 i=0; i<ShapeBase::MaxMountedImages; ++i)
{ {
UNPACKDATA_SHAPEASSET_ARRAY(ShapeFP, i); UNPACKDATA_ASSET_ARRAY(ShapeFP, i);
// computeCRC is handled in ShapeBaseData // computeCRC is handled in ShapeBaseData
if (computeCRC) if (computeCRC)

View file

@ -77,7 +77,7 @@ struct PlayerData: public ShapeBaseData {
/// need to. /// need to.
DECLARE_SHAPEASSET_ARRAY(PlayerData, ShapeFP, ShapeBase::MaxMountedImages); ///< Used to render with mounted images in first person [optional] DECLARE_SHAPEASSET_ARRAY(PlayerData, ShapeFP, ShapeBase::MaxMountedImages); ///< Used to render with mounted images in first person [optional]
DECLARE_SHAPEASSET_ARRAY_SETGET(PlayerData, ShapeFP); DECLARE_ASSET_ARRAY_SETGET(PlayerData, ShapeFP);
StringTableEntry imageAnimPrefixFP; ///< Passed along to mounted images to modify StringTableEntry imageAnimPrefixFP; ///< Passed along to mounted images to modify
/// animation sequences played in first person. [optional] /// animation sequences played in first person. [optional]
@ -202,14 +202,14 @@ struct PlayerData: public ShapeBaseData {
FootMetal, FootMetal,
FootSnow, FootSnow,
WaterStart, WaterStart,
FootShallowSplash = WaterStart, FootShallowSplash,
FootWading, FootWading,
FootUnderWater, FootUnderWater,
FootBubbles, FootBubbles,
MoveBubbles, MoveBubbles,
WaterBreath, WaterBreath,
ImpactStart, ImpactStart,
ImpactSoft = ImpactStart, ImpactSoft,
ImpactHard, ImpactHard,
ImpactMetal, ImpactMetal,
ImpactSnow, ImpactSnow,
@ -879,5 +879,4 @@ public:
typedef Player::Pose PlayerPose; typedef Player::Pose PlayerPose;
DefineEnumType( PlayerPose ); DefineEnumType( PlayerPose );
#endif #endif

View file

@ -144,9 +144,9 @@ U32 Projectile::smProjectileWarpTicks = 5;
// //
ProjectileData::ProjectileData() ProjectileData::ProjectileData()
{ {
INIT_SHAPEASSET(ProjectileShape); INIT_ASSET(ProjectileShape);
INIT_SOUNDASSET(ProjectileSound); INIT_ASSET(ProjectileSound);
explosion = NULL; explosion = NULL;
explosionId = 0; explosionId = 0;
@ -217,10 +217,10 @@ ProjectileData::ProjectileData(const ProjectileData& other, bool temp_clone) : G
splashId = other.splashId; // -- for pack/unpack of splash ptr splashId = other.splashId; // -- for pack/unpack of splash ptr
decal = other.decal; decal = other.decal;
decalId = other.decalId; // -- for pack/unpack of decal ptr decalId = other.decalId; // -- for pack/unpack of decal ptr
CLONE_SOUNDASSET(ProjectileSound); CLONE_ASSET(ProjectileSound);
lightDesc = other.lightDesc; lightDesc = other.lightDesc;
lightDescId = other.lightDescId; // -- for pack/unpack of lightDesc ptr lightDescId = other.lightDescId; // -- for pack/unpack of lightDesc ptr
CLONE_SHAPEASSET(ProjectileShape);// -- TSShape loads using mProjectileShapeName CLONE_ASSET(ProjectileShape);// -- TSShape loads using mProjectileShapeName
activateSeq = other.activateSeq; // -- from projectileShape sequence "activate" activateSeq = other.activateSeq; // -- from projectileShape sequence "activate"
maintainSeq = other.maintainSeq; // -- from projectileShape sequence "maintain" maintainSeq = other.maintainSeq; // -- from projectileShape sequence "maintain"
particleEmitter = other.particleEmitter; particleEmitter = other.particleEmitter;
@ -406,7 +406,7 @@ void ProjectileData::packData(BitStream* stream)
{ {
Parent::packData(stream); Parent::packData(stream);
PACKDATA_SHAPEASSET(ProjectileShape); PACKDATA_ASSET(ProjectileShape);
stream->writeFlag(faceViewer); stream->writeFlag(faceViewer);
if(stream->writeFlag(scale.x != 1 || scale.y != 1 || scale.z != 1)) if(stream->writeFlag(scale.x != 1 || scale.y != 1 || scale.z != 1))
@ -439,7 +439,7 @@ void ProjectileData::packData(BitStream* stream)
if (stream->writeFlag(decal != NULL)) if (stream->writeFlag(decal != NULL))
stream->writeRangedU32(decal->getId(), DataBlockObjectIdFirst, stream->writeRangedU32(decal->getId(), DataBlockObjectIdFirst,
DataBlockObjectIdLast); DataBlockObjectIdLast);
PACKDATA_SOUNDASSET(ProjectileSound); PACKDATA_ASSET(ProjectileSound);
if ( stream->writeFlag(lightDesc != NULL)) if ( stream->writeFlag(lightDesc != NULL))
stream->writeRangedU32(lightDesc->getId(), DataBlockObjectIdFirst, stream->writeRangedU32(lightDesc->getId(), DataBlockObjectIdFirst,
@ -470,7 +470,7 @@ void ProjectileData::unpackData(BitStream* stream)
{ {
Parent::unpackData(stream); Parent::unpackData(stream);
UNPACKDATA_SHAPEASSET(ProjectileShape); UNPACKDATA_ASSET(ProjectileShape);
faceViewer = stream->readFlag(); faceViewer = stream->readFlag();
if(stream->readFlag()) if(stream->readFlag())
@ -500,7 +500,7 @@ void ProjectileData::unpackData(BitStream* stream)
if (stream->readFlag()) if (stream->readFlag())
decalId = stream->readRangedU32(DataBlockObjectIdFirst, DataBlockObjectIdLast); decalId = stream->readRangedU32(DataBlockObjectIdFirst, DataBlockObjectIdLast);
UNPACKDATA_SOUNDASSET(ProjectileSound); UNPACKDATA_ASSET(ProjectileSound);
if (stream->readFlag()) if (stream->readFlag())
lightDescId = stream->readRangedU32(DataBlockObjectIdFirst, DataBlockObjectIdLast); lightDescId = stream->readRangedU32(DataBlockObjectIdFirst, DataBlockObjectIdLast);

View file

@ -72,7 +72,7 @@ protected:
public: public:
DECLARE_SHAPEASSET(ProjectileData, ProjectileShape, onShapeChanged); DECLARE_SHAPEASSET(ProjectileData, ProjectileShape, onShapeChanged);
DECLARE_SHAPEASSET_SETGET(ProjectileData, ProjectileShape); DECLARE_ASSET_SETGET(ProjectileData, ProjectileShape);
/// Set to true if it is a billboard and want it to always face the viewer, false otherwise /// Set to true if it is a billboard and want it to always face the viewer, false otherwise
bool faceViewer; bool faceViewer;
@ -117,7 +117,7 @@ public:
S32 decalId; // (impact) Decal ID S32 decalId; // (impact) Decal ID
DECLARE_SOUNDASSET(ProjectileData, ProjectileSound); DECLARE_SOUNDASSET(ProjectileData, ProjectileSound);
DECLARE_SOUNDASSET_SETGET(ProjectileData, ProjectileSound); DECLARE_ASSET_SETGET(ProjectileData, ProjectileSound);
LightDescription *lightDesc; LightDescription *lightDesc;
S32 lightDescId; S32 lightDescId;

View file

@ -82,8 +82,8 @@ ProximityMineData::ProximityMineData()
triggerSequence( -1 ), triggerSequence( -1 ),
explosionOffset( 0.05f ) explosionOffset( 0.05f )
{ {
INIT_SOUNDASSET(ArmSound); INIT_ASSET(ArmSound);
INIT_SOUNDASSET(TriggerSound); INIT_ASSET(TriggerSound);
} }
void ProximityMineData::initPersistFields() void ProximityMineData::initPersistFields()
@ -156,14 +156,14 @@ void ProximityMineData::packData( BitStream* stream )
Parent::packData( stream ); Parent::packData( stream );
stream->write( armingDelay ); stream->write( armingDelay );
PACKDATA_SOUNDASSET(ArmSound); PACKDATA_ASSET(ArmSound);
stream->write( autoTriggerDelay ); stream->write( autoTriggerDelay );
stream->writeFlag( triggerOnOwner ); stream->writeFlag( triggerOnOwner );
stream->write( triggerRadius ); stream->write( triggerRadius );
stream->write( triggerSpeed ); stream->write( triggerSpeed );
stream->write( triggerDelay ); stream->write( triggerDelay );
PACKDATA_SOUNDASSET(TriggerSound); PACKDATA_ASSET(TriggerSound);
} }
void ProximityMineData::unpackData( BitStream* stream ) void ProximityMineData::unpackData( BitStream* stream )
@ -171,14 +171,14 @@ void ProximityMineData::unpackData( BitStream* stream )
Parent::unpackData(stream); Parent::unpackData(stream);
stream->read( &armingDelay ); stream->read( &armingDelay );
UNPACKDATA_SOUNDASSET(ArmSound); UNPACKDATA_ASSET(ArmSound);
stream->read( &autoTriggerDelay ); stream->read( &autoTriggerDelay );
triggerOnOwner = stream->readFlag(); triggerOnOwner = stream->readFlag();
stream->read( &triggerRadius ); stream->read( &triggerRadius );
stream->read( &triggerSpeed ); stream->read( &triggerSpeed );
stream->read( &triggerDelay ); stream->read( &triggerDelay );
UNPACKDATA_SOUNDASSET(TriggerSound); UNPACKDATA_ASSET(TriggerSound);
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------

View file

@ -46,7 +46,7 @@ public:
F32 armingDelay; F32 armingDelay;
S32 armingSequence; S32 armingSequence;
DECLARE_SOUNDASSET(ProximityMineData, ArmSound); DECLARE_SOUNDASSET(ProximityMineData, ArmSound);
DECLARE_SOUNDASSET_SETGET(ProximityMineData, ArmSound); DECLARE_ASSET_SETGET(ProximityMineData, ArmSound);
F32 autoTriggerDelay; F32 autoTriggerDelay;
bool triggerOnOwner; bool triggerOnOwner;
@ -55,7 +55,7 @@ public:
F32 triggerDelay; F32 triggerDelay;
S32 triggerSequence; S32 triggerSequence;
DECLARE_SOUNDASSET(ProximityMineData, TriggerSound); DECLARE_SOUNDASSET(ProximityMineData, TriggerSound);
DECLARE_SOUNDASSET_SETGET(ProximityMineData, TriggerSound); DECLARE_ASSET_SETGET(ProximityMineData, TriggerSound);
F32 explosionOffset; F32 explosionOffset;

View file

@ -238,7 +238,7 @@ RigidShapeData::RigidShapeData()
density = 4; density = 4;
for (S32 i = 0; i < Body::MaxSounds; i++) for (S32 i = 0; i < Body::MaxSounds; i++)
INIT_SOUNDASSET_ARRAY(BodySounds, i); INIT_ASSET_ARRAY(BodySounds, i);
dustEmitter = NULL; dustEmitter = NULL;
dustID = 0; dustID = 0;
@ -257,7 +257,7 @@ RigidShapeData::RigidShapeData()
enablePhysicsRep = true; enablePhysicsRep = true;
for (S32 i = 0; i < Sounds::MaxSounds; i++) for (S32 i = 0; i < Sounds::MaxSounds; i++)
INIT_SOUNDASSET_ARRAY(WaterSounds, i); INIT_ASSET_ARRAY(WaterSounds, i);
dragForce = 0; dragForce = 0;
vertFactor = 0.25; vertFactor = 0.25;
@ -371,7 +371,7 @@ void RigidShapeData::packData(BitStream* stream)
stream->write(body.friction); stream->write(body.friction);
for (U32 i = 0; i < Body::MaxSounds; ++i) for (U32 i = 0; i < Body::MaxSounds; ++i)
{ {
PACKDATA_SOUNDASSET_ARRAY(BodySounds, i); PACKDATA_ASSET_ARRAY(BodySounds, i);
} }
stream->write(minImpactSpeed); stream->write(minImpactSpeed);
@ -403,7 +403,7 @@ void RigidShapeData::packData(BitStream* stream)
// write the water sound profiles // write the water sound profiles
for (U32 i = 0; i < Sounds::MaxSounds; ++i) for (U32 i = 0; i < Sounds::MaxSounds; ++i)
{ {
PACKDATA_SOUNDASSET_ARRAY(WaterSounds, i); PACKDATA_ASSET_ARRAY(WaterSounds, i);
} }
if (stream->writeFlag( dustEmitter )) if (stream->writeFlag( dustEmitter ))
@ -434,7 +434,7 @@ void RigidShapeData::unpackData(BitStream* stream)
for (U32 i = 0; i < Body::Sounds::MaxSounds; i++) for (U32 i = 0; i < Body::Sounds::MaxSounds; i++)
{ {
UNPACKDATA_SOUNDASSET_ARRAY(BodySounds, i); UNPACKDATA_ASSET_ARRAY(BodySounds, i);
} }
stream->read(&minImpactSpeed); stream->read(&minImpactSpeed);
@ -466,7 +466,7 @@ void RigidShapeData::unpackData(BitStream* stream)
// write the water sound profiles // write the water sound profiles
for (U32 i = 0; i < Sounds::MaxSounds; ++i) for (U32 i = 0; i < Sounds::MaxSounds; ++i)
{ {
UNPACKDATA_SOUNDASSET_ARRAY(WaterSounds, i); UNPACKDATA_ASSET_ARRAY(WaterSounds, i);
} }
if( stream->readFlag() ) if( stream->readFlag() )

View file

@ -64,7 +64,7 @@ class RigidShapeData : public ShapeBaseData
} body; } body;
DECLARE_SOUNDASSET_ARRAY(RigidShapeData, BodySounds, Body::Sounds::MaxSounds) DECLARE_SOUNDASSET_ARRAY(RigidShapeData, BodySounds, Body::Sounds::MaxSounds)
DECLARE_SOUNDASSET_ARRAY_SETGET(RigidShapeData, BodySounds); DECLARE_ASSET_ARRAY_SETGET(RigidShapeData, BodySounds);
SFXProfile* getBodySoundProfile(U32 id) SFXProfile* getBodySoundProfile(U32 id)
{ {
@ -92,7 +92,7 @@ class RigidShapeData : public ShapeBaseData
MaxSounds MaxSounds
}; };
DECLARE_SOUNDASSET_ARRAY(RigidShapeData, WaterSounds, Sounds::MaxSounds) DECLARE_SOUNDASSET_ARRAY(RigidShapeData, WaterSounds, Sounds::MaxSounds)
DECLARE_SOUNDASSET_ARRAY_SETGET(RigidShapeData, WaterSounds); DECLARE_ASSET_ARRAY_SETGET(RigidShapeData, WaterSounds);
SFXProfile* getWaterSoundProfile(U32 id) SFXProfile* getWaterSoundProfile(U32 id)
{ {

View file

@ -109,7 +109,7 @@ SFXEmitter::SFXEmitter()
mLocalProfile.mFilename = StringTable->EmptyString(); mLocalProfile.mFilename = StringTable->EmptyString();
mLocalProfile._registerSignals(); mLocalProfile._registerSignals();
INIT_SOUNDASSET(Sound); INIT_ASSET(Sound);
mObjBox.minExtents.set( -1.f, -1.f, -1.f ); mObjBox.minExtents.set( -1.f, -1.f, -1.f );
mObjBox.maxExtents.set( 1.f, 1.f, 1.f ); mObjBox.maxExtents.set( 1.f, 1.f, 1.f );
@ -290,7 +290,7 @@ U32 SFXEmitter::packUpdate( NetConnection *con, U32 mask, BitStream *stream )
stream->writeAffineTransform( mObjToWorld ); stream->writeAffineTransform( mObjToWorld );
// track // track
PACK_SOUNDASSET(con, Sound); PACK_ASSET(con, Sound);
//if (stream->writeFlag(mDirty.test(Track))) //if (stream->writeFlag(mDirty.test(Track)))
// sfxWrite( stream, mTrack ); // sfxWrite( stream, mTrack );
@ -401,7 +401,7 @@ void SFXEmitter::unpackUpdate( NetConnection *conn, BitStream *stream )
} }
// track // track
UNPACK_SOUNDASSET(conn, Sound); UNPACK_ASSET(conn, Sound);
/*if (_readDirtyFlag(stream, Track)) /*if (_readDirtyFlag(stream, Track))
{ {
String errorStr; String errorStr;

View file

@ -105,7 +105,7 @@ class SFXEmitter : public SceneObject
BitSet32 mDirty; BitSet32 mDirty;
DECLARE_SOUNDASSET(SFXEmitter, Sound); DECLARE_SOUNDASSET(SFXEmitter, Sound);
DECLARE_SOUNDASSET_NET_SETGET(SFXEmitter, Sound, DirtyUpdateMask); DECLARE_ASSET_NET_SETGET(SFXEmitter, Sound, DirtyUpdateMask);
/// The sound source for the emitter. /// The sound source for the emitter.
SFXSource *mSource; SFXSource *mSource;

View file

@ -197,8 +197,8 @@ ShapeBaseData::ShapeBaseData()
renderWhenDestroyed( true ), renderWhenDestroyed( true ),
inheritEnergyFromMount( false ) inheritEnergyFromMount( false )
{ {
INIT_SHAPEASSET(Shape); INIT_ASSET(Shape);
INIT_SHAPEASSET(DebrisShape); INIT_ASSET(DebrisShape);
dMemset( mountPointNode, -1, sizeof( S32 ) * SceneObject::NumMountPoints ); dMemset( mountPointNode, -1, sizeof( S32 ) * SceneObject::NumMountPoints );
remap_txr_tags = NULL; remap_txr_tags = NULL;
@ -214,13 +214,13 @@ ShapeBaseData::ShapeBaseData(const ShapeBaseData& other, bool temp_clone) : Game
shadowProjectionDistance = other.shadowProjectionDistance; shadowProjectionDistance = other.shadowProjectionDistance;
shadowSphereAdjust = other.shadowSphereAdjust; shadowSphereAdjust = other.shadowSphereAdjust;
cloakTexName = other.cloakTexName; cloakTexName = other.cloakTexName;
CLONE_SHAPEASSET(Shape); CLONE_ASSET(Shape);
cubeDescName = other.cubeDescName; cubeDescName = other.cubeDescName;
cubeDescId = other.cubeDescId; cubeDescId = other.cubeDescId;
reflectorDesc = other.reflectorDesc; reflectorDesc = other.reflectorDesc;
debris = other.debris; debris = other.debris;
debrisID = other.debrisID; // -- for pack/unpack of debris ptr debrisID = other.debrisID; // -- for pack/unpack of debris ptr
CLONE_SHAPEASSET(DebrisShape); CLONE_ASSET(DebrisShape);
explosion = other.explosion; explosion = other.explosion;
explosionID = other.explosionID; // -- for pack/unpack of explosion ptr explosionID = other.explosionID; // -- for pack/unpack of explosion ptr
underwaterExplosion = other.underwaterExplosion; underwaterExplosion = other.underwaterExplosion;
@ -757,8 +757,8 @@ void ShapeBaseData::packData(BitStream* stream)
stream->write(shadowProjectionDistance); stream->write(shadowProjectionDistance);
stream->write(shadowSphereAdjust); stream->write(shadowSphereAdjust);
PACKDATA_SHAPEASSET(Shape); PACKDATA_ASSET(Shape);
PACKDATA_SHAPEASSET(DebrisShape); PACKDATA_ASSET(DebrisShape);
stream->writeString(cloakTexName); stream->writeString(cloakTexName);
if(stream->writeFlag(mass != gShapeBaseDataProto.mass)) if(stream->writeFlag(mass != gShapeBaseDataProto.mass))
@ -835,8 +835,8 @@ void ShapeBaseData::unpackData(BitStream* stream)
stream->read(&shadowProjectionDistance); stream->read(&shadowProjectionDistance);
stream->read(&shadowSphereAdjust); stream->read(&shadowSphereAdjust);
UNPACKDATA_SHAPEASSET(Shape); UNPACKDATA_ASSET(Shape);
UNPACKDATA_SHAPEASSET(DebrisShape); UNPACKDATA_ASSET(DebrisShape);
cloakTexName = stream->readSTString(); cloakTexName = stream->readSTString();
if(stream->readFlag()) if(stream->readFlag())

View file

@ -324,7 +324,7 @@ struct ShapeBaseImageData: public GameBaseData {
bool stateIgnoreLoadedForReady [MaxStates]; bool stateIgnoreLoadedForReady [MaxStates];
DECLARE_SOUNDASSET_ARRAY(ShapeBaseImageData, stateSound, MaxStates); DECLARE_SOUNDASSET_ARRAY(ShapeBaseImageData, stateSound, MaxStates);
DECLARE_SOUNDASSET_ARRAY_SETGET(ShapeBaseImageData, stateSound); DECLARE_ASSET_ARRAY_SETGET(ShapeBaseImageData, stateSound);
//SFXTrack* stateSound [MaxStates]; //SFXTrack* stateSound [MaxStates];
const char* stateScript [MaxStates]; const char* stateScript [MaxStates];
@ -379,10 +379,10 @@ struct ShapeBaseImageData: public GameBaseData {
///< when the script prefix has changed. ///< when the script prefix has changed.
DECLARE_SHAPEASSET_ARRAY(ShapeBaseImageData, Shape, MaxShapes); ///< Name of shape to render. DECLARE_SHAPEASSET_ARRAY(ShapeBaseImageData, Shape, MaxShapes); ///< Name of shape to render.
DECLARE_SHAPEASSET_ARRAY_SETGET(ShapeBaseImageData, Shape); DECLARE_ASSET_ARRAY_SETGET(ShapeBaseImageData, Shape);
//DECLARE_SHAPEASSET(ShapeBaseImageData, ShapeFP); ///< Name of shape to render in first person (optional). //DECLARE_SHAPEASSET(ShapeBaseImageData, ShapeFP); ///< Name of shape to render in first person (optional).
//DECLARE_SHAPEASSET_SETGET(ShapeBaseImageData, ShapeFP); //DECLARE_ASSET_SETGET(ShapeBaseImageData, ShapeFP);
StringTableEntry imageAnimPrefix; ///< Passed along to the mounting shape to modify StringTableEntry imageAnimPrefix; ///< Passed along to the mounting shape to modify
/// animation sequences played in 3rd person. [optional] /// animation sequences played in 3rd person. [optional]
@ -546,7 +546,7 @@ public:
F32 shadowSphereAdjust; F32 shadowSphereAdjust;
DECLARE_SHAPEASSET(ShapeBaseData, Shape, onShapeChanged); DECLARE_SHAPEASSET(ShapeBaseData, Shape, onShapeChanged);
DECLARE_SHAPEASSET_SETGET(ShapeBaseData, Shape); DECLARE_ASSET_SETGET(ShapeBaseData, Shape);
StringTableEntry cloakTexName; StringTableEntry cloakTexName;
@ -562,7 +562,7 @@ public:
S32 debrisID; S32 debrisID;
DECLARE_SHAPEASSET(ShapeBaseData, DebrisShape, onDebrisChanged); DECLARE_SHAPEASSET(ShapeBaseData, DebrisShape, onDebrisChanged);
DECLARE_SHAPEASSET_SETGET(ShapeBaseData, DebrisShape); DECLARE_ASSET_SETGET(ShapeBaseData, DebrisShape);
ExplosionData* explosion; ExplosionData* explosion;
S32 explosionID; S32 explosionID;

View file

@ -257,7 +257,7 @@ ShapeBaseImageData::ShapeBaseImageData()
stateShapeSequence[i] = 0; stateShapeSequence[i] = 0;
stateScaleShapeSequence[i] = false; stateScaleShapeSequence[i] = false;
INIT_SOUNDASSET_ARRAY(stateSound, i); INIT_ASSET_ARRAY(stateSound, i);
stateScript[i] = 0; stateScript[i] = 0;
stateEmitter[i] = 0; stateEmitter[i] = 0;
stateEmitterTime[i] = 0; stateEmitterTime[i] = 0;
@ -295,7 +295,7 @@ ShapeBaseImageData::ShapeBaseImageData()
hasFlash[i] = false; hasFlash[i] = false;
shapeIsValid[i] = false; shapeIsValid[i] = false;
INIT_SHAPEASSET_ARRAY(Shape, i); INIT_ASSET_ARRAY(Shape, i);
} }
shakeCamera = false; shakeCamera = false;
@ -983,7 +983,7 @@ void ShapeBaseImageData::packData(BitStream* stream)
for (U32 j = 0; j < MaxShapes; ++j) for (U32 j = 0; j < MaxShapes; ++j)
{ {
PACKDATA_SHAPEASSET_ARRAY(Shape, j); // shape 0 for normal use, shape 1 for first person use (optional) PACKDATA_ASSET_ARRAY(Shape, j); // shape 0 for normal use, shape 1 for first person use (optional)
} }
stream->writeString(imageAnimPrefix); stream->writeString(imageAnimPrefix);
@ -1147,7 +1147,7 @@ void ShapeBaseImageData::packData(BitStream* stream)
} }
} }
PACKDATA_SOUNDASSET_ARRAY(stateSound, i); PACKDATA_ASSET_ARRAY(stateSound, i);
} }
stream->write(maxConcurrentSounds); stream->write(maxConcurrentSounds);
stream->writeFlag(useRemainderDT); stream->writeFlag(useRemainderDT);
@ -1167,7 +1167,7 @@ void ShapeBaseImageData::unpackData(BitStream* stream)
for (U32 j = 0; j < MaxShapes; ++j) for (U32 j = 0; j < MaxShapes; ++j)
{ {
UNPACKDATA_SHAPEASSET_ARRAY(Shape, j); // shape 0 for normal use, shape 1 for first person use (optional) UNPACKDATA_ASSET_ARRAY(Shape, j); // shape 0 for normal use, shape 1 for first person use (optional)
} }
imageAnimPrefix = stream->readSTString(); imageAnimPrefix = stream->readSTString();
@ -1352,7 +1352,7 @@ void ShapeBaseImageData::unpackData(BitStream* stream)
else else
s.emitter = 0; s.emitter = 0;
UNPACKDATA_SOUNDASSET_ARRAY(stateSound, i); UNPACKDATA_ASSET_ARRAY(stateSound, i);
} }
} }

View file

@ -149,7 +149,7 @@ TSStatic::TSStatic()
mAnimOffset = 0.0f; mAnimOffset = 0.0f;
mAnimSpeed = 1.0f; mAnimSpeed = 1.0f;
INIT_SHAPEASSET(Shape); INIT_ASSET(Shape);
} }
TSStatic::~TSStatic() TSStatic::~TSStatic()
@ -958,7 +958,7 @@ U32 TSStatic::packUpdate(NetConnection* con, U32 mask, BitStream* stream)
if (stream->writeFlag(mask & AdvancedStaticOptionsMask)) if (stream->writeFlag(mask & AdvancedStaticOptionsMask))
{ {
PACK_SHAPEASSET(con, Shape); PACK_ASSET(con, Shape);
stream->write((U32)mDecalType); stream->write((U32)mDecalType);
@ -1073,7 +1073,7 @@ void TSStatic::unpackUpdate(NetConnection* con, BitStream* stream)
if (stream->readFlag()) // AdvancedStaticOptionsMask if (stream->readFlag()) // AdvancedStaticOptionsMask
{ {
UNPACK_SHAPEASSET(con, Shape); UNPACK_ASSET(con, Shape);
stream->read((U32*)&mDecalType); stream->read((U32*)&mDecalType);

View file

@ -192,7 +192,7 @@ protected:
Convex* mConvexList; Convex* mConvexList;
DECLARE_SHAPEASSET(TSStatic, Shape, onShapeChanged); DECLARE_SHAPEASSET(TSStatic, Shape, onShapeChanged);
DECLARE_SHAPEASSET_NET_SETGET(TSStatic, Shape, AdvancedStaticOptionsMask); DECLARE_ASSET_NET_SETGET(TSStatic, Shape, AdvancedStaticOptionsMask);
U32 mShapeHash; U32 mShapeHash;
Vector<S32> mCollisionDetails; Vector<S32> mCollisionDetails;

View file

@ -116,7 +116,7 @@ FlyingVehicleData::FlyingVehicleData()
jetEmitter[j] = 0; jetEmitter[j] = 0;
for (S32 i = 0; i < MaxSounds; i++) for (S32 i = 0; i < MaxSounds; i++)
INIT_SOUNDASSET_ARRAY(FlyingSounds, i); INIT_ASSET_ARRAY(FlyingSounds, i);
vertThrustMultiple = 1.0; vertThrustMultiple = 1.0;
} }
@ -241,7 +241,7 @@ void FlyingVehicleData::packData(BitStream* stream)
for (S32 i = 0; i < MaxSounds; i++) for (S32 i = 0; i < MaxSounds; i++)
{ {
PACKDATA_SOUNDASSET_ARRAY(FlyingSounds, i); PACKDATA_ASSET_ARRAY(FlyingSounds, i);
} }
for (S32 j = 0; j < MaxJetEmitters; j++) for (S32 j = 0; j < MaxJetEmitters; j++)
@ -276,7 +276,7 @@ void FlyingVehicleData::unpackData(BitStream* stream)
for (S32 i = 0; i < MaxSounds; i++) for (S32 i = 0; i < MaxSounds; i++)
{ {
UNPACKDATA_SOUNDASSET_ARRAY(FlyingSounds, i); UNPACKDATA_ASSET_ARRAY(FlyingSounds, i);
} }
for (S32 j = 0; j < MaxJetEmitters; j++) { for (S32 j = 0; j < MaxJetEmitters; j++) {

View file

@ -46,7 +46,7 @@ struct FlyingVehicleData: public VehicleData {
MaxSounds, MaxSounds,
}; };
DECLARE_SOUNDASSET_ARRAY(FlyingVehicleData, FlyingSounds, Sounds::MaxSounds); DECLARE_SOUNDASSET_ARRAY(FlyingVehicleData, FlyingSounds, Sounds::MaxSounds);
DECLARE_SOUNDASSET_ARRAY_SETGET(FlyingVehicleData, FlyingSounds); DECLARE_ASSET_ARRAY_SETGET(FlyingVehicleData, FlyingSounds);
SFXProfile* getFlyingSoundProfile(U32 id) SFXProfile* getFlyingSoundProfile(U32 id)
{ {
if (mFlyingSoundsAsset[id] != NULL) if (mFlyingSoundsAsset[id] != NULL)

View file

@ -162,7 +162,7 @@ HoverVehicleData::HoverVehicleData()
jetEmitter[j] = 0; jetEmitter[j] = 0;
for (S32 i = 0; i < MaxSounds; i++) for (S32 i = 0; i < MaxSounds; i++)
INIT_SOUNDASSET_ARRAY(HoverSounds, i); INIT_ASSET_ARRAY(HoverSounds, i);
} }
HoverVehicleData::~HoverVehicleData() HoverVehicleData::~HoverVehicleData()
@ -370,7 +370,7 @@ void HoverVehicleData::packData(BitStream* stream)
for (S32 i = 0; i < MaxSounds; i++) for (S32 i = 0; i < MaxSounds; i++)
{ {
PACKDATA_SOUNDASSET_ARRAY(HoverSounds, i); PACKDATA_ASSET_ARRAY(HoverSounds, i);
} }
for (S32 j = 0; j < MaxJetEmitters; j++) for (S32 j = 0; j < MaxJetEmitters; j++)
@ -419,7 +419,7 @@ void HoverVehicleData::unpackData(BitStream* stream)
for (S32 i = 0; i < MaxSounds; i++) for (S32 i = 0; i < MaxSounds; i++)
{ {
UNPACKDATA_SOUNDASSET_ARRAY(HoverSounds, i); UNPACKDATA_ASSET_ARRAY(HoverSounds, i);
} }
for (S32 j = 0; j < MaxJetEmitters; j++) { for (S32 j = 0; j < MaxJetEmitters; j++) {

View file

@ -47,7 +47,7 @@ class HoverVehicleData : public VehicleData
MaxSounds MaxSounds
}; };
DECLARE_SOUNDASSET_ARRAY(HoverVehicleData, HoverSounds, Sounds::MaxSounds); DECLARE_SOUNDASSET_ARRAY(HoverVehicleData, HoverSounds, Sounds::MaxSounds);
DECLARE_SOUNDASSET_ARRAY_SETGET(HoverVehicleData, HoverSounds); DECLARE_ASSET_ARRAY_SETGET(HoverVehicleData, HoverSounds);
SFXProfile* getHoverSoundProfile(U32 id) SFXProfile* getHoverSoundProfile(U32 id)
{ {
if (mHoverSoundsAsset[id] != NULL) if (mHoverSoundsAsset[id] != NULL)

View file

@ -189,7 +189,7 @@ VehicleData::VehicleData()
for (S32 i = 0; i < Body::MaxSounds; i++) for (S32 i = 0; i < Body::MaxSounds; i++)
{ {
INIT_SOUNDASSET_ARRAY(VehicleBodySounds, i); INIT_ASSET_ARRAY(VehicleBodySounds, i);
} }
dustEmitter = NULL; dustEmitter = NULL;
@ -214,7 +214,7 @@ VehicleData::VehicleData()
hardSplashSoundVel = 3.0; hardSplashSoundVel = 3.0;
for (S32 i = 0; i < Sounds::MaxSounds; i++) for (S32 i = 0; i < Sounds::MaxSounds; i++)
INIT_SOUNDASSET_ARRAY(VehicleWaterSounds, i); INIT_ASSET_ARRAY(VehicleWaterSounds, i);
collDamageThresholdVel = 20; collDamageThresholdVel = 20;
collDamageMultiplier = 0.05f; collDamageMultiplier = 0.05f;
@ -302,7 +302,7 @@ void VehicleData::packData(BitStream* stream)
stream->write(body.friction); stream->write(body.friction);
for (i = 0; i < Body::MaxSounds; i++) for (i = 0; i < Body::MaxSounds; i++)
{ {
PACKDATA_SOUNDASSET_ARRAY(VehicleBodySounds, i); PACKDATA_ASSET_ARRAY(VehicleBodySounds, i);
} }
stream->write(minImpactSpeed); stream->write(minImpactSpeed);
@ -346,7 +346,7 @@ void VehicleData::packData(BitStream* stream)
// write the water sound profiles // write the water sound profiles
for (i = 0; i < MaxSounds; i++) for (i = 0; i < MaxSounds; i++)
{ {
PACKDATA_SOUNDASSET_ARRAY(VehicleWaterSounds, i); PACKDATA_ASSET_ARRAY(VehicleWaterSounds, i);
} }
if (stream->writeFlag( dustEmitter )) if (stream->writeFlag( dustEmitter ))
@ -398,7 +398,7 @@ void VehicleData::unpackData(BitStream* stream)
S32 i; S32 i;
for (i = 0; i < Body::MaxSounds; i++) for (i = 0; i < Body::MaxSounds; i++)
{ {
UNPACKDATA_SOUNDASSET_ARRAY(VehicleBodySounds, i); UNPACKDATA_ASSET_ARRAY(VehicleBodySounds, i);
} }
stream->read(&minImpactSpeed); stream->read(&minImpactSpeed);
@ -442,7 +442,7 @@ void VehicleData::unpackData(BitStream* stream)
// write the water sound profiles // write the water sound profiles
for (i = 0; i < Sounds::MaxSounds; i++) for (i = 0; i < Sounds::MaxSounds; i++)
{ {
UNPACKDATA_SOUNDASSET_ARRAY(VehicleWaterSounds, i); UNPACKDATA_ASSET_ARRAY(VehicleWaterSounds, i);
} }
if( stream->readFlag() ) if( stream->readFlag() )

View file

@ -50,7 +50,7 @@ struct VehicleData : public RigidShapeData
} body; } body;
DECLARE_SOUNDASSET_ARRAY(VehicleData, VehicleBodySounds, Body::Sounds::MaxSounds) DECLARE_SOUNDASSET_ARRAY(VehicleData, VehicleBodySounds, Body::Sounds::MaxSounds)
DECLARE_SOUNDASSET_ARRAY_SETGET(VehicleData, VehicleBodySounds); DECLARE_ASSET_ARRAY_SETGET(VehicleData, VehicleBodySounds);
SFXProfile* getVehicleBodySoundProfile(U32 id) SFXProfile* getVehicleBodySoundProfile(U32 id)
{ {
@ -82,7 +82,7 @@ struct VehicleData : public RigidShapeData
}; };
DECLARE_SOUNDASSET_ARRAY(VehicleData, VehicleWaterSounds, Sounds::MaxSounds) DECLARE_SOUNDASSET_ARRAY(VehicleData, VehicleWaterSounds, Sounds::MaxSounds)
DECLARE_SOUNDASSET_ARRAY_SETGET(VehicleData, VehicleWaterSounds); DECLARE_ASSET_ARRAY_SETGET(VehicleData, VehicleWaterSounds);
SFXProfile* getVehicleWaterSoundProfile(U32 id) SFXProfile* getVehicleWaterSoundProfile(U32 id)
{ {

View file

@ -75,7 +75,7 @@ ConsoleDocClass( WheeledVehicleTire,
WheeledVehicleTire::WheeledVehicleTire() WheeledVehicleTire::WheeledVehicleTire()
{ {
INIT_SHAPEASSET(Shape); INIT_ASSET(Shape);
staticFriction = 1; staticFriction = 1;
kineticFriction = 0.5f; kineticFriction = 0.5f;
@ -177,7 +177,7 @@ void WheeledVehicleTire::packData(BitStream* stream)
{ {
Parent::packData(stream); Parent::packData(stream);
PACKDATA_SHAPEASSET(Shape); PACKDATA_ASSET(Shape);
stream->write(mass); stream->write(mass);
stream->write(staticFriction); stream->write(staticFriction);
@ -196,7 +196,7 @@ void WheeledVehicleTire::unpackData(BitStream* stream)
{ {
Parent::unpackData(stream); Parent::unpackData(stream);
UNPACKDATA_SHAPEASSET(Shape); UNPACKDATA_ASSET(Shape);
stream->read(&mass); stream->read(&mass);
stream->read(&staticFriction); stream->read(&staticFriction);
@ -312,7 +312,7 @@ WheeledVehicleData::WheeledVehicleData()
wheelCount = 0; wheelCount = 0;
dMemset(&wheel, 0, sizeof(wheel)); dMemset(&wheel, 0, sizeof(wheel));
for (S32 i = 0; i < MaxSounds; i++) for (S32 i = 0; i < MaxSounds; i++)
INIT_SOUNDASSET_ARRAY(WheeledVehicleSounds, i); INIT_ASSET_ARRAY(WheeledVehicleSounds, i);
} }
@ -483,7 +483,7 @@ void WheeledVehicleData::packData(BitStream* stream)
for (S32 i = 0; i < MaxSounds; i++) for (S32 i = 0; i < MaxSounds; i++)
{ {
PACKDATA_SOUNDASSET_ARRAY(WheeledVehicleSounds, i); PACKDATA_ASSET_ARRAY(WheeledVehicleSounds, i);
} }
stream->write(maxWheelSpeed); stream->write(maxWheelSpeed);
@ -502,7 +502,7 @@ void WheeledVehicleData::unpackData(BitStream* stream)
for (S32 i = 0; i < MaxSounds; i++) for (S32 i = 0; i < MaxSounds; i++)
{ {
UNPACKDATA_SOUNDASSET_ARRAY(WheeledVehicleSounds, i); UNPACKDATA_ASSET_ARRAY(WheeledVehicleSounds, i);
} }
stream->read(&maxWheelSpeed); stream->read(&maxWheelSpeed);

View file

@ -44,7 +44,7 @@ struct WheeledVehicleTire: public SimDataBlock
typedef SimDataBlock Parent; typedef SimDataBlock Parent;
DECLARE_SHAPEASSET(WheeledVehicleTire, Shape, onShapeChanged); DECLARE_SHAPEASSET(WheeledVehicleTire, Shape, onShapeChanged);
DECLARE_SHAPEASSET_SETGET(WheeledVehicleTire, Shape); DECLARE_ASSET_SETGET(WheeledVehicleTire, Shape);
// Physical properties // Physical properties
F32 mass; // Mass of the whole wheel F32 mass; // Mass of the whole wheel
@ -120,7 +120,7 @@ struct WheeledVehicleData: public VehicleData
}; };
DECLARE_SOUNDASSET_ARRAY(WheeledVehicleData, WheeledVehicleSounds, Sounds::MaxSounds); DECLARE_SOUNDASSET_ARRAY(WheeledVehicleData, WheeledVehicleSounds, Sounds::MaxSounds);
DECLARE_SOUNDASSET_ARRAY_SETGET(WheeledVehicleData, WheeledVehicleSounds); DECLARE_ASSET_ARRAY_SETGET(WheeledVehicleData, WheeledVehicleSounds);
SFXProfile* getWheeledVehicleSound(U32 id) SFXProfile* getWheeledVehicleSound(U32 id)
{ {

View file

@ -141,7 +141,7 @@ U32 Projectile::smProjectileWarpTicks = 5;
// //
afxMagicMissileData::afxMagicMissileData() afxMagicMissileData::afxMagicMissileData()
{ {
INIT_SHAPEASSET(ProjectileShape); INIT_ASSET(ProjectileShape);
sound = NULL; sound = NULL;
@ -246,7 +246,7 @@ afxMagicMissileData::afxMagicMissileData()
afxMagicMissileData::afxMagicMissileData(const afxMagicMissileData& other, bool temp_clone) : GameBaseData(other, temp_clone) afxMagicMissileData::afxMagicMissileData(const afxMagicMissileData& other, bool temp_clone) : GameBaseData(other, temp_clone)
{ {
CLONE_SHAPEASSET(ProjectileShape); CLONE_ASSET(ProjectileShape);
projectileShape = other.projectileShape; // -- TSShape loads using projectileShapeName projectileShape = other.projectileShape; // -- TSShape loads using projectileShapeName
sound = other.sound; sound = other.sound;
splash = other.splash; splash = other.splash;
@ -599,7 +599,7 @@ void afxMagicMissileData::packData(BitStream* stream)
{ {
Parent::packData(stream); Parent::packData(stream);
PACKDATA_SHAPEASSET(ProjectileShape); PACKDATA_ASSET(ProjectileShape);
/* From stock Projectile code... /* From stock Projectile code...
stream->writeFlag(faceViewer); stream->writeFlag(faceViewer);
@ -710,7 +710,7 @@ void afxMagicMissileData::unpackData(BitStream* stream)
{ {
Parent::unpackData(stream); Parent::unpackData(stream);
UNPACKDATA_SHAPEASSET(ProjectileShape); UNPACKDATA_ASSET(ProjectileShape);
/* From stock Projectile code... /* From stock Projectile code...
faceViewer = stream->readFlag(); faceViewer = stream->readFlag();
*/ */

View file

@ -72,7 +72,7 @@ public:
// variables set in datablock definition: // variables set in datablock definition:
// Shape related // Shape related
DECLARE_SHAPEASSET(afxMagicMissileData, ProjectileShape, onShapeChanged); DECLARE_SHAPEASSET(afxMagicMissileData, ProjectileShape, onShapeChanged);
DECLARE_SHAPEASSET_SETGET(afxMagicMissileData, ProjectileShape); DECLARE_ASSET_SETGET(afxMagicMissileData, ProjectileShape);
//StringTableEntry projectileShapeName; //StringTableEntry projectileShapeName;
//bool hasLight; //bool hasLight;

View file

@ -51,7 +51,7 @@ ConsoleDocClass( afxBillboardData,
afxBillboardData::afxBillboardData() afxBillboardData::afxBillboardData()
{ {
color.set(1.0f, 1.0f, 1.0f, 1.0f); color.set(1.0f, 1.0f, 1.0f, 1.0f);
INIT_IMAGEASSET(Texture); INIT_ASSET(Texture);
dimensions.set(1.0f, 1.0f); dimensions.set(1.0f, 1.0f);
texCoords[0].set(0.0f, 0.0f); texCoords[0].set(0.0f, 0.0f);
texCoords[1].set(0.0f, 1.0f); texCoords[1].set(0.0f, 1.0f);
@ -66,7 +66,7 @@ afxBillboardData::afxBillboardData(const afxBillboardData& other, bool temp_clon
: GameBaseData(other, temp_clone) : GameBaseData(other, temp_clone)
{ {
color = other.color; color = other.color;
CLONE_IMAGEASSET(Texture); CLONE_ASSET(Texture);
dimensions = other.dimensions; dimensions = other.dimensions;
texCoords[0] = other.texCoords[0]; texCoords[0] = other.texCoords[0];
texCoords[1] = other.texCoords[1]; texCoords[1] = other.texCoords[1];
@ -123,7 +123,7 @@ void afxBillboardData::packData(BitStream* stream)
Parent::packData(stream); Parent::packData(stream);
stream->write(color); stream->write(color);
PACKDATA_IMAGEASSET(Texture); PACKDATA_ASSET(Texture);
mathWrite(*stream, dimensions); mathWrite(*stream, dimensions);
mathWrite(*stream, texCoords[0]); mathWrite(*stream, texCoords[0]);
@ -140,7 +140,7 @@ void afxBillboardData::unpackData(BitStream* stream)
Parent::unpackData(stream); Parent::unpackData(stream);
stream->read(&color); stream->read(&color);
UNPACKDATA_IMAGEASSET(Texture); UNPACKDATA_ASSET(Texture);
mathRead(*stream, &dimensions); mathRead(*stream, &dimensions);
mathRead(*stream, &texCoords[0]); mathRead(*stream, &texCoords[0]);
mathRead(*stream, &texCoords[1]); mathRead(*stream, &texCoords[1]);

View file

@ -48,7 +48,7 @@ public:
public: public:
DECLARE_IMAGEASSET(afxBillboardData, Texture, onChangeTexture, GFXStaticTextureSRGBProfile); DECLARE_IMAGEASSET(afxBillboardData, Texture, onChangeTexture, GFXStaticTextureSRGBProfile);
DECLARE_IMAGEASSET_SETGET(afxBillboardData, Texture); DECLARE_ASSET_SETGET(afxBillboardData, Texture);
LinearColorF color; LinearColorF color;

View file

@ -54,7 +54,7 @@ ConsoleDocClass( afxModelData,
afxModelData::afxModelData() afxModelData::afxModelData()
{ {
INIT_SHAPEASSET(Shape); INIT_ASSET(Shape);
sequence = ST_NULLSTRING; sequence = ST_NULLSTRING;
seq_rate = 1.0f; seq_rate = 1.0f;
seq_offset = 0.0f; seq_offset = 0.0f;
@ -84,7 +84,7 @@ afxModelData::afxModelData()
afxModelData::afxModelData(const afxModelData& other, bool temp_clone) : GameBaseData(other, temp_clone) afxModelData::afxModelData(const afxModelData& other, bool temp_clone) : GameBaseData(other, temp_clone)
{ {
CLONE_SHAPEASSET(Shape); CLONE_ASSET(Shape);
sequence = other.sequence; sequence = other.sequence;
seq_rate = other.seq_rate; seq_rate = other.seq_rate;
seq_offset = other.seq_offset; seq_offset = other.seq_offset;
@ -253,7 +253,7 @@ void afxModelData::packData(BitStream* stream)
{ {
Parent::packData(stream); Parent::packData(stream);
PACKDATA_SHAPEASSET(Shape); PACKDATA_ASSET(Shape);
stream->writeString(sequence); stream->writeString(sequence);
stream->write(seq_rate); stream->write(seq_rate);
stream->write(seq_offset); stream->write(seq_offset);
@ -285,7 +285,7 @@ void afxModelData::unpackData(BitStream* stream)
{ {
Parent::unpackData(stream); Parent::unpackData(stream);
UNPACKDATA_SHAPEASSET(Shape); UNPACKDATA_ASSET(Shape);
sequence = stream->readSTString(); sequence = stream->readSTString();
stream->read(&seq_rate); stream->read(&seq_rate);
stream->read(&seq_offset); stream->read(&seq_offset);

View file

@ -44,7 +44,7 @@ struct afxModelData : public GameBaseData
typedef GameBaseData Parent; typedef GameBaseData Parent;
DECLARE_SHAPEASSET(afxModelData, Shape, onShapeChanged); DECLARE_SHAPEASSET(afxModelData, Shape, onShapeChanged);
DECLARE_SHAPEASSET_SETGET(afxModelData, Shape); DECLARE_ASSET_SETGET(afxModelData, Shape);
StringTableEntry sequence; StringTableEntry sequence;

View file

@ -78,7 +78,7 @@ bool afxZodiacData::sPreferDestinationGradients = false;
afxZodiacData::afxZodiacData() afxZodiacData::afxZodiacData()
{ {
INIT_IMAGEASSET(Texture); INIT_ASSET(Texture);
radius_xy = 1; radius_xy = 1;
vert_range.set(0.0f, 0.0f); vert_range.set(0.0f, 0.0f);
@ -120,7 +120,7 @@ afxZodiacData::afxZodiacData()
afxZodiacData::afxZodiacData(const afxZodiacData& other, bool temp_clone) : GameBaseData(other, temp_clone) afxZodiacData::afxZodiacData(const afxZodiacData& other, bool temp_clone) : GameBaseData(other, temp_clone)
{ {
CLONE_IMAGEASSET(Texture); CLONE_ASSET(Texture);
radius_xy = other.radius_xy; radius_xy = other.radius_xy;
vert_range = other.vert_range; vert_range = other.vert_range;
@ -269,7 +269,7 @@ void afxZodiacData::packData(BitStream* stream)
merge_zflags(); merge_zflags();
PACKDATA_IMAGEASSET(Texture); PACKDATA_ASSET(Texture);
stream->write(radius_xy); stream->write(radius_xy);
stream->write(vert_range.x); stream->write(vert_range.x);
stream->write(vert_range.y); stream->write(vert_range.y);
@ -294,7 +294,7 @@ void afxZodiacData::unpackData(BitStream* stream)
{ {
Parent::unpackData(stream); Parent::unpackData(stream);
UNPACKDATA_IMAGEASSET(Texture); UNPACKDATA_ASSET(Texture);
stream->read(&radius_xy); stream->read(&radius_xy);
stream->read(&vert_range.x); stream->read(&vert_range.x);
stream->read(&vert_range.y); stream->read(&vert_range.y);

View file

@ -60,7 +60,7 @@ public:
public: public:
DECLARE_IMAGEASSET(afxZodiacData, Texture, onImageChanged, AFX_GFXZodiacTextureProfile); DECLARE_IMAGEASSET(afxZodiacData, Texture, onImageChanged, AFX_GFXZodiacTextureProfile);
DECLARE_IMAGEASSET_SETGET(afxZodiacData, Texture); DECLARE_ASSET_SETGET(afxZodiacData, Texture);
F32 radius_xy; F32 radius_xy;
Point2F vert_range; Point2F vert_range;

View file

@ -51,7 +51,7 @@ ConsoleDocClass( afxZodiacPlaneData,
afxZodiacPlaneData::afxZodiacPlaneData() afxZodiacPlaneData::afxZodiacPlaneData()
{ {
INIT_IMAGEASSET(Texture); INIT_ASSET(Texture);
radius_xy = 1; radius_xy = 1;
start_ang = 0; start_ang = 0;
@ -71,7 +71,7 @@ afxZodiacPlaneData::afxZodiacPlaneData()
afxZodiacPlaneData::afxZodiacPlaneData(const afxZodiacPlaneData& other, bool temp_clone) afxZodiacPlaneData::afxZodiacPlaneData(const afxZodiacPlaneData& other, bool temp_clone)
: GameBaseData(other, temp_clone) : GameBaseData(other, temp_clone)
{ {
CLONE_IMAGEASSET(Texture); CLONE_ASSET(Texture);
radius_xy = other.radius_xy; radius_xy = other.radius_xy;
start_ang = other.start_ang; start_ang = other.start_ang;
@ -165,7 +165,7 @@ void afxZodiacPlaneData::packData(BitStream* stream)
merge_zflags(); merge_zflags();
PACKDATA_IMAGEASSET(Texture); PACKDATA_ASSET(Texture);
stream->write(radius_xy); stream->write(radius_xy);
stream->write(start_ang); stream->write(start_ang);
@ -184,7 +184,7 @@ void afxZodiacPlaneData::unpackData(BitStream* stream)
{ {
Parent::unpackData(stream); Parent::unpackData(stream);
UNPACKDATA_IMAGEASSET(Texture); UNPACKDATA_ASSET(Texture);
stream->read(&radius_xy); stream->read(&radius_xy);
stream->read(&start_ang); stream->read(&start_ang);

View file

@ -60,7 +60,7 @@ public:
public: public:
DECLARE_IMAGEASSET(afxZodiacPlaneData, Texture, onImageChanged, AFX_GFXZodiacTextureProfile); DECLARE_IMAGEASSET(afxZodiacPlaneData, Texture, onImageChanged, AFX_GFXZodiacTextureProfile);
DECLARE_IMAGEASSET_SETGET(afxZodiacPlaneData, Texture); DECLARE_ASSET_SETGET(afxZodiacPlaneData, Texture);
F32 radius_xy; F32 radius_xy;
F32 start_ang; F32 start_ang;

View file

@ -173,6 +173,5 @@ private:
#define assetText(x,suff) #x#suff #define assetText(x,suff) #x#suff
#define macroText(x) #x #define macroText(x) #x
#define assetDoc(x,suff) "@brief "#x" "#suff #define assetDoc(x,suff) "@brief "#x" "#suff
#endif // _ASSET_BASE_H_ #endif // _ASSET_BASE_H_

View file

@ -137,8 +137,8 @@ VolumetricFog::VolumetricFog()
mSpeed1.set(0.5f, 0.0f); mSpeed1.set(0.5f, 0.0f);
mSpeed2.set(0.1f, 0.1f); mSpeed2.set(0.1f, 0.1f);
INIT_SHAPEASSET(Shape); INIT_ASSET(Shape);
INIT_IMAGEASSET(Texture); INIT_ASSET(Texture);
} }
VolumetricFog::~VolumetricFog() VolumetricFog::~VolumetricFog()
@ -543,7 +543,7 @@ U32 VolumetricFog::packUpdate(NetConnection *con, U32 mask, BitStream *stream)
stream->write(mFogDensity); stream->write(mFogDensity);
if (stream->writeFlag(mask & FogModulationMask)) if (stream->writeFlag(mask & FogModulationMask))
{ {
PACK_IMAGEASSET(con, Texture); PACK_ASSET(con, Texture);
mTexTiles = mFabs(mTexTiles); mTexTiles = mFabs(mTexTiles);
stream->write(mTexTiles); stream->write(mTexTiles);
stream->write(mStrength); stream->write(mStrength);
@ -567,7 +567,7 @@ U32 VolumetricFog::packUpdate(NetConnection *con, U32 mask, BitStream *stream)
} }
if (stream->writeFlag(mask & FogShapeMask)) if (stream->writeFlag(mask & FogShapeMask))
{ {
PACK_SHAPEASSET(con, Shape); PACK_ASSET(con, Shape);
mathWrite(*stream, getTransform()); mathWrite(*stream, getTransform());
mathWrite(*stream, getScale()); mathWrite(*stream, getScale());
@ -613,7 +613,7 @@ void VolumetricFog::unpackUpdate(NetConnection *con, BitStream *stream)
} }
if (stream->readFlag())// Fog Modulation if (stream->readFlag())// Fog Modulation
{ {
UNPACK_IMAGEASSET(con, Texture); UNPACK_ASSET(con, Texture);
stream->read(&mTexTiles); stream->read(&mTexTiles);
mTexTiles = mFabs(mTexTiles); mTexTiles = mFabs(mTexTiles);
stream->read(&mStrength); stream->read(&mStrength);
@ -667,7 +667,7 @@ void VolumetricFog::unpackUpdate(NetConnection *con, BitStream *stream)
} }
if (stream->readFlag())//Fog shape if (stream->readFlag())//Fog shape
{ {
UNPACK_SHAPEASSET(con, Shape); UNPACK_ASSET(con, Shape);
mathRead(*stream, &mat); mathRead(*stream, &mat);
mathRead(*stream, &scale); mathRead(*stream, &scale);

View file

@ -85,7 +85,7 @@ class VolumetricFog : public SceneObject
}; };
DECLARE_SHAPEASSET(VolumetricFog, Shape, onShapeChanged); DECLARE_SHAPEASSET(VolumetricFog, Shape, onShapeChanged);
DECLARE_SHAPEASSET_NET_SETGET(VolumetricFog, Shape, FogShapeMask); DECLARE_ASSET_NET_SETGET(VolumetricFog, Shape, FogShapeMask);
protected: protected:
// Rendertargets; // Rendertargets;
@ -163,7 +163,7 @@ class VolumetricFog : public SceneObject
// Fog Modulation data // Fog Modulation data
DECLARE_IMAGEASSET(VolumetricFog, Texture, onImageChanged, GFXStaticTextureSRGBProfile); DECLARE_IMAGEASSET(VolumetricFog, Texture, onImageChanged, GFXStaticTextureSRGBProfile);
DECLARE_IMAGEASSET_NET_SETGET(VolumetricFog, Texture, FogModulationMask); DECLARE_ASSET_NET_SETGET(VolumetricFog, Texture, FogModulationMask);
bool mIsTextured; bool mIsTextured;
F32 mTexTiles; F32 mTexTiles;

View file

@ -215,7 +215,7 @@ U32 BasicClouds::packUpdate( NetConnection *conn, U32 mask, BitStream *stream )
{ {
stream->writeFlag( mLayerEnabled[i] ); stream->writeFlag( mLayerEnabled[i] );
PACK_IMAGEASSET_ARRAY(conn, Texture, i); PACK_ASSET_ARRAY(conn, Texture, i);
stream->write( mTexScale[i] ); stream->write( mTexScale[i] );
mathWrite( *stream, mTexDirection[i] ); mathWrite( *stream, mTexDirection[i] );
@ -236,7 +236,7 @@ void BasicClouds::unpackUpdate( NetConnection *conn, BitStream *stream )
{ {
mLayerEnabled[i] = stream->readFlag(); mLayerEnabled[i] = stream->readFlag();
UNPACK_IMAGEASSET_ARRAY(conn, Texture, i); UNPACK_ASSET_ARRAY(conn, Texture, i);
stream->read( &mTexScale[i] ); stream->read( &mTexScale[i] );
mathRead( *stream, &mTexDirection[i] ); mathRead( *stream, &mTexDirection[i] );

View file

@ -113,7 +113,7 @@ CloudLayer::CloudLayer()
mHeight = 4.0f; mHeight = 4.0f;
INIT_IMAGEASSET(Texture); INIT_ASSET(Texture);
} }
IMPLEMENT_CO_NETOBJECT_V1( CloudLayer ); IMPLEMENT_CO_NETOBJECT_V1( CloudLayer );
@ -242,7 +242,7 @@ U32 CloudLayer::packUpdate( NetConnection *conn, U32 mask, BitStream *stream )
{ {
U32 retMask = Parent::packUpdate( conn, mask, stream ); U32 retMask = Parent::packUpdate( conn, mask, stream );
PACK_IMAGEASSET(conn, Texture); PACK_ASSET(conn, Texture);
for ( U32 i = 0; i < TEX_COUNT; i++ ) for ( U32 i = 0; i < TEX_COUNT; i++ )
{ {
@ -264,7 +264,7 @@ void CloudLayer::unpackUpdate( NetConnection *conn, BitStream *stream )
{ {
Parent::unpackUpdate( conn, stream ); Parent::unpackUpdate( conn, stream );
UNPACK_IMAGEASSET(conn, Texture); UNPACK_ASSET(conn, Texture);
if(mTextureAssetId != StringTable->EmptyString()) if(mTextureAssetId != StringTable->EmptyString())
mTextureAsset = mTextureAssetId; mTextureAsset = mTextureAssetId;

View file

@ -97,7 +97,7 @@ protected:
static U32 smTriangleCount; static U32 smTriangleCount;
DECLARE_IMAGEASSET(CloudLayer, Texture, onImageChanged, GFXStaticTextureSRGBProfile); DECLARE_IMAGEASSET(CloudLayer, Texture, onImageChanged, GFXStaticTextureSRGBProfile);
DECLARE_IMAGEASSET_NET_SETGET(CloudLayer, Texture, CloudLayerMask); DECLARE_ASSET_NET_SETGET(CloudLayer, Texture, CloudLayerMask);
GFXShaderRef mShader; GFXShaderRef mShader;

View file

@ -287,7 +287,7 @@ DecalRoad::DecalRoad()
mTypeMask |= StaticObjectType | StaticShapeObjectType; mTypeMask |= StaticObjectType | StaticShapeObjectType;
mNetFlags.set(Ghostable); mNetFlags.set(Ghostable);
INIT_MATERIALASSET(Material); INIT_ASSET(Material);
mMaterialInst = nullptr; mMaterialInst = nullptr;
} }
@ -491,7 +491,7 @@ U32 DecalRoad::packUpdate(NetConnection * con, U32 mask, BitStream * stream)
if ( stream->writeFlag( mask & DecalRoadMask ) ) if ( stream->writeFlag( mask & DecalRoadMask ) )
{ {
// Write Texture Name. // Write Texture Name.
PACK_MATERIALASSET(con, Material); PACK_ASSET(con, Material);
stream->write( mBreakAngle ); stream->write( mBreakAngle );
@ -580,7 +580,7 @@ void DecalRoad::unpackUpdate( NetConnection *con, BitStream *stream )
// DecalRoadMask // DecalRoadMask
if ( stream->readFlag() ) if ( stream->readFlag() )
{ {
UNPACK_MATERIALASSET(con, Material); UNPACK_ASSET(con, Material);
if (isProperlyAdded()) if (isProperlyAdded())
_initMaterial(); _initMaterial();

View file

@ -243,7 +243,7 @@ protected:
BaseMatInstance* mMaterialInst; BaseMatInstance* mMaterialInst;
DECLARE_MATERIALASSET(DecalRoad, Material); DECLARE_MATERIALASSET(DecalRoad, Material);
DECLARE_MATERIALASSET_NET_SETGET(DecalRoad, Material, DecalRoadMask); DECLARE_ASSET_NET_SETGET(DecalRoad, Material, DecalRoadMask);
U32 mRenderPriority; U32 mRenderPriority;

View file

@ -97,9 +97,9 @@ GuiMeshRoadEditorCtrl::GuiMeshRoadEditorCtrl()
mHoverNodeColor( 255,255,255,255 ), mHoverNodeColor( 255,255,255,255 ),
mHasCopied( false ) mHasCopied( false )
{ {
INIT_MATERIALASSET(TopMaterial); INIT_ASSET(TopMaterial);
INIT_MATERIALASSET(BottomMaterial); INIT_ASSET(BottomMaterial);
INIT_MATERIALASSET(SideMaterial); INIT_ASSET(SideMaterial);
mTopMaterialAssetId = Con::getVariable("$MeshRoadEditor::defaultTopMaterialAsset"); mTopMaterialAssetId = Con::getVariable("$MeshRoadEditor::defaultTopMaterialAsset");
mBottomMaterialAssetId = Con::getVariable("$MeshRoadEditor::defaultBottomMaterialAsset"); mBottomMaterialAssetId = Con::getVariable("$MeshRoadEditor::defaultBottomMaterialAsset");

View file

@ -160,13 +160,13 @@ class GuiMeshRoadEditorCtrl : public EditTSCtrl
public: public:
DECLARE_MATERIALASSET(GuiMeshRoadEditorCtrl, TopMaterial); DECLARE_MATERIALASSET(GuiMeshRoadEditorCtrl, TopMaterial);
DECLARE_MATERIALASSET_SETGET(GuiMeshRoadEditorCtrl, TopMaterial); DECLARE_ASSET_SETGET(GuiMeshRoadEditorCtrl, TopMaterial);
DECLARE_MATERIALASSET(GuiMeshRoadEditorCtrl, BottomMaterial); DECLARE_MATERIALASSET(GuiMeshRoadEditorCtrl, BottomMaterial);
DECLARE_MATERIALASSET_SETGET(GuiMeshRoadEditorCtrl, BottomMaterial); DECLARE_ASSET_SETGET(GuiMeshRoadEditorCtrl, BottomMaterial);
DECLARE_MATERIALASSET(GuiMeshRoadEditorCtrl, SideMaterial); DECLARE_MATERIALASSET(GuiMeshRoadEditorCtrl, SideMaterial);
DECLARE_MATERIALASSET_SETGET(GuiMeshRoadEditorCtrl, SideMaterial); DECLARE_ASSET_SETGET(GuiMeshRoadEditorCtrl, SideMaterial);
}; };
class GuiMeshRoadEditorUndoAction : public UndoAction class GuiMeshRoadEditorUndoAction : public UndoAction

View file

@ -104,7 +104,7 @@ class GuiRoadEditorCtrl : public EditTSCtrl
public: public:
DECLARE_MATERIALASSET(GuiRoadEditorCtrl, Material); DECLARE_MATERIALASSET(GuiRoadEditorCtrl, Material);
DECLARE_MATERIALASSET_SETGET(GuiRoadEditorCtrl, Material); DECLARE_ASSET_SETGET(GuiRoadEditorCtrl, Material);
protected: protected:

View file

@ -920,9 +920,9 @@ MeshRoad::MeshRoad()
mTriangleCount[i] = 0; mTriangleCount[i] = 0;
} }
INIT_MATERIALASSET(TopMaterial); INIT_ASSET(TopMaterial);
INIT_MATERIALASSET(BottomMaterial); INIT_ASSET(BottomMaterial);
INIT_MATERIALASSET(SideMaterial); INIT_ASSET(SideMaterial);
mSideProfile.mRoad = this; mSideProfile.mRoad = this;
} }
@ -1416,9 +1416,9 @@ U32 MeshRoad::packUpdate(NetConnection * con, U32 mask, BitStream * stream)
stream->writeAffineTransform( mObjToWorld ); stream->writeAffineTransform( mObjToWorld );
// Write Materials // Write Materials
PACK_MATERIALASSET(con, TopMaterial); PACK_ASSET(con, TopMaterial);
PACK_MATERIALASSET(con, BottomMaterial); PACK_ASSET(con, BottomMaterial);
PACK_MATERIALASSET(con, SideMaterial); PACK_ASSET(con, SideMaterial);
stream->write( mTextureLength ); stream->write( mTextureLength );
stream->write( mBreakAngle ); stream->write( mBreakAngle );
@ -1515,9 +1515,9 @@ void MeshRoad::unpackUpdate(NetConnection * con, BitStream * stream)
stream->readAffineTransform(&ObjectMatrix); stream->readAffineTransform(&ObjectMatrix);
Parent::setTransform(ObjectMatrix); Parent::setTransform(ObjectMatrix);
UNPACK_MATERIALASSET(con, TopMaterial); UNPACK_ASSET(con, TopMaterial);
UNPACK_MATERIALASSET(con, BottomMaterial); UNPACK_ASSET(con, BottomMaterial);
UNPACK_MATERIALASSET(con, SideMaterial); UNPACK_ASSET(con, SideMaterial);
if ( isProperlyAdded() ) if ( isProperlyAdded() )
_initMaterial(); _initMaterial();

View file

@ -622,13 +622,13 @@ protected:
GFXPrimitiveBufferHandle mPB[SurfaceCount]; GFXPrimitiveBufferHandle mPB[SurfaceCount];
DECLARE_MATERIALASSET(MeshRoad, TopMaterial); DECLARE_MATERIALASSET(MeshRoad, TopMaterial);
DECLARE_MATERIALASSET_NET_SETGET(MeshRoad, TopMaterial, MeshRoadMask); DECLARE_ASSET_NET_SETGET(MeshRoad, TopMaterial, MeshRoadMask);
DECLARE_MATERIALASSET(MeshRoad, BottomMaterial); DECLARE_MATERIALASSET(MeshRoad, BottomMaterial);
DECLARE_MATERIALASSET_NET_SETGET(MeshRoad, BottomMaterial, MeshRoadMask); DECLARE_ASSET_NET_SETGET(MeshRoad, BottomMaterial, MeshRoadMask);
DECLARE_MATERIALASSET(MeshRoad, SideMaterial); DECLARE_MATERIALASSET(MeshRoad, SideMaterial);
DECLARE_MATERIALASSET_NET_SETGET(MeshRoad, SideMaterial, MeshRoadMask); DECLARE_ASSET_NET_SETGET(MeshRoad, SideMaterial, MeshRoadMask);
//String mMaterialName[SurfaceCount]; //String mMaterialName[SurfaceCount];
SimObjectPtr<Material> mMaterial[SurfaceCount]; SimObjectPtr<Material> mMaterial[SurfaceCount];

View file

@ -168,7 +168,7 @@ ScatterSky::ScatterSky()
mNightCubemapName = StringTable->EmptyString(); mNightCubemapName = StringTable->EmptyString();
mSunSize = 1.0f; mSunSize = 1.0f;
INIT_MATERIALASSET(MoonMat); INIT_ASSET(MoonMat);
mMoonMatInst = NULL; mMoonMatInst = NULL;
@ -503,7 +503,7 @@ U32 ScatterSky::packUpdate(NetConnection *con, U32 mask, BitStream *stream)
stream->writeFlag( mMoonEnabled ); stream->writeFlag( mMoonEnabled );
PACK_MATERIALASSET(con, MoonMat); PACK_ASSET(con, MoonMat);
stream->write( mMoonScale ); stream->write( mMoonScale );
stream->write( mMoonTint ); stream->write( mMoonTint );
@ -617,7 +617,7 @@ void ScatterSky::unpackUpdate(NetConnection *con, BitStream *stream)
mMoonEnabled = stream->readFlag(); mMoonEnabled = stream->readFlag();
UNPACK_MATERIALASSET(con, MoonMat); UNPACK_ASSET(con, MoonMat);
stream->read( &mMoonScale ); stream->read( &mMoonScale );
stream->read( &mMoonTint ); stream->read( &mMoonTint );

View file

@ -212,7 +212,7 @@ protected:
bool mMoonEnabled; bool mMoonEnabled;
DECLARE_MATERIALASSET(ScatterSky, MoonMat); DECLARE_MATERIALASSET(ScatterSky, MoonMat);
DECLARE_MATERIALASSET_NET_SETGET(ScatterSky, MoonMat, UpdateMask); DECLARE_ASSET_NET_SETGET(ScatterSky, MoonMat, UpdateMask);
BaseMatInstance *mMoonMatInst; BaseMatInstance *mMoonMatInst;
F32 mMoonScale; F32 mMoonScale;

View file

@ -56,7 +56,7 @@ SkyBox::SkyBox()
mTypeMask |= EnvironmentObjectType | StaticObjectType; mTypeMask |= EnvironmentObjectType | StaticObjectType;
mNetFlags.set(Ghostable | ScopeAlways); mNetFlags.set(Ghostable | ScopeAlways);
INIT_MATERIALASSET(Material); INIT_ASSET(Material);
mMatInstance = NULL; mMatInstance = NULL;
mIsVBDirty = false; mIsVBDirty = false;
@ -139,7 +139,7 @@ U32 SkyBox::packUpdate( NetConnection *conn, U32 mask, BitStream *stream )
{ {
U32 retMask = Parent::packUpdate( conn, mask, stream ); U32 retMask = Parent::packUpdate( conn, mask, stream );
PACK_MATERIALASSET(conn, Material); PACK_ASSET(conn, Material);
stream->writeFlag( mDrawBottom ); stream->writeFlag( mDrawBottom );
stream->write( mFogBandHeight ); stream->write( mFogBandHeight );
@ -152,7 +152,7 @@ void SkyBox::unpackUpdate( NetConnection *conn, BitStream *stream )
Parent::unpackUpdate( conn, stream ); Parent::unpackUpdate( conn, stream );
StringTableEntry oldMatName = getMaterial(); StringTableEntry oldMatName = getMaterial();
UNPACK_MATERIALASSET(conn, Material); UNPACK_ASSET(conn, Material);
if (oldMatName != getMaterial()) if (oldMatName != getMaterial())
{ {
_updateMaterial(); _updateMaterial();

View file

@ -102,7 +102,7 @@ protected:
// Material // Material
DECLARE_MATERIALASSET(SkyBox, Material); DECLARE_MATERIALASSET(SkyBox, Material);
DECLARE_MATERIALASSET_NET_SETGET(SkyBox, Material, -1); DECLARE_ASSET_NET_SETGET(SkyBox, Material, -1);
BaseMatInstance *mMatInstance; BaseMatInstance *mMatInstance;
SkyMatParams mMatParamHandle; SkyMatParams mMatParamHandle;

View file

@ -90,7 +90,7 @@ Sun::Sun()
mCoronaUseLightColor = true; mCoronaUseLightColor = true;
mCoronaMatInst = NULL; mCoronaMatInst = NULL;
INIT_MATERIALASSET(CoronaMaterial); INIT_ASSET(CoronaMaterial);
mMatrixSet = reinterpret_cast<MatrixSet *>(dMalloc_aligned(sizeof(MatrixSet), 16)); mMatrixSet = reinterpret_cast<MatrixSet *>(dMalloc_aligned(sizeof(MatrixSet), 16));
constructInPlace(mMatrixSet); constructInPlace(mMatrixSet);
@ -240,7 +240,7 @@ U32 Sun::packUpdate(NetConnection *conn, U32 mask, BitStream *stream )
stream->writeFlag( mCoronaEnabled ); stream->writeFlag( mCoronaEnabled );
PACK_MATERIALASSET(conn, CoronaMaterial); PACK_ASSET(conn, CoronaMaterial);
stream->write( mCoronaScale ); stream->write( mCoronaScale );
stream->write( mCoronaTint ); stream->write( mCoronaTint );
@ -286,7 +286,7 @@ void Sun::unpackUpdate( NetConnection *conn, BitStream *stream )
mCoronaEnabled = stream->readFlag(); mCoronaEnabled = stream->readFlag();
UNPACK_MATERIALASSET(conn, CoronaMaterial); UNPACK_ASSET(conn, CoronaMaterial);
stream->read( &mCoronaScale ); stream->read( &mCoronaScale );
stream->read( &mCoronaTint ); stream->read( &mCoronaTint );

View file

@ -79,7 +79,7 @@ protected:
bool mCoronaEnabled; bool mCoronaEnabled;
DECLARE_MATERIALASSET(Sun, CoronaMaterial); DECLARE_MATERIALASSET(Sun, CoronaMaterial);
DECLARE_MATERIALASSET_NET_SETGET(Sun, CoronaMaterial, UpdateMask); DECLARE_ASSET_NET_SETGET(Sun, CoronaMaterial, UpdateMask);
BaseMatInstance *mCoronaMatInst; BaseMatInstance *mCoronaMatInst;
MatrixSet *mMatrixSet; MatrixSet *mMatrixSet;

View file

@ -260,9 +260,9 @@ WaterObject::WaterObject()
mMatrixSet = reinterpret_cast<MatrixSet *>(dMalloc_aligned(sizeof(MatrixSet), 16)); mMatrixSet = reinterpret_cast<MatrixSet *>(dMalloc_aligned(sizeof(MatrixSet), 16));
constructInPlace(mMatrixSet); constructInPlace(mMatrixSet);
INIT_IMAGEASSET(RippleTex); INIT_ASSET(RippleTex);
INIT_IMAGEASSET(FoamTex); INIT_ASSET(FoamTex);
INIT_IMAGEASSET(DepthGradientTex); INIT_ASSET(DepthGradientTex);
mCubemapName = StringTable->EmptyString(); mCubemapName = StringTable->EmptyString();
} }
@ -546,9 +546,9 @@ U32 WaterObject::packUpdate( NetConnection * conn, U32 mask, BitStream *stream )
if ( stream->writeFlag( mask & TextureMask ) ) if ( stream->writeFlag( mask & TextureMask ) )
{ {
PACK_IMAGEASSET(conn, RippleTex); PACK_ASSET(conn, RippleTex);
PACK_IMAGEASSET(conn, DepthGradientTex); PACK_ASSET(conn, DepthGradientTex);
PACK_IMAGEASSET(conn, FoamTex); PACK_ASSET(conn, FoamTex);
stream->writeString( mCubemapName ); stream->writeString( mCubemapName );
} }
@ -668,9 +668,9 @@ void WaterObject::unpackUpdate( NetConnection * conn, BitStream *stream )
// TextureMask // TextureMask
if ( stream->readFlag() ) if ( stream->readFlag() )
{ {
UNPACK_IMAGEASSET(conn, RippleTex); UNPACK_ASSET(conn, RippleTex);
UNPACK_IMAGEASSET(conn, DepthGradientTex); UNPACK_ASSET(conn, DepthGradientTex);
UNPACK_IMAGEASSET(conn, FoamTex); UNPACK_ASSET(conn, FoamTex);
mCubemapName = stream->readSTString(); mCubemapName = stream->readSTString();

View file

@ -273,11 +273,11 @@ protected:
// Other textures // Other textures
DECLARE_IMAGEASSET(WaterObject, RippleTex, onRippleTexChanged, GFXStaticTextureProfile); DECLARE_IMAGEASSET(WaterObject, RippleTex, onRippleTexChanged, GFXStaticTextureProfile);
DECLARE_IMAGEASSET_NET_SETGET(WaterObject, RippleTex, TextureMask); DECLARE_ASSET_NET_SETGET(WaterObject, RippleTex, TextureMask);
DECLARE_IMAGEASSET(WaterObject, FoamTex, onFoamTexChanged, GFXStaticTextureSRGBProfile); DECLARE_IMAGEASSET(WaterObject, FoamTex, onFoamTexChanged, GFXStaticTextureSRGBProfile);
DECLARE_IMAGEASSET_NET_SETGET(WaterObject, FoamTex, TextureMask); DECLARE_ASSET_NET_SETGET(WaterObject, FoamTex, TextureMask);
DECLARE_IMAGEASSET(WaterObject, DepthGradientTex, onDepthGradientTexChanged, GFXStaticTextureSRGBProfile); DECLARE_IMAGEASSET(WaterObject, DepthGradientTex, onDepthGradientTexChanged, GFXStaticTextureSRGBProfile);
DECLARE_IMAGEASSET_NET_SETGET(WaterObject, DepthGradientTex, TextureMask); DECLARE_ASSET_NET_SETGET(WaterObject, DepthGradientTex, TextureMask);
StringTableEntry mCubemapName; StringTableEntry mCubemapName;

View file

@ -53,7 +53,7 @@ ForestItemData::ForestItemData()
mTightnessCoefficient( 0.4f ), mTightnessCoefficient( 0.4f ),
mDampingCoefficient( 0.7f ) mDampingCoefficient( 0.7f )
{ {
INIT_SHAPEASSET(Shape); INIT_ASSET(Shape);
} }
void ForestItemData::initPersistFields() void ForestItemData::initPersistFields()
@ -164,7 +164,7 @@ void ForestItemData::packData(BitStream* stream)
stream->write( localName ); stream->write( localName );
PACKDATA_SHAPEASSET(Shape); PACKDATA_ASSET(Shape);
stream->writeFlag( mCollidable ); stream->writeFlag( mCollidable );
@ -192,7 +192,7 @@ void ForestItemData::unpackData(BitStream* stream)
char readBuffer[1024]; char readBuffer[1024];
UNPACKDATA_SHAPEASSET(Shape); UNPACKDATA_ASSET(Shape);
mCollidable = stream->readFlag(); mCollidable = stream->readFlag();

View file

@ -63,7 +63,7 @@ protected:
public: public:
DECLARE_SHAPEASSET(ForestItemData, Shape, onShapeChanged); DECLARE_SHAPEASSET(ForestItemData, Shape, onShapeChanged);
DECLARE_SHAPEASSET_SETGET(ForestItemData, Shape); DECLARE_ASSET_SETGET(ForestItemData, Shape);
/// This is the radius used during placement to ensure /// This is the radius used during placement to ensure
/// the element isn't crowded up against other trees. /// the element isn't crowded up against other trees.

View file

@ -44,10 +44,10 @@ CubemapData::CubemapData()
for (U32 i = 0; i < 6; i++) for (U32 i = 0; i < 6; i++)
{ {
INIT_IMAGEASSET_ARRAY(CubeMapFace, i); INIT_ASSET_ARRAY(CubeMapFace, i);
} }
INIT_IMAGEASSET(CubeMap); INIT_ASSET(CubeMap);
} }
CubemapData::~CubemapData() CubemapData::~CubemapData()

View file

@ -74,7 +74,7 @@ public:
protected: protected:
DECLARE_IMAGEASSET(CubemapData, CubeMap, onCubemapChanged, GFXStaticTextureSRGBProfile); DECLARE_IMAGEASSET(CubemapData, CubeMap, onCubemapChanged, GFXStaticTextureSRGBProfile);
DECLARE_IMAGEASSET_SETGET(CubemapData, CubeMap); DECLARE_ASSET_SETGET(CubemapData, CubeMap);
DECLARE_IMAGEASSET_ARRAY(CubemapData, CubeMapFace, GFXStaticTextureSRGBProfile, 6); DECLARE_IMAGEASSET_ARRAY(CubemapData, CubeMapFace, GFXStaticTextureSRGBProfile, 6);
DECLARE_IMAGEASSET_ARRAY_SETGET(CubemapData, CubeMapFace); DECLARE_IMAGEASSET_ARRAY_SETGET(CubemapData, CubeMapFace);

View file

@ -129,7 +129,7 @@ GuiBitmapButtonCtrl::GuiBitmapButtonCtrl()
setExtent( 140, 30 ); setExtent( 140, 30 );
mMasked = false; mMasked = false;
INIT_IMAGEASSET(Bitmap); INIT_ASSET(Bitmap);
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@ -668,4 +668,4 @@ bool GuiBitmapButtonCtrl::pointInControl(const Point2I& parentCoordPoint)
return Parent::pointInControl(parentCoordPoint); return Parent::pointInControl(parentCoordPoint);
} }
DEF_IMAGEASSET_BINDS(GuiBitmapButtonCtrl, Bitmap); DEF_ASSET_BINDS(GuiBitmapButtonCtrl, Bitmap);

View file

@ -119,7 +119,7 @@ class GuiBitmapButtonCtrl : public GuiButtonCtrl
BitmapMode mBitmapMode; BitmapMode mBitmapMode;
DECLARE_IMAGEASSET(GuiBitmapButtonCtrl, Bitmap, onBitmapChange, GFXDefaultGUIProfile); DECLARE_IMAGEASSET(GuiBitmapButtonCtrl, Bitmap, onBitmapChange, GFXDefaultGUIProfile);
DECLARE_IMAGEASSET_SETGET(GuiBitmapButtonCtrl, Bitmap); DECLARE_ASSET_SETGET(GuiBitmapButtonCtrl, Bitmap);
/// alpha masking /// alpha masking
bool mMasked; bool mMasked;

View file

@ -85,7 +85,7 @@ ConsoleDocClass( GuiIconButtonCtrl,
GuiIconButtonCtrl::GuiIconButtonCtrl() GuiIconButtonCtrl::GuiIconButtonCtrl()
{ {
INIT_IMAGEASSET(Bitmap); INIT_ASSET(Bitmap);
mTextLocation = TextLocLeft; mTextLocation = TextLocLeft;
mIconLocation = IconLocLeft; mIconLocation = IconLocLeft;
mTextMargin = 4; mTextMargin = 4;
@ -412,4 +412,4 @@ void GuiIconButtonCtrl::renderBitmapArray(RectI &bounds, S32 state)
} }
} }
DEF_IMAGEASSET_BINDS(GuiIconButtonCtrl, Bitmap); DEF_ASSET_BINDS(GuiIconButtonCtrl, Bitmap);

Some files were not shown because too many files have changed in this diff Show more