From 6512d9f69d541b8f731a1b98198a7f8b0df07442 Mon Sep 17 00:00:00 2001 From: SignpostMarv Martin Date: Wed, 22 Dec 2010 19:41:59 +0000 Subject: Constraints in XUI files don't match the constraints imposed elsewhere in the viewer/server code. Don't know where the constraints are specified, but this XUI mod lets the user play within the full range of the actual constraints. --- indra/newview/skins/default/xui/en/floater_tools.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml index e70e1eb61b..f65082bd8c 100644 --- a/indra/newview/skins/default/xui/en/floater_tools.xml +++ b/indra/newview/skins/default/xui/en/floater_tools.xml @@ -1829,26 +1829,26 @@ even though the user gets a free copy. -- cgit v1.2.3 From d4d292258e31eee6d639106147758f39deae63e3 Mon Sep 17 00:00:00 2001 From: Ricky Curtice Date: Thu, 10 Mar 2011 22:07:06 -0800 Subject: Squared all dist_vec() based comparisons and other dist_vec() operations where sensible. Not all instances of dist_vec() were squared, only those where it wouldn't (hopefully) change the functionality. --- doc/contributions.txt | 1 + indra/llcharacter/llbvhloader.cpp | 6 +++--- indra/llmath/tests/llbbox_test.cpp | 2 +- indra/newview/llagent.cpp | 2 +- indra/newview/llfloaterchat.cpp | 5 +++-- indra/newview/llhudeffectlookat.cpp | 2 +- indra/newview/llhudeffectpointat.cpp | 2 +- indra/newview/llmaniprotate.cpp | 2 +- indra/newview/llmanipscale.cpp | 12 +++++------- indra/newview/llnetmap.cpp | 14 +++++++------- indra/newview/llpanelpeople.cpp | 4 ++-- indra/newview/llselectmgr.cpp | 8 +++++--- indra/newview/llspeakers.cpp | 2 +- indra/newview/llviewerchat.cpp | 10 ++++++---- indra/newview/llvoicevivox.cpp | 4 ++-- indra/newview/llworld.cpp | 6 ++++-- 16 files changed, 44 insertions(+), 38 deletions(-) diff --git a/doc/contributions.txt b/doc/contributions.txt index e94acb566a..9ba155eece 100644 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -237,6 +237,7 @@ Coaldust Numbers VWR-1095 Cron Stardust VWR-10579 + VWR-25126 Cypren Christenson STORM-417 Dale Glass diff --git a/indra/llcharacter/llbvhloader.cpp b/indra/llcharacter/llbvhloader.cpp index 532a2c1b0d..a340bab6d3 100644 --- a/indra/llcharacter/llbvhloader.cpp +++ b/indra/llcharacter/llbvhloader.cpp @@ -1196,7 +1196,7 @@ void LLBVHLoader::optimize() if (ki_prev == ki_last_good_pos) { joint->mNumPosKeys++; - if (dist_vec(LLVector3(ki_prev->mPos), first_frame_pos) > POSITION_MOTION_THRESHOLD) + if (dist_vec_squared(LLVector3(ki_prev->mPos), first_frame_pos) > POSITION_MOTION_THRESHOLD * POSITION_MOTION_THRESHOLD) { pos_changed = TRUE; } @@ -1209,12 +1209,12 @@ void LLBVHLoader::optimize() LLVector3 current_pos(ki->mPos); LLVector3 interp_pos = lerp(current_pos, last_good_pos, 1.f / (F32)numPosFramesConsidered); - if (dist_vec(current_pos, first_frame_pos) > POSITION_MOTION_THRESHOLD) + if (dist_vec_squared(current_pos, first_frame_pos) > POSITION_MOTION_THRESHOLD * POSITION_MOTION_THRESHOLD) { pos_changed = TRUE; } - if (dist_vec(interp_pos, test_pos) < POSITION_KEYFRAME_THRESHOLD) + if (dist_vec_squared(interp_pos, test_pos) < POSITION_KEYFRAME_THRESHOLD * POSITION_KEYFRAME_THRESHOLD) { ki_prev->mIgnorePos = TRUE; numPosFramesConsidered++; diff --git a/indra/llmath/tests/llbbox_test.cpp b/indra/llmath/tests/llbbox_test.cpp index 8064ab217d..b9e1d29cd7 100644 --- a/indra/llmath/tests/llbbox_test.cpp +++ b/indra/llmath/tests/llbbox_test.cpp @@ -34,7 +34,7 @@ #define ANGLE (3.14159265f / 2.0f) -#define APPROX_EQUAL(a, b) dist_vec((a),(b)) < 1e-5 +#define APPROX_EQUAL(a, b) dist_vec_squared((a),(b)) < 1e-10 namespace tut { diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 7d908df5ce..4628adee1f 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -1343,7 +1343,7 @@ void LLAgent::stopAutoPilot(BOOL user_cancel) //NB: auto pilot can terminate for a reason other than reaching the destination if (mAutoPilotFinishedCallback) { - mAutoPilotFinishedCallback(!user_cancel && dist_vec(gAgent.getPositionGlobal(), mAutoPilotTargetGlobal) < mAutoPilotStopDistance, mAutoPilotCallbackData); + mAutoPilotFinishedCallback(!user_cancel && dist_vec_squared(gAgent.getPositionGlobal(), mAutoPilotTargetGlobal) < mAutoPilotStopDistance * mAutoPilotStopDistance, mAutoPilotCallbackData); } mLeaderID = LLUUID::null; diff --git a/indra/newview/llfloaterchat.cpp b/indra/newview/llfloaterchat.cpp index c2c2e7fe22..2679dbb78b 100644 --- a/indra/newview/llfloaterchat.cpp +++ b/indra/newview/llfloaterchat.cpp @@ -413,8 +413,9 @@ LLColor4 get_text_color(const LLChat& chat) if (!chat.mPosAgent.isExactlyZero()) { LLVector3 pos_agent = gAgent.getPositionAgent(); - F32 distance = dist_vec(pos_agent, chat.mPosAgent); - if (distance > gAgent.getNearChatRadius()) + F32 distance_squared = dist_vec_squared(pos_agent, chat.mPosAgent); + F32 dist_near_chat = gAgent.getNearChatRadius(); + if (distance_squared > dist_near_chat * dist_near_chat) { // diminish far-off chat text_color.mV[VALPHA] = 0.8f; diff --git a/indra/newview/llhudeffectlookat.cpp b/indra/newview/llhudeffectlookat.cpp index 8cf7d23f88..10ee6f1d39 100644 --- a/indra/newview/llhudeffectlookat.cpp +++ b/indra/newview/llhudeffectlookat.cpp @@ -416,7 +416,7 @@ BOOL LLHUDEffectLookAt::setLookAt(ELookAtType target_type, LLViewerObject *objec BOOL lookAtChanged = (target_type != mTargetType) || (object != mTargetObject); // lookat position has moved a certain amount and we haven't just sent an update - lookAtChanged = lookAtChanged || ((dist_vec(position, mLastSentOffsetGlobal) > MIN_DELTAPOS_FOR_UPDATE) && + lookAtChanged = lookAtChanged || ((dist_vec_squared(position, mLastSentOffsetGlobal) > MIN_DELTAPOS_FOR_UPDATE * MIN_DELTAPOS_FOR_UPDATE) && ((current_time - mLastSendTime) > (1.f / MAX_SENDS_PER_SEC))); if (lookAtChanged) diff --git a/indra/newview/llhudeffectpointat.cpp b/indra/newview/llhudeffectpointat.cpp index bfb0f150b3..562d7cd4ed 100644 --- a/indra/newview/llhudeffectpointat.cpp +++ b/indra/newview/llhudeffectpointat.cpp @@ -244,7 +244,7 @@ BOOL LLHUDEffectPointAt::setPointAt(EPointAtType target_type, LLViewerObject *ob BOOL targetTypeChanged = (target_type != mTargetType) || (object != mTargetObject); - BOOL targetPosChanged = (dist_vec(position, mLastSentOffsetGlobal) > MIN_DELTAPOS_FOR_UPDATE) && + BOOL targetPosChanged = (dist_vec_squared(position, mLastSentOffsetGlobal) > MIN_DELTAPOS_FOR_UPDATE * MIN_DELTAPOS_FOR_UPDATE) && ((current_time - mLastSendTime) > (1.f / MAX_SENDS_PER_SEC)); if (targetTypeChanged || targetPosChanged) diff --git a/indra/newview/llmaniprotate.cpp b/indra/newview/llmaniprotate.cpp index f1c7e952d1..815b718f33 100644 --- a/indra/newview/llmaniprotate.cpp +++ b/indra/newview/llmaniprotate.cpp @@ -1127,7 +1127,7 @@ BOOL LLManipRotate::updateVisiblity() if (gSavedSettings.getBOOL("LimitSelectDistance")) { F32 max_select_distance = gSavedSettings.getF32("MaxSelectDistance"); - if (dist_vec(gAgent.getPositionAgent(), center) > max_select_distance) + if (dist_vec_squared(gAgent.getPositionAgent(), center) > max_select_distance * max_select_distance) { visible = FALSE; } diff --git a/indra/newview/llmanipscale.cpp b/indra/newview/llmanipscale.cpp index 060677f9f3..4f8e7e4792 100644 --- a/indra/newview/llmanipscale.cpp +++ b/indra/newview/llmanipscale.cpp @@ -217,8 +217,6 @@ void LLManipScale::render() LLVector3 center_agent = gAgent.getPosAgentFromGlobal(LLSelectMgr::getInstance()->getSelectionCenterGlobal()); - F32 range; - F32 range_from_agent; if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD) { mBoxHandleSize = BOX_HANDLE_BASE_SIZE * BOX_HANDLE_BASE_FACTOR / (F32) LLViewerCamera::getInstance()->getViewHeightInPixels(); @@ -226,25 +224,25 @@ void LLManipScale::render() } else { - range = dist_vec(gAgentCamera.getCameraPositionAgent(), center_agent); - range_from_agent = dist_vec(gAgent.getPositionAgent(), center_agent); + F32 range_squared = dist_vec_squared(gAgentCamera.getCameraPositionAgent(), center_agent); + F32 range_from_agent_squared = dist_vec_squared(gAgent.getPositionAgent(), center_agent); // Don't draw manip if object too far away if (gSavedSettings.getBOOL("LimitSelectDistance")) { F32 max_select_distance = gSavedSettings.getF32("MaxSelectDistance"); - if (range_from_agent > max_select_distance) + if (range_from_agent_squared > max_select_distance * max_select_distance) { return; } } - if (range > 0.001f) + if (range_squared > 0.00001f) { // range != zero F32 fraction_of_fov = BOX_HANDLE_BASE_SIZE / (F32) LLViewerCamera::getInstance()->getViewHeightInPixels(); F32 apparent_angle = fraction_of_fov * LLViewerCamera::getInstance()->getView(); // radians - mBoxHandleSize = range * tan(apparent_angle) * BOX_HANDLE_BASE_FACTOR; + mBoxHandleSize = fsqrtf(range_squared) * tan(apparent_angle) * BOX_HANDLE_BASE_FACTOR; } else { diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index 93039d935d..394e0bf1f1 100644 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -334,8 +334,8 @@ void LLNetMap::draw() //localMouse(&local_mouse_x, &local_mouse_y); LLUI::getMousePositionLocal(this, &local_mouse_x, &local_mouse_y); mClosestAgentToCursor.setNull(); - F32 closest_dist = F32_MAX; - F32 min_pick_dist = mDotRadius * MIN_PICK_SCALE; + F32 closest_dist_squared = F32_MAX; + F32 min_pick_dist_squared = (mDotRadius * MIN_PICK_SCALE) * (mDotRadius * MIN_PICK_SCALE); // Draw avatars for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin(); @@ -414,11 +414,11 @@ void LLNetMap::draw() } } - F32 dist_to_cursor = dist_vec(LLVector2(pos_map.mV[VX], pos_map.mV[VY]), + F32 dist_to_cursor_squared = dist_vec_squared(LLVector2(pos_map.mV[VX], pos_map.mV[VY]), LLVector2(local_mouse_x,local_mouse_y)); - if(dist_to_cursor < min_pick_dist && dist_to_cursor < closest_dist) + if(dist_to_cursor_squared < min_pick_dist_squared && dist_to_cursor_squared < closest_dist_squared) { - closest_dist = dist_to_cursor; + closest_dist_squared = dist_to_cursor_squared; mClosestAgentToCursor = regionp->mMapAvatarIDs.get(i); } } @@ -455,9 +455,9 @@ void LLNetMap::draw() dot_width, dot_width); - F32 dist_to_cursor = dist_vec(LLVector2(pos_map.mV[VX], pos_map.mV[VY]), + F32 dist_to_cursor_squared = dist_vec_squared(LLVector2(pos_map.mV[VX], pos_map.mV[VY]), LLVector2(local_mouse_x,local_mouse_y)); - if(dist_to_cursor < min_pick_dist && dist_to_cursor < closest_dist) + if(dist_to_cursor_squared < min_pick_dist_squared && dist_to_cursor_squared < closest_dist_squared) { mClosestAgentToCursor = gAgent.getID(); } diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index b52f33ec3b..dbfdf0bdf6 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -158,8 +158,8 @@ protected: const LLVector3d& me_pos = gAgent.getPositionGlobal(); const LLVector3d& item1_pos = mAvatarsPositions.find(item1->getAvatarId())->second; const LLVector3d& item2_pos = mAvatarsPositions.find(item2->getAvatarId())->second; - F32 dist1 = dist_vec(item1_pos, me_pos); - F32 dist2 = dist_vec(item2_pos, me_pos); + F32 dist1 = dist_vec_squared(item1_pos, me_pos); + F32 dist2 = dist_vec_squared(item2_pos, me_pos); return dist1 < dist2; } private: diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 50bc0b4a98..39f3cd4196 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -6577,12 +6577,14 @@ bool LLSelectMgr::selectionMove(const LLVector3& displ, { obj_pos = (*it)->getObject()->getPositionEdit(); - F32 obj_dist = dist_vec(obj_pos, LLViewerCamera::getInstance()->getOrigin()); - if (obj_dist < min_dist) + F32 obj_dist_squared = dist_vec_squared(obj_pos, LLViewerCamera::getInstance()->getOrigin()); + if (obj_dist_squared < min_dist) { - min_dist = obj_dist; + min_dist = obj_dist_squared; } } + // since the above uses squared values, take the square root. + min_dist = sqrt(min_dist); // factor the distance inside the displacement vector. This will get us // equally visible movements for both close and far away selections. diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index 40aea05839..31492e33d9 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -920,7 +920,7 @@ void LLLocalSpeakerMgr::updateSpeakerList() if (speakerp->mStatus == LLSpeaker::STATUS_TEXT_ONLY) { LLVOAvatar* avatarp = (LLVOAvatar*)gObjectList.findObject(speaker_id); - if (!avatarp || dist_vec(avatarp->getPositionAgent(), gAgent.getPositionAgent()) > CHAT_NORMAL_RADIUS) + if (!avatarp || dist_vec_squared(avatarp->getPositionAgent(), gAgent.getPositionAgent()) > CHAT_NORMAL_RADIUS * CHAT_NORMAL_RADIUS) { setSpeakerNotInChannel(speakerp); } diff --git a/indra/newview/llviewerchat.cpp b/indra/newview/llviewerchat.cpp index 0af850a46b..7cce2831c9 100644 --- a/indra/newview/llviewerchat.cpp +++ b/indra/newview/llviewerchat.cpp @@ -87,8 +87,9 @@ void LLViewerChat::getChatColor(const LLChat& chat, LLColor4& r_color) if (!chat.mPosAgent.isExactlyZero()) { LLVector3 pos_agent = gAgent.getPositionAgent(); - F32 distance = dist_vec(pos_agent, chat.mPosAgent); - if (distance > gAgent.getNearChatRadius()) + F32 distance_squared = dist_vec_squared(pos_agent, chat.mPosAgent); + F32 dist_near_chat = gAgent.getNearChatRadius(); + if (distance_squared > dist_near_chat * dist_near_chat) { // diminish far-off chat r_color.mV[VALPHA] = 0.8f; @@ -152,8 +153,9 @@ void LLViewerChat::getChatColor(const LLChat& chat, std::string& r_color_name, F if (!chat.mPosAgent.isExactlyZero()) { LLVector3 pos_agent = gAgent.getPositionAgent(); - F32 distance = dist_vec(pos_agent, chat.mPosAgent); - if (distance > gAgent.getNearChatRadius()) + F32 distance_squared = dist_vec_squared(pos_agent, chat.mPosAgent); + F32 dist_near_chat = gAgent.getNearChatRadius(); + if (distance_squared > dist_near_chat * dist_near_chat) { // diminish far-off chat r_color_alpha = 0.8f; diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 08e242af8e..08581be38b 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -5088,7 +5088,7 @@ void LLVivoxVoiceClient::enforceTether(void) } } - if(dist_vec(mCameraPosition, tethered) > 0.1) + if(dist_vec_squared(mCameraPosition, tethered) > 0.01) { mCameraPosition = tethered; mSpatialCoordsDirty = true; @@ -5150,7 +5150,7 @@ void LLVivoxVoiceClient::setCameraPosition(const LLVector3d &position, const LLV void LLVivoxVoiceClient::setAvatarPosition(const LLVector3d &position, const LLVector3 &velocity, const LLMatrix3 &rot) { - if(dist_vec(mAvatarPosition, position) > 0.1) + if(dist_vec_squared(mAvatarPosition, position) > 0.01) { mAvatarPosition = position; mSpatialCoordsDirty = true; diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 8f7197c607..a21a7eac9e 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -1446,6 +1446,8 @@ static LLVector3d unpackLocalToGlobalPosition(U32 compact_local, const LLVector3 void LLWorld::getAvatars(uuid_vec_t* avatar_ids, std::vector* positions, const LLVector3d& relative_to, F32 radius) const { + F32 radius_squared = radius * radius; + if(avatar_ids != NULL) { avatar_ids->clear(); @@ -1463,7 +1465,7 @@ void LLWorld::getAvatars(uuid_vec_t* avatar_ids, std::vector* positi for (S32 i = 0; i < count; i++) { LLVector3d pos_global = unpackLocalToGlobalPosition(regionp->mMapAvatars.get(i), origin_global); - if(dist_vec(pos_global, relative_to) <= radius) + if(dist_vec_squared(pos_global, relative_to) <= radius_squared) { if(positions != NULL) { @@ -1491,7 +1493,7 @@ void LLWorld::getAvatars(uuid_vec_t* avatar_ids, std::vector* positi if(uuid.isNull()) continue; LLVector3d pos_global = pVOAvatar->getPositionGlobal(); - if(dist_vec(pos_global, relative_to) <= radius) + if(dist_vec_squared(pos_global, relative_to) <= radius_squared) { bool found = false; uuid_vec_t::iterator sel_iter = avatar_ids->begin(); -- cgit v1.2.3 From 9bac314ba0d8b6bd35c8d2e27ce99a28b924dea6 Mon Sep 17 00:00:00 2001 From: Ricky Curtice Date: Sat, 12 Mar 2011 23:39:10 -0800 Subject: Switched to using *_SQUARED constants instead of multiplied constants, and cleaned up a few other minor issues noted during review. --- indra/llcharacter/llbvhloader.cpp | 10 +++++----- indra/llcommon/indra_constants.h | 8 ++++++++ indra/newview/llagent.cpp | 2 +- indra/newview/llhudeffectlookat.cpp | 4 ++-- indra/newview/llhudeffectpointat.cpp | 4 ++-- indra/newview/llmaniprotate.cpp | 2 +- indra/newview/llmanipscale.cpp | 2 +- indra/newview/llnetmap.cpp | 2 +- indra/newview/llpanelpeople.cpp | 5 ++--- indra/newview/llselectmgr.cpp | 21 ++++++++++++--------- indra/newview/llspeakers.cpp | 2 +- indra/newview/llviewermessage.cpp | 3 ++- indra/newview/llviewerparceloverlay.cpp | 4 ++-- 13 files changed, 40 insertions(+), 29 deletions(-) diff --git a/indra/llcharacter/llbvhloader.cpp b/indra/llcharacter/llbvhloader.cpp index a340bab6d3..f3cf950afa 100644 --- a/indra/llcharacter/llbvhloader.cpp +++ b/indra/llcharacter/llbvhloader.cpp @@ -42,10 +42,10 @@ using namespace std; #define INCHES_TO_METERS 0.02540005f -const F32 POSITION_KEYFRAME_THRESHOLD = 0.03f; +const F32 POSITION_KEYFRAME_THRESHOLD_SQUARED = 0.03f * 0.03f; const F32 ROTATION_KEYFRAME_THRESHOLD = 0.01f; -const F32 POSITION_MOTION_THRESHOLD = 0.001f; +const F32 POSITION_MOTION_THRESHOLD_SQUARED = 0.001f * 0.001f; const F32 ROTATION_MOTION_THRESHOLD = 0.001f; char gInFile[1024]; /* Flawfinder: ignore */ @@ -1196,7 +1196,7 @@ void LLBVHLoader::optimize() if (ki_prev == ki_last_good_pos) { joint->mNumPosKeys++; - if (dist_vec_squared(LLVector3(ki_prev->mPos), first_frame_pos) > POSITION_MOTION_THRESHOLD * POSITION_MOTION_THRESHOLD) + if (dist_vec_squared(LLVector3(ki_prev->mPos), first_frame_pos) > POSITION_MOTION_THRESHOLD_SQUARED) { pos_changed = TRUE; } @@ -1209,12 +1209,12 @@ void LLBVHLoader::optimize() LLVector3 current_pos(ki->mPos); LLVector3 interp_pos = lerp(current_pos, last_good_pos, 1.f / (F32)numPosFramesConsidered); - if (dist_vec_squared(current_pos, first_frame_pos) > POSITION_MOTION_THRESHOLD * POSITION_MOTION_THRESHOLD) + if (dist_vec_squared(current_pos, first_frame_pos) > POSITION_MOTION_THRESHOLD_SQUARED) { pos_changed = TRUE; } - if (dist_vec_squared(interp_pos, test_pos) < POSITION_KEYFRAME_THRESHOLD * POSITION_KEYFRAME_THRESHOLD) + if (dist_vec_squared(interp_pos, test_pos) < POSITION_KEYFRAME_THRESHOLD_SQUARED) { ki_prev->mIgnorePos = TRUE; numPosFramesConsidered++; diff --git a/indra/llcommon/indra_constants.h b/indra/llcommon/indra_constants.h index 95cb606240..d0f287657e 100644 --- a/indra/llcommon/indra_constants.h +++ b/indra/llcommon/indra_constants.h @@ -312,6 +312,14 @@ const F32 CHAT_SHOUT_RADIUS = 100.f; const F32 CHAT_MAX_RADIUS = CHAT_SHOUT_RADIUS; const F32 CHAT_MAX_RADIUS_BY_TWO = CHAT_MAX_RADIUS / 2.f; +// squared editions of the above for distance checks +const F32 CHAT_WHISPER_RADIUS_SQUARED = CHAT_WHISPER_RADIUS * CHAT_WHISPER_RADIUS; +const F32 CHAT_NORMAL_RADIUS_SQUARED = CHAT_NORMAL_RADIUS * CHAT_NORMAL_RADIUS; +const F32 CHAT_SHOUT_RADIUS_SQUARED = CHAT_SHOUT_RADIUS * CHAT_SHOUT_RADIUS; +const F32 CHAT_MAX_RADIUS_SQUARED = CHAT_SHOUT_RADIUS_SQUARED; +const F32 CHAT_MAX_RADIUS_BY_TWO_SQUARED = CHAT_MAX_RADIUS_BY_TWO * CHAT_MAX_RADIUS_BY_TWO; + + // this times above gives barely audible radius const F32 CHAT_BARELY_AUDIBLE_FACTOR = 2.0f; diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 4628adee1f..f3f036a0d8 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -1343,7 +1343,7 @@ void LLAgent::stopAutoPilot(BOOL user_cancel) //NB: auto pilot can terminate for a reason other than reaching the destination if (mAutoPilotFinishedCallback) { - mAutoPilotFinishedCallback(!user_cancel && dist_vec_squared(gAgent.getPositionGlobal(), mAutoPilotTargetGlobal) < mAutoPilotStopDistance * mAutoPilotStopDistance, mAutoPilotCallbackData); + mAutoPilotFinishedCallback(!user_cancel && dist_vec_squared(gAgent.getPositionGlobal(), mAutoPilotTargetGlobal) < (mAutoPilotStopDistance * mAutoPilotStopDistance), mAutoPilotCallbackData); } mLeaderID = LLUUID::null; diff --git a/indra/newview/llhudeffectlookat.cpp b/indra/newview/llhudeffectlookat.cpp index 10ee6f1d39..882c0cf2e2 100644 --- a/indra/newview/llhudeffectlookat.cpp +++ b/indra/newview/llhudeffectlookat.cpp @@ -56,7 +56,7 @@ const S32 PKT_SIZE = 57; // throttle const F32 MAX_SENDS_PER_SEC = 4.f; -const F32 MIN_DELTAPOS_FOR_UPDATE = 0.05f; +const F32 MIN_DELTAPOS_FOR_UPDATE_SQUARED = 0.05f * 0.05f; const F32 MIN_TARGET_OFFSET_SQUARED = 0.0001f; @@ -416,7 +416,7 @@ BOOL LLHUDEffectLookAt::setLookAt(ELookAtType target_type, LLViewerObject *objec BOOL lookAtChanged = (target_type != mTargetType) || (object != mTargetObject); // lookat position has moved a certain amount and we haven't just sent an update - lookAtChanged = lookAtChanged || ((dist_vec_squared(position, mLastSentOffsetGlobal) > MIN_DELTAPOS_FOR_UPDATE * MIN_DELTAPOS_FOR_UPDATE) && + lookAtChanged = lookAtChanged || ((dist_vec_squared(position, mLastSentOffsetGlobal) > MIN_DELTAPOS_FOR_UPDATE_SQUARED) && ((current_time - mLastSendTime) > (1.f / MAX_SENDS_PER_SEC))); if (lookAtChanged) diff --git a/indra/newview/llhudeffectpointat.cpp b/indra/newview/llhudeffectpointat.cpp index 562d7cd4ed..28fe8e1c01 100644 --- a/indra/newview/llhudeffectpointat.cpp +++ b/indra/newview/llhudeffectpointat.cpp @@ -48,7 +48,7 @@ const S32 PKT_SIZE = 57; // throttle const F32 MAX_SENDS_PER_SEC = 4.f; -const F32 MIN_DELTAPOS_FOR_UPDATE = 0.05f; +const F32 MIN_DELTAPOS_FOR_UPDATE_SQUARED = 0.05f * 0.05f; // timeouts // can't use actual F32_MAX, because we add this to the current frametime @@ -244,7 +244,7 @@ BOOL LLHUDEffectPointAt::setPointAt(EPointAtType target_type, LLViewerObject *ob BOOL targetTypeChanged = (target_type != mTargetType) || (object != mTargetObject); - BOOL targetPosChanged = (dist_vec_squared(position, mLastSentOffsetGlobal) > MIN_DELTAPOS_FOR_UPDATE * MIN_DELTAPOS_FOR_UPDATE) && + BOOL targetPosChanged = (dist_vec_squared(position, mLastSentOffsetGlobal) > MIN_DELTAPOS_FOR_UPDATE_SQUARED) && ((current_time - mLastSendTime) > (1.f / MAX_SENDS_PER_SEC)); if (targetTypeChanged || targetPosChanged) diff --git a/indra/newview/llmaniprotate.cpp b/indra/newview/llmaniprotate.cpp index 815b718f33..6ee095475f 100644 --- a/indra/newview/llmaniprotate.cpp +++ b/indra/newview/llmaniprotate.cpp @@ -1127,7 +1127,7 @@ BOOL LLManipRotate::updateVisiblity() if (gSavedSettings.getBOOL("LimitSelectDistance")) { F32 max_select_distance = gSavedSettings.getF32("MaxSelectDistance"); - if (dist_vec_squared(gAgent.getPositionAgent(), center) > max_select_distance * max_select_distance) + if (dist_vec_squared(gAgent.getPositionAgent(), center) > (max_select_distance * max_select_distance)) { visible = FALSE; } diff --git a/indra/newview/llmanipscale.cpp b/indra/newview/llmanipscale.cpp index 4f8e7e4792..9cdc092257 100644 --- a/indra/newview/llmanipscale.cpp +++ b/indra/newview/llmanipscale.cpp @@ -237,7 +237,7 @@ void LLManipScale::render() } } - if (range_squared > 0.00001f) + if (range_squared > 0.001f * 0.001f) { // range != zero F32 fraction_of_fov = BOX_HANDLE_BASE_SIZE / (F32) LLViewerCamera::getInstance()->getViewHeightInPixels(); diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index 394e0bf1f1..bd4f152ded 100644 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -334,7 +334,7 @@ void LLNetMap::draw() //localMouse(&local_mouse_x, &local_mouse_y); LLUI::getMousePositionLocal(this, &local_mouse_x, &local_mouse_y); mClosestAgentToCursor.setNull(); - F32 closest_dist_squared = F32_MAX; + F32 closest_dist_squared = F32_MAX; // value will be overridden in the loop F32 min_pick_dist_squared = (mDotRadius * MIN_PICK_SCALE) * (mDotRadius * MIN_PICK_SCALE); // Draw avatars diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index dbfdf0bdf6..e3a7b749ea 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -158,9 +158,8 @@ protected: const LLVector3d& me_pos = gAgent.getPositionGlobal(); const LLVector3d& item1_pos = mAvatarsPositions.find(item1->getAvatarId())->second; const LLVector3d& item2_pos = mAvatarsPositions.find(item2->getAvatarId())->second; - F32 dist1 = dist_vec_squared(item1_pos, me_pos); - F32 dist2 = dist_vec_squared(item2_pos, me_pos); - return dist1 < dist2; + + return dist_vec_squared(item1_pos, me_pos) < dist_vec_squared(item2_pos, me_pos); } private: id_to_pos_map_t mAvatarsPositions; diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 39f3cd4196..262c9a4515 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -6570,7 +6570,8 @@ bool LLSelectMgr::selectionMove(const LLVector3& displ, if (update_position) { // calculate the distance of the object closest to the camera origin - F32 min_dist = 1e+30f; + F32 min_dist_squared = F32_MAX; // value will be overridden in the loop + LLVector3 obj_pos; for (LLObjectSelection::root_iterator it = getSelection()->root_begin(); it != getSelection()->root_end(); ++it) @@ -6578,20 +6579,22 @@ bool LLSelectMgr::selectionMove(const LLVector3& displ, obj_pos = (*it)->getObject()->getPositionEdit(); F32 obj_dist_squared = dist_vec_squared(obj_pos, LLViewerCamera::getInstance()->getOrigin()); - if (obj_dist_squared < min_dist) + if (obj_dist_squared < min_dist_squared) { - min_dist = obj_dist_squared; + min_dist_squared = obj_dist_squared; } } - // since the above uses squared values, take the square root. - min_dist = sqrt(min_dist); + + // get the non-squared edition for use below + // note the use of fsqrtf, this was used in the definition of dist_vec() and is therefore re-used here + F32 min_dist = fsqrtf(min_dist_squared); // factor the distance inside the displacement vector. This will get us // equally visible movements for both close and far away selections. - min_dist = sqrt(min_dist) / 2; - displ_global.setVec(displ.mV[0]*min_dist, - displ.mV[1]*min_dist, - displ.mV[2]*min_dist); + F32 min_dist_factored = sqrt(min_dist) / 2; + displ_global.setVec(displ.mV[0]*min_dist_factored, + displ.mV[1]*min_dist_factored, + displ.mV[2]*min_dist_factored); // equates to: Displ_global = Displ * M_cam_axes_in_global_frame displ_global = LLViewerCamera::getInstance()->rotateToAbsolute(displ_global); diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index 31492e33d9..c588bd8fb4 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -920,7 +920,7 @@ void LLLocalSpeakerMgr::updateSpeakerList() if (speakerp->mStatus == LLSpeaker::STATUS_TEXT_ONLY) { LLVOAvatar* avatarp = (LLVOAvatar*)gObjectList.findObject(speaker_id); - if (!avatarp || dist_vec_squared(avatarp->getPositionAgent(), gAgent.getPositionAgent()) > CHAT_NORMAL_RADIUS * CHAT_NORMAL_RADIUS) + if (!avatarp || dist_vec_squared(avatarp->getPositionAgent(), gAgent.getPositionAgent()) > CHAT_NORMAL_RADIUS_SQUARED) { setSpeakerNotInChannel(speakerp); } diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 947408f125..4dd5a3f6f1 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -122,6 +122,7 @@ // const F32 BIRD_AUDIBLE_RADIUS = 32.0f; const F32 SIT_DISTANCE_FROM_TARGET = 0.25f; +const F32 CAMERA_POSITION_THRESHOLD_SQUARED = 0.001f * 0.001f; static const F32 LOGOUT_REPLY_TIME = 3.f; // Wait this long after LogoutReply before quitting. // Determine how quickly residents' scripts can issue question dialogs @@ -4748,7 +4749,7 @@ void process_avatar_sit_response(LLMessageSystem *mesgsys, void **user_data) BOOL force_mouselook; mesgsys->getBOOLFast(_PREHASH_SitTransform, _PREHASH_ForceMouselook, force_mouselook); - if (isAgentAvatarValid() && dist_vec_squared(camera_eye, camera_at) > 0.0001f) + if (isAgentAvatarValid() && dist_vec_squared(camera_eye, camera_at) > CAMERA_POSITION_THRESHOLD_SQUARED) { gAgentCamera.setSitCamera(sitObjectID, camera_eye, camera_at); } diff --git a/indra/newview/llviewerparceloverlay.cpp b/indra/newview/llviewerparceloverlay.cpp index d07e06f6a7..26765bdd01 100644 --- a/indra/newview/llviewerparceloverlay.cpp +++ b/indra/newview/llviewerparceloverlay.cpp @@ -833,7 +833,7 @@ S32 LLViewerParcelOverlay::renderPropertyLines () U8* colorp; bool render_hidden = LLSelectMgr::sRenderHiddenSelections && LLFloaterReg::instanceVisible("build"); - const F32 PROPERTY_LINE_CLIP_DIST = 256.f; + const F32 PROPERTY_LINE_CLIP_DIST_SQUARED = 256.f * 256.f; for (i = 0; i < mVertexCount; i += vertex_per_edge) { @@ -844,7 +844,7 @@ S32 LLViewerParcelOverlay::renderPropertyLines () vertex.mV[VY] = *(vertexp+1); vertex.mV[VZ] = *(vertexp+2); - if (dist_vec_squared2D(vertex, camera_region) > PROPERTY_LINE_CLIP_DIST*PROPERTY_LINE_CLIP_DIST) + if (dist_vec_squared2D(vertex, camera_region) > PROPERTY_LINE_CLIP_DIST_SQUARED) { continue; } -- cgit v1.2.3 From ca186a64014942540baaf280bb3967d2582336bd Mon Sep 17 00:00:00 2001 From: Ricky Curtice Date: Mon, 4 Apr 2011 10:24:43 -0700 Subject: Parenthisized a #define to make it safer, adjusted some notes (and added a TODO) around some extremely obscure code that needs further attention but which is outside this scope. --- doc/contributions.txt | 2 +- indra/llmath/tests/llbbox_test.cpp | 2 +- indra/newview/llselectmgr.cpp | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/contributions.txt b/doc/contributions.txt index 9ba155eece..ae10957b24 100644 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -237,7 +237,7 @@ Coaldust Numbers VWR-1095 Cron Stardust VWR-10579 - VWR-25126 + STORM-1075 Cypren Christenson STORM-417 Dale Glass diff --git a/indra/llmath/tests/llbbox_test.cpp b/indra/llmath/tests/llbbox_test.cpp index b9e1d29cd7..fd0dbb58fc 100644 --- a/indra/llmath/tests/llbbox_test.cpp +++ b/indra/llmath/tests/llbbox_test.cpp @@ -34,7 +34,7 @@ #define ANGLE (3.14159265f / 2.0f) -#define APPROX_EQUAL(a, b) dist_vec_squared((a),(b)) < 1e-10 +#define APPROX_EQUAL(a, b) (dist_vec_squared((a),(b)) < 1e-10) namespace tut { diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 262c9a4515..2c5073d027 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -6589,11 +6589,11 @@ bool LLSelectMgr::selectionMove(const LLVector3& displ, // note the use of fsqrtf, this was used in the definition of dist_vec() and is therefore re-used here F32 min_dist = fsqrtf(min_dist_squared); - // factor the distance inside the displacement vector. This will get us + // factor the distance into the displacement vector. This will get us // equally visible movements for both close and far away selections. - F32 min_dist_factored = sqrt(min_dist) / 2; - displ_global.setVec(displ.mV[0]*min_dist_factored, - displ.mV[1]*min_dist_factored, + F32 min_dist_factored = sqrt(min_dist) / 2; // FIXME: this variable name doesn't state its true meaning. + displ_global.setVec(displ.mV[0]*min_dist_factored, + displ.mV[1]*min_dist_factored, displ.mV[2]*min_dist_factored); // equates to: Displ_global = Displ * M_cam_axes_in_global_frame -- cgit v1.2.3 From e32d1cf7564dd38664781ea7360fa8daa132961c Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Tue, 5 Apr 2011 15:28:18 -0600 Subject: fix for STORM-973: [crashhunters] crash at LLViewerTextureList::removeImageFromList(LLViewerFetchedTexture *) --- indra/newview/lldrawpoolbump.cpp | 5 +++++ indra/newview/llviewertexturelist.cpp | 36 ++++++++++++++++++++++++----------- indra/newview/llviewertexturelist.h | 9 +++++++-- 3 files changed, 37 insertions(+), 13 deletions(-) diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp index 223e4a438c..c987847c66 100644 --- a/indra/newview/lldrawpoolbump.cpp +++ b/indra/newview/lldrawpoolbump.cpp @@ -853,6 +853,11 @@ void LLBumpImageList::destroyGL() void LLBumpImageList::restoreGL() { + if(!gTextureList.isInitialized()) + { + return ; + } + LLStandardBumpmap::restoreGL(); // Images will be recreated as they are needed. } diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 10126219f8..f32d563dc1 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -76,18 +76,23 @@ LLStat LLViewerTextureList::sFormattedMemStat(32, TRUE); LLViewerTextureList gTextureList; static LLFastTimer::DeclareTimer FTM_PROCESS_IMAGES("Process Images"); +U32 LLViewerTextureList::sRenderThreadID = 0 ; /////////////////////////////////////////////////////////////////////////////// LLViewerTextureList::LLViewerTextureList() : mForceResetTextureStats(FALSE), mUpdateStats(FALSE), mMaxResidentTexMemInMegaBytes(0), - mMaxTotalTextureMemInMegaBytes(0) + mMaxTotalTextureMemInMegaBytes(0), + mInitialized(FALSE) { } void LLViewerTextureList::init() { + sRenderThreadID = LLThread::currentID() ; + + mInitialized = TRUE ; sNumImages = 0; mMaxResidentTexMemInMegaBytes = 0; mMaxTotalTextureMemInMegaBytes = 0 ; @@ -110,6 +115,10 @@ void LLViewerTextureList::doPreloadImages() { LL_DEBUGS("ViewerImages") << "Preloading images..." << LL_ENDL; + llassert_always(mInitialized) ; + llassert_always(mImageList.empty()) ; + llassert_always(mUUIDMap.empty()) ; + // Set the "missing asset" image LLViewerFetchedTexture::sMissingAssetImagep = LLViewerTextureManager::getFetchedTextureFromFile("missing_asset.tga", MIPMAP_NO, LLViewerFetchedTexture::BOOST_UI); @@ -305,6 +314,7 @@ void LLViewerTextureList::destroyGL(BOOL save_state) void LLViewerTextureList::restoreGL() { + llassert_always(mInitialized) ; LLImageGL::restoreGL(); } @@ -489,8 +499,10 @@ LLViewerFetchedTexture *LLViewerTextureList::findImage(const LLUUID &image_id) return iter->second; } -void LLViewerTextureList::addImageToList(LLViewerFetchedTexture *image) +void LLViewerTextureList::addImageToList(LLViewerFetchedTexture *image, U32 thread_id) { + llassert_always(mInitialized) ; + llassert_always(sRenderThreadID == thread_id); llassert(image); if (image->isInImageList()) { @@ -504,8 +516,10 @@ void LLViewerTextureList::addImageToList(LLViewerFetchedTexture *image) image->setInImageList(TRUE) ; } -void LLViewerTextureList::removeImageFromList(LLViewerFetchedTexture *image) +void LLViewerTextureList::removeImageFromList(LLViewerFetchedTexture *image, U32 thread_id) { + llassert_always(mInitialized) ; + llassert_always(sRenderThreadID == thread_id); llassert(image); if (!image->isInImageList()) { @@ -702,9 +716,9 @@ void LLViewerTextureList::updateImagesDecodePriorities() if ((decode_priority_test < old_priority_test * .8f) || (decode_priority_test > old_priority_test * 1.25f)) { - removeImageFromList(imagep); + removeImageFromList(imagep, sRenderThreadID); imagep->setDecodePriority(decode_priority); - addImageToList(imagep); + addImageToList(imagep, sRenderThreadID); } update_counter--; } @@ -781,9 +795,8 @@ void LLViewerTextureList::forceImmediateUpdate(LLViewerFetchedTexture* imagep) imagep->processTextureStats(); F32 decode_priority = LLViewerFetchedTexture::maxDecodePriority() ; imagep->setDecodePriority(decode_priority); - mImageList.insert(imagep); - imagep->setInImageList(TRUE) ; - + addImageToList(imagep); + return ; } @@ -877,7 +890,9 @@ void LLViewerTextureList::decodeAllImages(F32 max_time) { LLTimer timer; if(gNoRender) return; - + + llassert_always(sRenderThreadID == LLThread::currentID()); + // Update texture stats and priorities std::vector > image_list; for (image_priority_list_t::iterator iter = mImageList.begin(); @@ -895,8 +910,7 @@ void LLViewerTextureList::decodeAllImages(F32 max_time) imagep->processTextureStats(); F32 decode_priority = imagep->calcDecodePriority(); imagep->setDecodePriority(decode_priority); - mImageList.insert(imagep); - imagep->setInImageList(TRUE) ; + addImageToList(imagep); } image_list.clear(); diff --git a/indra/newview/llviewertexturelist.h b/indra/newview/llviewertexturelist.h index d508ce1ac6..27aab0c081 100644 --- a/indra/newview/llviewertexturelist.h +++ b/indra/newview/llviewertexturelist.h @@ -83,6 +83,7 @@ public: void dump(); void destroyGL(BOOL save_state = TRUE); void restoreGL(); + BOOL isInitialized() const {return mInitialized;} LLViewerFetchedTexture *findImage(const LLUUID &image_id); @@ -120,8 +121,8 @@ private: void addImage(LLViewerFetchedTexture *image); void deleteImage(LLViewerFetchedTexture *image); - void addImageToList(LLViewerFetchedTexture *image); - void removeImageFromList(LLViewerFetchedTexture *image); + void addImageToList(LLViewerFetchedTexture *image, U32 thread_id = LLThread::currentID()); + void removeImageFromList(LLViewerFetchedTexture *image, U32 thread_id = LLThread::currentID()); LLViewerFetchedTexture * getImage(const LLUUID &image_id, BOOL usemipmap = TRUE, @@ -187,6 +188,7 @@ private: // simply holds on to LLViewerFetchedTexture references to stop them from being purged too soon std::set > mImagePreloads; + BOOL mInitialized ; BOOL mUpdateStats; S32 mMaxResidentTexMemInMegaBytes; S32 mMaxTotalTextureMemInMegaBytes; @@ -206,6 +208,9 @@ public: private: static S32 sNumImages; static void (*sUUIDCallback)(void**, const LLUUID &); + + //debug use + static U32 sRenderThreadID; }; class LLUIImageList : public LLImageProviderInterface, public LLSingleton -- cgit v1.2.3 From e4e33cac29556cc0399380cdadb8f71814cc2e17 Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Wed, 6 Apr 2011 01:48:07 +0300 Subject: STORM-1028 WIP Fixing bottom bar buttons reshaping, tier 1 Fixed bottom tray buttons not showing under some circumstances. (the fix was made weeks ago, so I don't remember what the circumstances are) --- indra/newview/llbottomtray.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index d8ec4b605c..9e069d63bb 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -1652,8 +1652,11 @@ bool LLBottomTray::setVisibleAndFitWidths(EResizeState object_type, bool visible S32 result_width = 0; bool decrease_width = false; +#if 0 // Mark this button to be shown + lldebugs << "Adding " << resizeStateToString(object_type) << " to mResizeState" << llendl; mResizeState |= object_type; +#endif if (preferred_width > 0 && available_width >= preferred_width) { -- cgit v1.2.3 From 318752fe3df9ef86d3735fc0ef935d27ac3d5f7d Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Wed, 6 Apr 2011 01:48:07 +0300 Subject: STORM-1028 WIP Fixing bottom bar buttons reshaping, tier 2 * When there is some free space and all auto-hidden buttons have been already shown, first extend the Speak button, then the others (was: vice versa). * Made the Speak button always have fixed width. --- indra/newview/llbottomtray.cpp | 148 ++++++++++++++++++++++++++++++----------- indra/newview/llbottomtray.h | 14 ++++ 2 files changed, 122 insertions(+), 40 deletions(-) diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 9e069d63bb..838b072fd3 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -1392,53 +1392,80 @@ void LLBottomTray::processExtendButtons(S32& available_width) // do not allow extending any buttons if we have some buttons hidden via resize if (mResizeState & RS_BUTTONS_CAN_BE_HIDDEN) return; - // process buttons from left to right - resize_state_vec_t::const_iterator it = mButtonsProcessOrder.begin(); - const resize_state_vec_t::const_iterator it_end = mButtonsProcessOrder.end(); + lldebugs << "Distributing " << available_width << " px" << llendl; - // iterate through buttons in the mButtonsProcessOrder first - for (; it != it_end; ++it) + // First try extending the Speak button. + if (available_width > 0) { - // is there available space? - if (available_width <= 0) break; - - // try to extend next button - processExtendButton(*it, available_width); + if (!processExtendSpeakButton(available_width)) + { + // The Speak button needs extension but lacks some space. + // Don't extend other buttons in this case: the Speak button + // should consume the available headroom first. + return; + } } - const S32 chiclet_panel_width = mChicletPanel->getParent()->getRect().getWidth(); - static const S32 chiclet_panel_min_width = mChicletPanel->getMinWidth(); - const S32 available_width_chiclet = chiclet_panel_width - chiclet_panel_min_width; + // Then process the other buttons from left to right. + if (available_width > 0) + { + resize_state_vec_t::const_iterator it = mButtonsProcessOrder.begin(); + const resize_state_vec_t::const_iterator it_end = mButtonsProcessOrder.end(); - // then try to extend Speak button - if (available_width > 0 || available_width_chiclet > 0) + // iterate through buttons in the mButtonsProcessOrder first + for (; it != it_end; ++it) + { + // is there available space? + if (available_width <= 0) break; + + // try to extend next button + processExtendButton(*it, available_width); + } + } +} + +bool LLBottomTray::processExtendSpeakButton(S32& available_width) +{ + if (available_width <= 0) { - S32 panel_max_width = mObjectDefaultWidthMap[RS_BUTTON_SPEAK]; - S32 panel_width = mSpeakPanel->getRect().getWidth(); - S32 possible_extend_width = panel_max_width - panel_width; + llassert(available_width > 0); + return true; + } - if (possible_extend_width >= 0 && possible_extend_width <= available_width + available_width_chiclet) // HACK: this button doesn't change size so possible_extend_width will be 0 + const S32 panel_max_width = mObjectDefaultWidthMap[RS_BUTTON_SPEAK]; + const S32 panel_width = mSpeakPanel->getRect().getWidth(); + const S32 required_headroom = panel_max_width - panel_width; + +#if 0 + lldebugs << "required_extend_width = (panel_max_width - panel_width) = " + << "(" << panel_max_width << " - " << panel_width << ") = " << required_headroom << llendl; +#endif + + if (panel_width < panel_max_width) // if the button isn't extended already + { + if (available_width < required_headroom) // not enough space { - mSpeakBtn->setLabelVisible(true); - mSpeakPanel->reshape(panel_max_width, mSpeakPanel->getRect().getHeight()); - log(mSpeakBtn, "speak button is extended"); + lldebugs << "Need (" << required_headroom << " - " << available_width << ") = " + << (required_headroom - available_width) << " more px" + << " to extend the Speak button"<< llendl; - if( available_width > possible_extend_width) - { - available_width -= possible_extend_width; - } - else - { - S32 required_width = possible_extend_width - available_width; - available_width = 0; - mChicletPanel->getParent()->reshape(mChicletPanel->getParent()->getRect().getWidth() - required_width, mChicletPanel->getParent()->getRect().getHeight()); - } - lldebugs << "Extending Speak button panel: " << mSpeakPanel->getName() - << ", extended width: " << possible_extend_width - << ", rest width to process: " << available_width - << llendl; + return false; // Don't extend other buttons until we extend Speak. } + + // Reshape the Speak button to its maximum width. + mSpeakBtn->setLabelVisible(true); + mSpeakPanel->reshape(panel_max_width, mSpeakPanel->getRect().getHeight()); + + available_width -= required_headroom; + llassert(available_width >= 0); + + lldebugs << "Extending Speak button panel: " << mSpeakPanel->getName() + << ", extended width: " << required_headroom + << ", rest width to process: " << available_width + << llendl; } + + return true; } void LLBottomTray::processExtendButton(EResizeState processed_object_type, S32& available_width) @@ -1727,6 +1754,7 @@ bool LLBottomTray::setVisibleAndFitWidths(EResizeState object_type, bool visible setTrayButtonVisible(object_type, false); // Mark button NOT to show while future bottom tray extending + lldebugs << "Removing " << resizeStateToString(object_type) << " from mResizeState" << llendl; mResizeState &= ~object_type; // Extend other buttons if need @@ -1786,10 +1814,7 @@ void LLBottomTray::processChatbarCustomization(S32 new_width) mDesiredNearbyChatWidth = new_width; - LLView * chiclet_layout_panel = mChicletPanel->getParent(); - const S32 chiclet_min_width = get_panel_min_width(mToolbarStack, chiclet_layout_panel); - const S32 chiclet_panel_width = chiclet_layout_panel->getRect().getWidth(); - const S32 available_chiclet_shrink_width = chiclet_panel_width - chiclet_min_width; + const S32 available_chiclet_shrink_width = getChicletPanelShrinkHeadroom(); llassert(available_chiclet_shrink_width >= 0); if (delta_width > 0) // panel gets narrowly @@ -1808,6 +1833,16 @@ void LLBottomTray::processChatbarCustomization(S32 new_width) } } +S32 LLBottomTray::getChicletPanelShrinkHeadroom() const +{ + static const S32 min_width = mChicletPanel->getMinWidth(); + const S32 cur_width = mChicletPanel->getParent()->getRect().getWidth(); + + S32 shrink_headroom = cur_width - min_width; + llassert(shrink_headroom >= 0); // the panel cannot get narrower than the minimum + return shrink_headroom; +} + // static std::string LLBottomTray::resizeStateToString(EResizeState state) { @@ -1833,4 +1868,37 @@ std::string LLBottomTray::resizeStateToString(EResizeState state) return "UNKNOWN_BUTTON"; } +// static +std::string LLBottomTray::resizeStateMaskToString(MASK mask) +{ + std::string res; + + bool add_delimiter = false; + for (U32 i = 0; i < 16; i++) + { + EResizeState state = (EResizeState) (1 << i); + if (mask & state) + { + if (!add_delimiter) + { + add_delimiter = true; + } + else + { + res += ", "; + } + + res += resizeStateToString(state); + } + } + + if (res.empty()) + { + res = resizeStateToString(RS_NORESIZE); + } + + res += llformat(" (0x%X)", mask); + return res; +} + //EOF diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h index 04e5f5e9e0..f1c193ef16 100644 --- a/indra/newview/llbottomtray.h +++ b/indra/newview/llbottomtray.h @@ -316,6 +316,20 @@ private: */ void processExtendButtons(S32& available_width); + /** + * Extends the Speak button if there is anough headroom. + * + * Unlike other buttons, the Speak buttons has only two possible widths: + * the minimal one (without label) and the maximal (default) one. + * + * If the button is at its minimum width there is not enough headroom to + * reshape it to the maximum width, the method does nothing. + * + * @param available_width Available headroom. + * @return false if the button requires extension but there's not enough headroom, true otherwise. + */ + bool processExtendSpeakButton(S32& available_width); + /** * Extends shown button to increase total taken space. * -- cgit v1.2.3 From 1218ffb000289954cbbbf7fc5c62e494c85f1ede Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Wed, 6 Apr 2011 01:48:07 +0300 Subject: STORM-1028 WIP Fixing bottom bar buttons reshaping, tier 3 * Rewritten some code for better readability. Behavior should not be affected. * Debug prints and other minor changes. --- indra/newview/llbottomtray.cpp | 157 +++++++++++++++++++++++------------------ indra/newview/llbottomtray.h | 11 ++- 2 files changed, 100 insertions(+), 68 deletions(-) diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 838b072fd3..a206724cd0 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -917,7 +917,7 @@ void LLBottomTray::log(LLView* panel, const std::string& descr) << ", rect: " << panel->getRect() - << "layout: " << layout->getName() + << " layout: " << layout->getName() << ", rect: " << layout->getRect() << llendl ; @@ -1023,6 +1023,7 @@ void LLBottomTray::reshape(S32 width, S32 height, BOOL called_from_parent) { mDesiredNearbyChatWidth = new_width; processChatbarCustomization(new_width); + lldebugs << "Setting nearby chat bar width to " << new_width << " px" << llendl; mChatBarContainer->reshape(new_width, mChatBarContainer->getRect().getHeight()); } needs_restore_custom_state = false; @@ -1034,29 +1035,27 @@ S32 LLBottomTray::processWidthDecreased(S32 delta_width) { bool still_should_be_processed = true; - const S32 chiclet_panel_width = mChicletPanel->getParent()->getRect().getWidth(); - const S32 chiclet_panel_min_width = mChicletPanel->getMinWidth(); + const S32 chiclet_panel_shrink_headrom = getChicletPanelShrinkHeadroom(); // There are four steps of processing width decrease. If in one of them required width was reached, // further are not needed. // 1. Decreasing width of chiclet panel. - if (chiclet_panel_width > chiclet_panel_min_width) + if (chiclet_panel_shrink_headrom > 0) { // we have some space to decrease chiclet panel - S32 panel_delta_min = chiclet_panel_width - chiclet_panel_min_width; - - S32 delta_panel = llmin(-delta_width, panel_delta_min); + S32 delta_panel = llmin(-delta_width, chiclet_panel_shrink_headrom); lldebugs << "delta_width: " << delta_width - << ", panel_delta_min: " << panel_delta_min + << ", panel_delta_min: " << chiclet_panel_shrink_headrom << ", delta_panel: " << delta_panel << llendl; // is chiclet panel width enough to process resizing? - delta_width += panel_delta_min; + delta_width += chiclet_panel_shrink_headrom; still_should_be_processed = delta_width < 0; + lldebugs << "Shrinking chiclet panel by " << delta_panel << " px" << llendl; mChicletPanel->getParent()->reshape(mChicletPanel->getParent()->getRect().getWidth() - delta_panel, mChicletPanel->getParent()->getRect().getHeight()); log(mChicletPanel, "after processing panel decreasing via chiclet panel"); @@ -1089,6 +1088,7 @@ S32 LLBottomTray::processWidthDecreased(S32 delta_width) // chatbar should only be shrunk here, not stretched if(delta_panel > 0) { + lldebugs << "Shrinking nearby chat bar by " << delta_panel << " px " << llendl; mChatBarContainer->reshape(mNearbyChatBar->getRect().getWidth() - delta_panel, mChatBarContainer->getRect().getHeight()); } @@ -1120,6 +1120,7 @@ S32 LLBottomTray::processWidthDecreased(S32 delta_width) { S32 compensative_width = nearby_needed_width > buttons_freed_width ? buttons_freed_width : nearby_needed_width; log(mNearbyChatBar, "before applying compensative width"); + lldebugs << "Extending nearby chat bar by " << compensative_width << " px" << llendl; mChatBarContainer->reshape(mChatBarContainer->getRect().getWidth() + compensative_width, mChatBarContainer->getRect().getHeight() ); log(mNearbyChatBar, "after applying compensative width"); lldebugs << buttons_freed_width << llendl; @@ -1134,52 +1135,45 @@ void LLBottomTray::processWidthIncreased(S32 delta_width) { if (delta_width <= 0) return; - const S32 chiclet_panel_width = mChicletPanel->getParent()->getRect().getWidth(); - static const S32 chiclet_panel_min_width = mChicletPanel->getMinWidth(); - - const S32 available_width_chiclet = chiclet_panel_width - chiclet_panel_min_width; - - // how many room we have to show hidden buttons - S32 total_available_width = delta_width + available_width_chiclet; + // how much room we have to show hidden buttons + S32 available_width = delta_width + getChicletPanelShrinkHeadroom(); - lldebugs << "Processing extending, available width:" - << ", chiclets - " << available_width_chiclet - << ", total - " << total_available_width - << llendl; + lldebugs << "Distributing (" << getChicletPanelShrinkHeadroom() + << " + " << delta_width << ") = " << available_width << " px" << llendl; - S32 available_width = total_available_width; + S32 processed_width = processShowButtons(available_width); + lldebugs << "processed_width = " << processed_width << ", delta_width = " << delta_width << llendl; - processShowButtons(available_width); + lldebugs << "Available_width after showing buttons: " << available_width << llendl; // if we have to show/extend some buttons but resized delta width is not enough... - S32 processed_width = total_available_width - available_width; if (processed_width > delta_width) { // ... let's shrink nearby chat & chiclet panels - S32 required_to_process_width = processed_width; - // 1. use delta width of resizing - required_to_process_width -= delta_width; + S32 shrink_by = processed_width - delta_width; // 2. use width available via decreasing of chiclet panel - if (required_to_process_width > 0) + if (shrink_by > 0) { - mChicletPanel->getParent()->reshape(mChicletPanel->getParent()->getRect().getWidth() - required_to_process_width, mChicletPanel->getParent()->getRect().getHeight()); + lldebugs << "Shrinking chiclet panel by " << shrink_by << " px" << llendl; + mChicletPanel->getParent()->reshape(mChicletPanel->getParent()->getRect().getWidth() - shrink_by, mChicletPanel->getParent()->getRect().getHeight()); log(mChicletPanel, "after applying compensative width for chiclets: "); - lldebugs << required_to_process_width << llendl; + lldebugs << shrink_by << llendl; } - } // shown buttons take some space, rest should be processed by nearby chatbar & chiclet panels delta_width -= processed_width; - - // how many space can nearby chatbar take? - S32 chatbar_panel_width_ = mChatBarContainer->getRect().getWidth(); - if (delta_width > 0 && chatbar_panel_width_ < mDesiredNearbyChatWidth) + // how much space can nearby chatbar take? + S32 chatbar_panel_width = mChatBarContainer->getRect().getWidth(); + lldebugs << "delta_width = " << delta_width + << ", chatbar_panel_width = " << chatbar_panel_width + << ", mDesiredNearbyChatWidth = " << mDesiredNearbyChatWidth << llendl; + if (delta_width > 0 && chatbar_panel_width < mDesiredNearbyChatWidth) { - S32 delta_panel_max = mDesiredNearbyChatWidth - chatbar_panel_width_; + S32 delta_panel_max = mDesiredNearbyChatWidth - chatbar_panel_width; S32 delta_panel = llmin(delta_width, delta_panel_max); lldebugs << "Unprocesed delta width: " << delta_width << ", can be applied to chatbar: " << delta_panel_max @@ -1187,17 +1181,22 @@ void LLBottomTray::processWidthIncreased(S32 delta_width) << llendl; delta_width -= delta_panel_max; - mChatBarContainer->reshape(chatbar_panel_width_ + delta_panel, mChatBarContainer->getRect().getHeight()); + lldebugs << "Extending nearby chat bar by " << delta_panel << " px " << llendl; + mChatBarContainer->reshape(chatbar_panel_width + delta_panel, mChatBarContainer->getRect().getHeight()); log(mNearbyChatBar, "applied unprocessed delta width"); } + if (delta_width > 0) { processExtendButtons(delta_width); } } -void LLBottomTray::processShowButtons(S32& available_width) +S32 LLBottomTray::processShowButtons(S32& available_width) { + lldebugs << "Distributing " << available_width << " px" << llendl; + S32 original_available_width = available_width; + // process buttons from left to right resize_state_vec_t::const_iterator it = mButtonsProcessOrder.begin(); const resize_state_vec_t::const_iterator it_end = mButtonsProcessOrder.end(); @@ -1210,22 +1209,30 @@ void LLBottomTray::processShowButtons(S32& available_width) // try to show next button processShowButton(*it, available_width); } + + return original_available_width - available_width; } bool LLBottomTray::processShowButton(EResizeState shown_object_type, S32& available_width) { - lldebugs << "Trying to show object type: " << shown_object_type << llendl; - LLPanel* panel = getButtonPanel(shown_object_type); if (NULL == panel) { - lldebugs << "There is no object to process for state: " << shown_object_type << llendl; return false; } + + if (panel->getVisible()) + { + return false; + } + + // We can only show a button if it was previously hidden due to lack of space + // and all buttons to the left of it are not auto-hidden + // (we auto-show the buttons left to right). bool can_be_shown = canButtonBeShown(shown_object_type); if (can_be_shown) { - //validate if we have enough room to show this button + // Make sure we have enough room to show this button. const S32 required_width = panel->getRect().getWidth(); can_be_shown = available_width >= required_width; if (can_be_shown) @@ -1234,11 +1241,16 @@ bool LLBottomTray::processShowButton(EResizeState shown_object_type, S32& availa setTrayButtonVisible(shown_object_type, true); - lldebugs << "processed object type: " << shown_object_type - << ", rest available width: " << available_width + lldebugs << "Showing button " << resizeStateToString(shown_object_type) + << ", remaining available width: " << available_width << llendl; mResizeState &= ~shown_object_type; } + else + { + lldebugs << "Need " << (required_width - available_width) << " more px to show " + << resizeStateToString(shown_object_type) << llendl; + } } return can_be_shown; } @@ -1265,7 +1277,6 @@ void LLBottomTray::processHideButton(EResizeState processed_object_type, S32& re LLPanel* panel = getButtonPanel(processed_object_type); if (NULL == panel) { - lldebugs << "There is no object to process for state: " << processed_object_type << llendl; return; } @@ -1345,7 +1356,6 @@ void LLBottomTray::processShrinkButton(EResizeState processed_object_type, S32& LLPanel* panel = getButtonPanel(processed_object_type); if (NULL == panel) { - lldebugs << "There is no object to process for type: " << processed_object_type << llendl; return; } @@ -1470,38 +1480,32 @@ bool LLBottomTray::processExtendSpeakButton(S32& available_width) void LLBottomTray::processExtendButton(EResizeState processed_object_type, S32& available_width) { + llassert(available_width >= 0); + LLPanel* panel = getButtonPanel(processed_object_type); if (NULL == panel) { - lldebugs << "There is no object to process for type: " << processed_object_type << llendl; return; } if (!panel->getVisible()) return; + // Widen the button up to its maximum width, but by not more than px. S32 panel_max_width = mObjectDefaultWidthMap[processed_object_type]; S32 panel_width = panel->getRect().getWidth(); - S32 possible_extend_width = panel_max_width - panel_width; + S32 required_headroom = panel_max_width - panel_width; - if (possible_extend_width > 0) + S32 extend_by = llmin(available_width, required_headroom); + if (extend_by > 0) { - // let calculate real width to extend - - // 1. apply all possible width - available_width -= possible_extend_width; + panel->reshape(panel_width + extend_by, panel->getRect().getHeight()); - // 2. it it is too much... - if (available_width < 0) - { - // reduce applied extended width to the excessive value. - possible_extend_width += available_width; - available_width = 0; - } - panel->reshape(panel_width + possible_extend_width, panel->getRect().getHeight()); + // Decrease amount of headroom available for other panels. + available_width -= extend_by; - lldebugs << "Extending panel: " << panel->getName() - << ", extended width: " << possible_extend_width - << ", rest width to process: " << available_width + lldebugs << "Extending " << panel->getName() + << " by " << extend_by + << " px; remaining available width: " << available_width << llendl; } } @@ -1510,6 +1514,13 @@ bool LLBottomTray::canButtonBeShown(EResizeState processed_object_type) const { // 0. Check if passed button was previously hidden on resize bool can_be_shown = mResizeState & processed_object_type; +#if 0 + if (!can_be_shown) + { + lldebugs << "Button " << resizeStateToString(processed_object_type) << " was not auto-hidden" << llendl; + } +#endif + if (can_be_shown) { // Yes, it was. Lets now check that all buttons before it (that can be hidden on resize) @@ -1531,6 +1542,15 @@ bool LLBottomTray::canButtonBeShown(EResizeState processed_object_type) const // 2. Check if some previous buttons are still hidden on resize can_be_shown = !(buttons_before_mask & mResizeState); +#if 0 + if (!can_be_shown) + { + lldebugs << llformat("mResizeState = 0x%4x, buttons_before_mask = 0x%4x", mResizeState, buttons_before_mask) << llendl; + lldebugs << "Auto-hidden: " << resizeStateMaskToString(mResizeState) << llendl; + lldebugs << "Must show the following buttons to the left of " << resizeStateToString(processed_object_type) << " first:" << llendl; + lldebugs << resizeStateMaskToString(buttons_before_mask & mResizeState) << llendl; + } +#endif } return can_be_shown; } @@ -1595,6 +1615,7 @@ void LLBottomTray::initButtonsVisibility() setVisibleAndFitWidths(RS_BUTTON_SEARCH, gSavedSettings.getBOOL("ShowSearchButton")); setVisibleAndFitWidths(RS_BUTTON_WORLD_MAP, gSavedSettings.getBOOL("ShowWorldMapButton")); setVisibleAndFitWidths(RS_BUTTON_MINI_MAP, gSavedSettings.getBOOL("ShowMiniMapButton")); + lldebugs << "mResizeState = " << resizeStateMaskToString(mResizeState) << llendl; } void LLBottomTray::setButtonsControlsAndListeners() @@ -1631,7 +1652,6 @@ void LLBottomTray::setTrayButtonVisible(EResizeState shown_object_type, bool vis LLPanel* panel = getButtonPanel(shown_object_type); if (NULL == panel) { - lldebugs << "There is no object to show for state: " << shown_object_type << llendl; return; } @@ -1662,7 +1682,6 @@ bool LLBottomTray::setVisibleAndFitWidths(EResizeState object_type, bool visible LLPanel* cur_panel = getButtonPanel(object_type); if (NULL == cur_panel) { - lldebugs << "There is no object to process for state: " << object_type << llendl; return false; } @@ -1671,8 +1690,7 @@ bool LLBottomTray::setVisibleAndFitWidths(EResizeState object_type, bool visible if (visible) { // Assume that only chiclet panel can be auto-resized - const S32 available_width = - mChicletPanel->getParent()->getRect().getWidth() - mChicletPanel->getMinWidth(); + const S32 available_width = getChicletPanelShrinkHeadroom(); S32 preferred_width = mObjectDefaultWidthMap[object_type]; S32 current_width = cur_panel->getRect().getWidth(); @@ -1812,6 +1830,11 @@ void LLBottomTray::processChatbarCustomization(S32 new_width) if (delta_width == 0) return; + { + static unsigned dbg_cnt = 0; + lldebugs << llformat("*** (%03d) ************************************* %d", delta_width, ++dbg_cnt) << llendl; + } + mDesiredNearbyChatWidth = new_width; const S32 available_chiclet_shrink_width = getChicletPanelShrinkHeadroom(); diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h index f1c193ef16..7301551975 100644 --- a/indra/newview/llbottomtray.h +++ b/indra/newview/llbottomtray.h @@ -240,8 +240,9 @@ private: * * @params[in, out] available_width - reference to available width to be used to show buttons. * @see processShowButton() + * @return consumed pixels (difference in available width). */ - void processShowButtons(S32& available_width); + S32 processShowButtons(S32& available_width); /** * Tries to show panel with specified button using available width. @@ -431,9 +432,17 @@ private: */ void processChatbarCustomization(S32 new_width); + /** + * @return difference between current chiclet panel width and the minimum. + */ + S32 getChicletPanelShrinkHeadroom() const; + /// Get button name for debugging. static std::string resizeStateToString(EResizeState state); + /// Dump a mask for debugging + static std::string resizeStateMaskToString(MASK mask); + /// Buttons automatically hidden due to lack of space. MASK mResizeState; -- cgit v1.2.3 From dfb17cf204b9fbf97129569398efe3d7bc88fe6a Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Wed, 6 Apr 2011 01:48:07 +0300 Subject: STORM-1028 WIP Fixing bottom bar buttons reshaping, tier 4 When user manually toggles a button (via context menu), show it regardless of whether it has been auto-hidden. Tech note: Added showButton() method which does the same as processShowButton() did but the check for the button being auto-hidden. --- indra/newview/llbottomtray.cpp | 137 ++++++++++++++++++++--------------------- indra/newview/llbottomtray.h | 10 +++ 2 files changed, 78 insertions(+), 69 deletions(-) diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index a206724cd0..0d18321f1c 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -1215,44 +1215,14 @@ S32 LLBottomTray::processShowButtons(S32& available_width) bool LLBottomTray::processShowButton(EResizeState shown_object_type, S32& available_width) { - LLPanel* panel = getButtonPanel(shown_object_type); - if (NULL == panel) + // Check if the button was previously auto-hidden (due to lack of space). + if ((mResizeState & shown_object_type) == 0) { return false; } - if (panel->getVisible()) - { - return false; - } - - // We can only show a button if it was previously hidden due to lack of space - // and all buttons to the left of it are not auto-hidden - // (we auto-show the buttons left to right). - bool can_be_shown = canButtonBeShown(shown_object_type); - if (can_be_shown) - { - // Make sure we have enough room to show this button. - const S32 required_width = panel->getRect().getWidth(); - can_be_shown = available_width >= required_width; - if (can_be_shown) - { - available_width -= required_width; - - setTrayButtonVisible(shown_object_type, true); - - lldebugs << "Showing button " << resizeStateToString(shown_object_type) - << ", remaining available width: " << available_width - << llendl; - mResizeState &= ~shown_object_type; - } - else - { - lldebugs << "Need " << (required_width - available_width) << " more px to show " - << resizeStateToString(shown_object_type) << llendl; - } - } - return can_be_shown; + // Ok. Try showing the button. + return showButton(shown_object_type, available_width); } void LLBottomTray::processHideButtons(S32& required_width, S32& buttons_freed_width) @@ -1512,46 +1482,33 @@ void LLBottomTray::processExtendButton(EResizeState processed_object_type, S32& bool LLBottomTray::canButtonBeShown(EResizeState processed_object_type) const { - // 0. Check if passed button was previously hidden on resize - bool can_be_shown = mResizeState & processed_object_type; -#if 0 - if (!can_be_shown) - { - lldebugs << "Button " << resizeStateToString(processed_object_type) << " was not auto-hidden" << llendl; - } -#endif - - if (can_be_shown) - { - // Yes, it was. Lets now check that all buttons before it (that can be hidden on resize) - // are already shown + // 1. Let's check that all buttons (that can be hidden on resize) before the given one are already shown. - // process buttons in direct order (from left to right) - resize_state_vec_t::const_iterator it = mButtonsProcessOrder.begin(); - const resize_state_vec_t::const_iterator it_end = mButtonsProcessOrder.end(); + // process buttons in direct order (from left to right) + resize_state_vec_t::const_iterator it = mButtonsProcessOrder.begin(); + const resize_state_vec_t::const_iterator it_end = mButtonsProcessOrder.end(); - // 1. Find and accumulate all buttons types before one passed into the method. - MASK buttons_before_mask = RS_NORESIZE; - for (; it != it_end; ++it) - { - const EResizeState button_type = *it; - if (button_type == processed_object_type) break; + // 1. Find and accumulate all buttons types before one passed into the method. + MASK buttons_before_mask = RS_NORESIZE; + for (; it != it_end; ++it) + { + const EResizeState button_type = *it; + if (button_type == processed_object_type) break; - buttons_before_mask |= button_type; - } + buttons_before_mask |= button_type; + } - // 2. Check if some previous buttons are still hidden on resize - can_be_shown = !(buttons_before_mask & mResizeState); + // 2. Check if some previous buttons are still hidden on resize + bool can_be_shown = !(buttons_before_mask & mResizeState); #if 0 - if (!can_be_shown) - { - lldebugs << llformat("mResizeState = 0x%4x, buttons_before_mask = 0x%4x", mResizeState, buttons_before_mask) << llendl; - lldebugs << "Auto-hidden: " << resizeStateMaskToString(mResizeState) << llendl; - lldebugs << "Must show the following buttons to the left of " << resizeStateToString(processed_object_type) << " first:" << llendl; - lldebugs << resizeStateMaskToString(buttons_before_mask & mResizeState) << llendl; - } -#endif + if (!can_be_shown) + { + lldebugs << llformat("mResizeState = 0x%4x, buttons_before_mask = 0x%4x", mResizeState, buttons_before_mask) << llendl; + lldebugs << "Auto-hidden: " << resizeStateMaskToString(mResizeState) << llendl; + lldebugs << "Must show the following buttons to the left of " << resizeStateToString(processed_object_type) << " first:" << llendl; + lldebugs << resizeStateMaskToString(buttons_before_mask & mResizeState) << llendl; } +#endif return can_be_shown; } @@ -1647,6 +1604,48 @@ bool LLBottomTray::toggleShowButton(LLBottomTray::EResizeState button_type, cons return true; } +bool LLBottomTray::showButton(EResizeState button_type, S32& available_width) +{ + LLPanel* panel = getButtonPanel(button_type); + if (NULL == panel) + { + return false; + } + + if (panel->getVisible()) + { + return false; + } + + // Check if none of the buttons to the left of the given one was auto-hidden. + // (we auto-show the buttons left to right). + if (!canButtonBeShown(button_type)) + { + return false; + } + + // Make sure we have enough room to show this button. + const S32 required_width = panel->getRect().getWidth(); + if (available_width < required_width) + { + lldebugs << "Need " << (required_width - available_width) << " more px to show " << resizeStateToString(button_type) << llendl; + return false; + } + + // All good. Show the button. + setTrayButtonVisible(button_type, true); + + // Let the caller know that there is now less available space. + available_width -= required_width; + + lldebugs << "Showing button " << resizeStateToString(button_type) + << ", remaining available width: " << available_width + << llendl; + mResizeState &= ~button_type; + + return true; +} + void LLBottomTray::setTrayButtonVisible(EResizeState shown_object_type, bool visible) { LLPanel* panel = getButtonPanel(shown_object_type); @@ -1757,7 +1756,7 @@ bool LLBottomTray::setVisibleAndFitWidths(EResizeState object_type, bool visible current_width = result_width; } - is_set = processShowButton(object_type, current_width); + is_set = showButton(object_type, current_width); // Shrink buttons if needed if (is_set && decrease_width) diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h index 7301551975..1e8554f434 100644 --- a/indra/newview/llbottomtray.h +++ b/indra/newview/llbottomtray.h @@ -379,6 +379,16 @@ private: */ static bool toggleShowButton(EResizeState button_type, const LLSD& new_visibility); + /** + * Show the button if there is enough space. + * + * @param[in] button_type - type of button to be shown. + * @param[in, out] available_width amount of available space on the bottom bar. + * + * @return true if button was shown, false that's not possible (not enough space, etc) + */ + bool showButton(EResizeState button_type, S32& available_width); + /** * Sets passed visibility to object specified by resize type. */ -- cgit v1.2.3 From 4f09c204781d20e1b491b2aa22eed7c797685102 Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Wed, 6 Apr 2011 01:48:07 +0300 Subject: STORM-1028 WIP Fixing bottom bar buttons reshaping, tier 5 Changes to improve readability. --- indra/newview/llbottomtray.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 0d18321f1c..0f69c7e474 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -940,7 +940,9 @@ void LLBottomTray::reshape(S32 width, S32 height, BOOL called_from_parent) if (mNearbyChatBar) log(mNearbyChatBar, "before"); if (mChicletPanel) log(mChicletPanel, "before"); - // stores width size on which bottom tray is less than width required by its children. EXT-991 + // Difference between bottom tray width required to fit its children and the actual width. (see EXT-991) + // Positive value means that bottom tray is not wide enough. + // Negative value means that there is free space. static S32 extra_shrink_width = 0; bool should_be_reshaped = true; @@ -962,11 +964,9 @@ void LLBottomTray::reshape(S32 width, S32 height, BOOL called_from_parent) // bottom tray is narrowed if (delta_width < 0) { - if (extra_shrink_width > 0) + if (extra_shrink_width > 0) // not enough space { - // is world rect was extra shrunk and decreasing again only update this value - // to delta_width negative - extra_shrink_width -= delta_width; // use "-=" because delta_width is negative + extra_shrink_width += llabs(delta_width); should_be_reshaped = false; } else @@ -977,13 +977,13 @@ void LLBottomTray::reshape(S32 width, S32 height, BOOL called_from_parent) width += extra_shrink_width; } } - // bottom tray is widen + // bottom tray is widened else { if (extra_shrink_width > delta_width) { - // Less than minimum width is more than increasing (delta_width) - // only reduce it value and make no reshape + // Still not enough space. + // Only subtract the delta from the required delta and don't reshape. extra_shrink_width -= delta_width; should_be_reshaped = false; } @@ -1043,20 +1043,20 @@ S32 LLBottomTray::processWidthDecreased(S32 delta_width) if (chiclet_panel_shrink_headrom > 0) { // we have some space to decrease chiclet panel - S32 delta_panel = llmin(-delta_width, chiclet_panel_shrink_headrom); + S32 shrink_by = llmin(-delta_width, chiclet_panel_shrink_headrom); lldebugs << "delta_width: " << delta_width << ", panel_delta_min: " << chiclet_panel_shrink_headrom - << ", delta_panel: " << delta_panel + << ", shrink_by: " << shrink_by << llendl; - // is chiclet panel width enough to process resizing? + // is chiclet panel wide enough to process resizing? delta_width += chiclet_panel_shrink_headrom; still_should_be_processed = delta_width < 0; - lldebugs << "Shrinking chiclet panel by " << delta_panel << " px" << llendl; - mChicletPanel->getParent()->reshape(mChicletPanel->getParent()->getRect().getWidth() - delta_panel, mChicletPanel->getParent()->getRect().getHeight()); + lldebugs << "Shrinking chiclet panel by " << shrink_by << " px" << llendl; + mChicletPanel->getParent()->reshape(mChicletPanel->getParent()->getRect().getWidth() - shrink_by, mChicletPanel->getParent()->getRect().getHeight()); log(mChicletPanel, "after processing panel decreasing via chiclet panel"); lldebugs << "RS_CHICLET_PANEL" @@ -1080,7 +1080,7 @@ S32 LLBottomTray::processWidthDecreased(S32 delta_width) S32 delta_panel = llmin(-delta_width, panel_delta_min); - // whether chatbar panel width is enough to process resizing? + // is chatbar panel wide enough to process resizing? delta_width += panel_delta_min; still_should_be_processed = delta_width < 0; -- cgit v1.2.3 From e710d740dcb14d696d3533071b030fd30e9cf198 Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Wed, 6 Apr 2011 01:48:07 +0300 Subject: STORM-1028 WIP Fixing bottom bar buttons reshaping, tier 6 Fixed: if you slowly increase the viewer window width, the Speak button fails to expand. --- indra/newview/llbottomtray.cpp | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 0f69c7e474..0a6dd7beff 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -912,15 +912,14 @@ void LLBottomTray::log(LLView* panel, const std::string& descr) { if (NULL == panel) return; LLView* layout = panel->getParent(); - lldebugs << descr << ": " + LL_DEBUGS("Bottom Tray Rects") << descr << ": " << "panel: " << panel->getName() << ", rect: " << panel->getRect() << " layout: " << layout->getName() << ", rect: " << layout->getRect() - << llendl - ; + << LL_ENDL; } void LLBottomTray::reshape(S32 width, S32 height, BOOL called_from_parent) @@ -1141,15 +1140,16 @@ void LLBottomTray::processWidthIncreased(S32 delta_width) lldebugs << "Distributing (" << getChicletPanelShrinkHeadroom() << " + " << delta_width << ") = " << available_width << " px" << llendl; + // 1. Try showing buttons that have been auto-hidden. S32 processed_width = processShowButtons(available_width); lldebugs << "processed_width = " << processed_width << ", delta_width = " << delta_width << llendl; lldebugs << "Available_width after showing buttons: " << available_width << llendl; - // if we have to show/extend some buttons but resized delta width is not enough... + // If the newly shown buttons have consumed more than delta_width pixels, + // shrink the chiclet panel. if (processed_width > delta_width) { - // ... let's shrink nearby chat & chiclet panels // 1. use delta width of resizing S32 shrink_by = processed_width - delta_width; @@ -1161,12 +1161,12 @@ void LLBottomTray::processWidthIncreased(S32 delta_width) log(mChicletPanel, "after applying compensative width for chiclets: "); lldebugs << shrink_by << llendl; } - } - // shown buttons take some space, rest should be processed by nearby chatbar & chiclet panels - delta_width -= processed_width; + // shown buttons take some space, rest should be processed by nearby chatbar & chiclet panels + delta_width -= processed_width; + } - // how much space can nearby chatbar take? + // 2. Expand the nearby chat bar if needed. S32 chatbar_panel_width = mChatBarContainer->getRect().getWidth(); lldebugs << "delta_width = " << delta_width << ", chatbar_panel_width = " << chatbar_panel_width @@ -1186,9 +1186,12 @@ void LLBottomTray::processWidthIncreased(S32 delta_width) log(mNearbyChatBar, "applied unprocessed delta width"); } + // 3. Expand buttons that have been auto-shrunk, + // if we haven't yet consumed all the available headroom. if (delta_width > 0) { - processExtendButtons(delta_width); + S32 available_width = delta_width + getChicletPanelShrinkHeadroom(); + processExtendButtons(available_width); } } -- cgit v1.2.3 From 00a3e47e74a6a0e7843fb9de5b042a7694a9fcb5 Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Wed, 6 Apr 2011 02:17:07 +0300 Subject: STORM-1028 WIP Fixing bottom bar buttons reshaping, tier 7 * Removed dead code. * Minor comment changes. --- indra/newview/llbottomtray.cpp | 28 +++------------------------- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 0a6dd7beff..aacdf4845a 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -1419,11 +1419,6 @@ bool LLBottomTray::processExtendSpeakButton(S32& available_width) const S32 panel_width = mSpeakPanel->getRect().getWidth(); const S32 required_headroom = panel_max_width - panel_width; -#if 0 - lldebugs << "required_extend_width = (panel_max_width - panel_width) = " - << "(" << panel_max_width << " - " << panel_width << ") = " << required_headroom << llendl; -#endif - if (panel_width < panel_max_width) // if the button isn't extended already { if (available_width < required_headroom) // not enough space @@ -1485,13 +1480,13 @@ void LLBottomTray::processExtendButton(EResizeState processed_object_type, S32& bool LLBottomTray::canButtonBeShown(EResizeState processed_object_type) const { - // 1. Let's check that all buttons (that can be hidden on resize) before the given one are already shown. + // Check that all buttons (that can be hidden on resize) + // to the left of the given one are already shown. // process buttons in direct order (from left to right) resize_state_vec_t::const_iterator it = mButtonsProcessOrder.begin(); const resize_state_vec_t::const_iterator it_end = mButtonsProcessOrder.end(); - // 1. Find and accumulate all buttons types before one passed into the method. MASK buttons_before_mask = RS_NORESIZE; for (; it != it_end; ++it) { @@ -1501,18 +1496,7 @@ bool LLBottomTray::canButtonBeShown(EResizeState processed_object_type) const buttons_before_mask |= button_type; } - // 2. Check if some previous buttons are still hidden on resize - bool can_be_shown = !(buttons_before_mask & mResizeState); -#if 0 - if (!can_be_shown) - { - lldebugs << llformat("mResizeState = 0x%4x, buttons_before_mask = 0x%4x", mResizeState, buttons_before_mask) << llendl; - lldebugs << "Auto-hidden: " << resizeStateMaskToString(mResizeState) << llendl; - lldebugs << "Must show the following buttons to the left of " << resizeStateToString(processed_object_type) << " first:" << llendl; - lldebugs << resizeStateMaskToString(buttons_before_mask & mResizeState) << llendl; - } -#endif - return can_be_shown; + return !(buttons_before_mask & mResizeState); } void LLBottomTray::initResizeStateContainers() @@ -1699,12 +1683,6 @@ bool LLBottomTray::setVisibleAndFitWidths(EResizeState object_type, bool visible S32 result_width = 0; bool decrease_width = false; -#if 0 - // Mark this button to be shown - lldebugs << "Adding " << resizeStateToString(object_type) << " to mResizeState" << llendl; - mResizeState |= object_type; -#endif - if (preferred_width > 0 && available_width >= preferred_width) { result_width = preferred_width; -- cgit v1.2.3 From 9a518aaa3a6dd7d07c4d01b416080208e3171ac1 Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Wed, 6 Apr 2011 02:24:43 +0300 Subject: STORM-1028 WIP Fixing bottom bar buttons reshaping, tier 8 Fixed Mini-Map button label truncation. --- indra/newview/skins/default/xui/en/panel_bottomtray.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml index a92cc886e7..6620808da6 100644 --- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml @@ -341,7 +341,7 @@ Disabled for now. height="28" layout="topleft" min_height="28" - min_width="52" + min_width="62" mouse_opaque="false" name="mini_map_btn_panel" user_resize="false" -- cgit v1.2.3 From f9698c264442bb0db068e4dc9d4d1ab0ba5c210a Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Mon, 11 Apr 2011 23:33:06 +0300 Subject: STORM-1028 WIP Fixing bottom bar buttons reshaping, tier 9 Removed unused methods. --- indra/newview/llbottomtray.cpp | 20 -------------------- indra/newview/llbottomtray.h | 4 ---- 2 files changed, 24 deletions(-) diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 9932dd5365..ca901766d7 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -492,26 +492,6 @@ void LLBottomTray::updateContextMenu(S32 x, S32 y, MASK mask) mBottomTrayContextMenu->setItemVisible("NearbyChatBar_Select_All", in_edit_box); } -void LLBottomTray::showGestureButton(BOOL visible) -{ - setTrayButtonVisibleIfPossible(RS_BUTTON_GESTURES, visible); -} - -void LLBottomTray::showMoveButton(BOOL visible) -{ - setTrayButtonVisibleIfPossible(RS_BUTTON_MOVEMENT, visible); -} - -void LLBottomTray::showCameraButton(BOOL visible) -{ - setTrayButtonVisibleIfPossible(RS_BUTTON_CAMERA, visible); -} - -void LLBottomTray::showSnapshotButton(BOOL visible) -{ - setTrayButtonVisibleIfPossible(RS_BUTTON_SNAPSHOT, visible); -} - void LLBottomTray::showSpeakButton(bool visible) { // Show/hide the button diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h index 1e8554f434..db7f5bc308 100644 --- a/indra/newview/llbottomtray.h +++ b/indra/newview/llbottomtray.h @@ -112,10 +112,6 @@ public: void showBottomTrayContextMenu(S32 x, S32 y, MASK mask); - void showGestureButton(BOOL visible); - void showMoveButton(BOOL visible); - void showCameraButton(BOOL visible); - void showSnapshotButton(BOOL visible); void showSpeakButton(bool visible); void toggleMovementControls(); -- cgit v1.2.3 From e5aaf90bffa7005c0aa872c2084b6d57659d0fee Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Tue, 12 Apr 2011 00:20:18 +0300 Subject: STORM-1028 WIP Fixing bottom bar buttons reshaping, tier 10 Fixing a regression introduced in tier 1: not displaying the bottom tray buttons added when bottom tray was not wide enough display them, even after increasing the width to show all visible buttons. The fix is to mark such buttons as auto-hidden so that they appear as soon as we have enough free space. --- indra/newview/llbottomtray.cpp | 35 ++++++++++++++++++++++++++++------- indra/newview/llbottomtray.h | 10 ++++++++++ 2 files changed, 38 insertions(+), 7 deletions(-) diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index ca901766d7..d5d8a27d85 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -1223,7 +1223,7 @@ S32 LLBottomTray::processShowButtons(S32& available_width) bool LLBottomTray::processShowButton(EResizeState shown_object_type, S32& available_width) { // Check if the button was previously auto-hidden (due to lack of space). - if ((mResizeState & shown_object_type) == 0) + if (!isAutoHidden(shown_object_type)) { return false; } @@ -1268,7 +1268,7 @@ void LLBottomTray::processHideButton(EResizeState processed_object_type, S32& re setTrayButtonVisible(processed_object_type, false); - mResizeState |= processed_object_type; + setAutoHidden(processed_object_type, true); lldebugs << "processing object type: " << processed_object_type << ", buttons_freed_width: " << buttons_freed_width @@ -1377,7 +1377,7 @@ void LLBottomTray::processShrinkButton(EResizeState processed_object_type, S32& void LLBottomTray::processExtendButtons(S32& available_width) { // do not allow extending any buttons if we have some buttons hidden via resize - if (mResizeState & RS_BUTTONS_CAN_BE_HIDDEN) return; + if (isAutoHidden(RS_BUTTONS_CAN_BE_HIDDEN)) return; lldebugs << "Distributing " << available_width << " px" << llendl; @@ -1500,7 +1500,7 @@ bool LLBottomTray::canButtonBeShown(EResizeState processed_object_type) const buttons_before_mask |= button_type; } - return !(buttons_before_mask & mResizeState); + return !isAutoHidden(buttons_before_mask); } void LLBottomTray::initResizeStateContainers() @@ -1632,7 +1632,7 @@ bool LLBottomTray::showButton(EResizeState button_type, S32& available_width) lldebugs << "Showing button " << resizeStateToString(button_type) << ", remaining available width: " << available_width << llendl; - mResizeState &= ~button_type; + setAutoHidden(button_type, false); return true; } @@ -1730,7 +1730,11 @@ bool LLBottomTray::setVisibleAndFitWidths(EResizeState object_type, bool visible } else { - // Nothing can be done, give up... + lldebugs << "Need " << (minimal_width - available_width - possible_shrunk_width) + << " more px to show " << resizeStateToString(object_type) << llendl; + + // Make the button uppear when we have more available space. + setAutoHidden(object_type, true); return false; } } @@ -1757,7 +1761,7 @@ bool LLBottomTray::setVisibleAndFitWidths(EResizeState object_type, bool visible // Mark button NOT to show while future bottom tray extending lldebugs << "Removing " << resizeStateToString(object_type) << " from mResizeState" << llendl; - mResizeState &= ~object_type; + setAutoHidden(object_type, false); // Extend other buttons if need if (delta_width) @@ -1908,4 +1912,21 @@ std::string LLBottomTray::resizeStateMaskToString(MASK mask) return res; } +bool LLBottomTray::isAutoHidden(MASK button_types) const +{ + return (mResizeState & button_types) != 0; +} + +void LLBottomTray::setAutoHidden(MASK button_types, bool hide) +{ + if (hide) + { + mResizeState |= button_types; + } + else + { + mResizeState &= ~button_types; + } +} + //EOF diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h index db7f5bc308..52bcd2ddac 100644 --- a/indra/newview/llbottomtray.h +++ b/indra/newview/llbottomtray.h @@ -449,6 +449,16 @@ private: /// Dump a mask for debugging static std::string resizeStateMaskToString(MASK mask); + /// @return true if any of the the passed buttons have been auto-hidden due to lack of available space. + bool isAutoHidden(MASK button_types) const; + + /** + * (Un)Mark the buttons as hidden. + * + * Auto-hidden buttons are those that re-appear as soon as we have enough available space. + */ + void setAutoHidden(MASK button_types, bool hide); + /// Buttons automatically hidden due to lack of space. MASK mResizeState; -- cgit v1.2.3 From 4a7f69f82008594d5f8d15887917e4b4a85ef587 Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Tue, 12 Apr 2011 00:32:24 +0300 Subject: STORM-1028 WIP Fixing bottom bar buttons reshaping, tier 11 Typo. --- indra/newview/llbottomtray.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index d5d8a27d85..b6482e0ec4 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -1038,23 +1038,23 @@ S32 LLBottomTray::processWidthDecreased(S32 delta_width) { bool still_should_be_processed = true; - const S32 chiclet_panel_shrink_headrom = getChicletPanelShrinkHeadroom(); + const S32 chiclet_panel_shrink_headroom = getChicletPanelShrinkHeadroom(); // There are four steps of processing width decrease. If in one of them required width was reached, // further are not needed. // 1. Decreasing width of chiclet panel. - if (chiclet_panel_shrink_headrom > 0) + if (chiclet_panel_shrink_headroom > 0) { // we have some space to decrease chiclet panel - S32 shrink_by = llmin(-delta_width, chiclet_panel_shrink_headrom); + S32 shrink_by = llmin(-delta_width, chiclet_panel_shrink_headroom); lldebugs << "delta_width: " << delta_width - << ", panel_delta_min: " << chiclet_panel_shrink_headrom + << ", panel_delta_min: " << chiclet_panel_shrink_headroom << ", shrink_by: " << shrink_by << llendl; // is chiclet panel wide enough to process resizing? - delta_width += chiclet_panel_shrink_headrom; + delta_width += chiclet_panel_shrink_headroom; still_should_be_processed = delta_width < 0; -- cgit v1.2.3 From 518181200dec957dccdfdd460fca06b53cb22b5a Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Tue, 12 Apr 2011 01:26:10 +0300 Subject: STORM-1028 WIP Fixing bottom bar buttons reshaping, tier 12 Decreased default nearby char bar width from 310 to 250 px. This enables the Speak button label to be shown by default. --- indra/newview/skins/default/xui/en/panel_bottomtray.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml index 6620808da6..3bb5896c5b 100644 --- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml @@ -47,13 +47,13 @@ mouse_opaque="false" name="chat_bar_layout_panel" user_resize="true" - width="310" > + width="250" > Date: Wed, 13 Apr 2011 15:09:44 -0400 Subject: STORM-1128 Sort the results of using search in the World Map --- doc/contributions.txt | 2 ++ indra/newview/llfloaterworldmap.cpp | 18 +++++++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/doc/contributions.txt b/doc/contributions.txt index f59539d94c..8faf18a598 100644 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -414,6 +414,7 @@ Jonathan Yap STORM-1020 STORM-1064 STORM-1077 + STORM-1128 Kage Pixel VWR-11 Ken March @@ -644,6 +645,7 @@ Robin Cornelius STORM-422 STORM-960 STORM-1019 + STORM-1128 VWR-2488 VWR-9557 VWR-10579 diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index 03cf0332a9..bf5f569e36 100755 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -96,6 +96,14 @@ enum EPanDirection // Values in pixels per region static const F32 ZOOM_MAX = 128.f; +struct SortRegionNames +{ + inline bool operator ()(std::pair & _left, std::pair & _right) + { + return(LLStringUtil::compareInsensitive(_left.second->getName(),_right.second->getName()) < 0); + } +}; + //--------------------------------------------------------------------------- // Globals //--------------------------------------------------------------------------- @@ -1483,10 +1491,14 @@ void LLFloaterWorldMap::updateSims(bool found_null_sim) S32 name_length = mCompletingRegionName.length(); LLSD match; - + S32 num_results = 0; - std::map::const_iterator it; - for (it = LLWorldMap::getInstance()->getRegionMap().begin(); it != LLWorldMap::getInstance()->getRegionMap().end(); ++it) + + std::vector> simInfoVec(LLWorldMap::getInstance()->getRegionMap().begin(), LLWorldMap::getInstance()->getRegionMap().end()); + std::sort(simInfoVec.begin(), simInfoVec.end(), SortRegionNames()); + + std::vector>::const_iterator it; + for (it = simInfoVec.begin(); it != simInfoVec.end(); ++it) { LLSimInfo* info = it->second; std::string sim_name_lower = info->getName(); -- cgit v1.2.3 From 137168ce439de8292a297a86061706780901b55b Mon Sep 17 00:00:00 2001 From: Siana Gearz Date: Sun, 17 Apr 2011 08:04:02 -0400 Subject: STORM-1088: fix loading of winmm.dll --- doc/contributions.txt | 1 + indra/media_plugins/winmmshim/forwarding_api.cpp | 173 +++++++++++++++++++++++ indra/media_plugins/winmmshim/forwarding_api.h | 1 + indra/media_plugins/winmmshim/winmm_shim.cpp | 17 ++- 4 files changed, 189 insertions(+), 3 deletions(-) diff --git a/doc/contributions.txt b/doc/contributions.txt index 71c54e8624..c92450acd2 100644 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -703,6 +703,7 @@ Shawn Kaufmat SNOW-240 Siana Gearz STORM-960 + STORM-1088 SignpostMarv Martin VWR-153 VWR-154 diff --git a/indra/media_plugins/winmmshim/forwarding_api.cpp b/indra/media_plugins/winmmshim/forwarding_api.cpp index eff7e20451..495e08942b 100644 --- a/indra/media_plugins/winmmshim/forwarding_api.cpp +++ b/indra/media_plugins/winmmshim/forwarding_api.cpp @@ -389,90 +389,105 @@ void init_function_pointers(HMODULE winmm_handle) extern "C" { LRESULT WINAPI CloseDriver( HDRVR hDriver, LPARAM lParam1, LPARAM lParam2) { + ll_winmm_shim_initialize(); //OutputDebugString(L"CloseDriver\n"); return CloseDriver_orig( hDriver, lParam1, lParam2); } HDRVR WINAPI OpenDriver( LPCWSTR szDriverName, LPCWSTR szSectionName, LPARAM lParam2) { + ll_winmm_shim_initialize(); //OutputDebugString(L"OpenDriver\n"); return OpenDriver_orig( szDriverName, szSectionName, lParam2); } LRESULT WINAPI SendDriverMessage( HDRVR hDriver, UINT message, LPARAM lParam1, LPARAM lParam2) { + ll_winmm_shim_initialize(); //OutputDebugString(L"SendDriverMessage\n"); return SendDriverMessage_orig( hDriver, message, lParam1, lParam2); } HMODULE WINAPI DrvGetModuleHandle( HDRVR hDriver) { + ll_winmm_shim_initialize(); //OutputDebugString(L"DrvGetModuleHandle\n"); return DrvGetModuleHandle_orig( hDriver); } HMODULE WINAPI GetDriverModuleHandle( HDRVR hDriver) { + ll_winmm_shim_initialize(); //OutputDebugString(L"GetDriverModuleHandle\n"); return GetDriverModuleHandle_orig( hDriver); } LRESULT WINAPI DefDriverProc( DWORD_PTR dwDriverIdentifier, HDRVR hdrvr, UINT uMsg, LPARAM lParam1, LPARAM lParam2) { + ll_winmm_shim_initialize(); //OutputDebugString(L"DefDriverProc\n"); return DefDriverProc_orig( dwDriverIdentifier, hdrvr, uMsg, lParam1, lParam2); } BOOL WINAPI DriverCallback( DWORD dwCallBack, DWORD dwFlags, HDRVR hdrvr, DWORD msg, DWORD dwUser, DWORD dwParam1, DWORD dwParam2) { + ll_winmm_shim_initialize(); //OutputDebugString(L"DriverCallback\n"); return DriverCallback_orig(dwCallBack, dwFlags, hdrvr, msg, dwUser, dwParam1, dwParam2); } UINT WINAPI mmsystemGetVersion(void) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mmsystemGetVersion\n"); return mmsystemGetVersion_orig(); } BOOL WINAPI sndPlaySoundA( LPCSTR pszSound, UINT fuSound) { + ll_winmm_shim_initialize(); //OutputDebugString(L"sndPlaySoundA\n"); return sndPlaySoundA_orig( pszSound, fuSound); } BOOL WINAPI sndPlaySoundW( LPCWSTR pszSound, UINT fuSound) { + ll_winmm_shim_initialize(); //OutputDebugString(L"sndPlaySoundW\n"); return sndPlaySoundW_orig( pszSound, fuSound); } BOOL WINAPI PlaySoundA( LPCSTR pszSound, HMODULE hmod, DWORD fdwSound) { + ll_winmm_shim_initialize(); //OutputDebugString(L"PlaySoundA\n"); return PlaySoundA_orig( pszSound, hmod, fdwSound); } BOOL WINAPI PlaySoundW( LPCWSTR pszSound, HMODULE hmod, DWORD fdwSound) { + ll_winmm_shim_initialize(); //OutputDebugString(L"PlaySoundW\n"); return PlaySoundW_orig( pszSound, hmod, fdwSound); } UINT WINAPI waveOutGetNumDevs(void) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveOutGetNumDevs\n"); return waveOutGetNumDevs_orig(); } MMRESULT WINAPI waveOutGetDevCapsA( UINT_PTR uDeviceID, LPWAVEOUTCAPSA pwoc, UINT cbwoc) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveOutGetDevCapsA\n"); return waveOutGetDevCapsA_orig( uDeviceID, pwoc, cbwoc); } MMRESULT WINAPI waveOutGetDevCapsW( UINT_PTR uDeviceID, LPWAVEOUTCAPSW pwoc, UINT cbwoc) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveOutGetDevCapsW\n"); return waveOutGetDevCapsW_orig( uDeviceID, pwoc, cbwoc); } @@ -480,24 +495,28 @@ extern "C" { MMRESULT WINAPI waveOutGetVolume( HWAVEOUT hwo, LPDWORD pdwVolume) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveOutGetVolume\n"); return waveOutGetVolume_orig( hwo, pdwVolume); } MMRESULT WINAPI waveOutSetVolume( HWAVEOUT hwo, DWORD dwVolume) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveOutSetVolume\n"); return waveOutSetVolume_orig( hwo, dwVolume); } MMRESULT WINAPI waveOutGetErrorTextA( MMRESULT mmrError, LPSTR pszText, UINT cchText) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveOutGetErrorTextA\n"); return waveOutGetErrorTextA_orig( mmrError, pszText, cchText); } MMRESULT WINAPI waveOutGetErrorTextW( MMRESULT mmrError, LPWSTR pszText, UINT cchText) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveOutGetErrorTextW\n"); return waveOutGetErrorTextW_orig( mmrError, pszText, cchText); } @@ -516,12 +535,14 @@ extern "C" { MMRESULT WINAPI waveOutPrepareHeader( HWAVEOUT hwo, LPWAVEHDR pwh, UINT cbwh) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveOutPrepareHeader\n"); return waveOutPrepareHeader_orig( hwo, pwh, cbwh); } MMRESULT WINAPI waveOutUnprepareHeader( HWAVEOUT hwo, LPWAVEHDR pwh, UINT cbwh) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveOutUnprepareHeader\n"); return waveOutUnprepareHeader_orig( hwo, pwh, cbwh); } @@ -535,834 +556,973 @@ extern "C" { MMRESULT WINAPI waveOutPause( HWAVEOUT hwo) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveOutPause\n"); return waveOutPause_orig( hwo); } MMRESULT WINAPI waveOutRestart( HWAVEOUT hwo) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveOutRestart\n"); return waveOutRestart_orig( hwo); } MMRESULT WINAPI waveOutReset( HWAVEOUT hwo) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveOutReset\n"); return waveOutReset_orig( hwo); } MMRESULT WINAPI waveOutBreakLoop( HWAVEOUT hwo) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveOutBreakLoop\n"); return waveOutBreakLoop_orig( hwo); } MMRESULT WINAPI waveOutGetPosition( HWAVEOUT hwo, LPMMTIME pmmt, UINT cbmmt) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveOutGetPosition\n"); return waveOutGetPosition_orig( hwo, pmmt, cbmmt); } MMRESULT WINAPI waveOutGetPitch( HWAVEOUT hwo, LPDWORD pdwPitch) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveOutGetPitch\n"); return waveOutGetPitch_orig( hwo, pdwPitch); } MMRESULT WINAPI waveOutSetPitch( HWAVEOUT hwo, DWORD dwPitch) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveOutSetPitch\n"); return waveOutSetPitch_orig( hwo, dwPitch); } MMRESULT WINAPI waveOutGetPlaybackRate( HWAVEOUT hwo, LPDWORD pdwRate) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveOutGetPlaybackRate\n"); return waveOutGetPlaybackRate_orig( hwo, pdwRate); } MMRESULT WINAPI waveOutSetPlaybackRate( HWAVEOUT hwo, DWORD dwRate) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveOutSetPlaybackRate\n"); return waveOutSetPlaybackRate_orig( hwo, dwRate); } MMRESULT WINAPI waveOutGetID( HWAVEOUT hwo, LPUINT puDeviceID) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveOutGetID\n"); return waveOutGetID_orig( hwo, puDeviceID); } MMRESULT WINAPI waveOutMessage( HWAVEOUT hwo, UINT uMsg, DWORD_PTR dw1, DWORD_PTR dw2) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveOutMessage\n"); return waveOutMessage_orig( hwo, uMsg, dw1, dw2); } UINT WINAPI waveInGetNumDevs(void) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveInGetNumDevs\n"); return waveInGetNumDevs_orig(); } MMRESULT WINAPI waveInGetDevCapsA( UINT_PTR uDeviceID, LPWAVEINCAPSA pwic, UINT cbwic) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveInGetDevCapsA\n"); return waveInGetDevCapsA_orig( uDeviceID, pwic, cbwic); } MMRESULT WINAPI waveInGetDevCapsW( UINT_PTR uDeviceID, LPWAVEINCAPSW pwic, UINT cbwic) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveInGetDevCapsW\n"); return waveInGetDevCapsW_orig( uDeviceID, pwic, cbwic); } MMRESULT WINAPI waveInGetErrorTextA(MMRESULT mmrError, LPSTR pszText, UINT cchText) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveInGetErrorTextA\n"); return waveInGetErrorTextA_orig(mmrError, pszText, cchText); } MMRESULT WINAPI waveInGetErrorTextW(MMRESULT mmrError, LPWSTR pszText, UINT cchText) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveInGetErrorTextW\n"); return waveInGetErrorTextW_orig(mmrError, pszText, cchText); } MMRESULT WINAPI waveInOpen( LPHWAVEIN phwi, UINT uDeviceID, LPCWAVEFORMATEX pwfx, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveInOpen\n"); return waveInOpen_orig(phwi, uDeviceID, pwfx, dwCallback, dwInstance, fdwOpen); } MMRESULT WINAPI waveInClose( HWAVEIN hwi) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveInClose\n"); return waveInClose_orig( hwi); } MMRESULT WINAPI waveInPrepareHeader( HWAVEIN hwi, LPWAVEHDR pwh, UINT cbwh) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveInPrepareHeader\n"); return waveInPrepareHeader_orig( hwi, pwh, cbwh); } MMRESULT WINAPI waveInUnprepareHeader( HWAVEIN hwi, LPWAVEHDR pwh, UINT cbwh) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveInUnprepareHeader\n"); return waveInUnprepareHeader_orig( hwi, pwh, cbwh); } MMRESULT WINAPI waveInAddBuffer( HWAVEIN hwi, LPWAVEHDR pwh, UINT cbwh) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveInAddBuffer\n"); return waveInAddBuffer_orig( hwi, pwh, cbwh); } MMRESULT WINAPI waveInStart( HWAVEIN hwi) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveInStart\n"); return waveInStart_orig( hwi); } MMRESULT WINAPI waveInStop( HWAVEIN hwi) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveInStop\n"); return waveInStop_orig(hwi); } MMRESULT WINAPI waveInReset( HWAVEIN hwi) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveInReset\n"); return waveInReset_orig(hwi); } MMRESULT WINAPI waveInGetPosition( HWAVEIN hwi, LPMMTIME pmmt, UINT cbmmt) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveInGetPosition\n"); return waveInGetPosition_orig( hwi, pmmt, cbmmt); } MMRESULT WINAPI waveInGetID( HWAVEIN hwi, LPUINT puDeviceID) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveInGetID\n"); return waveInGetID_orig( hwi, puDeviceID); } MMRESULT WINAPI waveInMessage( HWAVEIN hwi, UINT uMsg, DWORD_PTR dw1, DWORD_PTR dw2) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveInMessage\n"); return waveInMessage_orig( hwi, uMsg, dw1, dw2); } UINT WINAPI midiOutGetNumDevs(void) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiOutGetNumDevs\n"); return midiOutGetNumDevs_orig(); } MMRESULT WINAPI midiStreamOpen( LPHMIDISTRM phms, LPUINT puDeviceID, DWORD cMidi, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiStreamOpen\n"); return midiStreamOpen_orig( phms, puDeviceID, cMidi, dwCallback, dwInstance, fdwOpen); } MMRESULT WINAPI midiStreamClose( HMIDISTRM hms) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiStreamClose\n"); return midiStreamClose_orig( hms); } MMRESULT WINAPI midiStreamProperty( HMIDISTRM hms, LPBYTE lppropdata, DWORD dwProperty) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiStreamProperty\n"); return midiStreamProperty_orig( hms, lppropdata, dwProperty); } MMRESULT WINAPI midiStreamPosition( HMIDISTRM hms, LPMMTIME lpmmt, UINT cbmmt) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiStreamPosition\n"); return midiStreamPosition_orig( hms, lpmmt, cbmmt); } MMRESULT WINAPI midiStreamOut( HMIDISTRM hms, LPMIDIHDR pmh, UINT cbmh) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiStreamOut\n"); return midiStreamOut_orig( hms, pmh, cbmh); } MMRESULT WINAPI midiStreamPause( HMIDISTRM hms) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiStreamPause\n"); return midiStreamPause_orig( hms); } MMRESULT WINAPI midiStreamRestart( HMIDISTRM hms) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiStreamRestart\n"); return midiStreamRestart_orig( hms); } MMRESULT WINAPI midiStreamStop( HMIDISTRM hms) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiStreamStop\n"); return midiStreamStop_orig( hms); } MMRESULT WINAPI midiConnect( HMIDI hmi, HMIDIOUT hmo, LPVOID pReserved) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiConnect\n"); return midiConnect_orig( hmi, hmo, pReserved); } MMRESULT WINAPI midiDisconnect( HMIDI hmi, HMIDIOUT hmo, LPVOID pReserved) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiDisconnect\n"); return midiDisconnect_orig( hmi, hmo, pReserved); } MMRESULT WINAPI midiOutGetDevCapsA( UINT_PTR uDeviceID, LPMIDIOUTCAPSA pmoc, UINT cbmoc) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiOutGetDevCapsA\n"); return midiOutGetDevCapsA_orig( uDeviceID, pmoc, cbmoc); } MMRESULT WINAPI midiOutGetDevCapsW( UINT_PTR uDeviceID, LPMIDIOUTCAPSW pmoc, UINT cbmoc) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiOutGetDevCapsW\n"); return midiOutGetDevCapsW_orig( uDeviceID, pmoc, cbmoc); } MMRESULT WINAPI midiOutGetVolume( HMIDIOUT hmo, LPDWORD pdwVolume) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiOutGetVolume\n"); return midiOutGetVolume_orig( hmo, pdwVolume); } MMRESULT WINAPI midiOutSetVolume( HMIDIOUT hmo, DWORD dwVolume) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiOutSetVolume\n"); return midiOutSetVolume_orig( hmo, dwVolume); } MMRESULT WINAPI midiOutGetErrorTextA( MMRESULT mmrError, LPSTR pszText, UINT cchText) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiOutGetErrorTextA\n"); return midiOutGetErrorTextA_orig( mmrError, pszText, cchText); } MMRESULT WINAPI midiOutGetErrorTextW( MMRESULT mmrError, LPWSTR pszText, UINT cchText) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiOutGetErrorTextW\n"); return midiOutGetErrorTextW_orig( mmrError, pszText, cchText); } MMRESULT WINAPI midiOutOpen( LPHMIDIOUT phmo, UINT uDeviceID, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiOutOpen\n"); return midiOutOpen_orig(phmo, uDeviceID, dwCallback, dwInstance, fdwOpen); } MMRESULT WINAPI midiOutClose( HMIDIOUT hmo) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiOutClose\n"); return midiOutClose_orig( hmo); } MMRESULT WINAPI midiOutPrepareHeader( HMIDIOUT hmo, LPMIDIHDR pmh, UINT cbmh) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiOutPrepareHeader\n"); return midiOutPrepareHeader_orig( hmo, pmh, cbmh); } MMRESULT WINAPI midiOutUnprepareHeader(HMIDIOUT hmo, LPMIDIHDR pmh, UINT cbmh) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiOutUnprepareHeader\n"); return midiOutUnprepareHeader_orig(hmo, pmh, cbmh); } MMRESULT WINAPI midiOutShortMsg( HMIDIOUT hmo, DWORD dwMsg) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiOutShortMsg\n"); return midiOutShortMsg_orig( hmo, dwMsg); } MMRESULT WINAPI midiOutLongMsg(HMIDIOUT hmo, LPMIDIHDR pmh, UINT cbmh) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiOutLongMsg\n"); return midiOutLongMsg_orig(hmo, pmh, cbmh); } MMRESULT WINAPI midiOutReset( HMIDIOUT hmo) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiOutReset\n"); return midiOutReset_orig( hmo); } MMRESULT WINAPI midiOutCachePatches( HMIDIOUT hmo, UINT uBank, LPWORD pwpa, UINT fuCache) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiOutCachePatches\n"); return midiOutCachePatches_orig( hmo, uBank, pwpa, fuCache); } MMRESULT WINAPI midiOutCacheDrumPatches( HMIDIOUT hmo, UINT uPatch, LPWORD pwkya, UINT fuCache) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiOutCacheDrumPatches\n"); return midiOutCacheDrumPatches_orig( hmo, uPatch, pwkya, fuCache); } MMRESULT WINAPI midiOutGetID( HMIDIOUT hmo, LPUINT puDeviceID) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiOutGetID\n"); return midiOutGetID_orig( hmo, puDeviceID); } MMRESULT WINAPI midiOutMessage( HMIDIOUT hmo, UINT uMsg, DWORD_PTR dw1, DWORD_PTR dw2) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiOutMessage\n"); return midiOutMessage_orig( hmo, uMsg, dw1, dw2); } UINT WINAPI midiInGetNumDevs(void) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiInGetNumDevs\n"); return midiInGetNumDevs_orig(); } MMRESULT WINAPI midiInGetDevCapsA( UINT_PTR uDeviceID, LPMIDIINCAPSA pmic, UINT cbmic) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiInGetDevCapsA\n"); return midiInGetDevCapsA_orig( uDeviceID, pmic, cbmic); } MMRESULT WINAPI midiInGetDevCapsW( UINT_PTR uDeviceID, LPMIDIINCAPSW pmic, UINT cbmic) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiInGetDevCapsW\n"); return midiInGetDevCapsW_orig( uDeviceID, pmic, cbmic); } MMRESULT WINAPI midiInGetErrorTextA( MMRESULT mmrError, LPSTR pszText, UINT cchText) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiInGetErrorTextA\n"); return midiInGetErrorTextA_orig( mmrError, pszText, cchText); } MMRESULT WINAPI midiInGetErrorTextW( MMRESULT mmrError, LPWSTR pszText, UINT cchText) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiInGetErrorTextW\n"); return midiInGetErrorTextW_orig( mmrError, pszText, cchText); } MMRESULT WINAPI midiInOpen( LPHMIDIIN phmi, UINT uDeviceID, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiInOpen\n"); return midiInOpen_orig(phmi, uDeviceID, dwCallback, dwInstance, fdwOpen); } MMRESULT WINAPI midiInClose( HMIDIIN hmi) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiInClose\n"); return midiInClose_orig( hmi); } MMRESULT WINAPI midiInPrepareHeader( HMIDIIN hmi, LPMIDIHDR pmh, UINT cbmh) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiInPrepareHeader\n"); return midiInPrepareHeader_orig( hmi, pmh, cbmh); } MMRESULT WINAPI midiInUnprepareHeader( HMIDIIN hmi, LPMIDIHDR pmh, UINT cbmh) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiInUnprepareHeader\n"); return midiInUnprepareHeader_orig( hmi, pmh, cbmh); } MMRESULT WINAPI midiInAddBuffer( HMIDIIN hmi, LPMIDIHDR pmh, UINT cbmh) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiInAddBuffer\n"); return midiInAddBuffer_orig( hmi, pmh, cbmh); } MMRESULT WINAPI midiInStart( HMIDIIN hmi) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiInStart\n"); return midiInStart_orig( hmi); } MMRESULT WINAPI midiInStop( HMIDIIN hmi) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiInStop\n"); return midiInStop_orig(hmi); } MMRESULT WINAPI midiInReset( HMIDIIN hmi) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiInReset\n"); return midiInReset_orig( hmi); } MMRESULT WINAPI midiInGetID( HMIDIIN hmi, LPUINT puDeviceID) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiInGetID\n"); return midiInGetID_orig( hmi, puDeviceID); } MMRESULT WINAPI midiInMessage( HMIDIIN hmi, UINT uMsg, DWORD_PTR dw1, DWORD_PTR dw2) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiInMessage\n"); return midiInMessage_orig( hmi, uMsg, dw1, dw2); } UINT WINAPI auxGetNumDevs(void) { + ll_winmm_shim_initialize(); //OutputDebugString(L"auxGetNumDevs\n"); return auxGetNumDevs_orig(); } MMRESULT WINAPI auxGetDevCapsA( UINT_PTR uDeviceID, LPAUXCAPSA pac, UINT cbac) { + ll_winmm_shim_initialize(); //OutputDebugString(L"auxGetDevCapsA\n"); return auxGetDevCapsA_orig( uDeviceID, pac, cbac); } MMRESULT WINAPI auxGetDevCapsW( UINT_PTR uDeviceID, LPAUXCAPSW pac, UINT cbac) { + ll_winmm_shim_initialize(); //OutputDebugString(L"auxGetDevCapsW\n"); return auxGetDevCapsW_orig( uDeviceID, pac, cbac); } MMRESULT WINAPI auxSetVolume( UINT uDeviceID, DWORD dwVolume) { + ll_winmm_shim_initialize(); //OutputDebugString(L"auxSetVolume\n"); return auxSetVolume_orig( uDeviceID, dwVolume); } MMRESULT WINAPI auxGetVolume( UINT uDeviceID, LPDWORD pdwVolume) { + ll_winmm_shim_initialize(); //OutputDebugString(L"auxGetVolume\n"); return auxGetVolume_orig( uDeviceID, pdwVolume); } MMRESULT WINAPI auxOutMessage( UINT uDeviceID, UINT uMsg, DWORD_PTR dw1, DWORD_PTR dw2) { + ll_winmm_shim_initialize(); //OutputDebugString(L"auxOutMessage\n"); return auxOutMessage_orig( uDeviceID, uMsg, dw1, dw2); } UINT WINAPI mixerGetNumDevs(void) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mixerGetNumDevs\n"); return mixerGetNumDevs_orig(); } MMRESULT WINAPI mixerGetDevCapsA( UINT_PTR uMxId, LPMIXERCAPSA pmxcaps, UINT cbmxcaps) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mixerGetDevCapsA\n"); return mixerGetDevCapsA_orig( uMxId, pmxcaps, cbmxcaps); } MMRESULT WINAPI mixerGetDevCapsW( UINT_PTR uMxId, LPMIXERCAPSW pmxcaps, UINT cbmxcaps) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mixerGetDevCapsW\n"); return mixerGetDevCapsW_orig( uMxId, pmxcaps, cbmxcaps); } MMRESULT WINAPI mixerOpen( LPHMIXER phmx, UINT uMxId, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mixerOpen\n"); return mixerOpen_orig( phmx, uMxId, dwCallback, dwInstance, fdwOpen); } MMRESULT WINAPI mixerClose( HMIXER hmx) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mixerClose\n"); return mixerClose_orig( hmx); } DWORD WINAPI mixerMessage( HMIXER hmx, UINT uMsg, DWORD_PTR dwParam1, DWORD_PTR dwParam2) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mixerMessage\n"); return mixerMessage_orig( hmx, uMsg, dwParam1, dwParam2); } MMRESULT WINAPI mixerGetLineInfoA( HMIXEROBJ hmxobj, LPMIXERLINEA pmxl, DWORD fdwInfo) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mixerGetLineInfoA\n"); return mixerGetLineInfoA_orig( hmxobj, pmxl, fdwInfo); } MMRESULT WINAPI mixerGetLineInfoW( HMIXEROBJ hmxobj, LPMIXERLINEW pmxl, DWORD fdwInfo) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mixerGetLineInfoW\n"); return mixerGetLineInfoW_orig( hmxobj, pmxl, fdwInfo); } MMRESULT WINAPI mixerGetID( HMIXEROBJ hmxobj, UINT FAR *puMxId, DWORD fdwId) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mixerGetID\n"); return mixerGetID_orig( hmxobj, puMxId, fdwId); } MMRESULT WINAPI mixerGetLineControlsA( HMIXEROBJ hmxobj, LPMIXERLINECONTROLSA pmxlc, DWORD fdwControls) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mixerGetLineControlsA\n"); return mixerGetLineControlsA_orig( hmxobj, pmxlc, fdwControls); } MMRESULT WINAPI mixerGetLineControlsW( HMIXEROBJ hmxobj, LPMIXERLINECONTROLSW pmxlc, DWORD fdwControls) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mixerGetLineControlsW\n"); return mixerGetLineControlsW_orig( hmxobj, pmxlc, fdwControls); } MMRESULT WINAPI mixerGetControlDetailsA( HMIXEROBJ hmxobj, LPMIXERCONTROLDETAILS pmxcd, DWORD fdwDetails) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mixerGetControlDetailsA\n"); return mixerGetControlDetailsA_orig( hmxobj, pmxcd, fdwDetails); } MMRESULT WINAPI mixerGetControlDetailsW( HMIXEROBJ hmxobj, LPMIXERCONTROLDETAILS pmxcd, DWORD fdwDetails) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mixerGetControlDetailsW\n"); return mixerGetControlDetailsW_orig( hmxobj, pmxcd, fdwDetails); } MMRESULT WINAPI mixerSetControlDetails( HMIXEROBJ hmxobj, LPMIXERCONTROLDETAILS pmxcd, DWORD fdwDetails) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mixerSetControlDetails\n"); return mixerSetControlDetails_orig( hmxobj, pmxcd, fdwDetails); } DWORD WINAPI mmGetCurrentTask(void) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mmGetCurrentTask\n"); return mmGetCurrentTask_orig(); } void WINAPI mmTaskBlock(DWORD val) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mmTaskBlock\n"); return mmTaskBlock_orig(val); } UINT WINAPI mmTaskCreate(LPTASKCALLBACK a, HANDLE* b, DWORD_PTR c) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mmTaskCreate\n"); return mmTaskCreate_orig(a, b, c); } BOOL WINAPI mmTaskSignal(DWORD a) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mmTaskSignal\n"); return mmTaskSignal_orig(a); } VOID WINAPI mmTaskYield() { + ll_winmm_shim_initialize(); //OutputDebugString(L"mmTaskYield\n"); mmTaskYield_orig(); } MMRESULT WINAPI timeGetSystemTime( LPMMTIME pmmt, UINT cbmmt) { + ll_winmm_shim_initialize(); //OutputDebugString(L"timeGetSystemTime\n"); return timeGetSystemTime_orig( pmmt, cbmmt); } DWORD WINAPI timeGetTime(void) { + ll_winmm_shim_initialize(); //OutputDebugString(L"timeGetTime\n"); return timeGetTime_orig(); } MMRESULT WINAPI timeSetEvent( UINT uDelay, UINT uResolution, LPTIMECALLBACK fptc, DWORD_PTR dwUser, UINT fuEvent) { + ll_winmm_shim_initialize(); //OutputDebugString(L"timeSetEvent\n"); return timeSetEvent_orig(uDelay, uResolution, fptc, dwUser, fuEvent); } MMRESULT WINAPI timeKillEvent( UINT uTimerID) { + ll_winmm_shim_initialize(); //OutputDebugString(L"timeKillEvent\n"); return timeKillEvent_orig( uTimerID); } MMRESULT WINAPI timeGetDevCaps( LPTIMECAPS ptc, UINT cbtc) { + ll_winmm_shim_initialize(); //OutputDebugString(L"timeGetDevCaps\n"); return timeGetDevCaps_orig( ptc, cbtc); } MMRESULT WINAPI timeBeginPeriod( UINT uPeriod) { + ll_winmm_shim_initialize(); //OutputDebugString(L"timeBeginPeriod\n"); return timeBeginPeriod_orig( uPeriod); } MMRESULT WINAPI timeEndPeriod( UINT uPeriod) { + ll_winmm_shim_initialize(); //OutputDebugString(L"timeEndPeriod\n"); return timeEndPeriod_orig( uPeriod); } UINT WINAPI joyGetNumDevs(void) { + ll_winmm_shim_initialize(); //OutputDebugString(L"joyGetNumDevs\n"); return joyGetNumDevs_orig(); } MMRESULT WINAPI joyConfigChanged(DWORD dwFlags) { + ll_winmm_shim_initialize(); //OutputDebugString(L"joyConfigChanged\n"); return joyConfigChanged_orig(dwFlags); } MMRESULT WINAPI joyGetDevCapsA( UINT_PTR uJoyID, LPJOYCAPSA pjc, UINT cbjc) { + ll_winmm_shim_initialize(); //OutputDebugString(L"joyGetDevCapsA\n"); return joyGetDevCapsA_orig( uJoyID, pjc, cbjc); } MMRESULT WINAPI joyGetDevCapsW( UINT_PTR uJoyID, LPJOYCAPSW pjc, UINT cbjc) { + ll_winmm_shim_initialize(); //OutputDebugString(L"joyGetDevCapsW\n"); return joyGetDevCapsW_orig( uJoyID, pjc, cbjc); } MMRESULT WINAPI joyGetPos( UINT uJoyID, LPJOYINFO pji) { + ll_winmm_shim_initialize(); //OutputDebugString(L"joyGetPos\n"); return joyGetPos_orig( uJoyID, pji); } MMRESULT WINAPI joyGetPosEx( UINT uJoyID, LPJOYINFOEX pji) { + ll_winmm_shim_initialize(); //OutputDebugString(L"joyGetPosEx\n"); return joyGetPosEx_orig( uJoyID, pji); } MMRESULT WINAPI joyGetThreshold( UINT uJoyID, LPUINT puThreshold) { + ll_winmm_shim_initialize(); //OutputDebugString(L"joyGetThreshold\n"); return joyGetThreshold_orig( uJoyID, puThreshold); } MMRESULT WINAPI joyReleaseCapture( UINT uJoyID) { + ll_winmm_shim_initialize(); //OutputDebugString(L"joyReleaseCapture\n"); return joyReleaseCapture_orig( uJoyID); } MMRESULT WINAPI joySetCapture( HWND hwnd, UINT uJoyID, UINT uPeriod, BOOL fChanged) { + ll_winmm_shim_initialize(); //OutputDebugString(L"joySetCapture\n"); return joySetCapture_orig(hwnd, uJoyID, uPeriod, fChanged); } MMRESULT WINAPI joySetThreshold( UINT uJoyID, UINT uThreshold) { + ll_winmm_shim_initialize(); //OutputDebugString(L"joySetThreshold\n"); return joySetThreshold_orig( uJoyID, uThreshold); } BOOL WINAPI mciDriverNotify(HWND hwndCallback, UINT uDeviceID, UINT uStatus) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mciDriverNotify\n"); return mciDriverNotify_orig(hwndCallback, uDeviceID, uStatus); } UINT WINAPI mciDriverYield(UINT uDeviceID) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mciDriverYield\n"); return mciDriverYield_orig(uDeviceID); } FOURCC WINAPI mmioStringToFOURCCA( LPCSTR sz, UINT uFlags) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mmioStringToFOURCCA\n"); return mmioStringToFOURCCA_orig( sz, uFlags); } FOURCC WINAPI mmioStringToFOURCCW( LPCWSTR sz, UINT uFlags) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mmioStringToFOURCCW\n"); return mmioStringToFOURCCW_orig( sz, uFlags); } LPMMIOPROC WINAPI mmioInstallIOProcA( FOURCC fccIOProc, LPMMIOPROC pIOProc, DWORD dwFlags) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mmioInstallIOProcA\n"); return mmioInstallIOProcA_orig( fccIOProc, pIOProc, dwFlags); } LPMMIOPROC WINAPI mmioInstallIOProcW( FOURCC fccIOProc, LPMMIOPROC pIOProc, DWORD dwFlags) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mmioInstallIOProcW\n"); return mmioInstallIOProcW_orig( fccIOProc, pIOProc, dwFlags); } HMMIO WINAPI mmioOpenA( LPSTR pszFileName, LPMMIOINFO pmmioinfo, DWORD fdwOpen) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mmioOpenA\n"); return mmioOpenA_orig( pszFileName, pmmioinfo, fdwOpen); } HMMIO WINAPI mmioOpenW( LPWSTR pszFileName, LPMMIOINFO pmmioinfo, DWORD fdwOpen) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mmioOpenW\n"); return mmioOpenW_orig( pszFileName, pmmioinfo, fdwOpen); } MMRESULT WINAPI mmioRenameA( LPCSTR pszFileName, LPCSTR pszNewFileName, LPCMMIOINFO pmmioinfo, DWORD fdwRename) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mmioRenameA\n"); return mmioRenameA_orig( pszFileName, pszNewFileName, pmmioinfo, fdwRename); } MMRESULT WINAPI mmioRenameW( LPCWSTR pszFileName, LPCWSTR pszNewFileName, LPCMMIOINFO pmmioinfo, DWORD fdwRename) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mmioRenameW\n"); return mmioRenameW_orig( pszFileName, pszNewFileName, pmmioinfo, fdwRename); } MMRESULT WINAPI mmioClose( HMMIO hmmio, UINT fuClose) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mmioClose\n"); return mmioClose_orig( hmmio, fuClose); } LONG WINAPI mmioRead( HMMIO hmmio, HPSTR pch, LONG cch) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mmioRead\n"); return mmioRead_orig( hmmio, pch, cch); } LONG WINAPI mmioWrite( HMMIO hmmio, const char _huge* pch, LONG cch) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mmioWrite\n"); return mmioWrite_orig( hmmio, pch, cch); } LONG WINAPI mmioSeek( HMMIO hmmio, LONG lOffset, int iOrigin) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mmioSeek\n"); return mmioSeek_orig(hmmio, lOffset, iOrigin); } MMRESULT WINAPI mmioGetInfo( HMMIO hmmio, LPMMIOINFO pmmioinfo, UINT fuInfo) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mmioGetInfo\n"); return mmioGetInfo_orig( hmmio, pmmioinfo, fuInfo); } MMRESULT WINAPI mmioSetInfo( HMMIO hmmio, LPCMMIOINFO pmmioinfo, UINT fuInfo) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mmioSetInfo\n"); return mmioSetInfo_orig( hmmio, pmmioinfo, fuInfo); } MMRESULT WINAPI mmioSetBuffer( HMMIO hmmio, LPSTR pchBuffer, LONG cchBuffer, UINT fuBuffer) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mmioSetBuffer\n"); return mmioSetBuffer_orig(hmmio, pchBuffer, cchBuffer, fuBuffer); } MMRESULT WINAPI mmioFlush( HMMIO hmmio, UINT fuFlush) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mmioFlush\n"); return mmioFlush_orig( hmmio, fuFlush); } MMRESULT WINAPI mmioAdvance( HMMIO hmmio, LPMMIOINFO pmmioinfo, UINT fuAdvance) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mmioAdvance\n"); return mmioAdvance_orig( hmmio, pmmioinfo, fuAdvance); } LRESULT WINAPI mmioSendMessage( HMMIO hmmio, UINT uMsg, LPARAM lParam1, LPARAM lParam2) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mmioSendMessage\n"); return mmioSendMessage_orig(hmmio, uMsg, lParam1, lParam2); } MMRESULT WINAPI mmioDescend( HMMIO hmmio, LPMMCKINFO pmmcki, const MMCKINFO FAR* pmmckiParent, UINT fuDescend) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mmioDescend\n"); return mmioDescend_orig(hmmio, pmmcki, pmmckiParent, fuDescend); } MMRESULT WINAPI mmioAscend( HMMIO hmmio, LPMMCKINFO pmmcki, UINT fuAscend) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mmioAscend\n"); return mmioAscend_orig( hmmio, pmmcki, fuAscend); } MMRESULT WINAPI mmioCreateChunk(HMMIO hmmio, LPMMCKINFO pmmcki, UINT fuCreate) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mmioCreateChunk\n"); return mmioCreateChunk_orig(hmmio, pmmcki, fuCreate); } MCIERROR WINAPI mciSendCommandA( MCIDEVICEID mciId, UINT uMsg, DWORD_PTR dwParam1, DWORD_PTR dwParam2) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mciSendCommandA\n"); return mciSendCommandA_orig( mciId, uMsg, dwParam1, dwParam2); } MCIERROR WINAPI mciSendCommandW( MCIDEVICEID mciId, UINT uMsg, DWORD_PTR dwParam1, DWORD_PTR dwParam2) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mciSendCommandW\n"); return mciSendCommandW_orig( mciId, uMsg, dwParam1, dwParam2); } MCIERROR WINAPI mciSendStringA( LPCSTR lpstrCommand, LPSTR lpstrReturnString, UINT uReturnLength, HWND hwndCallback) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mciSendStringA\n"); return mciSendStringA_orig( lpstrCommand, lpstrReturnString, uReturnLength, hwndCallback); } MCIERROR WINAPI mciSendStringW( LPCWSTR lpstrCommand, LPWSTR lpstrReturnString, UINT uReturnLength, HWND hwndCallback) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mciSendStringW\n"); return mciSendStringW_orig( lpstrCommand, lpstrReturnString, uReturnLength, hwndCallback); } @@ -1375,72 +1535,84 @@ extern "C" { MCIDEVICEID WINAPI mciGetDeviceIDW( LPCWSTR pszDevice) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mciGetDeviceIDW\n"); return mciGetDeviceIDW_orig( pszDevice); } MCIDEVICEID WINAPI mciGetDeviceIDFromElementIDA( DWORD dwElementID, LPCSTR lpstrType ) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mciGetDeviceIDFromElementIDA\n"); return mciGetDeviceIDFromElementIDA_orig( dwElementID, lpstrType ); } MCIDEVICEID WINAPI mciGetDeviceIDFromElementIDW( DWORD dwElementID, LPCWSTR lpstrType ) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mciGetDeviceIDFromElementIDW\n"); return mciGetDeviceIDFromElementIDW_orig( dwElementID, lpstrType ); } DWORD_PTR WINAPI mciGetDriverData(UINT uDeviceID) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mciGetDriverData\n"); return mciGetDriverData_orig(uDeviceID); } BOOL WINAPI mciGetErrorStringA( MCIERROR mcierr, LPSTR pszText, UINT cchText) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mciGetErrorStringA\n"); return mciGetErrorStringA_orig( mcierr, pszText, cchText); } BOOL WINAPI mciGetErrorStringW( MCIERROR mcierr, LPWSTR pszText, UINT cchText) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mciGetErrorStringW\n"); return mciGetErrorStringW_orig( mcierr, pszText, cchText); } BOOL WINAPI mciSetDriverData(UINT uDeviceID, DWORD_PTR dwData) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mciSetDriverData_type\n"); return mciSetDriverData_orig( uDeviceID, dwData ); } BOOL WINAPI mciSetYieldProc( MCIDEVICEID mciId, YIELDPROC fpYieldProc, DWORD dwYieldData) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mciSetYieldProc\n"); return mciSetYieldProc_orig(mciId, fpYieldProc, dwYieldData); } BOOL WINAPI mciFreeCommandResource(UINT uTable) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mciFreeCommandResource\n"); return mciFreeCommandResource_orig(uTable); } HTASK WINAPI mciGetCreatorTask( MCIDEVICEID mciId) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mciGetCreatorTask\n"); return mciGetCreatorTask_orig( mciId); } YIELDPROC WINAPI mciGetYieldProc( MCIDEVICEID mciId, LPDWORD pdwYieldData) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mciGetYieldProc\n"); return mciGetYieldProc_orig( mciId, pdwYieldData); } UINT WINAPI mciLoadCommandResource(HINSTANCE hInstance, LPCWSTR lpResName, UINT uType) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mciLoadCommandResource"); return mciLoadCommandResource_orig(hInstance, lpResName, uType); } @@ -1448,6 +1620,7 @@ extern "C" { BOOL WINAPI mciExecute(LPCSTR pszCommand) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mciExecute\n"); return mciExecute_orig(pszCommand); } diff --git a/indra/media_plugins/winmmshim/forwarding_api.h b/indra/media_plugins/winmmshim/forwarding_api.h index 89a6b347f3..076a08f769 100644 --- a/indra/media_plugins/winmmshim/forwarding_api.h +++ b/indra/media_plugins/winmmshim/forwarding_api.h @@ -30,6 +30,7 @@ #include void init_function_pointers(HMODULE winmm_handle); +void ll_winmm_shim_initialize(); typedef VOID (*LPTASKCALLBACK)(DWORD_PTR dwInst); diff --git a/indra/media_plugins/winmmshim/winmm_shim.cpp b/indra/media_plugins/winmmshim/winmm_shim.cpp index 9563a3b664..6ba95e565e 100644 --- a/indra/media_plugins/winmmshim/winmm_shim.cpp +++ b/indra/media_plugins/winmmshim/winmm_shim.cpp @@ -32,14 +32,21 @@ using std::wstring; static float sVolumeLevel = 1.f; static bool sMute = false; +static CRITICAL_SECTION sCriticalSection; BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { + InitializeCriticalSectionAndSpinCount(&sCriticalSection, 0x00000400); + return TRUE; +} + +void ll_winmm_shim_initialize(){ static bool initialized = false; // do this only once + EnterCriticalSection(&sCriticalSection); if (!initialized) { // bind to original winmm.dll TCHAR system_path[MAX_PATH]; @@ -54,13 +61,14 @@ BOOL APIENTRY DllMain( HMODULE hModule, { // we have a dll, let's get out pointers! initialized = true; init_function_pointers(winmm_handle); - return true; + ::OutputDebugStringA("WINMM_SHIM.DLL: real winmm.dll initialized successfully\n"); + return; } // failed to initialize real winmm.dll - return false; + ::OutputDebugStringA("WINMM_SHIM.DLL: Failed to initialize real winmm.dll\n"); } - return true; + LeaveCriticalSection(&sCriticalSection); } @@ -79,6 +87,7 @@ extern "C" MMRESULT WINAPI waveOutOpen( LPHWAVEOUT phwo, UINT uDeviceID, LPCWAVEFORMATEX pwfx, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen) { + ll_winmm_shim_initialize(); if (pwfx->wFormatTag != WAVE_FORMAT_PCM || (pwfx->wBitsPerSample != 8 && pwfx->wBitsPerSample != 16)) { // uncompressed 8 and 16 bit sound are the only types we support @@ -97,6 +106,7 @@ extern "C" MMRESULT WINAPI waveOutClose( HWAVEOUT hwo) { + ll_winmm_shim_initialize(); wave_out_map_t::iterator found_it = sWaveOuts.find(hwo); if (found_it != sWaveOuts.end()) { // forget what we know about this handle @@ -108,6 +118,7 @@ extern "C" MMRESULT WINAPI waveOutWrite( HWAVEOUT hwo, LPWAVEHDR pwh, UINT cbwh) { + ll_winmm_shim_initialize(); MMRESULT result = MMSYSERR_NOERROR; if (sMute) -- cgit v1.2.3 From fb4743300ccfeadfb6601e39c808c4f3b90c1150 Mon Sep 17 00:00:00 2001 From: brad kittenbrink Date: Fri, 15 Apr 2011 16:45:19 -0700 Subject: FIX: STORM-1141. Win7: 2.6.3 Beta1 crashes on startup if locale differs from English. Force LLTextureCache::purgeAllTextures to get called in addition to normal cache purging. --- indra/newview/llappviewer.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index cfb5853cfd..4985524f00 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3500,10 +3500,10 @@ bool LLAppViewer::initCache() LLAppViewer::getTextureCache()->setReadOnly(read_only) ; LLVOCache::getInstance()->setReadOnly(read_only); - BOOL texture_cache_mismatch = FALSE ; + bool texture_cache_mismatch = false; if (gSavedSettings.getS32("LocalCacheVersion") != LLAppViewer::getTextureCacheVersion()) { - texture_cache_mismatch = TRUE ; + texture_cache_mismatch = true; if(!read_only) { gSavedSettings.setS32("LocalCacheVersion", LLAppViewer::getTextureCacheVersion()); @@ -3517,7 +3517,9 @@ bool LLAppViewer::initCache() gSavedSettings.getBOOL("PurgeCacheOnNextStartup")) { gSavedSettings.setBOOL("PurgeCacheOnNextStartup", false); - mPurgeCache = true; + mPurgeCache = true; + // STORM-1141 force purgeAllTextures to get called to prevent a crash here. -brad + texture_cache_mismatch = true; } // We have moved the location of the cache directory over time. -- cgit v1.2.3 From 4438a5ebb2faebc2a3a9de82668d14f870f50d84 Mon Sep 17 00:00:00 2001 From: Siana Gearz Date: Sun, 17 Apr 2011 11:25:00 -0400 Subject: STORM-1088: corrected fix loading of winmm.dll --- indra/media_plugins/winmmshim/winmm_shim.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/indra/media_plugins/winmmshim/winmm_shim.cpp b/indra/media_plugins/winmmshim/winmm_shim.cpp index 6ba95e565e..47a1e5c018 100644 --- a/indra/media_plugins/winmmshim/winmm_shim.cpp +++ b/indra/media_plugins/winmmshim/winmm_shim.cpp @@ -39,7 +39,7 @@ BOOL APIENTRY DllMain( HMODULE hModule, LPVOID lpReserved ) { - InitializeCriticalSectionAndSpinCount(&sCriticalSection, 0x00000400); + InitializeCriticalSection(&sCriticalSection); return TRUE; } @@ -62,11 +62,12 @@ void ll_winmm_shim_initialize(){ initialized = true; init_function_pointers(winmm_handle); ::OutputDebugStringA("WINMM_SHIM.DLL: real winmm.dll initialized successfully\n"); - return; } - - // failed to initialize real winmm.dll - ::OutputDebugStringA("WINMM_SHIM.DLL: Failed to initialize real winmm.dll\n"); + else + { + // failed to initialize real winmm.dll + ::OutputDebugStringA("WINMM_SHIM.DLL: Failed to initialize real winmm.dll\n"); + } } LeaveCriticalSection(&sCriticalSection); } -- cgit v1.2.3 From 21e37069fe723094bbf3b857acc5c1d494ecb942 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Wed, 13 Apr 2011 15:13:10 -0400 Subject: SH-1329 FIXED Physics are "twitchy" for high-FPS machines Fixed bug that was messing up time slices for physics. --- indra/newview/llphysicsmotion.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/indra/newview/llphysicsmotion.cpp b/indra/newview/llphysicsmotion.cpp index 1d3c2b72f2..de4ce52351 100644 --- a/indra/newview/llphysicsmotion.cpp +++ b/indra/newview/llphysicsmotion.cpp @@ -452,7 +452,14 @@ BOOL LLPhysicsMotion::onUpdate(F32 time) // const F32 time_delta = time - mLastTime; - if (time_delta > 3.0 || time_delta <= 0.01) + + // Don't update too frequently, to avoid precision errors from small time slices. + if (time_delta <= .01) + { + return FALSE; + } + + if (time_delta > 3.0) { mLastTime = time; return FALSE; -- cgit v1.2.3 From eaabea67445096d8d6ef6606aa8d06a4bf3913f6 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Wed, 13 Apr 2011 15:23:11 -0400 Subject: SH-1364 FIXED Avatar Physics are not updating smoothly even for high-performance machines. "high" graphics settings now give 100% updates, versus 90%. Changed a simple constant that was acting as a threshold for when physics should be updated (the constant was set way too high, meaning that updates were being skipped). --- indra/newview/featuretable.txt | 2 +- indra/newview/llphysicsmotion.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt index 15ad330418..af2d951bf7 100644 --- a/indra/newview/featuretable.txt +++ b/indra/newview/featuretable.txt @@ -132,7 +132,7 @@ list High RenderAnisotropic 1 1 RenderAvatarCloth 1 0 RenderAvatarLODFactor 1 1.0 -RenderAvatarPhysicsLODFactor 1 0.9 +RenderAvatarPhysicsLODFactor 1 1.0 RenderAvatarVP 1 1 RenderFarClip 1 128 RenderFlexTimeFactor 1 1.0 diff --git a/indra/newview/llphysicsmotion.cpp b/indra/newview/llphysicsmotion.cpp index de4ce52351..09c9e75f2a 100644 --- a/indra/newview/llphysicsmotion.cpp +++ b/indra/newview/llphysicsmotion.cpp @@ -656,7 +656,7 @@ BOOL LLPhysicsMotion::onUpdate(F32 time) if ((pixel_area > area_for_this_setting) || is_self) { const F32 position_diff_local = llabs(mPositionLastUpdate_local-position_new_local_clamped); - const F32 min_delta = (1.01f-lod_factor)*0.4f; + const F32 min_delta = (1.0001f-lod_factor)*0.4f; if (llabs(position_diff_local) > min_delta) { update_visuals = TRUE; -- cgit v1.2.3 From 0d421c0535181e357d6629f1b2ed139ceda0a2e3 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Thu, 14 Apr 2011 14:47:05 -0400 Subject: VWR-25453 FIXED Avatar Physics Spring Needs a Higher Limit Tripled spring limit for all params. Very safe change. --- indra/newview/character/avatar_lad.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/indra/newview/character/avatar_lad.xml b/indra/newview/character/avatar_lad.xml index ec162e3608..6acaa75c32 100644 --- a/indra/newview/character/avatar_lad.xml +++ b/indra/newview/character/avatar_lad.xml @@ -11903,7 +11903,7 @@ render_pass="bump"> edit_group="physics_breasts_updown" value_default="0" value_min="0" - value_max="1"> + value_max="3"> edit_group="physics_breasts_inout" value_default="0" value_min="0" - value_max="1"> + value_max="3"> edit_group="physics_belly_updown" value_default="0" value_min="0" - value_max="1"> + value_max="3"> edit_group="physics_butt_updown" value_default="0" value_min="0" - value_max="1"> + value_max="3"> edit_group="physics_butt_leftright" value_default="0" value_min="0" - value_max="1"> + value_max="3"> edit_group="physics_breasts_leftright" value_default="0" value_min="0" - value_max="1"> + value_max="3"> Date: Thu, 14 Apr 2011 16:21:49 -0400 Subject: VWR-25445 FIXED breasts... accordions are presented in Edit Physics floater for male avatars Accordions are selectively hidden based on gender. --- indra/newview/llpaneleditwearable.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index cb8fbd66b5..b73d97e4c4 100644 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -1133,7 +1133,7 @@ void LLPanelEditWearable::showWearable(LLWearable* wearable, BOOL show, BOOL dis LLScrollingPanelList *panel_list = getChild(scrolling_panel); LLAccordionCtrlTab *tab = getChild(accordion_tab); - + if (!panel_list) { llwarns << "could not get scrolling panel list: " << scrolling_panel << llendl; @@ -1145,7 +1145,18 @@ void LLPanelEditWearable::showWearable(LLWearable* wearable, BOOL show, BOOL dis llwarns << "could not get llaccordionctrltab from UI with name: " << accordion_tab << llendl; continue; } - + + // Don't show female subparts if you're not female, etc. + if (!(gAgentAvatarp->getSex() & subpart_entry->mSex)) + { + tab->setVisible(FALSE); + continue; + } + else + { + tab->setVisible(TRUE); + } + // what edit group do we want to extract params for? const std::string edit_group = subpart_entry->mEditGroup; -- cgit v1.2.3 From 04f79f63589ab35b01ec9e3d8128e68a201ff332 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Fri, 15 Apr 2011 13:13:15 -0400 Subject: STORM-956 Ability to mute dialogs by muting object (or object owner) --- doc/contributions.txt | 2 ++ indra/newview/llviewermessage.cpp | 5 ++++- scripts/messages/message_template.msg | 8 +++++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/doc/contributions.txt b/doc/contributions.txt index 516760aa5a..51235e0ce5 100644 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -398,6 +398,7 @@ Jonathan Yap STORM-643 STORM-960 STORM-953 + STORM-956 Kage Pixel VWR-11 Ken March @@ -762,6 +763,7 @@ Thickbrick Sleaford VWR-13483 VWR-13947 VWR-24420 + STORM-956 Thraxis Epsilon SVC-371 VWR-383 diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 103989ee80..0da60ed4ab 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -6462,9 +6462,12 @@ void process_script_dialog(LLMessageSystem* msg, void**) LLSD payload; LLUUID object_id; + LLUUID owner_id; + msg->getUUID("Data", "ObjectID", object_id); + msg->getUUID("OwnerData", "OwnerID", owner_id); - if (LLMuteList::getInstance()->isMuted(object_id)) + if (LLMuteList::getInstance()->isMuted(object_id) || LLMuteList::getInstance()->isMuted(owner_id)) { return; } diff --git a/scripts/messages/message_template.msg b/scripts/messages/message_template.msg index 77dc940335..d292653d3f 100644 --- a/scripts/messages/message_template.msg +++ b/scripts/messages/message_template.msg @@ -2966,7 +2966,7 @@ version 2.0 { BillableFactor F32 } { ObjectBonusFactor F32 } { WaterHeight F32 } - { TerrainRaiseLimit F32 } + { TerrainRaiseLimit F32 } { TerrainLowerLimit F32 } { PricePerMeter S32 } { RedirectGridX S32 } @@ -4242,6 +4242,10 @@ version 2.0 Buttons Variable { ButtonLabel Variable 1 } } + { + OwnerData Variable + { OwnerID LLUUID } + } } @@ -6762,6 +6766,8 @@ version 2.0 } // And, the money transfer +// *NOTE: Unused as of 2010-04-06, because all back-end money transactions +// are done with web services via L$ API. JC { MoneyTransferBackend Low 312 Trusted Zerocoded { -- cgit v1.2.3 From bdd8adf5bb2df3da06610575706088507349b605 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Fri, 15 Apr 2011 14:30:36 -0400 Subject: STORM-1128 Code cleanup per codereview comments --- indra/newview/llfloaterworldmap.cpp | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index bf5f569e36..a520a848a4 100755 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -96,14 +96,6 @@ enum EPanDirection // Values in pixels per region static const F32 ZOOM_MAX = 128.f; -struct SortRegionNames -{ - inline bool operator ()(std::pair & _left, std::pair & _right) - { - return(LLStringUtil::compareInsensitive(_left.second->getName(),_right.second->getName()) < 0); - } -}; - //--------------------------------------------------------------------------- // Globals //--------------------------------------------------------------------------- @@ -1494,11 +1486,18 @@ void LLFloaterWorldMap::updateSims(bool found_null_sim) S32 num_results = 0; - std::vector> simInfoVec(LLWorldMap::getInstance()->getRegionMap().begin(), LLWorldMap::getInstance()->getRegionMap().end()); - std::sort(simInfoVec.begin(), simInfoVec.end(), SortRegionNames()); + struct SortRegionNames + { + inline bool operator ()(std::pair & _left, std::pair & _right) + { + return(LLStringUtil::compareInsensitive(_left.second->getName(),_right.second->getName()) < 0); + } + }; + + std::vector> sim_info_vec(LLWorldMap::getInstance()->getRegionMap().begin(), LLWorldMap::getInstance()->getRegionMap().end()); + std::sort(sim_info_vec.begin(), sim_info_vec.end(), SortRegionNames()); - std::vector>::const_iterator it; - for (it = simInfoVec.begin(); it != simInfoVec.end(); ++it) + for (std::vector>::const_iterator it = sim_info_vec.begin(); it != sim_info_vec.end(); ++it) { LLSimInfo* info = it->second; std::string sim_name_lower = info->getName(); -- cgit v1.2.3 From 8c797002cf3900114693786b8816daec6e651680 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Sat, 16 Apr 2011 09:21:24 -0400 Subject: STORM-1128 GCC fixes: formatting changes, moved compare routine back to top --- indra/newview/llfloaterworldmap.cpp | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index a520a848a4..3e5842e5f0 100755 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -85,6 +85,16 @@ static const F32 MAP_ZOOM_TIME = 0.2f; // Currently (01/26/09), this value allows the whole grid to be visible in a 1024x1024 window. static const S32 MAX_VISIBLE_REGIONS = 512; +// It would be more logical to have this inside the method where it is used but to compile under gcc this +// struct has to be here. +struct SortRegionNames +{ + inline bool operator ()(const std::pair & _left, const std::pair & _right) + { + return(LLStringUtil::compareInsensitive(_left.second->getName(),_right.second->getName()) < 0); + } +}; + enum EPanDirection { PAN_UP, @@ -1486,18 +1496,10 @@ void LLFloaterWorldMap::updateSims(bool found_null_sim) S32 num_results = 0; - struct SortRegionNames - { - inline bool operator ()(std::pair & _left, std::pair & _right) - { - return(LLStringUtil::compareInsensitive(_left.second->getName(),_right.second->getName()) < 0); - } - }; - - std::vector> sim_info_vec(LLWorldMap::getInstance()->getRegionMap().begin(), LLWorldMap::getInstance()->getRegionMap().end()); + std::vector > sim_info_vec(LLWorldMap::getInstance()->getRegionMap().begin(), LLWorldMap::getInstance()->getRegionMap().end()); std::sort(sim_info_vec.begin(), sim_info_vec.end(), SortRegionNames()); - for (std::vector>::const_iterator it = sim_info_vec.begin(); it != sim_info_vec.end(); ++it) + for (std::vector >::const_iterator it = sim_info_vec.begin(); it != sim_info_vec.end(); ++it) { LLSimInfo* info = it->second; std::string sim_name_lower = info->getName(); -- cgit v1.2.3 From def000ea49cb4bed7894d1534ce80d6753cbefdc Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Sat, 16 Apr 2011 16:49:47 -0400 Subject: STORM-1128 Made a few code changes suggested in code review comments. --- indra/newview/llfloaterworldmap.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index 3e5842e5f0..2672747605 100755 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -73,6 +73,7 @@ #include "llslider.h" #include "message.h" #include "llwindow.h" // copyTextToClipboard() +#include //--------------------------------------------------------------------------- // Constants @@ -85,11 +86,11 @@ static const F32 MAP_ZOOM_TIME = 0.2f; // Currently (01/26/09), this value allows the whole grid to be visible in a 1024x1024 window. static const S32 MAX_VISIBLE_REGIONS = 512; -// It would be more logical to have this inside the method where it is used but to compile under gcc this +// It would be more logical to have this inside the method where it is used but to compile under gcc this // struct has to be here. struct SortRegionNames { - inline bool operator ()(const std::pair & _left, const std::pair & _right) + inline bool operator ()(std::pair const& _left, std::pair const& _right) { return(LLStringUtil::compareInsensitive(_left.second->getName(),_right.second->getName()) < 0); } -- cgit v1.2.3 From 838b38d238425c8fd8c0116e14cb0883940bcef5 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Tue, 19 Apr 2011 13:24:46 -0400 Subject: STORM-1128 Add space after a comma --- indra/newview/llfloaterworldmap.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index 2672747605..f8a4ce7ad0 100755 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -92,7 +92,7 @@ struct SortRegionNames { inline bool operator ()(std::pair const& _left, std::pair const& _right) { - return(LLStringUtil::compareInsensitive(_left.second->getName(),_right.second->getName()) < 0); + return(LLStringUtil::compareInsensitive(_left.second->getName(), _right.second->getName()) < 0); } }; -- cgit v1.2.3 From 27301aa5461ccc8e1e16edd6438875ecd701065d Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Tue, 19 Apr 2011 23:46:18 +0300 Subject: STORM-1182 FIX Fixed XUI Preview tool not loading XML files from a dev checkout on Linux. The bug seems to be caused by recent switch to Autobuild, which affected the build directory path. --- indra/llvfs/lldir_linux.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/llvfs/lldir_linux.cpp b/indra/llvfs/lldir_linux.cpp index 73f2336f94..ae25ab2f21 100644 --- a/indra/llvfs/lldir_linux.cpp +++ b/indra/llvfs/lldir_linux.cpp @@ -93,11 +93,11 @@ LLDir_Linux::LLDir_Linux() #else mAppRODataDir = tmp_str; #endif - std::string::size_type indra_pos = mExecutableDir.find("/indra"); - if (indra_pos != std::string::npos) + std::string::size_type build_dir_pos = mExecutableDir.find("/build-linux-"); + if (build_dir_pos != std::string::npos) { // ...we're in a dev checkout - mSkinBaseDir = mExecutableDir.substr(0, indra_pos) + "/indra/newview/skins"; + mSkinBaseDir = mExecutableDir.substr(0, build_dir_pos) + "/indra/newview/skins"; llinfos << "Running in dev checkout with mSkinBaseDir " << mSkinBaseDir << llendl; } -- cgit v1.2.3 From f00eb3e161fbed92733efa14d837b3722ac4797c Mon Sep 17 00:00:00 2001 From: Seth ProductEngine Date: Wed, 20 Apr 2011 17:31:57 +0300 Subject: STORM-229 ADDITIONAL FIX Disabled updating text segments during indenting the selected lines with TAB or SHIFT+TAB to prevent the viewer from stalling. --- indra/llui/lltexteditor.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 5a46c7c98e..9bd445988d 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -592,6 +592,10 @@ void LLTextEditor::indentSelectedLines( S32 spaces ) } } + // Disabling parsing on the fly to avoid updating text segments + // until all indentation commands are executed. + mParseOnTheFly = FALSE; + // Find each start-of-line and indent it do { @@ -617,6 +621,8 @@ void LLTextEditor::indentSelectedLines( S32 spaces ) } while( cur < right ); + mParseOnTheFly = TRUE; + if( (right < getLength()) && (text[right] == '\n') ) { right++; -- cgit v1.2.3 From 469bcbcd8bec6b8e2ffec105083319f088e99719 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Wed, 20 Apr 2011 10:42:58 -0400 Subject: cosmetic variable name change --- indra/newview/llphysicsmotion.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/llphysicsmotion.cpp b/indra/newview/llphysicsmotion.cpp index 09c9e75f2a..23b41a6db0 100644 --- a/indra/newview/llphysicsmotion.cpp +++ b/indra/newview/llphysicsmotion.cpp @@ -49,7 +49,7 @@ typedef std::map controller_map_t; typedef std::map default_controller_map_t; -#define MIN_REQUIRED_PIXEL_AREA_BREAST_MOTION 0.f; +#define MIN_REQUIRED_PIXEL_AREA_AVATAR_PHYSICS_MOTION 0.f; inline F64 llsgn(const F64 a) { @@ -370,7 +370,7 @@ void LLPhysicsMotionController::addMotion(LLPhysicsMotion *motion) F32 LLPhysicsMotionController::getMinPixelArea() { - return MIN_REQUIRED_PIXEL_AREA_BREAST_MOTION; + return MIN_REQUIRED_PIXEL_AREA_AVATAR_PHYSICS_MOTION; } // Local space means "parameter space". -- cgit v1.2.3 From f4683a11bb4026b8b52f4ad9504824523e4a0827 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Wed, 20 Apr 2011 11:30:00 -0400 Subject: SH-1384 FIXED AvatarPhysicsTest debug setting does not work Took out setting, no longer needed. Was formely restricted to gods. --- indra/newview/app_settings/settings.xml | 11 ----------- indra/newview/llphysicsmotion.cpp | 2 +- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index dd85c5cb86..898d89b17d 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -652,17 +652,6 @@ Value 1 - AvatarPhysicsTest - - Comment - Simulate continuous physics behavior on all nearby avatars. - Persist - 1 - Type - Boolean - Value - 0 - AvatarSex Comment diff --git a/indra/newview/llphysicsmotion.cpp b/indra/newview/llphysicsmotion.cpp index 23b41a6db0..6a7c28357e 100644 --- a/indra/newview/llphysicsmotion.cpp +++ b/indra/newview/llphysicsmotion.cpp @@ -481,7 +481,7 @@ BOOL LLPhysicsMotion::onUpdate(F32 time) const F32 behavior_gain = getParamValue("Gain"); const F32 behavior_damping = getParamValue("Damping"); const F32 behavior_drag = getParamValue("Drag"); - const BOOL physics_test = gSavedSettings.getBOOL("AvatarPhysicsTest") && gAgent.isGodlike(); + const BOOL physics_test = FALSE; // Enable this to simulate bouncing on all parts. F32 behavior_maxeffect = getParamValue("MaxEffect"); if (physics_test) -- cgit v1.2.3 From 943d3e902c6c83a0f141896fd8c8057e237627ff Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Wed, 20 Apr 2011 11:33:14 -0400 Subject: SH-1380 FIXED User can wear several physics objects Changed this to be expected behavior, where top wearable's characteristics are used. --- indra/newview/llwearabletype.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llwearabletype.cpp b/indra/newview/llwearabletype.cpp index 9e95604712..c090ab5c3d 100644 --- a/indra/newview/llwearabletype.cpp +++ b/indra/newview/llwearabletype.cpp @@ -80,7 +80,7 @@ LLWearableDictionary::LLWearableDictionary() addEntry(LLWearableType::WT_ALPHA, new WearableEntry("alpha", "New Alpha", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_ALPHA, FALSE, TRUE)); addEntry(LLWearableType::WT_TATTOO, new WearableEntry("tattoo", "New Tattoo", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_TATTOO, FALSE, TRUE)); - addEntry(LLWearableType::WT_PHYSICS, new WearableEntry("physics", "New Physics", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_PHYSICS, TRUE, FALSE)); + addEntry(LLWearableType::WT_PHYSICS, new WearableEntry("physics", "New Physics", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_PHYSICS, TRUE, TRUE)); addEntry(LLWearableType::WT_INVALID, new WearableEntry("invalid", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryIcon::ICONNAME_NONE, FALSE, FALSE)); addEntry(LLWearableType::WT_NONE, new WearableEntry("none", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryIcon::ICONNAME_NONE, FALSE, FALSE)); -- cgit v1.2.3 From fd97e6dcba7e856e2e018222d9b5aa628de5ab87 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Wed, 20 Apr 2011 11:36:49 -0400 Subject: SH-1388 FIXED Graphics Quality slider has no effect on avatar physics SH-1387 Class0 video cards default avatar physics to high Added appropriate featuretable entries. --- indra/newview/featuretable_linux.txt | 5 +++++ indra/newview/featuretable_mac.txt | 5 +++++ indra/newview/featuretable_xp.txt | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/indra/newview/featuretable_linux.txt b/indra/newview/featuretable_linux.txt index a2cd4b834c..5da1495da9 100644 --- a/indra/newview/featuretable_linux.txt +++ b/indra/newview/featuretable_linux.txt @@ -26,6 +26,7 @@ list all RenderAnisotropic 1 1 RenderAvatarCloth 1 1 RenderAvatarLODFactor 1 1.0 +RenderAvatarPhysicsLODFactor 1 1.0 RenderAvatarMaxVisible 1 12 RenderAvatarVP 1 1 RenderCubeMap 1 1 @@ -70,6 +71,7 @@ list Low RenderAnisotropic 1 0 RenderAvatarCloth 1 0 RenderAvatarLODFactor 1 0 +RenderAvatarPhysicsLODFactor 1 0 RenderAvatarMaxVisible 1 3 RenderAvatarVP 1 0 RenderFarClip 1 64 @@ -100,6 +102,7 @@ list Mid RenderAnisotropic 1 0 RenderAvatarCloth 1 0 RenderAvatarLODFactor 1 0.5 +RenderAvatarPhysicsLODFactor 1 0.75 RenderAvatarVP 1 1 RenderFarClip 1 96 RenderFlexTimeFactor 1 1.0 @@ -128,6 +131,7 @@ list High RenderAnisotropic 1 1 RenderAvatarCloth 1 0 RenderAvatarLODFactor 1 1.0 +RenderAvatarPhysicsLODFactor 1 1.0 RenderAvatarVP 1 1 RenderFarClip 1 128 RenderFlexTimeFactor 1 1.0 @@ -156,6 +160,7 @@ list Ultra RenderAnisotropic 1 1 RenderAvatarCloth 1 1 RenderAvatarLODFactor 1 1.0 +RenderAvatarPhysicsLODFactor 1 1.0 RenderAvatarVP 1 1 RenderFarClip 1 256 RenderFlexTimeFactor 1 1.0 diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt index 3ad7f4e892..421f9c0973 100644 --- a/indra/newview/featuretable_mac.txt +++ b/indra/newview/featuretable_mac.txt @@ -26,6 +26,7 @@ list all RenderAnisotropic 1 0 RenderAvatarCloth 0 0 RenderAvatarLODFactor 1 1.0 +RenderAvatarPhysicsLODFactor 1 1.0 RenderAvatarMaxVisible 1 12 RenderAvatarVP 1 0 RenderCubeMap 1 1 @@ -70,6 +71,7 @@ list Low RenderAnisotropic 1 0 RenderAvatarCloth 1 0 RenderAvatarLODFactor 1 0 +RenderAvatarPhysicsLODFactor 1 0 RenderAvatarMaxVisible 1 3 RenderAvatarVP 1 0 RenderFarClip 1 64 @@ -99,6 +101,7 @@ list Mid RenderAnisotropic 1 0 RenderAvatarCloth 1 0 RenderAvatarLODFactor 1 0.5 +RenderAvatarPhysicsLODFactor 1 0.75 RenderAvatarVP 1 1 RenderFarClip 1 96 RenderFlexTimeFactor 1 1.0 @@ -126,6 +129,7 @@ list High RenderAnisotropic 1 1 RenderAvatarCloth 1 0 RenderAvatarLODFactor 1 1.0 +RenderAvatarPhysicsLODFactor 1 1.0 RenderAvatarVP 1 1 RenderFarClip 1 128 RenderFlexTimeFactor 1 1.0 @@ -153,6 +157,7 @@ list Ultra RenderAnisotropic 1 1 RenderAvatarCloth 1 1 RenderAvatarLODFactor 1 1.0 +RenderAvatarPhysicsLODFactor 1 1.0 RenderAvatarVP 1 1 RenderFarClip 1 256 RenderFlexTimeFactor 1 1.0 diff --git a/indra/newview/featuretable_xp.txt b/indra/newview/featuretable_xp.txt index 38e6bb1e5e..c2e5dfff9f 100644 --- a/indra/newview/featuretable_xp.txt +++ b/indra/newview/featuretable_xp.txt @@ -26,6 +26,7 @@ list all RenderAnisotropic 1 1 RenderAvatarCloth 1 1 RenderAvatarLODFactor 1 1.0 +RenderAvatarPhysicsLODFactor 1 1.0 RenderAvatarMaxVisible 1 12 RenderAvatarVP 1 1 RenderCubeMap 1 1 @@ -71,6 +72,7 @@ list Low RenderAnisotropic 1 0 RenderAvatarCloth 1 0 RenderAvatarLODFactor 1 0 +RenderAvatarPhysicsLODFactor 1 0 RenderAvatarMaxVisible 1 3 RenderAvatarVP 1 0 RenderFarClip 1 64 @@ -101,6 +103,7 @@ list Mid RenderAnisotropic 1 0 RenderAvatarCloth 1 0 RenderAvatarLODFactor 1 0.5 +RenderAvatarPhysicsLODFactor 1 0.75 RenderAvatarVP 1 1 RenderFarClip 1 96 RenderFlexTimeFactor 1 1.0 @@ -129,6 +132,7 @@ list High RenderAnisotropic 1 1 RenderAvatarCloth 1 0 RenderAvatarLODFactor 1 1.0 +RenderAvatarPhysicsLODFactor 1 1.0 RenderAvatarVP 1 1 RenderFarClip 1 128 RenderFlexTimeFactor 1 1.0 @@ -157,6 +161,7 @@ list Ultra RenderAnisotropic 1 1 RenderAvatarCloth 1 1 RenderAvatarLODFactor 1 1.0 +RenderAvatarPhysicsLODFactor 1 1.0 RenderAvatarVP 1 1 RenderFarClip 1 256 RenderFlexTimeFactor 1 1.0 -- cgit v1.2.3 From dcb79b5b6e8a79ef171e09de8972433bc7489978 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Wed, 20 Apr 2011 12:37:44 -0400 Subject: SH-1381 FIXED avatar physics behavior is tightly tied to viewer framerate Breaking up physics into smaller integration steps. --- indra/newview/llphysicsmotion.cpp | 354 ++++++++++++++++++++------------------ 1 file changed, 184 insertions(+), 170 deletions(-) diff --git a/indra/newview/llphysicsmotion.cpp b/indra/newview/llphysicsmotion.cpp index 6a7c28357e..c9d355b3b5 100644 --- a/indra/newview/llphysicsmotion.cpp +++ b/indra/newview/llphysicsmotion.cpp @@ -49,7 +49,8 @@ typedef std::map controller_map_t; typedef std::map default_controller_map_t; -#define MIN_REQUIRED_PIXEL_AREA_AVATAR_PHYSICS_MOTION 0.f; +#define MIN_REQUIRED_PIXEL_AREA_AVATAR_PHYSICS_MOTION 0.f +#define TIME_ITERATION_STEP 0.1f inline F64 llsgn(const F64 a) { @@ -459,7 +460,8 @@ BOOL LLPhysicsMotion::onUpdate(F32 time) return FALSE; } - if (time_delta > 3.0) + // If less than 1FPS, we don't want to be spending time updating physics at all. + if (time_delta > 1.0) { mLastTime = time; return FALSE; @@ -487,195 +489,207 @@ BOOL LLPhysicsMotion::onUpdate(F32 time) if (physics_test) behavior_maxeffect = 1.0f; - // mPositon_local should be in normalized 0,1 range already. Just making sure... - F32 position_current_local = llclamp(mPosition_local, - 0.0f, - 1.0f); - - // Normalize the param position to be from [0,1]. - // We have to use normalized values because there may be more than one driven param, - // and each of these driven params may have its own range. - // This means we'll do all our calculations in normalized [0,1] local coordinates. - F32 position_user_local = mParamDriver->getWeight(); - position_user_local = (position_user_local - mParamDriver->getMinWeight()) / (mParamDriver->getMaxWeight() - mParamDriver->getMinWeight()); - - // If the effect is turned off then don't process unless we need one more update - // to set the position to the default (i.e. user) position. - if ((behavior_maxeffect == 0) && (position_current_local == position_user_local)) - { - return FALSE; - } - - // - // End parameters and settings - //////////////////////////////////////////////////////////////////////////////// - - - //////////////////////////////////////////////////////////////////////////////// - // Calculate velocity and acceleration in parameter space. - // + BOOL update_visuals = FALSE; + // Break up the physics into a bunch of iterations so that differing framerates will show + // roughly the same behavior. + for (F32 time_iteration = 0; time_iteration <= time_delta; time_iteration += TIME_ITERATION_STEP) + { + F32 time_iteration_step = TIME_ITERATION_STEP; + if (time_iteration + TIME_ITERATION_STEP > time_delta) + { + time_iteration_step = time_delta; + } + + + // mPositon_local should be in normalized 0,1 range already. Just making sure... + F32 position_current_local = llclamp(mPosition_local, + 0.0f, + 1.0f); + + // Normalize the param position to be from [0,1]. + // We have to use normalized values because there may be more than one driven param, + // and each of these driven params may have its own range. + // This means we'll do all our calculations in normalized [0,1] local coordinates. + F32 position_user_local = mParamDriver->getWeight(); + position_user_local = (position_user_local - mParamDriver->getMinWeight()) / (mParamDriver->getMaxWeight() - mParamDriver->getMinWeight()); + + // If the effect is turned off then don't process unless we need one more update + // to set the position to the default (i.e. user) position. + if ((behavior_maxeffect == 0) && (position_current_local == position_user_local)) + { + return FALSE; + } + + // + // End parameters and settings + //////////////////////////////////////////////////////////////////////////////// + + + //////////////////////////////////////////////////////////////////////////////// + // Calculate velocity and acceleration in parameter space. + // - const F32 velocity_joint_local = calculateVelocity_local(time_delta); - const F32 acceleration_joint_local = calculateAcceleration_local(velocity_joint_local, time_delta); + const F32 velocity_joint_local = calculateVelocity_local(time_iteration_step); + const F32 acceleration_joint_local = calculateAcceleration_local(velocity_joint_local, time_iteration_step); - // - // End velocity and acceleration - //////////////////////////////////////////////////////////////////////////////// + // + // End velocity and acceleration + //////////////////////////////////////////////////////////////////////////////// - //////////////////////////////////////////////////////////////////////////////// - // Calculate the total force - // + //////////////////////////////////////////////////////////////////////////////// + // Calculate the total force + // - // Spring force is a restoring force towards the original user-set breast position. - // F = kx - const F32 spring_length = position_current_local - position_user_local; - const F32 force_spring = -spring_length * behavior_spring; + // Spring force is a restoring force towards the original user-set breast position. + // F = kx + const F32 spring_length = position_current_local - position_user_local; + const F32 force_spring = -spring_length * behavior_spring; - // Acceleration is the force that comes from the change in velocity of the torso. - // F = ma - const F32 force_accel = behavior_gain * (acceleration_joint_local * behavior_mass); + // Acceleration is the force that comes from the change in velocity of the torso. + // F = ma + const F32 force_accel = behavior_gain * (acceleration_joint_local * behavior_mass); - // Gravity always points downward in world space. - // F = mg - const LLVector3 gravity_world(0,0,1); - const F32 force_gravity = behavior_gain * (toLocal(gravity_world) * behavior_gravity * behavior_mass); + // Gravity always points downward in world space. + // F = mg + const LLVector3 gravity_world(0,0,1); + const F32 force_gravity = behavior_gain * (toLocal(gravity_world) * behavior_gravity * behavior_mass); - // Damping is a restoring force that opposes the current velocity. - // F = -kv - const F32 force_damping = -behavior_damping * mVelocity_local; + // Damping is a restoring force that opposes the current velocity. + // F = -kv + const F32 force_damping = -behavior_damping * mVelocity_local; - // Drag is a force imparted by velocity (intuitively it is similar to wind resistance) - // F = .5kv^2 - const F32 force_drag = .5*behavior_drag*velocity_joint_local*velocity_joint_local*llsgn(velocity_joint_local); + // Drag is a force imparted by velocity (intuitively it is similar to wind resistance) + // F = .5kv^2 + const F32 force_drag = .5*behavior_drag*velocity_joint_local*velocity_joint_local*llsgn(velocity_joint_local); - const F32 force_net = (force_accel + - force_gravity + - force_spring + - force_damping + - force_drag); + const F32 force_net = (force_accel + + force_gravity + + force_spring + + force_damping + + force_drag); - // - // End total force - //////////////////////////////////////////////////////////////////////////////// + // + // End total force + //////////////////////////////////////////////////////////////////////////////// - //////////////////////////////////////////////////////////////////////////////// - // Calculate new params - // - - // Calculate the new acceleration based on the net force. - // a = F/m - const F32 acceleration_new_local = force_net / behavior_mass; - static const F32 max_acceleration = 10.0f; // magic number, used to be customizable. - F32 velocity_new_local = mVelocity_local + acceleration_new_local; - velocity_new_local = llclamp(velocity_new_local, - -max_acceleration, max_acceleration); + //////////////////////////////////////////////////////////////////////////////// + // Calculate new params + // + + // Calculate the new acceleration based on the net force. + // a = F/m + const F32 acceleration_new_local = force_net / behavior_mass; + static const F32 max_acceleration = 10.0f; // magic number, used to be customizable. + F32 velocity_new_local = mVelocity_local + acceleration_new_local; + velocity_new_local = llclamp(velocity_new_local, + -max_acceleration, max_acceleration); - // Temporary debugging setting to cause all avatars to move, for profiling purposes. - if (physics_test) - { - velocity_new_local = sin(time*4.0); - } - // Calculate the new parameters, or remain unchanged if max speed is 0. - F32 position_new_local = position_current_local + velocity_new_local*time_delta; - if (behavior_maxeffect == 0) - position_new_local = position_user_local; - - // Zero out the velocity if the param is being pushed beyond its limits. - if ((position_new_local < 0 && velocity_new_local < 0) || - (position_new_local > 1 && velocity_new_local > 0)) - { - velocity_new_local = 0; - } + // Temporary debugging setting to cause all avatars to move, for profiling purposes. + if (physics_test) + { + velocity_new_local = sin(time*4.0); + } + // Calculate the new parameters, or remain unchanged if max speed is 0. + F32 position_new_local = position_current_local + velocity_new_local*time_iteration_step; + if (behavior_maxeffect == 0) + position_new_local = position_user_local; + + // Zero out the velocity if the param is being pushed beyond its limits. + if ((position_new_local < 0 && velocity_new_local < 0) || + (position_new_local > 1 && velocity_new_local > 0)) + { + velocity_new_local = 0; + } - // Check for NaN values. A NaN value is detected if the variables doesn't equal itself. - // If NaN, then reset everything. - if ((mPosition_local != mPosition_local) || - (mVelocity_local != mVelocity_local) || - (position_new_local != position_new_local)) - { - position_new_local = 0; - position_current_local = 0; - position_user_local = 0; - mVelocity_local = 0; - mVelocityJoint_local = 0; - mAccelerationJoint_local = 0; - mPosition_local = 0; - mPosition_world = LLVector3(0,0,0); - } - - const F32 position_new_local_clamped = llclamp(position_new_local, - 0.0f, - 1.0f); - - LLDriverParam *driver_param = dynamic_cast(mParamDriver); - llassert_always(driver_param); - if (driver_param) - { - // If this is one of our "hidden" driver params, then make sure it's - // the default value. - if ((driver_param->getGroup() != VISUAL_PARAM_GROUP_TWEAKABLE) && - (driver_param->getGroup() != VISUAL_PARAM_GROUP_TWEAKABLE_NO_TRANSMIT)) - { - mCharacter->setVisualParamWeight(driver_param, - 0, - FALSE); - } - for (LLDriverParam::entry_list_t::iterator iter = driver_param->mDriven.begin(); - iter != driver_param->mDriven.end(); - ++iter) - { - LLDrivenEntry &entry = (*iter); - LLViewerVisualParam *driven_param = entry.mParam; - setParamValue(driven_param,position_new_local_clamped, behavior_maxeffect); - } - } + // Check for NaN values. A NaN value is detected if the variables doesn't equal itself. + // If NaN, then reset everything. + if ((mPosition_local != mPosition_local) || + (mVelocity_local != mVelocity_local) || + (position_new_local != position_new_local)) + { + position_new_local = 0; + position_current_local = 0; + position_user_local = 0; + mVelocity_local = 0; + mVelocityJoint_local = 0; + mAccelerationJoint_local = 0; + mPosition_local = 0; + mPosition_world = LLVector3(0,0,0); + } + + const F32 position_new_local_clamped = llclamp(position_new_local, + 0.0f, + 1.0f); + + LLDriverParam *driver_param = dynamic_cast(mParamDriver); + llassert_always(driver_param); + if (driver_param) + { + // If this is one of our "hidden" driver params, then make sure it's + // the default value. + if ((driver_param->getGroup() != VISUAL_PARAM_GROUP_TWEAKABLE) && + (driver_param->getGroup() != VISUAL_PARAM_GROUP_TWEAKABLE_NO_TRANSMIT)) + { + mCharacter->setVisualParamWeight(driver_param, + 0, + FALSE); + } + for (LLDriverParam::entry_list_t::iterator iter = driver_param->mDriven.begin(); + iter != driver_param->mDriven.end(); + ++iter) + { + LLDrivenEntry &entry = (*iter); + LLViewerVisualParam *driven_param = entry.mParam; + setParamValue(driven_param,position_new_local_clamped, behavior_maxeffect); + } + } - // - // End calculate new params - //////////////////////////////////////////////////////////////////////////////// + // + // End calculate new params + //////////////////////////////////////////////////////////////////////////////// - //////////////////////////////////////////////////////////////////////////////// - // Conditionally update the visual params - // + //////////////////////////////////////////////////////////////////////////////// + // Conditionally update the visual params + // - // Updating the visual params (i.e. what the user sees) is fairly expensive. - // So only update if the params have changed enough, and also take into account - // the graphics LOD settings. + // Updating the visual params (i.e. what the user sees) is fairly expensive. + // So only update if the params have changed enough, and also take into account + // the graphics LOD settings. - BOOL update_visuals = FALSE; - - // For non-self, if the avatar is small enough visually, then don't update. - const F32 area_for_max_settings = 0.0; - const F32 area_for_min_settings = 1400.0; - const F32 area_for_this_setting = area_for_max_settings + (area_for_min_settings-area_for_max_settings)*(1.0-lod_factor); - const F32 pixel_area = fsqrtf(mCharacter->getPixelArea()); + // For non-self, if the avatar is small enough visually, then don't update. + const F32 area_for_max_settings = 0.0; + const F32 area_for_min_settings = 1400.0; + const F32 area_for_this_setting = area_for_max_settings + (area_for_min_settings-area_for_max_settings)*(1.0-lod_factor); + const F32 pixel_area = fsqrtf(mCharacter->getPixelArea()); - const BOOL is_self = (dynamic_cast(mCharacter) != NULL); - if ((pixel_area > area_for_this_setting) || is_self) - { - const F32 position_diff_local = llabs(mPositionLastUpdate_local-position_new_local_clamped); - const F32 min_delta = (1.0001f-lod_factor)*0.4f; - if (llabs(position_diff_local) > min_delta) - { - update_visuals = TRUE; - mPositionLastUpdate_local = position_new_local; - } - } + const BOOL is_self = (dynamic_cast(mCharacter) != NULL); + if ((pixel_area > area_for_this_setting) || is_self) + { + const F32 position_diff_local = llabs(mPositionLastUpdate_local-position_new_local_clamped); + const F32 min_delta = (1.0001f-lod_factor)*0.4f; + if (llabs(position_diff_local) > min_delta) + { + update_visuals = TRUE; + mPositionLastUpdate_local = position_new_local; + } + } + + // + // End update visual params + //////////////////////////////////////////////////////////////////////////////// + + mVelocityJoint_local = velocity_joint_local; + + mVelocity_local = velocity_new_local; + mAccelerationJoint_local = acceleration_joint_local; + mPosition_local = position_new_local; + + mPosition_world = joint->getWorldPosition(); - // - // End update visual params - //////////////////////////////////////////////////////////////////////////////// - - mVelocityJoint_local = velocity_joint_local; - - mVelocity_local = velocity_new_local; - mAccelerationJoint_local = acceleration_joint_local; - mPosition_local = position_new_local; - - mPosition_world = joint->getWorldPosition(); - mLastTime = time; + } + mLastTime = time; /* // Write out debugging info into a spreadsheet. -- cgit v1.2.3 From 4906f4644f7b8e8348f67ea7fde0909f58338ff1 Mon Sep 17 00:00:00 2001 From: Ima Mechanique Date: Thu, 21 Apr 2011 22:11:48 +0100 Subject: OPEN-61 Adding locations that redistributable package installs msvc* files. --- doc/contributions.txt | 2 ++ indra/cmake/Copy3rdPartyLibs.cmake | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/contributions.txt b/doc/contributions.txt index 2e6b01abc2..ed42e8fe5a 100644 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -361,6 +361,8 @@ Ian Kas [NO JIRA] (Ukranian localization) CT-322 CT-325 +Ima Mechanique + OPEN-61 Irene Muni CT-324 CT-352 diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index 1c43c4ce12..4202b54f94 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -127,7 +127,8 @@ elseif (MSVC_VERSION EQUAL 1600) # VisualStudio 2010 PATHS ${MSVC_DEBUG_REDIST_PATH} [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0\\Setup\\VC;ProductDir]/redist/Debug_NonRedist/x86/Microsoft.VC100.DebugCRT - NO_DEFAULT_PATH + [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Windows;Directory]/SysWOW64 + [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Windows;Directory]/System32 NO_DEFAULT_PATH ) @@ -151,7 +152,8 @@ elseif (MSVC_VERSION EQUAL 1600) # VisualStudio 2010 PATHS ${MSVC_REDIST_PATH} [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0\\Setup\\VC;ProductDir]/redist/x86/Microsoft.VC100.CRT - NO_DEFAULT_PATH + [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Windows;Directory]/SysWOW64 + [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Windows;Directory]/System32 NO_DEFAULT_PATH ) -- cgit v1.2.3 From e26bfe00ef467a65eb126a75fa2aba6ccd5cd07a Mon Sep 17 00:00:00 2001 From: Seth ProductEngine Date: Fri, 22 Apr 2011 01:07:52 +0300 Subject: STORM-380 FIXED Added syncing animations and sounds before the gesture starts playing. The actual playing of animations and sounds of a gesture starts only when all needed animations and sound files are loaded into viewer cache. This reduces the delay between animations and sounds meant to be played simultaneously but may increase the delay between the moment a gesture is triggered and the moment it starts playing. Fixed calling assets callback to clean up the void pointer in getAssetData() and avoid potential memory leaks. --- indra/llmessage/llassetstorage.cpp | 23 +++++- indra/newview/llgesturemgr.cpp | 156 ++++++++++++++++++++++++++++++++++++- indra/newview/llgesturemgr.h | 19 ++++- 3 files changed, 191 insertions(+), 7 deletions(-) diff --git a/indra/llmessage/llassetstorage.cpp b/indra/llmessage/llassetstorage.cpp index 27a368df3d..69d092de76 100644 --- a/indra/llmessage/llassetstorage.cpp +++ b/indra/llmessage/llassetstorage.cpp @@ -398,6 +398,12 @@ BOOL LLAssetStorage::hasLocalAsset(const LLUUID &uuid, const LLAssetType::EType bool LLAssetStorage::findInStaticVFSAndInvokeCallback(const LLUUID& uuid, LLAssetType::EType type, LLGetAssetCallback callback, void *user_data) { + if (user_data) + { + // The *user_data should not be passed without a callback to clean it up. + llassert(callback != NULL) + } + BOOL exists = mStaticVFS->getExists(uuid, type); if (exists) { @@ -432,15 +438,26 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, LL llinfos << "ASSET_TRACE requesting " << uuid << " type " << LLAssetType::lookup(type) << llendl; + if (user_data) + { + // The *user_data should not be passed without a callback to clean it up. + llassert(callback != NULL) + } + if (mShutDown) { llinfos << "ASSET_TRACE cancelled " << uuid << " type " << LLAssetType::lookup(type) << " shutting down" << llendl; - return; // don't get the asset or do any callbacks, we are shutting down + + if (callback) + { + callback(mVFS, uuid, type, user_data, LL_ERR_ASSET_REQUEST_FAILED, LL_EXSTAT_NONE); + } + return; } - + if (uuid.isNull()) { - // Special case early out for NULL uuid + // Special case early out for NULL uuid and for shutting down if (callback) { callback(mVFS, uuid, type, user_data, LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE, LL_EXSTAT_NULL_UUID); diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp index f658287fb1..2f9856c650 100644 --- a/indra/newview/llgesturemgr.cpp +++ b/indra/newview/llgesturemgr.cpp @@ -33,8 +33,10 @@ #include // library +#include "llaudioengine.h" #include "lldatapacker.h" #include "llinventory.h" +#include "llkeyframemotion.h" #include "llmultigesture.h" #include "llnotificationsutil.h" #include "llstl.h" @@ -526,6 +528,66 @@ void LLGestureMgr::playGesture(LLMultiGesture* gesture) gesture->mPlaying = TRUE; mPlaying.push_back(gesture); + // Load all needed assets to minimize the delays + // when gesture is playing. + for (std::vector::iterator steps_it = gesture->mSteps.begin(); + steps_it != gesture->mSteps.end(); + ++steps_it) + { + LLGestureStep* step = *steps_it; + switch(step->getType()) + { + case STEP_ANIMATION: + { + LLGestureStepAnimation* anim_step = (LLGestureStepAnimation*)step; + const LLUUID& anim_id = anim_step->mAnimAssetID; + + // Don't request the animation if this step stops it or if it is already in Static VFS + if (!(anim_id.isNull() + || anim_step->mFlags & ANIM_FLAG_STOP + || gAssetStorage->hasLocalAsset(anim_id, LLAssetType::AT_ANIMATION))) + { + mLoadingAssets.insert(anim_id); + + LLUUID* id = new LLUUID(gAgentID); + gAssetStorage->getAssetData(anim_id, + LLAssetType::AT_ANIMATION, + onAssetLoadComplete, + (void *)id, + TRUE); + } + break; + } + case STEP_SOUND: + { + LLGestureStepSound* sound_step = (LLGestureStepSound*)step; + const LLUUID& sound_id = sound_step->mSoundAssetID; + if (!(sound_id.isNull() + || gAssetStorage->hasLocalAsset(sound_id, LLAssetType::AT_SOUND))) + { + mLoadingAssets.insert(sound_id); + + gAssetStorage->getAssetData(sound_id, + LLAssetType::AT_SOUND, + onAssetLoadComplete, + NULL, + TRUE); + } + break; + } + case STEP_CHAT: + case STEP_WAIT: + case STEP_EOF: + { + break; + } + default: + { + llwarns << "Unknown gesture step type: " << step->getType() << llendl; + } + } + } + // And get it going stepGesture(gesture); @@ -741,7 +803,7 @@ void LLGestureMgr::stepGesture(LLMultiGesture* gesture) { return; } - if (!isAgentAvatarValid()) return; + if (!isAgentAvatarValid() || hasLoadingAssets(gesture)) return; // Of the ones that started playing, have any stopped? @@ -1091,6 +1153,98 @@ void LLGestureMgr::onLoadComplete(LLVFS *vfs, } } +// static +void LLGestureMgr::onAssetLoadComplete(LLVFS *vfs, + const LLUUID& asset_uuid, + LLAssetType::EType type, + void* user_data, S32 status, LLExtStat ext_status) +{ + LLGestureMgr& self = LLGestureMgr::instance(); + + // Complete the asset loading process depending on the type and + // remove the asset id from pending downloads list. + switch(type) + { + case LLAssetType::AT_ANIMATION: + { + LLKeyframeMotion::onLoadComplete(vfs, asset_uuid, type, user_data, status, ext_status); + + self.mLoadingAssets.erase(asset_uuid); + + break; + } + case LLAssetType::AT_SOUND: + { + LLAudioEngine::assetCallback(vfs, asset_uuid, type, user_data, status, ext_status); + + self.mLoadingAssets.erase(asset_uuid); + + break; + } + default: + { + llwarns << "Unexpected asset type: " << type << llendl; + + // We don't want to return from this callback without + // an animation or sound callback being fired + // and *user_data handled to avoid memory leaks. + llassert(type == LLAssetType::AT_ANIMATION || type == LLAssetType::AT_SOUND); + } + } +} + +// static +bool LLGestureMgr::hasLoadingAssets(LLMultiGesture* gesture) +{ + LLGestureMgr& self = LLGestureMgr::instance(); + + for (std::vector::iterator steps_it = gesture->mSteps.begin(); + steps_it != gesture->mSteps.end(); + ++steps_it) + { + LLGestureStep* step = *steps_it; + switch(step->getType()) + { + case STEP_ANIMATION: + { + LLGestureStepAnimation* anim_step = (LLGestureStepAnimation*)step; + const LLUUID& anim_id = anim_step->mAnimAssetID; + + if (!(anim_id.isNull() + || anim_step->mFlags & ANIM_FLAG_STOP + || self.mLoadingAssets.find(anim_id) == self.mLoadingAssets.end())) + { + return true; + } + break; + } + case STEP_SOUND: + { + LLGestureStepSound* sound_step = (LLGestureStepSound*)step; + const LLUUID& sound_id = sound_step->mSoundAssetID; + + if (!(sound_id.isNull() + || self.mLoadingAssets.find(sound_id) == self.mLoadingAssets.end())) + { + return true; + } + break; + } + case STEP_CHAT: + case STEP_WAIT: + case STEP_EOF: + { + break; + } + default: + { + llwarns << "Unknown gesture step type: " << step->getType() << llendl; + } + } + } + + return false; +} void LLGestureMgr::stopGesture(LLMultiGesture* gesture) { diff --git a/indra/newview/llgesturemgr.h b/indra/newview/llgesturemgr.h index b9935efeb3..5930841cbc 100644 --- a/indra/newview/llgesturemgr.h +++ b/indra/newview/llgesturemgr.h @@ -154,9 +154,20 @@ protected: // Used by loadGesture static void onLoadComplete(LLVFS *vfs, - const LLUUID& asset_uuid, - LLAssetType::EType type, - void* user_data, S32 status, LLExtStat ext_status); + const LLUUID& asset_uuid, + LLAssetType::EType type, + void* user_data, S32 status, LLExtStat ext_status); + + // Used by playGesture to load an asset file + // required to play a gesture step + static void onAssetLoadComplete(LLVFS *vfs, + const LLUUID& asset_uuid, + LLAssetType::EType type, + void* user_data, S32 status, LLExtStat ext_status); + + // Checks whether all animation and sound assets + // needed to play a gesture are loaded. + static bool hasLoadingAssets(LLMultiGesture* gesture); private: // Active gestures. @@ -172,6 +183,8 @@ private: callback_map_t mCallbackMap; std::vector mPlaying; BOOL mValid; + + std::set mLoadingAssets; }; #endif -- cgit v1.2.3 From 7a330c0e3fd4a3e190e6327deb769b595bc91342 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Thu, 21 Apr 2011 19:49:03 -0400 Subject: SH-1381 Avatar Physics behavior is tightly tied to viewer framerate Changed physics algorithm to perform integration over several steps if framerate is slow. Fixed a fundamental issue in the algorithm where timestep wasn't being used to calculate velocity changes. Had to change around some parameter ranges since the physics are calculated slightly differently now. --- indra/newview/character/avatar_lad.xml | 72 +++++++++++++------------- indra/newview/llphysicsmotion.cpp | 94 ++++++++++++++++------------------ 2 files changed, 79 insertions(+), 87 deletions(-) diff --git a/indra/newview/character/avatar_lad.xml b/indra/newview/character/avatar_lad.xml index 6acaa75c32..5d6b10c047 100644 --- a/indra/newview/character/avatar_lad.xml +++ b/indra/newview/character/avatar_lad.xml @@ -4352,8 +4352,8 @@ wearable="shape" edit_group="driven" value_default="0" - value_min="-1.5" - value_max="1.5"> + value_min="-1.25" + value_max="1.25"> @@ -11875,7 +11875,7 @@ render_pass="bump"> edit_group="physics_advanced" value_default="0" value_min="0" - value_max=".1"> + value_max="30"> @@ -11887,9 +11887,9 @@ render_pass="bump"> label="Breast Physics Drag" wearable="physics" edit_group="physics_advanced" - value_default=".15" + value_default="1" value_min="0" - value_max=".5"> + value_max="10"> @@ -11914,9 +11914,9 @@ render_pass="bump"> label="Breast Physics UpDown Spring" wearable="physics" edit_group="physics_breasts_updown" - value_default=".1" + value_default="10" value_min="0" - value_max="3"> + value_max="100"> label="Breast Physics UpDown Damping" wearable="physics" edit_group="physics_breasts_updown" - value_default=".05" + value_default=".2" value_min="0" - value_max=".1" - camera_elevation=".3" - camera_distance=".8"> + value_max="1"> @@ -11969,9 +11967,9 @@ render_pass="bump"> label="Breast Physics InOut Spring" wearable="physics" edit_group="physics_breasts_inout" - value_default=".1" + value_default="10" value_min="0" - value_max="3"> + value_max="100"> label="Breast Physics InOut Damping" wearable="physics" edit_group="physics_breasts_inout" - value_default=".05" + value_default=".2" value_min="0" - value_max=".1"> + value_max="1"> @@ -12022,7 +12020,7 @@ render_pass="bump"> edit_group="physics_advanced" value_default="0" value_min="0" - value_max=".1"> + value_max="30"> label="Belly Physics Drag" wearable="physics" edit_group="physics_advanced" - value_default=".15" + value_default="1" value_min="0" - value_max=".5"> + value_max="10"> label="Belly Physics UpDown Spring" wearable="physics" edit_group="physics_belly_updown" - value_default=".1" + value_default="10" value_min="0" - value_max="3"> + value_max="100"> label="Belly Physics UpDown Damping" wearable="physics" edit_group="physics_belly_updown" - value_default=".05" + value_default=".2" value_min="0" - value_max=".1"> + value_max="1"> @@ -12107,7 +12105,7 @@ render_pass="bump"> edit_group="physics_advanced" value_default="0" value_min="0" - value_max=".1"> + value_max="30"> label="Butt Physics Drag" wearable="physics" edit_group="physics_advanced" - value_default=".15" + value_default="1" value_min="0" - value_max=".5"> + value_max="10"> @@ -12142,9 +12140,9 @@ render_pass="bump"> label="Butt Physics UpDown Spring" wearable="physics" edit_group="physics_butt_updown" - value_default=".1" + value_default="10" value_min="0" - value_max="3"> + value_max="100"> label="Butt Physics UpDown Damping" wearable="physics" edit_group="physics_butt_updown" - value_default=".05" + value_default=".2" value_min="0" - value_max=".1"> + value_max="1"> @@ -12191,9 +12189,9 @@ render_pass="bump"> label="Butt Physics LeftRight Spring" wearable="physics" edit_group="physics_butt_leftright" - value_default=".1" + value_default="10" value_min="0" - value_max="3"> + value_max="100"> label="Butt Physics LeftRight Damping" wearable="physics" edit_group="physics_butt_leftright" - value_default=".05" + value_default=".2" value_min="0" - value_max=".1"> + value_max="1"> @@ -12242,9 +12240,9 @@ render_pass="bump"> label="Breast Physics LeftRight Spring" wearable="physics" edit_group="physics_breasts_leftright" - value_default=".1" + value_default="10" value_min="0" - value_max="3"> + value_max="100"> label="Breast Physics LeftRight Damping" wearable="physics" edit_group="physics_breasts_leftright" - value_default=".05" + value_default=".2" value_min="0" - value_max=".1"> + value_max="1"> diff --git a/indra/newview/llphysicsmotion.cpp b/indra/newview/llphysicsmotion.cpp index c9d355b3b5..7d862848b5 100644 --- a/indra/newview/llphysicsmotion.cpp +++ b/indra/newview/llphysicsmotion.cpp @@ -132,9 +132,8 @@ protected: F32 behavior_maxeffect); F32 toLocal(const LLVector3 &world); - F32 calculateVelocity_local(const F32 time_delta); - F32 calculateAcceleration_local(F32 velocity_local, - const F32 time_delta); + F32 calculateVelocity_local(); + F32 calculateAcceleration_local(F32 velocity_local); private: const std::string mParamDriverName; const std::string mParamControllerName; @@ -385,19 +384,20 @@ F32 LLPhysicsMotion::toLocal(const LLVector3 &world) return world * dir_world; } -F32 LLPhysicsMotion::calculateVelocity_local(const F32 time_delta) +F32 LLPhysicsMotion::calculateVelocity_local() { + const F32 world_to_model_scale = 10.0f; LLJoint *joint = mJointState->getJoint(); const LLVector3 position_world = joint->getWorldPosition(); const LLQuaternion rotation_world = joint->getWorldRotation(); const LLVector3 last_position_world = mPosition_world; - const LLVector3 velocity_world = (position_world-last_position_world) / time_delta; + const LLVector3 positionchange_world = (position_world-last_position_world) * world_to_model_scale; + const LLVector3 velocity_world = positionchange_world; const F32 velocity_local = toLocal(velocity_world); return velocity_local; } -F32 LLPhysicsMotion::calculateAcceleration_local(const F32 velocity_local, - const F32 time_delta) +F32 LLPhysicsMotion::calculateAcceleration_local(const F32 velocity_local) { // const F32 smoothing = getParamValue("Smoothing"); static const F32 smoothing = 3.0f; // Removed smoothing param since it's probably not necessary @@ -489,7 +489,31 @@ BOOL LLPhysicsMotion::onUpdate(F32 time) if (physics_test) behavior_maxeffect = 1.0f; - BOOL update_visuals = FALSE; + // Normalize the param position to be from [0,1]. + // We have to use normalized values because there may be more than one driven param, + // and each of these driven params may have its own range. + // This means we'll do all our calculations in normalized [0,1] local coordinates. + const F32 position_user_local = (mParamDriver->getWeight() - mParamDriver->getMinWeight()) / (mParamDriver->getMaxWeight() - mParamDriver->getMinWeight()); + + // + // End parameters and settings + //////////////////////////////////////////////////////////////////////////////// + + + //////////////////////////////////////////////////////////////////////////////// + // Calculate velocity and acceleration in parameter space. + // + + //const F32 velocity_joint_local = calculateVelocity_local(time_iteration_step); + const F32 velocity_joint_local = calculateVelocity_local(); + const F32 acceleration_joint_local = calculateAcceleration_local(velocity_joint_local); + + // + // End velocity and acceleration + //////////////////////////////////////////////////////////////////////////////// + + BOOL update_visuals = FALSE; + // Break up the physics into a bunch of iterations so that differing framerates will show // roughly the same behavior. for (F32 time_iteration = 0; time_iteration <= time_delta; time_iteration += TIME_ITERATION_STEP) @@ -497,46 +521,20 @@ BOOL LLPhysicsMotion::onUpdate(F32 time) F32 time_iteration_step = TIME_ITERATION_STEP; if (time_iteration + TIME_ITERATION_STEP > time_delta) { - time_iteration_step = time_delta; + time_iteration_step = time_delta-time_iteration; } - // mPositon_local should be in normalized 0,1 range already. Just making sure... - F32 position_current_local = llclamp(mPosition_local, - 0.0f, - 1.0f); - - // Normalize the param position to be from [0,1]. - // We have to use normalized values because there may be more than one driven param, - // and each of these driven params may have its own range. - // This means we'll do all our calculations in normalized [0,1] local coordinates. - F32 position_user_local = mParamDriver->getWeight(); - position_user_local = (position_user_local - mParamDriver->getMinWeight()) / (mParamDriver->getMaxWeight() - mParamDriver->getMinWeight()); - + const F32 position_current_local = llclamp(mPosition_local, + 0.0f, + 1.0f); // If the effect is turned off then don't process unless we need one more update // to set the position to the default (i.e. user) position. if ((behavior_maxeffect == 0) && (position_current_local == position_user_local)) { - return FALSE; + return update_visuals; } - // - // End parameters and settings - //////////////////////////////////////////////////////////////////////////////// - - - //////////////////////////////////////////////////////////////////////////////// - // Calculate velocity and acceleration in parameter space. - // - - const F32 velocity_joint_local = calculateVelocity_local(time_iteration_step); - const F32 acceleration_joint_local = calculateAcceleration_local(velocity_joint_local, time_iteration_step); - - // - // End velocity and acceleration - //////////////////////////////////////////////////////////////////////////////// - - //////////////////////////////////////////////////////////////////////////////// // Calculate the total force // @@ -553,7 +551,7 @@ BOOL LLPhysicsMotion::onUpdate(F32 time) // Gravity always points downward in world space. // F = mg const LLVector3 gravity_world(0,0,1); - const F32 force_gravity = behavior_gain * (toLocal(gravity_world) * behavior_gravity * behavior_mass); + const F32 force_gravity = (toLocal(gravity_world) * behavior_gravity * behavior_mass); // Damping is a restoring force that opposes the current velocity. // F = -kv @@ -581,10 +579,10 @@ BOOL LLPhysicsMotion::onUpdate(F32 time) // Calculate the new acceleration based on the net force. // a = F/m const F32 acceleration_new_local = force_net / behavior_mass; - static const F32 max_acceleration = 10.0f; // magic number, used to be customizable. - F32 velocity_new_local = mVelocity_local + acceleration_new_local; + static const F32 max_velocity = 100.0f; // magic number, used to be customizable. + F32 velocity_new_local = mVelocity_local + acceleration_new_local*time_iteration_step; velocity_new_local = llclamp(velocity_new_local, - -max_acceleration, max_acceleration); + -max_velocity, max_velocity); // Temporary debugging setting to cause all avatars to move, for profiling purposes. if (physics_test) @@ -610,8 +608,6 @@ BOOL LLPhysicsMotion::onUpdate(F32 time) (position_new_local != position_new_local)) { position_new_local = 0; - position_current_local = 0; - position_user_local = 0; mVelocity_local = 0; mVelocityJoint_local = 0; mAccelerationJoint_local = 0; @@ -680,16 +676,14 @@ BOOL LLPhysicsMotion::onUpdate(F32 time) // End update visual params //////////////////////////////////////////////////////////////////////////////// - mVelocityJoint_local = velocity_joint_local; - mVelocity_local = velocity_new_local; mAccelerationJoint_local = acceleration_joint_local; mPosition_local = position_new_local; - - mPosition_world = joint->getWorldPosition(); - } mLastTime = time; + mPosition_world = joint->getWorldPosition(); + mVelocityJoint_local = velocity_joint_local; + /* // Write out debugging info into a spreadsheet. -- cgit v1.2.3 From f227e8ec01c99e09df7f362b934d57d80702a882 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Thu, 21 Apr 2011 20:30:38 -0400 Subject: SH-1381 FIXED Avatar Physics behavior is tightly tied to viewer framerate Changed range of gain; previous range was too small. --- indra/newview/llphysicsmotion.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llphysicsmotion.cpp b/indra/newview/llphysicsmotion.cpp index 7d862848b5..e6a7212a47 100644 --- a/indra/newview/llphysicsmotion.cpp +++ b/indra/newview/llphysicsmotion.cpp @@ -386,7 +386,7 @@ F32 LLPhysicsMotion::toLocal(const LLVector3 &world) F32 LLPhysicsMotion::calculateVelocity_local() { - const F32 world_to_model_scale = 10.0f; + const F32 world_to_model_scale = 100.0f; LLJoint *joint = mJointState->getJoint(); const LLVector3 position_world = joint->getWorldPosition(); const LLQuaternion rotation_world = joint->getWorldRotation(); -- cgit v1.2.3 From a9aeeab6c5fc4efeeaddf294bc4686efe02db5c1 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 21 Apr 2011 18:36:07 -0700 Subject: removed skylight-specific build params --- BuildParams | 7 ------- 1 file changed, 7 deletions(-) diff --git a/BuildParams b/BuildParams index f49a714c03..c0955cfeda 100644 --- a/BuildParams +++ b/BuildParams @@ -164,13 +164,6 @@ viewer-tut-teamcity.email = enus@lindenlab.com viewer-tut-teamcity.build_server = false viewer-tut-teamcity.build_server_tests = false -# ======================================== -# experience -# ======================================== -viewer-experience.public_build = false -viewer-experience.viewer_channel = "Second Life SkyLight Viewer" -viewer-experience.login_channel = "Second Life SkyLight Viewer" - # ================================================================= # asset delivery 2010 projects # ================================================================= -- cgit v1.2.3 From 175f12350d351570712db03e15c1bc89af677ad8 Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Fri, 22 Apr 2011 19:07:15 +0300 Subject: STORM-1093 FIX "Dock" icon is still shown after a side panel has been docked with Ctrl+Shift+W. Reason: When an undocked side tray tab floater got closed with Ctrl+Shift+W, LLSideTray::setTabDocked() was called. It docked the floater but didn't update the dock/undock icon. Fix: Made setTabDocked() a general purpose method, not a hack suitable for using only as a floater close callback in the basic viewer mode. It now updates the dock/undock icon. Other changes: * Replaced numerous calls to toggleTabDocked with setDocked(), that is safer because does exactly what you want. * Got rid of a duplicated floater close callback. --- indra/newview/llfloatersidetraytab.cpp | 3 +- indra/newview/llsidetray.cpp | 61 ++++++++++++---------------------- indra/newview/llsidetray.h | 2 +- 3 files changed, 24 insertions(+), 42 deletions(-) diff --git a/indra/newview/llfloatersidetraytab.cpp b/indra/newview/llfloatersidetraytab.cpp index 94407e6da0..9f15e62d84 100644 --- a/indra/newview/llfloatersidetraytab.cpp +++ b/indra/newview/llfloatersidetraytab.cpp @@ -47,5 +47,6 @@ LLFloaterSideTrayTab::~LLFloaterSideTrayTab() void LLFloaterSideTrayTab::onClose(bool app_quitting) { - LLSideTray::getInstance()->setTabDocked(getName(), true); + // The floater is already being closed, so don't toggle it once more (that may crash viewer). + LLSideTray::getInstance()->setTabDocked(getName(), /* dock = */ true, /* toggle_floater = */ false); } diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp index 4f18ee1da2..615899d49f 100644 --- a/indra/newview/llsidetray.cpp +++ b/indra/newview/llsidetray.cpp @@ -127,8 +127,6 @@ protected: void undock(LLFloater* floater_tab); LLSideTray* getSideTray(); - - void onFloaterClose(LLSD::Boolean app_quitting); public: virtual ~LLSideTrayTab(); @@ -146,7 +144,7 @@ public: void onOpen (const LLSD& key); - void toggleTabDocked(); + void toggleTabDocked(bool toggle_floater = true); void setDocked(bool dock); bool isDocked() const; @@ -160,7 +158,6 @@ private: std::string mDescription; LLView* mMainPanel; - boost::signals2::connection mFloaterCloseConn; }; LLSideTrayTab::LLSideTrayTab(const Params& p) @@ -196,8 +193,8 @@ BOOL LLSideTrayTab::postBuild() title_panel->getChild(TAB_PANEL_CAPTION_TITLE_BOX)->setValue(mTabTitle); - getChild("undock")->setCommitCallback(boost::bind(&LLSideTrayTab::toggleTabDocked, this)); - getChild("dock")->setCommitCallback(boost::bind(&LLSideTrayTab::toggleTabDocked, this)); + getChild("undock")->setCommitCallback(boost::bind(&LLSideTrayTab::setDocked, this, false)); + getChild("dock")->setCommitCallback(boost::bind(&LLSideTrayTab::setDocked, this, true)); return true; } @@ -253,14 +250,16 @@ LLSideTray* LLSideTrayTab::getSideTray() return side_tray; } -void LLSideTrayTab::toggleTabDocked() +void LLSideTrayTab::toggleTabDocked(bool toggle_floater /* = true */) { + // *FIX: Calling this method twice per frame would crash the viewer. + std::string tab_name = getName(); LLFloater* floater_tab = LLFloaterReg::getInstance("side_bar_tab", tab_name); if (!floater_tab) return; - bool docking = LLFloater::isShown(floater_tab); + bool docking = !isDocked(); // Hide the "Tear Off" button when a tab gets undocked // and show "Dock" button instead. @@ -278,7 +277,10 @@ void LLSideTrayTab::toggleTabDocked() // Open/close the floater *after* we reparent the tab panel, // so that it doesn't receive redundant visibility change notifications. - LLFloaterReg::toggleInstance("side_bar_tab", tab_name); + if (toggle_floater) + { + LLFloaterReg::toggleInstance("side_bar_tab", tab_name); + } } // Same as toggleTabDocked() apart from making sure that we do exactly what we want. @@ -298,18 +300,6 @@ bool LLSideTrayTab::isDocked() const return dynamic_cast(getParent()) != NULL; } -void LLSideTrayTab::onFloaterClose(LLSD::Boolean app_quitting) -{ - // If user presses Ctrl-Shift-W, handle that gracefully by docking all - // undocked tabs before their floaters get destroyed (STORM-1016). - - // Don't dock on quit for the current dock state to be correctly saved. - if (app_quitting) return; - - lldebugs << "Forcibly docking tab " << getName() << llendl; - setDocked(true); -} - BOOL LLSideTrayTab::handleScrollWheel(S32 x, S32 y, S32 clicks) { // Let children handle the event @@ -333,7 +323,6 @@ void LLSideTrayTab::dock(LLFloater* floater_tab) return; } - mFloaterCloseConn.disconnect(); setRect(side_tray->getLocalRect()); reshape(getRect().getWidth(), getRect().getHeight()); @@ -382,7 +371,6 @@ void LLSideTrayTab::undock(LLFloater* floater_tab) } floater_tab->addChild(this); - mFloaterCloseConn = floater_tab->setCloseCallback(boost::bind(&LLSideTrayTab::onFloaterClose, this, _2)); floater_tab->setTitle(mTabTitle); floater_tab->setName(getName()); @@ -510,7 +498,7 @@ public: LLSideTrayTab* tab = side_tray->getTab(getName()); if (!tab) return FALSE; - tab->toggleTabDocked(); + tab->setDocked(false); LLFloater* floater_tab = LLFloaterReg::getInstance("side_bar_tab", tab->getName()); if (!floater_tab) return FALSE; @@ -681,7 +669,7 @@ LLPanel* LLSideTray::openChildPanel(LLSideTrayTab* tab, const std::string& panel if (tab_attached && LLUI::sSettingGroups["config"]->getBOOL("OpenSidePanelsInFloaters")) { - tab->toggleTabDocked(); + tab->setDocked(false); tab_attached = false; } @@ -1102,7 +1090,7 @@ void LLSideTray::detachTabs() if (!is_visible) continue; llassert(isTabAttached(tab->getName())); - tab->toggleTabDocked(); + tab->setDocked(false); } } @@ -1327,8 +1315,9 @@ bool LLSideTray::isPanelActive(const std::string& panel_name) return (panel->getName() == panel_name); } -void LLSideTray::setTabDocked(const std::string& tab_name, bool dock) +void LLSideTray::setTabDocked(const std::string& tab_name, bool dock, bool toggle_floater /* = true*/) { + // Lookup tab by name. LLSideTrayTab* tab = getTab(tab_name); if (!tab) { // not a docked tab, look through detached tabs @@ -1345,20 +1334,12 @@ void LLSideTray::setTabDocked(const std::string& tab_name, bool dock) } - if (tab) - { - bool tab_attached = isTabAttached(tab_name); - LLFloater* floater_tab = LLFloaterReg::getInstance("side_bar_tab", tab_name); - if (!floater_tab) return; + llassert(tab != NULL); - if (dock && !tab_attached) - { - tab->dock(floater_tab); - } - else if (!dock && tab_attached) - { - tab->undock(floater_tab); - } + // Toggle its dock state. + if (tab && tab->isDocked() != dock) + { + tab->toggleTabDocked(toggle_floater); } } diff --git a/indra/newview/llsidetray.h b/indra/newview/llsidetray.h index 1dddd9e9bc..57e4264247 100644 --- a/indra/newview/llsidetray.h +++ b/indra/newview/llsidetray.h @@ -121,7 +121,7 @@ public: LLPanel* getActivePanel (); bool isPanelActive (const std::string& panel_name); - void setTabDocked(const std::string& tab_name, bool dock); + void setTabDocked(const std::string& tab_name, bool dock, bool toggle_floater = true); /* * get the panel of given type T (don't show it or do anything else with it) -- cgit v1.2.3 From 154a465bdaff58023c43bed12b4a049ae72a55df Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Fri, 22 Apr 2011 13:17:44 -0400 Subject: dos2unix line ending fix for llphysicsmotion.cpp --- indra/newview/llphysicsmotion.cpp | 1476 ++++++++++++++++++------------------- 1 file changed, 738 insertions(+), 738 deletions(-) diff --git a/indra/newview/llphysicsmotion.cpp b/indra/newview/llphysicsmotion.cpp index e6a7212a47..ef0c1a3558 100644 --- a/indra/newview/llphysicsmotion.cpp +++ b/indra/newview/llphysicsmotion.cpp @@ -1,738 +1,738 @@ -/** - * @file llphysicsmotion.cpp - * @brief Implementation of LLPhysicsMotion class. - * - * $LicenseInfo:firstyear=2001&license=viewergpl$ - * - * Copyright (c) 2001-2009, Linden Research, Inc. - * - * Second Life Viewer Source Code - * The source code in this file ("Source Code") is provided by Linden Lab - * to you under the terms of the GNU General Public License, version 2.0 - * ("GPL"), unless you have obtained a separate licensing agreement - * ("Other License"), formally executed by you and Linden Lab. Terms of - * the GPL can be found in doc/GPL-license.txt in this distribution, or - * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 - * - * There are special exceptions to the terms and conditions of the GPL as - * it is applied to this Source Code. View the full text of the exception - * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at - * http://secondlifegrid.net/programs/open_source/licensing/flossexception - * - * By copying, modifying or distributing this software, you acknowledge - * that you have read and understood your obligations described above, - * and agree to abide by those obligations. - * - * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO - * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, - * COMPLETENESS OR PERFORMANCE. - * $/LicenseInfo$ - */ - -//----------------------------------------------------------------------------- -// Header Files -//----------------------------------------------------------------------------- -#include "llviewerprecompiledheaders.h" -#include "linden_common.h" - -#include "m3math.h" -#include "v3dmath.h" - -#include "llphysicsmotion.h" -#include "llagent.h" -#include "llcharacter.h" -#include "llviewercontrol.h" -#include "llviewervisualparam.h" -#include "llvoavatarself.h" - -typedef std::map controller_map_t; -typedef std::map default_controller_map_t; - -#define MIN_REQUIRED_PIXEL_AREA_AVATAR_PHYSICS_MOTION 0.f -#define TIME_ITERATION_STEP 0.1f - -inline F64 llsgn(const F64 a) -{ - if (a >= 0) - return 1; - return -1; -} - -/* - At a high level, this works by setting temporary parameters that are not stored - in the avatar's list of params, and are not conveyed to other users. We accomplish - this by creating some new temporary driven params inside avatar_lad that are then driven - by the actual params that the user sees and sets. For example, in the old system, - the user sets a param called breast bouyancy, which controls the Z value of the breasts. - In our new system, the user still sets the breast bouyancy, but that param is redefined - as a driver param so that affects a new temporary driven param that the bounce is applied - to. -*/ - -class LLPhysicsMotion -{ -public: - /* - param_driver_name: The param that controls the params that are being affected by the physics. - joint_name: The joint that the body part is attached to. The joint is - used to determine the orientation (rotation) of the body part. - - character: The avatar that this physics affects. - - motion_direction_vec: The direction (in world coordinates) that determines the - motion. For example, (0,0,1) is up-down, and means that up-down motion is what - determines how this joint moves. - - controllers: The various settings (e.g. spring force, mass) that determine how - the body part behaves. - */ - LLPhysicsMotion(const std::string ¶m_driver_name, - const std::string &joint_name, - LLCharacter *character, - const LLVector3 &motion_direction_vec, - const controller_map_t &controllers) : - mParamDriverName(param_driver_name), - mJointName(joint_name), - mMotionDirectionVec(motion_direction_vec), - mParamDriver(NULL), - mParamControllers(controllers), - mCharacter(character), - mLastTime(0), - mPosition_local(0), - mVelocityJoint_local(0), - mPositionLastUpdate_local(0) - { - mJointState = new LLJointState; - } - - BOOL initialize(); - - ~LLPhysicsMotion() {} - - BOOL onUpdate(F32 time); - - LLPointer getJointState() - { - return mJointState; - } -protected: - F32 getParamValue(const std::string& controller_key) - { - const controller_map_t::const_iterator& entry = mParamControllers.find(controller_key); - if (entry == mParamControllers.end()) - { - return sDefaultController[controller_key]; - } - const std::string& param_name = (*entry).second.c_str(); - return mCharacter->getVisualParamWeight(param_name.c_str()); - } - void setParamValue(LLViewerVisualParam *param, - const F32 new_value_local, - F32 behavior_maxeffect); - - F32 toLocal(const LLVector3 &world); - F32 calculateVelocity_local(); - F32 calculateAcceleration_local(F32 velocity_local); -private: - const std::string mParamDriverName; - const std::string mParamControllerName; - const LLVector3 mMotionDirectionVec; - const std::string mJointName; - - F32 mPosition_local; - F32 mVelocityJoint_local; // How fast the joint is moving - F32 mAccelerationJoint_local; // Acceleration on the joint - - F32 mVelocity_local; // How fast the param is moving - F32 mPositionLastUpdate_local; - LLVector3 mPosition_world; - - LLViewerVisualParam *mParamDriver; - const controller_map_t mParamControllers; - - LLPointer mJointState; - LLCharacter *mCharacter; - - F32 mLastTime; - - static default_controller_map_t sDefaultController; -}; - -default_controller_map_t initDefaultController() -{ - default_controller_map_t controller; - controller["Mass"] = 0.2f; - controller["Gravity"] = 0.0f; - controller["Damping"] = .05f; - controller["Drag"] = 0.15f; - controller["MaxEffect"] = 0.1f; - controller["Spring"] = 0.1f; - controller["Gain"] = 10.0f; - return controller; -} - -default_controller_map_t LLPhysicsMotion::sDefaultController = initDefaultController(); - -BOOL LLPhysicsMotion::initialize() -{ - if (!mJointState->setJoint(mCharacter->getJoint(mJointName.c_str()))) - return FALSE; - mJointState->setUsage(LLJointState::ROT); - - mParamDriver = (LLViewerVisualParam*)mCharacter->getVisualParam(mParamDriverName.c_str()); - if (mParamDriver == NULL) - { - llinfos << "Failure reading in [ " << mParamDriverName << " ]" << llendl; - return FALSE; - } - - return TRUE; -} - -LLPhysicsMotionController::LLPhysicsMotionController(const LLUUID &id) : - LLMotion(id), - mCharacter(NULL) -{ - mName = "breast_motion"; -} - -LLPhysicsMotionController::~LLPhysicsMotionController() -{ - for (motion_vec_t::iterator iter = mMotions.begin(); - iter != mMotions.end(); - ++iter) - { - delete (*iter); - } -} - -BOOL LLPhysicsMotionController::onActivate() -{ - return TRUE; -} - -void LLPhysicsMotionController::onDeactivate() -{ -} - -LLMotion::LLMotionInitStatus LLPhysicsMotionController::onInitialize(LLCharacter *character) -{ - mCharacter = character; - - mMotions.clear(); - - // Breast Cleavage - { - controller_map_t controller; - controller["Mass"] = "Breast_Physics_Mass"; - controller["Gravity"] = "Breast_Physics_Gravity"; - controller["Drag"] = "Breast_Physics_Drag"; - controller["Damping"] = "Breast_Physics_InOut_Damping"; - controller["MaxEffect"] = "Breast_Physics_InOut_Max_Effect"; - controller["Spring"] = "Breast_Physics_InOut_Spring"; - controller["Gain"] = "Breast_Physics_InOut_Gain"; - LLPhysicsMotion *motion = new LLPhysicsMotion("Breast_Physics_InOut_Controller", - "mChest", - character, - LLVector3(-1,0,0), - controller); - if (!motion->initialize()) - { - llassert_always(FALSE); - return STATUS_FAILURE; - } - addMotion(motion); - } - - // Breast Bounce - { - controller_map_t controller; - controller["Mass"] = "Breast_Physics_Mass"; - controller["Gravity"] = "Breast_Physics_Gravity"; - controller["Drag"] = "Breast_Physics_Drag"; - controller["Damping"] = "Breast_Physics_UpDown_Damping"; - controller["MaxEffect"] = "Breast_Physics_UpDown_Max_Effect"; - controller["Spring"] = "Breast_Physics_UpDown_Spring"; - controller["Gain"] = "Breast_Physics_UpDown_Gain"; - LLPhysicsMotion *motion = new LLPhysicsMotion("Breast_Physics_UpDown_Controller", - "mChest", - character, - LLVector3(0,0,1), - controller); - if (!motion->initialize()) - { - llassert_always(FALSE); - return STATUS_FAILURE; - } - addMotion(motion); - } - - // Breast Sway - { - controller_map_t controller; - controller["Mass"] = "Breast_Physics_Mass"; - controller["Gravity"] = "Breast_Physics_Gravity"; - controller["Drag"] = "Breast_Physics_Drag"; - controller["Damping"] = "Breast_Physics_LeftRight_Damping"; - controller["MaxEffect"] = "Breast_Physics_LeftRight_Max_Effect"; - controller["Spring"] = "Breast_Physics_LeftRight_Spring"; - controller["Gain"] = "Breast_Physics_LeftRight_Gain"; - LLPhysicsMotion *motion = new LLPhysicsMotion("Breast_Physics_LeftRight_Controller", - "mChest", - character, - LLVector3(0,-1,0), - controller); - if (!motion->initialize()) - { - llassert_always(FALSE); - return STATUS_FAILURE; - } - addMotion(motion); - } - // Butt Bounce - { - controller_map_t controller; - controller["Mass"] = "Butt_Physics_Mass"; - controller["Gravity"] = "Butt_Physics_Gravity"; - controller["Drag"] = "Butt_Physics_Drag"; - controller["Damping"] = "Butt_Physics_UpDown_Damping"; - controller["MaxEffect"] = "Butt_Physics_UpDown_Max_Effect"; - controller["Spring"] = "Butt_Physics_UpDown_Spring"; - controller["Gain"] = "Butt_Physics_UpDown_Gain"; - LLPhysicsMotion *motion = new LLPhysicsMotion("Butt_Physics_UpDown_Controller", - "mPelvis", - character, - LLVector3(0,0,-1), - controller); - if (!motion->initialize()) - { - llassert_always(FALSE); - return STATUS_FAILURE; - } - addMotion(motion); - } - - // Butt LeftRight - { - controller_map_t controller; - controller["Mass"] = "Butt_Physics_Mass"; - controller["Gravity"] = "Butt_Physics_Gravity"; - controller["Drag"] = "Butt_Physics_Drag"; - controller["Damping"] = "Butt_Physics_LeftRight_Damping"; - controller["MaxEffect"] = "Butt_Physics_LeftRight_Max_Effect"; - controller["Spring"] = "Butt_Physics_LeftRight_Spring"; - controller["Gain"] = "Butt_Physics_LeftRight_Gain"; - LLPhysicsMotion *motion = new LLPhysicsMotion("Butt_Physics_LeftRight_Controller", - "mPelvis", - character, - LLVector3(0,-1,0), - controller); - if (!motion->initialize()) - { - llassert_always(FALSE); - return STATUS_FAILURE; - } - addMotion(motion); - } - - // Belly Bounce - { - controller_map_t controller; - controller["Mass"] = "Belly_Physics_Mass"; - controller["Gravity"] = "Belly_Physics_Gravity"; - controller["Drag"] = "Belly_Physics_Drag"; - controller["Damping"] = "Belly_Physics_UpDown_Damping"; - controller["MaxEffect"] = "Belly_Physics_UpDown_Max_Effect"; - controller["Spring"] = "Belly_Physics_UpDown_Spring"; - controller["Gain"] = "Belly_Physics_UpDown_Gain"; - LLPhysicsMotion *motion = new LLPhysicsMotion("Belly_Physics_UpDown_Controller", - "mPelvis", - character, - LLVector3(0,0,-1), - controller); - if (!motion->initialize()) - { - llassert_always(FALSE); - return STATUS_FAILURE; - } - addMotion(motion); - } - - return STATUS_SUCCESS; -} - -void LLPhysicsMotionController::addMotion(LLPhysicsMotion *motion) -{ - addJointState(motion->getJointState()); - mMotions.push_back(motion); -} - -F32 LLPhysicsMotionController::getMinPixelArea() -{ - return MIN_REQUIRED_PIXEL_AREA_AVATAR_PHYSICS_MOTION; -} - -// Local space means "parameter space". -F32 LLPhysicsMotion::toLocal(const LLVector3 &world) -{ - LLJoint *joint = mJointState->getJoint(); - const LLQuaternion rotation_world = joint->getWorldRotation(); - - LLVector3 dir_world = mMotionDirectionVec * rotation_world; - dir_world.normalize(); - return world * dir_world; -} - -F32 LLPhysicsMotion::calculateVelocity_local() -{ - const F32 world_to_model_scale = 100.0f; - LLJoint *joint = mJointState->getJoint(); - const LLVector3 position_world = joint->getWorldPosition(); - const LLQuaternion rotation_world = joint->getWorldRotation(); - const LLVector3 last_position_world = mPosition_world; - const LLVector3 positionchange_world = (position_world-last_position_world) * world_to_model_scale; - const LLVector3 velocity_world = positionchange_world; - const F32 velocity_local = toLocal(velocity_world); - return velocity_local; -} - -F32 LLPhysicsMotion::calculateAcceleration_local(const F32 velocity_local) -{ -// const F32 smoothing = getParamValue("Smoothing"); - static const F32 smoothing = 3.0f; // Removed smoothing param since it's probably not necessary - const F32 acceleration_local = velocity_local - mVelocityJoint_local; - - const F32 smoothed_acceleration_local = - acceleration_local * 1.0/smoothing + - mAccelerationJoint_local * (smoothing-1.0)/smoothing; - - return smoothed_acceleration_local; -} - -BOOL LLPhysicsMotionController::onUpdate(F32 time, U8* joint_mask) -{ - // Skip if disabled globally. - if (!gSavedSettings.getBOOL("AvatarPhysics")) - { - return TRUE; - } - - BOOL update_visuals = FALSE; - for (motion_vec_t::iterator iter = mMotions.begin(); - iter != mMotions.end(); - ++iter) - { - LLPhysicsMotion *motion = (*iter); - update_visuals |= motion->onUpdate(time); - } - - if (update_visuals) - mCharacter->updateVisualParams(); - - return TRUE; -} - - -// Return TRUE if character has to update visual params. -BOOL LLPhysicsMotion::onUpdate(F32 time) -{ - // static FILE *mFileWrite = fopen("c:\\temp\\avatar_data.txt","w"); - - if (!mParamDriver) - return FALSE; - - if (!mLastTime) - { - mLastTime = time; - return FALSE; - } - - //////////////////////////////////////////////////////////////////////////////// - // Get all parameters and settings - // - - const F32 time_delta = time - mLastTime; - - // Don't update too frequently, to avoid precision errors from small time slices. - if (time_delta <= .01) - { - return FALSE; - } - - // If less than 1FPS, we don't want to be spending time updating physics at all. - if (time_delta > 1.0) - { - mLastTime = time; - return FALSE; - } - - // Higher LOD is better. This controls the granularity - // and frequency of updates for the motions. - const F32 lod_factor = LLVOAvatar::sPhysicsLODFactor; - if (lod_factor == 0) - { - return TRUE; - } - - LLJoint *joint = mJointState->getJoint(); - - const F32 behavior_mass = getParamValue("Mass"); - const F32 behavior_gravity = getParamValue("Gravity"); - const F32 behavior_spring = getParamValue("Spring"); - const F32 behavior_gain = getParamValue("Gain"); - const F32 behavior_damping = getParamValue("Damping"); - const F32 behavior_drag = getParamValue("Drag"); - const BOOL physics_test = FALSE; // Enable this to simulate bouncing on all parts. - - F32 behavior_maxeffect = getParamValue("MaxEffect"); - if (physics_test) - behavior_maxeffect = 1.0f; - - // Normalize the param position to be from [0,1]. - // We have to use normalized values because there may be more than one driven param, - // and each of these driven params may have its own range. - // This means we'll do all our calculations in normalized [0,1] local coordinates. - const F32 position_user_local = (mParamDriver->getWeight() - mParamDriver->getMinWeight()) / (mParamDriver->getMaxWeight() - mParamDriver->getMinWeight()); - - // - // End parameters and settings - //////////////////////////////////////////////////////////////////////////////// - - - //////////////////////////////////////////////////////////////////////////////// - // Calculate velocity and acceleration in parameter space. - // - - //const F32 velocity_joint_local = calculateVelocity_local(time_iteration_step); - const F32 velocity_joint_local = calculateVelocity_local(); - const F32 acceleration_joint_local = calculateAcceleration_local(velocity_joint_local); - - // - // End velocity and acceleration - //////////////////////////////////////////////////////////////////////////////// - - BOOL update_visuals = FALSE; - - // Break up the physics into a bunch of iterations so that differing framerates will show - // roughly the same behavior. - for (F32 time_iteration = 0; time_iteration <= time_delta; time_iteration += TIME_ITERATION_STEP) - { - F32 time_iteration_step = TIME_ITERATION_STEP; - if (time_iteration + TIME_ITERATION_STEP > time_delta) - { - time_iteration_step = time_delta-time_iteration; - } - - // mPositon_local should be in normalized 0,1 range already. Just making sure... - const F32 position_current_local = llclamp(mPosition_local, - 0.0f, - 1.0f); - // If the effect is turned off then don't process unless we need one more update - // to set the position to the default (i.e. user) position. - if ((behavior_maxeffect == 0) && (position_current_local == position_user_local)) - { - return update_visuals; - } - - //////////////////////////////////////////////////////////////////////////////// - // Calculate the total force - // - - // Spring force is a restoring force towards the original user-set breast position. - // F = kx - const F32 spring_length = position_current_local - position_user_local; - const F32 force_spring = -spring_length * behavior_spring; - - // Acceleration is the force that comes from the change in velocity of the torso. - // F = ma - const F32 force_accel = behavior_gain * (acceleration_joint_local * behavior_mass); - - // Gravity always points downward in world space. - // F = mg - const LLVector3 gravity_world(0,0,1); - const F32 force_gravity = (toLocal(gravity_world) * behavior_gravity * behavior_mass); - - // Damping is a restoring force that opposes the current velocity. - // F = -kv - const F32 force_damping = -behavior_damping * mVelocity_local; - - // Drag is a force imparted by velocity (intuitively it is similar to wind resistance) - // F = .5kv^2 - const F32 force_drag = .5*behavior_drag*velocity_joint_local*velocity_joint_local*llsgn(velocity_joint_local); - - const F32 force_net = (force_accel + - force_gravity + - force_spring + - force_damping + - force_drag); - - // - // End total force - //////////////////////////////////////////////////////////////////////////////// - - - //////////////////////////////////////////////////////////////////////////////// - // Calculate new params - // - - // Calculate the new acceleration based on the net force. - // a = F/m - const F32 acceleration_new_local = force_net / behavior_mass; - static const F32 max_velocity = 100.0f; // magic number, used to be customizable. - F32 velocity_new_local = mVelocity_local + acceleration_new_local*time_iteration_step; - velocity_new_local = llclamp(velocity_new_local, - -max_velocity, max_velocity); - - // Temporary debugging setting to cause all avatars to move, for profiling purposes. - if (physics_test) - { - velocity_new_local = sin(time*4.0); - } - // Calculate the new parameters, or remain unchanged if max speed is 0. - F32 position_new_local = position_current_local + velocity_new_local*time_iteration_step; - if (behavior_maxeffect == 0) - position_new_local = position_user_local; - - // Zero out the velocity if the param is being pushed beyond its limits. - if ((position_new_local < 0 && velocity_new_local < 0) || - (position_new_local > 1 && velocity_new_local > 0)) - { - velocity_new_local = 0; - } - - // Check for NaN values. A NaN value is detected if the variables doesn't equal itself. - // If NaN, then reset everything. - if ((mPosition_local != mPosition_local) || - (mVelocity_local != mVelocity_local) || - (position_new_local != position_new_local)) - { - position_new_local = 0; - mVelocity_local = 0; - mVelocityJoint_local = 0; - mAccelerationJoint_local = 0; - mPosition_local = 0; - mPosition_world = LLVector3(0,0,0); - } - - const F32 position_new_local_clamped = llclamp(position_new_local, - 0.0f, - 1.0f); - - LLDriverParam *driver_param = dynamic_cast(mParamDriver); - llassert_always(driver_param); - if (driver_param) - { - // If this is one of our "hidden" driver params, then make sure it's - // the default value. - if ((driver_param->getGroup() != VISUAL_PARAM_GROUP_TWEAKABLE) && - (driver_param->getGroup() != VISUAL_PARAM_GROUP_TWEAKABLE_NO_TRANSMIT)) - { - mCharacter->setVisualParamWeight(driver_param, - 0, - FALSE); - } - for (LLDriverParam::entry_list_t::iterator iter = driver_param->mDriven.begin(); - iter != driver_param->mDriven.end(); - ++iter) - { - LLDrivenEntry &entry = (*iter); - LLViewerVisualParam *driven_param = entry.mParam; - setParamValue(driven_param,position_new_local_clamped, behavior_maxeffect); - } - } - - // - // End calculate new params - //////////////////////////////////////////////////////////////////////////////// - - //////////////////////////////////////////////////////////////////////////////// - // Conditionally update the visual params - // - - // Updating the visual params (i.e. what the user sees) is fairly expensive. - // So only update if the params have changed enough, and also take into account - // the graphics LOD settings. - - // For non-self, if the avatar is small enough visually, then don't update. - const F32 area_for_max_settings = 0.0; - const F32 area_for_min_settings = 1400.0; - const F32 area_for_this_setting = area_for_max_settings + (area_for_min_settings-area_for_max_settings)*(1.0-lod_factor); - const F32 pixel_area = fsqrtf(mCharacter->getPixelArea()); - - const BOOL is_self = (dynamic_cast(mCharacter) != NULL); - if ((pixel_area > area_for_this_setting) || is_self) - { - const F32 position_diff_local = llabs(mPositionLastUpdate_local-position_new_local_clamped); - const F32 min_delta = (1.0001f-lod_factor)*0.4f; - if (llabs(position_diff_local) > min_delta) - { - update_visuals = TRUE; - mPositionLastUpdate_local = position_new_local; - } - } - - // - // End update visual params - //////////////////////////////////////////////////////////////////////////////// - - mVelocity_local = velocity_new_local; - mAccelerationJoint_local = acceleration_joint_local; - mPosition_local = position_new_local; - } - mLastTime = time; - mPosition_world = joint->getWorldPosition(); - mVelocityJoint_local = velocity_joint_local; - - - /* - // Write out debugging info into a spreadsheet. - if (mFileWrite != NULL && is_self) - { - fprintf(mFileWrite,"%f\t%f\t%f \t\t%f \t\t%f\t%f\t%f\t \t\t%f\t%f\t%f\t%f\t%f \t\t%f\t%f\t%f\n", - position_new_local, - velocity_new_local, - acceleration_new_local, - - time_delta, - - mPosition_world[0], - mPosition_world[1], - mPosition_world[2], - - force_net, - force_spring, - force_accel, - force_damping, - force_drag, - - spring_length, - velocity_joint_local, - acceleration_joint_local - ); - } - */ - - return update_visuals; -} - -// Range of new_value_local is assumed to be [0 , 1] normalized. -void LLPhysicsMotion::setParamValue(LLViewerVisualParam *param, - F32 new_value_normalized, - F32 behavior_maxeffect) -{ - const F32 value_min_local = param->getMinWeight(); - const F32 value_max_local = param->getMaxWeight(); - const F32 min_val = 0.5f-behavior_maxeffect/2.0; - const F32 max_val = 0.5f+behavior_maxeffect/2.0; - - // Scale from [0,1] to [min_val,max_val] - const F32 new_value_rescaled = min_val + (max_val-min_val) * new_value_normalized; - - // Scale from [0,1] to [value_min_local,value_max_local] - const F32 new_value_local = value_min_local + (value_max_local-value_min_local) * new_value_rescaled; - - mCharacter->setVisualParamWeight(param, - new_value_local, - FALSE); -} +/** + * @file llphysicsmotion.cpp + * @brief Implementation of LLPhysicsMotion class. + * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * + * Copyright (c) 2001-2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +//----------------------------------------------------------------------------- +// Header Files +//----------------------------------------------------------------------------- +#include "llviewerprecompiledheaders.h" +#include "linden_common.h" + +#include "m3math.h" +#include "v3dmath.h" + +#include "llphysicsmotion.h" +#include "llagent.h" +#include "llcharacter.h" +#include "llviewercontrol.h" +#include "llviewervisualparam.h" +#include "llvoavatarself.h" + +typedef std::map controller_map_t; +typedef std::map default_controller_map_t; + +#define MIN_REQUIRED_PIXEL_AREA_AVATAR_PHYSICS_MOTION 0.f +#define TIME_ITERATION_STEP 0.1f + +inline F64 llsgn(const F64 a) +{ + if (a >= 0) + return 1; + return -1; +} + +/* + At a high level, this works by setting temporary parameters that are not stored + in the avatar's list of params, and are not conveyed to other users. We accomplish + this by creating some new temporary driven params inside avatar_lad that are then driven + by the actual params that the user sees and sets. For example, in the old system, + the user sets a param called breast bouyancy, which controls the Z value of the breasts. + In our new system, the user still sets the breast bouyancy, but that param is redefined + as a driver param so that affects a new temporary driven param that the bounce is applied + to. +*/ + +class LLPhysicsMotion +{ +public: + /* + param_driver_name: The param that controls the params that are being affected by the physics. + joint_name: The joint that the body part is attached to. The joint is + used to determine the orientation (rotation) of the body part. + + character: The avatar that this physics affects. + + motion_direction_vec: The direction (in world coordinates) that determines the + motion. For example, (0,0,1) is up-down, and means that up-down motion is what + determines how this joint moves. + + controllers: The various settings (e.g. spring force, mass) that determine how + the body part behaves. + */ + LLPhysicsMotion(const std::string ¶m_driver_name, + const std::string &joint_name, + LLCharacter *character, + const LLVector3 &motion_direction_vec, + const controller_map_t &controllers) : + mParamDriverName(param_driver_name), + mJointName(joint_name), + mMotionDirectionVec(motion_direction_vec), + mParamDriver(NULL), + mParamControllers(controllers), + mCharacter(character), + mLastTime(0), + mPosition_local(0), + mVelocityJoint_local(0), + mPositionLastUpdate_local(0) + { + mJointState = new LLJointState; + } + + BOOL initialize(); + + ~LLPhysicsMotion() {} + + BOOL onUpdate(F32 time); + + LLPointer getJointState() + { + return mJointState; + } +protected: + F32 getParamValue(const std::string& controller_key) + { + const controller_map_t::const_iterator& entry = mParamControllers.find(controller_key); + if (entry == mParamControllers.end()) + { + return sDefaultController[controller_key]; + } + const std::string& param_name = (*entry).second.c_str(); + return mCharacter->getVisualParamWeight(param_name.c_str()); + } + void setParamValue(LLViewerVisualParam *param, + const F32 new_value_local, + F32 behavior_maxeffect); + + F32 toLocal(const LLVector3 &world); + F32 calculateVelocity_local(); + F32 calculateAcceleration_local(F32 velocity_local); +private: + const std::string mParamDriverName; + const std::string mParamControllerName; + const LLVector3 mMotionDirectionVec; + const std::string mJointName; + + F32 mPosition_local; + F32 mVelocityJoint_local; // How fast the joint is moving + F32 mAccelerationJoint_local; // Acceleration on the joint + + F32 mVelocity_local; // How fast the param is moving + F32 mPositionLastUpdate_local; + LLVector3 mPosition_world; + + LLViewerVisualParam *mParamDriver; + const controller_map_t mParamControllers; + + LLPointer mJointState; + LLCharacter *mCharacter; + + F32 mLastTime; + + static default_controller_map_t sDefaultController; +}; + +default_controller_map_t initDefaultController() +{ + default_controller_map_t controller; + controller["Mass"] = 0.2f; + controller["Gravity"] = 0.0f; + controller["Damping"] = .05f; + controller["Drag"] = 0.15f; + controller["MaxEffect"] = 0.1f; + controller["Spring"] = 0.1f; + controller["Gain"] = 10.0f; + return controller; +} + +default_controller_map_t LLPhysicsMotion::sDefaultController = initDefaultController(); + +BOOL LLPhysicsMotion::initialize() +{ + if (!mJointState->setJoint(mCharacter->getJoint(mJointName.c_str()))) + return FALSE; + mJointState->setUsage(LLJointState::ROT); + + mParamDriver = (LLViewerVisualParam*)mCharacter->getVisualParam(mParamDriverName.c_str()); + if (mParamDriver == NULL) + { + llinfos << "Failure reading in [ " << mParamDriverName << " ]" << llendl; + return FALSE; + } + + return TRUE; +} + +LLPhysicsMotionController::LLPhysicsMotionController(const LLUUID &id) : + LLMotion(id), + mCharacter(NULL) +{ + mName = "breast_motion"; +} + +LLPhysicsMotionController::~LLPhysicsMotionController() +{ + for (motion_vec_t::iterator iter = mMotions.begin(); + iter != mMotions.end(); + ++iter) + { + delete (*iter); + } +} + +BOOL LLPhysicsMotionController::onActivate() +{ + return TRUE; +} + +void LLPhysicsMotionController::onDeactivate() +{ +} + +LLMotion::LLMotionInitStatus LLPhysicsMotionController::onInitialize(LLCharacter *character) +{ + mCharacter = character; + + mMotions.clear(); + + // Breast Cleavage + { + controller_map_t controller; + controller["Mass"] = "Breast_Physics_Mass"; + controller["Gravity"] = "Breast_Physics_Gravity"; + controller["Drag"] = "Breast_Physics_Drag"; + controller["Damping"] = "Breast_Physics_InOut_Damping"; + controller["MaxEffect"] = "Breast_Physics_InOut_Max_Effect"; + controller["Spring"] = "Breast_Physics_InOut_Spring"; + controller["Gain"] = "Breast_Physics_InOut_Gain"; + LLPhysicsMotion *motion = new LLPhysicsMotion("Breast_Physics_InOut_Controller", + "mChest", + character, + LLVector3(-1,0,0), + controller); + if (!motion->initialize()) + { + llassert_always(FALSE); + return STATUS_FAILURE; + } + addMotion(motion); + } + + // Breast Bounce + { + controller_map_t controller; + controller["Mass"] = "Breast_Physics_Mass"; + controller["Gravity"] = "Breast_Physics_Gravity"; + controller["Drag"] = "Breast_Physics_Drag"; + controller["Damping"] = "Breast_Physics_UpDown_Damping"; + controller["MaxEffect"] = "Breast_Physics_UpDown_Max_Effect"; + controller["Spring"] = "Breast_Physics_UpDown_Spring"; + controller["Gain"] = "Breast_Physics_UpDown_Gain"; + LLPhysicsMotion *motion = new LLPhysicsMotion("Breast_Physics_UpDown_Controller", + "mChest", + character, + LLVector3(0,0,1), + controller); + if (!motion->initialize()) + { + llassert_always(FALSE); + return STATUS_FAILURE; + } + addMotion(motion); + } + + // Breast Sway + { + controller_map_t controller; + controller["Mass"] = "Breast_Physics_Mass"; + controller["Gravity"] = "Breast_Physics_Gravity"; + controller["Drag"] = "Breast_Physics_Drag"; + controller["Damping"] = "Breast_Physics_LeftRight_Damping"; + controller["MaxEffect"] = "Breast_Physics_LeftRight_Max_Effect"; + controller["Spring"] = "Breast_Physics_LeftRight_Spring"; + controller["Gain"] = "Breast_Physics_LeftRight_Gain"; + LLPhysicsMotion *motion = new LLPhysicsMotion("Breast_Physics_LeftRight_Controller", + "mChest", + character, + LLVector3(0,-1,0), + controller); + if (!motion->initialize()) + { + llassert_always(FALSE); + return STATUS_FAILURE; + } + addMotion(motion); + } + // Butt Bounce + { + controller_map_t controller; + controller["Mass"] = "Butt_Physics_Mass"; + controller["Gravity"] = "Butt_Physics_Gravity"; + controller["Drag"] = "Butt_Physics_Drag"; + controller["Damping"] = "Butt_Physics_UpDown_Damping"; + controller["MaxEffect"] = "Butt_Physics_UpDown_Max_Effect"; + controller["Spring"] = "Butt_Physics_UpDown_Spring"; + controller["Gain"] = "Butt_Physics_UpDown_Gain"; + LLPhysicsMotion *motion = new LLPhysicsMotion("Butt_Physics_UpDown_Controller", + "mPelvis", + character, + LLVector3(0,0,-1), + controller); + if (!motion->initialize()) + { + llassert_always(FALSE); + return STATUS_FAILURE; + } + addMotion(motion); + } + + // Butt LeftRight + { + controller_map_t controller; + controller["Mass"] = "Butt_Physics_Mass"; + controller["Gravity"] = "Butt_Physics_Gravity"; + controller["Drag"] = "Butt_Physics_Drag"; + controller["Damping"] = "Butt_Physics_LeftRight_Damping"; + controller["MaxEffect"] = "Butt_Physics_LeftRight_Max_Effect"; + controller["Spring"] = "Butt_Physics_LeftRight_Spring"; + controller["Gain"] = "Butt_Physics_LeftRight_Gain"; + LLPhysicsMotion *motion = new LLPhysicsMotion("Butt_Physics_LeftRight_Controller", + "mPelvis", + character, + LLVector3(0,-1,0), + controller); + if (!motion->initialize()) + { + llassert_always(FALSE); + return STATUS_FAILURE; + } + addMotion(motion); + } + + // Belly Bounce + { + controller_map_t controller; + controller["Mass"] = "Belly_Physics_Mass"; + controller["Gravity"] = "Belly_Physics_Gravity"; + controller["Drag"] = "Belly_Physics_Drag"; + controller["Damping"] = "Belly_Physics_UpDown_Damping"; + controller["MaxEffect"] = "Belly_Physics_UpDown_Max_Effect"; + controller["Spring"] = "Belly_Physics_UpDown_Spring"; + controller["Gain"] = "Belly_Physics_UpDown_Gain"; + LLPhysicsMotion *motion = new LLPhysicsMotion("Belly_Physics_UpDown_Controller", + "mPelvis", + character, + LLVector3(0,0,-1), + controller); + if (!motion->initialize()) + { + llassert_always(FALSE); + return STATUS_FAILURE; + } + addMotion(motion); + } + + return STATUS_SUCCESS; +} + +void LLPhysicsMotionController::addMotion(LLPhysicsMotion *motion) +{ + addJointState(motion->getJointState()); + mMotions.push_back(motion); +} + +F32 LLPhysicsMotionController::getMinPixelArea() +{ + return MIN_REQUIRED_PIXEL_AREA_AVATAR_PHYSICS_MOTION; +} + +// Local space means "parameter space". +F32 LLPhysicsMotion::toLocal(const LLVector3 &world) +{ + LLJoint *joint = mJointState->getJoint(); + const LLQuaternion rotation_world = joint->getWorldRotation(); + + LLVector3 dir_world = mMotionDirectionVec * rotation_world; + dir_world.normalize(); + return world * dir_world; +} + +F32 LLPhysicsMotion::calculateVelocity_local() +{ + const F32 world_to_model_scale = 100.0f; + LLJoint *joint = mJointState->getJoint(); + const LLVector3 position_world = joint->getWorldPosition(); + const LLQuaternion rotation_world = joint->getWorldRotation(); + const LLVector3 last_position_world = mPosition_world; + const LLVector3 positionchange_world = (position_world-last_position_world) * world_to_model_scale; + const LLVector3 velocity_world = positionchange_world; + const F32 velocity_local = toLocal(velocity_world); + return velocity_local; +} + +F32 LLPhysicsMotion::calculateAcceleration_local(const F32 velocity_local) +{ +// const F32 smoothing = getParamValue("Smoothing"); + static const F32 smoothing = 3.0f; // Removed smoothing param since it's probably not necessary + const F32 acceleration_local = velocity_local - mVelocityJoint_local; + + const F32 smoothed_acceleration_local = + acceleration_local * 1.0/smoothing + + mAccelerationJoint_local * (smoothing-1.0)/smoothing; + + return smoothed_acceleration_local; +} + +BOOL LLPhysicsMotionController::onUpdate(F32 time, U8* joint_mask) +{ + // Skip if disabled globally. + if (!gSavedSettings.getBOOL("AvatarPhysics")) + { + return TRUE; + } + + BOOL update_visuals = FALSE; + for (motion_vec_t::iterator iter = mMotions.begin(); + iter != mMotions.end(); + ++iter) + { + LLPhysicsMotion *motion = (*iter); + update_visuals |= motion->onUpdate(time); + } + + if (update_visuals) + mCharacter->updateVisualParams(); + + return TRUE; +} + + +// Return TRUE if character has to update visual params. +BOOL LLPhysicsMotion::onUpdate(F32 time) +{ + // static FILE *mFileWrite = fopen("c:\\temp\\avatar_data.txt","w"); + + if (!mParamDriver) + return FALSE; + + if (!mLastTime) + { + mLastTime = time; + return FALSE; + } + + //////////////////////////////////////////////////////////////////////////////// + // Get all parameters and settings + // + + const F32 time_delta = time - mLastTime; + + // Don't update too frequently, to avoid precision errors from small time slices. + if (time_delta <= .01) + { + return FALSE; + } + + // If less than 1FPS, we don't want to be spending time updating physics at all. + if (time_delta > 1.0) + { + mLastTime = time; + return FALSE; + } + + // Higher LOD is better. This controls the granularity + // and frequency of updates for the motions. + const F32 lod_factor = LLVOAvatar::sPhysicsLODFactor; + if (lod_factor == 0) + { + return TRUE; + } + + LLJoint *joint = mJointState->getJoint(); + + const F32 behavior_mass = getParamValue("Mass"); + const F32 behavior_gravity = getParamValue("Gravity"); + const F32 behavior_spring = getParamValue("Spring"); + const F32 behavior_gain = getParamValue("Gain"); + const F32 behavior_damping = getParamValue("Damping"); + const F32 behavior_drag = getParamValue("Drag"); + const BOOL physics_test = FALSE; // Enable this to simulate bouncing on all parts. + + F32 behavior_maxeffect = getParamValue("MaxEffect"); + if (physics_test) + behavior_maxeffect = 1.0f; + + // Normalize the param position to be from [0,1]. + // We have to use normalized values because there may be more than one driven param, + // and each of these driven params may have its own range. + // This means we'll do all our calculations in normalized [0,1] local coordinates. + const F32 position_user_local = (mParamDriver->getWeight() - mParamDriver->getMinWeight()) / (mParamDriver->getMaxWeight() - mParamDriver->getMinWeight()); + + // + // End parameters and settings + //////////////////////////////////////////////////////////////////////////////// + + + //////////////////////////////////////////////////////////////////////////////// + // Calculate velocity and acceleration in parameter space. + // + + //const F32 velocity_joint_local = calculateVelocity_local(time_iteration_step); + const F32 velocity_joint_local = calculateVelocity_local(); + const F32 acceleration_joint_local = calculateAcceleration_local(velocity_joint_local); + + // + // End velocity and acceleration + //////////////////////////////////////////////////////////////////////////////// + + BOOL update_visuals = FALSE; + + // Break up the physics into a bunch of iterations so that differing framerates will show + // roughly the same behavior. + for (F32 time_iteration = 0; time_iteration <= time_delta; time_iteration += TIME_ITERATION_STEP) + { + F32 time_iteration_step = TIME_ITERATION_STEP; + if (time_iteration + TIME_ITERATION_STEP > time_delta) + { + time_iteration_step = time_delta-time_iteration; + } + + // mPositon_local should be in normalized 0,1 range already. Just making sure... + const F32 position_current_local = llclamp(mPosition_local, + 0.0f, + 1.0f); + // If the effect is turned off then don't process unless we need one more update + // to set the position to the default (i.e. user) position. + if ((behavior_maxeffect == 0) && (position_current_local == position_user_local)) + { + return update_visuals; + } + + //////////////////////////////////////////////////////////////////////////////// + // Calculate the total force + // + + // Spring force is a restoring force towards the original user-set breast position. + // F = kx + const F32 spring_length = position_current_local - position_user_local; + const F32 force_spring = -spring_length * behavior_spring; + + // Acceleration is the force that comes from the change in velocity of the torso. + // F = ma + const F32 force_accel = behavior_gain * (acceleration_joint_local * behavior_mass); + + // Gravity always points downward in world space. + // F = mg + const LLVector3 gravity_world(0,0,1); + const F32 force_gravity = (toLocal(gravity_world) * behavior_gravity * behavior_mass); + + // Damping is a restoring force that opposes the current velocity. + // F = -kv + const F32 force_damping = -behavior_damping * mVelocity_local; + + // Drag is a force imparted by velocity (intuitively it is similar to wind resistance) + // F = .5kv^2 + const F32 force_drag = .5*behavior_drag*velocity_joint_local*velocity_joint_local*llsgn(velocity_joint_local); + + const F32 force_net = (force_accel + + force_gravity + + force_spring + + force_damping + + force_drag); + + // + // End total force + //////////////////////////////////////////////////////////////////////////////// + + + //////////////////////////////////////////////////////////////////////////////// + // Calculate new params + // + + // Calculate the new acceleration based on the net force. + // a = F/m + const F32 acceleration_new_local = force_net / behavior_mass; + static const F32 max_velocity = 100.0f; // magic number, used to be customizable. + F32 velocity_new_local = mVelocity_local + acceleration_new_local*time_iteration_step; + velocity_new_local = llclamp(velocity_new_local, + -max_velocity, max_velocity); + + // Temporary debugging setting to cause all avatars to move, for profiling purposes. + if (physics_test) + { + velocity_new_local = sin(time*4.0); + } + // Calculate the new parameters, or remain unchanged if max speed is 0. + F32 position_new_local = position_current_local + velocity_new_local*time_iteration_step; + if (behavior_maxeffect == 0) + position_new_local = position_user_local; + + // Zero out the velocity if the param is being pushed beyond its limits. + if ((position_new_local < 0 && velocity_new_local < 0) || + (position_new_local > 1 && velocity_new_local > 0)) + { + velocity_new_local = 0; + } + + // Check for NaN values. A NaN value is detected if the variables doesn't equal itself. + // If NaN, then reset everything. + if ((mPosition_local != mPosition_local) || + (mVelocity_local != mVelocity_local) || + (position_new_local != position_new_local)) + { + position_new_local = 0; + mVelocity_local = 0; + mVelocityJoint_local = 0; + mAccelerationJoint_local = 0; + mPosition_local = 0; + mPosition_world = LLVector3(0,0,0); + } + + const F32 position_new_local_clamped = llclamp(position_new_local, + 0.0f, + 1.0f); + + LLDriverParam *driver_param = dynamic_cast(mParamDriver); + llassert_always(driver_param); + if (driver_param) + { + // If this is one of our "hidden" driver params, then make sure it's + // the default value. + if ((driver_param->getGroup() != VISUAL_PARAM_GROUP_TWEAKABLE) && + (driver_param->getGroup() != VISUAL_PARAM_GROUP_TWEAKABLE_NO_TRANSMIT)) + { + mCharacter->setVisualParamWeight(driver_param, + 0, + FALSE); + } + for (LLDriverParam::entry_list_t::iterator iter = driver_param->mDriven.begin(); + iter != driver_param->mDriven.end(); + ++iter) + { + LLDrivenEntry &entry = (*iter); + LLViewerVisualParam *driven_param = entry.mParam; + setParamValue(driven_param,position_new_local_clamped, behavior_maxeffect); + } + } + + // + // End calculate new params + //////////////////////////////////////////////////////////////////////////////// + + //////////////////////////////////////////////////////////////////////////////// + // Conditionally update the visual params + // + + // Updating the visual params (i.e. what the user sees) is fairly expensive. + // So only update if the params have changed enough, and also take into account + // the graphics LOD settings. + + // For non-self, if the avatar is small enough visually, then don't update. + const F32 area_for_max_settings = 0.0; + const F32 area_for_min_settings = 1400.0; + const F32 area_for_this_setting = area_for_max_settings + (area_for_min_settings-area_for_max_settings)*(1.0-lod_factor); + const F32 pixel_area = fsqrtf(mCharacter->getPixelArea()); + + const BOOL is_self = (dynamic_cast(mCharacter) != NULL); + if ((pixel_area > area_for_this_setting) || is_self) + { + const F32 position_diff_local = llabs(mPositionLastUpdate_local-position_new_local_clamped); + const F32 min_delta = (1.0001f-lod_factor)*0.4f; + if (llabs(position_diff_local) > min_delta) + { + update_visuals = TRUE; + mPositionLastUpdate_local = position_new_local; + } + } + + // + // End update visual params + //////////////////////////////////////////////////////////////////////////////// + + mVelocity_local = velocity_new_local; + mAccelerationJoint_local = acceleration_joint_local; + mPosition_local = position_new_local; + } + mLastTime = time; + mPosition_world = joint->getWorldPosition(); + mVelocityJoint_local = velocity_joint_local; + + + /* + // Write out debugging info into a spreadsheet. + if (mFileWrite != NULL && is_self) + { + fprintf(mFileWrite,"%f\t%f\t%f \t\t%f \t\t%f\t%f\t%f\t \t\t%f\t%f\t%f\t%f\t%f \t\t%f\t%f\t%f\n", + position_new_local, + velocity_new_local, + acceleration_new_local, + + time_delta, + + mPosition_world[0], + mPosition_world[1], + mPosition_world[2], + + force_net, + force_spring, + force_accel, + force_damping, + force_drag, + + spring_length, + velocity_joint_local, + acceleration_joint_local + ); + } + */ + + return update_visuals; +} + +// Range of new_value_local is assumed to be [0 , 1] normalized. +void LLPhysicsMotion::setParamValue(LLViewerVisualParam *param, + F32 new_value_normalized, + F32 behavior_maxeffect) +{ + const F32 value_min_local = param->getMinWeight(); + const F32 value_max_local = param->getMaxWeight(); + const F32 min_val = 0.5f-behavior_maxeffect/2.0; + const F32 max_val = 0.5f+behavior_maxeffect/2.0; + + // Scale from [0,1] to [min_val,max_val] + const F32 new_value_rescaled = min_val + (max_val-min_val) * new_value_normalized; + + // Scale from [0,1] to [value_min_local,value_max_local] + const F32 new_value_local = value_min_local + (value_max_local-value_min_local) * new_value_rescaled; + + mCharacter->setVisualParamWeight(param, + new_value_local, + FALSE); +} -- cgit v1.2.3 From a53043e8e2535dbb82c5672259a878664f5036ce Mon Sep 17 00:00:00 2001 From: callum Date: Fri, 22 Apr 2011 12:05:30 -0700 Subject: EXP-738 FIX Login screen background image takes too long to load Misc improvements to make the login page load properly. --- indra/newview/llmediactrl.cpp | 20 ++--- indra/newview/llpanellogin.cpp | 170 +++-------------------------------------- indra/newview/llpanellogin.h | 2 - 3 files changed, 15 insertions(+), 177 deletions(-) diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index 5007f1c17a..b3ad9efeb2 100644 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -68,7 +68,6 @@ LLMediaCtrl::Params::Params() : start_url("start_url"), border_visible("border_visible", true), ignore_ui_scale("ignore_ui_scale", true), - hide_loading("hide_loading", false), decouple_texture_size("decouple_texture_size", false), texture_width("texture_width", 1024), texture_height("texture_height", 1024), @@ -97,8 +96,6 @@ LLMediaCtrl::LLMediaCtrl( const Params& p) : mCurrentNavUrl( "" ), mStretchToFill( true ), mMaintainAspectRatio ( true ), - mHideLoading (false), - mHidingInitialLoad (false), mDecoupleTextureSize ( false ), mTextureWidth ( 1024 ), mTextureHeight ( 1024 ), @@ -121,8 +118,6 @@ LLMediaCtrl::LLMediaCtrl( const Params& p) : setBorderVisible(p.border_visible); - mHideLoading = p.hide_loading; - setDecoupleTextureSize(p.decouple_texture_size); setTextureSize(p.texture_width, p.texture_height); @@ -684,11 +679,6 @@ bool LLMediaCtrl::ensureMediaSourceExists() mMediaSource->clearCache(); mClearCache = false; } - - if(mHideLoading) - { - mHidingInitialLoad = true; - } } else { @@ -756,11 +746,11 @@ void LLMediaCtrl::draw() } } - if(mHidingInitialLoad) - { - // If we're hiding loading, don't draw at all. - draw_media = false; - } +// if(mHidingInitialLoad) +// { +// // If we're hiding loading, don't draw at all. +// draw_media = false; +// } bool background_visible = isBackgroundVisible(); bool background_opaque = isBackgroundOpaque(); diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 7820ac3ecd..a5385b0b1c 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -81,7 +81,6 @@ const S32 MAX_PASSWORD = 16; LLPanelLogin *LLPanelLogin::sInstance = NULL; BOOL LLPanelLogin::sCapslockDidNotification = FALSE; - class LLLoginRefreshHandler : public LLCommandHandler { public: @@ -97,58 +96,6 @@ public: } }; -LLLoginRefreshHandler gLoginRefreshHandler; - - -// helper class that trys to download a URL from a web site and calls a method -// on parent class indicating if the web server is working or not -class LLIamHereLogin : public LLHTTPClient::Responder -{ - private: - LLIamHereLogin( LLPanelLogin* parent ) : - mParent( parent ) - {} - - LLPanelLogin* mParent; - - public: - static boost::intrusive_ptr< LLIamHereLogin > build( LLPanelLogin* parent ) - { - return boost::intrusive_ptr< LLIamHereLogin >( new LLIamHereLogin( parent ) ); - }; - - virtual void setParent( LLPanelLogin* parentIn ) - { - mParent = parentIn; - }; - - // We don't actually expect LLSD back, so need to override completedRaw - virtual void completedRaw(U32 status, const std::string& reason, - const LLChannelDescriptors& channels, - const LLIOPipe::buffer_ptr_t& buffer) - { - completed(status, reason, LLSD()); // will call result() or error() - } - - virtual void result( const LLSD& content ) - { - if ( mParent ) - mParent->setSiteIsAlive( true ); - }; - - virtual void error( U32 status, const std::string& reason ) - { - if ( mParent ) - mParent->setSiteIsAlive( false ); - }; -}; - -// this is global and not a class member to keep crud out of the header file -namespace { - boost::intrusive_ptr< LLIamHereLogin > gResponsePtr = 0; -}; - - //--------------------------------------------------------------------------- // Public methods //--------------------------------------------------------------------------- @@ -160,7 +107,6 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, mLogoImage(), mCallback(callback), mCallbackData(cb_data), - mHtmlAvailable( TRUE ), mListener(new LLPanelLoginListener(this)) { setBackgroundVisible(FALSE); @@ -190,21 +136,11 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, buildFromFile( "panel_login.xml"); - // Legacy login web page is hidden under the menu bar. - // Adjust reg-in-client web browser widget to not be hidden. - if (gSavedSettings.getBOOL("RegInClient")) - { - reshape(rect.getWidth(), rect.getHeight() - MENU_BAR_HEIGHT); - } - else - { - reshape(rect.getWidth(), rect.getHeight()); - } + reshape(rect.getWidth(), rect.getHeight()); getChild("password_edit")->setKeystrokeCallback(onPassKey, this); // change z sort of clickable text to be behind buttons - //sendChildToBack(getChildView("channel_text")); sendChildToBack(getChildView("forgot_password_text")); if(LLStartUp::getStartSLURL().getType() != LLSLURL::LOCATION) @@ -249,16 +185,10 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, LLMediaCtrl* web_browser = getChild("login_html"); web_browser->addObserver(this); - // Clear the browser's cache to avoid any potential for the cache messing up the login screen. - web_browser->clearCache(); - reshapeBrowser(); - // kick off a request to grab the url manually - gResponsePtr = LLIamHereLogin::build( this ); - - LLHTTPClient::head( LLGridManager::getInstance()->getLoginPage(), gResponsePtr ); - + loadLoginPage(); + // Show last logged in user favorites in "Start at" combo. addUsersWithFavoritesToUsername(); getChild("username_combo")->setTextChangedCallback(boost::bind(&LLPanelLogin::addFavoritesToStartLocation, this)); @@ -334,46 +264,10 @@ void LLPanelLogin::reshapeBrowser() reshape( rect.getWidth(), rect.getHeight(), 1 ); } -void LLPanelLogin::setSiteIsAlive( bool alive ) -{ - LLMediaCtrl* web_browser = getChild("login_html"); - // if the contents of the site was retrieved - if ( alive ) - { - if ( web_browser ) - { - loadLoginPage(); - - // mark as available - mHtmlAvailable = TRUE; - } - } - else - // the site is not available (missing page, server down, other badness) - { - if ( web_browser ) - { - // hide browser control (revealing default one) - web_browser->setVisible( FALSE ); - - // mark as unavailable - mHtmlAvailable = FALSE; - } - } -} - - LLPanelLogin::~LLPanelLogin() { LLPanelLogin::sInstance = NULL; - // tell the responder we're not here anymore - if ( gResponsePtr ) - gResponsePtr->setParent( 0 ); - - //// We know we're done with the image, so be rid of it. - //gTextureList.deleteImage( mLogoImage ); - // Controls having keyboard focus by default // must reset it on destroy. (EXT-2748) gFocusMgr.setDefaultKeyboardFocus(NULL); @@ -396,22 +290,13 @@ void LLPanelLogin::draw() S32 width = getRect().getWidth(); S32 height = getRect().getHeight(); - if ( mHtmlAvailable ) - { - if (getChild("login_widgets")->getVisible()) - { - // draw a background box in black - gl_rect_2d( 0, height - 264, width, 264, LLColor4::black ); - // draw the bottom part of the background image - // just the blue background to the native client UI - mLogoImage->draw(0, -264, width + 8, mLogoImage->getHeight()); - } - } - else + if (getChild("login_widgets")->getVisible()) { - // the HTML login page is not available so default to the original screen - S32 offscreen_part = height / 3; - mLogoImage->draw(0, -offscreen_part, width, height+offscreen_part); + // draw a background box in black + gl_rect_2d( 0, height - 264, width, 264, LLColor4::black ); + // draw the bottom part of the background image + // just the blue background to the native client UI + mLogoImage->draw(0, -264, width + 8, mLogoImage->getHeight()); }; } glPopMatrix(); @@ -870,23 +755,10 @@ void LLPanelLogin::loadLoginPage() oStr << "&os=" << os_info; curl_free(os_info); - gViewerWindow->setMenuBackgroundColor(false, !LLGridManager::getInstance()->isInProductionGrid()); - gLoginMenuBarView->setBackgroundColor(gMenuBarView->getBackgroundColor()); LLMediaCtrl* web_browser = sInstance->getChild("login_html"); - - // navigate to the "real" page - if (gSavedSettings.getBOOL("RegInClient")) - { - web_browser->setFocus(TRUE); - login_page = sInstance->getString("reg_in_client_url"); - web_browser->navigateTo(login_page, "text/html"); - } - else - { - web_browser->navigateTo( oStr.str(), "text/html" ); - } + web_browser->navigateTo( oStr.str(), "text/html" ); } void LLPanelLogin::handleMediaEvent(LLPluginClassMedia* /*self*/, EMediaEvent event) @@ -917,10 +789,6 @@ void LLPanelLogin::onClickConnect(void *) { if (sInstance && sInstance->mCallback) { - // tell the responder we're not here anymore - if ( gResponsePtr ) - gResponsePtr->setParent( 0 ); - // JC - Make sure the fields all get committed. sInstance->setFocus(FALSE); @@ -988,24 +856,6 @@ void LLPanelLogin::onClickConnect(void *) } } -/* -// static -bool LLPanelLogin::newAccountAlertCallback(const LLSD& notification, const LLSD& response) -{ - S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - if (0 == option) - { - llinfos << "Going to account creation URL" << llendl; - LLWeb::loadURLExternal( LLNotifications::instance().getGlobalString("CREATE_ACCOUNT_URL")); - } - else - { - sInstance->setFocus(TRUE); - } - return false; -} -*/ - // static void LLPanelLogin::onClickNewAccount(void*) { diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h index 9cc5e3456a..11273453ba 100644 --- a/indra/newview/llpanellogin.h +++ b/indra/newview/llpanellogin.h @@ -89,7 +89,6 @@ private: void addUsersWithFavoritesToUsername(); static void onClickConnect(void*); static void onClickNewAccount(void*); -// static bool newAccountAlertCallback(const LLSD& notification, const LLSD& response); static void onClickVersion(void*); static void onClickForgotPassword(void*); static void onClickHelp(void*); @@ -114,7 +113,6 @@ private: static LLPanelLogin* sInstance; static BOOL sCapslockDidNotification; - BOOL mHtmlAvailable; }; std::string load_password_from_disk(void); -- cgit v1.2.3 From 368173b7d602aa1d790a4510c4bf9e6d9e102d1d Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Fri, 22 Apr 2011 18:52:22 -0700 Subject: EXP-749 [REGRESSION] Voice status indicator shown in IM session instead of profile pic in Basic and Advanced modes --- indra/newview/llchiclet.cpp | 3 ++- indra/newview/skins/default/xui/en/widgets/chiclet_im_p2p.xml | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index 885d553524..277fc9d7b9 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -483,8 +483,9 @@ void LLIMChiclet::setShowSpeaker(bool show) if(needs_resize) { mShowSpeaker = show; - toggleSpeakerControl(); } + + toggleSpeakerControl(); } void LLIMChiclet::enableCounterControl(bool enable) diff --git a/indra/newview/skins/default/xui/en/widgets/chiclet_im_p2p.xml b/indra/newview/skins/default/xui/en/widgets/chiclet_im_p2p.xml index 99807d4717..d27c14f4e7 100644 --- a/indra/newview/skins/default/xui/en/widgets/chiclet_im_p2p.xml +++ b/indra/newview/skins/default/xui/en/widgets/chiclet_im_p2p.xml @@ -21,6 +21,7 @@ width="20" /> Date: Mon, 25 Apr 2011 13:46:31 +0200 Subject: STORM-1182 FIX Fixed XUI Preview tool not loading XML files from a dev checkout on Mac. Ported Vadim's STORM-1182 fix for Linux (3d30b2bc1369) to the corresponding Mac file. --- doc/contributions.txt | 1 + indra/llvfs/lldir_mac.cpp | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/contributions.txt b/doc/contributions.txt index e7db8c0ded..3b579f8ae3 100644 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -204,6 +204,7 @@ Boroondas Gupte SNOW-624 SNOW-737 STORM-318 + STORM-1182 VWR-233 VWR-20583 VWR-20891 diff --git a/indra/llvfs/lldir_mac.cpp b/indra/llvfs/lldir_mac.cpp index 445285aa43..e862ef0d84 100644 --- a/indra/llvfs/lldir_mac.cpp +++ b/indra/llvfs/lldir_mac.cpp @@ -150,11 +150,11 @@ LLDir_Mac::LLDir_Mac() CFURLRef resourcesURLRef = CFBundleCopyResourcesDirectoryURL(mainBundleRef); CFURLRefToLLString(resourcesURLRef, mAppRODataDir, true); - U32 indra_pos = mExecutableDir.find("/indra"); - if (indra_pos != std::string::npos) + U32 build_dir_pos = mExecutableDir.find("/build-darwin-"); + if (build_dir_pos != std::string::npos) { // ...we're in a dev checkout - mSkinBaseDir = mExecutableDir.substr(0, indra_pos) + mSkinBaseDir = mExecutableDir.substr(0, build_dir_pos) + "/indra/newview/skins"; llinfos << "Running in dev checkout with mSkinBaseDir " << mSkinBaseDir << llendl; -- cgit v1.2.3 From ddf0d70a086cc4b8d534e760e18fba8acb143d1d Mon Sep 17 00:00:00 2001 From: "Debi King (Dessie)" Date: Mon, 25 Apr 2011 11:56:17 -0400 Subject: Added tag DRTVWR-50_2.6.5-beta1, 2.6.5-beta1 for changeset 7db558aaa7c1 --- .hgtags | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.hgtags b/.hgtags index ec1576c43c..74e1eb4e68 100644 --- a/.hgtags +++ b/.hgtags @@ -106,3 +106,5 @@ d7fcefabdf32bb61a9ea6d6037c1bb26190a85bc 2.6.3-beta1 74cd32a06837b0c2cb793b2e8d4d82f5d49462b2 2.6.4-start 74cd32a06837b0c2cb793b2e8d4d82f5d49462b2 2.6.4-start f632f87bb71b0f13d21f2f64b0c42cedb008c749 2.6.4-start +7db558aaa7c176f2022b3e9cfe38ac72f6d1fccd DRTVWR-50_2.6.5-beta1 +7db558aaa7c176f2022b3e9cfe38ac72f6d1fccd 2.6.5-beta1 -- cgit v1.2.3 From 2417cb3021123d7305b1c4fe4bdf16fddaecb494 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Mon, 25 Apr 2011 17:13:51 -0400 Subject: Update with CG's build.sh patch to upload summary.json. Patch taken from here: https://paste.lindenlab.com/show/6902/ --- build.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/build.sh b/build.sh index 6677958716..d112e5ea1c 100755 --- a/build.sh +++ b/build.sh @@ -118,11 +118,12 @@ eval '$build_'"$arch" || pass # File no longer exists in code-sep branch, so let's make sure it exists in order to use it. if test -f scripts/update_version_files.py ; then begin_section UpdateVer - python scripts/update_version_files.py \ - --channel="$viewer_channel" \ - --server_channel="$server_channel" \ - --revision=$revision \ - --verbose \ + eval $(python scripts/update_version_files.py \ + --channel="$viewer_channel" \ + --server_channel="$server_channel" \ + --revision=$revision \ + --verbose \ + | sed -n -e "s,Setting viewer channel/version: '\([^']*\)' / '\([^']*\)',VIEWER_CHANNEL='\1';VIEWER_VERSION='\2',p")\ || fail update_version_files.py end_section UpdateVer fi @@ -262,6 +263,9 @@ then upload_item installer "$package" binary/octet-stream upload_item quicklink "$package" binary/octet-stream + echo "{\"Type\":\"viewer\",\"Version\":\"${VIEWER_VERSION}\"}" > summary.json + upload_item installer summary.json text/plain + # Upload crash reporter files. case "$last_built_variant" in Release) -- cgit v1.2.3 From 26f2762b89705a69e831016ea67af9500907721d Mon Sep 17 00:00:00 2001 From: Ricky Curtice Date: Mon, 25 Apr 2011 16:24:16 -0700 Subject: Removed an extra variable I'd added. Also cleaned up some whitespace-around-operator issues. While removing the extra variable seems to make the code more ugly, all it does is reveal the pre-existing ugliness that had been masked in the past. Trying to find a fix, or even try to come to a real understanding of why this section of code is the way it is, is out of my scope for this task. --- indra/newview/llselectmgr.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 2c5073d027..96468c0b21 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -6585,16 +6585,12 @@ bool LLSelectMgr::selectionMove(const LLVector3& displ, } } - // get the non-squared edition for use below - // note the use of fsqrtf, this was used in the definition of dist_vec() and is therefore re-used here - F32 min_dist = fsqrtf(min_dist_squared); - // factor the distance into the displacement vector. This will get us // equally visible movements for both close and far away selections. - F32 min_dist_factored = sqrt(min_dist) / 2; // FIXME: this variable name doesn't state its true meaning. - displ_global.setVec(displ.mV[0]*min_dist_factored, - displ.mV[1]*min_dist_factored, - displ.mV[2]*min_dist_factored); + F32 min_dist = sqrt(fsqrtf(min_dist_squared)) / 2; + displ_global.setVec(displ.mV[0] * min_dist, + displ.mV[1] * min_dist, + displ.mV[2] * min_dist); // equates to: Displ_global = Displ * M_cam_axes_in_global_frame displ_global = LLViewerCamera::getInstance()->rotateToAbsolute(displ_global); -- cgit v1.2.3 From 36f8899861b4f6ad75485cc26e7493689aa53acc Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Mon, 25 Apr 2011 17:31:04 -0700 Subject: EXP-637 FIX -- As a new user, I would like Second Life to start up with a maximized window to fully immerse myself in the experience Mac viewer now properly supports the calls to maximize and unmaximize the screen. Reviewed by Callum --- indra/llwindow/llwindowmacosx.cpp | 101 +++++++++++++++++++++++++------------- indra/llwindow/llwindowmacosx.h | 3 +- 2 files changed, 69 insertions(+), 35 deletions(-) diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp index affd7276cc..447e3661db 100644 --- a/indra/llwindow/llwindowmacosx.cpp +++ b/indra/llwindow/llwindowmacosx.cpp @@ -108,9 +108,6 @@ static long getDictLong (CFDictionaryRef refDict, CFStringRef key); static EventTypeSpec WindowHandlerEventList[] = { // Window-related events - // { kEventClassWindow, kEventWindowCollapsing }, - // { kEventClassWindow, kEventWindowCollapsed }, - // { kEventClassWindow, kEventWindowShown }, { kEventClassWindow, kEventWindowActivated }, { kEventClassWindow, kEventWindowDeactivated }, { kEventClassWindow, kEventWindowShown }, @@ -121,8 +118,7 @@ static EventTypeSpec WindowHandlerEventList[] = { kEventClassWindow, kEventWindowClose }, { kEventClassWindow, kEventWindowBoundsChanging }, { kEventClassWindow, kEventWindowBoundsChanged }, - // { kEventClassWindow, kEventWindowZoomed }, - // { kEventClassWindow, kEventWindowDrawContent }, + { kEventClassWindow, kEventWindowGetIdealSize }, // Mouse events { kEventClassMouse, kEventMouseDown }, @@ -248,6 +244,7 @@ LLWindowMacOSX::LLWindowMacOSX(LLWindowCallbacks* callbacks, mCursorIgnoreNextDelta = FALSE; mNeedsResize = FALSE; mOverrideAspectRatio = 0.f; + mMaximized = FALSE; mMinimized = FALSE; mTSMDocument = NULL; // Just in case. mLanguageTextInputAllowed = FALSE; @@ -455,24 +452,23 @@ BOOL LLWindowMacOSX::createContext(int x, int y, int width, int height, int bits if(!mFullscreen && (mWindow == NULL)) { - Rect window_rect; //int displayWidth = CGDisplayPixelsWide(mDisplay); //int displayHeight = CGDisplayPixelsHigh(mDisplay); //const int menuBarPlusTitleBar = 44; // Ugly magic number. LL_DEBUGS("Window") << "createContext: creating window" << LL_ENDL; - window_rect.left = (long) x; - window_rect.right = (long) x + width; - window_rect.top = (long) y; - window_rect.bottom = (long) y + height; + mPreviousWindowRect.left = (long) x; + mPreviousWindowRect.right = (long) x + width; + mPreviousWindowRect.top = (long) y; + mPreviousWindowRect.bottom = (long) y + height; //----------------------------------------------------------------------- // Create the window //----------------------------------------------------------------------- mWindow = NewCWindow( NULL, - &window_rect, + &mPreviousWindowRect, mWindowTitle, false, // Create the window invisible. Whoever calls createContext() should show it after any moving/resizing. // noGrowDocProc, // Window with no grow box and no zoom box @@ -481,8 +477,7 @@ BOOL LLWindowMacOSX::createContext(int x, int y, int width, int height, int bits kFirstWindowOfClass, true, (long)this); - - + if (!mWindow) { setupFailure("Window creation error", "Error", OSMB_OK); @@ -1093,31 +1088,22 @@ BOOL LLWindowMacOSX::getVisible() BOOL LLWindowMacOSX::getMinimized() { - BOOL result = FALSE; - - // Since the set of states where we want to act "minimized" is non-trivial, it's easier to - // track things locally than to try and retrieve the state from the window manager. - result = mMinimized; - - return(result); + return mMinimized; } BOOL LLWindowMacOSX::getMaximized() { - BOOL result = FALSE; - - if (mWindow) - { - // TODO - } - - return(result); + return mMaximized; } BOOL LLWindowMacOSX::maximize() { - // TODO - return FALSE; + if (mWindow && !mMaximized) + { + ZoomWindow(mWindow, inContent, true); + } + + return mMaximized; } BOOL LLWindowMacOSX::getFullscreen() @@ -2559,7 +2545,24 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e GetEventParameter(event, kEventParamCurrentBounds, typeQDRectangle, NULL, sizeof(Rect), NULL, ¤tBounds); GetEventParameter(event, kEventParamPreviousBounds, typeQDRectangle, NULL, sizeof(Rect), NULL, &previousBounds); - + + // Put an offset into window un-maximize operation since the kEventWindowGetIdealSize + // event only allows the specification of size and not position. + if (mMaximized) + { + short leftOffset = mPreviousWindowRect.left - currentBounds.left; + currentBounds.left += leftOffset; + currentBounds.right += leftOffset; + + short topOffset = mPreviousWindowRect.top - currentBounds.top; + currentBounds.top += topOffset; + currentBounds.bottom += topOffset; + } + else + { + // Store off the size for future un-maximize operations + mPreviousWindowRect = previousBounds; + } if ((currentBounds.right - currentBounds.left) < MIN_WIDTH) { @@ -2578,13 +2581,43 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e case kEventWindowBoundsChanged: { + // Get new window bounds Rect newBounds; - GetEventParameter(event, kEventParamCurrentBounds, typeQDRectangle, NULL, sizeof(Rect), NULL, &newBounds); + + // Get previous window bounds + Rect oldBounds; + GetEventParameter(event, kEventParamPreviousBounds, typeQDRectangle, NULL, sizeof(Rect), NULL, &oldBounds); + + // Determine if the new size is larger than the old + bool newBoundsLarger = ((newBounds.right - newBounds.left) >= (oldBounds.right - oldBounds.left)); + newBoundsLarger &= ((newBounds.bottom - newBounds.top) >= (oldBounds.bottom - oldBounds.top)); + + // Check to see if this is a zoom event (+ button on window pane) + unsigned int eventParams; + GetEventParameter(event, kEventParamAttributes, typeUInt32, NULL, sizeof(int), NULL, &eventParams); + bool isZoomEvent = ((eventParams & kWindowBoundsChangeZoom) != 0); + + // Maximized flag is if zoom event and increasing window size + mMaximized = (isZoomEvent && newBoundsLarger); + aglUpdateContext(mContext); + mCallbacks->handleResize(this, newBounds.right - newBounds.left, newBounds.bottom - newBounds.top); - - + } + break; + + case kEventWindowGetIdealSize: + // Only recommend a new ideal size when un-maximizing + if (mMaximized == TRUE) + { + Point nonMaximizedSize; + + nonMaximizedSize.v = mPreviousWindowRect.bottom - mPreviousWindowRect.top; + nonMaximizedSize.h = mPreviousWindowRect.right - mPreviousWindowRect.left; + + SetEventParameter(event, kEventParamDimensions, typeQDPoint, sizeof(Point), &nonMaximizedSize); + result = noErr; } break; diff --git a/indra/llwindow/llwindowmacosx.h b/indra/llwindow/llwindowmacosx.h index 6dc093b4be..6c9e075a21 100644 --- a/indra/llwindow/llwindowmacosx.h +++ b/indra/llwindow/llwindowmacosx.h @@ -156,7 +156,6 @@ protected: static pascal Boolean staticMoveEventComparator( EventRef event, void* data); OSStatus eventHandler (EventHandlerCallRef myHandler, EventRef event); void adjustCursorDecouple(bool warpingMouse = false); - void fixWindowSize(void); void stopDockTileBounce(); static MASK modifiersToMask(SInt16 modifiers); @@ -182,6 +181,7 @@ protected: EventComparatorUPP mMoveEventCampartorUPP; Rect mOldMouseClip; // Screen rect to which the mouse cursor was globally constrained before we changed it in clipMouse() + Rect mPreviousWindowRect; // Save previous window for un-maximize event Str255 mWindowTitle; double mOriginalAspectRatio; BOOL mSimulatedRightClick; @@ -195,6 +195,7 @@ protected: BOOL mNeedsResize; // Constructor figured out the window is too big, it needs a resize. LLCoordScreen mNeedsResizeSize; F32 mOverrideAspectRatio; + BOOL mMaximized; BOOL mMinimized; U32 mFSAASamples; BOOL mForceRebuild; -- cgit v1.2.3 From 1ef083244ad8cc603b50c1d737d8efb4ed14bb17 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Mon, 25 Apr 2011 22:37:15 -0700 Subject: EXP-664 : Add JPEG2000 compression settings for test, fix one crash on compression, enhanced error handling on image upload --- indra/newview/app_settings/settings.xml | 33 +++++++++++++++++++++++++++++++++ indra/newview/llviewertexturelist.cpp | 31 ++++++++++++++++++++++++++++++- 2 files changed, 63 insertions(+), 1 deletion(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index f2a0e5ac19..24c495a0ef 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -4295,6 +4295,39 @@ Value 0.25 + Jpeg2000AdvancedCompression + + Comment + Use advanced Jpeg2000 compression options (precincts, blocks, ordering, markers) + Persist + 1 + Type + Boolean + Value + 0 + + Jpeg2000PrecinctsSize + + Comment + Size of image precincts. Assumed square and same for all levels. Must be power of 2. + Persist + 1 + Type + S32 + Value + 256 + + Jpeg2000BlocksSize + + Comment + Size of encoding blocks. Assumed square and same for all levels. Must be power of 2. Max 64, Min 4. + Persist + 1 + Type + S32 + Value + 64 + KeepAspectForSnapshot Comment diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 5afed721ac..182cba0e8c 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -932,16 +932,19 @@ BOOL LLViewerTextureList::createUploadFile(const std::string& filename, LLPointer image = LLImageFormatted::createFromType(codec); if (image.isNull()) { + image->setLastError("Couldn't open the image to be uploaded."); return FALSE; } if (!image->load(filename)) { + image->setLastError("Couldn't load the image to be uploaded."); return FALSE; } // Decompress or expand it in a raw image structure LLPointer raw_image = new LLImageRaw; if (!image->decode(raw_image, 0.0f)) { + image->setLastError("Couldn't decode the image to be uploaded."); return FALSE; } // Check the image constraints @@ -952,8 +955,15 @@ BOOL LLViewerTextureList::createUploadFile(const std::string& filename, } // Convert to j2c (JPEG2000) and save the file locally LLPointer compressedImage = convertToUploadFile(raw_image); + if (compressedImage.isNull()) + { + image->setLastError("Couldn't convert the image to jpeg2000."); + llinfos << "Couldn't convert to j2c, file : " << filename << llendl; + return FALSE; + } if (!compressedImage->save(out_filename)) { + image->setLastError("Couldn't create the jpeg2000 image for upload."); llinfos << "Couldn't create output file : " << out_filename << llendl; return FALSE; } @@ -961,6 +971,7 @@ BOOL LLViewerTextureList::createUploadFile(const std::string& filename, LLPointer integrity_test = new LLImageJ2C; if (!integrity_test->loadAndValidate( out_filename )) { + image->setLastError("The created jpeg2000 image is corrupt."); llinfos << "Image file : " << out_filename << " is corrupt" << llendl; return FALSE; } @@ -978,7 +989,25 @@ LLPointer LLViewerTextureList::convertToUploadFile(LLPointergetWidth() * raw_image->getHeight() <= LL_IMAGE_REZ_LOSSLESS_CUTOFF * LL_IMAGE_REZ_LOSSLESS_CUTOFF)) compressedImage->setReversible(TRUE); - compressedImage->encode(raw_image, 0.0f); + + if (gSavedSettings.getBOOL("Jpeg2000AdvancedCompression")) + { + // This test option will create jpeg2000 images with precincts for each level, RPCL ordering + // and PLT markers. The block size is also optionally modifiable. + // Note: the images hence created are compatible with older versions of the viewer. + // Read the blocks and precincts size settings + S32 block_size = gSavedSettings.getS32("Jpeg2000BlocksSize"); + S32 precinct_size = gSavedSettings.getS32("Jpeg2000PrecinctsSize"); + llinfos << "Advanced JPEG2000 Compression: precinct = " << precinct_size << ", block = " << block_size << llendl; + compressedImage->initEncode(*raw_image, block_size, precinct_size); + } + + if (!compressedImage->encode(raw_image, 0.0f)) + { + llinfos << "convertToUploadFile : encode returns with error!!" << llendl; + // Clear up the pointer so we don't leak that one + compressedImage = NULL; + } return compressedImage; } -- cgit v1.2.3 From c18e2f74b0f98bc772cb4cdcda17e598971b8b62 Mon Sep 17 00:00:00 2001 From: Boroondas Gupte Date: Tue, 26 Apr 2011 22:22:33 +0200 Subject: STORM-1182 Use string::rfind instead of string::find ... so the last occurance of the build prefix in the executable path will be matched. This should avoid cuttung too much subdirs away if someone checks out the source to a path already containing "/build-darwin-" or "/build-linux-". --- indra/llvfs/lldir_linux.cpp | 2 +- indra/llvfs/lldir_mac.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/llvfs/lldir_linux.cpp b/indra/llvfs/lldir_linux.cpp index ae25ab2f21..72b54f5380 100644 --- a/indra/llvfs/lldir_linux.cpp +++ b/indra/llvfs/lldir_linux.cpp @@ -93,7 +93,7 @@ LLDir_Linux::LLDir_Linux() #else mAppRODataDir = tmp_str; #endif - std::string::size_type build_dir_pos = mExecutableDir.find("/build-linux-"); + std::string::size_type build_dir_pos = mExecutableDir.rfind("/build-linux-"); if (build_dir_pos != std::string::npos) { // ...we're in a dev checkout diff --git a/indra/llvfs/lldir_mac.cpp b/indra/llvfs/lldir_mac.cpp index e862ef0d84..f9369b043e 100644 --- a/indra/llvfs/lldir_mac.cpp +++ b/indra/llvfs/lldir_mac.cpp @@ -150,7 +150,7 @@ LLDir_Mac::LLDir_Mac() CFURLRef resourcesURLRef = CFBundleCopyResourcesDirectoryURL(mainBundleRef); CFURLRefToLLString(resourcesURLRef, mAppRODataDir, true); - U32 build_dir_pos = mExecutableDir.find("/build-darwin-"); + U32 build_dir_pos = mExecutableDir.rfind("/build-darwin-"); if (build_dir_pos != std::string::npos) { // ...we're in a dev checkout -- cgit v1.2.3 From d952f97459a04d64b698380b777406f1644f9bb2 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Tue, 26 Apr 2011 14:02:41 -0700 Subject: EXP-752 FIX -- When "View Display Names" is disabled, only my own profile loads, when I click others profiles Avatar username is now looked up in the name cache when it is blank, which happens when display names are turned off apparently. Reviewed by Fredrik. --- indra/newview/llavataractions.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index ca7ec7cc30..cbbdcb2983 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -302,8 +302,14 @@ void LLAvatarActions::startConference(const uuid_vec_t& ids) static void on_avatar_name_show_profile(const LLUUID& agent_id, const LLAvatarName& av_name) { - llinfos << "opening web profile for " << av_name.mUsername << llendl; - std::string url = getProfileURL(av_name.mUsername); + std::string username = av_name.mUsername; + if (username.empty()) + { + username = LLCacheName::buildUsername(av_name.mDisplayName); + } + + llinfos << "opening web profile for " << username << llendl; + std::string url = getProfileURL(username); // PROFILES: open in webkit window LLWeb::loadWebURLInternal(url, "", agent_id.asString()); -- cgit v1.2.3 From e1e736eff89a279114d3fdc0381e1b669ea5a406 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Tue, 26 Apr 2011 14:02:41 -0700 Subject: EXP-752 FIX -- When "View Display Names" is disabled, only my own profile loads, when I click others profiles Avatar username is now looked up in the name cache when it is blank, which happens when display names are turned off apparently. Reviewed by Fredrik. --- indra/newview/llavataractions.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index ca7ec7cc30..cbbdcb2983 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -302,8 +302,14 @@ void LLAvatarActions::startConference(const uuid_vec_t& ids) static void on_avatar_name_show_profile(const LLUUID& agent_id, const LLAvatarName& av_name) { - llinfos << "opening web profile for " << av_name.mUsername << llendl; - std::string url = getProfileURL(av_name.mUsername); + std::string username = av_name.mUsername; + if (username.empty()) + { + username = LLCacheName::buildUsername(av_name.mDisplayName); + } + + llinfos << "opening web profile for " << username << llendl; + std::string url = getProfileURL(username); // PROFILES: open in webkit window LLWeb::loadWebURLInternal(url, "", agent_id.asString()); -- cgit v1.2.3 From f7bd5b98949fc72ac1fd4b97ecd4907e14c04315 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Tue, 26 Apr 2011 14:02:41 -0700 Subject: EXP-752 FIX -- When "View Display Names" is disabled, only my own profile loads, when I click others profiles Avatar username is now looked up in the name cache when it is blank, which happens when display names are turned off apparently. Reviewed by Fredrik. --- indra/newview/llavataractions.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index ca7ec7cc30..cbbdcb2983 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -302,8 +302,14 @@ void LLAvatarActions::startConference(const uuid_vec_t& ids) static void on_avatar_name_show_profile(const LLUUID& agent_id, const LLAvatarName& av_name) { - llinfos << "opening web profile for " << av_name.mUsername << llendl; - std::string url = getProfileURL(av_name.mUsername); + std::string username = av_name.mUsername; + if (username.empty()) + { + username = LLCacheName::buildUsername(av_name.mDisplayName); + } + + llinfos << "opening web profile for " << username << llendl; + std::string url = getProfileURL(username); // PROFILES: open in webkit window LLWeb::loadWebURLInternal(url, "", agent_id.asString()); -- cgit v1.2.3 From 4bc90f24b3ced350ed44ca782f876af19af83c41 Mon Sep 17 00:00:00 2001 From: brad kittenbrink Date: Tue, 26 Apr 2011 14:58:58 -0700 Subject: FIX VWR-25608 error on shutdow due to buffer overflow in LLVFS::audit --- indra/llvfs/llvfs.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/indra/llvfs/llvfs.cpp b/indra/llvfs/llvfs.cpp index c1fe21c57d..82166d3e56 100644 --- a/indra/llvfs/llvfs.cpp +++ b/indra/llvfs/llvfs.cpp @@ -26,6 +26,8 @@ #include "linden_common.h" +#include "llvfs.h" + #include #include #include @@ -39,8 +41,6 @@ #include #endif -#include "llvfs.h" - #include "llstl.h" #include "lltimer.h" @@ -1711,7 +1711,8 @@ void LLVFS::audit() BOOL vfs_corrupt = FALSE; - std::vector buffer(index_size); + // since we take the address of element 0, we need to have at least one element. + std::vector buffer(llmax(index_size,1U)); if (fread(&buffer[0], 1, index_size, mIndexFP) != index_size) { -- cgit v1.2.3 From d4b9db012e2b5195759f694792c392770112b42d Mon Sep 17 00:00:00 2001 From: brad kittenbrink Date: Tue, 26 Apr 2011 15:04:22 -0700 Subject: FIX VWR-25609: crash on shutdown in LLGLNamePool::sInstances destructor --- indra/llrender/llgl.cpp | 29 ++++++++--------------------- indra/llrender/llgl.h | 7 ++++--- indra/llrender/llvertexbuffer.cpp | 4 ---- indra/newview/llspatialpartition.cpp | 2 -- 4 files changed, 12 insertions(+), 30 deletions(-) diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index c86c89fa9b..b1a4051e96 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -105,7 +105,6 @@ LLMatrix4 gGLObliqueProjectionInverse; #define LL_GL_NAME_POOLING 0 -LLGLNamePool::pool_list_t LLGLNamePool::sInstances; std::list LLGLUpdate::sGLQ; #if (LL_WINDOWS || LL_LINUX || LL_SOLARIS) && !LL_MESA_HEADLESS @@ -1920,22 +1919,8 @@ LLGLNamePool::LLGLNamePool() { } -void LLGLNamePool::registerPool(LLGLNamePool* pool) -{ - pool_list_t::iterator iter = std::find(sInstances.begin(), sInstances.end(), pool); - if (iter == sInstances.end()) - { - sInstances.push_back(pool); - } -} - LLGLNamePool::~LLGLNamePool() { - pool_list_t::iterator iter = std::find(sInstances.begin(), sInstances.end(), this); - if (iter != sInstances.end()) - { - sInstances.erase(iter); - } } void LLGLNamePool::upkeep() @@ -2004,20 +1989,22 @@ void LLGLNamePool::release(GLuint name) void LLGLNamePool::upkeepPools() { LLMemType mt(LLMemType::MTYPE_UPKEEP_POOLS); - for (pool_list_t::iterator iter = sInstances.begin(); iter != sInstances.end(); ++iter) + tracker_t::LLInstanceTrackerScopedGuard guard; + for (tracker_t::instance_iter iter = guard.beginInstances(); iter != guard.endInstances(); ++iter) { - LLGLNamePool* pool = *iter; - pool->upkeep(); + LLGLNamePool & pool = *iter; + pool.upkeep(); } } //static void LLGLNamePool::cleanupPools() { - for (pool_list_t::iterator iter = sInstances.begin(); iter != sInstances.end(); ++iter) + tracker_t::LLInstanceTrackerScopedGuard guard; + for (tracker_t::instance_iter iter = guard.beginInstances(); iter != guard.endInstances(); ++iter) { - LLGLNamePool* pool = *iter; - pool->cleanup(); + LLGLNamePool & pool = *iter; + pool.cleanup(); } } diff --git a/indra/llrender/llgl.h b/indra/llrender/llgl.h index 684fd50883..51b0a1e45f 100644 --- a/indra/llrender/llgl.h +++ b/indra/llrender/llgl.h @@ -40,6 +40,7 @@ #include "v4math.h" #include "llplane.h" #include "llgltypes.h" +#include "llinstancetracker.h" #include "llglheaders.h" #include "glh/glh_linear.h" @@ -328,9 +329,11 @@ public: Generic pooling scheme for things which use GL names (used for occlusion queries and vertex buffer objects). Prevents thrashing of GL name caches by avoiding calls to glGenFoo and glDeleteFoo. */ -class LLGLNamePool +class LLGLNamePool : public LLInstanceTracker { public: + typedef LLInstanceTracker tracker_t; + struct NameEntry { GLuint name; @@ -357,13 +360,11 @@ public: GLuint allocate(); void release(GLuint name); - static void registerPool(LLGLNamePool* pool); static void upkeepPools(); static void cleanupPools(); protected: typedef std::vector pool_list_t; - static pool_list_t sInstances; virtual GLuint allocateName() = 0; virtual void releaseName(GLuint name) = 0; diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp index 1beb74eca6..1a5a4f734d 100644 --- a/indra/llrender/llvertexbuffer.cpp +++ b/indra/llrender/llvertexbuffer.cpp @@ -323,10 +323,6 @@ void LLVertexBuffer::initClass(bool use_vbo, bool no_vbo_mapping) } sDisableVBOMapping = sEnableVBOs && no_vbo_mapping ; - LLGLNamePool::registerPool(&sDynamicVBOPool); - LLGLNamePool::registerPool(&sDynamicIBOPool); - LLGLNamePool::registerPool(&sStreamVBOPool); - LLGLNamePool::registerPool(&sStreamIBOPool); } //static diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index 8adb8c30e0..94784f3f49 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -1635,8 +1635,6 @@ LLSpatialPartition::LLSpatialPartition(U32 data_mask, BOOL render_by_group, U32 mSlopRatio = 0.25f; mInfiniteFarClip = FALSE; - LLGLNamePool::registerPool(&sQueryPool); - mOctree = new LLSpatialGroup::OctreeRoot(LLVector3d(0,0,0), LLVector3d(1,1,1), NULL); -- cgit v1.2.3 From 2840bff7734fc7888da804d7aad4e9f252f33872 Mon Sep 17 00:00:00 2001 From: brad kittenbrink Date: Tue, 26 Apr 2011 15:10:39 -0700 Subject: FIX VWR-25610: LLControlCroup::loadFromFile makes unnecessary copies of large LLSD objects. --- indra/llxml/llcontrol.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/indra/llxml/llcontrol.cpp b/indra/llxml/llcontrol.cpp index 6e4364a20d..a604c1e631 100644 --- a/indra/llxml/llcontrol.cpp +++ b/indra/llxml/llcontrol.cpp @@ -839,7 +839,6 @@ U32 LLControlGroup::loadFromFile(const std::string& filename, bool set_default_v { std::string name; LLSD settings; - LLSD control_map; llifstream infile; infile.open(filename); if(!infile.is_open()) @@ -864,7 +863,7 @@ U32 LLControlGroup::loadFromFile(const std::string& filename, bool set_default_v { bool persist = true; name = (*itr).first; - control_map = (*itr).second; + LLSD const & control_map = (*itr).second; if(control_map.has("Persist")) { -- cgit v1.2.3 From f4540fab4887f6fe54ed6472c4b2458e3ac745d5 Mon Sep 17 00:00:00 2001 From: brad kittenbrink Date: Tue, 26 Apr 2011 17:06:04 -0700 Subject: FIX CHOP-629: Enabled debugging info for llcommon.dll --- indra/llcommon/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index 22e0705036..800bf8eba9 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -268,6 +268,10 @@ if(LLCOMMON_LINK_SHARED) add_definitions(-fPIC) endif(WINDOWS) endif(NOT WORD_SIZE EQUAL 32) + if(WINDOWS) + # always generate llcommon.pdb, even for "Release" builds + set_target_properties(llcommon PROPERTIES LINK_FLAGS "/DEBUG") + endif(WINDOWS) ll_stage_sharedlib(llcommon) else(LLCOMMON_LINK_SHARED) add_library (llcommon ${llcommon_SOURCE_FILES}) -- cgit v1.2.3 From 1143f2c1bdb464dd54e7b10e90763af9b8254b6c Mon Sep 17 00:00:00 2001 From: "Debi King (Dessie)" Date: Wed, 27 Apr 2011 12:28:40 -0400 Subject: Added tag DRTVWR-46_2.6.3-release, 2.6.3-release for changeset 8f2da1701c81 --- .hgtags | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.hgtags b/.hgtags index 629783d37f..e3f34d6041 100644 --- a/.hgtags +++ b/.hgtags @@ -97,3 +97,5 @@ d1203046bb653b763f835b04d184646949d8dd5c 2.6.2-beta1 ec32f1045e7c2644015245df3a9933620aa194b8 2.6.3-start d7fcefabdf32bb61a9ea6d6037c1bb26190a85bc DRTVWR-47_2.6.3-beta1 d7fcefabdf32bb61a9ea6d6037c1bb26190a85bc 2.6.3-beta1 +8f2da1701c81a62352df2b8d413d27fb2cade9a6 DRTVWR-46_2.6.3-release +8f2da1701c81a62352df2b8d413d27fb2cade9a6 2.6.3-release -- cgit v1.2.3 From e6bd982c00fe0f08a6640a19ef0adfda75d4d3ed Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 27 Apr 2011 10:47:41 -0700 Subject: OPEN-50 : backing out that change that is incompatible with Incredibuild. --- autobuild.xml | 3 --- 1 file changed, 3 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index bd98d59766..2ac869b20a 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -1674,9 +1674,6 @@ -DCMAKE_BUILD_TYPE:STRING=Release -DWORD_SIZE:STRING=32 -DROOT_PROJECT_NAME:STRING=SecondLife - -DUSE_PRECOMPILED_HEADERS=ON - -DLL_RELEASE_FOR_DOWNLOAD:BOOL=TRUE - -DINSTALL_PROPRIETARY=TRUE name -- cgit v1.2.3 From adf7a568948fc0915d10f35291b573688aad8947 Mon Sep 17 00:00:00 2001 From: "Debi King (Dessie)" Date: Wed, 27 Apr 2011 16:11:07 -0400 Subject: Added tag DRTVWR-44_2.6.2-release, 2.6.2-release for changeset 214180ad5714 --- .hgtags | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.hgtags b/.hgtags index e3f34d6041..635d1bece0 100644 --- a/.hgtags +++ b/.hgtags @@ -99,3 +99,5 @@ d7fcefabdf32bb61a9ea6d6037c1bb26190a85bc DRTVWR-47_2.6.3-beta1 d7fcefabdf32bb61a9ea6d6037c1bb26190a85bc 2.6.3-beta1 8f2da1701c81a62352df2b8d413d27fb2cade9a6 DRTVWR-46_2.6.3-release 8f2da1701c81a62352df2b8d413d27fb2cade9a6 2.6.3-release +214180ad5714ce8392b82bbebcc92f4babd98300 DRTVWR-44_2.6.2-release +214180ad5714ce8392b82bbebcc92f4babd98300 2.6.2-release -- cgit v1.2.3 From 36986de1fc1437f509d120b79430c87575e755b1 Mon Sep 17 00:00:00 2001 From: brad kittenbrink Date: Wed, 27 Apr 2011 16:02:16 -0700 Subject: Fix for mac compile error in VWR-25608 fix. --- indra/llvfs/llvfs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/llvfs/llvfs.cpp b/indra/llvfs/llvfs.cpp index 82166d3e56..78b67e9b68 100644 --- a/indra/llvfs/llvfs.cpp +++ b/indra/llvfs/llvfs.cpp @@ -1712,7 +1712,7 @@ void LLVFS::audit() BOOL vfs_corrupt = FALSE; // since we take the address of element 0, we need to have at least one element. - std::vector buffer(llmax(index_size,1U)); + std::vector buffer(llmax(index_size,1U)); if (fread(&buffer[0], 1, index_size, mIndexFP) != index_size) { -- cgit v1.2.3 From 37ef2c4f0f7958106ea09abcd486cb9c305316e4 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Wed, 27 Apr 2011 16:45:33 -0700 Subject: EXP-670 Voice for basic mode reviewed by Merov http://codereview.lindenlab.com/6231263/ --- indra/newview/llpanelvoicedevicesettings.cpp | 2 +- indra/newview/llviewerfloaterreg.cpp | 2 + indra/newview/llviewermenu.cpp | 9 + .../default/xui/en/panel_preferences_sound.xml | 171 +--------------- indra/newview/skins/minimal/textures/textures.xml | 4 +- .../skins/minimal/xui/en/panel_bottomtray.xml | 220 ++++++++++++--------- 6 files changed, 152 insertions(+), 256 deletions(-) diff --git a/indra/newview/llpanelvoicedevicesettings.cpp b/indra/newview/llpanelvoicedevicesettings.cpp index aef870d352..d13f57bd6a 100644 --- a/indra/newview/llpanelvoicedevicesettings.cpp +++ b/indra/newview/llpanelvoicedevicesettings.cpp @@ -316,6 +316,6 @@ void LLPanelVoiceDeviceSettings::onCommitOutputDevice() if(LLVoiceClient::getInstance()) { LLVoiceClient::getInstance()->setRenderDevice( - getChild("voice_input_device")->getValue().asString()); + getChild("voice_output_device")->getValue().asString()); } } diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index dca1e33e60..6dc85799ce 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -91,6 +91,7 @@ #include "llfloatersettingsdebug.h" #include "llfloatersidetraytab.h" #include "llfloatersnapshot.h" +#include "llfloatersounddevices.h" #include "llfloatertelehub.h" #include "llfloatertestinspectors.h" #include "llfloatertestlistview.h" @@ -239,6 +240,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("sell_land", "floater_sell_land.xml", &LLFloaterSellLand::buildFloater); LLFloaterReg::add("settings_debug", "floater_settings_debug.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("side_bar_tab", "floater_side_bar_tab.xml", &LLFloaterReg::build); + LLFloaterReg::add("sound_devices", "floater_sound_devices.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("stats", "floater_stats.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("start_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("stop_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 3665b7d91f..c568c8eedb 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -5591,6 +5591,14 @@ class LLToggleHelp : public view_listener_t } }; +class LLToggleSpeak : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + LLVoiceClient::getInstance()->toggleUserPTTState(); + return true; + } +}; class LLShowSidetrayPanel : public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -8187,6 +8195,7 @@ void initialize_menus() commit.add("BuyCurrency", boost::bind(&handle_buy_currency)); view_listener_t::addMenu(new LLShowHelp(), "ShowHelp"); view_listener_t::addMenu(new LLToggleHelp(), "ToggleHelp"); + view_listener_t::addMenu(new LLToggleSpeak(), "ToggleSpeak"); view_listener_t::addMenu(new LLPromptShowURL(), "PromptShowURL"); view_listener_t::addMenu(new LLShowAgentProfile(), "ShowAgentProfile"); view_listener_t::addMenu(new LLToggleAgentProfile(), "ToggleAgentProfile"); diff --git a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml index 26af8dc29d..a314e0d85e 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml @@ -466,164 +466,13 @@ name="device_settings_btn" width="190"> - - - Default - - - Default system device - - - No device - - - - Input - - - - My volume: - - - - Please wait - - - - - - - - - Output - - - - + + diff --git a/indra/newview/skins/minimal/textures/textures.xml b/indra/newview/skins/minimal/textures/textures.xml index b4848a0619..e3ed01721a 100644 --- a/indra/newview/skins/minimal/textures/textures.xml +++ b/indra/newview/skins/minimal/textures/textures.xml @@ -6,4 +6,6 @@ - + + + diff --git a/indra/newview/skins/minimal/xui/en/panel_bottomtray.xml b/indra/newview/skins/minimal/xui/en/panel_bottomtray.xml index 95f2010e44..70a59cea43 100644 --- a/indra/newview/skins/minimal/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/minimal/xui/en/panel_bottomtray.xml @@ -12,16 +12,16 @@ focus_root="true" top="28" width="1310"> - - - - - - - - + - + + + + + + width="88"> - - - - - + + - - - - - + + - - - + - - - - - + + - - - - - + + - - - + - - - - - + + - - - - - + + - - - - - + + - - - - - - + + + - - @@ -517,5 +551,5 @@ image_pressed_selected "Lit" + "Selected" - there are new messages and the Well min_width="4" name="DUMMY2" width="8" /> - + -- cgit v1.2.3 From 892c5109e8679ca28a53799289732efcbebd9d48 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Wed, 27 Apr 2011 16:45:57 -0700 Subject: EXP-670 Voice for basic mode new files reviewed by merov --- indra/newview/llfloatersounddevices.cpp | 85 +++++++++++ indra/newview/llfloatersounddevices.h | 49 +++++++ .../skins/default/xui/en/floater_sound_devices.xml | 28 ++++ .../skins/default/xui/en/panel_sound_devices.xml | 163 +++++++++++++++++++++ .../minimal/textures/bottomtray/Speak_Btn_Off.png | Bin 0 -> 993 bytes .../bottomtray/Speak_Btn_Selected_Press.png | Bin 0 -> 1217 bytes 6 files changed, 325 insertions(+) create mode 100644 indra/newview/llfloatersounddevices.cpp create mode 100644 indra/newview/llfloatersounddevices.h create mode 100644 indra/newview/skins/default/xui/en/floater_sound_devices.xml create mode 100644 indra/newview/skins/default/xui/en/panel_sound_devices.xml create mode 100644 indra/newview/skins/minimal/textures/bottomtray/Speak_Btn_Off.png create mode 100644 indra/newview/skins/minimal/textures/bottomtray/Speak_Btn_Selected_Press.png diff --git a/indra/newview/llfloatersounddevices.cpp b/indra/newview/llfloatersounddevices.cpp new file mode 100644 index 0000000000..1f6a992fc5 --- /dev/null +++ b/indra/newview/llfloatersounddevices.cpp @@ -0,0 +1,85 @@ +/** + * @file llfloatersounddevices.cpp + * @author Leyla Farazha + * @brief Sound Preferences used for minimal skin + * +* $LicenseInfo:firstyear=2011&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, 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 "llviewerprecompiledheaders.h" + +#include "llfloatersounddevices.h" + +#include "llbottomtray.h" +#include "lldraghandle.h" + +#include "llpanelvoicedevicesettings.h" + +// Library includes +#include "indra_constants.h" + +// protected +LLFloaterSoundDevices::LLFloaterSoundDevices(const LLSD& key) +: LLTransientDockableFloater(NULL, false, key) +{ + LLTransientFloaterMgr::getInstance()->addControlView(this); + + // force docked state since this floater doesn't save it between recreations + setDocked(true); +} + +LLFloaterSoundDevices::~LLFloaterSoundDevices() +{ + LLTransientFloaterMgr::getInstance()->removeControlView(this); +} + +// virtual +BOOL LLFloaterSoundDevices::postBuild() +{ + LLTransientDockableFloater::postBuild(); + + LLView *anchor_panel = LLBottomTray::getInstance()->getChild("speak_flyout_btn"); + setDockControl(new LLDockControl(anchor_panel, this, getDockTongue(), LLDockControl::TOP)); + + setIsChrome(TRUE); + if (mDragHandle) + mDragHandle->setTitleVisible(TRUE); + updateTransparency(TT_ACTIVE); // force using active floater transparency (STORM-730) + + return TRUE; +} + +//virtual +void LLFloaterSoundDevices::setDocked(bool docked, bool pop_on_undock/* = true*/) +{ + LLTransientDockableFloater::setDocked(docked, pop_on_undock); +} + +// virtual +void LLFloaterSoundDevices::setFocus( BOOL b ) +{ + LLTransientDockableFloater::setFocus(b); + + // Force using active floater transparency + // We have to override setFocus() for because selecting an item of the + // combobox causes the floater to lose focus and thus become transparent. + updateTransparency(TT_ACTIVE); +} \ No newline at end of file diff --git a/indra/newview/llfloatersounddevices.h b/indra/newview/llfloatersounddevices.h new file mode 100644 index 0000000000..f09ee3b069 --- /dev/null +++ b/indra/newview/llfloatersounddevices.h @@ -0,0 +1,49 @@ +/** + * @file llfloatersounddevices.h + * @author Leyla Farazha + * @brief Sound Preferences used for minimal skin + * +* $LicenseInfo:firstyear=2011&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, 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_LLFLOATERSOUNDDEVICES_H +#define LL_LLFLOATERSOUNDDEVICES_H + +#include "lltransientdockablefloater.h" + +class LLFloaterSoundDevices : public LLTransientDockableFloater +{ +public: + + LOG_CLASS(LLFloaterSoundDevices); + + LLFloaterSoundDevices(const LLSD& key); + ~LLFloaterSoundDevices(); + + /*virtual*/ BOOL postBuild(); + /*virtual*/ void setDocked(bool docked, bool pop_on_undock = true); + /*virtual*/ void setFocus( BOOL b ); +}; + + +#endif //LL_LLFLOATERSOUNDDEVICES_H + diff --git a/indra/newview/skins/default/xui/en/floater_sound_devices.xml b/indra/newview/skins/default/xui/en/floater_sound_devices.xml new file mode 100644 index 0000000000..3c9e5aeff3 --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_sound_devices.xml @@ -0,0 +1,28 @@ + + + + diff --git a/indra/newview/skins/default/xui/en/panel_sound_devices.xml b/indra/newview/skins/default/xui/en/panel_sound_devices.xml new file mode 100644 index 0000000000..9812281323 --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_sound_devices.xml @@ -0,0 +1,163 @@ + + + Default + + + Default system device + + + No device + + + + Input + + + + My volume: + + + + Please wait + + + + + + + + + Output + + + diff --git a/indra/newview/skins/minimal/textures/bottomtray/Speak_Btn_Off.png b/indra/newview/skins/minimal/textures/bottomtray/Speak_Btn_Off.png new file mode 100644 index 0000000000..b6e9eef891 Binary files /dev/null and b/indra/newview/skins/minimal/textures/bottomtray/Speak_Btn_Off.png differ diff --git a/indra/newview/skins/minimal/textures/bottomtray/Speak_Btn_Selected_Press.png b/indra/newview/skins/minimal/textures/bottomtray/Speak_Btn_Selected_Press.png new file mode 100644 index 0000000000..687cb7fb53 Binary files /dev/null and b/indra/newview/skins/minimal/textures/bottomtray/Speak_Btn_Selected_Press.png differ -- cgit v1.2.3 From a59de335c5bfa7b730977f0061a046654e2b964c Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Wed, 27 Apr 2011 17:41:34 -0700 Subject: EXP-626 New bottomtray tooltips for basic mode --- indra/newview/skins/minimal/xui/en/panel_bottomtray.xml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/indra/newview/skins/minimal/xui/en/panel_bottomtray.xml b/indra/newview/skins/minimal/xui/en/panel_bottomtray.xml index 70a59cea43..aff22c7e45 100644 --- a/indra/newview/skins/minimal/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/minimal/xui/en/panel_bottomtray.xml @@ -78,7 +78,7 @@ label="Speak" left="0" name="speak_btn" - + tool_tip="Turn your microphone on and off" pad_right="30" halign="center" use_ellipses="true" @@ -118,6 +118,7 @@ name="speak_flyout_btn" label="" tab_stop="false" + tool_tip="Change your sound preferences" is_toggle="true" image_disabled="ComboButton_UpOff" image_unselected="ComboButton_UpOff" @@ -152,7 +153,7 @@ view_all="false" left="3" name="Gesture" - tool_tip="Shows/hides gestures" + tool_tip="Make your avatar do things" top="5" width="82"> @@ -235,7 +236,7 @@ layout="topleft" left="0" name="destination_btn" - tool_tip="Shows destinations window" + tool_tip="Travel through Second Life" top="5" is_toggle="true" use_ellipses="true" @@ -268,6 +269,7 @@ name="avatar_btn" top="5" is_toggle="true" + tool_tip="Change your appearance" use_ellipses="true" width="100"> Date: Wed, 27 Apr 2011 17:41:49 -0700 Subject: Fixed floater sound devices title --- indra/newview/skins/default/xui/en/floater_sound_devices.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en/floater_sound_devices.xml b/indra/newview/skins/default/xui/en/floater_sound_devices.xml index 3c9e5aeff3..584413c030 100644 --- a/indra/newview/skins/default/xui/en/floater_sound_devices.xml +++ b/indra/newview/skins/default/xui/en/floater_sound_devices.xml @@ -14,7 +14,7 @@ height="140" layout="topleft" name="floater_sound_devices" - title="Sound Devicess" + title="Sound Devices" width="315"> Date: Wed, 27 Apr 2011 17:59:15 -0700 Subject: adding llfloatersounddevices.cpp/.h to the cmake file --- indra/newview/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index b1cb10665b..95cfc23ede 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -214,6 +214,7 @@ set(viewer_SOURCE_FILES llfloatersettingsdebug.cpp llfloatersidetraytab.cpp llfloatersnapshot.cpp + llfloatersounddevices.cpp llfloatertelehub.cpp llfloatertestinspectors.cpp llfloatertestlistview.cpp @@ -758,6 +759,7 @@ set(viewer_HEADER_FILES llfloatersettingsdebug.h llfloatersidetraytab.h llfloatersnapshot.h + llfloatersounddevices.h llfloatertelehub.h llfloatertestinspectors.h llfloatertestlistview.h -- cgit v1.2.3 From f56a2e55ccd86e3739f69c3d8dcc007c337bdaa1 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Wed, 27 Apr 2011 18:17:09 -0700 Subject: adding newline at end of llfloatersounddevices.cpp --- indra/newview/llfloatersounddevices.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llfloatersounddevices.cpp b/indra/newview/llfloatersounddevices.cpp index 1f6a992fc5..4f3945c95f 100644 --- a/indra/newview/llfloatersounddevices.cpp +++ b/indra/newview/llfloatersounddevices.cpp @@ -82,4 +82,4 @@ void LLFloaterSoundDevices::setFocus( BOOL b ) // We have to override setFocus() for because selecting an item of the // combobox causes the floater to lose focus and thus become transparent. updateTransparency(TT_ACTIVE); -} \ No newline at end of file +} -- cgit v1.2.3 From 42fe138cbb1af4acbb6851711f8c7f86c65795c0 Mon Sep 17 00:00:00 2001 From: brad kittenbrink Date: Wed, 27 Apr 2011 19:13:17 -0700 Subject: Incorporated some suggestions from code review for VWR-25610 --- indra/llxml/llcontrol.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/indra/llxml/llcontrol.cpp b/indra/llxml/llcontrol.cpp index a604c1e631..0809d95628 100644 --- a/indra/llxml/llcontrol.cpp +++ b/indra/llxml/llcontrol.cpp @@ -837,7 +837,6 @@ U32 LLControlGroup::saveToFile(const std::string& filename, BOOL nondefault_only U32 LLControlGroup::loadFromFile(const std::string& filename, bool set_default_values, bool save_values) { - std::string name; LLSD settings; llifstream infile; infile.open(filename); @@ -862,8 +861,8 @@ U32 LLControlGroup::loadFromFile(const std::string& filename, bool set_default_v for(LLSD::map_const_iterator itr = settings.beginMap(); itr != settings.endMap(); ++itr) { bool persist = true; - name = (*itr).first; - LLSD const & control_map = (*itr).second; + std::string const & name = itr->first; + LLSD const & control_map = itr->second; if(control_map.has("Persist")) { -- cgit v1.2.3 From 31a2923b3d96ed4a04d0b27018fc71d0d66b6a5b Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 28 Apr 2011 14:56:46 -0700 Subject: EXP-749 FIX [REGRESSION] Voice status indicator shown in IM session instead of profile pic in Basic and Advanced modes reviewed by Leyla --- indra/llui/tests/llurlentry_stub.cpp | 2 +- indra/llui/tests/llurlmatch_test.cpp | 2 +- indra/llxuixml/llinitparam.cpp | 4 +- indra/llxuixml/llinitparam.h | 63 ++++++++++++++++------ .../skins/default/xui/en/widgets/avatar_icon.xml | 1 + .../skins/default/xui/en/widgets/scroll_bar.xml | 18 ++++--- 6 files changed, 63 insertions(+), 27 deletions(-) diff --git a/indra/llui/tests/llurlentry_stub.cpp b/indra/llui/tests/llurlentry_stub.cpp index 75946b2416..26b3b17577 100644 --- a/indra/llui/tests/llurlentry_stub.cpp +++ b/indra/llui/tests/llurlentry_stub.cpp @@ -127,7 +127,7 @@ namespace LLInitParam bool BaseBlock::deserializeBlock(Parser& p, Parser::name_stack_range_t name_stack, S32 generation){ return true; } void BaseBlock::serializeBlock(Parser& parser, Parser::name_stack_t name_stack, const LLInitParam::BaseBlock* diff_block) const {} bool BaseBlock::inspectBlock(Parser& parser, Parser::name_stack_t name_stack, S32 min_value, S32 max_value) const { return true; } - bool BaseBlock::merge(BlockDescriptor& block_data, const BaseBlock& other, bool overwrite) { return true; } + bool BaseBlock::mergeBlock(BlockDescriptor& block_data, const BaseBlock& other, bool overwrite) { return true; } bool BaseBlock::validateBlock(bool emit_errors) const { return true; } ParamValue >::ParamValue(const LLUIColor& color) diff --git a/indra/llui/tests/llurlmatch_test.cpp b/indra/llui/tests/llurlmatch_test.cpp index aea605c9f2..e09ef33d49 100644 --- a/indra/llui/tests/llurlmatch_test.cpp +++ b/indra/llui/tests/llurlmatch_test.cpp @@ -101,7 +101,7 @@ namespace LLInitParam bool BaseBlock::deserializeBlock(Parser& p, Parser::name_stack_range_t name_stack, S32 generation){ return true; } void BaseBlock::serializeBlock(Parser& parser, Parser::name_stack_t name_stack, const LLInitParam::BaseBlock* diff_block) const {} bool BaseBlock::inspectBlock(Parser& parser, Parser::name_stack_t name_stack, S32 min_count, S32 max_count) const { return true; } - bool BaseBlock::merge(BlockDescriptor& block_data, const BaseBlock& other, bool overwrite) { return true; } + bool BaseBlock::mergeBlock(BlockDescriptor& block_data, const BaseBlock& other, bool overwrite) { return true; } bool BaseBlock::validateBlock(bool emit_errors) const { return true; } ParamValue >::ParamValue(const LLUIColor& color) diff --git a/indra/llxuixml/llinitparam.cpp b/indra/llxuixml/llinitparam.cpp index 3c4eb70a5d..b3312798dd 100644 --- a/indra/llxuixml/llinitparam.cpp +++ b/indra/llxuixml/llinitparam.cpp @@ -375,7 +375,7 @@ namespace LLInitParam //static void BaseBlock::addParam(BlockDescriptor& block_data, const ParamDescriptorPtr in_param, const char* char_name) { - // create a copy of the paramdescriptor in allparams + // create a copy of the param descriptor in mAllParams // so other data structures can store a pointer to it block_data.mAllParams.push_back(in_param); ParamDescriptorPtr param(block_data.mAllParams.back()); @@ -469,7 +469,7 @@ namespace LLInitParam // take all provided params from other and apply to self // NOTE: this requires that "other" is of the same derived type as this - bool BaseBlock::merge(BlockDescriptor& block_data, const BaseBlock& other, bool overwrite) + bool BaseBlock::mergeBlock(BlockDescriptor& block_data, const BaseBlock& other, bool overwrite) { bool some_param_changed = false; BlockDescriptor::all_params_list_t::const_iterator end_it = block_data.mAllParams.end(); diff --git a/indra/llxuixml/llinitparam.h b/indra/llxuixml/llinitparam.h index 858f8405b4..35c3106198 100644 --- a/indra/llxuixml/llinitparam.h +++ b/indra/llxuixml/llinitparam.h @@ -476,8 +476,12 @@ namespace LLInitParam void init(BlockDescriptor& descriptor, BlockDescriptor& base_descriptor, size_t block_size); + bool mergeBlockParam(bool param_provided, BlockDescriptor& block_data, const BaseBlock& other, bool overwrite) + { + mergeBlock(block_data, other, overwrite); + } // take all provided params from other and apply to self - bool merge(BlockDescriptor& block_data, const BaseBlock& other, bool overwrite); + bool mergeBlock(BlockDescriptor& block_data, const BaseBlock& other, bool overwrite); // can be updated in getters mutable S32 mChangeVersion; @@ -896,12 +900,14 @@ namespace LLInitParam const self_t& src_typed_param = static_cast(src); self_t& dst_typed_param = static_cast(dst); - if (src_typed_param.isProvided() - && (overwrite || !dst_typed_param.isProvided())) + if (src_typed_param.anyProvided()) { - if (dst_typed_param.merge(param_value_t::selfBlockDescriptor(), src_typed_param, overwrite)) + bool param_provided = src_typed_param.isProvided() && (overwrite || !dst_typed_param.isProvided()); + if (dst_typed_param.mergeBlockParam(param_provided, param_value_t::selfBlockDescriptor(), src_typed_param, overwrite)) { dst_typed_param.clearValueName(); + dst_typed_param.setProvided(true); + dst_typed_param.enclosingBlock().paramChanged(dst_typed_param, true); return true; } } @@ -1082,6 +1088,12 @@ namespace LLInitParam std::copy(dst_typed_param.begin(), dst_typed_param.end(), std::back_inserter(new_values)); std::swap(dst_typed_param.mValues, new_values); } + + if (src_typed_param.begin() != src_typed_param.end()) + { + dst_typed_param.setProvided(true); + dst_typed_param.enclosingBlock().paramChanged(dst_typed_param, true); + } return true; } @@ -1282,6 +1294,13 @@ namespace LLInitParam std::copy(dst_typed_param.begin(), dst_typed_param.end(), std::back_inserter(new_values)); std::swap(dst_typed_param.mValues, new_values); } + + if (src_typed_param.begin() != src_typed_param.end()) + { + dst_typed_param.setProvided(true); + dst_typed_param.enclosingBlock().paramChanged(dst_typed_param, true); + } + return true; } @@ -1301,24 +1320,28 @@ namespace LLInitParam // take all provided params from other and apply to self bool overwriteFrom(const self_t& other) { - return merge(selfBlockDescriptor(), other, true); + return mergeBlock(selfBlockDescriptor(), other, true); } // take all provided params that are not already provided, and apply to self bool fillFrom(const self_t& other) { - return merge(selfBlockDescriptor(), other, false); + return mergeBlock(selfBlockDescriptor(), other, false); } - // merge with other block - bool merge(BlockDescriptor& block_data, const self_t& other, bool overwrite) + bool mergeBlockParam(bool param_provided, BlockDescriptor& block_data, const self_t& other, bool overwrite) { - // only merge a choice if we are overwriting with other's contents - if (overwrite) + if (param_provided) { - mCurChoice = other.mCurChoice; - return BaseBlock::merge(selfBlockDescriptor(), other, overwrite); + mergeBlock(block_data, other, overwrite); } + } + + // merge with other block + bool mergeBlock(BlockDescriptor& block_data, const self_t& other, bool overwrite) + { + mCurChoice = other.mCurChoice; + return BaseBlock::mergeBlock(selfBlockDescriptor(), other, overwrite); return false; } @@ -1445,13 +1468,13 @@ namespace LLInitParam // take all provided params from other and apply to self bool overwriteFrom(const self_t& other) { - return static_cast(this)->merge(selfBlockDescriptor(), other, true); + return static_cast(this)->mergeBlock(selfBlockDescriptor(), other, true); } // take all provided params that are not already provided, and apply to self bool fillFrom(const self_t& other) { - return static_cast(this)->merge(selfBlockDescriptor(), other, false); + return static_cast(this)->mergeBlock(selfBlockDescriptor(), other, false); } virtual const BlockDescriptor& mostDerivedBlockDescriptor() const { return selfBlockDescriptor(); } @@ -1862,7 +1885,15 @@ namespace LLInitParam mValue = value; } - bool merge(BlockDescriptor& block_data, const BaseBlock& other, bool overwrite) + bool mergeBlockParam(bool param_provided, BlockDescriptor& block_data, const BaseBlock& other, bool overwrite) + { + if (param_provided) + { + mergeBlock(block_data, other, overwrite); + } + } + + bool mergeBlock(BlockDescriptor& block_data, const BaseBlock& other, bool overwrite) { const derived_t& src_typed_param = static_cast(other); @@ -1875,7 +1906,7 @@ namespace LLInitParam else { // merge individual parameters into destination - return block_t::merge(block_t::selfBlockDescriptor(), src_typed_param, overwrite); + return block_t::mergeBlock(block_t::selfBlockDescriptor(), src_typed_param, overwrite); } } diff --git a/indra/newview/skins/default/xui/en/widgets/avatar_icon.xml b/indra/newview/skins/default/xui/en/widgets/avatar_icon.xml index a1e32e44de..4d69dda7eb 100644 --- a/indra/newview/skins/default/xui/en/widgets/avatar_icon.xml +++ b/indra/newview/skins/default/xui/en/widgets/avatar_icon.xml @@ -1,6 +1,7 @@ diff --git a/indra/newview/skins/default/xui/en/widgets/scroll_bar.xml b/indra/newview/skins/default/xui/en/widgets/scroll_bar.xml index 830ea12e41..e6d4bff8b5 100644 --- a/indra/newview/skins/default/xui/en/widgets/scroll_bar.xml +++ b/indra/newview/skins/default/xui/en/widgets/scroll_bar.xml @@ -6,20 +6,24 @@ track_color="ScrollbarTrackColor" thumb_color="ScrollbarThumbColor" thickness="15"> - - - - + -- cgit v1.2.3 From edee5b10d4be026f3f8f31a7a6aecd3769c100cd Mon Sep 17 00:00:00 2001 From: Eli Linden Date: Thu, 28 Apr 2011 15:19:36 -0700 Subject: sync up with viewer-development --- .../default/xui/da/panel_preferences_chat.xml | 3 +- .../default/xui/da/panel_preferences_sound.xml | 3 +- .../default/xui/de/panel_preferences_chat.xml | 3 +- .../default/xui/de/panel_preferences_sound.xml | 3 +- .../skins/default/xui/en/floater_buy_contents.xml | 2 +- .../skins/default/xui/en/floater_preferences.xml | 4 +- .../skins/default/xui/en/menu_avatar_self.xml | 12 + .../skins/default/xui/en/menu_inventory.xml | 8 + .../skins/default/xui/en/menu_inventory_add.xml | 8 + .../skins/default/xui/en/menu_outfit_gear.xml | 8 + .../skins/default/xui/en/menu_text_editor.xml | 15 +- indra/newview/skins/default/xui/en/menu_viewer.xml | 20 + .../newview/skins/default/xui/en/notifications.xml | 63 +++- .../skins/default/xui/en/panel_bottomtray.xml | 412 ++++++++++----------- .../skins/default/xui/en/panel_edit_wearable.xml | 18 + indra/newview/skins/default/xui/en/panel_hint.xml | 6 +- .../skins/default/xui/en/panel_hint_image.xml | 40 +- indra/newview/skins/default/xui/en/panel_login.xml | 1 - .../default/xui/en/panel_preferences_alerts.xml | 4 +- .../default/xui/en/panel_preferences_chat.xml | 20 +- .../default/xui/en/panel_preferences_general.xml | 21 +- .../default/xui/en/panel_preferences_graphics1.xml | 42 ++- .../default/xui/en/panel_preferences_move.xml | 9 +- .../default/xui/en/panel_preferences_privacy.xml | 4 +- .../default/xui/en/panel_preferences_sound.xml | 16 +- .../newview/skins/default/xui/en/panel_profile.xml | 17 - indra/newview/skins/default/xui/en/strings.xml | 51 +++ .../default/xui/en/widgets/loading_indicator.xml | 20 +- .../default/xui/es/panel_preferences_chat.xml | 3 +- .../default/xui/es/panel_preferences_sound.xml | 3 +- .../default/xui/fr/panel_preferences_chat.xml | 3 +- .../default/xui/fr/panel_preferences_sound.xml | 3 +- .../default/xui/it/panel_preferences_chat.xml | 3 +- .../default/xui/it/panel_preferences_sound.xml | 3 +- .../default/xui/ja/panel_preferences_chat.xml | 3 +- .../default/xui/ja/panel_preferences_sound.xml | 3 +- .../default/xui/nl/panel_preferences_sound.xml | 3 +- .../default/xui/pl/panel_preferences_chat.xml | 3 +- .../default/xui/pl/panel_preferences_sound.xml | 3 +- .../default/xui/pt/panel_preferences_chat.xml | 3 +- .../default/xui/pt/panel_preferences_sound.xml | 3 +- 41 files changed, 554 insertions(+), 318 deletions(-) diff --git a/indra/newview/skins/default/xui/da/panel_preferences_chat.xml b/indra/newview/skins/default/xui/da/panel_preferences_chat.xml index 3705a5902a..ed499619f6 100644 --- a/indra/newview/skins/default/xui/da/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/da/panel_preferences_chat.xml @@ -29,7 +29,8 @@ - + + Benyt maskin-oversættelse ved chat (håndteret af Google) Oversæt chat til : diff --git a/indra/newview/skins/default/xui/da/panel_preferences_sound.xml b/indra/newview/skins/default/xui/da/panel_preferences_sound.xml index 5810cc21e7..067463be02 100644 --- a/indra/newview/skins/default/xui/da/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/da/panel_preferences_sound.xml @@ -4,7 +4,8 @@ Midterste museknap - + + Sluk lyd når minimeret diff --git a/indra/newview/skins/default/xui/de/panel_preferences_chat.xml b/indra/newview/skins/default/xui/de/panel_preferences_chat.xml index 8086128dd7..8c8cdd31fe 100644 --- a/indra/newview/skins/default/xui/de/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/de/panel_preferences_chat.xml @@ -29,7 +29,8 @@ - + + Bei Chat Maschinenübersetzung verwenden (Service von Google) Chat übersetzen in: diff --git a/indra/newview/skins/default/xui/de/panel_preferences_sound.xml b/indra/newview/skins/default/xui/de/panel_preferences_sound.xml index 0f029d8664..07631b6a91 100644 --- a/indra/newview/skins/default/xui/de/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/de/panel_preferences_sound.xml @@ -4,7 +4,8 @@ Mittlere Maustaste - + + Stummschalten, wenn minimiert diff --git a/indra/newview/skins/default/xui/en/floater_buy_contents.xml b/indra/newview/skins/default/xui/en/floater_buy_contents.xml index babbf0f5ca..92001534e7 100644 --- a/indra/newview/skins/default/xui/en/floater_buy_contents.xml +++ b/indra/newview/skins/default/xui/en/floater_buy_contents.xml @@ -34,7 +34,7 @@ layout="topleft" name="contains_text" width="276"> - [NAME] contains: + <nolink>[NAME]</nolink> contains: @@ -96,7 +96,7 @@ filename="panel_preferences_colors.xml" label="Colors" layout="topleft" - help_topic="preferences_im_tab" + help_topic="preferences_colors_tab" name="colors" /> + + + + + + + + + + + + + + name="Cut"> + name="Copy"> + name="Paste"> + name="Delete"> + name="Select All"> + + + + @@ -3428,6 +3438,16 @@ function="Edit.EnableTakeOff" parameter="tattoo" /> + + + + diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 433f623273..3fb3717e68 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -7022,22 +7022,27 @@ Hiding the Speak button will disable the voice feature. - Set your customizable display name here. This is in addition to your unique username, which can't be changed. You can change how you see other people's names in your preferences. +1. Click to Walk +Click anywhere on the ground to walk to that spot. + +2. Click and Drag to Rotate View +Click and drag anywhere on the world to rotate your view + custom_skin - To walk, use the directional keys on your keyboard. You can run by pressing the Up arrow twice. - custom_skin + Set your customizable display name here. This is in addition to your unique username, which can't be changed. You can change how you see other people's names in your preferences. + - + + + fail + confirm + Viewing inventory is only available in Advanced mode. Would you like to logout and change modes? + + + + + fail + confirm + The appearance editor is only available in Advanced mode. Would you like to logout and change modes? + + + + + fail + confirm + Search is only available in Advanced mode. Would you like to logout and change modes? + + + - Your CPU speed does not meet the minimum requirements. diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml index a92cc886e7..a6e5e7a219 100644 --- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml @@ -5,121 +5,121 @@ bg_opaque_color="DkGray" chrome="true" follows="left|bottom|right" - focus_root="true" + focus_root="true" height="33" layout="topleft" left="0" name="bottom_tray" top="28" width="1310"> - - - - - - + width="250" > - - - - - - - - - - - - - - - + + + - - - - - - + + - - - + follows="right" + height="28" + layout="topleft" + min_height="28" + min_width="52" + mouse_opaque="false" + name="movement_panel" + user_resize="false" + width="83"> + + + - - + - - - - - + + - - - - - - - - - - - + + + + - - - - - + + + - - - - - - + + + + + diff --git a/indra/newview/skins/default/xui/en/panel_edit_wearable.xml b/indra/newview/skins/default/xui/en/panel_edit_wearable.xml index ac8917d272..c8764a6a84 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_wearable.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_wearable.xml @@ -71,6 +71,10 @@ name="edit_tattoo_title"> Editing Tattoo + + Editing Physics + Shape: @@ -131,6 +135,10 @@ name="tattoo_desc_text"> Tattoo: + + Physics: + @@ -410,6 +418,16 @@ top="8" visible="false" width="333" /> + + height="34"> + + + + + + + + + + + + + + + diff --git a/indra/newview/skins/minimal/xui/en/floater_help_browser.xml b/indra/newview/skins/minimal/xui/en/floater_help_browser.xml new file mode 100644 index 0000000000..cc551f7d58 --- /dev/null +++ b/indra/newview/skins/minimal/xui/en/floater_help_browser.xml @@ -0,0 +1,52 @@ + + + + Loading... + + + + + + + + + diff --git a/indra/newview/skins/minimal/xui/en/floater_media_browser.xml b/indra/newview/skins/minimal/xui/en/floater_media_browser.xml new file mode 100644 index 0000000000..4862146c94 --- /dev/null +++ b/indra/newview/skins/minimal/xui/en/floater_media_browser.xml @@ -0,0 +1,242 @@ + + + + http://www.secondlife.com + + + http://support.secondlife.com + + + + + + + + + + + + + + + + + + + + + + diff --git a/indra/newview/skins/minimal/xui/en/floater_nearby_chat.xml b/indra/newview/skins/minimal/xui/en/floater_nearby_chat.xml new file mode 100644 index 0000000000..74ac885202 --- /dev/null +++ b/indra/newview/skins/minimal/xui/en/floater_nearby_chat.xml @@ -0,0 +1,52 @@ + + + + + diff --git a/indra/newview/skins/minimal/xui/en/floater_side_bar_tab.xml b/indra/newview/skins/minimal/xui/en/floater_side_bar_tab.xml new file mode 100644 index 0000000000..83b1260620 --- /dev/null +++ b/indra/newview/skins/minimal/xui/en/floater_side_bar_tab.xml @@ -0,0 +1,10 @@ + + + diff --git a/indra/newview/skins/minimal/xui/en/floater_web_content.xml b/indra/newview/skins/minimal/xui/en/floater_web_content.xml new file mode 100644 index 0000000000..50cb5b14ce --- /dev/null +++ b/indra/newview/skins/minimal/xui/en/floater_web_content.xml @@ -0,0 +1,189 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/indra/newview/skins/minimal/xui/en/inspect_avatar.xml b/indra/newview/skins/minimal/xui/en/inspect_avatar.xml new file mode 100644 index 0000000000..853d5f8735 --- /dev/null +++ b/indra/newview/skins/minimal/xui/en/inspect_avatar.xml @@ -0,0 +1,206 @@ + + + + + +[AGE] + + +[SL_PROFILE] + + + + + + This is my second life description and I really think it is great. But for some reason my description is super extra long because I like to talk a whole lot + + + + + + + + + + + + + diff --git a/indra/newview/skins/minimal/xui/en/panel_group_control_panel.xml b/indra/newview/skins/minimal/xui/en/panel_group_control_panel.xml new file mode 100644 index 0000000000..abddc59296 --- /dev/null +++ b/indra/newview/skins/minimal/xui/en/panel_group_control_panel.xml @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/indra/newview/skins/default/xui/de/notifications.xml b/indra/newview/skins/default/xui/de/notifications.xml index 3c63c093d2..c172f7ea2d 100644 --- a/indra/newview/skins/default/xui/de/notifications.xml +++ b/indra/newview/skins/default/xui/de/notifications.xml @@ -2853,6 +2853,13 @@ Alle stummschalten? Um aufzustehen, klicken Sie auf die Schaltfläche „Stehen“. + + Auf Schaltfläche „Sprechen“ klicken, um das Mikrofon ein- und auszuschalten. + +Auf den Pfeil nach oben klicken, um die Sprachsteuerung zu sehen. + +Durch Ausblenden der Schaltfläche „Sprechen“ wird die Sprechfunktion deaktiviert. + Im Reiseführer finden Sie Tausende von interessanten Orten. Wählen Sie einfach einen Ort aus und klicken Sie auf „Teleportieren“. @@ -2862,12 +2869,14 @@ Alle stummschalten? Um zu gehen oder zu rennen, öffnen Sie das Bedienfeld „Bewegen“ und klicken Sie auf die Pfeile. Sie können auch die Pfeiltasten auf Ihrer Tastatur verwenden. + + 1. Zum Gehen klicken: Auf beliebige Stelle am Boden klicken, um zu dieser Stelle zu gehen. + +2. Zum Drehen der Anzeige klicken und ziehen: Auf beliebige Stelle in der Welt klicken und ziehen, um Ihre Ansicht zu ändern. + Hier können Sie Ihren anpassbaren Anzeigenamen festlegen. Der Anzeigename unterscheidet sich von Ihrem eindeutigen Benutzernamen, der nicht geändert werden kann. In den Einstellungen können Sie festlegen, welcher Name von anderen Einwohnern angezeigt wird. - - Verwenden Sie zum Gehen die Pfeiltasten auf Ihrer Tastatur. Drücken Sie die Nach-oben-Taste zweimal, um zu rennen. - Um die Kameraansicht zu ändern, verwenden Sie die Schwenk- und Kreissteuerungen. Um die Ansicht zurückzusetzen, drücken Sie die Esc-Taste oder laufen Sie einfach. diff --git a/indra/newview/skins/default/xui/de/panel_edit_wearable.xml b/indra/newview/skins/default/xui/de/panel_edit_wearable.xml index 271db4c15c..94a79a0bbd 100644 --- a/indra/newview/skins/default/xui/de/panel_edit_wearable.xml +++ b/indra/newview/skins/default/xui/de/panel_edit_wearable.xml @@ -45,6 +45,9 @@ Tätowierung bearbeiten + + Physik bearbeiten + Form: @@ -90,6 +93,9 @@ Tätowierung: + + Physik: + diff --git a/indra/newview/skins/default/xui/de/panel_preferences_chat.xml b/indra/newview/skins/default/xui/de/panel_preferences_chat.xml index 8c8cdd31fe..ca8af27f58 100644 --- a/indra/newview/skins/default/xui/de/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/de/panel_preferences_chat.xml @@ -30,7 +30,9 @@ - Bei Chat Maschinenübersetzung verwenden (Service von Google) + + Beim Chatten Maschinenübersetzung verwenden (von Google bereitgestellt) + Chat übersetzen in: diff --git a/indra/newview/skins/default/xui/de/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/de/panel_preferences_graphics1.xml index 63161c954e..78cb03a50a 100644 --- a/indra/newview/skins/default/xui/de/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/de/panel_preferences_graphics1.xml @@ -39,6 +39,10 @@ + + + Niedrig + m diff --git a/indra/newview/skins/default/xui/de/panel_preferences_sound.xml b/indra/newview/skins/default/xui/de/panel_preferences_sound.xml index 07631b6a91..c118e4e4dd 100644 --- a/indra/newview/skins/default/xui/de/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/de/panel_preferences_sound.xml @@ -5,7 +5,9 @@ - Stummschalten, wenn minimiert + + Stummschalten, wenn minimiert + diff --git a/indra/newview/skins/default/xui/de/strings.xml b/indra/newview/skins/default/xui/de/strings.xml index 0c621db6b0..f32eb21dd3 100644 --- a/indra/newview/skins/default/xui/de/strings.xml +++ b/indra/newview/skins/default/xui/de/strings.xml @@ -876,6 +876,9 @@ Tätowierung + + Physik + ungültig @@ -915,6 +918,9 @@ Tätowierung nicht getragen + + Physik nicht getragen + ungültig @@ -963,6 +969,9 @@ Neue Tätowierung erstellen + + Neue Physik erstellen + ungültig @@ -2247,6 +2256,114 @@ Falls diese Meldung weiterhin angezeigt wird, wenden Sie sich bitte an [SUPPORT_ Knollennase + + Brust – Masse + + + Brust – Glättung + + + Brust – Schwerkraft + + + Brust – Luftwiderstand + + + Max. Effekt + + + Federn + + + Verstärkung + + + Dämpfung + + + Max. Effekt + + + Federn + + + Verstärkung + + + Dämpfung + + + Max. Effekt + + + Federn + + + Verstärkung + + + Dämpfung + + + Bauch – Masse + + + Bauch – Glättung + + + Bauch – Schwerkraft + + + Bauch – Luftwiderstand + + + Max. Effekt + + + Federn + + + Verstärkung + + + Dämpfung + + + Po – Masse + + + Po – Glättung + + + Po – Schwerkraft + + + Po – Luftwiderstand + + + Max. Effekt + + + Federn + + + Verstärkung + + + Dämpfung + + + Max. Effekt + + + Federn + + + Verstärkung + + + Dämpfung + Buschige Augenbrauen @@ -2256,6 +2373,9 @@ Falls diese Meldung weiterhin angezeigt wird, wenden Sie sich bitte an [SUPPORT_ Hintern, Größe + + Po – Schwerkraft + Tournürenrock @@ -3764,6 +3884,9 @@ Missbrauchsbericht Neue Tätowierung + + Neue Physik + Ungültiges Objekt diff --git a/indra/newview/skins/default/xui/es/floater_beacons.xml b/indra/newview/skins/default/xui/es/floater_beacons.xml index b86967755c..49f990c84d 100644 --- a/indra/newview/skins/default/xui/es/floater_beacons.xml +++ b/indra/newview/skins/default/xui/es/floater_beacons.xml @@ -17,5 +17,6 @@ + diff --git a/indra/newview/skins/default/xui/es/menu_avatar_self.xml b/indra/newview/skins/default/xui/es/menu_avatar_self.xml index a2d86d78c1..268d6f70ab 100644 --- a/indra/newview/skins/default/xui/es/menu_avatar_self.xml +++ b/indra/newview/skins/default/xui/es/menu_avatar_self.xml @@ -14,6 +14,7 @@ + diff --git a/indra/newview/skins/default/xui/es/menu_bottomtray.xml b/indra/newview/skins/default/xui/es/menu_bottomtray.xml index a16da5ae9e..40058a1749 100644 --- a/indra/newview/skins/default/xui/es/menu_bottomtray.xml +++ b/indra/newview/skins/default/xui/es/menu_bottomtray.xml @@ -1,6 +1,6 @@ - + diff --git a/indra/newview/skins/default/xui/es/menu_inventory.xml b/indra/newview/skins/default/xui/es/menu_inventory.xml index 94ee162bbc..e873d31580 100644 --- a/indra/newview/skins/default/xui/es/menu_inventory.xml +++ b/indra/newview/skins/default/xui/es/menu_inventory.xml @@ -25,6 +25,7 @@ + diff --git a/indra/newview/skins/default/xui/es/menu_inventory_add.xml b/indra/newview/skins/default/xui/es/menu_inventory_add.xml index ba106e8335..615a1a09b7 100644 --- a/indra/newview/skins/default/xui/es/menu_inventory_add.xml +++ b/indra/newview/skins/default/xui/es/menu_inventory_add.xml @@ -23,6 +23,7 @@ + diff --git a/indra/newview/skins/default/xui/es/menu_outfit_gear.xml b/indra/newview/skins/default/xui/es/menu_outfit_gear.xml index 3b11bceecf..558ff6afd3 100644 --- a/indra/newview/skins/default/xui/es/menu_outfit_gear.xml +++ b/indra/newview/skins/default/xui/es/menu_outfit_gear.xml @@ -1,5 +1,5 @@ - + @@ -14,6 +14,7 @@ + @@ -24,4 +25,4 @@ - + diff --git a/indra/newview/skins/default/xui/es/menu_viewer.xml b/indra/newview/skins/default/xui/es/menu_viewer.xml index c48203f95c..138bbd9412 100644 --- a/indra/newview/skins/default/xui/es/menu_viewer.xml +++ b/indra/newview/skins/default/xui/es/menu_viewer.xml @@ -336,4 +336,9 @@ + + + + + diff --git a/indra/newview/skins/default/xui/es/notifications.xml b/indra/newview/skins/default/xui/es/notifications.xml index 1379f710c3..91a03023a1 100644 --- a/indra/newview/skins/default/xui/es/notifications.xml +++ b/indra/newview/skins/default/xui/es/notifications.xml @@ -2841,6 +2841,13 @@ Si lo haces, todos los residentes que se unan posteriormente a la llamada tambi Para levantarte y salir de la posición de sentado, haz clic en el botón Levantarme. + + Pulsa en el botón: Hablar para conectar y desconectar el micrófono. + +Pulsa en el cursor arriba para ver el panel de control de voz. + +Al ocultar el botón Hablar se desactiva la función de voz. + La Guía de destinos contiene miles de nuevos lugares por descubrir. Selecciona una ubicación y elige Teleportarme para iniciar la exploración. @@ -2850,12 +2857,14 @@ Si lo haces, todos los residentes que se unan posteriormente a la llamada tambi Si deseas caminar o correr, abre el panel Mover y utiliza las flechas de dirección para navegar. También puedes utilizar las flechas de dirección del teclado. + + 1. Pulsa para caminar: Pulsa en cualquier punto del terreno para ir a él. + +2. Pulsa y arrastra para girar la vista: Pulsa y arrastra el cursor a cualquier parte del mundo para girar la vista. + Configura y personaliza aquí tu nombre mostrado. Esto se añadirá a tu nombre de usuario personal, que no puedes modificar. Puedes cambiar la manera en que ves los nombres de otras personas en tus preferencias. - - Para caminar, utiliza las flechas de dirección del teclado. Para correr, pulsa dos veces la flecha hacia arriba. - Para cambiar la vista de la cámara, utiliza los controles Orbital y Panorámica. Para restablecer tu vista, pulsa Esc o camina. diff --git a/indra/newview/skins/default/xui/es/panel_edit_wearable.xml b/indra/newview/skins/default/xui/es/panel_edit_wearable.xml index 15c683f375..799512968d 100644 --- a/indra/newview/skins/default/xui/es/panel_edit_wearable.xml +++ b/indra/newview/skins/default/xui/es/panel_edit_wearable.xml @@ -45,6 +45,9 @@ Modificando los tatuajes + + Modificar la física + Anatomía: @@ -90,6 +93,9 @@ Tatuaje: + + Física: + diff --git a/indra/newview/skins/default/xui/es/panel_preferences_chat.xml b/indra/newview/skins/default/xui/es/panel_preferences_chat.xml index aba85f9ff1..f7bc1f6aad 100644 --- a/indra/newview/skins/default/xui/es/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/es/panel_preferences_chat.xml @@ -30,7 +30,9 @@ - Usar la traducción automática (con Google) en el chat + + Utiliza la herramienta de traducción automática mientras utilizas el chat (mediante Google) + Traducir el chat al: diff --git a/indra/newview/skins/default/xui/es/panel_preferences_colors.xml b/indra/newview/skins/default/xui/es/panel_preferences_colors.xml index edd417d564..a7fb2d9af8 100644 --- a/indra/newview/skins/default/xui/es/panel_preferences_colors.xml +++ b/indra/newview/skins/default/xui/es/panel_preferences_colors.xml @@ -26,13 +26,13 @@ Propietario - URL + URLs - Color de fondo de la etiqueta del nombre (afectará también a los bocadillos del chat): + Color de fondo de las etiquetas de nombre (también se aplica a los bocadillos del chat): - - + + Opacidad de la ventana: diff --git a/indra/newview/skins/default/xui/es/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/es/panel_preferences_graphics1.xml index c569db3376..1ae5d63ace 100644 --- a/indra/newview/skins/default/xui/es/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/es/panel_preferences_graphics1.xml @@ -39,6 +39,10 @@ + + + Bajo + m diff --git a/indra/newview/skins/default/xui/es/panel_preferences_sound.xml b/indra/newview/skins/default/xui/es/panel_preferences_sound.xml index 2bc82307a8..8ce8e23138 100644 --- a/indra/newview/skins/default/xui/es/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/es/panel_preferences_sound.xml @@ -5,7 +5,9 @@ - Silenciar cuando minimice + + Silenciar cuando minimice + diff --git a/indra/newview/skins/default/xui/es/strings.xml b/indra/newview/skins/default/xui/es/strings.xml index cd1fb767c8..75126e74c5 100644 --- a/indra/newview/skins/default/xui/es/strings.xml +++ b/indra/newview/skins/default/xui/es/strings.xml @@ -855,6 +855,9 @@ Tatuaje + + Física + inválido/a @@ -894,6 +897,9 @@ Tatuaje no puesto + + Física no puesta + no válido/a @@ -942,6 +948,9 @@ Crear un tatuaje nuevo + + Crear nueva física + no válido/a @@ -2178,6 +2187,114 @@ Si sigues recibiendo este mensaje, contacta con [SUPPORT_SITE]. Nariz de porra + + Masa del busto + + + Suavizado del busto + + + Gravedad del busto + + + Aerodinámica del busto + + + Efecto máx. + + + Elasticidad + + + Ganancia + + + Amortiguación + + + Efecto máx. + + + Elasticidad + + + Ganancia + + + Amortiguación + + + Efecto máx. + + + Elasticidad + + + Ganancia + + + Amortiguación + + + Masa de la barriga + + + Suavizado de la barriga + + + Gravedad de la barriga + + + Aerodinámica de la barriga + + + Efecto máx. + + + Elasticidad + + + Ganancia + + + Amortiguación + + + Masa del culo + + + Suavizado del culo + + + Gravedad del culo + + + Aerodinámica del culo + + + Efecto máx. + + + Elasticidad + + + Ganancia + + + Amortiguación + + + Efecto máx. + + + Elasticidad + + + Ganancia + + + Amortiguación + Cejijuntas @@ -2187,6 +2304,9 @@ Si sigues recibiendo este mensaje, contacta con [SUPPORT_SITE]. Culo: tamaño + + Gravedad del culo + Polisón @@ -3662,6 +3782,9 @@ Denuncia de infracción Tatuaje nuevo + + Nueva física + No se puede poner diff --git a/indra/newview/skins/default/xui/fr/floater_beacons.xml b/indra/newview/skins/default/xui/fr/floater_beacons.xml index d61115a2db..ebd4dab683 100644 --- a/indra/newview/skins/default/xui/fr/floater_beacons.xml +++ b/indra/newview/skins/default/xui/fr/floater_beacons.xml @@ -17,5 +17,6 @@ + diff --git a/indra/newview/skins/default/xui/fr/menu_avatar_self.xml b/indra/newview/skins/default/xui/fr/menu_avatar_self.xml index 21528cd43b..6310a2177a 100644 --- a/indra/newview/skins/default/xui/fr/menu_avatar_self.xml +++ b/indra/newview/skins/default/xui/fr/menu_avatar_self.xml @@ -14,6 +14,7 @@ + diff --git a/indra/newview/skins/default/xui/fr/menu_bottomtray.xml b/indra/newview/skins/default/xui/fr/menu_bottomtray.xml index ddaea517fc..d0d245b286 100644 --- a/indra/newview/skins/default/xui/fr/menu_bottomtray.xml +++ b/indra/newview/skins/default/xui/fr/menu_bottomtray.xml @@ -1,6 +1,6 @@ - + diff --git a/indra/newview/skins/default/xui/fr/menu_inventory.xml b/indra/newview/skins/default/xui/fr/menu_inventory.xml index a2279cf0ac..fa0e264d14 100644 --- a/indra/newview/skins/default/xui/fr/menu_inventory.xml +++ b/indra/newview/skins/default/xui/fr/menu_inventory.xml @@ -25,6 +25,7 @@ + diff --git a/indra/newview/skins/default/xui/fr/menu_inventory_add.xml b/indra/newview/skins/default/xui/fr/menu_inventory_add.xml index fe096b4a7e..5d2b554dc3 100644 --- a/indra/newview/skins/default/xui/fr/menu_inventory_add.xml +++ b/indra/newview/skins/default/xui/fr/menu_inventory_add.xml @@ -23,6 +23,7 @@ + diff --git a/indra/newview/skins/default/xui/fr/menu_outfit_gear.xml b/indra/newview/skins/default/xui/fr/menu_outfit_gear.xml index 5db7f176b5..b5181f4f82 100644 --- a/indra/newview/skins/default/xui/fr/menu_outfit_gear.xml +++ b/indra/newview/skins/default/xui/fr/menu_outfit_gear.xml @@ -1,5 +1,5 @@ - + @@ -14,6 +14,7 @@ + @@ -24,4 +25,4 @@ - + diff --git a/indra/newview/skins/default/xui/fr/menu_viewer.xml b/indra/newview/skins/default/xui/fr/menu_viewer.xml index ee1ab8c601..1dd6da9d6f 100644 --- a/indra/newview/skins/default/xui/fr/menu_viewer.xml +++ b/indra/newview/skins/default/xui/fr/menu_viewer.xml @@ -412,6 +412,7 @@ + diff --git a/indra/newview/skins/default/xui/fr/notifications.xml b/indra/newview/skins/default/xui/fr/notifications.xml index e984ea66ed..78890caabb 100644 --- a/indra/newview/skins/default/xui/fr/notifications.xml +++ b/indra/newview/skins/default/xui/fr/notifications.xml @@ -2838,6 +2838,13 @@ Ignorer les autres ? Pour passer d'une position assise à une position debout, cliquez sur le bouton Me lever. + + Cliquez sur le bouton Parler pour activer/désactiver le micro. + +Cliquez sur la flèche vers le haut pour afficher le panneau de contrôle de la voix. + +Si vous masquez le bouton Parler, la fonction Voix sera désactivée. + Le Guide des destinations comprend des milliers d'endroits nouveaux à découvrir. Sélectionnez-en un, puis cliquez sur Téléporter pour commencer à l'explorer. @@ -2847,12 +2854,16 @@ Ignorer les autres ? Pour marcher ou courir, cliquez sur le bouton Bouger, puis naviguez à l'aide des flèches directionnelles. Vous pouvez également utiliser les touches fléchées de votre clavier. + + 1. Cliquer pour marcher +Cliquez n'importe où sur le sol pour vous diriger vers ce point en marchant. + +2. Cliquer et faire glisser pour faire pivoter la vue +Cliquez sur un point dans le monde et faites glisser votre souris pour faire tourner la caméra. + Définissez ici votre nom d'affichage personnalisable. Cette fonctionnalité vous est fournie en plus de votre nom d'utilisateur unique qui, lui, ne peut être changé. Vous pouvez modifier l'apparence des noms des autres résidents dans vos préférences. - - Pour marcher, utilisez les touches fléchées de votre clavier. Pour courir, appuyez deux fois sur la flèche vers le haut. - Pour changer d'angle de vision, utilisez les contrôles Faire tourner et Faire un panoramique. Pour réinitialiser la vue, appuyez sur Échap ou marchez. diff --git a/indra/newview/skins/default/xui/fr/panel_edit_wearable.xml b/indra/newview/skins/default/xui/fr/panel_edit_wearable.xml index d7a3d3bd85..def158cf68 100644 --- a/indra/newview/skins/default/xui/fr/panel_edit_wearable.xml +++ b/indra/newview/skins/default/xui/fr/panel_edit_wearable.xml @@ -45,6 +45,9 @@ Modification du tatouage + + Modification des propriétés physiques + Silhouette : @@ -90,6 +93,9 @@ Tatouage : + + Propriétés physiques : + diff --git a/indra/newview/skins/default/xui/fr/panel_preferences_chat.xml b/indra/newview/skins/default/xui/fr/panel_preferences_chat.xml index d5cecfc698..e9e6e6350f 100644 --- a/indra/newview/skins/default/xui/fr/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/fr/panel_preferences_chat.xml @@ -30,7 +30,9 @@ - Utiliser la traduction automatique lors des chats (fournie par Google) + + Utiliser la traduction automatique lors des chats (fournie par Google) + Traduire le chat en : diff --git a/indra/newview/skins/default/xui/fr/panel_preferences_colors.xml b/indra/newview/skins/default/xui/fr/panel_preferences_colors.xml index 4e7d75e1b9..abdffd232a 100644 --- a/indra/newview/skins/default/xui/fr/panel_preferences_colors.xml +++ b/indra/newview/skins/default/xui/fr/panel_preferences_colors.xml @@ -1,11 +1,11 @@ - Mes effets (faisceau de sélection lumineux) : + Mes effets (faisceau de sélection) : - Couleurs de la police du chat : + Couleurs pour le chat : Moi diff --git a/indra/newview/skins/default/xui/fr/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/fr/panel_preferences_graphics1.xml index c90edd443e..025a72a1d2 100644 --- a/indra/newview/skins/default/xui/fr/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/fr/panel_preferences_graphics1.xml @@ -39,6 +39,10 @@ + + + Faible + m @@ -77,7 +81,7 @@ Faible - Rendu de l'avatar : + Rendu de l'avatar : diff --git a/indra/newview/skins/default/xui/fr/panel_preferences_sound.xml b/indra/newview/skins/default/xui/fr/panel_preferences_sound.xml index ac7f72d367..a404aae483 100644 --- a/indra/newview/skins/default/xui/fr/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/fr/panel_preferences_sound.xml @@ -5,7 +5,9 @@ - Couper quand minimisé + + Couper lorsque minimisé + diff --git a/indra/newview/skins/default/xui/fr/strings.xml b/indra/newview/skins/default/xui/fr/strings.xml index a7c71dc0f0..a3369e6730 100644 --- a/indra/newview/skins/default/xui/fr/strings.xml +++ b/indra/newview/skins/default/xui/fr/strings.xml @@ -876,6 +876,9 @@ Tatouage + + Propriétés physiques + non valide @@ -915,6 +918,9 @@ Tatouage non porté + + Propriétés physiques non portées + non valide @@ -963,6 +969,9 @@ Créer un nouveau tatouage + + Créer de nouvelles propriétés physiques + non valide @@ -2247,6 +2256,114 @@ Si ce message persiste, veuillez aller sur la page [SUPPORT_SITE]. Nez en bulbe + + Masse des seins + + + Lissage des seins + + + Gravité des seins + + + Résistance de l'air sur les seins + + + Effet max. + + + Vibration + + + Amplification + + + Amortissement + + + Effet max. + + + Vibration + + + Amplification + + + Amortissement + + + Effet max. + + + Vibration + + + Amplification + + + Amortissement + + + Masse du ventre + + + Lissage du ventre + + + Gravité du ventre + + + Résistance de l'air sur le ventre + + + Effet max. + + + Vibration + + + Amplification + + + Amortissement + + + Masse des fesses + + + Lissage des fesses + + + Gravité des fesses + + + Résistance de l'air sur les fesses + + + Effet max. + + + Vibration + + + Amplification + + + Amortissement + + + Effet max. + + + Vibration + + + Amplification + + + Amortissement + Sourcils touffus @@ -2256,6 +2373,9 @@ Si ce message persiste, veuillez aller sur la page [SUPPORT_SITE]. Taille des fesses + + Gravité des fesses + Jupe gonflante @@ -3764,6 +3884,9 @@ de l'infraction signalée Nouveau tatouage + + Nouvelles propriétés physiques + Objet à porter non valide diff --git a/indra/newview/skins/default/xui/pl/floater_about_land.xml b/indra/newview/skins/default/xui/pl/floater_about_land.xml index b935615fcb..badff11a59 100644 --- a/indra/newview/skins/default/xui/pl/floater_about_land.xml +++ b/indra/newview/skins/default/xui/pl/floater_about_land.xml @@ -349,6 +349,7 @@ Jedynie większe posiadłości mogą być umieszczone w bazie wyszukiwarki. + @@ -363,6 +364,7 @@ Jedynie większe posiadłości mogą być umieszczone w bazie wyszukiwarki. + @@ -430,7 +432,7 @@ Mediów: (Zdefiniowane przez Majątek) - Udostępnij publicznie ([MATURITY]) + Udostępniaj publicznie ([MATURITY]) (Pamiętaj: w przypadku braku zaznaczenia tej opcji widoczne będą linie bana.) Jedna lub więcej z tych opcji ustawiona jest z poziomu Posiadłości diff --git a/indra/newview/skins/default/xui/pl/floater_map.xml b/indra/newview/skins/default/xui/pl/floater_map.xml index fd151e91ad..e01c4c8a82 100644 --- a/indra/newview/skins/default/xui/pl/floater_map.xml +++ b/indra/newview/skins/default/xui/pl/floater_map.xml @@ -3,6 +3,9 @@ [REGION](Podwójne kliknięcie otwiera Mapę, Shift i przeciągnięcie kursorem zmienia skalę) + + [REGION](Podwójne kliknięcie aktywuje teleportację, wciśnij Shift i przeciągnij aby przesunąć) + MINIMAPA diff --git a/indra/newview/skins/default/xui/pl/floater_tools.xml b/indra/newview/skins/default/xui/pl/floater_tools.xml index 337998efc9..9e6fed8387 100644 --- a/indra/newview/skins/default/xui/pl/floater_tools.xml +++ b/indra/newview/skins/default/xui/pl/floater_tools.xml @@ -64,6 +64,8 @@ + + + + + + diff --git a/indra/newview/skins/default/xui/pt/notifications.xml b/indra/newview/skins/default/xui/pt/notifications.xml index 31e29fb6c1..4adfe8e37f 100644 --- a/indra/newview/skins/default/xui/pt/notifications.xml +++ b/indra/newview/skins/default/xui/pt/notifications.xml @@ -2822,6 +2822,13 @@ Silenciar todos? Para se levantar quando estiver sentado, clique em Levantar-se + + Clique no botão Falar para ligar ou desligar o microfone. + +Clique na seta para cima para ver o painel de controles de voz. + +Se o botão Falar for ocultado, o recurso de voz será desabilitado. + O Guia de Destinos traz milhares de lugares novos para você explorar e conhecer. Selecione um lugar, clique em Teletransportar e comece suas descobertas. @@ -2831,12 +2838,14 @@ Silenciar todos? Para andar ou correr, clique no botão Movimentar e use as setas para controlar a direção. Ou use as setas do teclado. + + 1. Clique para andar Clique em qualquer lugar no solo para andar até o local. + +2. Clique e arraste para girar a exibição Clique e arraste em qualquer lugar no mundo para girar a exibição + Defina seu nome de tela personalizável. O nome de tele é separado do seu nome de usuário, que não pode ser modificado. Você pode mudar a visualização dos nomes de outras pessoas nas suas preferências. - - Para andar, use as setas do teclado. Para correr, pressione a seta para cima duas vezes. - Para mudar o ângulo de visualização, use os controles Órbita e Pan. Volte à visualização normal pressionando a tecla Escape ou começando a andar. diff --git a/indra/newview/skins/default/xui/pt/panel_edit_wearable.xml b/indra/newview/skins/default/xui/pt/panel_edit_wearable.xml index 679bb524b4..2e3e3d6305 100644 --- a/indra/newview/skins/default/xui/pt/panel_edit_wearable.xml +++ b/indra/newview/skins/default/xui/pt/panel_edit_wearable.xml @@ -45,6 +45,9 @@ Editando tatuagem + + Editando o físico + Forma: @@ -90,6 +93,9 @@ Tatuagem: + + Físico: + diff --git a/indra/newview/skins/default/xui/pt/panel_preferences_chat.xml b/indra/newview/skins/default/xui/pt/panel_preferences_chat.xml index 412bdbb13e..e5aa42aae0 100644 --- a/indra/newview/skins/default/xui/pt/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/pt/panel_preferences_chat.xml @@ -30,7 +30,9 @@ - Traduzir bate-papo automaticamente (via Google) + + Traduzir bate-papo automaticamente (via Google) + Traduzir bate-papo para: diff --git a/indra/newview/skins/default/xui/pt/panel_preferences_colors.xml b/indra/newview/skins/default/xui/pt/panel_preferences_colors.xml index 5f2f341e3f..46d9517a98 100644 --- a/indra/newview/skins/default/xui/pt/panel_preferences_colors.xml +++ b/indra/newview/skins/default/xui/pt/panel_preferences_colors.xml @@ -14,7 +14,7 @@ Outros - Objetos + Objects Sistema diff --git a/indra/newview/skins/default/xui/pt/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/pt/panel_preferences_graphics1.xml index c2efbf0300..4b03c79a9e 100644 --- a/indra/newview/skins/default/xui/pt/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/pt/panel_preferences_graphics1.xml @@ -40,6 +40,10 @@ rápido + + + Baixo + m @@ -78,7 +82,7 @@ rápido Baixo - Renderização de Avatar: + Renderização do avatar: diff --git a/indra/newview/skins/default/xui/pt/panel_preferences_sound.xml b/indra/newview/skins/default/xui/pt/panel_preferences_sound.xml index 6053deb5b1..4164147e5c 100644 --- a/indra/newview/skins/default/xui/pt/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/pt/panel_preferences_sound.xml @@ -5,7 +5,9 @@ - Silenciar ao minimizar + + Silenciar ao minimizar + diff --git a/indra/newview/skins/default/xui/pt/strings.xml b/indra/newview/skins/default/xui/pt/strings.xml index 47813604ff..6466f42c75 100644 --- a/indra/newview/skins/default/xui/pt/strings.xml +++ b/indra/newview/skins/default/xui/pt/strings.xml @@ -855,6 +855,9 @@ Tatuagem + + Físico + Inválido @@ -894,6 +897,9 @@ Tatuagem não usada + + Físico não usado + inválido @@ -942,6 +948,9 @@ Criar nova tatuagem + + Criar novo físico + inválido @@ -2177,6 +2186,114 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. Nariz em bulbo + + Seios - massa + + + Seios - suavização + + + Seios - gravidade + + + Seios - resistência do ar + + + Efeito máximo + + + Vibração + + + Ganho + + + Duração + + + Efeito máximo + + + Vibração + + + Ganho + + + Duração + + + Efeito máximo + + + Vibração + + + Ganho + + + Duração + + + Barriga - massa + + + Barriga - suavização + + + Barriga - gravidade + + + Barriga - resistência do ar + + + Efeito máximo + + + Vibração + + + Ganho + + + Duração + + + Nádegas - massa + + + Nádegas - suavização + + + Nádegas - gravidade + + + Nádegas - resistência do ar + + + Efeito máximo + + + Vibração + + + Ganho + + + Duração + + + Efeito máximo + + + Vibração + + + Ganho + + + Duração + Sobrancelhas grossas @@ -2186,6 +2303,9 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. Tamanho do traseiro + + Nádegas - gravidade + Saia armada @@ -3661,6 +3781,9 @@ Denunciar abuso Nova tatuagem + + Novo físico + Item inválido -- cgit v1.2.3 From 1645ae1f7d5be934f4850b3b395976db29cb938d Mon Sep 17 00:00:00 2001 From: Eli Linden Date: Thu, 28 Apr 2011 17:20:11 -0700 Subject: WIP INTL-41 set23 DE/FR/ES/PT translation, new files --- indra/newview/skins/default/xui/de/menu_media_ctrl.xml | 6 ++++++ indra/newview/skins/default/xui/de/panel_edit_physics.xml | 14 ++++++++++++++ .../skins/default/xui/de/panel_scrolling_param_base.xml | 4 ++++ indra/newview/skins/default/xui/es/menu_media_ctrl.xml | 6 ++++++ indra/newview/skins/default/xui/es/panel_edit_physics.xml | 14 ++++++++++++++ .../skins/default/xui/es/panel_scrolling_param_base.xml | 4 ++++ indra/newview/skins/default/xui/fr/menu_media_ctrl.xml | 6 ++++++ indra/newview/skins/default/xui/fr/panel_edit_physics.xml | 14 ++++++++++++++ .../skins/default/xui/fr/panel_scrolling_param_base.xml | 4 ++++ indra/newview/skins/default/xui/pt/menu_media_ctrl.xml | 6 ++++++ indra/newview/skins/default/xui/pt/panel_edit_physics.xml | 14 ++++++++++++++ .../skins/default/xui/pt/panel_scrolling_param_base.xml | 4 ++++ 12 files changed, 96 insertions(+) create mode 100644 indra/newview/skins/default/xui/de/menu_media_ctrl.xml create mode 100644 indra/newview/skins/default/xui/de/panel_edit_physics.xml create mode 100644 indra/newview/skins/default/xui/de/panel_scrolling_param_base.xml create mode 100644 indra/newview/skins/default/xui/es/menu_media_ctrl.xml create mode 100644 indra/newview/skins/default/xui/es/panel_edit_physics.xml create mode 100644 indra/newview/skins/default/xui/es/panel_scrolling_param_base.xml create mode 100644 indra/newview/skins/default/xui/fr/menu_media_ctrl.xml create mode 100644 indra/newview/skins/default/xui/fr/panel_edit_physics.xml create mode 100644 indra/newview/skins/default/xui/fr/panel_scrolling_param_base.xml create mode 100644 indra/newview/skins/default/xui/pt/menu_media_ctrl.xml create mode 100644 indra/newview/skins/default/xui/pt/panel_edit_physics.xml create mode 100644 indra/newview/skins/default/xui/pt/panel_scrolling_param_base.xml diff --git a/indra/newview/skins/default/xui/de/menu_media_ctrl.xml b/indra/newview/skins/default/xui/de/menu_media_ctrl.xml new file mode 100644 index 0000000000..781796670a --- /dev/null +++ b/indra/newview/skins/default/xui/de/menu_media_ctrl.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/indra/newview/skins/default/xui/de/panel_edit_physics.xml b/indra/newview/skins/default/xui/de/panel_edit_physics.xml new file mode 100644 index 0000000000..bd9c84577a --- /dev/null +++ b/indra/newview/skins/default/xui/de/panel_edit_physics.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/indra/newview/skins/default/xui/de/panel_scrolling_param_base.xml b/indra/newview/skins/default/xui/de/panel_scrolling_param_base.xml new file mode 100644 index 0000000000..990193574e --- /dev/null +++ b/indra/newview/skins/default/xui/de/panel_scrolling_param_base.xml @@ -0,0 +1,4 @@ + + + + diff --git a/indra/newview/skins/default/xui/es/menu_media_ctrl.xml b/indra/newview/skins/default/xui/es/menu_media_ctrl.xml new file mode 100644 index 0000000000..8ea9286d8e --- /dev/null +++ b/indra/newview/skins/default/xui/es/menu_media_ctrl.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/indra/newview/skins/default/xui/es/panel_edit_physics.xml b/indra/newview/skins/default/xui/es/panel_edit_physics.xml new file mode 100644 index 0000000000..dfb5ab330a --- /dev/null +++ b/indra/newview/skins/default/xui/es/panel_edit_physics.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/indra/newview/skins/default/xui/es/panel_scrolling_param_base.xml b/indra/newview/skins/default/xui/es/panel_scrolling_param_base.xml new file mode 100644 index 0000000000..fa659040ea --- /dev/null +++ b/indra/newview/skins/default/xui/es/panel_scrolling_param_base.xml @@ -0,0 +1,4 @@ + + + + diff --git a/indra/newview/skins/default/xui/fr/menu_media_ctrl.xml b/indra/newview/skins/default/xui/fr/menu_media_ctrl.xml new file mode 100644 index 0000000000..787a5b3af2 --- /dev/null +++ b/indra/newview/skins/default/xui/fr/menu_media_ctrl.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/indra/newview/skins/default/xui/fr/panel_edit_physics.xml b/indra/newview/skins/default/xui/fr/panel_edit_physics.xml new file mode 100644 index 0000000000..d79f7df90a --- /dev/null +++ b/indra/newview/skins/default/xui/fr/panel_edit_physics.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/indra/newview/skins/default/xui/fr/panel_scrolling_param_base.xml b/indra/newview/skins/default/xui/fr/panel_scrolling_param_base.xml new file mode 100644 index 0000000000..fa659040ea --- /dev/null +++ b/indra/newview/skins/default/xui/fr/panel_scrolling_param_base.xml @@ -0,0 +1,4 @@ + + + + diff --git a/indra/newview/skins/default/xui/pt/menu_media_ctrl.xml b/indra/newview/skins/default/xui/pt/menu_media_ctrl.xml new file mode 100644 index 0000000000..44117c8865 --- /dev/null +++ b/indra/newview/skins/default/xui/pt/menu_media_ctrl.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/indra/newview/skins/default/xui/pt/panel_edit_physics.xml b/indra/newview/skins/default/xui/pt/panel_edit_physics.xml new file mode 100644 index 0000000000..967aab8bc3 --- /dev/null +++ b/indra/newview/skins/default/xui/pt/panel_edit_physics.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/indra/newview/skins/default/xui/pt/panel_scrolling_param_base.xml b/indra/newview/skins/default/xui/pt/panel_scrolling_param_base.xml new file mode 100644 index 0000000000..0a5a2e2572 --- /dev/null +++ b/indra/newview/skins/default/xui/pt/panel_scrolling_param_base.xml @@ -0,0 +1,4 @@ + + + + -- cgit v1.2.3 From 9baeb70ddda7b28b1ebeec8793710a51296565e0 Mon Sep 17 00:00:00 2001 From: Eli Linden Date: Thu, 28 Apr 2011 18:01:54 -0700 Subject: WIP CT-636 CT-637 PL translation for Light Viewer set1 and set2, adding new files --- .../skins/minimal/xui/pl/floater_camera.xml | 65 + .../skins/minimal/xui/pl/floater_help_browser.xml | 9 + .../skins/minimal/xui/pl/floater_media_browser.xml | 30 + .../skins/minimal/xui/pl/floater_nearby_chat.xml | 4 + .../skins/minimal/xui/pl/floater_web_content.xml | 14 + .../skins/minimal/xui/pl/inspect_avatar.xml | 24 + .../skins/minimal/xui/pl/inspect_object.xml | 41 + .../minimal/xui/pl/menu_add_wearable_gear.xml | 6 + .../skins/minimal/xui/pl/menu_attachment_other.xml | 17 + .../skins/minimal/xui/pl/menu_attachment_self.xml | 16 + .../skins/minimal/xui/pl/menu_avatar_icon.xml | 7 + .../skins/minimal/xui/pl/menu_avatar_other.xml | 16 + .../skins/minimal/xui/pl/menu_avatar_self.xml | 31 + .../skins/minimal/xui/pl/menu_bottomtray.xml | 17 + .../skins/minimal/xui/pl/menu_cof_attachment.xml | 4 + .../skins/minimal/xui/pl/menu_cof_body_part.xml | 5 + .../skins/minimal/xui/pl/menu_cof_clothing.xml | 6 + .../newview/skins/minimal/xui/pl/menu_cof_gear.xml | 5 + indra/newview/skins/minimal/xui/pl/menu_edit.xml | 12 + .../skins/minimal/xui/pl/menu_favorites.xml | 10 + .../skins/minimal/xui/pl/menu_gesture_gear.xml | 10 + .../skins/minimal/xui/pl/menu_group_plus.xml | 5 + .../skins/minimal/xui/pl/menu_hide_navbar.xml | 6 + .../skins/minimal/xui/pl/menu_im_well_button.xml | 4 + .../skins/minimal/xui/pl/menu_imchiclet_adhoc.xml | 4 + .../skins/minimal/xui/pl/menu_imchiclet_group.xml | 6 + .../skins/minimal/xui/pl/menu_imchiclet_p2p.xml | 7 + .../minimal/xui/pl/menu_inspect_avatar_gear.xml | 21 + .../minimal/xui/pl/menu_inspect_object_gear.xml | 18 + .../minimal/xui/pl/menu_inspect_self_gear.xml | 31 + .../minimal/xui/pl/menu_inv_offer_chiclet.xml | 4 + .../skins/minimal/xui/pl/menu_inventory.xml | 84 + .../skins/minimal/xui/pl/menu_inventory_add.xml | 33 + .../minimal/xui/pl/menu_inventory_gear_default.xml | 17 + indra/newview/skins/minimal/xui/pl/menu_land.xml | 9 + .../newview/skins/minimal/xui/pl/menu_landmark.xml | 7 + indra/newview/skins/minimal/xui/pl/menu_login.xml | 24 + .../newview/skins/minimal/xui/pl/menu_mini_map.xml | 11 + indra/newview/skins/minimal/xui/pl/menu_navbar.xml | 11 + .../skins/minimal/xui/pl/menu_nearby_chat.xml | 9 + .../xui/pl/menu_notification_well_button.xml | 4 + indra/newview/skins/minimal/xui/pl/menu_object.xml | 29 + .../skins/minimal/xui/pl/menu_object_icon.xml | 5 + .../skins/minimal/xui/pl/menu_outfit_gear.xml | 27 + .../skins/minimal/xui/pl/menu_outfit_tab.xml | 9 + .../skins/minimal/xui/pl/menu_participant_list.xml | 21 + .../xui/pl/menu_people_friends_view_sort.xml | 8 + .../skins/minimal/xui/pl/menu_people_groups.xml | 8 + .../xui/pl/menu_people_groups_view_sort.xml | 5 + .../skins/minimal/xui/pl/menu_people_nearby.xml | 13 + .../xui/pl/menu_people_nearby_multiselect.xml | 10 + .../xui/pl/menu_people_nearby_view_sort.xml | 8 + .../xui/pl/menu_people_recent_view_sort.xml | 7 + indra/newview/skins/minimal/xui/pl/menu_picks.xml | 8 + .../skins/minimal/xui/pl/menu_picks_plus.xml | 5 + indra/newview/skins/minimal/xui/pl/menu_place.xml | 7 + .../skins/minimal/xui/pl/menu_place_add_button.xml | 5 + .../minimal/xui/pl/menu_places_gear_folder.xml | 16 + .../minimal/xui/pl/menu_places_gear_landmark.xml | 19 + .../skins/minimal/xui/pl/menu_profile_overflow.xml | 12 + .../skins/minimal/xui/pl/menu_save_outfit.xml | 5 + .../skins/minimal/xui/pl/menu_script_chiclet.xml | 4 + indra/newview/skins/minimal/xui/pl/menu_slurl.xml | 6 + .../minimal/xui/pl/menu_teleport_history_gear.xml | 6 + .../minimal/xui/pl/menu_teleport_history_item.xml | 6 + .../minimal/xui/pl/menu_teleport_history_tab.xml | 5 + .../skins/minimal/xui/pl/menu_text_editor.xml | 8 + .../skins/minimal/xui/pl/menu_topinfobar.xml | 7 + .../skins/minimal/xui/pl/menu_url_agent.xml | 6 + .../skins/minimal/xui/pl/menu_url_group.xml | 6 + .../newview/skins/minimal/xui/pl/menu_url_http.xml | 7 + .../skins/minimal/xui/pl/menu_url_inventory.xml | 6 + .../newview/skins/minimal/xui/pl/menu_url_map.xml | 6 + .../skins/minimal/xui/pl/menu_url_objectim.xml | 8 + .../skins/minimal/xui/pl/menu_url_parcel.xml | 6 + .../skins/minimal/xui/pl/menu_url_slapp.xml | 5 + .../skins/minimal/xui/pl/menu_url_slurl.xml | 7 + .../skins/minimal/xui/pl/menu_url_teleport.xml | 6 + indra/newview/skins/minimal/xui/pl/menu_viewer.xml | 14 + .../minimal/xui/pl/menu_wearable_list_item.xml | 14 + .../skins/minimal/xui/pl/menu_wearing_gear.xml | 5 + .../skins/minimal/xui/pl/menu_wearing_tab.xml | 6 + .../newview/skins/minimal/xui/pl/notifications.xml | 2907 ++++++++++++++++++++ .../minimal/xui/pl/panel_adhoc_control_panel.xml | 14 + .../skins/minimal/xui/pl/panel_bottomtray.xml | 39 + .../minimal/xui/pl/panel_group_control_panel.xml | 17 + .../minimal/xui/pl/panel_im_control_panel.xml | 29 + indra/newview/skins/minimal/xui/pl/panel_login.xml | 45 + .../skins/minimal/xui/pl/panel_navigation_bar.xml | 18 + .../newview/skins/minimal/xui/pl/panel_people.xml | 94 + .../minimal/xui/pl/panel_side_tray_tab_caption.xml | 7 + .../skins/minimal/xui/pl/panel_status_bar.xml | 33 + 92 files changed, 4238 insertions(+) create mode 100644 indra/newview/skins/minimal/xui/pl/floater_camera.xml create mode 100644 indra/newview/skins/minimal/xui/pl/floater_help_browser.xml create mode 100644 indra/newview/skins/minimal/xui/pl/floater_media_browser.xml create mode 100644 indra/newview/skins/minimal/xui/pl/floater_nearby_chat.xml create mode 100644 indra/newview/skins/minimal/xui/pl/floater_web_content.xml create mode 100644 indra/newview/skins/minimal/xui/pl/inspect_avatar.xml create mode 100644 indra/newview/skins/minimal/xui/pl/inspect_object.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_add_wearable_gear.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_attachment_other.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_attachment_self.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_avatar_icon.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_avatar_other.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_avatar_self.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_bottomtray.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_cof_attachment.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_cof_body_part.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_cof_clothing.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_cof_gear.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_edit.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_favorites.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_gesture_gear.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_group_plus.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_hide_navbar.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_im_well_button.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_imchiclet_adhoc.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_imchiclet_group.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_imchiclet_p2p.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_inspect_avatar_gear.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_inspect_object_gear.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_inspect_self_gear.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_inv_offer_chiclet.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_inventory.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_inventory_add.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_inventory_gear_default.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_land.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_landmark.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_login.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_mini_map.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_navbar.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_nearby_chat.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_notification_well_button.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_object.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_object_icon.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_outfit_gear.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_outfit_tab.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_participant_list.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_people_friends_view_sort.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_people_groups.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_people_groups_view_sort.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_people_nearby.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_people_nearby_multiselect.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_people_nearby_view_sort.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_people_recent_view_sort.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_picks.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_picks_plus.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_place.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_place_add_button.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_places_gear_folder.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_places_gear_landmark.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_profile_overflow.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_save_outfit.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_script_chiclet.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_slurl.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_teleport_history_gear.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_teleport_history_item.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_teleport_history_tab.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_text_editor.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_topinfobar.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_url_agent.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_url_group.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_url_http.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_url_inventory.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_url_map.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_url_objectim.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_url_parcel.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_url_slapp.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_url_slurl.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_url_teleport.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_viewer.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_wearable_list_item.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_wearing_gear.xml create mode 100644 indra/newview/skins/minimal/xui/pl/menu_wearing_tab.xml create mode 100644 indra/newview/skins/minimal/xui/pl/notifications.xml create mode 100644 indra/newview/skins/minimal/xui/pl/panel_adhoc_control_panel.xml create mode 100644 indra/newview/skins/minimal/xui/pl/panel_bottomtray.xml create mode 100644 indra/newview/skins/minimal/xui/pl/panel_group_control_panel.xml create mode 100644 indra/newview/skins/minimal/xui/pl/panel_im_control_panel.xml create mode 100644 indra/newview/skins/minimal/xui/pl/panel_login.xml create mode 100644 indra/newview/skins/minimal/xui/pl/panel_navigation_bar.xml create mode 100644 indra/newview/skins/minimal/xui/pl/panel_people.xml create mode 100644 indra/newview/skins/minimal/xui/pl/panel_side_tray_tab_caption.xml create mode 100644 indra/newview/skins/minimal/xui/pl/panel_status_bar.xml diff --git a/indra/newview/skins/minimal/xui/pl/floater_camera.xml b/indra/newview/skins/minimal/xui/pl/floater_camera.xml new file mode 100644 index 0000000000..5b9dd47616 --- /dev/null +++ b/indra/newview/skins/minimal/xui/pl/floater_camera.xml @@ -0,0 +1,65 @@ + + + + Obracaj kamerę wokół obiektu + + + Najedź kamerą w kierunku obiektu + + + Poruszaj kamerą w dół/górę oraz w prawo/lewo + + + Ustawienia + + + W prawo lub w lewo + + + Ustaw widok + + + Zobacz obiekt + + + + + + Widok z przodu + + + + + Podgląd grupy + + + + + Widok z tyłu + + + + + + + Widok obiektu + + + + + Widok panoramiczny + + + + + + + + + + + + auto_resize="false" + follows="right" + height="28" + layout="topleft" + min_height="28" + min_width="37" + name="notification_well_panel" + top="0" + user_resize="false" + width="37"> + follows="right" + height="23" + layout="topleft" + left="0" + max_displayed_count="99" + name="notification_well" + top="5" + width="35"> + auto_resize="false" + user_resize="false" + min_width="4" + name="DUMMY2" + width="8" /> diff --git a/indra/newview/skins/minimal/xui/en/panel_adhoc_control_panel.xml b/indra/newview/skins/minimal/xui/en/panel_adhoc_control_panel.xml index 5730adab8a..39d1a90850 100644 --- a/indra/newview/skins/minimal/xui/en/panel_adhoc_control_panel.xml +++ b/indra/newview/skins/minimal/xui/en/panel_adhoc_control_panel.xml @@ -42,5 +42,40 @@ show_speaking_indicator="false" width="147" /> + + - - Default - - - Default system device - - - No device - - - - Input - - - - My volume: - - - - Please wait - - - - - - - - - Output - - - + top="314" + width="345" + left="18" + class="panel_voice_device_settings"/> diff --git a/indra/newview/skins/default/xui/en/panel_sound_devices.xml b/indra/newview/skins/default/xui/en/panel_sound_devices.xml new file mode 100644 index 0000000000..9812281323 --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_sound_devices.xml @@ -0,0 +1,163 @@ + + + Default + + + Default system device + + + No device + + + + Input + + + + My volume: + + + + Please wait + + + + + + + + + Output + + + diff --git a/indra/newview/skins/default/xui/en/widgets/chiclet_im_p2p.xml b/indra/newview/skins/default/xui/en/widgets/chiclet_im_p2p.xml index 99807d4717..d27c14f4e7 100644 --- a/indra/newview/skins/default/xui/en/widgets/chiclet_im_p2p.xml +++ b/indra/newview/skins/default/xui/en/widgets/chiclet_im_p2p.xml @@ -21,6 +21,7 @@ width="20" /> Date: Thu, 12 May 2011 18:17:35 -0700 Subject: WIP VWR-23688 adding es and pt missing translation; add 1 zh file for testing Traditional Chinese as a new language --- indra/newview/skins/default/xui/es/strings.xml | 3 ++ indra/newview/skins/default/xui/pt/strings.xml | 3 ++ indra/newview/skins/default/xui/zh/panel_login.xml | 41 ++++++++++++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 indra/newview/skins/default/xui/zh/panel_login.xml diff --git a/indra/newview/skins/default/xui/es/strings.xml b/indra/newview/skins/default/xui/es/strings.xml index 75126e74c5..5a913c4c9d 100644 --- a/indra/newview/skins/default/xui/es/strings.xml +++ b/indra/newview/skins/default/xui/es/strings.xml @@ -3588,6 +3588,9 @@ Si sigues recibiendo este mensaje, contacta con [SUPPORT_SITE]. Conferencia con [AGENT_NAME] + + Ofrecido el item del inventario + (La sesión de MI no existe) diff --git a/indra/newview/skins/default/xui/pt/strings.xml b/indra/newview/skins/default/xui/pt/strings.xml index 6466f42c75..1dbbcafb0e 100644 --- a/indra/newview/skins/default/xui/pt/strings.xml +++ b/indra/newview/skins/default/xui/pt/strings.xml @@ -3587,6 +3587,9 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. Conversa com [AGENT_NAME] + + Oferta de item de inventário + (Sessão de MI inexistente) diff --git a/indra/newview/skins/default/xui/zh/panel_login.xml b/indra/newview/skins/default/xui/zh/panel_login.xml new file mode 100644 index 0000000000..9d094ff731 --- /dev/null +++ b/indra/newview/skins/default/xui/zh/panel_login.xml @@ -0,0 +1,41 @@ + + + + + + 使用者名稱: + + + 密碼: + + +