diff --git a/indra/llcommon/aialert.cpp b/indra/llcommon/aialert.cpp index f3d4f5af3..587a206bc 100644 --- a/indra/llcommon/aialert.cpp +++ b/indra/llcommon/aialert.cpp @@ -35,6 +35,13 @@ namespace AIAlert { +Error::Error(Prefix const& prefix, modal_nt type, + Error const& alert) : mLines(alert.mLines), mModal(type) +{ + if (alert.mModal == modal) mModal = modal; + if (prefix) mLines.push_front(Line(prefix)); +} + Error::Error(Prefix const& prefix, modal_nt type, std::string const& xml_desc, AIArgs const& args) : mModal(type) { diff --git a/indra/llcommon/aialert.h b/indra/llcommon/aialert.h index 574426a9f..4d3704cfb 100644 --- a/indra/llcommon/aialert.h +++ b/indra/llcommon/aialert.h @@ -231,6 +231,9 @@ class LL_COMMON_API Error : public std::exception lines_type const& lines(void) const { return mLines; } bool is_modal(void) const { return mModal == modal; } + // Existing alert, just add a prefix and turn alert into modal if appropriate. + Error(Prefix const& prefix, modal_nt type, Error const& alert); + // A string with zero or more replacements. Error(Prefix const& prefix, modal_nt type, std::string const& xml_desc, AIArgs const& args = AIArgs()); @@ -269,28 +272,33 @@ class LL_COMMON_API ErrorCode : public Error // Accessor. int getCode(void) const { return mCode; } + // Just an Error with a code. + ErrorCode(Prefix const& prefix, modal_nt type, int code, + Error const& alert) : + Error(prefix, type, alert), mCode(code) { } + // A string with zero or more replacements. ErrorCode(Prefix const& prefix, modal_nt type, int code, std::string const& xml_desc, AIArgs const& args = AIArgs()) : - Error(prefix, modal, xml_desc, args) { } + Error(prefix, type, xml_desc, args), mCode(code) { } // Same as above bit prepending the message with the text of another alert. ErrorCode(Prefix const& prefix, modal_nt type, int code, Error const& alert, std::string const& xml_desc, AIArgs const& args = AIArgs()) : - Error(prefix, modal, alert, xml_desc, args) { } + Error(prefix, type, alert, xml_desc, args), mCode(code) { } // Same as above but appending the message with the text of another alert. // (no args) ErrorCode(Prefix const& prefix, modal_nt type, int code, std::string const& xml_desc, Error const& alert) : - Error(prefix, modal, xml_desc, alert) { } + Error(prefix, type, xml_desc, alert), mCode(code) { } // (with args) ErrorCode(Prefix const& prefix, modal_nt type, int code, std::string const& xml_desc, AIArgs const& args, Error const& alert) : - Error(prefix, modal, xml_desc, args, alert) { } + Error(prefix, type, xml_desc, args, alert), mCode(code) { } }; } // namespace AIAlert diff --git a/indra/llcommon/aifile.cpp b/indra/llcommon/aifile.cpp index c963f5109..cd2ade77a 100644 --- a/indra/llcommon/aifile.cpp +++ b/indra/llcommon/aifile.cpp @@ -61,8 +61,8 @@ AIFile::~AIFile() //static void AIFile::mkdir(std::string const& dirname, int perms) { - int rc = LLFile::mkdir(dirname, perms); - if (rc < 0 && rc != EEXIST) + int rc = LLFile::mkdir_nowarn(dirname, perms); + if (rc < 0 && errno != EEXIST) { THROW_ERROR("AIFile_mkdir_Failed_to_create_DIRNAME", AIArgs("[DIRNAME]", dirname)); } @@ -71,8 +71,8 @@ void AIFile::mkdir(std::string const& dirname, int perms) //static void AIFile::rmdir(std::string const& dirname) { - int rc = LLFile::rmdir(dirname); - if (rc < 0 && rc != ENOENT) + int rc = LLFile::rmdir_nowarn(dirname); + if (rc < 0 && errno != ENOENT) { THROW_ERROR("AIFile_rmdir_Failed_to_remove_DIRNAME", AIArgs("[DIRNAME]", dirname)); } @@ -101,7 +101,8 @@ void AIFile::close(LLFILE* file) //static void AIFile::remove(std::string const& filename) { - if (LLFile::remove(filename) < 0) + int rc = LLFile::remove_nowarn(filename); + if (rc < 0 && errno != ENOENT) { THROW_ERROR("AIFile_remove_Failed_to_remove_FILENAME", AIArgs("[FILENAME]", filename)); } @@ -110,7 +111,7 @@ void AIFile::remove(std::string const& filename) //static void AIFile::rename(std::string const& filename, std::string const& newname) { - if (LLFile::rename(filename, newname) < 0) + if (LLFile::rename_nowarn(filename, newname) < 0) { THROW_ERROR("AIFile_rename_Failed_to_rename_FILE_to_NEWFILE", AIArgs("[FILE]", filename)("[NEWFILE]", newname)); } diff --git a/indra/llcommon/llfile.cpp b/indra/llcommon/llfile.cpp index 4a34ffaf9..686a516b9 100644 --- a/indra/llcommon/llfile.cpp +++ b/indra/llcommon/llfile.cpp @@ -174,7 +174,7 @@ int warnif(const std::string& desc, const std::string& filename, int rc, int acc } // static -int LLFile::mkdir(const std::string& dirname, int perms) +int LLFile::mkdir_nowarn(const std::string& dirname, int perms) { #if LL_WINDOWS // permissions are ignored on Windows @@ -184,13 +184,19 @@ int LLFile::mkdir(const std::string& dirname, int perms) #else int rc = ::mkdir(dirname.c_str(), (mode_t)perms); #endif + return rc; +} + +int LLFile::mkdir(const std::string& dirname, int perms) +{ + int rc = LLFile::mkdir_nowarn(dirname, perms); // We often use mkdir() to ensure the existence of a directory that might // already exist. Don't spam the log if it does. return warnif("mkdir", dirname, rc, EEXIST); } // static -int LLFile::rmdir(const std::string& dirname) +int LLFile::rmdir_nowarn(const std::string& dirname) { #if LL_WINDOWS // permissions are ignored on Windows @@ -200,6 +206,12 @@ int LLFile::rmdir(const std::string& dirname) #else int rc = ::rmdir(dirname.c_str()); #endif + return rc; +} + +int LLFile::rmdir(const std::string& dirname) +{ + int rc = LLFile::rmdir_nowarn(dirname); return warnif("rmdir", dirname, rc); } @@ -241,8 +253,7 @@ int LLFile::close(LLFILE * file) return ret_value; } - -int LLFile::remove(const std::string& filename) +int LLFile::remove_nowarn(const std::string& filename) { #if LL_WINDOWS std::string utf8filename = filename; @@ -251,10 +262,16 @@ int LLFile::remove(const std::string& filename) #else int rc = ::remove(filename.c_str()); #endif + return rc; +} + +int LLFile::remove(const std::string& filename) +{ + int rc = LLFile::remove_nowarn(filename); return warnif("remove", filename, rc); } -int LLFile::rename(const std::string& filename, const std::string& newname) +int LLFile::rename_nowarn(const std::string& filename, const std::string& newname) { #if LL_WINDOWS std::string utf8filename = filename; @@ -265,6 +282,12 @@ int LLFile::rename(const std::string& filename, const std::string& newname) #else int rc = ::rename(filename.c_str(),newname.c_str()); #endif + return rc; +} + +int LLFile::rename(const std::string& filename, const std::string& newname) +{ + int rc = LLFile::rename_nowarn(filename, newname); return warnif(STRINGIZE("rename to '" << newname << "' from"), filename, rc); } diff --git a/indra/llcommon/llfile.h b/indra/llcommon/llfile.h index 1f5514f3e..cc990f6ab 100644 --- a/indra/llcommon/llfile.h +++ b/indra/llcommon/llfile.h @@ -68,6 +68,12 @@ public: static int close(LLFILE * file); + // Singu extension: the same as below, but doesn't print a warning as to leave errno alone. + static int mkdir_nowarn(const std::string& filename, int perms); + static int rmdir_nowarn(const std::string& filename); + static int remove_nowarn(const std::string& filename); + static int rename_nowarn(const std::string& filename, const std::string& newname); + // perms is a permissions mask like 0777 or 0700. In most cases it will // be overridden by the user's umask. It is ignored on Windows. static int mkdir(const std::string& filename, int perms = 0700); diff --git a/indra/llmessage/llpartdata.cpp b/indra/llmessage/llpartdata.cpp index 41a0310ce..a89fba530 100644 --- a/indra/llmessage/llpartdata.cpp +++ b/indra/llmessage/llpartdata.cpp @@ -294,14 +294,14 @@ BOOL LLPartSysData::unpack(LLDataPacker &dp) //skip to LLPartData block U8 feh = 0; - for (U32 i = 0; i < size; ++i) + for (S32 i = 0; i < size; ++i) { dp.unpackU8(feh, "whippang"); } dp.unpackS32(size, "partsize"); //skip LLPartData block - for (U32 i = 0; i < size; ++i) + for (S32 i = 0; i < size; ++i) { dp.unpackU8(feh, "whippang"); } diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 19f348e9b..deebb57e9 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -3713,6 +3713,7 @@ LLPieMenu::LLPieMenu(const std::string& name, const std::string& label) : LLContextMenu(name, label), mFirstMouseDown(FALSE), mUseInfiniteRadius(FALSE), + mHoverIndex(-1), mHoverThisFrame(FALSE), mOuterRingAlpha(1.f), mCurRadius(0.f), @@ -3749,11 +3750,13 @@ BOOL LLPieMenu::handleHover( S32 x, S32 y, MASK mask ) mHoverThisFrame = TRUE; - LLMenuItemGL* item = pieItemFromXY( x, y ); + S32 index = mHoverIndex; + mHoverIndex = pieItemIndexFromXY(x, y); + BOOL handled = handleHoverOver(pieItemFromIndex(mHoverIndex), x, y); - if (item && item->getEnabled() && item != mHoverItem) + if (mHoverItem && mHoverIndex != index) { - switch(pieItemIndexFromXY(x, y)) + switch(mHoverIndex) { case 0: make_ui_sound("UISndPieMenuSliceHighlight0"); @@ -3784,7 +3787,7 @@ BOOL LLPieMenu::handleHover( S32 x, S32 y, MASK mask ) break; } } - return handleHoverOver(item, x, y); + return handled; } BOOL LLPieMenu::handleMouseDown( S32 x, S32 y, MASK mask ) @@ -3799,11 +3802,6 @@ BOOL LLPieMenu::handleMouseDown( S32 x, S32 y, MASK mask ) // to make sure it's within the item's rectangle handled = item->handleMouseDown( 0, 0, mask ); } - else if (!mRightMouseDown) - { - // call hidemenus to make sure transient selections get cleared - ((LLMenuHolderGL*)getParent())->hideMenus(); - } // always handle mouse down as mouse up will close open menus return TRUE; @@ -3890,8 +3888,21 @@ BOOL LLPieMenu::handleMouseUp( S32 x, S32 y, MASK mask ) } else if (!mRightMouseDown) { + // if shift is held, click is in the view, and a parent menu exists, go back up + if (mask & MASK_SHIFT && pointInView(x, y)) + { + if (LLMenuItemGL* branch = getParentMenuItem()) + { + if (LLContextMenu* parent = dynamic_cast(branch->getParent())) + { + hide(); + parent->show(LLMenuHolderGL::sContextMenuSpawnPos.mX, LLMenuHolderGL::sContextMenuSpawnPos.mY, false); + return true; + } + } + } // call hidemenus to make sure transient selections get cleared - ((LLMenuHolderGL*)getParent())->hideMenus(); + sMenuContainer->hideMenus(); } if (handled) @@ -3929,6 +3940,7 @@ void LLPieMenu::draw() { mHoverItem->setHighlight(FALSE); mHoverItem = NULL; + mHoverIndex = -1; } F32 width = (F32) getRect().getWidth(); @@ -3962,22 +3974,16 @@ void LLPieMenu::draw() gl_washer_2d( mCurRadius, (F32) PIE_CENTER_SIZE, steps, bg_color, outer_color ); // selected wedge - item_list_t::iterator item_iter; - S32 i = 0; - for (item_iter = mItems.begin(); item_iter != mItems.end(); ++item_iter) + if (mHoverItem) { - if ((*item_iter)->getHighlight()) - { - F32 arc_size = F_PI * 0.25f; + F32 arc_size = F_PI * 0.25f; - F32 start_radians = (i * arc_size) - (arc_size * 0.5f); - F32 end_radians = start_radians + arc_size; + F32 start_radians = (mHoverIndex * arc_size) - (arc_size * 0.5f); + F32 end_radians = start_radians + arc_size; - LLColor4 outer_color = selected_color; - outer_color.mV[VALPHA] *= mOuterRingAlpha; - gl_washer_segment_2d( mCurRadius, (F32)PIE_CENTER_SIZE, start_radians, end_radians, steps / 8, selected_color, outer_color ); - } - i++; + LLColor4 outer_color = selected_color; + outer_color.mV[VALPHA] *= mOuterRingAlpha; + gl_washer_segment_2d( mCurRadius, (F32)PIE_CENTER_SIZE, start_radians, end_radians, steps / 8, selected_color, outer_color ); } LLUI::setLineWidth( line_width ); @@ -4004,38 +4010,10 @@ void LLPieMenu::draw() LLView::draw(); } -void LLPieMenu::drawBackground(LLMenuItemGL* itemp, LLColor4& color) +// virtual +void LLPieMenu::drawBackground(LLMenuItemGL*, LLColor4&) { - F32 width = (F32) getRect().getWidth(); - F32 height = (F32) getRect().getHeight(); - F32 center_x = width/2; - F32 center_y = height/2; - S32 steps = 100; - - gGL.color4fv( color.mV ); - gGL.pushUIMatrix(); - { - gGL.translateUI(center_x - itemp->getRect().mLeft, center_y - itemp->getRect().mBottom, 0.f); - - item_list_t::iterator item_iter; - S32 i = 0; - for (item_iter = mItems.begin(); item_iter != mItems.end(); ++item_iter) - { - if ((*item_iter) == itemp) - { - F32 arc_size = F_PI * 0.25f; - - F32 start_radians = (i * arc_size) - (arc_size * 0.5f); - F32 end_radians = start_radians + arc_size; - - LLColor4 outer_color = color; - outer_color.mV[VALPHA] *= mOuterRingAlpha; - gl_washer_segment_2d( mCurRadius, (F32)PIE_CENTER_SIZE, start_radians, end_radians, steps / 8, color, outer_color ); - } - i++; - } - } - gGL.popUIMatrix(); + // Selection is drawn in our draw call, do nothing here and override base drawing rectangles. } // virtual @@ -4107,13 +4085,15 @@ void LLPieMenu::arrange() LLMenuItemGL *LLPieMenu::pieItemFromXY(S32 x, S32 y) { - // We might have shifted this menu on draw. If so, we need - // to shift over mouseup events until we get a hover event. - //x += mShiftHoriz; - //y += mShiftVert; + return pieItemFromIndex(pieItemIndexFromXY(x, y)); +} +S32 LLPieMenu::pieItemIndexFromXY(S32 x, S32 y) +{ // An arc of the pie menu is 45 degrees const F32 ARC_DEG = 45.f; + + // correct for non-square pixels S32 delta_x = x - getRect().getWidth() / 2; S32 delta_y = y - getRect().getHeight() / 2; @@ -4121,14 +4101,14 @@ LLMenuItemGL *LLPieMenu::pieItemFromXY(S32 x, S32 y) S32 dist_squared = delta_x*delta_x + delta_y*delta_y; if (dist_squared < PIE_CENTER_SIZE*PIE_CENTER_SIZE) { - return NULL; + return -1; } // infinite radius is only used with right clicks S32 radius = llmax( getRect().getWidth()/2, getRect().getHeight()/2 ); if (!(mUseInfiniteRadius && mRightMouseDown) && dist_squared > radius * radius) { - return NULL; + return -1; } F32 angle = RAD_TO_DEG * (F32) atan2((F32)delta_y, (F32)delta_x); @@ -4140,8 +4120,11 @@ LLMenuItemGL *LLPieMenu::pieItemFromXY(S32 x, S32 y) // make sure we're only using positive angles if (angle < 0.f) angle += 360.f; - S32 which = S32( angle / ARC_DEG ); + return S32( angle / ARC_DEG ); +} +LLMenuItemGL* LLPieMenu::pieItemFromIndex(S32 which) +{ if (0 <= which && which < (S32)mItems.size() ) { item_list_t::iterator item_iter; @@ -4161,33 +4144,6 @@ LLMenuItemGL *LLPieMenu::pieItemFromXY(S32 x, S32 y) return NULL; } -S32 LLPieMenu::pieItemIndexFromXY(S32 x, S32 y) -{ - // An arc of the pie menu is 45 degrees - const F32 ARC_DEG = 45.f; - // correct for non-square pixels - S32 delta_x = x - getRect().getWidth() / 2; - S32 delta_y = y - getRect().getHeight() / 2; - - // circle safe zone in the center - if (delta_x*delta_x + delta_y*delta_y < PIE_CENTER_SIZE*PIE_CENTER_SIZE) - { - return -1; - } - - F32 angle = RAD_TO_DEG * (F32) atan2((F32)delta_y, (F32)delta_x); - - // rotate marks CCW so that east = [0, ARC_DEG) instead of - // [-ARC_DEG/2, ARC_DEG/2) - angle += ARC_DEG / 2.f; - - // make sure we're only using positive angles - if (angle < 0.f) angle += 360.f; - - S32 which = S32( angle / ARC_DEG ); - return which; -} - // virtual void LLPieMenu::show(S32 x, S32 y, bool mouse_down) diff --git a/indra/llui/llmenugl.h b/indra/llui/llmenugl.h index cac496497..9fd6868b7 100644 --- a/indra/llui/llmenugl.h +++ b/indra/llui/llmenugl.h @@ -759,10 +759,12 @@ public: private: LLMenuItemGL *pieItemFromXY(S32 x, S32 y); + LLMenuItemGL* pieItemFromIndex(S32 which); S32 pieItemIndexFromXY(S32 x, S32 y); BOOL mFirstMouseDown; // true from show until mouse up BOOL mUseInfiniteRadius; // allow picking pie menu items anywhere outside of center circle + S32 mHoverIndex; BOOL mHoverThisFrame; LLFrameTimer mShrinkBorderTimer; F32 mOuterRingAlpha; // for rendering pie menus as both bounded and unbounded diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 73dd99109..b8fab0994 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -1480,29 +1480,11 @@ LLNotificationPtr LLNotifications::add(const LLNotification::Params& p) return pNotif; } +namespace AIAlert { std::string text(Error const& error, int suppress_mask = 0); } LLNotificationPtr LLNotifications::add(AIAlert::Error const& error, int type, unsigned int suppress_mask) { - std::string alert_text; - bool suppress_newlines = false; - bool last_was_prefix = false; - for (AIAlert::Error::lines_type::const_iterator line = error.lines().begin(); line != error.lines().end(); ++line) - { - // Even if a line is suppressed, we print its leading newline if requested, but never more than one. - if (!suppress_newlines && line->prepend_newline()) - { - alert_text += '\n'; - suppress_newlines = true; - } - if (!line->suppressed(suppress_mask)) - { - if (last_was_prefix) alert_text += ' '; // The translation system strips off spaces... add them back. - alert_text += LLTrans::getString(line->getXmlDesc(), line->args()); - suppress_newlines = false; - last_was_prefix = line->is_prefix(); - } - } LLSD substitutions = LLSD::emptyMap(); - substitutions["[PAYLOAD]"] = alert_text; + substitutions["[PAYLOAD]"] = AIAlert::text(error, suppress_mask); return add(LLNotification::Params((type == AIAlert::modal || error.is_modal()) ? "AIAlertModal" : "AIAlert").substitutions(substitutions)); } diff --git a/indra/llui/llnotificationsutil.cpp b/indra/llui/llnotificationsutil.cpp index 134a5c267..4c24b511e 100644 --- a/indra/llui/llnotificationsutil.cpp +++ b/indra/llui/llnotificationsutil.cpp @@ -25,6 +25,7 @@ #include "linden_common.h" #include "llnotificationsutil.h" +#include "lltrans.h" #include "llnotifications.h" #include "llsd.h" @@ -33,7 +34,7 @@ namespace AIAlert { -LLNotificationPtr add(Error const& error, modal_nt type, unsigned int suppress_mask) +LLNotificationPtr add(Error const& error, unsigned int suppress_mask, modal_nt type) { return LLNotifications::instance().add(error, type, suppress_mask); } @@ -68,6 +69,30 @@ LLNotificationPtr add(std::string const& xml_desc, AIArgs const& args, Error con return LLNotifications::instance().add(Error(Prefix(), type, xml_desc, args, error), type, suppress_mask); } +std::string text(Error const& error, int suppress_mask) +{ + std::string alert_text; + bool suppress_newlines = false; + bool last_was_prefix = false; + for (Error::lines_type::const_iterator line = error.lines().begin(); line != error.lines().end(); ++line) + { + // Even if a line is suppressed, we print its leading newline if requested, but never more than one. + if (!suppress_newlines && line->prepend_newline()) + { + alert_text += '\n'; + suppress_newlines = true; + } + if (!line->suppressed(suppress_mask)) + { + if (last_was_prefix) alert_text += ' '; // The translation system strips off spaces... add them back. + alert_text += LLTrans::getString(line->getXmlDesc(), line->args()); + suppress_newlines = false; + last_was_prefix = line->is_prefix(); + } + } + return alert_text; +} + } // namespace AIAlert LLNotificationPtr LLNotificationsUtil::add(const std::string& name) diff --git a/indra/llui/llnotificationsutil.h b/indra/llui/llnotificationsutil.h index fb0fb1ba4..893d2269c 100644 --- a/indra/llui/llnotificationsutil.h +++ b/indra/llui/llnotificationsutil.h @@ -64,7 +64,7 @@ namespace AIAlert // Just show the caught alert error. LLNotificationPtr add(Error const& error, - modal_nt type = not_modal, unsigned int suppress_mask = 0); + unsigned int suppress_mask = 0, modal_nt type = not_modal); // Short cuts for enforcing modal alerts. inline LLNotificationPtr add_modal(std::string const& xml_desc) { return add(xml_desc, modal); } @@ -73,6 +73,10 @@ namespace AIAlert inline LLNotificationPtr add_modal(Error const& error, std::string const& xml_desc, AIArgs const& args, unsigned int suppress_mask = 0) { return add(error, xml_desc, args, suppress_mask, modal); } inline LLNotificationPtr add_modal(std::string const& xml_desc, Error const& error, unsigned int suppress_mask = 0) { return add(xml_desc, error, suppress_mask, modal); } inline LLNotificationPtr add_modal(std::string const& xml_desc, AIArgs const& args, Error const& error, unsigned int suppress_mask = 0) { return add(xml_desc, args, error, suppress_mask, modal); } + inline LLNotificationPtr add_modal(Error const& error, unsigned int suppress_mask = 0) { return add(error, suppress_mask, modal); } + + // Return the full, translated, texted of the alert (possibly suppressing certain output). + std::string text(Error const& error, int suppress_mask = 0); } namespace LLNotificationsUtil diff --git a/indra/llui/llscrolllistcolumn.cpp b/indra/llui/llscrolllistcolumn.cpp index 6353528c4..59c991512 100644 --- a/indra/llui/llscrolllistcolumn.cpp +++ b/indra/llui/llscrolllistcolumn.cpp @@ -40,9 +40,10 @@ const S32 MIN_COLUMN_WIDTH = 20; //--------------------------------------------------------------------------- // LLScrollColumnHeader //--------------------------------------------------------------------------- -LLScrollColumnHeader::LLScrollColumnHeader(const std::string& name, const LLRect& rect, LLScrollListColumn* column) -: LLButton(name, rect, "square_btn_32x128.tga", "square_btn_selected_32x128.tga", LLStringUtil::null, NULL, LLFontGL::getFontSansSerifSmall()), +LLScrollColumnHeader::LLScrollColumnHeader(const std::string& name, const LLRect& rect, LLScrollListColumn* column, const std::string& unselected_image_name, const std::string& selected_image_name) +: LLButton(name, rect, unselected_image_name, selected_image_name, LLStringUtil::null, NULL, LLFontGL::getFontSansSerifSmall()), mColumn(column), + mDrawArrow(true), mHasResizableElement(FALSE) { setClickedCallback(boost::bind(&LLScrollColumnHeader::onClick, this, _2)); @@ -65,20 +66,23 @@ LLScrollColumnHeader::~LLScrollColumnHeader() void LLScrollColumnHeader::draw() { - std::string sort_column = mColumn->mParentCtrl->getSortColumnName(); - BOOL draw_arrow = !mColumn->mLabel.empty() - && mColumn->mParentCtrl->isSorted() - // check for indirect sorting column as well as column's sorting name - && (sort_column == mColumn->mSortingColumn || sort_column == mColumn->mName); + if (mDrawArrow) + { + std::string sort_column = mColumn->mParentCtrl->getSortColumnName(); + BOOL draw_arrow = !mColumn->mLabel.empty() + && mColumn->mParentCtrl->isSorted() + // check for indirect sorting column as well as column's sorting name + && (sort_column == mColumn->mSortingColumn || sort_column == mColumn->mName); - BOOL is_ascending = mColumn->mParentCtrl->getSortAscending(); - if (draw_arrow) - { - setImageOverlay(is_ascending ? "up_arrow.tga" : "down_arrow.tga", LLFontGL::RIGHT, LLColor4::white); - } - else - { - setImageOverlay(LLUUID::null); + BOOL is_ascending = mColumn->mParentCtrl->getSortAscending(); + if (draw_arrow) + { + setImageOverlay(is_ascending ? "up_arrow.tga" : "down_arrow.tga", LLFontGL::RIGHT, LLColor4::white); + } + else + { + setImageOverlay(LLUUID::null); + } } // Draw children diff --git a/indra/llui/llscrolllistcolumn.h b/indra/llui/llscrolllistcolumn.h index 2026e075c..c7cea5976 100644 --- a/indra/llui/llscrolllistcolumn.h +++ b/indra/llui/llscrolllistcolumn.h @@ -40,7 +40,7 @@ class LLScrollListCtrl; class LLScrollColumnHeader : public LLButton { public: - LLScrollColumnHeader(const std::string& name, const LLRect& rect, LLScrollListColumn* column); + LLScrollColumnHeader(const std::string& name, const LLRect& rect, LLScrollListColumn* column, const std::string& unselected_image_name = "square_btn_32x128.tga", const std::string& selected_image_name = "square_btn_selected_32x128.tga"); ~LLScrollColumnHeader(); /*virtual*/ void draw(); @@ -51,6 +51,8 @@ public: /*virtual*/ void handleReshape(const LLRect& new_rect, bool by_user = false); LLScrollListColumn* getColumn() { return mColumn; } + // Singu Note: Toggles drawing the sort arrow altogether + void setDrawArrow(bool draw_arrow) { mDrawArrow = draw_arrow; } void setHasResizableElement(BOOL resizable); void updateResizeBars(); BOOL canResize(); @@ -60,6 +62,7 @@ public: private: LLScrollListColumn* mColumn; + bool mDrawArrow; LLResizeBar* mResizeBar; BOOL mHasResizableElement; }; diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index f76b21762..bae86672c 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -2848,24 +2848,29 @@ void LLScrollListCtrl::addColumn(const LLScrollListColumn::Params& column_params LLRect temp_rect = LLRect(left,top+mHeadingHeight,right,top); - new_column->mHeader = new LLScrollColumnHeader("btn_" + name, temp_rect, new_column); - new_column->mHeader->setToolTip(column_params.tool_tip()); - new_column->mHeader->setTabStop(false); - new_column->mHeader->setVisible(mDisplayColumnHeaders); - - if(column_params.header.image.isProvided()) + if (column_params.header.image.isProvided()) { - new_column->mHeader->setImages(column_params.header.image, column_params.header.image); - } - else if(column_params.header.image_overlay.isProvided()) - { - new_column->mHeader->setImageOverlay(column_params.header.image_overlay); + new_column->mHeader = new LLScrollColumnHeader("btn_" + name, temp_rect, new_column, column_params.header.image, column_params.header.image); + new_column->mHeader->setDrawArrow(false); } else { - new_column->mHeader->setLabel(column_params.header.label()); + new_column->mHeader = new LLScrollColumnHeader("btn_" + name, temp_rect, new_column); + if (column_params.header.image_overlay.isProvided()) + { + new_column->mHeader->setImageOverlay(column_params.header.image_overlay); + new_column->mHeader->setDrawArrow(false); + } + else + { + new_column->mHeader->setLabel(column_params.header.label()); + } } + new_column->mHeader->setToolTip(column_params.tool_tip()); + new_column->mHeader->setTabStop(false); + new_column->mHeader->setVisible(mDisplayColumnHeaders); + addChild(new_column->mHeader); sendChildToFront(mScrollbar); diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl index 1aa3261fe..6a2117ad6 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl @@ -60,6 +60,7 @@ uniform sampler2DShadow shadowMap0; uniform sampler2DShadow shadowMap1; uniform sampler2DShadow shadowMap2; uniform sampler2DShadow shadowMap3; +uniform sampler2D noiseMap; uniform vec2 shadow_res; @@ -198,12 +199,13 @@ vec3 calcPointLightOrSpotLight(vec3 light_col, vec3 diffuse, vec3 v, vec3 n, vec } #if HAS_SHADOW -float pcfShadow(sampler2DShadow shadowMap, vec4 stc) +float pcfShadow(sampler2DShadow shadowMap, vec4 stc, vec2 pos_screen) { stc.xyz /= stc.w; stc.z += shadow_bias; - - stc.x = floor(stc.x*shadow_res.x + fract(stc.y*shadow_res.y*12345))/shadow_res.x; // add some chaotic jitter to X sample pos according to Y to disguise the snapping going on here + + stc.x += (((texture2D(noiseMap, pos_screen/128.0).x)-.5)/shadow_res.x); + //stc.x = floor(stc.x*shadow_res.x + fract(stc.y*shadow_res.y*12345))/shadow_res.x; // add some chaotic jitter to X sample pos according to Y to disguise the snapping going on here float cs = shadow2D(shadowMap, stc.xyz).x; float shadow = cs; @@ -451,14 +453,14 @@ vec3 fullbrightScaleSoftClip(vec3 light) void main() { - vec2 frag = vary_fragcoord.xy/vary_fragcoord.z*0.5+0.5; - frag *= screen_res; vec4 pos = vec4(vary_position, 1.0); float shadow = 1.0; #if HAS_SHADOW + vec2 frag = vary_fragcoord.xy/vary_fragcoord.z*0.5+0.5; + frag *= screen_res; vec4 spos = pos; if (spos.z > -shadow_clip.w) @@ -478,7 +480,7 @@ void main() float w = 1.0; w -= max(spos.z-far_split.z, 0.0)/transition_domain.z; - shadow += pcfShadow(shadowMap3, lpos)*w; + shadow += pcfShadow(shadowMap3, lpos,frag.xy)*w; weight += w; shadow += max((pos.z+shadow_clip.z)/(shadow_clip.z-shadow_clip.w)*2.0-1.0, 0.0); } @@ -490,7 +492,7 @@ void main() float w = 1.0; w -= max(spos.z-far_split.y, 0.0)/transition_domain.y; w -= max(near_split.z-spos.z, 0.0)/transition_domain.z; - shadow += pcfShadow(shadowMap2, lpos)*w; + shadow += pcfShadow(shadowMap2, lpos,frag.xy)*w; weight += w; } @@ -501,7 +503,7 @@ void main() float w = 1.0; w -= max(spos.z-far_split.x, 0.0)/transition_domain.x; w -= max(near_split.y-spos.z, 0.0)/transition_domain.y; - shadow += pcfShadow(shadowMap1, lpos)*w; + shadow += pcfShadow(shadowMap1, lpos,frag.xy)*w; weight += w; } @@ -512,7 +514,7 @@ void main() float w = 1.0; w -= max(near_split.x-spos.z, 0.0)/transition_domain.x; - shadow += pcfShadow(shadowMap0, lpos)*w; + shadow += pcfShadow(shadowMap0, lpos,frag.xy)*w; weight += w; } @@ -532,8 +534,6 @@ void main() #endif #ifdef FOR_IMPOSTOR - vec4 color; - color.rgb = diff.rgb; #ifdef USE_VERTEX_COLOR float final_alpha = diff.a * vertex_color.a; @@ -548,6 +548,7 @@ void main() { discard; } + vec4 color = vec4(diff.rgb,final_alpha); #else #ifdef USE_VERTEX_COLOR @@ -576,10 +577,7 @@ void main() final_da = min(final_da, 1.0f); final_da = pow(final_da, 1.0/1.3); - vec4 color = vec4(0,0,0,0); - - color.rgb = atmosAmbient(color.rgb); - color.a = final_alpha; + vec4 color = vec4(getAmblitColor(),final_alpha); float ambient = abs(da); ambient *= 0.5; diff --git a/indra/newview/app_settings/shaders/class1/deferred/attachmentShadowV.glsl b/indra/newview/app_settings/shaders/class1/deferred/attachmentShadowV.glsl index 3f90600ac..4f49f9a72 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/attachmentShadowV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/attachmentShadowV.glsl @@ -41,10 +41,6 @@ void main() vec4 p = projection_matrix * vec4(pos, 1.0); -#if !DEPTH_CLAMP p.z = max(p.z, -p.w+0.01); gl_Position = p; -#else - gl_Position = p; -#endif } diff --git a/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl index 469b26497..58c18b4d9 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl @@ -169,10 +169,12 @@ void main() #ifndef HAS_ALPHA_MASK color.a = fogged.a; #endif -#elif !HAS_ALPHA_MASK +#else +#ifndef HAS_ALPHA_MASK color.a = final_alpha; #endif -#if HAS_ALPHA_MASK +#endif +#ifdef HAS_ALPHA_MASK color.a = 0.0; #endif diff --git a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl index 04f17e853..fe8fda374 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl @@ -82,18 +82,21 @@ uniform sampler2DShadow shadowMap0; uniform sampler2DShadow shadowMap1; uniform sampler2DShadow shadowMap2; uniform sampler2DShadow shadowMap3; +uniform sampler2D noiseMap; +VARYING vec2 vary_fragcoord; uniform mat4 shadow_matrix[6]; uniform vec4 shadow_clip; uniform vec2 shadow_res; uniform float shadow_bias; -float pcfShadow(sampler2DShadow shadowMap, vec4 stc) +float pcfShadow(sampler2DShadow shadowMap, vec4 stc, vec2 pos_screen) { stc.xyz /= stc.w; stc.z += shadow_bias; - - stc.x = floor(stc.x*shadow_res.x + fract(stc.y*shadow_res.y*12345))/shadow_res.x; // add some chaotic jitter to X sample pos according to Y to disguise the snapping going on here + + stc.x += (((texture2D(noiseMap, pos_screen/128.0).x)-.5)/shadow_res.x); + //stc.x = floor(stc.x*shadow_res.x + fract(stc.y*shadow_res.y*12345))/shadow_res.x; // add some chaotic jitter to X sample pos according to Y to disguise the snapping going on here float cs = shadow2D(shadowMap, stc.xyz).x; float shadow = cs; @@ -133,7 +136,6 @@ uniform mat3 env_mat; uniform mat3 ssao_effect_mat; uniform vec3 sun_dir; -VARYING vec2 vary_fragcoord; VARYING vec3 vary_position; @@ -598,6 +600,7 @@ void main() vec3 pos = vary_position; #if HAS_SUN_SHADOW + vec2 frag = vary_fragcoord.xy; float shadow = 0.0; vec4 spos = vec4(pos,1.0); @@ -617,7 +620,7 @@ void main() float w = 1.0; w -= max(spos.z-far_split.z, 0.0)/transition_domain.z; - shadow += pcfShadow(shadowMap3, lpos)*w; + shadow += pcfShadow(shadowMap3, lpos,frag.xy)*w; weight += w; shadow += max((pos.z+shadow_clip.z)/(shadow_clip.z-shadow_clip.w)*2.0-1.0, 0.0); } @@ -629,7 +632,7 @@ void main() float w = 1.0; w -= max(spos.z-far_split.y, 0.0)/transition_domain.y; w -= max(near_split.z-spos.z, 0.0)/transition_domain.z; - shadow += pcfShadow(shadowMap2, lpos)*w; + shadow += pcfShadow(shadowMap2, lpos,frag.xy)*w; weight += w; } @@ -640,7 +643,7 @@ void main() float w = 1.0; w -= max(spos.z-far_split.x, 0.0)/transition_domain.x; w -= max(near_split.y-spos.z, 0.0)/transition_domain.y; - shadow += pcfShadow(shadowMap1, lpos)*w; + shadow += pcfShadow(shadowMap1, lpos,frag.xy)*w; weight += w; } @@ -651,7 +654,7 @@ void main() float w = 1.0; w -= max(near_split.x-spos.z, 0.0)/transition_domain.x; - shadow += pcfShadow(shadowMap0, lpos)*w; + shadow += pcfShadow(shadowMap0, lpos,frag.xy)*w; weight += w; } diff --git a/indra/newview/app_settings/shaders/class1/deferred/materialV.glsl b/indra/newview/app_settings/shaders/class1/deferred/materialV.glsl index 393d1e69d..95c741050 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/materialV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/materialV.glsl @@ -44,6 +44,10 @@ uniform mat4 modelview_matrix; #endif VARYING vec3 vary_position; +#if HAS_SUN_SHADOW +VARYING vec2 vary_fragcoord; +uniform vec2 screen_res; +#endif #endif @@ -138,7 +142,11 @@ vary_normal = n; #if (DIFFUSE_ALPHA_MODE == DIFFUSE_ALPHA_MODE_BLEND) #if !HAS_SKIN - vary_position = (modelview_matrix*vec4(position.xyz, 1.0)).xyz; + vec3 pos = (modelview_matrix*vec4(position.xyz, 1.0)).xyz; + vary_position = pos; +#endif +#if HAS_SUN_SHADOW + vary_fragcoord = (pos.xy*0.5+0.5)*screen_res; #endif #endif } diff --git a/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl index 18f601f1b..64c1c8251 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl @@ -41,7 +41,7 @@ uniform sampler2DShadow shadowMap2; uniform sampler2DShadow shadowMap3; uniform sampler2DShadow shadowMap4; uniform sampler2DShadow shadowMap5; - +uniform sampler2D noiseMap; // Inputs uniform mat4 shadow_matrix[6]; @@ -100,15 +100,16 @@ float pcfShadow(sampler2DShadow shadowMap, vec4 stc, float scl, vec2 pos_screen) stc.xyz /= stc.w; stc.z += shadow_bias; - stc.x = floor(stc.x*shadow_res.x + fract(pos_screen.y*0.666666666))/shadow_res.x; // add some jitter to X sample pos according to Y to disguise the snapping going on here + stc.x += (((texture2D(noiseMap, pos_screen/128.0).x)-.5)/shadow_res.x); + //stc.x = floor(stc.x*shadow_res.x + fract(pos_screen.y*0.666666666))/shadow_res.x; // add some chaotic jitter to X sample pos according to Y to disguise the snapping going on here float cs = shadow2D(shadowMap, stc.xyz).x; float shadow = cs; shadow += shadow2D(shadowMap, stc.xyz+vec3(2.0/shadow_res.x, 1.5/shadow_res.y, 0.0)).x; shadow += shadow2D(shadowMap, stc.xyz+vec3(1.0/shadow_res.x, -1.5/shadow_res.y, 0.0)).x; - shadow += shadow2D(shadowMap, stc.xyz+vec3(-2.0/shadow_res.x, 1.5/shadow_res.y, 0.0)).x; - shadow += shadow2D(shadowMap, stc.xyz+vec3(-1.0/shadow_res.x, -1.5/shadow_res.y, 0.0)).x; + shadow += shadow2D(shadowMap, stc.xyz+vec3(-1.0/shadow_res.x, 1.5/shadow_res.y, 0.0)).x; + shadow += shadow2D(shadowMap, stc.xyz+vec3(-2.0/shadow_res.x, -1.5/shadow_res.y, 0.0)).x; return shadow*0.2; @@ -118,7 +119,8 @@ float pcfSpotShadow(sampler2DShadow shadowMap, vec4 stc, float scl, vec2 pos_scr { stc.xyz /= stc.w; stc.z += spot_shadow_bias*scl; - stc.x = floor(proj_shadow_res.x * stc.x + fract(pos_screen.y*0.666666666)) / proj_shadow_res.x; // snap + stc.x += (((texture2D(noiseMap, pos_screen/128.0).x)-.5)/proj_shadow_res.x); + //stc.x = floor(proj_shadow_res.x * stc.x + fract(pos_screen.y*0.666666666)) / proj_shadow_res.x; // snap float cs = shadow2D(shadowMap, stc.xyz).x; float shadow = cs; diff --git a/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl b/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl index c6d13db8e..09a7a766b 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl @@ -156,7 +156,8 @@ float pcfShadow(sampler2DShadow shadowMap, vec4 stc, float scl, vec2 pos_screen) stc.xyz /= stc.w; stc.z += shadow_bias; - stc.x = floor(stc.x*shadow_res.x + fract(pos_screen.y*0.666666666))/shadow_res.x; + stc.x += (((texture2D(noiseMap, pos_screen/128.0).x)-.5)/shadow_res.x); + //stc.x = floor(stc.x*shadow_res.x + fract(pos_screen.y*0.666666666))/shadow_res.x; float cs = shadow2D(shadowMap, stc.xyz).x; float shadow = cs; @@ -173,7 +174,8 @@ float pcfSpotShadow(sampler2DShadow shadowMap, vec4 stc, float scl, vec2 pos_scr { stc.xyz /= stc.w; stc.z += spot_shadow_bias*scl; - stc.x = floor(proj_shadow_res.x * stc.x + fract(pos_screen.y*0.666666666)) / proj_shadow_res.x; // snap + stc.x += (((texture2D(noiseMap, pos_screen/128.0).x)-.5)/proj_shadow_res.x); + //stc.x = floor(proj_shadow_res.x * stc.x + fract(pos_screen.y*0.666666666)) / proj_shadow_res.x; // snap float cs = shadow2D(shadowMap, stc.xyz).x; float shadow = cs; diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 3520b56e1..1902f115d 100644 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -726,8 +726,10 @@ void LLFloaterModelPreview::draw() } } + /* Singu Note: Dummy views and what for? childSetTextArg("prim_cost", "[PRIM_COST]", llformat("%d", mModelPreview->mResourceCost)); childSetTextArg("description_label", "[TEXTURES]", llformat("%d", mModelPreview->mTextureSet.size())); + */ if (mModelPreview) { @@ -1155,7 +1157,7 @@ void LLFloaterModelPreview::initDecompControls() mDecompParams[param[i].mName] = LLSD(param[i].mDefault.mBool); //llinfos << "Type: boolean, Default: " << (param[i].mDefault.mBool ? "True" : "False") << llendl; - LLCheckBoxCtrl* check_box = getChild(name); + LLCheckBoxCtrl* check_box = findChild(name); if (check_box) { check_box->setValue(param[i].mDefault.mBool); @@ -3710,7 +3712,6 @@ void LLModelPreview::loadModelCallback(S32 lod) mLoading = false; if (mFMP) { - mFMP->getChild("confirm_checkbox")->set(FALSE); if (!mBaseModel.empty()) { if (mFMP->getChild("description_form")->getValue().asString().empty()) @@ -4193,7 +4194,9 @@ void LLModelPreview::updateStatusMessages() } } + /* Singu Note: Dummy views and what for? mFMP->childSetTextArg("submeshes_info", "[SUBMESHES]", llformat("%d", total_submeshes[LLModel::LOD_HIGH])); + */ std::string mesh_status_na = mFMP->getString("mesh_status_na"); @@ -5524,12 +5527,6 @@ void LLModelPreview::setPreviewLOD(S32 lod) combo_box->setCurrentByIndex((NUM_LOD-1)-mPreviewLOD); // combo box list of lods is in reverse order mFMP->childSetText("lod_file_" + lod_name[mPreviewLOD], mLODFile[mPreviewLOD]); - LLComboBox* combo_box2 = mFMP->getChild("preview_lod_combo2"); - combo_box2->setCurrentByIndex((NUM_LOD-1)-mPreviewLOD); // combo box list of lods is in reverse order - - LLComboBox* combo_box3 = mFMP->getChild("preview_lod_combo3"); - combo_box3->setCurrentByIndex((NUM_LOD-1)-mPreviewLOD); // combo box list of lods is in reverse order - LLColor4 highlight_color = LLUI::sColorsGroup->getColor("MeshImportTableHighlightColor"); LLColor4 normal_color = LLUI::sColorsGroup->getColor("MeshImportTableNormalColor"); diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index de52941d1..7194711a6 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -655,13 +655,16 @@ bool LLViewerInventoryCategory::fetch() { llwarns << "agent region is null" << llendl; } - if (!url.empty()) //Capability found. Build up LLSD and use it. + if (!url.empty() && gSavedSettings.getBOOL("UseHTTPInventory")) //Capability found and HTTP inventory enabled. Build up LLSD and use it. { LLInventoryModelBackgroundFetch::instance().start(mUUID, false); } else - { //Deprecated, but if we don't have a capability, use the old system. - llinfos << "FetchInventoryDescendents2 capability not found. Using deprecated UDP message." << llendl; + { //We don't have a capability or the use of HTTP inventory is disabled, use the old system. + if (gSavedSettings.getBOOL("UseHTTPInventory")) + { + llinfos << "FetchInventoryDescendents2 capability not found. Using UDP message." << llendl; + } LLMessageSystem* msg = gMessageSystem; msg->newMessage("FetchInventoryDescendents"); msg->nextBlock("AgentData"); diff --git a/indra/newview/llviewerpartsim.cpp b/indra/newview/llviewerpartsim.cpp index 660e48f22..8f07858cf 100644 --- a/indra/newview/llviewerpartsim.cpp +++ b/indra/newview/llviewerpartsim.cpp @@ -656,7 +656,6 @@ void LLViewerPartSim::updateSimulation() static LLFrameTimer update_timer; //reset VBO cursor - LLVOPartGroup::sVBSlotCursor = 0; const F32 dt = llmin(update_timer.getElapsedTimeAndResetF32(), 0.1f); diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp index d9d3f2e18..11e8caa66 100644 --- a/indra/newview/llvopartgroup.cpp +++ b/indra/newview/llvopartgroup.cpp @@ -55,18 +55,18 @@ const F32 MAX_PART_LIFETIME = 120.f; extern U64 gFrameTime; LLPointer LLVOPartGroup::sVB = NULL; -/*S32 LLVOPartGroup::sVBSlotFree[]; -S32* LLVOPartGroup::sVBSlotCursor = NULL;*/ -S32 LLVOPartGroup::sVBSlotCursor = 0; +S32 LLVOPartGroup::sVBSlotFree[]; +S32* LLVOPartGroup::sVBSlotCursor = NULL; +//S32 LLVOPartGroup::sVBSlotCursor = 0; void LLVOPartGroup::initClass() { - /*for (S32 i = 0; i < LL_MAX_PARTICLE_COUNT; ++i) + for (S32 i = 0; i < LL_MAX_PARTICLE_COUNT; ++i) { sVBSlotFree[i] = i; } - sVBSlotCursor = sVBSlotFree;*/ + sVBSlotCursor = sVBSlotFree; } //static @@ -131,22 +131,22 @@ void LLVOPartGroup::destroyGL() //static S32 LLVOPartGroup::findAvailableVBSlot() { - if (sVBSlotCursor >= /*sVBSlotFree+*/LL_MAX_PARTICLE_COUNT) + if (sVBSlotCursor >= sVBSlotFree+LL_MAX_PARTICLE_COUNT) { //no more available slots return -1; } - /*S32 ret = *sVBSlotCursor; + S32 ret = *sVBSlotCursor; sVBSlotCursor++; - return ret;*/ + return ret; - return sVBSlotCursor++; + //return sVBSlotCursor++; } bool ll_is_part_idx_allocated(S32 idx, S32* start, S32* end) { - /*while (start < end) + while (start < end) { if (*start == idx) { //not allocated (in free list) @@ -156,14 +156,14 @@ bool ll_is_part_idx_allocated(S32 idx, S32* start, S32* end) } //allocated (not in free list) - return true;*/ - return false; + return true; + //return false; } //static void LLVOPartGroup::freeVBSlot(S32 idx) { - /*llassert(idx < LL_MAX_PARTICLE_COUNT && idx >= 0); + llassert(idx < LL_MAX_PARTICLE_COUNT && idx >= 0); llassert(sVBSlotCursor > sVBSlotFree); llassert(ll_is_part_idx_allocated(idx, sVBSlotCursor, sVBSlotFree+LL_MAX_PARTICLE_COUNT)); @@ -171,7 +171,7 @@ void LLVOPartGroup::freeVBSlot(S32 idx) { sVBSlotCursor--; *sVBSlotCursor = idx; - }*/ + } } LLVOPartGroup::LLVOPartGroup(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp) @@ -881,7 +881,7 @@ void LLParticlePartition::getGeometry(LLSpatialGroup* group) LLFace* facep = *i; LLAlphaObject* object = (LLAlphaObject*) facep->getViewerObject(); - //if (!facep->isState(LLFace::PARTICLE)) + if (!facep->isState(LLFace::PARTICLE)) { //set the indices of this face S32 idx = LLVOPartGroup::findAvailableVBSlot(); if (idx >= 0) @@ -890,7 +890,7 @@ void LLParticlePartition::getGeometry(LLSpatialGroup* group) facep->setIndicesIndex(idx*6); facep->setVertexBuffer(LLVOPartGroup::sVB); facep->setPoolType(LLDrawPool::POOL_ALPHA); - //facep->setState(LLFace::PARTICLE); + facep->setState(LLFace::PARTICLE); } else { diff --git a/indra/newview/llvopartgroup.h b/indra/newview/llvopartgroup.h index 7e3e220a7..7647fe992 100644 --- a/indra/newview/llvopartgroup.h +++ b/indra/newview/llvopartgroup.h @@ -48,9 +48,9 @@ public: //vertex buffer for holding all particles static LLPointer sVB; - /*static S32 sVBSlotFree[LL_MAX_PARTICLE_COUNT]; - static S32* sVBSlotCursor;*/ - static S32 sVBSlotCursor; + static S32 sVBSlotFree[LL_MAX_PARTICLE_COUNT]; + static S32* sVBSlotCursor; + //static S32 sVBSlotCursor; static void initClass(); static void restoreGL(); diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 6931b21d7..e3ca31bc1 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -9715,7 +9715,7 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera renderMaskedObjects(LLRenderPass::PASS_ALPHA_MASK, mask, TRUE, TRUE); renderMaskedObjects(LLRenderPass::PASS_FULLBRIGHT_ALPHA_MASK, mask, TRUE, TRUE); gDeferredShadowAlphaMaskProgram.setMinimumAlpha(0.598f); - //renderObjects(LLRenderPass::PASS_ALPHA, mask, TRUE, TRUE); + renderObjects(LLRenderPass::PASS_ALPHA, mask, TRUE, TRUE); mask = mask & ~LLVertexBuffer::MAP_TEXTURE_INDEX; diff --git a/indra/newview/skins/default/textures/green_checkmark.png b/indra/newview/skins/default/textures/green_checkmark.png new file mode 100644 index 000000000..d2a5b348d Binary files /dev/null and b/indra/newview/skins/default/textures/green_checkmark.png differ diff --git a/indra/newview/skins/default/textures/red_x.png b/indra/newview/skins/default/textures/red_x.png new file mode 100644 index 000000000..a61202f09 Binary files /dev/null and b/indra/newview/skins/default/textures/red_x.png differ diff --git a/indra/newview/skins/default/xui/en-us/floater_model_preview.xml b/indra/newview/skins/default/xui/en-us/floater_model_preview.xml index 62f5af6e1..ef73295c5 100644 --- a/indra/newview/skins/default/xui/en-us/floater_model_preview.xml +++ b/indra/newview/skins/default/xui/en-us/floater_model_preview.xml @@ -536,6 +536,9 @@ left_delta="100" bottom_delta="0" height="16" width="90"> Server: [SIM] + + Price Breakdown: Streaming: [CURRENCY] [STREAMING] Physics: [CURRENCY] [PHYSICS] Instances: [CURRENCY] [INSTANCES] Textures: [CURRENCY] [TEXTURES] Model: [CURRENCY] [MODEL] + + left="5" bottom_delta="-18" height="16" width="615"> [STATUS] diff --git a/indra/newview/skins/default/xui/fr/panel_preferences_ascent_chat.xml b/indra/newview/skins/default/xui/fr/panel_preferences_ascent_chat.xml index 41c80ba67..ea042b726 100644 --- a/indra/newview/skins/default/xui/fr/panel_preferences_ascent_chat.xml +++ b/indra/newview/skins/default/xui/fr/panel_preferences_ascent_chat.xml @@ -40,10 +40,11 @@ + - + @@ -94,7 +95,7 @@ Et aussi : #n Pour le nom classique, #d Pour le Display, #r Pour la SLURL de vô - Excepté ceux venant de : + Excepté ceux venant de : diff --git a/indra/newview/skins/default/xui/fr/panel_preferences_voice.xml b/indra/newview/skins/default/xui/fr/panel_preferences_voice.xml index 16a485bae..720d0678e 100644 --- a/indra/newview/skins/default/xui/fr/panel_preferences_voice.xml +++ b/indra/newview/skins/default/xui/fr/panel_preferences_voice.xml @@ -2,11 +2,11 @@ Le chat vocal n'est pas disponible - + Ecouter depuis la position de la caméra Ecouter depuis la position de l'avatar - Entendre la voice de maniere égale pour tout le monde. + Entendre la voice de maniere égale pour tout le monde. Appuyer pour parler