summaryrefslogtreecommitdiff
path: root/indra/llcharacter
diff options
context:
space:
mode:
authorDave Houlton <euclid@lindenlab.com>2021-12-15 14:37:18 -0700
committerDave Houlton <euclid@lindenlab.com>2021-12-15 14:37:18 -0700
commitcf35d27dfb86a8a8d8223bc344f35984efaa7b98 (patch)
tree883758ee1282e0936343ec27d80d25329aae9242 /indra/llcharacter
parent199775b7ac214cfc3492c343c3f6046effcde7ed (diff)
parent0a873cd95547f003878c6d00d0883ff792f4a865 (diff)
DRTVWR-546 merge up to 6.5.2
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 ac53bcd768..9a41ba4d3d 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 429c479d0d..5a5aa2c83e 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;
@@ -2297,10 +2291,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;
@@ -2332,7 +2325,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;