mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-12 07:04:36 +00:00
-SoundAsset added init for enum types.
-Vehicles updated to use enum initpersistfield.
This commit is contained in:
parent
76addc52eb
commit
6bec47d3fa
5 changed files with 62 additions and 8 deletions
|
|
@ -371,6 +371,16 @@ DefineEngineMethod(className, set##name, bool, (const char* shape), , assetText
|
|||
|
||||
#pragma endregion
|
||||
|
||||
#define assetEnumNameConcat(x,suff,ForT)(new std::string(std::string(#x) + suff + std::string(#ForT)))->c_str()
|
||||
|
||||
#define INITPERSISTFIELD_SOUNDASSET_ENUMED(name, enumType, maxValue, consoleClass, docs) \
|
||||
for (U32 i = 0; i <= maxValue; i++)\
|
||||
{\
|
||||
const char* enumString = castConsoleTypeToString(static_cast<enumType>(i));\
|
||||
addProtectedField(assetEnumNameConcat(name,enumString, File), TypeSoundFilename, Offset(m##name##Name[i], consoleClass), _set##name##Data, & defaultProtectedGetFn, assetText(name, docs), AbstractClassRep::FIELD_HideInInspectors); \
|
||||
addProtectedField(assetEnumNameConcat(name,enumString, Asset), TypeSoundAssetId, Offset(m##name##AssetId[i], consoleClass), _set##name##Data, & defaultProtectedGetFn, assetText(name, asset reference.));\
|
||||
}\
|
||||
|
||||
#pragma region Arrayed Asset Macros
|
||||
|
||||
#define DECLARE_SOUNDASSET_ARRAY(className,name,max) public: \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue