diff options
author | Callum Prentice <callum@lindenlab.com> | 2021-03-09 14:26:24 -0800 |
---|---|---|
committer | Callum Prentice <callum@lindenlab.com> | 2021-03-09 14:26:24 -0800 |
commit | 519cbcecdf78e4dfc3adc465ae8cebed5df71647 (patch) | |
tree | efa8e20856dbfc80e1ae44283cbd0139b828b1b2 /indra/llcharacter/llkeyframemotion.cpp | |
parent | ada8ad1bc21665631f030c3194a567ea6f6a2a72 (diff) | |
parent | 88d837c16e768c5262073a7df965066d4bd8842c (diff) |
Merge with master before reseting to revert (revert) and get back to D519 status
Diffstat (limited to 'indra/llcharacter/llkeyframemotion.cpp')
-rw-r--r-- | indra/llcharacter/llkeyframemotion.cpp | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/indra/llcharacter/llkeyframemotion.cpp b/indra/llcharacter/llkeyframemotion.cpp index fe9de30f0a..cde38c8091 100644 --- a/indra/llcharacter/llkeyframemotion.cpp +++ b/indra/llcharacter/llkeyframemotion.cpp @@ -39,13 +39,14 @@ #include "llendianswizzle.h" #include "llkeyframemotion.h" #include "llquantize.h" +#include "llvfile.h" #include "m3math.h" #include "message.h" -#include "llfilesystem.h" //----------------------------------------------------------------------------- // Static Definitions //----------------------------------------------------------------------------- +LLVFS* LLKeyframeMotion::sVFS = NULL; LLKeyframeDataCache::keyframe_data_map_t LLKeyframeDataCache::sKeyframeDataMap; //----------------------------------------------------------------------------- @@ -514,7 +515,7 @@ LLMotion::LLMotionInitStatus LLKeyframeMotion::onInitialize(LLCharacter *charact return STATUS_SUCCESS; default: // we don't know what state the asset is in yet, so keep going - // check keyframe cache first then file cache then asset request + // check keyframe cache first then static vfs then asset request break; } @@ -558,8 +559,13 @@ LLMotion::LLMotionInitStatus LLKeyframeMotion::onInitialize(LLCharacter *charact U8 *anim_data; S32 anim_file_size; + if (!sVFS) + { + LL_ERRS() << "Must call LLKeyframeMotion::setVFS() first before loading a keyframe file!" << LL_ENDL; + } + BOOL success = FALSE; - LLFileSystem* anim_file = new LLFileSystem(mID, LLAssetType::AT_ANIMATION); + LLVFile* anim_file = new LLVFile(sVFS, mID, LLAssetType::AT_ANIMATION); if (!anim_file || !anim_file->getSize()) { delete anim_file; @@ -2290,9 +2296,10 @@ void LLKeyframeMotion::setLoopOut(F32 out_point) //----------------------------------------------------------------------------- // onLoadComplete() //----------------------------------------------------------------------------- -void LLKeyframeMotion::onLoadComplete(const LLUUID& asset_uuid, - LLAssetType::EType type, - void* user_data, S32 status, LLExtStat ext_status) +void LLKeyframeMotion::onLoadComplete(LLVFS *vfs, + const LLUUID& asset_uuid, + LLAssetType::EType type, + void* user_data, S32 status, LLExtStat ext_status) { LLUUID* id = (LLUUID*)user_data; @@ -2324,7 +2331,7 @@ void LLKeyframeMotion::onLoadComplete(const LLUUID& asset_uuid, // asset already loaded return; } - LLFileSystem file(asset_uuid, type, LLFileSystem::READ); + LLVFile file(vfs, asset_uuid, type, LLVFile::READ); S32 size = file.getSize(); U8* buffer = new U8[size]; |