mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-29 08:15:44 +00:00
Expands/Cleans up a lot of the asset functionality, including management, file association, and creation/importing
This commit is contained in:
parent
ba2e9f1547
commit
ddfc416418
73 changed files with 4468 additions and 1876 deletions
|
|
@ -44,6 +44,7 @@ class LevelAsset : public AssetBase
|
|||
{
|
||||
typedef AssetBase Parent;
|
||||
|
||||
StringTableEntry mLevelName;
|
||||
StringTableEntry mLevelFile;
|
||||
StringTableEntry mPreviewImage;
|
||||
|
||||
|
|
@ -61,8 +62,20 @@ public:
|
|||
/// Declare Console Object.
|
||||
DECLARE_CONOBJECT(LevelAsset);
|
||||
|
||||
void setLevelFile(const char* pImageFile);
|
||||
inline StringTableEntry getLevelFile(void) const { return mLevelFile; };
|
||||
void setImageFile(const char* pImageFile);
|
||||
inline StringTableEntry getImageFile(void) const { return mPreviewImage; };
|
||||
|
||||
SimObjectId load();
|
||||
|
||||
protected:
|
||||
virtual void initializeAsset(void) {}
|
||||
static bool setLevelFile(void *obj, const char *index, const char *data) { static_cast<LevelAsset*>(obj)->setLevelFile(data); return false; }
|
||||
static const char* getLevelFile(void* obj, const char* data) { return static_cast<LevelAsset*>(obj)->getLevelFile(); }
|
||||
static bool setPreviewImageFile(void *obj, const char *index, const char *data) { static_cast<LevelAsset*>(obj)->setImageFile(data); return false; }
|
||||
static const char* getPreviewImageFile(void* obj, const char* data) { return static_cast<LevelAsset*>(obj)->getImageFile(); }
|
||||
|
||||
virtual void initializeAsset(void);
|
||||
virtual void onAssetRefresh(void) {}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue