summaryrefslogtreecommitdiff
path: root/indra/llcharacter
diff options
context:
space:
mode:
authorCallum Prentice <callum@lindenlab.com>2021-03-02 14:49:34 -0800
committerCallum Prentice <callum@lindenlab.com>2021-03-02 14:49:34 -0800
commit3b02f547142b1907369284cb07f275228eeec77b (patch)
treeb2152323a43823a75ea6c5a980b36977d1827b9f /indra/llcharacter
parent2aea7cfc25d42e3d87db4fb759baa4419ec23dca (diff)
parent2b385841f3031d599bdb226f0f859e51b09870f8 (diff)
Merge branch 'master' into DRTVWR-531
Diffstat (limited to 'indra/llcharacter')
-rw-r--r--indra/llcharacter/CMakeLists.txt18
-rw-r--r--indra/llcharacter/llkeyframefallmotion.cpp5
-rw-r--r--indra/llcharacter/llkeyframemotion.cpp21
-rw-r--r--indra/llcharacter/llkeyframemotion.h12
4 files changed, 16 insertions, 40 deletions
diff --git a/indra/llcharacter/CMakeLists.txt b/indra/llcharacter/CMakeLists.txt
index a17a5b0aa6..d90ffb5543 100644
--- a/indra/llcharacter/CMakeLists.txt
+++ b/indra/llcharacter/CMakeLists.txt
@@ -6,14 +6,14 @@ include(00-Common)
include(LLCommon)
include(LLMath)
include(LLMessage)
-include(LLVFS)
+include(LLFileSystem)
include(LLXML)
include_directories(
${LLCOMMON_INCLUDE_DIRS}
${LLMATH_INCLUDE_DIRS}
${LLMESSAGE_INCLUDE_DIRS}
- ${LLVFS_INCLUDE_DIRS}
+ ${LLFILESYSTEM_INCLUDE_DIRS}
${LLXML_INCLUDE_DIRS}
)
include_directories(SYSTEM
@@ -85,18 +85,6 @@ target_link_libraries(
${LLCOMMON_LIBRARIES}
${LLMATH_LIBRARIES}
${LLMESSAGE_LIBRARIES}
- ${LLVFS_LIBRARIES}
+ ${LLFILESYSTEM_LIBRARIES}
${LLXML_LIBRARIES}
)
-
-
-# Add tests
-#if (LL_TESTS)
-# include(LLAddBuildTest)
-# # UNIT TESTS
-# SET(llcharacter_TEST_SOURCE_FILES
-# lljoint.cpp
-# )
-# LL_ADD_PROJECT_UNIT_TESTS(llcharacter "${llcharacter_TEST_SOURCE_FILES}")
-#endif (LL_TESTS)
-
diff --git a/indra/llcharacter/llkeyframefallmotion.cpp b/indra/llcharacter/llkeyframefallmotion.cpp
index 60ab2e9929..7842f0e5fb 100644
--- a/indra/llcharacter/llkeyframefallmotion.cpp
+++ b/indra/llcharacter/llkeyframefallmotion.cpp
@@ -70,6 +70,11 @@ LLMotion::LLMotionInitStatus LLKeyframeFallMotion::onInitialize(LLCharacter *cha
// load keyframe data, setup pose and joint states
LLMotion::LLMotionInitStatus result = LLKeyframeMotion::onInitialize(character);
+ if (result != LLMotion::STATUS_SUCCESS)
+ {
+ return result;
+ }
+
for (U32 jm=0; jm<mJointMotionList->getNumJointMotions(); jm++)
{
if (!mJointStates[jm]->getJoint())
diff --git a/indra/llcharacter/llkeyframemotion.cpp b/indra/llcharacter/llkeyframemotion.cpp
index cde38c8091..fe9de30f0a 100644
--- a/indra/llcharacter/llkeyframemotion.cpp
+++ b/indra/llcharacter/llkeyframemotion.cpp
@@ -39,14 +39,13 @@
#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;
//-----------------------------------------------------------------------------
@@ -515,7 +514,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 static vfs then asset request
+ // check keyframe cache first then file cache then asset request
break;
}
@@ -559,13 +558,8 @@ 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;
- LLVFile* anim_file = new LLVFile(sVFS, mID, LLAssetType::AT_ANIMATION);
+ LLFileSystem* anim_file = new LLFileSystem(mID, LLAssetType::AT_ANIMATION);
if (!anim_file || !anim_file->getSize())
{
delete anim_file;
@@ -2296,10 +2290,9 @@ void LLKeyframeMotion::setLoopOut(F32 out_point)
//-----------------------------------------------------------------------------
// onLoadComplete()
//-----------------------------------------------------------------------------
-void LLKeyframeMotion::onLoadComplete(LLVFS *vfs,
- const LLUUID& asset_uuid,
- LLAssetType::EType type,
- void* user_data, S32 status, LLExtStat ext_status)
+void LLKeyframeMotion::onLoadComplete(const LLUUID& asset_uuid,
+ LLAssetType::EType type,
+ void* user_data, S32 status, LLExtStat ext_status)
{
LLUUID* id = (LLUUID*)user_data;
@@ -2331,7 +2324,7 @@ void LLKeyframeMotion::onLoadComplete(LLVFS *vfs,
// asset already loaded
return;
}
- LLVFile file(vfs, asset_uuid, type, LLVFile::READ);
+ LLFileSystem file(asset_uuid, type, LLFileSystem::READ);
S32 size = file.getSize();
U8* buffer = new U8[size];
diff --git a/indra/llcharacter/llkeyframemotion.h b/indra/llcharacter/llkeyframemotion.h
index 15c5c7c6c0..d640556090 100644
--- a/indra/llcharacter/llkeyframemotion.h
+++ b/indra/llcharacter/llkeyframemotion.h
@@ -44,7 +44,6 @@
#include "llbvhconsts.h"
class LLKeyframeDataCache;
-class LLVFS;
class LLDataPacker;
#define MIN_REQUIRED_PIXEL_AREA_KEYFRAME (40.f)
@@ -141,10 +140,7 @@ public:
virtual void setStopTime(F32 time);
- static void setVFS(LLVFS* vfs) { sVFS = vfs; }
-
- static void onLoadComplete(LLVFS *vfs,
- const LLUUID& asset_uuid,
+ static void onLoadComplete(const LLUUID& asset_uuid,
LLAssetType::EType type,
void* user_data, S32 status, LLExtStat ext_status);
@@ -416,13 +412,7 @@ public:
U32 getNumJointMotions() const { return mJointMotionArray.size(); }
};
-
protected:
- static LLVFS* sVFS;
-
- //-------------------------------------------------------------------------
- // Member Data
- //-------------------------------------------------------------------------
JointMotionList* mJointMotionList;
std::vector<LLPointer<LLJointState> > mJointStates;
LLJoint* mPelvisp;