From ad4212f74d4bb4493ab744b0148c37149ad95f0d Mon Sep 17 00:00:00 2001 From: gwigz Date: Mon, 21 Oct 2024 18:59:05 +0100 Subject: Firestorm's resync animations menu option --- indra/newview/llviewermenu.cpp | 30 ++++++++++++++++++++++ indra/newview/skins/default/xui/en/menu_viewer.xml | 8 ++++++ 2 files changed, 38 insertions(+) (limited to 'indra') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 418c24a25e..135384ab52 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -6786,6 +6786,35 @@ class LLAvatarToggleSearch : public view_listener_t } }; +// Resync Animations +class FSToolsResyncAnimations : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + for (S32 i = 0; i < gObjectList.getNumObjects(); i++) + { + LLViewerObject* object = gObjectList.getObject(i); + if (object && + object->isAvatar()) + { + LLVOAvatar* avatarp = (LLVOAvatar*)object; + if (avatarp) + { + for (LLVOAvatar::AnimIterator anim_it = avatarp->mPlayingAnimations.begin(); + anim_it != avatarp->mPlayingAnimations.end(); + anim_it++) + { + avatarp->stopMotion(anim_it->first, true); + avatarp->startMotion(anim_it->first); + } + } + } + } + return true; + } +}; +// Resync Animations + class LLAvatarResetSkeleton: public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -10197,6 +10226,7 @@ void initialize_menus() view_listener_t::addMenu(new LLAvatarToggleMyProfile(), "Avatar.ToggleMyProfile"); view_listener_t::addMenu(new LLAvatarTogglePicks(), "Avatar.TogglePicks"); view_listener_t::addMenu(new LLAvatarToggleSearch(), "Avatar.ToggleSearch"); + view_listener_t::addMenu(new FSToolsResyncAnimations(), "Tools.ResyncAnimations"); // Resync Animations view_listener_t::addMenu(new LLAvatarResetSkeleton(), "Avatar.ResetSkeleton"); view_listener_t::addMenu(new LLAvatarEnableResetSkeleton(), "Avatar.EnableResetSkeleton"); view_listener_t::addMenu(new LLAvatarResetSkeletonAndAnimations(), "Avatar.ResetSkeletonAndAnimations"); diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 5789b113c1..cd660d7f7a 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -646,6 +646,14 @@ label="World" name="World" tear_off="true"> + + + + -- cgit v1.2.3 From 9d38264521ef5aed9382e46c5b9ba82d0e681c79 Mon Sep 17 00:00:00 2001 From: gwigz Date: Mon, 21 Oct 2024 19:03:02 +0100 Subject: Toolbar command from Ansariel https://github.com/FirestormViewer/phoenix-firestorm/commit/bcc7406ccc22d5c8d73fe3200da3c6a36d903a10#diff-d16d50e343f4f0926f7ebac63ec9ad3ef3ebab8f575dfe520042d0ab00ef8836R2404 --- indra/newview/app_settings/commands.xml | 7 +++++++ indra/newview/skins/default/textures/textures.xml | 1 + .../default/textures/toolbar_icons/resync_animations.png | Bin 0 -> 3627 bytes indra/newview/skins/default/xui/en/strings.xml | 2 ++ 4 files changed, 10 insertions(+) create mode 100644 indra/newview/skins/default/textures/toolbar_icons/resync_animations.png (limited to 'indra') diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml index f2ab740646..635e5e40f5 100644 --- a/indra/newview/app_settings/commands.xml +++ b/indra/newview/app_settings/commands.xml @@ -303,4 +303,11 @@ execute_function="Inventory.OpenFavoriteFolder" is_running_function="Inventory.IsFavoriteFolderOpen" /> + diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 4763396d50..f824816183 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -163,6 +163,7 @@ with the same filename but different name + diff --git a/indra/newview/skins/default/textures/toolbar_icons/resync_animations.png b/indra/newview/skins/default/textures/toolbar_icons/resync_animations.png new file mode 100644 index 0000000000..dc9ee9c428 Binary files /dev/null and b/indra/newview/skins/default/textures/toolbar_icons/resync_animations.png differ diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 25779ca2c6..ad68bd8d81 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -4213,6 +4213,7 @@ name="Command_360_Capture_Label">360 snapshot Camera controls Voice settings Favorite folder + Resync animations Capture a 360 equirectangular image @@ -4247,6 +4248,7 @@ name="Command_360_Capture_Tooltip">Capture a 360 equirectangular image Changing camera angle Volume controls for calls and people near you in world Open your favorite inventory folder + Synchronizes avatar animations currently in your bottom toolbar currently in your left toolbar -- cgit v1.2.3 From 705230a26ed4c33af2d3af07c160386ded740079 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Tue, 22 Oct 2024 13:21:50 +0800 Subject: Revert "IME composition is now replaced by the result" This reverts commit 60592ae0d7a98e071e516fcac70c5bf1427f20be. --- indra/llui/llfocusmgr.cpp | 2 +- indra/llui/llfocusmgr.h | 2 +- indra/llui/lllineeditor.cpp | 12 ++++-------- indra/llui/lllineeditor.h | 4 ++-- indra/llui/lltexteditor.cpp | 10 +++------- indra/llui/lltexteditor.h | 4 ++-- indra/llui/llview.cpp | 8 ++++---- indra/llui/llview.h | 4 ++-- indra/llwindow/llwindowcallbacks.cpp | 2 +- indra/llwindow/llwindowcallbacks.h | 2 +- indra/newview/llviewerwindow.cpp | 4 ++-- indra/newview/llviewerwindow.h | 2 +- 12 files changed, 24 insertions(+), 32 deletions(-) (limited to 'indra') diff --git a/indra/llui/llfocusmgr.cpp b/indra/llui/llfocusmgr.cpp index 4f3d2328aa..9773a0a526 100644 --- a/indra/llui/llfocusmgr.cpp +++ b/indra/llui/llfocusmgr.cpp @@ -59,7 +59,7 @@ bool LLFocusableElement::handleUnicodeChar(llwchar uni_char, bool called_from_pa } // virtual -bool LLFocusableElement::handleUnicodeString(char *uni_str, bool editing, bool called_from_parent) +bool LLFocusableElement::handleUnicodeString(char *uni_str, bool called_from_parent) { return FALSE; } diff --git a/indra/llui/llfocusmgr.h b/indra/llui/llfocusmgr.h index 1ca6f50354..9cd442e8fc 100644 --- a/indra/llui/llfocusmgr.h +++ b/indra/llui/llfocusmgr.h @@ -59,7 +59,7 @@ public: virtual bool handleKey(KEY key, MASK mask, bool called_from_parent); virtual bool handleKeyUp(KEY key, MASK mask, bool called_from_parent); virtual bool handleUnicodeChar(llwchar uni_char, bool called_from_parent); - virtual bool handleUnicodeString(char *uni_str, bool editing, bool called_from_parent); + virtual bool handleUnicodeString(char *uni_str, bool called_from_parent); /** * If true this LLFocusableElement wants to receive KEYUP and KEYDOWN messages diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index ac7948f735..87b0c74916 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -1031,7 +1031,7 @@ void LLLineEditor::addChar(const llwchar uni_char) getWindow()->hideCursorUntilMouseMove(); } -void LLLineEditor::addString(char *s, bool editing) +void LLLineEditor::addString(char *s) { if (hasSelection()) deleteSelection(); @@ -1040,13 +1040,9 @@ void LLLineEditor::addString(char *s, bool editing) .substr(getCursor(), 1))) return; mText.erase(getCursor(), 1); - } else if (editing) { - mText.clear(); - setCursor(0); } mText.insert(getCursor(), utf8str_to_wstring(s)); - if (editing) setCursor(strlen(s)); - else setCursor(getCursor() + 1); + setCursor(getCursor() + 1); getWindow()->hideCursorUntilMouseMove(); } @@ -1704,7 +1700,7 @@ bool LLLineEditor::handleUnicodeCharHere(llwchar uni_char) return handled; } -bool LLLineEditor::handleUnicodeStringHere(char *uni_str, bool editing) +bool LLLineEditor::handleUnicodeStringHere(char *uni_str) { auto handled = FALSE; @@ -1713,7 +1709,7 @@ bool LLLineEditor::handleUnicodeStringHere(char *uni_str, bool editing) handled = TRUE; LLLineEditorRollback rollback(this); - addString(uni_str, editing); + addString(uni_str); mKeystrokeTimer.reset(); deselect(); diff --git a/indra/llui/lllineeditor.h b/indra/llui/lllineeditor.h index 3a39a7363d..5291f31d09 100644 --- a/indra/llui/lllineeditor.h +++ b/indra/llui/lllineeditor.h @@ -133,7 +133,7 @@ public: /*virtual*/ bool handleRightMouseDown(S32 x, S32 y, MASK mask) override; /*virtual*/ bool handleKeyHere(KEY key, MASK mask) override; /*virtual*/ bool handleUnicodeCharHere(llwchar uni_char) override; - /*virtual*/ bool handleUnicodeStringHere(char *uni_str, bool editing) override; + /*virtual*/ bool handleUnicodeStringHere(char *uni_str) override; /*virtual*/ void onMouseCaptureLost() override; // LLEditMenuHandler overrides @@ -301,7 +301,7 @@ public: void removeChar(); void addChar(const llwchar c); - void addString(char *s, bool editing); + void addString(char *s); void setCursorAtLocalPos(S32 local_mouse_x); S32 findPixelNearestPos(S32 cursor_offset = 0) const; S32 calcCursorPos(S32 mouse_x); diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index cbbb164cb2..6620b684f4 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -1257,7 +1257,7 @@ void LLTextEditor::addChar(llwchar wc) } } -void LLTextEditor::addString(char *str, bool editing) +void LLTextEditor::addString(char *str) { if (!getEnabled()) return; @@ -1265,10 +1265,6 @@ void LLTextEditor::addString(char *str, bool editing) deleteSelection(TRUE); else if (LL_KIM_OVERWRITE == gKeyboard->getInsertMode()) removeChar(mCursorPos); - else if (editing) { - clear(); - setCursorPos(0); - } setCursorPos(mCursorPos + addString(mCursorPos, str)); @@ -2060,12 +2056,12 @@ bool LLTextEditor::handleUnicodeCharHere(llwchar uni_char) return handled; } -bool LLTextEditor::handleUnicodeStringHere(char *uni_str, bool editing) +bool LLTextEditor::handleUnicodeStringHere(char *uni_str) { auto handled = FALSE; if (!mReadOnly) { - addString(uni_str, editing); + addString(uni_str); getWindow()->hideCursorUntilMouseMove(); handled = TRUE; } diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h index 47dcadf090..24da5c04e5 100644 --- a/indra/llui/lltexteditor.h +++ b/indra/llui/lltexteditor.h @@ -105,7 +105,7 @@ public: virtual bool handleKeyHere(KEY key, MASK mask ); virtual bool handleUnicodeCharHere(llwchar uni_char); - virtual bool handleUnicodeStringHere(char *uni_str, bool editing); + virtual bool handleUnicodeStringHere(char *uni_str); virtual void onMouseCaptureLost(); @@ -250,7 +250,7 @@ protected: // Undoable operations void addChar(llwchar c); // at mCursorPos S32 addChar(S32 pos, llwchar wc); - void addString(char *s, bool editing); + void addString(char *s); S32 addString(S32 pos, char *str); void addLineBreakChar(bool group_together = false); S32 overwriteChar(S32 pos, llwchar wc); diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index f2a1e16aad..cead5b5956 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -1080,18 +1080,18 @@ bool LLView::handleUnicodeChar(llwchar uni_char, bool called_from_parent) return handled; } -bool LLView::handleUnicodeString(char *uni_str, bool editing, bool called_from_parent) +bool LLView::handleUnicodeString(char *uni_str, bool called_from_parent) { auto handled = FALSE; if (getVisible() && getEnabled() && !handled) { - handled = handleUnicodeStringHere(uni_str, editing); + handled = handleUnicodeStringHere(uni_str); if (handled && LLView::sDebugKeys) LL_INFOS() << "Unicode key handled by " << getName() << LL_ENDL; } if (!handled && !called_from_parent && mParentView) - handled = mParentView->handleUnicodeString(uni_str, editing, FALSE); + handled = mParentView->handleUnicodeString(uni_str, FALSE); return handled; } @@ -1101,7 +1101,7 @@ bool LLView::handleUnicodeCharHere(llwchar uni_char ) return false; } -bool LLView::handleUnicodeStringHere(char *uni_str, bool editing) +bool LLView::handleUnicodeStringHere(char *uni_str) { return FALSE; } diff --git a/indra/llui/llview.h b/indra/llui/llview.h index 876bfafaa3..7f57a8d7db 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -385,7 +385,7 @@ public: /* virtual */ bool handleKey(KEY key, MASK mask, bool called_from_parent); /* virtual */ bool handleKeyUp(KEY key, MASK mask, bool called_from_parent); /* virtual */ bool handleUnicodeChar(llwchar uni_char, bool called_from_parent); - /* virtual */ bool handleUnicodeString(char *uni_str, bool editing, bool called_from_parent); + /* virtual */ bool handleUnicodeString(char *uni_str, bool called_from_parent); virtual bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, @@ -519,7 +519,7 @@ public: virtual bool handleKeyHere(KEY key, MASK mask); virtual bool handleKeyUpHere(KEY key, MASK mask); virtual bool handleUnicodeCharHere(llwchar uni_char); - virtual bool handleUnicodeStringHere(char *uni_str, bool editing); + virtual bool handleUnicodeStringHere(char *uni_str); virtual void handleReshape(const LLRect& rect, bool by_user); virtual void dirtyRect(); diff --git a/indra/llwindow/llwindowcallbacks.cpp b/indra/llwindow/llwindowcallbacks.cpp index 624ecd5030..ff46ae951e 100644 --- a/indra/llwindow/llwindowcallbacks.cpp +++ b/indra/llwindow/llwindowcallbacks.cpp @@ -52,7 +52,7 @@ bool LLWindowCallbacks::handleUnicodeChar(llwchar uni_char, MASK mask) return false; } -bool LLWindowCallbacks::handleUnicodeString(char *uni_str, bool editing) +bool LLWindowCallbacks::handleUnicodeString(char *uni_str) { return FALSE; } diff --git a/indra/llwindow/llwindowcallbacks.h b/indra/llwindow/llwindowcallbacks.h index 74660e1705..c7cb2b146c 100644 --- a/indra/llwindow/llwindowcallbacks.h +++ b/indra/llwindow/llwindowcallbacks.h @@ -37,7 +37,7 @@ public: virtual bool handleTranslatedKeyUp(KEY key, MASK mask); virtual void handleScanKey(KEY key, bool key_down, bool key_up, bool key_level); virtual bool handleUnicodeChar(llwchar uni_char, MASK mask); - virtual bool handleUnicodeString(char *uni_str, bool editing); + virtual bool handleUnicodeString(char *uni_str); virtual bool handleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask); virtual bool handleMouseUp(LLWindow *window, LLCoordGL pos, MASK mask); diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index c8ff744369..0e2e57a84a 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -3147,11 +3147,11 @@ bool LLViewerWindow::handleUnicodeChar(llwchar uni_char, MASK mask) return false; } -bool LLViewerWindow::handleUnicodeString(char *uni_str, bool editing) +bool LLViewerWindow::handleUnicodeString(char *uni_str) { auto keyboard_focus = gFocusMgr.getKeyboardFocus(); if (keyboard_focus) - keyboard_focus->handleUnicodeString(uni_str, editing, FALSE); + keyboard_focus->handleUnicodeString(uni_str, FALSE); return TRUE; } diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index acf9485eca..31bf5b5332 100644 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -194,7 +194,7 @@ public: /*virtual*/ bool handleTranslatedKeyUp(KEY key, MASK mask); /*virtual*/ void handleScanKey(KEY key, bool key_down, bool key_up, bool key_level); /*virtual*/ bool handleUnicodeChar(llwchar uni_char, MASK mask); // NOT going to handle extended - /*virtual*/ bool handleUnicodeString(char *uni_str, bool editing); + /*virtual*/ bool handleUnicodeString(char *uni_str); /*virtual*/ bool handleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask); /*virtual*/ bool handleMouseUp(LLWindow *window, LLCoordGL pos, MASK mask); /*virtual*/ bool handleCloseRequest(LLWindow *window); -- cgit v1.2.3 From 35ee215d68c891bcbf3fd64709f000c0a8e7f597 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Tue, 22 Oct 2024 13:42:22 +0800 Subject: Revert "First attempt to fix unicode input" This reverts commit aaa8cb5a37a720ff67792d0a31fec793b03b3742. --- indra/llui/llfocusmgr.cpp | 6 --- indra/llui/llfocusmgr.h | 1 - indra/llui/lllineeditor.cpp | 45 ---------------- indra/llui/lllineeditor.h | 2 - indra/llui/lltexteditor.cpp | 102 ----------------------------------- indra/llui/lltexteditor.h | 4 -- indra/llui/llview.cpp | 19 ------- indra/llui/llview.h | 2 - indra/llwindow/llwindowcallbacks.cpp | 4 -- indra/llwindow/llwindowcallbacks.h | 1 - indra/newview/llviewerwindow.cpp | 8 --- indra/newview/llviewerwindow.h | 1 - 12 files changed, 195 deletions(-) (limited to 'indra') diff --git a/indra/llui/llfocusmgr.cpp b/indra/llui/llfocusmgr.cpp index 9773a0a526..0d7c98294f 100644 --- a/indra/llui/llfocusmgr.cpp +++ b/indra/llui/llfocusmgr.cpp @@ -58,12 +58,6 @@ bool LLFocusableElement::handleUnicodeChar(llwchar uni_char, bool called_from_pa return false; } -// virtual -bool LLFocusableElement::handleUnicodeString(char *uni_str, bool called_from_parent) -{ - return FALSE; -} - // virtual bool LLFocusableElement::wantsKeyUpKeyDown() const { diff --git a/indra/llui/llfocusmgr.h b/indra/llui/llfocusmgr.h index 9cd442e8fc..1fa0ac137e 100644 --- a/indra/llui/llfocusmgr.h +++ b/indra/llui/llfocusmgr.h @@ -59,7 +59,6 @@ public: virtual bool handleKey(KEY key, MASK mask, bool called_from_parent); virtual bool handleKeyUp(KEY key, MASK mask, bool called_from_parent); virtual bool handleUnicodeChar(llwchar uni_char, bool called_from_parent); - virtual bool handleUnicodeString(char *uni_str, bool called_from_parent); /** * If true this LLFocusableElement wants to receive KEYUP and KEYDOWN messages diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index 87b0c74916..60b6115b34 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -1031,21 +1031,6 @@ void LLLineEditor::addChar(const llwchar uni_char) getWindow()->hideCursorUntilMouseMove(); } -void LLLineEditor::addString(char *s) -{ - if (hasSelection()) - deleteSelection(); - else if (LL_KIM_OVERWRITE == gKeyboard->getInsertMode()) { - if (!prevalidateInput(mText.getWString() - .substr(getCursor(), 1))) - return; - mText.erase(getCursor(), 1); - } - mText.insert(getCursor(), utf8str_to_wstring(s)); - setCursor(getCursor() + 1); - getWindow()->hideCursorUntilMouseMove(); -} - // Extends the selection box to the new cursor position void LLLineEditor::extendSelection( S32 new_cursor_pos ) { @@ -1700,36 +1685,6 @@ bool LLLineEditor::handleUnicodeCharHere(llwchar uni_char) return handled; } -bool LLLineEditor::handleUnicodeStringHere(char *uni_str) -{ - auto handled = FALSE; - - if ((gFocusMgr.getKeyboardFocus() == this) - && getVisible() && !mReadOnly) { - handled = TRUE; - LLLineEditorRollback rollback(this); - - addString(uni_str); - - mKeystrokeTimer.reset(); - deselect(); - auto need_to_rollback = mPrevalidator - && !mPrevalidator.validate(mText.getWString()); - - if (need_to_rollback) { - rollback.doRollback(this); - LLUI::getInstance()->reportBadKeystroke(); - mPrevalidator.showLastErrorUsingTimeout(); - } - - if (!need_to_rollback && handled) { - onKeystroke(); - mSpellCheckTimer.setTimerExpirySec(SPELLCHECK_DELAY); - } - } - - return handled; -} bool LLLineEditor::canDoDelete() const { diff --git a/indra/llui/lllineeditor.h b/indra/llui/lllineeditor.h index 5291f31d09..cdd22413e7 100644 --- a/indra/llui/lllineeditor.h +++ b/indra/llui/lllineeditor.h @@ -133,7 +133,6 @@ public: /*virtual*/ bool handleRightMouseDown(S32 x, S32 y, MASK mask) override; /*virtual*/ bool handleKeyHere(KEY key, MASK mask) override; /*virtual*/ bool handleUnicodeCharHere(llwchar uni_char) override; - /*virtual*/ bool handleUnicodeStringHere(char *uni_str) override; /*virtual*/ void onMouseCaptureLost() override; // LLEditMenuHandler overrides @@ -301,7 +300,6 @@ public: void removeChar(); void addChar(const llwchar c); - void addString(char *s); void setCursorAtLocalPos(S32 local_mouse_x); S32 findPixelNearestPos(S32 cursor_offset = 0) const; S32 calcCursorPos(S32 mouse_x); diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 6620b684f4..3537c764b9 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -166,50 +166,6 @@ private: }; -/////////////////////////////////////////////////////////////////// -class LLTextEditor::TextCmdAddString : public LLTextBase::TextCmd -{ -public: - TextCmdAddString(S32 pos, bool group_with_next, char *str, - LLTextSegmentPtr segment) : - TextCmd(pos, group_with_next, segment), - mWString(utf8str_to_wstring(str)), - mBlockExtensions(FALSE) - { - } - virtual void blockExtensions() - { - mBlockExtensions = TRUE; - } - virtual bool canExtend(S32 pos) const - { - if (!mSegments.empty()) return FALSE; - - return !mBlockExtensions - && (pos == getPosition() + (S32)mWString.length()); - } - virtual bool execute(LLTextBase* editor, S32* delta) - { - *delta = insert(editor, getPosition(), mWString); - LLWStringUtil::truncate(mWString, *delta); - return (*delta != 0); - } - virtual S32 undo(LLTextBase* editor) - { - remove(editor, getPosition(), mWString.length()); - return getPosition(); - } - virtual S32 redo(LLTextBase* editor) - { - insert(editor, getPosition(), mWString); - return getPosition() + mWString.length(); - } - -private: - LLWString mWString; - bool mBlockExtensions; -}; - /////////////////////////////////////////////////////////////////// class LLTextEditor::TextCmdOverwriteChar : public LLTextBase::TextCmd @@ -1208,18 +1164,6 @@ S32 LLTextEditor::addChar(S32 pos, llwchar wc) return execute(new TextCmdAddChar(pos, false, wc, LLTextSegmentPtr())); } -S32 LLTextEditor::addString(S32 pos, char *str) -{ - if ((wstring_utf8_length(getWText()) + strlen(str)) - > mMaxTextByteLength) { - make_ui_sound("UISndBadKeystroke"); - return 0; - } - - return execute(new TextCmdAddString(pos, FALSE, str, - LLTextSegmentPtr())); -} - void LLTextEditor::addChar(llwchar wc) { if (!getEnabled()) @@ -1257,34 +1201,6 @@ void LLTextEditor::addChar(llwchar wc) } } -void LLTextEditor::addString(char *str) -{ - if (!getEnabled()) - return; - if (hasSelection()) - deleteSelection(TRUE); - else if (LL_KIM_OVERWRITE == gKeyboard->getInsertMode()) - removeChar(mCursorPos); - - setCursorPos(mCursorPos + addString(mCursorPos, str)); - - if (!mReadOnly && mAutoreplaceCallback != NULL) { - S32 replacement_start; - S32 replacement_length; - LLWString replacement_string; - S32 new_cursor_pos = mCursorPos; - mAutoreplaceCallback(replacement_start, replacement_length, - replacement_string, new_cursor_pos, getWText()); - - if (replacement_length > 0 || !replacement_string.empty()) { - remove(replacement_start, replacement_length, true); - insert(replacement_start, replacement_string, false, - LLTextSegmentPtr()); - setCursorPos(new_cursor_pos); - } - } -} - void LLTextEditor::showEmojiHelper() { if (mReadOnly || !mShowEmojiHelper) @@ -2056,24 +1972,6 @@ bool LLTextEditor::handleUnicodeCharHere(llwchar uni_char) return handled; } -bool LLTextEditor::handleUnicodeStringHere(char *uni_str) -{ - auto handled = FALSE; - - if (!mReadOnly) { - addString(uni_str); - getWindow()->hideCursorUntilMouseMove(); - handled = TRUE; - } - - if (handled) { - resetCursorBlink(); - deselect(); - onKeyStroke(); - } - - return handled; -} // virtual bool LLTextEditor::canDoDelete() const diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h index 24da5c04e5..0b5acf19a1 100644 --- a/indra/llui/lltexteditor.h +++ b/indra/llui/lltexteditor.h @@ -105,7 +105,6 @@ public: virtual bool handleKeyHere(KEY key, MASK mask ); virtual bool handleUnicodeCharHere(llwchar uni_char); - virtual bool handleUnicodeStringHere(char *uni_str); virtual void onMouseCaptureLost(); @@ -250,8 +249,6 @@ protected: // Undoable operations void addChar(llwchar c); // at mCursorPos S32 addChar(S32 pos, llwchar wc); - void addString(char *s); - S32 addString(S32 pos, char *str); void addLineBreakChar(bool group_together = false); S32 overwriteChar(S32 pos, llwchar wc); void removeChar(); @@ -313,7 +310,6 @@ private: // Concrete TextCmd sub-classes used by the LLTextEditor base class class TextCmdInsert; class TextCmdAddChar; - class TextCmdAddString; class TextCmdOverwriteChar; class TextCmdRemove; diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index cead5b5956..7d6c937b85 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -1080,31 +1080,12 @@ bool LLView::handleUnicodeChar(llwchar uni_char, bool called_from_parent) return handled; } -bool LLView::handleUnicodeString(char *uni_str, bool called_from_parent) -{ - auto handled = FALSE; - - if (getVisible() && getEnabled() && !handled) { - handled = handleUnicodeStringHere(uni_str); - if (handled && LLView::sDebugKeys) - LL_INFOS() << "Unicode key handled by " << getName() << LL_ENDL; - } - - if (!handled && !called_from_parent && mParentView) - handled = mParentView->handleUnicodeString(uni_str, FALSE); - - return handled; -} bool LLView::handleUnicodeCharHere(llwchar uni_char ) { return false; } -bool LLView::handleUnicodeStringHere(char *uni_str) -{ - return FALSE; -} bool LLView::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, diff --git a/indra/llui/llview.h b/indra/llui/llview.h index 7f57a8d7db..710ec3d05e 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -385,7 +385,6 @@ public: /* virtual */ bool handleKey(KEY key, MASK mask, bool called_from_parent); /* virtual */ bool handleKeyUp(KEY key, MASK mask, bool called_from_parent); /* virtual */ bool handleUnicodeChar(llwchar uni_char, bool called_from_parent); - /* virtual */ bool handleUnicodeString(char *uni_str, bool called_from_parent); virtual bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, @@ -519,7 +518,6 @@ public: virtual bool handleKeyHere(KEY key, MASK mask); virtual bool handleKeyUpHere(KEY key, MASK mask); virtual bool handleUnicodeCharHere(llwchar uni_char); - virtual bool handleUnicodeStringHere(char *uni_str); virtual void handleReshape(const LLRect& rect, bool by_user); virtual void dirtyRect(); diff --git a/indra/llwindow/llwindowcallbacks.cpp b/indra/llwindow/llwindowcallbacks.cpp index ff46ae951e..c160382c17 100644 --- a/indra/llwindow/llwindowcallbacks.cpp +++ b/indra/llwindow/llwindowcallbacks.cpp @@ -52,10 +52,6 @@ bool LLWindowCallbacks::handleUnicodeChar(llwchar uni_char, MASK mask) return false; } -bool LLWindowCallbacks::handleUnicodeString(char *uni_str) -{ - return FALSE; -} bool LLWindowCallbacks::handleMouseDown(LLWindow *window, const LLCoordGL pos, MASK mask) { diff --git a/indra/llwindow/llwindowcallbacks.h b/indra/llwindow/llwindowcallbacks.h index c7cb2b146c..63b585231f 100644 --- a/indra/llwindow/llwindowcallbacks.h +++ b/indra/llwindow/llwindowcallbacks.h @@ -37,7 +37,6 @@ public: virtual bool handleTranslatedKeyUp(KEY key, MASK mask); virtual void handleScanKey(KEY key, bool key_down, bool key_up, bool key_level); virtual bool handleUnicodeChar(llwchar uni_char, MASK mask); - virtual bool handleUnicodeString(char *uni_str); virtual bool handleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask); virtual bool handleMouseUp(LLWindow *window, LLCoordGL pos, MASK mask); diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 0e2e57a84a..e694474a41 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -3147,14 +3147,6 @@ bool LLViewerWindow::handleUnicodeChar(llwchar uni_char, MASK mask) return false; } -bool LLViewerWindow::handleUnicodeString(char *uni_str) -{ - auto keyboard_focus = gFocusMgr.getKeyboardFocus(); - if (keyboard_focus) - keyboard_focus->handleUnicodeString(uni_str, FALSE); - - return TRUE; -} void LLViewerWindow::handleScrollWheel(S32 clicks) { diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index 31bf5b5332..1b995ea650 100644 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -194,7 +194,6 @@ public: /*virtual*/ bool handleTranslatedKeyUp(KEY key, MASK mask); /*virtual*/ void handleScanKey(KEY key, bool key_down, bool key_up, bool key_level); /*virtual*/ bool handleUnicodeChar(llwchar uni_char, MASK mask); // NOT going to handle extended - /*virtual*/ bool handleUnicodeString(char *uni_str); /*virtual*/ bool handleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask); /*virtual*/ bool handleMouseUp(LLWindow *window, LLCoordGL pos, MASK mask); /*virtual*/ bool handleCloseRequest(LLWindow *window); -- cgit v1.2.3 From 6f683319b298efc6db30fc1ad0fca66605d9eac9 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Tue, 22 Oct 2024 13:47:07 +0800 Subject: Revert "LL physics extensions stub" This reverts commit 45b9eed30320c6281efcfb748098a8789b15f15f. --- indra/cmake/LLPhysicsExtensions.cmake | 3 - indra/llprimitive/CMakeLists.txt | 4 - .../llprimitive/llphysicsextensions/CMakeLists.txt | 101 --------- .../LLConvexDecompositionStubImpl.cpp | 143 ------------- .../LLConvexDecompositionStubImpl.h | 92 -------- .../llphysicsextensions/LLPathingLibStubImpl.cpp | 107 ---------- .../llphysicsextensions/LLPathingLibStubImpl.h | 78 ------- .../LLPhysicsExtensionsStubImpl.cpp | 49 ----- .../LLPhysicsExtensionsStubImpl.h | 46 ---- .../llphysicsextensions/llconvexdecomposition.cpp | 102 --------- .../llphysicsextensions/llconvexdecomposition.h | 231 --------------------- .../llphysicsextensions/llpathinglib.cpp | 110 ---------- .../llprimitive/llphysicsextensions/llpathinglib.h | 187 ----------------- .../llphysicsextensions/llphysicsextensions.cpp | 103 --------- .../llphysicsextensions/llphysicsextensions.h | 59 ------ indra/newview/CMakeLists.txt | 4 +- 16 files changed, 2 insertions(+), 1417 deletions(-) delete mode 100644 indra/llprimitive/llphysicsextensions/CMakeLists.txt delete mode 100644 indra/llprimitive/llphysicsextensions/LLConvexDecompositionStubImpl.cpp delete mode 100644 indra/llprimitive/llphysicsextensions/LLConvexDecompositionStubImpl.h delete mode 100644 indra/llprimitive/llphysicsextensions/LLPathingLibStubImpl.cpp delete mode 100644 indra/llprimitive/llphysicsextensions/LLPathingLibStubImpl.h delete mode 100644 indra/llprimitive/llphysicsextensions/LLPhysicsExtensionsStubImpl.cpp delete mode 100644 indra/llprimitive/llphysicsextensions/LLPhysicsExtensionsStubImpl.h delete mode 100644 indra/llprimitive/llphysicsextensions/llconvexdecomposition.cpp delete mode 100644 indra/llprimitive/llphysicsextensions/llconvexdecomposition.h delete mode 100644 indra/llprimitive/llphysicsextensions/llpathinglib.cpp delete mode 100644 indra/llprimitive/llphysicsextensions/llpathinglib.h delete mode 100644 indra/llprimitive/llphysicsextensions/llphysicsextensions.cpp delete mode 100644 indra/llprimitive/llphysicsextensions/llphysicsextensions.h (limited to 'indra') diff --git a/indra/cmake/LLPhysicsExtensions.cmake b/indra/cmake/LLPhysicsExtensions.cmake index 1cb1679d75..80d243d9f8 100644 --- a/indra/cmake/LLPhysicsExtensions.cmake +++ b/indra/cmake/LLPhysicsExtensions.cmake @@ -26,9 +26,6 @@ if (HAVOK) elseif (HAVOK_TPV) use_prebuilt_binary(llphysicsextensions_tpv) target_link_libraries( llphysicsextensions_impl INTERFACE llphysicsextensions_tpv) -elseif (NOT (USE_AUTOBUILD_3P OR USE_CONAN)) - target_link_libraries( llphysicsextensions_impl INTERFACE llphysicsextensionsstub) - return () else (HAVOK) use_prebuilt_binary(llphysicsextensions_stub) set(LLPHYSICSEXTENSIONS_SRC_DIR ${LIBS_PREBUILT_DIR}/llphysicsextensions/stub) diff --git a/indra/llprimitive/CMakeLists.txt b/indra/llprimitive/CMakeLists.txt index 8d403dc6c8..b98edc67de 100644 --- a/indra/llprimitive/CMakeLists.txt +++ b/indra/llprimitive/CMakeLists.txt @@ -93,10 +93,6 @@ target_link_libraries(llprimitive ll::glh_linear ) -if (USESYSTEMLIBS) - add_subdirectory(llphysicsextensions) -endif () - include(LibraryInstall) #add unit tests diff --git a/indra/llprimitive/llphysicsextensions/CMakeLists.txt b/indra/llprimitive/llphysicsextensions/CMakeLists.txt deleted file mode 100644 index d3fe503e8c..0000000000 --- a/indra/llprimitive/llphysicsextensions/CMakeLists.txt +++ /dev/null @@ -1,101 +0,0 @@ -# -*- cmake -*- - -project(llphysicsextensions) - -include(00-Common) -include(Variables) -include(LLCommon) -include(LLMath) - -set(LLPHYSICSEXTENSIONS_LIB_NAME llphysicsextensions) - -if (WINDOWS) - set(LLPHYSICSEXTENSIONS_LIBRARIES ${LLPHYSICSEXTENSIONS_LIB_NAME}.lib) -else (WINDOWS) - set(LLPHYSICSEXTENSIONS_LIBRARIES ${LLPHYSICSEXTENSIONS_LIB_NAME}.a) -endif (WINDOWS) - -set(LLPHYSICSEXTENSIONS_INCLUDE_DIR - ${CMAKE_CURRENT_SOURCE_DIR}) - -set(LLPHYSICSEXTENSIONS_DEBUG_LIBRARY_PATH ${LIBS_PREBUILT_DIR}/lib/debug) -set(LLPHYSICSEXTENSIONS_RELEASE_LIBRARY_PATH ${LIBS_PREBUILT_DIR}/lib/release) - -#set(LLPHYSICSEXTENSIONS_LIBRARIES_LIBRARIES -# debug ${LLPHYSICSEXTENSIONS_DEBUG_LIB} -# optimized ${LLPHYSICSEXTENTIONS_RELEASE_LIB} -#) - -if (LINUX) - list(INSERT LLPHYSICSEXTENSIONS_LIBRARIES 0 -Wl,--start-group) - list(APPEND LLPHYSICSEXTENSIONS_LIBRARIES -Wl,--end-group) -endif (LINUX) - -#include_directories( -# ${CMAKE_SOURCE_DIR}/llphysicsextensions -# ${LLPHYSICSEXTENSIONS_INCLUDE_DIR} -# ${LLCOMMON_INCLUDE_DIRS} -# ${LLMATH_INCLUDE_DIRS} -# ) - -set(llphysicsextensions_SOURCE_FILES - llpathinglib.cpp - LLPathingLibStubImpl.cpp - llconvexdecomposition.cpp - LLConvexDecompositionStubImpl.cpp - llphysicsextensions.cpp - LLPhysicsExtensionsStubImpl.cpp - ) - -set(llphysicsextensions_HEADER_FILES - - ${LLPHYSICSEXTENSIONS_INCLUDE_DIR}/llpathinglib.h - ${LLPHYSICSEXTENSIONS_INCLUDE_DIR}/llconvexdecomposition.h - ${LLPHYSICSEXTENSIONS_INCLUDE_DIR}/llphysicsextensions.h - LLPathingLibStubImpl.h - LLConvexDecompositionStubImpl.h - LLPhysicsExtensionsStubImpl.h - ) - -if (WINDOWS) - list(APPEND llphysicsextensions_HEADER_FILES - ${LLPHYSICSEXTENSIONS_INCLUDE_DIR}/windowsincludes.h) -endif (WINDOWS) - -set_source_files_properties(${llphysicsextensions_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - -# some of the include files contain compile-time switches based on these -set_source_files_properties(${llphysicsextensions_SOURCE_FILES} - PROPERTIES COMPILE_DEFINITIONS "LL_PATHING_LIB_STUB;LL_CONVEX_DECOMP_STUB;LL_PHYSICS_EXTENSIONS_STUB") - -list(APPEND llphysicsextensionsstub_SOURCE_FILES ${llphysicsextensions_HEADER_FILES}) - -add_library(${PROJECT_NAME}stub ${${PROJECT_NAME}_SOURCE_FILES}) -target_include_directories(${PROJECT_NAME}stub INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) -target_link_libraries(${PROJECT_NAME}stub llmath llcommon) -list(REMOVE_ITEM ${PROJECT_NAME}_HEADER_FILES - LLPathingLibStubImpl.h - LLConvexDecompositionStubImpl.h - LLPhysicsExtensionsStubImpl.h) -#install(FILES ${${PROJECT_NAME}_HEADER_FILES} DESTINATION include/${PROJECT_NAME}) -if (BUILD_SHARED_LIBS) - if (EXISTS ${CMAKE_SYSROOT}/usr/lib/${ARCH}-linux-gnu) - set(_LIB lib/${ARCH}-linux-gnu) - elseif (EXISTS /lib64 AND NOT ${LINUX_DISTRO} MATCHES arch) - set(_LIB lib64) - else () - set(_LIB lib) - endif () - install(TARGETS ${PROJECT_NAME}stub DESTINATION ${_LIB}) -endif () - -if (LINUX) - IF(CMAKE_BUILD_TYPE MATCHES Release) - SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/release) - ENDIF(CMAKE_BUILD_TYPE MATCHES Release) - IF(CMAKE_BUILD_TYPE MATCHES Debug) - SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/debug) - ENDIF(CMAKE_BUILD_TYPE MATCHES Debug) - -endif (LINUX) diff --git a/indra/llprimitive/llphysicsextensions/LLConvexDecompositionStubImpl.cpp b/indra/llprimitive/llphysicsextensions/LLConvexDecompositionStubImpl.cpp deleted file mode 100644 index b1214a7f31..0000000000 --- a/indra/llprimitive/llphysicsextensions/LLConvexDecompositionStubImpl.cpp +++ /dev/null @@ -1,143 +0,0 @@ -/** -* @file LLConvexDecompositionStubImpl.cpp -* @author falcon@lindenlab.com -* @brief A stub implementation of LLConvexDecomposition -* -* $LicenseInfo:firstyear=2011&license=viewerlgpl$ -* Second Life Viewer Source Code -* Copyright (C) 20112010, Linden Research, Inc. -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU Lesser General Public -* License as published by the Free Software Foundation; -* version 2.1 of the License only. -* -* This library is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this library; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -* -* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA -* $/LicenseInfo$ -*/ - -#include -#include -#include "LLConvexDecompositionStubImpl.h" - -LLConvexDecomposition* LLConvexDecompositionImpl::getInstance() -{ - return NULL; -} - -LLCDResult LLConvexDecompositionImpl::initSystem() -{ - return LLCD_NOT_IMPLEMENTED; -} - -LLCDResult LLConvexDecompositionImpl::initThread() -{ - return LLCD_NOT_IMPLEMENTED; -} - -LLCDResult LLConvexDecompositionImpl::quitThread() -{ - return LLCD_NOT_IMPLEMENTED; -} - -LLCDResult LLConvexDecompositionImpl::quitSystem() -{ - return LLCD_NOT_IMPLEMENTED; -} - -void LLConvexDecompositionImpl::genDecomposition(int& decomp) -{ - decomp = -1; -} - -void LLConvexDecompositionImpl::deleteDecomposition(int decomp) -{ - -} - -void LLConvexDecompositionImpl::bindDecomposition(int decomp) -{ - -} - -LLCDResult LLConvexDecompositionImpl::setParam(const char* name, float val) -{ - return LLCD_NOT_IMPLEMENTED; -} - -LLCDResult LLConvexDecompositionImpl::setParam(const char* name, bool val) -{ - return LLCD_NOT_IMPLEMENTED; -} - -LLCDResult LLConvexDecompositionImpl::setParam(const char* name, int val) -{ - return LLCD_NOT_IMPLEMENTED; -} - -LLCDResult LLConvexDecompositionImpl::setMeshData( const LLCDMeshData* data, bool vertex_based ) -{ - return LLCD_NOT_IMPLEMENTED; -} - -LLCDResult LLConvexDecompositionImpl::registerCallback(int stage, llcdCallbackFunc callback ) -{ - return LLCD_NOT_IMPLEMENTED; -} - -LLCDResult LLConvexDecompositionImpl::executeStage(int stage) -{ - return LLCD_NOT_IMPLEMENTED; -} - -int LLConvexDecompositionImpl::getNumHullsFromStage(int stage) -{ - return 0; -} - -LLCDResult LLConvexDecompositionImpl::getSingleHull( LLCDHull* hullOut ) -{ - memset( hullOut, 0, sizeof(LLCDHull) ); - return LLCD_NOT_IMPLEMENTED; -} - -LLCDResult LLConvexDecompositionImpl::getHullFromStage( int stage, int hull, LLCDHull* hullOut ) -{ - memset( hullOut, 0, sizeof(LLCDHull) ); - return LLCD_NOT_IMPLEMENTED; -} - -LLCDResult LLConvexDecompositionImpl::getMeshFromStage( int stage, int hull, LLCDMeshData* meshDataOut ) -{ - memset( meshDataOut, 0, sizeof(LLCDMeshData) ); - return LLCD_NOT_IMPLEMENTED; -} - -LLCDResult LLConvexDecompositionImpl::getMeshFromHull( LLCDHull* hullIn, LLCDMeshData* meshOut ) -{ - memset( meshOut, 0, sizeof(LLCDMeshData) ); - return LLCD_NOT_IMPLEMENTED; -} - -LLCDResult LLConvexDecompositionImpl::generateSingleHullMeshFromMesh(LLCDMeshData* meshIn, LLCDMeshData* meshOut) -{ - memset( meshOut, 0, sizeof(LLCDMeshData) ); - return LLCD_NOT_IMPLEMENTED; -} - -void LLConvexDecompositionImpl::loadMeshData(const char* fileIn, LLCDMeshData** meshDataOut) -{ - static LLCDMeshData meshData; - memset( &meshData, 0, sizeof(LLCDMeshData) ); - *meshDataOut = &meshData; -} - diff --git a/indra/llprimitive/llphysicsextensions/LLConvexDecompositionStubImpl.h b/indra/llprimitive/llphysicsextensions/LLConvexDecompositionStubImpl.h deleted file mode 100644 index 9ae879efb4..0000000000 --- a/indra/llprimitive/llphysicsextensions/LLConvexDecompositionStubImpl.h +++ /dev/null @@ -1,92 +0,0 @@ -/** -* @file LLConvexDecompositionStubImpl.h -* @author falcon@lindenlab.com -* @brief A stub implementation of LLConvexDecomposition -* -* $LicenseInfo:firstyear=2011&license=viewerlgpl$ -* Second Life Viewer Source Code -* Copyright (C) 20112010, Linden Research, Inc. -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU Lesser General Public -* License as published by the Free Software Foundation; -* version 2.1 of the License only. -* -* This library is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this library; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -* -* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA -* $/LicenseInfo$ -*/ - -#ifndef LL_CONVEX_DECOMP_UTIL_H -#define LL_CONVEX_DECOMP_UTIL_H - -#include "llconvexdecomposition.h" - -class LLConvexDecompositionImpl : public LLConvexDecomposition -{ - public: - - virtual ~LLConvexDecompositionImpl() {} - - static LLConvexDecomposition* getInstance(); - static LLCDResult initSystem(); - static LLCDResult initThread(); - static LLCDResult quitThread(); - static LLCDResult quitSystem(); - - void genDecomposition(int& decomp); - void deleteDecomposition(int decomp); - void bindDecomposition(int decomp); - - // Sets *paramsOut to the address of the LLCDParam array and returns - // the length of the array - int getParameters(const LLCDParam** paramsOut) - { - *paramsOut = NULL; - return 0; - } - - int getStages(const LLCDStageData** stagesOut) - { - *stagesOut = NULL; - return 0; - } - - // Set a parameter by name. Returns false if out of bounds or unsupported parameter - LLCDResult setParam(const char* name, float val); - LLCDResult setParam(const char* name, int val); - LLCDResult setParam(const char* name, bool val); - LLCDResult setMeshData( const LLCDMeshData* data, bool vertex_based ); - LLCDResult registerCallback(int stage, llcdCallbackFunc callback ); - - LLCDResult executeStage(int stage); - - int getNumHullsFromStage(int stage); - - LLCDResult getHullFromStage( int stage, int hull, LLCDHull* hullOut ); - LLCDResult getSingleHull( LLCDHull* hullOut ) ; - - // TODO: Implement lock of some kind to disallow this call if data not yet ready - LLCDResult getMeshFromStage( int stage, int hull, LLCDMeshData* meshDataOut); - LLCDResult getMeshFromHull( LLCDHull* hullIn, LLCDMeshData* meshOut ); - - // For visualizing convex hull shapes in the viewer physics shape display - LLCDResult generateSingleHullMeshFromMesh( LLCDMeshData* meshIn, LLCDMeshData* meshOut); - - /// Debug - void loadMeshData(const char* fileIn, LLCDMeshData** meshDataOut); - - private: - LLConvexDecompositionImpl() {} -}; - -#endif //LL_CONVEX_DECOMP_UTIL_H - diff --git a/indra/llprimitive/llphysicsextensions/LLPathingLibStubImpl.cpp b/indra/llprimitive/llphysicsextensions/LLPathingLibStubImpl.cpp deleted file mode 100644 index 8ad13532f2..0000000000 --- a/indra/llprimitive/llphysicsextensions/LLPathingLibStubImpl.cpp +++ /dev/null @@ -1,107 +0,0 @@ -/** -* @file LLPathingLibStubImpl.cpp -* @author prep@lindenlab.com -* @brief A stubbed implementation of LLPathingLib -* -* $LicenseInfo:firstyear=2012&license=viewerlgpl$ -* Second Life Viewer Source Code -* Copyright (C) 20112010, Linden Research, Inc. -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU Lesser General Public -* License as published by the Free Software Foundation; -* version 2.1 of the License only. -* -* This library is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this library; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -* -* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA -* $/LicenseInfo$ -*/ - -#include "llpathinglib.h" -#include "LLPathingLibStubImpl.h" - -#include "llsd.h" - -//============================================================================= -LLPathingLibImpl::LLPathingLibImpl() -{ -} - -LLPathingLibImpl::~LLPathingLibImpl() -{ - -} - -LLPathingLib* LLPathingLibImpl::getInstance() -{ - return NULL; -} - - -LLPathingLib::LLPLResult LLPathingLibImpl::initSystem() -{ - return LLPL_NOT_IMPLEMENTED; -} - -LLPathingLib::LLPLResult LLPathingLibImpl::quitSystem() -{ - return LLPL_NOT_IMPLEMENTED; -} - -LLPathingLib::LLPLResult LLPathingLibImpl::extractNavMeshSrcFromLLSD( const LLSD::Binary& dataBlock, int dir ) -{ - return LLPL_NOT_IMPLEMENTED; -} - -void LLPathingLibImpl::processNavMeshData() -{ -} - -LLPathingLibImpl::LLPLResult LLPathingLibImpl::generatePath( const PathingPacket& pathingPacket ) -{ - return LLPL_NOT_IMPLEMENTED; -} - -void LLPathingLibImpl::setNavMeshMaterialType( LLPLCharacterType materialType ) -{ -} - -void LLPathingLibImpl::setNavMeshColors( const NavMeshColors& color ) -{ -} - -void LLPathingLibImpl::renderNavMesh() -{ -} - -void LLPathingLibImpl::renderNavMeshEdges() -{ -} - -void LLPathingLibImpl::renderNavMeshShapesVBO( U32 shapeRenderFlags ) -{ -} - -void LLPathingLibImpl::renderPath() -{ -} - -void LLPathingLibImpl::renderPathBookend( LLRender& gl, LLPathingLib::LLPLPathBookEnd type ) -{ -} - -void LLPathingLibImpl::cleanupVBOManager() -{ -} - -void LLPathingLibImpl::cleanupResidual() -{ -} diff --git a/indra/llprimitive/llphysicsextensions/LLPathingLibStubImpl.h b/indra/llprimitive/llphysicsextensions/LLPathingLibStubImpl.h deleted file mode 100644 index 75fdb3fa0f..0000000000 --- a/indra/llprimitive/llphysicsextensions/LLPathingLibStubImpl.h +++ /dev/null @@ -1,78 +0,0 @@ -/** -* @file LLPathingLibSubImpl.h -* @author prep@lindenlab.com -* @brief A stubbed implementation of LLPathingLib -* -* $LicenseInfo:firstyear=2012&license=viewerlgpl$ -* Second Life Viewer Source Code -* Copyright (C) 2012, Linden Research, Inc. -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU Lesser General Public -* License as published by the Free Software Foundation; -* version 2.1 of the License only. -* -* This library is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this library; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -* -* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA -* $/LicenseInfo$ -*/ - -#ifndef LL_PATHING_LIB_H -#define LL_PATHING_LIB_H - -#include "llpathinglib.h" - -class LLSD; - -//============================================================================= -class LLPathingLibImpl : public LLPathingLib -{ -public: - LLPathingLibImpl(); - virtual ~LLPathingLibImpl(); - - // Obtain a pointer to the actual implementation - static LLPathingLib* getInstance(); - static LLPathingLib::LLPLResult initSystem(); - static LLPathingLib::LLPLResult quitSystem(); - - //Extract and store navmesh data from the llsd datablock sent down by the server - virtual LLPLResult extractNavMeshSrcFromLLSD( const LLSD::Binary& dataBlock, int dir ); - //Stitch any stored navmeshes together - virtual void processNavMeshData(); - - //Method used to generate and visualize a path on the viewers navmesh - virtual LLPLResult generatePath( const PathingPacket& pathingPacket ); - - //Set the material type for the heatmap type - virtual void setNavMeshMaterialType( LLPLCharacterType materialType ); - //Set the various navmesh colors - virtual void setNavMeshColors( const NavMeshColors& color ); - - //The entry method to rendering the client side navmesh - virtual void renderNavMesh(); - //The entry method to rendering the client side navmesh edges - virtual void renderNavMeshEdges(); - //The entry method to render the client navmesh shapes VBO - virtual void renderNavMeshShapesVBO( U32 shapeRenderFlags ); - //The entry method to render the clients designated path - virtual void renderPath(); - //The entry method to render the capsule bookends for the clients designated path - virtual void renderPathBookend( LLRender& gl, LLPathingLib::LLPLPathBookEnd type ); - - //Method to delete any vbo's that are currently being managed by the pathing library - virtual void cleanupVBOManager(); - //Method to cleanup any allocations within the implementation - virtual void cleanupResidual(); -}; - -#endif //LL_PATHING_LIB_H - diff --git a/indra/llprimitive/llphysicsextensions/LLPhysicsExtensionsStubImpl.cpp b/indra/llprimitive/llphysicsextensions/LLPhysicsExtensionsStubImpl.cpp deleted file mode 100644 index 2c432f94e3..0000000000 --- a/indra/llprimitive/llphysicsextensions/LLPhysicsExtensionsStubImpl.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/** -* @file LLPhysicsExtensionsStubImpl.cpp -* @author prep@lindenlab.com -* @brief A stubbed implementation of LLPhysicsExtensions -* -* $LicenseInfo:firstyear=2012&license=viewerlgpl$ -* Second Life Viewer Source Code -* Copyright (C) 2012, Linden Research, Inc. -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU Lesser General Public -* License as published by the Free Software Foundation; -* version 2.1 of the License only. -* -* This library is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this library; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -* -* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA -* $/LicenseInfo$ -*/ - -#include "llphysicsextensions.h" -#include "LLPhysicsExtensionsStubImpl.h" - -//============================================================================= -LLPhysicsExtensionsImpl::LLPhysicsExtensionsImpl() -{ -} - -LLPhysicsExtensionsImpl::~LLPhysicsExtensionsImpl() -{ -} - -bool LLPhysicsExtensionsImpl::initSystem() -{ - return false; -} - -bool LLPhysicsExtensionsImpl::quitSystem() -{ - return false; -} - diff --git a/indra/llprimitive/llphysicsextensions/LLPhysicsExtensionsStubImpl.h b/indra/llprimitive/llphysicsextensions/LLPhysicsExtensionsStubImpl.h deleted file mode 100644 index ac14da1ac3..0000000000 --- a/indra/llprimitive/llphysicsextensions/LLPhysicsExtensionsStubImpl.h +++ /dev/null @@ -1,46 +0,0 @@ -/** -* @file LLPhysicsExtensionsSubImpl.h -* @author prep@lindenlab.com -* @brief A stubbed implementation of LLPhysicsExtensions -* -* $LicenseInfo:firstyear=2012&license=viewerlgpl$ -* Second Life Viewer Source Code -* Copyright (C) 2012, Linden Research, Inc. -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU Lesser General Public -* License as published by the Free Software Foundation; -* version 2.1 of the License only. -* -* This library is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this library; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -* -* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA -* $/LicenseInfo$ -*/ - -#ifndef LL_PHYSICS_EXTENSIONS_STUB_IMPL_H -#define LL_PHYSICS_EXTENSIONS_STUB_IMPL_H - -#include "llphysicsextensions.h" - -//============================================================================= -class LLPhysicsExtensionsImpl : public LLPhysicsExtensions -{ - public: - - LLPhysicsExtensionsImpl(); - virtual ~LLPhysicsExtensionsImpl(); - - static bool initSystem(); - static bool quitSystem(); -}; - -#endif //LL_PHYSICS_EXTENSIONS_STUB_IMPL_H - diff --git a/indra/llprimitive/llphysicsextensions/llconvexdecomposition.cpp b/indra/llprimitive/llphysicsextensions/llconvexdecomposition.cpp deleted file mode 100644 index f7caf7f676..0000000000 --- a/indra/llprimitive/llphysicsextensions/llconvexdecomposition.cpp +++ /dev/null @@ -1,102 +0,0 @@ -/** -* @file llconvexdecomposition.cpp -* @author falcon@lindenlab.com -* @brief A Havok implementation of LLConvexDecomposition interface -* -* $LicenseInfo:firstyear=2011&license=lgpl$ -* Second Life Viewer Source Code -* Copyright (C) 2011, Linden Research, Inc. -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU Lesser General Public -* License as published by the Free Software Foundation; -* version 2.1 of the License only. -* -* This library is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this library; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -* -* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA -* $/LicenseInfo$ -*/ - -#if defined(_WINDOWS) -# include "windowsincludes.h" -#endif - -#ifndef NULL -#define NULL 0 -#endif - -#if !defined(LL_CONVEX_DECOMP_STUB) -# include "LLConvexDecompositionImpl.h" -#else -# include "LLConvexDecompositionStubImpl.h" -#endif - -#include "llconvexdecomposition.h" - - -/*static */bool LLConvexDecomposition::s_isInitialized = false; - -/*static*/bool LLConvexDecomposition::isFunctional() -{ -#if !defined(LL_CONVEX_DECOMP_STUB) - return true; -#else - return false; -#endif -} - -#if !defined(LL_CONVEX_DECOMP_STUB) && defined(HK_COMPILER_CLANG) - //have to specialize before use so that generalized one not auto gen-d -HK_SINGLETON_SPECIALIZATION_DECL(LLConvexDecompositionImpl); -#endif - -/*static*/LLConvexDecomposition* LLConvexDecomposition::getInstance() -{ - if ( !s_isInitialized ) - { - return NULL; - } - else - { -#if !defined(LL_CONVEX_DECOMP_STUB) - return &hkSingleton::getInstance(); -#else - return LLConvexDecompositionImpl::getInstance(); -#endif - } -} - -/*static */LLCDResult LLConvexDecomposition::initSystem() -{ - LLCDResult result = LLConvexDecompositionImpl::initSystem(); - if ( result == LLCD_OK ) - { - s_isInitialized = true; - } - return result; -} - -/*static */LLCDResult LLConvexDecomposition::initThread() -{ - return LLConvexDecompositionImpl::initThread(); -} - -/*static */LLCDResult LLConvexDecomposition::quitThread() -{ - return LLConvexDecompositionImpl::quitThread(); -} - -/*static */LLCDResult LLConvexDecomposition::quitSystem() -{ - return LLConvexDecompositionImpl::quitSystem(); -} - - diff --git a/indra/llprimitive/llphysicsextensions/llconvexdecomposition.h b/indra/llprimitive/llphysicsextensions/llconvexdecomposition.h deleted file mode 100644 index 10c6d55315..0000000000 --- a/indra/llprimitive/llphysicsextensions/llconvexdecomposition.h +++ /dev/null @@ -1,231 +0,0 @@ -/** - * @file llconvexdecomposition.cpp - * @brief LLConvexDecomposition interface definition - * - * $LicenseInfo:firstyear=2011&license=lgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2011, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -#ifndef LL_CONVEX_DECOMPOSITION -#define LL_CONVEX_DECOMPOSITION - -typedef int bool32; - -#if defined(_WIN32) || defined(_WIN64) -#define LLCD_CALL __cdecl -#else -#define LLCD_CALL -#endif - -struct LLCDParam -{ - enum LLCDParamType - { - LLCD_INVALID = 0, - LLCD_INTEGER, - LLCD_FLOAT, - LLCD_BOOLEAN, - LLCD_ENUM - }; - - struct LLCDEnumItem - { - const char* mName; - int mValue; - }; - - union LLCDValue - { - float mFloat; - int mIntOrEnumValue; - bool32 mBool; - }; - - union LLCDParamDetails - { - struct { - LLCDValue mLow; - LLCDValue mHigh; - LLCDValue mDelta; - } mRange; - - struct { - int mNumEnums; - LLCDEnumItem* mEnumsArray; - } mEnumValues; - }; - - const char* mName; - const char* mDescription; - LLCDParamType mType; - LLCDParamDetails mDetails; - LLCDValue mDefault; - int mStage; - - // WARNING: Only the LLConvexDecomposition implementation - // should change this value - int mReserved; -}; - -struct LLCDStageData -{ - const char* mName; - const char* mDescription; - bool32 mSupportsCallback; -}; - -struct LLCDMeshData -{ - enum IndexType - { - INT_16, - INT_32 - }; - - const float* mVertexBase; - int mVertexStrideBytes; - int mNumVertices; - const void* mIndexBase; - IndexType mIndexType; - int mIndexStrideBytes; - int mNumTriangles; -}; - -struct LLCDHull -{ - const float* mVertexBase; - int mVertexStrideBytes; - int mNumVertices; -}; - -enum LLCDResult -{ - LLCD_OK = 0, - LLCD_UNKOWN_ERROR, - LLCD_NULL_PTR, - LLCD_INVALID_STAGE, - LLCD_UNKNOWN_PARAM, - LLCD_BAD_VALUE, - LLCD_REQUEST_OUT_OF_RANGE, - LLCD_INVALID_MESH_DATA, - LLCD_INVALID_HULL_DATA, - LLCD_STAGE_NOT_READY, - LLCD_INVALID_THREAD, - LLCD_NOT_IMPLEMENTED -}; - -// This callback will receive a string describing the current subtask being performed -// as well as a pair of numbers indicating progress. (The values should not be interpreted -// as a completion percentage as 'current' may be greater than 'final'.) -// If the callback returns zero, the decomposition will be terminated -typedef int (LLCD_CALL *llcdCallbackFunc)(const char* description, int current, int final); - -class LLConvexDecomposition -{ -public: - // Obtain a pointer to the actual implementation - static LLConvexDecomposition* getInstance(); - - /// @returns false if this is the stub - static bool isFunctional(); - - static LLCDResult initSystem(); - static LLCDResult initThread(); - static LLCDResult quitThread(); - static LLCDResult quitSystem(); - - // Generate a decomposition object handle - virtual void genDecomposition(int& decomp) = 0; - // Delete decomposition object handle - virtual void deleteDecomposition(int decomp) = 0; - // Bind given decomposition handle - // Commands operate on currently bound decomposition - virtual void bindDecomposition(int decomp) = 0; - - // Sets *paramsOut to the address of the LLCDParam array and returns - // the number of parameters - virtual int getParameters(const LLCDParam** paramsOut) = 0; - - - // Sets *stagesOut to the address of the LLCDStageData array and returns - // the number of stages - virtual int getStages(const LLCDStageData** stagesOut) = 0; - - - // Set a parameter by name. Pass enum values as integers. - virtual LLCDResult setParam(const char* name, float val) = 0; - virtual LLCDResult setParam(const char* name, int val) = 0; - virtual LLCDResult setParam(const char* name, bool val) = 0; - - - // Set incoming mesh data. Data is copied to local buffers and will - // persist until the next setMeshData call - virtual LLCDResult setMeshData( const LLCDMeshData* data, bool vertex_based ) = 0; - - - // Register a callback to be called periodically during the specified stage - // See the typedef above for more information - virtual LLCDResult registerCallback( int stage, llcdCallbackFunc callback ) = 0; - - - // Execute the specified decomposition stage - virtual LLCDResult executeStage(int stage) = 0; - virtual LLCDResult buildSingleHull() = 0 ; - - - // Gets the number of hulls generated by the specified decompositions stage - virtual int getNumHullsFromStage(int stage) = 0; - - - // Populates hullOut to reference the internal copy of the requested hull - // The data will persist only until the next executeStage call for that stage. - virtual LLCDResult getHullFromStage( int stage, int hull, LLCDHull* hullOut ) = 0; - - virtual LLCDResult getSingleHull( LLCDHull* hullOut ) = 0 ; - - - // TODO: Implement lock of some kind to disallow this call if data not yet ready - // Populates the meshDataOut to reference the utility's copy of the mesh geometry - // for the hull and stage specified. - // You must copy this data if you want to continue using it after the next executeStage - // call - virtual LLCDResult getMeshFromStage( int stage, int hull, LLCDMeshData* meshDataOut) = 0; - - - // Creates a mesh from hullIn and temporarily stores it internally in the utility. - // The mesh data persists only until the next call to getMeshFromHull - virtual LLCDResult getMeshFromHull( LLCDHull* hullIn, LLCDMeshData* meshOut ) = 0; - - // Takes meshIn, generates a single convex hull from it, converts that to a mesh - // stored internally, and populates meshOut to reference the internally stored data. - // The data is persistent only until the next call to generateSingleHullMeshFromMesh - virtual LLCDResult generateSingleHullMeshFromMesh( LLCDMeshData* meshIn, LLCDMeshData* meshOut) = 0; - - // - /// Debug - virtual void loadMeshData(const char* fileIn, LLCDMeshData** meshDataOut) = 0; - -private: - static bool s_isInitialized; -}; - -#endif //LL_CONVEX_DECOMPOSITION - diff --git a/indra/llprimitive/llphysicsextensions/llpathinglib.cpp b/indra/llprimitive/llphysicsextensions/llpathinglib.cpp deleted file mode 100644 index 1a6017c4b8..0000000000 --- a/indra/llprimitive/llphysicsextensions/llpathinglib.cpp +++ /dev/null @@ -1,110 +0,0 @@ -/** -* @file llpathinglib.cpp -* @author prep@lindenlab.com -* @brief LLPathingLib core creation methods -* -* $LicenseInfo:firstyear=2012&license=lgpl$ -* Second Life Viewer Source Code -* Copyright (C) 2011, Linden Research, Inc. -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU Lesser General Public -* License as published by the Free Software Foundation; -* version 2.1 of the License only. -* -* This library is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this library; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -* -* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA -* $/LicenseInfo$ -*/ - -#if defined(_WINDOWS) -# include "windowsincludes.h" -#endif - -#ifndef NULL -#define NULL 0 -#endif - - -#if !defined(LL_PATHING_LIB_STUB) -# include "LLPathingLibImpl.h" -#else -# include "LLPathingLibStubImpl.h" -#endif - -#include "llpathinglib.h" - -//disable the undefined symbol optimization -//#pragma warning (disable : 4221) - -//============================================================================= - -/*static */bool LLPathingLib::s_isInitialized = false; - -//============================================================================= - - -/*static*/bool LLPathingLib::isFunctional() -{ -#if !defined(LL_PATHING_LIB_STUB) - return true; -#else - return false; -#endif -} - -#if !defined(LL_PATHING_LIB_STUB) && defined(HK_COMPILER_CLANG) - //have to specialize before use so that generalized one not auto gen-d -HK_SINGLETON_SPECIALIZATION_DECL(LLPathingLibImpl); -#endif - -/*static*/LLPathingLib* LLPathingLib::getInstance() -{ - if ( !s_isInitialized ) - { - return NULL; - } - else - { -#if !defined(LL_PATHING_LIB_STUB) - return &hkSingleton::getInstance(); -#else - return LLPathingLibImpl::getInstance(); -#endif - } -} - -//============================================================================= - -/*static */LLPathingLib::LLPLResult LLPathingLib::initSystem() -{ - if ( LLPathingLibImpl::initSystem() == LLPL_OK ) - { - s_isInitialized = true; - return LLPL_OK; - } - return LLPL_UNKOWN_ERROR; -} -//============================================================================= -/*static */LLPathingLib::LLPLResult LLPathingLib::quitSystem() -{ - LLPLResult quitResult = LLPL_UNKOWN_ERROR; - - if (s_isInitialized) - { - quitResult = LLPathingLibImpl::quitSystem(); - s_isInitialized = false; - } - - return quitResult; -} -//============================================================================= - diff --git a/indra/llprimitive/llphysicsextensions/llpathinglib.h b/indra/llprimitive/llphysicsextensions/llpathinglib.h deleted file mode 100644 index c8c7410797..0000000000 --- a/indra/llprimitive/llphysicsextensions/llpathinglib.h +++ /dev/null @@ -1,187 +0,0 @@ -/** - * @file llpathinglib.cpp - * @author prep@lindenlab.com - * @brief LLPathingLib interface definition - * - * $LicenseInfo:firstyear=2012&license=lgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2011, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -#ifndef LL_PATHING_LIBRARY -#define LL_PATHING_LIBRARY - -#include "llpreprocessor.h" -#include "llsd.h" -#include "v3dmath.h" -#include "v4math.h" - -#include "v4color.h" -#include "v4coloru.h" -#include "llphysicsextensions.h" - -typedef int bool32; - -#if defined(_WIN32) || defined(_WIN64) -#define LLCD_CALL __cdecl -#else -#define LLCD_CALL -#endif - -class LLRender; - -//============================================================================= -class LLPathingLib -{ - -public: - enum LLShapeType - { - LLST_WalkableObjects = 0, - LLST_ObstacleObjects, - LLST_MaterialPhantoms, - LLST_ExclusionPhantoms, - LLST_MaxShapeTypes = LLST_ExclusionPhantoms+1, - LLST_None = LLST_MaxShapeTypes+2, - LLST_SimpleBox = LLST_None+1, - LLST_SimpleCapsule = LLST_SimpleBox+1, - }; - - enum LLShapeTypeFlag - { - LLSTB_WalkableObjects = 0x1 << 1, - LLSTB_ObstacleObjects = 0x1 << 2, - LLSTB_MaterialPhantoms = 0x1 << 3, - LLSTB_ExclusionPhantoms = 0x1 << 4, - LLSTB_None = 0x1 << 5 - }; - - enum LLPLPathBookEnd - { - LLPL_START = 0, - LLPL_END, - }; - - enum LLPLResult - { - LLPL_OK = 0, - LLPL_NOTSET, - LLPL_ERROR, - LLPL_NO_NAVMESH, - LLPL_UNKOWN_ERROR, - LLPL_NO_PATH, - LLPL_PATH_GENERATED_OK, - LLPL_NOT_IMPLEMENTED, - }; - - enum LLPLCharacterType - { - LLPL_CHARACTER_TYPE_A = 4, - LLPL_CHARACTER_TYPE_B = 3, - LLPL_CHARACTER_TYPE_C = 2, - LLPL_CHARACTER_TYPE_D = 1, - LLPL_CHARACTER_TYPE_NONE = 0 - }; - - struct PathingPacket - { - PathingPacket() : mHasPointA(false), mHasPointB(false), mCharacterWidth(0.0f), mCharacterType(LLPL_CHARACTER_TYPE_NONE) {} - bool mHasPointA; - LLVector3 mStartPointA; - LLVector3 mEndPointA; - bool mHasPointB; - LLVector3 mStartPointB; - LLVector3 mEndPointB; - F32 mCharacterWidth; - LLPLCharacterType mCharacterType; - }; - - struct NavMeshColors - { - LLColor4U mWalkable; - LLColor4U mObstacle; - LLColor4U mMaterial; - LLColor4U mExclusion; - LLColor4U mConnectedEdge; - LLColor4U mBoundaryEdge; - LLColor4 mHeatColorBase; - LLColor4 mHeatColorMax; - LLColor4U mFaceColor; - LLColor4U mStarValid; - LLColor4U mStarInvalid; - LLColor4U mTestPath; - LLColor4U mWaterColor; - }; - -public: - //Ctor - LLPathingLib() {} - virtual ~LLPathingLib() {} - - /// @returns false if this is the stub - static bool isFunctional(); - - // Obtain a pointer to the actual implementation - static LLPathingLib* getInstance(); - static LLPathingLib::LLPLResult initSystem(); - static LLPathingLib::LLPLResult quitSystem(); - - //Extract and store navmesh data from the llsd datablock sent down by the server - virtual LLPLResult extractNavMeshSrcFromLLSD( const LLSD::Binary& dataBlock, int dir ) = 0; - //Stitch any stored navmeshes together - virtual void processNavMeshData( ) = 0; - - //Method used to generate and visualize a path on the viewers navmesh - virtual LLPLResult generatePath( const PathingPacket& pathingPacket ) = 0; - - //Set the material type for the heatmap type - virtual void setNavMeshMaterialType( LLPLCharacterType materialType ) = 0; - //Set the various navmesh colors - virtual void setNavMeshColors( const NavMeshColors& color ) = 0; - - //The entry method to rendering the client side navmesh - virtual void renderNavMesh() = 0; - //The entry method to rendering the client side navmesh edges - virtual void renderNavMeshEdges() = 0; - //The entry method to render the client navmesh shapes VBO - virtual void renderNavMeshShapesVBO( U32 shapeRenderFlags ) = 0; - //The entry method to render the clients designated path - virtual void renderPath() = 0; - //The entry method to render the capsule bookends for the clients designated path - virtual void renderPathBookend( LLRender& gl, LLPathingLib::LLPLPathBookEnd type ) = 0; - //Renders all of the generated simple shapes (using their default transforms) - virtual void renderSimpleShapes( LLRender& gl, F32 regionsWaterHeight ) = 0; - - //Method called from second life to create a capsule from properties of a character - virtual void createPhysicsCapsuleRep( F32 length, F32 radius, BOOL horizontal, const LLUUID& id ) = 0; - //Removes any cached physics capsule using a list of cached uuids - virtual void cleanupPhysicsCapsuleRepResiduals() = 0; - //Renders a selected uuids physics rep - virtual void renderSimpleShapeCapsuleID( LLRender& gl, const LLUUID& id, const LLVector3& pos, const LLQuaternion& rot ) = 0; - - //Method to delete any vbo's that are currently being managed by the pathing library - virtual void cleanupVBOManager( ) = 0; - //Method to cleanup any allocations within the implementation - virtual void cleanupResidual( ) = 0; -private: - static bool s_isInitialized; -}; - -#endif //LL_PATHING_LIBRARY diff --git a/indra/llprimitive/llphysicsextensions/llphysicsextensions.cpp b/indra/llprimitive/llphysicsextensions/llphysicsextensions.cpp deleted file mode 100644 index 9bb4522a23..0000000000 --- a/indra/llprimitive/llphysicsextensions/llphysicsextensions.cpp +++ /dev/null @@ -1,103 +0,0 @@ -/** -* @file llphysicsextensions.cpp -* @author nyx@lindenlab.com -* @brief LLPhysicsExtensions core initialization methods -* -* $LicenseInfo:firstyear=2012&license=lgpl$ -* Second Life Viewer Source Code -* Copyright (C) 2011, Linden Research, Inc. -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU Lesser General Public -* License as published by the Free Software Foundation; -* version 2.1 of the License only. -* -* This library is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this library; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -* -* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA -* $/LicenseInfo$ -*/ - -#if defined(_WINDOWS) -# include "windowsincludes.h" -#endif - -#ifndef NULL -#define NULL 0 -#endif - - -#include "llphysicsextensions.h" - -#if !defined(LL_PHYSICS_EXTENSIONS_STUB) -# include "LLPhysicsExtensionsImpl.h" -#else -# include "LLPhysicsExtensionsStubImpl.h" -#endif - - -//disable the undefined symbol optimization -//#pragma warning (disable : 4221) - -//============================================================================= - -/*static */bool LLPhysicsExtensions::s_isInitialized = false; - - -/*static*/bool LLPhysicsExtensions::isFunctional() -{ -#if !defined(LL_PHYSICS_EXTENSIONS_STUB) - return true; -#else - return false; -#endif -} - -//============================================================================= - -#if !defined(LL_PHYSICS_EXTENSIONS_STUB) && defined(HK_COMPILER_CLANG) - //have to specialize before use so that generalized one not auto gen-d -HK_SINGLETON_SPECIALIZATION_DECL(LLPhysicsExtensionsImpl); -#endif - -/*static*/LLPhysicsExtensions* LLPhysicsExtensions::getInstance() -{ - if ( !s_isInitialized ) - { - return NULL; - } - else - { -#if !defined(LL_PHYSICS_EXTENSIONS_STUB) - return &hkSingleton::getInstance(); -#else - return LLPhysicsExtensionsImpl::getInstance(); -#endif - } -} - -//============================================================================= - -/*static */bool LLPhysicsExtensions::initSystem() -{ - bool result = LLPhysicsExtensionsImpl::initSystem(); - if ( result ) - { - s_isInitialized = true; - } - return result; -} -//============================================================================= -/*static */bool LLPhysicsExtensions::quitSystem() -{ - return LLPhysicsExtensionsImpl::quitSystem(); -} -//============================================================================= - diff --git a/indra/llprimitive/llphysicsextensions/llphysicsextensions.h b/indra/llprimitive/llphysicsextensions/llphysicsextensions.h deleted file mode 100644 index be479f5d8a..0000000000 --- a/indra/llprimitive/llphysicsextensions/llphysicsextensions.h +++ /dev/null @@ -1,59 +0,0 @@ -/** -* @file llphysicsextensions.h -* @author nyx@lindenlab.com -* @brief LLPhysicsExtensions core shared initialization -* routines -* -* $LicenseInfo:firstyear=2012&license=lgpl$ -* Second Life Viewer Source Code -* Copyright (C) 2011, Linden Research, Inc. -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU Lesser General Public -* License as published by the Free Software Foundation; -* version 2.1 of the License only. -* -* This library is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this library; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -* -* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA -* $/LicenseInfo$ -*/ - -#ifndef LL_PHYSICS_EXTENSIONS -#define LL_PHYSICS_EXTENSIONS - -#include "llpreprocessor.h" -#include "llsd.h" -#include "v3dmath.h" - -#define LLPHYSICSEXTENSIONS_VERSION "1.0" - -typedef int bool32; - -class LLPhysicsExtensions -{ - -public: - // Obtain a pointer to the actual implementation - static LLPhysicsExtensions* getInstance(); - - /// @returns false if this is the stub - static bool isFunctional(); - - static bool initSystem(); - static bool quitSystem(); - -private: - static bool s_isInitialized; -}; - -#endif //LL_PATHING_LIBRARY - - diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 92e8ce8371..307d83c148 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -57,7 +57,7 @@ if (ENABLE_MEDIA_PLUGINS) include(CEFPlugin) endif (ENABLE_MEDIA_PLUGINS) -if (NOT (USESYSTEMLIBS OR HAVOK_TPV)) +if (NOT HAVOK_TPV) # When using HAVOK_TPV, the library is precompiled, so no need for this # Stub and probably havok lib itself is a hack, autobuild loads a 3p that really is a source tarball @@ -78,7 +78,7 @@ if (NOT (USESYSTEMLIBS OR HAVOK_TPV)) target_compile_options( llphysicsextensions PRIVATE -Wno-unused-local-typedef) endif (DARWIN) endif() -endif (NOT (USESYSTEMLIBS OR HAVOK_TPV)) +endif (NOT HAVOK_TPV) set(viewer_SOURCE_FILES gltfscenemanager.cpp -- cgit v1.2.3 From 9c3ffdc77a27e57eb867a377e899ff89ab15edcd Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Tue, 22 Oct 2024 17:43:49 +0800 Subject: Dynamic Arch PKGBUILD values Set PACKAGE to ON. --- indra/newview/CMakeLists.txt | 5 +++++ indra/newview/PKGBUILD.in | 14 ++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 indra/newview/PKGBUILD.in (limited to 'indra') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 307d83c148..084d71aa24 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -2123,6 +2123,11 @@ if (LINUX) "libapr-util1-0, libboost_fiber1_85_0, libboost_program_options1_85_0, libboost_regex1_85_0, libboost_thread1_85_0, expat, libfltk1_3, libGLU1, libhunspell-1_7-0, libnghttp2-14, libSDL2-2_0-0, liburiparser1, libvlc5, vlc-codecs, libvorbis0" CACHE STRING "RPM package requirements.") endif (${LINUX_DISTRO} MATCHES fedora) + elseif (${LINUX_DISTRO} MATCHES arch) + configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/PKGBUILD.in + ${CMAKE_BINARY_DIR}/PKGBUILD + ) endif (${LINUX_DISTRO} MATCHES debian OR ${LINUX_DISTRO} MATCHES ubuntu) endif (PACKAGE) else (USESYSTEMLIBS) diff --git a/indra/newview/PKGBUILD.in b/indra/newview/PKGBUILD.in new file mode 100644 index 0000000000..b2a02318f2 --- /dev/null +++ b/indra/newview/PKGBUILD.in @@ -0,0 +1,14 @@ +# Maintainer: $ENV{USER}@${VIEWER_PACKAGE_DOMAIN_NAME} +pkgname=${VIEWER_BINARY_NAME} +pkgver=${VIEWER_VERSION_MAJOR}.${VIEWER_VERSION_MINOR}.${VIEWER_VERSION_PATCH}.${VIEWER_VERSION_REVISION} +pkgrel=1 +pkgdesc="${VIEWER_PACKAGE_COMMENT}" +arch=('${CMAKE_SYSTEM_PROCESSOR}') +url="https://${VIEWER_PACKAGE_DOMAIN_NAME}" +license=('LGPL-2.1') +depends=(freealut apr-util boost-libs fltk glu hunspell libnghttp2 sdl2 uriparser vlc libvorbis) + +package() { + cd "$startdir" + make DESTDIR="$pkgdir/" install +} -- cgit v1.2.3 From 47c33b4bd2acae02b0fc3a1dc68148e84962dae4 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Tue, 22 Oct 2024 19:21:07 +0800 Subject: Regex for matching physics extension stub's http --- indra/cmake/Prebuilt.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/cmake/Prebuilt.cmake b/indra/cmake/Prebuilt.cmake index 4034599fde..051435e7cb 100644 --- a/indra/cmake/Prebuilt.cmake +++ b/indra/cmake/Prebuilt.cmake @@ -61,7 +61,7 @@ macro (use_prebuilt_binary _binary) OUTPUT_STRIP_TRAILING_WHITESPACE ) endif ("${package_url}" STREQUAL "") - string(REGEX REPLACE "^https://(megapahit.net/downloads|github.com/secondlife|automated-builds-secondlife-com.s3.amazonaws.com/ct2).*/" "" package_name ${package_url}) + string(REGEX REPLACE "^https?://(megapahit.net/downloads|github.com/secondlife|automated-builds-secondlife-com.s3.amazonaws.com/ct2).*/" "" package_name ${package_url}) file(DOWNLOAD ${package_url} ${CMAKE_BINARY_DIR}/${package_name} -- cgit v1.2.3