diff options
Diffstat (limited to 'indra/llappearance')
-rw-r--r-- | indra/llappearance/CMakeLists.txt | 25 | ||||
-rw-r--r-- | indra/llappearance/llavatarappearance.cpp | 8 | ||||
-rw-r--r-- | indra/llappearance/llavatarappearance.h | 3 | ||||
-rw-r--r-- | indra/llappearance/llwearabletype.cpp | 16 | ||||
-rw-r--r-- | indra/llappearance/llwearabletype.h | 10 |
5 files changed, 46 insertions, 16 deletions
diff --git a/indra/llappearance/CMakeLists.txt b/indra/llappearance/CMakeLists.txt index adce620372..c570f0c93b 100644 --- a/indra/llappearance/CMakeLists.txt +++ b/indra/llappearance/CMakeLists.txt @@ -4,37 +4,24 @@ project(llappearance) include(00-Common) include(LLCommon) -include(LLAudio) include(LLCharacter) -include(LLCommon) include(LLImage) -include(LLImageJ2COJ) include(LLInventory) include(LLMath) include(LLMessage) -include(LLPhysicsExtensions) -include(LLPlugin) -include(LLPrimitive) include(LLRender) -include(LLUI) include(LLVFS) include(LLWindow) include(LLXML) include(Linking) -include(LLKDU) -include(ViewerMiscLibs) -include(LLLogin) include_directories( ${LLCOMMON_INCLUDE_DIRS} ${LLCHARACTER_INCLUDE_DIRS} - ${LLPHYSICS_INCLUDE_DIRS} ${LLIMAGE_INCLUDE_DIRS} - ${LLKDU_INCLUDE_DIRS} ${LLINVENTORY_INCLUDE_DIRS} ${LLMATH_INCLUDE_DIRS} ${LLRENDER_INCLUDE_DIRS} - ${LLUI_INCLUDE_DIRS} ${LLVFS_INCLUDE_DIRS} ${LLWINDOW_INCLUDE_DIRS} ${LLXML_INCLUDE_DIRS} @@ -90,6 +77,18 @@ list(APPEND llappearance_SOURCE_FILES ${llappearance_HEADER_FILES}) add_library (llappearance ${llappearance_SOURCE_FILES}) +target_link_libraries(llappearance + ${LLCHARACTER_LIBRARIES} + ${LLINVENTORY_LIBRARIES} + ${LLIMAGE_LIBRARIES} + ${LLRENDER_LIBRARIES} + ${LLVFS_LIBRARIES} + ${LLMATH_LIBRARIES} + ${LLXML_LIBRARIES} + ${LLMATH_LIBRARIES} + ${LLCOMMON_LIBRARIES} + ) + #add unit tests #if (LL_TESTS) # INCLUDE(LLAddBuildTest) diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp index 19c656044c..824f0a1e32 100644 --- a/indra/llappearance/llavatarappearance.cpp +++ b/indra/llappearance/llavatarappearance.cpp @@ -419,6 +419,14 @@ void LLAvatarAppearance::initClass() } } +void LLAvatarAppearance::cleanupClass() +{ + deleteAndClear(sAvatarXmlInfo); + // *TODO: What about sAvatarSkeletonInfo ??? + sSkeletonXMLTree.cleanup(); + sXMLTree.cleanup(); +} + using namespace LLAvatarAppearanceDefines; //------------------------------------------------------------------------ diff --git a/indra/llappearance/llavatarappearance.h b/indra/llappearance/llavatarappearance.h index 06607ef899..5726ff62d1 100644 --- a/indra/llappearance/llavatarappearance.h +++ b/indra/llappearance/llavatarappearance.h @@ -65,7 +65,8 @@ public: LLAvatarAppearance(LLWearableData* wearable_data); virtual ~LLAvatarAppearance(); - static void initClass(); // initializes static members + static void initClass(); // initializes static members + static void cleanupClass(); // Cleanup data that's only init'd once per class. virtual void initInstance(); // Called after construction to initialize the instance. virtual BOOL loadSkeletonNode(); BOOL loadMeshNodes(); diff --git a/indra/llappearance/llwearabletype.cpp b/indra/llappearance/llwearabletype.cpp index aa0afe348a..618e2a1941 100644 --- a/indra/llappearance/llwearabletype.cpp +++ b/indra/llappearance/llwearabletype.cpp @@ -27,7 +27,19 @@ #include "linden_common.h" #include "llwearabletype.h" #include "llinventorytype.h" -#include "lltrans.h" + +static LLTranslationBridge* sTrans = NULL; + +// static +void LLWearableType::initClass(LLTranslationBridge* trans) +{ + sTrans = trans; +} + +void LLWearableType::cleanupClass() +{ + delete sTrans; +} struct WearableEntry : public LLDictionaryEntry { @@ -40,7 +52,7 @@ struct WearableEntry : public LLDictionaryEntry LLDictionaryEntry(name), mAssetType(assetType), mDefaultNewName(default_new_name), - mLabel(LLTrans::getString(name)), + mLabel(sTrans->getString(name)), mIconName(iconName), mDisableCameraSwitch(disable_camera_switch), mAllowMultiwear(allow_multiwear) diff --git a/indra/llappearance/llwearabletype.h b/indra/llappearance/llwearabletype.h index 78008c27ea..e51e6731d3 100644 --- a/indra/llappearance/llwearabletype.h +++ b/indra/llappearance/llwearabletype.h @@ -32,6 +32,13 @@ #include "llinventorytype.h" #include "llsingleton.h" +class LLTranslationBridge +{ +public: + virtual std::string getString(const std::string &xml_desc) = 0; +}; + + class LLWearableType { public: @@ -59,6 +66,9 @@ public: WT_NONE = -1, }; + static void initClass(LLTranslationBridge* trans); // initializes static members + static void cleanupClass(); // initializes static members + static const std::string& getTypeName(EType type); static const std::string& getTypeDefaultNewName(EType type); static const std::string& getTypeLabel(EType type); |