From f277aed2186871ad7fd76de3a49348ed5ba94e3b Mon Sep 17 00:00:00 2001 From: Anchor Linden Date: Thu, 24 May 2018 01:17:07 -0700 Subject: [DRTVWR-455] - add new bake testure and tattoo slots --- indra/llprimitive/llprimitive.cpp | 53 ++++++++++++++++++++++++--------------- indra/llprimitive/llprimitive.h | 2 +- 2 files changed, 34 insertions(+), 21 deletions(-) (limited to 'indra/llprimitive') diff --git a/indra/llprimitive/llprimitive.cpp b/indra/llprimitive/llprimitive.cpp index bfa65666b5..6aa6493303 100644 --- a/indra/llprimitive/llprimitive.cpp +++ b/indra/llprimitive/llprimitive.cpp @@ -1029,23 +1029,32 @@ S32 LLPrimitive::packTEField(U8 *cur_ptr, U8 *data_ptr, U8 data_size, U8 last_fa } } - //assign exception faces to cur_ptr - if (exception_faces >= (0x1 << 7)) - { - if (exception_faces >= (0x1 << 14)) - { - if (exception_faces >= (0x1 << 21)) - { - if (exception_faces >= (0x1 << 28)) - { - *cur_ptr++ = (U8)(((exception_faces >> 28) & 0x7F) | 0x80); - } - *cur_ptr++ = (U8)(((exception_faces >> 21) & 0x7F) | 0x80); - } - *cur_ptr++ = (U8)(((exception_faces >> 14) & 0x7F) | 0x80); - } - *cur_ptr++ = (U8)(((exception_faces >> 7) & 0x7F) | 0x80); - } + //assign exception faces to cur_ptr + if (exception_faces >= ((U64)0x1 << 7)) + { + if (exception_faces >= ((U64)0x1 << 14)) + { + if (exception_faces >= ((U64)0x1 << 21)) + { + if (exception_faces >= ((U64)0x1 << 28)) + { + if (exception_faces >= ((U64)0x1 << 35)) + { + if (exception_faces >= ((U64)0x1 << 42)) + { + *cur_ptr++ = (U8)(((exception_faces >> 42) & 0x7F) | 0x80); + } + *cur_ptr++ = (U8)(((exception_faces >> 35) & 0x7F) | 0x80); + } + *cur_ptr++ = (U8)(((exception_faces >> 28) & 0x7F) | 0x80); + } + *cur_ptr++ = (U8)(((exception_faces >> 21) & 0x7F) | 0x80); + } + *cur_ptr++ = (U8)(((exception_faces >> 14) & 0x7F) | 0x80); + } + *cur_ptr++ = (U8)(((exception_faces >> 7) & 0x7F) | 0x80); + } + *cur_ptr++ = (U8)(exception_faces & 0x7F); @@ -1105,7 +1114,7 @@ S32 LLPrimitive::unpackTEField(U8 *cur_ptr, U8 *buffer_end, U8 *data_ptr, U8 dat // Includes information about image ID, color, scale S,T, offset S,T and rotation BOOL LLPrimitive::packTEMessage(LLMessageSystem *mesgsys) const { - const U32 MAX_TES = 32; + const U32 MAX_TES = 42; U8 image_ids[MAX_TES*16]; U8 colors[MAX_TES*4]; @@ -1190,7 +1199,7 @@ BOOL LLPrimitive::packTEMessage(LLMessageSystem *mesgsys) const BOOL LLPrimitive::packTEMessage(LLDataPacker &dp) const { - const U32 MAX_TES = 32; + const U32 MAX_TES = 42; U8 image_ids[MAX_TES*16]; U8 colors[MAX_TES*4]; @@ -1303,6 +1312,8 @@ S32 LLPrimitive::parseTEMessage(LLMessageSystem* mesgsys, char const* block_name mesgsys->getBinaryDataFast(block_name, _PREHASH_TextureEntry, tec.packed_buffer, 0, block_num, LLTEContents::MAX_TE_BUFFER); } + + tec.face_count = llmin((U32)getNumTEs(),(U32)LLTEContents::MAX_TES); U8 *cur_ptr = tec.packed_buffer; @@ -1375,6 +1386,8 @@ S32 LLPrimitive::applyParsedTEMessage(LLTEContents& tec) retval |= setTEColor(i, color); + + } return retval; @@ -1393,7 +1406,7 @@ S32 LLPrimitive::unpackTEMessage(LLDataPacker &dp) { // use a negative block_num to indicate a single-block read (a non-variable block) S32 retval = 0; - const U32 MAX_TES = 32; + const U32 MAX_TES = 42; // Avoid construction of 32 UUIDs per call static LLUUID image_ids[MAX_TES]; diff --git a/indra/llprimitive/llprimitive.h b/indra/llprimitive/llprimitive.h index 19d9d52817..05dbca67c1 100644 --- a/indra/llprimitive/llprimitive.h +++ b/indra/llprimitive/llprimitive.h @@ -297,7 +297,7 @@ public: // - Vir struct LLTEContents { - static const U32 MAX_TES = 32; + static const U32 MAX_TES = 42; U8 image_data[MAX_TES*16]; U8 colors[MAX_TES*4]; -- cgit v1.2.3 From 7abb0c99beec1d356ea03d0733adeab94408df41 Mon Sep 17 00:00:00 2001 From: Anchor Linden Date: Wed, 13 Jun 2018 01:09:27 +0530 Subject: [DRTVWR-476] - add universal head,upper,lower tattoos --- indra/llprimitive/llprimitive.cpp | 10 +++++++--- indra/llprimitive/llprimitive.h | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'indra/llprimitive') diff --git a/indra/llprimitive/llprimitive.cpp b/indra/llprimitive/llprimitive.cpp index 287da346d6..03a79dbbea 100644 --- a/indra/llprimitive/llprimitive.cpp +++ b/indra/llprimitive/llprimitive.cpp @@ -1052,6 +1052,10 @@ S32 LLPrimitive::packTEField(U8 *cur_ptr, U8 *data_ptr, U8 data_size, U8 last_fa { if (exception_faces >= ((U64)0x1 << 42)) { + if (exception_faces >= ((U64)0x1 << 49)) + { + *cur_ptr++ = (U8)(((exception_faces >> 49) & 0x7F) | 0x80); + } *cur_ptr++ = (U8)(((exception_faces >> 42) & 0x7F) | 0x80); } *cur_ptr++ = (U8)(((exception_faces >> 35) & 0x7F) | 0x80); @@ -1124,7 +1128,7 @@ S32 LLPrimitive::unpackTEField(U8 *cur_ptr, U8 *buffer_end, U8 *data_ptr, U8 dat // Includes information about image ID, color, scale S,T, offset S,T and rotation BOOL LLPrimitive::packTEMessage(LLMessageSystem *mesgsys) const { - const U32 MAX_TES = 42; + const U32 MAX_TES = 45; U8 image_ids[MAX_TES*16]; U8 colors[MAX_TES*4]; @@ -1209,7 +1213,7 @@ BOOL LLPrimitive::packTEMessage(LLMessageSystem *mesgsys) const BOOL LLPrimitive::packTEMessage(LLDataPacker &dp) const { - const U32 MAX_TES = 42; + const U32 MAX_TES = 45; U8 image_ids[MAX_TES*16]; U8 colors[MAX_TES*4]; @@ -1416,7 +1420,7 @@ S32 LLPrimitive::unpackTEMessage(LLDataPacker &dp) { // use a negative block_num to indicate a single-block read (a non-variable block) S32 retval = 0; - const U32 MAX_TES = 42; + const U32 MAX_TES = 45; // Avoid construction of 32 UUIDs per call static LLUUID image_ids[MAX_TES]; diff --git a/indra/llprimitive/llprimitive.h b/indra/llprimitive/llprimitive.h index 22d6ade6ac..bb623c8908 100644 --- a/indra/llprimitive/llprimitive.h +++ b/indra/llprimitive/llprimitive.h @@ -297,7 +297,7 @@ public: // - Vir struct LLTEContents { - static const U32 MAX_TES = 42; + static const U32 MAX_TES = 45; U8 image_data[MAX_TES*16]; U8 colors[MAX_TES*4]; -- cgit v1.2.3 From f848271c288ae5ffcba58d6eebd5da73e4d99d1b Mon Sep 17 00:00:00 2001 From: Anchor Linden Date: Tue, 19 Jun 2018 23:04:29 +0530 Subject: fix line endings --- indra/llprimitive/llprimitive.cpp | 58 +++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 29 deletions(-) (limited to 'indra/llprimitive') diff --git a/indra/llprimitive/llprimitive.cpp b/indra/llprimitive/llprimitive.cpp index 03a79dbbea..50b64b2e74 100644 --- a/indra/llprimitive/llprimitive.cpp +++ b/indra/llprimitive/llprimitive.cpp @@ -1039,35 +1039,35 @@ S32 LLPrimitive::packTEField(U8 *cur_ptr, U8 *data_ptr, U8 data_size, U8 last_fa } } - //assign exception faces to cur_ptr - if (exception_faces >= ((U64)0x1 << 7)) - { - if (exception_faces >= ((U64)0x1 << 14)) - { - if (exception_faces >= ((U64)0x1 << 21)) - { - if (exception_faces >= ((U64)0x1 << 28)) - { - if (exception_faces >= ((U64)0x1 << 35)) - { - if (exception_faces >= ((U64)0x1 << 42)) - { - if (exception_faces >= ((U64)0x1 << 49)) - { - *cur_ptr++ = (U8)(((exception_faces >> 49) & 0x7F) | 0x80); - } - *cur_ptr++ = (U8)(((exception_faces >> 42) & 0x7F) | 0x80); - } - *cur_ptr++ = (U8)(((exception_faces >> 35) & 0x7F) | 0x80); - } - *cur_ptr++ = (U8)(((exception_faces >> 28) & 0x7F) | 0x80); - } - *cur_ptr++ = (U8)(((exception_faces >> 21) & 0x7F) | 0x80); - } - *cur_ptr++ = (U8)(((exception_faces >> 14) & 0x7F) | 0x80); - } - *cur_ptr++ = (U8)(((exception_faces >> 7) & 0x7F) | 0x80); - } + //assign exception faces to cur_ptr + if (exception_faces >= ((U64)0x1 << 7)) + { + if (exception_faces >= ((U64)0x1 << 14)) + { + if (exception_faces >= ((U64)0x1 << 21)) + { + if (exception_faces >= ((U64)0x1 << 28)) + { + if (exception_faces >= ((U64)0x1 << 35)) + { + if (exception_faces >= ((U64)0x1 << 42)) + { + if (exception_faces >= ((U64)0x1 << 49)) + { + *cur_ptr++ = (U8)(((exception_faces >> 49) & 0x7F) | 0x80); + } + *cur_ptr++ = (U8)(((exception_faces >> 42) & 0x7F) | 0x80); + } + *cur_ptr++ = (U8)(((exception_faces >> 35) & 0x7F) | 0x80); + } + *cur_ptr++ = (U8)(((exception_faces >> 28) & 0x7F) | 0x80); + } + *cur_ptr++ = (U8)(((exception_faces >> 21) & 0x7F) | 0x80); + } + *cur_ptr++ = (U8)(((exception_faces >> 14) & 0x7F) | 0x80); + } + *cur_ptr++ = (U8)(((exception_faces >> 7) & 0x7F) | 0x80); + } *cur_ptr++ = (U8)(exception_faces & 0x7F); -- cgit v1.2.3