Converts all game, gui editor, and system classes to utilize assets

Processed core, tools and default modules to utilize assets
Converted all console types that were string based, such as TypeImageFilename to utilize const char*/the string table, which avoids a lot of type swapping shenanigans and avoids string corruption
Removed unneeded MainEditor mockup module
Removed some unused/duplicate image assets from the tools
This commit is contained in:
Areloch 2021-07-19 01:07:08 -05:00
parent 83b0432283
commit 5525f8ecdd
1708 changed files with 19619 additions and 4596 deletions

View file

@ -66,6 +66,7 @@ protected:
bool mAssetInitialized;
AssetDefinition* mpAssetDefinition;
U32 mAcquireReferenceCount;
U32 mLoadedState;
public:
enum AssetErrCode
@ -87,7 +88,7 @@ public:
if (errCode > AssetErrCode::Extended) return "undefined error";
return mErrCodeStrings[errCode];
};
U32 getStatus() { return mLoadedState; };
AssetBase();
virtual ~AssetBase();
@ -124,6 +125,7 @@ public:
void refreshAsset(void);
S32 getAssetDependencyFieldCount(const char* pFieldName);
StringTableEntry getAssetDependencyField(const char* pFieldName, S32 index = 0);
void clearAssetDependencyFields(const char* pFieldName);
void addAssetDependencyField(const char* pFieldName, const char* pAssetId);
@ -167,5 +169,10 @@ private:
void setOwned(AssetManager* pAssetManager, AssetDefinition* pAssetDefinition);
};
//helper macro for stitching string and non string values togeather sans quotes
#define assetText(x,suff) std::string(std::string(#x) + std::string(#suff)).c_str()
#define macroText(x) std::string(std::string(#x)).c_str()
#define assetDoc(x,suff) std::string(std::string("@brief") + std::string(#x) + std::string(#suff)).c_str()
#endif // _ASSET_BASE_H_