diff options
author | Vadim Savchuk <vsavchuk@productengine.com> | 2010-04-16 15:02:27 +0300 |
---|---|---|
committer | Vadim Savchuk <vsavchuk@productengine.com> | 2010-04-16 15:02:27 +0300 |
commit | 8589d8175e71665237384b36d591d7de7e2fa7dd (patch) | |
tree | 585c9437374da3a48b31501611cf7e3b9189971c /indra | |
parent | 5f49061661a401980aa89195995bfb165b33ff12 (diff) | |
parent | 05116bac35403e6d8f593b7f057602afa057396d (diff) |
Merge from default branch
--HG--
branch : product-engine
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llcommon/llapr.cpp | 11 | ||||
-rw-r--r-- | indra/llcommon/llapr.h | 8 | ||||
-rw-r--r-- | indra/llmath/v2math.h | 9 | ||||
-rw-r--r-- | indra/llrender/llimagegl.cpp | 14 | ||||
-rw-r--r-- | indra/llvfs/lllfsthread.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llviewermessage.cpp | 5 | ||||
-rw-r--r-- | indra/newview/llvoavatar.cpp | 54 | ||||
-rw-r--r-- | indra/newview/llvoavatar.h | 4 | ||||
-rw-r--r-- | indra/newview/llvoavatarself.cpp | 22 | ||||
-rw-r--r-- | indra/newview/llvoavatarself.h | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/de/notifications.xml | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/de/panel_status_bar.xml | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/es/floater_about_land.xml | 4 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/it/panel_group_roles.xml | 12 |
14 files changed, 90 insertions, 65 deletions
diff --git a/indra/llcommon/llapr.cpp b/indra/llcommon/llapr.cpp index ed70b1d9f2..7330b00bcf 100644 --- a/indra/llcommon/llapr.cpp +++ b/indra/llcommon/llapr.cpp @@ -543,14 +543,13 @@ S32 LLAPRFile::readEx(const std::string& filename, void *buf, S32 offset, S32 nb return 0; } - S32 off; - if (offset < 0) - off = LLAPRFile::seek(file_handle, APR_END, 0); - else - off = LLAPRFile::seek(file_handle, APR_SET, offset); + llassert(offset >= 0); + + if (offset > 0) + offset = LLAPRFile::seek(file_handle, APR_SET, offset); apr_size_t bytes_read; - if (off < 0) + if (offset < 0) { bytes_read = 0; } diff --git a/indra/llcommon/llapr.h b/indra/llcommon/llapr.h index b05a222b33..08cf11e593 100644 --- a/indra/llcommon/llapr.h +++ b/indra/llcommon/llapr.h @@ -182,7 +182,7 @@ typedef LLAtomic32<U32> LLAtomicU32; typedef LLAtomic32<S32> LLAtomicS32; // File IO convenience functions. -// Returns NULL if the file fails to openm sets *sizep to file size of not NULL +// Returns NULL if the file fails to open, sets *sizep to file size if not NULL // abbreviated flags #define LL_APR_R (APR_READ) // "r" #define LL_APR_W (APR_CREATE|APR_TRUNCATE|APR_WRITE) // "w" @@ -200,7 +200,7 @@ typedef LLAtomic32<S32> LLAtomicS32; // especially do not put some time-costly operations between open() and close(). // otherwise it might lock the APRFilePool. //there are two different apr_pools the APRFile can use: -// 1, a temperary pool passed to an APRFile function, which is used within this function and only once. +// 1, a temporary pool passed to an APRFile function, which is used within this function and only once. // 2, a global pool. // @@ -255,12 +255,12 @@ public: // Returns bytes read/written, 0 if read/write fails: static S32 readEx(const std::string& filename, void *buf, S32 offset, S32 nbytes, LLVolatileAPRPool* pool = NULL); - static S32 writeEx(const std::string& filename, void *buf, S32 offset, S32 nbytes, LLVolatileAPRPool* pool = NULL); + static S32 writeEx(const std::string& filename, void *buf, S32 offset, S32 nbytes, LLVolatileAPRPool* pool = NULL); // offset<0 means append //******************************************************************************************************************************* }; /** - * @brief Function which approprately logs error or remains quiet on + * @brief Function which appropriately logs error or remains quiet on * APR_SUCCESS. * @return Returns <code>true</code> if status is an error condition. */ diff --git a/indra/llmath/v2math.h b/indra/llmath/v2math.h index 9fef8851cc..65f3714313 100644 --- a/indra/llmath/v2math.h +++ b/indra/llmath/v2math.h @@ -70,6 +70,8 @@ class LLVector2 void setVec(const LLVector2 &vec); // deprecated void setVec(const F32 *vec); // deprecated + inline bool isFinite() const; // checks to see if all values of LLVector2 are finite + F32 length() const; // Returns magnitude of LLVector2 F32 lengthSquared() const; // Returns magnitude squared of LLVector2 F32 normalize(); // Normalizes and returns the magnitude of LLVector2 @@ -215,6 +217,7 @@ inline void LLVector2::setVec(const F32 *vec) mV[VY] = vec[VY]; } + // LLVector2 Magnitude and Normalization Functions inline F32 LLVector2::length(void) const @@ -247,6 +250,12 @@ inline F32 LLVector2::normalize(void) return (mag); } +// checker +inline bool LLVector2::isFinite() const +{ + return (llfinite(mV[VX]) && llfinite(mV[VY])); +} + // deprecated inline F32 LLVector2::magVec(void) const { diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index 8addee606b..ff47c57c70 100644 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -1738,8 +1738,18 @@ BOOL LLImageGL::getMask(const LLVector2 &tc) if (mPickMask) { - F32 u = tc.mV[0] - floorf(tc.mV[0]); - F32 v = tc.mV[1] - floorf(tc.mV[1]); + F32 u,v; + if (LL_LIKELY(tc.isFinite())) + { + u = tc.mV[0] - floorf(tc.mV[0]); + v = tc.mV[1] - floorf(tc.mV[1]); + } + else + { + LL_WARNS_ONCE("render") << "Ugh, non-finite u/v in mask pick" << LL_ENDL; + u = v = 0.f; + llassert(false); + } if (LL_UNLIKELY(u < 0.f || u > 1.f || v < 0.f || v > 1.f)) diff --git a/indra/llvfs/lllfsthread.cpp b/indra/llvfs/lllfsthread.cpp index e85cc437f4..49c198a82d 100644 --- a/indra/llvfs/lllfsthread.cpp +++ b/indra/llvfs/lllfsthread.cpp @@ -188,7 +188,7 @@ bool LLLFSThread::Request::processRequest() if (mOperation == FILE_READ) { llassert(mOffset >= 0); - LLAPRFile infile ; + LLAPRFile infile ; // auto-closes infile.open(mFileName, LL_APR_RB, mThread->getLocalAPRFilePool()); if (!infile.getFileHandle()) { @@ -204,7 +204,6 @@ bool LLLFSThread::Request::processRequest() llassert_always(off >= 0); mBytesRead = infile.read(mBuffer, mBytes ); complete = true; - infile.close() ; // llinfos << "LLLFSThread::READ:" << mFileName << " Bytes: " << mBytesRead << llendl; } else if (mOperation == FILE_WRITE) @@ -212,7 +211,7 @@ bool LLLFSThread::Request::processRequest() apr_int32_t flags = APR_CREATE|APR_WRITE|APR_BINARY; if (mOffset < 0) flags |= APR_APPEND; - LLAPRFile outfile ; + LLAPRFile outfile ; // auto-closes outfile.open(mFileName, flags, mThread->getLocalAPRFilePool()); if (!outfile.getFileHandle()) { @@ -232,7 +231,6 @@ bool LLLFSThread::Request::processRequest() } mBytesRead = outfile.write(mBuffer, mBytes ); complete = true; - // llinfos << "LLLFSThread::WRITE:" << mFileName << " Bytes: " << mBytesRead << "/" << mBytes << " Offset:" << mOffset << llendl; } else diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index f55edd76b0..ab35df1101 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -116,6 +116,11 @@ #include "llnotificationmanager.h" // +#if LL_MSVC +// disable boost::lexical_cast warning +#pragma warning (disable:4702) +#endif + // // Constants // diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index af833db9c3..ba0da9a4c6 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -656,6 +656,7 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id, mNameMute(FALSE), mRenderGroupTitles(sRenderGroupTitles), mNameAppearance(FALSE), + mNameCloud(FALSE), mFirstTEMessageReceived( FALSE ), mFirstAppearanceMessageReceived( FALSE ), mCulled( FALSE ), @@ -2764,25 +2765,20 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) if (mNameText.notNull() && firstname && lastname) { - BOOL is_away = mSignaledAnimations.find(ANIM_AGENT_AWAY) != mSignaledAnimations.end(); - BOOL is_busy = mSignaledAnimations.find(ANIM_AGENT_BUSY) != mSignaledAnimations.end(); - BOOL is_appearance = mSignaledAnimations.find(ANIM_AGENT_CUSTOMIZE) != mSignaledAnimations.end(); - BOOL is_muted; - if (isSelf()) - { - is_muted = FALSE; - } - else - { - is_muted = LLMuteList::getInstance()->isMuted(getID()); - } + const BOOL is_away = mSignaledAnimations.find(ANIM_AGENT_AWAY) != mSignaledAnimations.end(); + const BOOL is_busy = mSignaledAnimations.find(ANIM_AGENT_BUSY) != mSignaledAnimations.end(); + const BOOL is_appearance = mSignaledAnimations.find(ANIM_AGENT_CUSTOMIZE) != mSignaledAnimations.end(); + const BOOL is_muted = isSelf() ? FALSE : LLMuteList::getInstance()->isMuted(getID()); + const BOOL is_cloud = getIsCloud(); if (mNameString.empty() || new_name || (!title && !mTitle.empty()) || (title && mTitle != title->getString()) || (is_away != mNameAway || is_busy != mNameBusy || is_muted != mNameMute) - || is_appearance != mNameAppearance) + || is_appearance != mNameAppearance + || is_cloud != mNameCloud + ) { std::string line; if (!sRenderGroupTitles) @@ -2836,7 +2832,12 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) } line += ")"; } - if (is_appearance) + if (is_cloud) + { + line += "\n"; + line += "(" + LLTrans::getString("LoadingData") + ")"; + } + else if (is_appearance) { line += "\n"; line += LLTrans::getString("AvatarEditingAppearance"); @@ -2845,6 +2846,7 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) mNameBusy = is_busy; mNameMute = is_muted; mNameAppearance = is_appearance; + mNameCloud = is_cloud; mTitle = title ? title->getString() : ""; LLStringFn::replace_ascii_controlchars(mTitle,LL_UNKNOWN_CHAR); mNameString = utf8str_to_wstring(line); @@ -5812,27 +5814,29 @@ BOOL LLVOAvatar::isVisible() const && (mDrawable->isVisible() || mIsDummy); } -// call periodically to keep isFullyLoaded up to date. -// returns true if the value has changed. -BOOL LLVOAvatar::updateIsFullyLoaded() +// Determine if we have enough avatar data to render +BOOL LLVOAvatar::getIsCloud() { - // a "heuristic" to determine if we have enough avatar data to render - // (to avoid rendering a "Ruth" - DEV-3168) - BOOL loading = FALSE; - - // do we have a shape? + // Do we have a shape? if (visualParamWeightsAreDefault()) { - loading = TRUE; + return TRUE; } if (!isTextureDefined(TEX_LOWER_BAKED) || !isTextureDefined(TEX_UPPER_BAKED) || !isTextureDefined(TEX_HEAD_BAKED)) { - loading = TRUE; + return TRUE; } - + return FALSE; +} + +// call periodically to keep isFullyLoaded up to date. +// returns true if the value has changed. +BOOL LLVOAvatar::updateIsFullyLoaded() +{ + const BOOL loading = getIsCloud(); updateRuthTimer(loading); return processFullyLoadedChange(loading); } diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index d5485413f4..55753233b0 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -247,7 +247,8 @@ public: public: BOOL isFullyLoaded() const; protected: - virtual BOOL updateIsFullyLoaded(); + virtual BOOL getIsCloud(); + BOOL updateIsFullyLoaded(); BOOL processFullyLoadedChange(bool loading); void updateRuthTimer(bool loading); F32 calcMorphAmount(); @@ -828,6 +829,7 @@ private: BOOL mNameBusy; BOOL mNameMute; BOOL mNameAppearance; + BOOL mNameCloud; BOOL mRenderGroupTitles; //-------------------------------------------------------------------- diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 8b87254f81..7473adda1f 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -1697,22 +1697,20 @@ void LLVOAvatarSelf::dumpTotalLocalTextureByteCount() llinfos << "Total Avatar LocTex GL:" << (gl_bytes/1024) << "KB" << llendl; } -BOOL LLVOAvatarSelf::updateIsFullyLoaded() +BOOL LLVOAvatarSelf::getIsCloud() { - BOOL loading = FALSE; - // do we have our body parts? if (gAgentWearables.getWearableCount(WT_SHAPE) == 0 || gAgentWearables.getWearableCount(WT_HAIR) == 0 || gAgentWearables.getWearableCount(WT_EYES) == 0 || gAgentWearables.getWearableCount(WT_SKIN) == 0) { - loading = TRUE; + return TRUE; } if (!isTextureDefined(TEX_HAIR, 0)) { - loading = TRUE; + return TRUE; } if (!mPreviousFullyLoaded) @@ -1720,13 +1718,13 @@ BOOL LLVOAvatarSelf::updateIsFullyLoaded() if (!isLocalTextureDataAvailable(mBakedTextureDatas[BAKED_LOWER].mTexLayerSet) && (!isTextureDefined(TEX_LOWER_BAKED, 0))) { - loading = TRUE; + return TRUE; } if (!isLocalTextureDataAvailable(mBakedTextureDatas[BAKED_UPPER].mTexLayerSet) && (!isTextureDefined(TEX_UPPER_BAKED, 0))) { - loading = TRUE; + return TRUE; } for (U32 i = 0; i < mBakedTextureDatas.size(); i++) @@ -1734,23 +1732,23 @@ BOOL LLVOAvatarSelf::updateIsFullyLoaded() if (i == BAKED_SKIRT && !isWearingWearableType(WT_SKIRT)) continue; - BakedTextureData& texture_data = mBakedTextureDatas[i]; + const BakedTextureData& texture_data = mBakedTextureDatas[i]; if (!isTextureDefined(texture_data.mTextureIndex, 0)) continue; // Check for the case that texture is defined but not sufficiently loaded to display anything. - LLViewerTexture* baked_img = getImage( texture_data.mTextureIndex, 0 ); + const LLViewerTexture* baked_img = getImage( texture_data.mTextureIndex, 0 ); if (!baked_img || !baked_img->hasGLTexture()) { - loading = TRUE; + return TRUE; } - } } - return processFullyLoadedChange(loading); + return FALSE; } + const LLUUID& LLVOAvatarSelf::grabLocalTexture(ETextureIndex type, U32 index) const { if (canGrabLocalTexture(type, index)) diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h index 4856e82275..337d445eac 100644 --- a/indra/newview/llvoavatarself.h +++ b/indra/newview/llvoavatarself.h @@ -122,7 +122,7 @@ public: // Loading state //-------------------------------------------------------------------- public: - /*virtual*/ BOOL updateIsFullyLoaded(); + /*virtual*/ BOOL getIsCloud(); private: //-------------------------------------------------------------------- diff --git a/indra/newview/skins/default/xui/de/notifications.xml b/indra/newview/skins/default/xui/de/notifications.xml index c2f25c84b8..97387e9e87 100644 --- a/indra/newview/skins/default/xui/de/notifications.xml +++ b/indra/newview/skins/default/xui/de/notifications.xml @@ -1725,7 +1725,7 @@ Inventarobjekt(e) verschieben? <notification name="ClickActionNotPayable"> Achtung: Die Klickaktion „Objekt bezahlen" wurde eingestellt. Diese funktioniert jedoch nicht, wenn ein Skript mit einer Geldtransaktion () hinzugefügt wird. <form name="form"> - <ignore name="ignore" text="I habe die Aktion „Objekt bezahlen" eingestellt, während ich ein Objekt gebaut habe, dass kein Geld()-Skript enthält."/> + <ignore name="ignore" text="Ich habe die Aktion „Objekt bezahlen" eingestellt, während ich ein Objekt gebaut habe, dass kein Geld()-Skript enthält."/> </form> </notification> <notification name="OpenObjectCannotCopy"> diff --git a/indra/newview/skins/default/xui/de/panel_status_bar.xml b/indra/newview/skins/default/xui/de/panel_status_bar.xml index 803bd1b5ab..0e182fa417 100644 --- a/indra/newview/skins/default/xui/de/panel_status_bar.xml +++ b/indra/newview/skins/default/xui/de/panel_status_bar.xml @@ -22,7 +22,7 @@ [AMT] L$ </panel.string> <button label="" label_selected="" name="buycurrency" tool_tip="Mein Kontostand"/> - <button label=" " name="buyL" tool_tip="Hier klicken, um mehr L$ zu kaufen"/> + <button label="Kaufen" name="buyL" tool_tip="Hier klicken, um mehr L$ zu kaufen"/> <text name="TimeText" tool_tip="Aktuelle Zeit (Pazifik)"> 24:00 H PST </text> diff --git a/indra/newview/skins/default/xui/es/floater_about_land.xml b/indra/newview/skins/default/xui/es/floater_about_land.xml index 49bf2a7442..6118a63872 100644 --- a/indra/newview/skins/default/xui/es/floater_about_land.xml +++ b/indra/newview/skins/default/xui/es/floater_about_land.xml @@ -264,7 +264,7 @@ Vaya al menú Mundo > Acerca del terreno o seleccione otra parcela para ver s [COUNT] </text> <text left="4" name="Autoreturn" width="412"> - Devolución automática de objetos de otros (en min., 0 para desactivarla): + Devolución automát. de objetos de otros (en min., 0 la desactiva): </text> <line_editor name="clean other time" right="-20"/> <text name="Object Owners:" width="150"> @@ -275,7 +275,7 @@ Vaya al menú Mundo > Acerca del terreno o seleccione otra parcela para ver s <name_list name="owner list"> <name_list.columns label="Tipo" name="type"/> <name_list.columns label="Nombre" name="name"/> - <name_list.columns label="Número" name="count"/> + <name_list.columns label="Núm." name="count"/> <name_list.columns label="Más recientes" name="mostrecent"/> </name_list> </panel> diff --git a/indra/newview/skins/default/xui/it/panel_group_roles.xml b/indra/newview/skins/default/xui/it/panel_group_roles.xml index ef6f85390a..1769ef748d 100644 --- a/indra/newview/skins/default/xui/it/panel_group_roles.xml +++ b/indra/newview/skins/default/xui/it/panel_group_roles.xml @@ -6,23 +6,23 @@ <panel.string name="want_apply_text"> Vuoi salvare le modifiche? </panel.string> - <tab_container height="164" name="roles_tab_container"> - <panel height="148" label="MEMBRI" name="members_sub_tab" tool_tip="Membri"> + <tab_container name="roles_tab_container"> + <panel label="MEMBRI" name="members_sub_tab" tool_tip="Membri"> <panel.string name="help_text"> Puoi aggiungere o rimuovere i ruoli assegnati ai membri. Seleziona più membri tenendo premuto il tasto Ctrl e cliccando sui loro nomi. </panel.string> <filter_editor label="Filtra Membri" name="filter_input"/> - <name_list bottom_delta="-105" height="104" name="member_list"> + <name_list name="member_list"> <name_list.columns label="Socio" name="name"/> <name_list.columns label="Donazioni" name="donated"/> <name_list.columns label="Stato" name="online"/> </name_list> - <button label="Invita" name="member_invite" width="165"/> + <button label="Invita" name="member_invite"/> <button label="Espelli" name="member_eject"/> </panel> - <panel height="148" label="RUOLI" name="roles_sub_tab"> + <panel label="RUOLI" name="roles_sub_tab"> <panel.string name="help_text"> I ruoli hanno un titolo con un elenco di abilità permesse che i membri possono eseguire. I membri possono avere @@ -36,7 +36,7 @@ fra cui il ruolo base o "Tutti" e il ruolo del Proprietario, ovvero il Inv_FolderClosed </panel.string> <filter_editor label="Filtra i ruoli" name="filter_input"/> - <scroll_list bottom_delta="-104" height="104" name="role_list"> + <scroll_list name="role_list"> <scroll_list.columns label="Ruolo" name="name"/> <scroll_list.columns label="Titolo" name="title"/> <scroll_list.columns label="#" name="members"/> |