diff options
Diffstat (limited to 'linden/indra/llprimitive')
-rw-r--r-- | linden/indra/llprimitive/legacy_object_types.h | 1 | ||||
-rw-r--r-- | linden/indra/llprimitive/llmaterialtable.cpp | 1 | ||||
-rw-r--r-- | linden/indra/llprimitive/llmaterialtable.h | 1 | ||||
-rw-r--r-- | linden/indra/llprimitive/llprimitive.cpp | 71 | ||||
-rw-r--r-- | linden/indra/llprimitive/llprimitive.h | 1 | ||||
-rw-r--r-- | linden/indra/llprimitive/lltextureanim.cpp | 1 | ||||
-rw-r--r-- | linden/indra/llprimitive/lltextureanim.h | 1 | ||||
-rw-r--r-- | linden/indra/llprimitive/lltextureentry.cpp | 1 | ||||
-rw-r--r-- | linden/indra/llprimitive/lltextureentry.h | 1 | ||||
-rw-r--r-- | linden/indra/llprimitive/lltree_common.h | 1 | ||||
-rw-r--r-- | linden/indra/llprimitive/lltreeparams.cpp | 1 | ||||
-rw-r--r-- | linden/indra/llprimitive/lltreeparams.h | 1 | ||||
-rw-r--r-- | linden/indra/llprimitive/llvolumemessage.cpp | 97 | ||||
-rw-r--r-- | linden/indra/llprimitive/llvolumemessage.h | 1 | ||||
-rw-r--r-- | linden/indra/llprimitive/llvolumexml.cpp | 1 | ||||
-rw-r--r-- | linden/indra/llprimitive/llvolumexml.h | 1 | ||||
-rw-r--r-- | linden/indra/llprimitive/material_codes.h | 1 | ||||
-rw-r--r-- | linden/indra/llprimitive/object_flags.h | 1 |
18 files changed, 103 insertions, 81 deletions
diff --git a/linden/indra/llprimitive/legacy_object_types.h b/linden/indra/llprimitive/legacy_object_types.h index 19af9e6..9cdc632 100644 --- a/linden/indra/llprimitive/legacy_object_types.h +++ b/linden/indra/llprimitive/legacy_object_types.h | |||
@@ -4,6 +4,7 @@ | |||
4 | * | 4 | * |
5 | * Copyright (c) 2001-2007, Linden Research, Inc. | 5 | * Copyright (c) 2001-2007, Linden Research, Inc. |
6 | * | 6 | * |
7 | * Second Life Viewer Source Code | ||
7 | * The source code in this file ("Source Code") is provided by Linden Lab | 8 | * The source code in this file ("Source Code") is provided by Linden Lab |
8 | * to you under the terms of the GNU General Public License, version 2.0 | 9 | * to you under the terms of the GNU General Public License, version 2.0 |
9 | * ("GPL"), unless you have obtained a separate licensing agreement | 10 | * ("GPL"), unless you have obtained a separate licensing agreement |
diff --git a/linden/indra/llprimitive/llmaterialtable.cpp b/linden/indra/llprimitive/llmaterialtable.cpp index 201d0c9..d7ac57a 100644 --- a/linden/indra/llprimitive/llmaterialtable.cpp +++ b/linden/indra/llprimitive/llmaterialtable.cpp | |||
@@ -4,6 +4,7 @@ | |||
4 | * | 4 | * |
5 | * Copyright (c) 2001-2007, Linden Research, Inc. | 5 | * Copyright (c) 2001-2007, Linden Research, Inc. |
6 | * | 6 | * |
7 | * Second Life Viewer Source Code | ||
7 | * The source code in this file ("Source Code") is provided by Linden Lab | 8 | * The source code in this file ("Source Code") is provided by Linden Lab |
8 | * to you under the terms of the GNU General Public License, version 2.0 | 9 | * to you under the terms of the GNU General Public License, version 2.0 |
9 | * ("GPL"), unless you have obtained a separate licensing agreement | 10 | * ("GPL"), unless you have obtained a separate licensing agreement |
diff --git a/linden/indra/llprimitive/llmaterialtable.h b/linden/indra/llprimitive/llmaterialtable.h index a472274..d9596e1 100644 --- a/linden/indra/llprimitive/llmaterialtable.h +++ b/linden/indra/llprimitive/llmaterialtable.h | |||
@@ -4,6 +4,7 @@ | |||
4 | * | 4 | * |
5 | * Copyright (c) 2001-2007, Linden Research, Inc. | 5 | * Copyright (c) 2001-2007, Linden Research, Inc. |
6 | * | 6 | * |
7 | * Second Life Viewer Source Code | ||
7 | * The source code in this file ("Source Code") is provided by Linden Lab | 8 | * The source code in this file ("Source Code") is provided by Linden Lab |
8 | * to you under the terms of the GNU General Public License, version 2.0 | 9 | * to you under the terms of the GNU General Public License, version 2.0 |
9 | * ("GPL"), unless you have obtained a separate licensing agreement | 10 | * ("GPL"), unless you have obtained a separate licensing agreement |
diff --git a/linden/indra/llprimitive/llprimitive.cpp b/linden/indra/llprimitive/llprimitive.cpp index 859a34f..e2cf7e3 100644 --- a/linden/indra/llprimitive/llprimitive.cpp +++ b/linden/indra/llprimitive/llprimitive.cpp | |||
@@ -4,6 +4,7 @@ | |||
4 | * | 4 | * |
5 | * Copyright (c) 2001-2007, Linden Research, Inc. | 5 | * Copyright (c) 2001-2007, Linden Research, Inc. |
6 | * | 6 | * |
7 | * Second Life Viewer Source Code | ||
7 | * The source code in this file ("Source Code") is provided by Linden Lab | 8 | * The source code in this file ("Source Code") is provided by Linden Lab |
8 | * to you under the terms of the GNU General Public License, version 2.0 | 9 | * to you under the terms of the GNU General Public License, version 2.0 |
9 | * ("GPL"), unless you have obtained a separate licensing agreement | 10 | * ("GPL"), unless you have obtained a separate licensing agreement |
@@ -733,7 +734,7 @@ const char * LLPrimitive::pCodeToString(const LLPCode pcode) | |||
733 | snprintf(pcode_string, sizeof(pcode_string), "text bubble"); /* Flawfinder: ignore */ | 734 | snprintf(pcode_string, sizeof(pcode_string), "text bubble"); /* Flawfinder: ignore */ |
734 | break; | 735 | break; |
735 | case LL_PCODE_LEGACY_TREE: | 736 | case LL_PCODE_LEGACY_TREE: |
736 | snprintf(pcode_string, sizeof(pcode_string), "tree"); /* Flawfinder: ignore */ | 737 | snprintf(pcode_string, sizeof(pcode_string), "tree"); /* Flawfinder: ignore */ |
737 | break; | 738 | break; |
738 | case LL_PCODE_TREE_NEW: | 739 | case LL_PCODE_TREE_NEW: |
739 | snprintf(pcode_string, sizeof(pcode_string), "tree_new"); /* Flawfinder: ignore */ | 740 | snprintf(pcode_string, sizeof(pcode_string), "tree_new"); /* Flawfinder: ignore */ |
@@ -764,23 +765,23 @@ const char * LLPrimitive::pCodeToString(const LLPCode pcode) | |||
764 | } | 765 | } |
765 | else if (base_code == LL_PCODE_PYRAMID) | 766 | else if (base_code == LL_PCODE_PYRAMID) |
766 | { | 767 | { |
767 | snprintf(shape, sizeof(shape), "pyramid"); /* Flawfinder: ignore */ | 768 | snprintf(shape, sizeof(shape), "pyramid"); /* Flawfinder: ignore */ |
768 | } | 769 | } |
769 | else if (base_code == LL_PCODE_SPHERE) | 770 | else if (base_code == LL_PCODE_SPHERE) |
770 | { | 771 | { |
771 | snprintf(shape, sizeof(shape), "sphere"); /* Flawfinder: ignore */ | 772 | snprintf(shape, sizeof(shape), "sphere"); /* Flawfinder: ignore */ |
772 | } | 773 | } |
773 | else if (base_code == LL_PCODE_TETRAHEDRON) | 774 | else if (base_code == LL_PCODE_TETRAHEDRON) |
774 | { | 775 | { |
775 | snprintf(shape, sizeof(shape), "tetrahedron"); /* Flawfinder: ignore */ | 776 | snprintf(shape, sizeof(shape), "tetrahedron"); /* Flawfinder: ignore */ |
776 | } | 777 | } |
777 | else if (base_code == LL_PCODE_VOLUME) | 778 | else if (base_code == LL_PCODE_VOLUME) |
778 | { | 779 | { |
779 | snprintf(shape, sizeof(shape), "volume"); /* Flawfinder: ignore */ | 780 | snprintf(shape, sizeof(shape), "volume"); /* Flawfinder: ignore */ |
780 | } | 781 | } |
781 | else if (base_code == LL_PCODE_APP) | 782 | else if (base_code == LL_PCODE_APP) |
782 | { | 783 | { |
783 | snprintf(shape, sizeof(shape), "app"); /* Flawfinder: ignore */ | 784 | snprintf(shape, sizeof(shape), "app"); /* Flawfinder: ignore */ |
784 | } | 785 | } |
785 | else | 786 | else |
786 | { | 787 | { |
@@ -790,15 +791,15 @@ const char * LLPrimitive::pCodeToString(const LLPCode pcode) | |||
790 | U8 mask_code = pcode & (~LL_PCODE_BASE_MASK); | 791 | U8 mask_code = pcode & (~LL_PCODE_BASE_MASK); |
791 | if (base_code == LL_PCODE_APP) | 792 | if (base_code == LL_PCODE_APP) |
792 | { | 793 | { |
793 | snprintf(mask, sizeof(mask), "%x", mask_code); /* Flawfinder: ignore */ | 794 | snprintf(mask, sizeof(mask), "%x", mask_code); /* Flawfinder: ignore */ |
794 | } | 795 | } |
795 | else if (mask_code & LL_PCODE_HEMI_MASK) | 796 | else if (mask_code & LL_PCODE_HEMI_MASK) |
796 | { | 797 | { |
797 | snprintf(mask, sizeof(mask), "hemi"); /* Flawfinder: ignore */ | 798 | snprintf(mask, sizeof(mask), "hemi"); /* Flawfinder: ignore */ |
798 | } | 799 | } |
799 | else if (mask != 0) | 800 | else if (mask != 0) |
800 | { | 801 | { |
801 | snprintf(mask, sizeof(mask), "%x", mask_code); /* Flawfinder: ignore */ | 802 | snprintf(mask, sizeof(mask), "%x", mask_code); /* Flawfinder: ignore */ |
802 | } | 803 | } |
803 | else | 804 | else |
804 | { | 805 | { |
@@ -807,11 +808,11 @@ const char * LLPrimitive::pCodeToString(const LLPCode pcode) | |||
807 | 808 | ||
808 | if (mask[0]) | 809 | if (mask[0]) |
809 | { | 810 | { |
810 | snprintf(pcode_string, sizeof(pcode_string), "%s-%s", shape, mask); /* Flawfinder: ignore */ | 811 | snprintf(pcode_string, sizeof(pcode_string), "%s-%s", shape, mask); /* Flawfinder: ignore */ |
811 | } | 812 | } |
812 | else | 813 | else |
813 | { | 814 | { |
814 | snprintf(pcode_string, sizeof(pcode_string), "%s", shape); /* Flawfinder: ignore */ | 815 | snprintf(pcode_string, sizeof(pcode_string), "%s", shape); /* Flawfinder: ignore */ |
815 | } | 816 | } |
816 | } | 817 | } |
817 | return pcode_string; | 818 | return pcode_string; |
@@ -1279,8 +1280,8 @@ BOOL LLPrimitive::packTEMessage(LLMessageSystem *mesgsys) const | |||
1279 | 1280 | ||
1280 | U8 image_ids[MAX_TES*16]; | 1281 | U8 image_ids[MAX_TES*16]; |
1281 | U8 colors[MAX_TES*4]; | 1282 | U8 colors[MAX_TES*4]; |
1282 | S16 scale_s[MAX_TES]; | 1283 | F32 scale_s[MAX_TES]; |
1283 | S16 scale_t[MAX_TES]; | 1284 | F32 scale_t[MAX_TES]; |
1284 | S16 offset_s[MAX_TES]; | 1285 | S16 offset_s[MAX_TES]; |
1285 | S16 offset_t[MAX_TES]; | 1286 | S16 offset_t[MAX_TES]; |
1286 | S16 image_rot[MAX_TES]; | 1287 | S16 image_rot[MAX_TES]; |
@@ -1315,8 +1316,8 @@ BOOL LLPrimitive::packTEMessage(LLMessageSystem *mesgsys) const | |||
1315 | colors[4*face_index + 3] = 255 - coloru.mV[3]; | 1316 | colors[4*face_index + 3] = 255 - coloru.mV[3]; |
1316 | 1317 | ||
1317 | const LLTextureEntry* te = getTE(face_index); | 1318 | const LLTextureEntry* te = getTE(face_index); |
1318 | scale_s[face_index] = (S16) llround(((llclamp(te->mScaleS,-LL_MAX_SCALE_S, LL_MAX_SCALE_S)-1.0f)/(LL_MAX_SCALE_S+1.f) * (F32)0x7FFF)); | 1319 | scale_s[face_index] = (F32) te->mScaleS; |
1319 | scale_t[face_index] = (S16) llround(((llclamp(te->mScaleT,-LL_MAX_SCALE_T, LL_MAX_SCALE_T)-1.0f)/(LL_MAX_SCALE_T+1.f) * (F32)0x7FFF)); | 1320 | scale_t[face_index] = (F32) te->mScaleT; |
1320 | offset_s[face_index] = (S16) llround((llclamp(te->mOffsetS,-1.0f,1.0f) * (F32)0x7FFF)) ; | 1321 | offset_s[face_index] = (S16) llround((llclamp(te->mOffsetS,-1.0f,1.0f) * (F32)0x7FFF)) ; |
1321 | offset_t[face_index] = (S16) llround((llclamp(te->mOffsetT,-1.0f,1.0f) * (F32)0x7FFF)) ; | 1322 | offset_t[face_index] = (S16) llround((llclamp(te->mOffsetT,-1.0f,1.0f) * (F32)0x7FFF)) ; |
1322 | image_rot[face_index] = (S16) llround(((fmod(te->mRotation, F_TWO_PI)/F_TWO_PI) * (F32)0x7FFF)); | 1323 | image_rot[face_index] = (S16) llround(((fmod(te->mRotation, F_TWO_PI)/F_TWO_PI) * (F32)0x7FFF)); |
@@ -1329,9 +1330,9 @@ BOOL LLPrimitive::packTEMessage(LLMessageSystem *mesgsys) const | |||
1329 | *cur_ptr++ = 0; | 1330 | *cur_ptr++ = 0; |
1330 | cur_ptr += packTEField(cur_ptr, (U8 *)colors, 4 ,last_face_index, MVT_U8); | 1331 | cur_ptr += packTEField(cur_ptr, (U8 *)colors, 4 ,last_face_index, MVT_U8); |
1331 | *cur_ptr++ = 0; | 1332 | *cur_ptr++ = 0; |
1332 | cur_ptr += packTEField(cur_ptr, (U8 *)scale_s, 2 ,last_face_index, MVT_S16Array); | 1333 | cur_ptr += packTEField(cur_ptr, (U8 *)scale_s, 4 ,last_face_index, MVT_F32); |
1333 | *cur_ptr++ = 0; | 1334 | *cur_ptr++ = 0; |
1334 | cur_ptr += packTEField(cur_ptr, (U8 *)scale_t, 2 ,last_face_index, MVT_S16Array); | 1335 | cur_ptr += packTEField(cur_ptr, (U8 *)scale_t, 4 ,last_face_index, MVT_F32); |
1335 | *cur_ptr++ = 0; | 1336 | *cur_ptr++ = 0; |
1336 | cur_ptr += packTEField(cur_ptr, (U8 *)offset_s, 2 ,last_face_index, MVT_S16Array); | 1337 | cur_ptr += packTEField(cur_ptr, (U8 *)offset_s, 2 ,last_face_index, MVT_S16Array); |
1337 | *cur_ptr++ = 0; | 1338 | *cur_ptr++ = 0; |
@@ -1355,8 +1356,8 @@ BOOL LLPrimitive::packTEMessage(LLDataPacker &dp) const | |||
1355 | 1356 | ||
1356 | U8 image_ids[MAX_TES*16]; | 1357 | U8 image_ids[MAX_TES*16]; |
1357 | U8 colors[MAX_TES*4]; | 1358 | U8 colors[MAX_TES*4]; |
1358 | S16 scale_s[MAX_TES]; | 1359 | F32 scale_s[MAX_TES]; |
1359 | S16 scale_t[MAX_TES]; | 1360 | F32 scale_t[MAX_TES]; |
1360 | S16 offset_s[MAX_TES]; | 1361 | S16 offset_s[MAX_TES]; |
1361 | S16 offset_t[MAX_TES]; | 1362 | S16 offset_t[MAX_TES]; |
1362 | S16 image_rot[MAX_TES]; | 1363 | S16 image_rot[MAX_TES]; |
@@ -1391,8 +1392,8 @@ BOOL LLPrimitive::packTEMessage(LLDataPacker &dp) const | |||
1391 | colors[4*face_index + 3] = 255 - coloru.mV[3]; | 1392 | colors[4*face_index + 3] = 255 - coloru.mV[3]; |
1392 | 1393 | ||
1393 | const LLTextureEntry* te = getTE(face_index); | 1394 | const LLTextureEntry* te = getTE(face_index); |
1394 | scale_s[face_index] = (S16) llround(((llclamp(te->mScaleS,-LL_MAX_SCALE_S, LL_MAX_SCALE_S)-1.0f)/(LL_MAX_SCALE_S+1.f) * (F32)0x7FFF)); | 1395 | scale_s[face_index] = (F32) te->mScaleS; |
1395 | scale_t[face_index] = (S16) llround(((llclamp(te->mScaleT,-LL_MAX_SCALE_T, LL_MAX_SCALE_T)-1.0f)/(LL_MAX_SCALE_T+1.f) * (F32)0x7FFF)); | 1396 | scale_t[face_index] = (F32) te->mScaleT; |
1396 | offset_s[face_index] = (S16) llround((llclamp(te->mOffsetS,-1.0f,1.0f) * (F32)0x7FFF)) ; | 1397 | offset_s[face_index] = (S16) llround((llclamp(te->mOffsetS,-1.0f,1.0f) * (F32)0x7FFF)) ; |
1397 | offset_t[face_index] = (S16) llround((llclamp(te->mOffsetT,-1.0f,1.0f) * (F32)0x7FFF)) ; | 1398 | offset_t[face_index] = (S16) llround((llclamp(te->mOffsetT,-1.0f,1.0f) * (F32)0x7FFF)) ; |
1398 | image_rot[face_index] = (S16) llround(((fmod(te->mRotation, F_TWO_PI)/F_TWO_PI) * (F32)0x7FFF)); | 1399 | image_rot[face_index] = (S16) llround(((fmod(te->mRotation, F_TWO_PI)/F_TWO_PI) * (F32)0x7FFF)); |
@@ -1406,9 +1407,9 @@ BOOL LLPrimitive::packTEMessage(LLDataPacker &dp) const | |||
1406 | *cur_ptr++ = 0; | 1407 | *cur_ptr++ = 0; |
1407 | cur_ptr += packTEField(cur_ptr, (U8 *)colors, 4 ,last_face_index, MVT_U8); | 1408 | cur_ptr += packTEField(cur_ptr, (U8 *)colors, 4 ,last_face_index, MVT_U8); |
1408 | *cur_ptr++ = 0; | 1409 | *cur_ptr++ = 0; |
1409 | cur_ptr += packTEField(cur_ptr, (U8 *)scale_s, 2 ,last_face_index, MVT_S16Array); | 1410 | cur_ptr += packTEField(cur_ptr, (U8 *)scale_s, 4 ,last_face_index, MVT_F32); |
1410 | *cur_ptr++ = 0; | 1411 | *cur_ptr++ = 0; |
1411 | cur_ptr += packTEField(cur_ptr, (U8 *)scale_t, 2 ,last_face_index, MVT_S16Array); | 1412 | cur_ptr += packTEField(cur_ptr, (U8 *)scale_t, 4 ,last_face_index, MVT_F32); |
1412 | *cur_ptr++ = 0; | 1413 | *cur_ptr++ = 0; |
1413 | cur_ptr += packTEField(cur_ptr, (U8 *)offset_s, 2 ,last_face_index, MVT_S16Array); | 1414 | cur_ptr += packTEField(cur_ptr, (U8 *)offset_s, 2 ,last_face_index, MVT_S16Array); |
1414 | *cur_ptr++ = 0; | 1415 | *cur_ptr++ = 0; |
@@ -1440,8 +1441,8 @@ S32 LLPrimitive::unpackTEMessage(LLMessageSystem *mesgsys, char *block_name, con | |||
1440 | 1441 | ||
1441 | U8 image_data[MAX_TES*16]; | 1442 | U8 image_data[MAX_TES*16]; |
1442 | U8 colors[MAX_TES*4]; | 1443 | U8 colors[MAX_TES*4]; |
1443 | S16 scale_s[MAX_TES]; | 1444 | F32 scale_s[MAX_TES]; |
1444 | S16 scale_t[MAX_TES]; | 1445 | F32 scale_t[MAX_TES]; |
1445 | S16 offset_s[MAX_TES]; | 1446 | S16 offset_s[MAX_TES]; |
1446 | S16 offset_t[MAX_TES]; | 1447 | S16 offset_t[MAX_TES]; |
1447 | S16 image_rot[MAX_TES]; | 1448 | S16 image_rot[MAX_TES]; |
@@ -1484,9 +1485,9 @@ S32 LLPrimitive::unpackTEMessage(LLMessageSystem *mesgsys, char *block_name, con | |||
1484 | cur_ptr++; | 1485 | cur_ptr++; |
1485 | cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)colors, 4, face_count, MVT_U8); | 1486 | cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)colors, 4, face_count, MVT_U8); |
1486 | cur_ptr++; | 1487 | cur_ptr++; |
1487 | cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)scale_s, 2, face_count, MVT_S16Array); | 1488 | cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)scale_s, 4, face_count, MVT_F32); |
1488 | cur_ptr++; | 1489 | cur_ptr++; |
1489 | cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)scale_t, 2, face_count, MVT_S16Array); | 1490 | cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)scale_t, 4, face_count, MVT_F32); |
1490 | cur_ptr++; | 1491 | cur_ptr++; |
1491 | cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)offset_s, 2, face_count, MVT_S16Array); | 1492 | cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)offset_s, 2, face_count, MVT_S16Array); |
1492 | cur_ptr++; | 1493 | cur_ptr++; |
@@ -1503,9 +1504,7 @@ S32 LLPrimitive::unpackTEMessage(LLMessageSystem *mesgsys, char *block_name, con | |||
1503 | for (U32 i = 0; i < face_count; i++) | 1504 | for (U32 i = 0; i < face_count; i++) |
1504 | { | 1505 | { |
1505 | retval |= setTETexture(i, ((LLUUID*)image_data)[i]); | 1506 | retval |= setTETexture(i, ((LLUUID*)image_data)[i]); |
1506 | retval |= setTEScale(i, | 1507 | retval |= setTEScale(i, scale_s[i], scale_t[i]); |
1507 | floor((1.0f + ((((F32)scale_s[i] / (F32)0x7FFF)) * (LL_MAX_SCALE_S+1.f))) * 100.f + 0.5f) / 100.f, | ||
1508 | floor((1.0f + ((((F32)scale_t[i] / (F32)0x7FFF)) * (LL_MAX_SCALE_T+1.f))) * 100.f + 0.5f) / 100.f); | ||
1509 | retval |= setTEOffset(i, (F32)offset_s[i] / (F32)0x7FFF, (F32) offset_t[i] / (F32) 0x7FFF); | 1508 | retval |= setTEOffset(i, (F32)offset_s[i] / (F32)0x7FFF, (F32) offset_t[i] / (F32) 0x7FFF); |
1510 | retval |= setTERotation(i, ((F32)image_rot[i]/ (F32)0x7FFF) * F_TWO_PI); | 1509 | retval |= setTERotation(i, ((F32)image_rot[i]/ (F32)0x7FFF) * F_TWO_PI); |
1511 | retval |= setTEBumpShinyFullbright(i, bump[i]); | 1510 | retval |= setTEBumpShinyFullbright(i, bump[i]); |
@@ -1537,8 +1536,8 @@ S32 LLPrimitive::unpackTEMessage(LLDataPacker &dp) | |||
1537 | 1536 | ||
1538 | U8 image_data[MAX_TES*16]; | 1537 | U8 image_data[MAX_TES*16]; |
1539 | U8 colors[MAX_TES*4]; | 1538 | U8 colors[MAX_TES*4]; |
1540 | S16 scale_s[MAX_TES]; | 1539 | F32 scale_s[MAX_TES]; |
1541 | S16 scale_t[MAX_TES]; | 1540 | F32 scale_t[MAX_TES]; |
1542 | S16 offset_s[MAX_TES]; | 1541 | S16 offset_s[MAX_TES]; |
1543 | S16 offset_t[MAX_TES]; | 1542 | S16 offset_t[MAX_TES]; |
1544 | S16 image_rot[MAX_TES]; | 1543 | S16 image_rot[MAX_TES]; |
@@ -1571,9 +1570,9 @@ S32 LLPrimitive::unpackTEMessage(LLDataPacker &dp) | |||
1571 | cur_ptr++; | 1570 | cur_ptr++; |
1572 | cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)colors, 4, face_count, MVT_U8); | 1571 | cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)colors, 4, face_count, MVT_U8); |
1573 | cur_ptr++; | 1572 | cur_ptr++; |
1574 | cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)scale_s, 2, face_count, MVT_S16Array); | 1573 | cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)scale_s, 4, face_count, MVT_F32); |
1575 | cur_ptr++; | 1574 | cur_ptr++; |
1576 | cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)scale_t, 2, face_count, MVT_S16Array); | 1575 | cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)scale_t, 4, face_count, MVT_F32); |
1577 | cur_ptr++; | 1576 | cur_ptr++; |
1578 | cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)offset_s, 2, face_count, MVT_S16Array); | 1577 | cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)offset_s, 2, face_count, MVT_S16Array); |
1579 | cur_ptr++; | 1578 | cur_ptr++; |
@@ -1596,9 +1595,7 @@ S32 LLPrimitive::unpackTEMessage(LLDataPacker &dp) | |||
1596 | for (i = 0; i < face_count; i++) | 1595 | for (i = 0; i < face_count; i++) |
1597 | { | 1596 | { |
1598 | retval |= setTETexture(i, image_ids[i]); | 1597 | retval |= setTETexture(i, image_ids[i]); |
1599 | retval |= setTEScale(i, | 1598 | retval |= setTEScale(i, scale_s[i], scale_t[i]); |
1600 | floor((1.0f + ((((F32)scale_s[i] / (F32)0x7FFF)) * (LL_MAX_SCALE_S+1.f))) * 100.f + 0.5f) / 100.f, | ||
1601 | floor((1.0f + ((((F32)scale_t[i] / (F32)0x7FFF)) * (LL_MAX_SCALE_T+1.f))) * 100.f + 0.5f) / 100.f); | ||
1602 | retval |= setTEOffset(i, (F32)offset_s[i] / (F32)0x7FFF, (F32) offset_t[i] / (F32) 0x7FFF); | 1599 | retval |= setTEOffset(i, (F32)offset_s[i] / (F32)0x7FFF, (F32) offset_t[i] / (F32) 0x7FFF); |
1603 | retval |= setTERotation(i, ((F32)image_rot[i]/ (F32)0x7FFF) * F_TWO_PI); | 1600 | retval |= setTERotation(i, ((F32)image_rot[i]/ (F32)0x7FFF) * F_TWO_PI); |
1604 | retval |= setTEBumpShinyFullbright(i, bump[i]); | 1601 | retval |= setTEBumpShinyFullbright(i, bump[i]); |
diff --git a/linden/indra/llprimitive/llprimitive.h b/linden/indra/llprimitive/llprimitive.h index 953d284..89e6623 100644 --- a/linden/indra/llprimitive/llprimitive.h +++ b/linden/indra/llprimitive/llprimitive.h | |||
@@ -4,6 +4,7 @@ | |||
4 | * | 4 | * |
5 | * Copyright (c) 2001-2007, Linden Research, Inc. | 5 | * Copyright (c) 2001-2007, Linden Research, Inc. |
6 | * | 6 | * |
7 | * Second Life Viewer Source Code | ||
7 | * The source code in this file ("Source Code") is provided by Linden Lab | 8 | * The source code in this file ("Source Code") is provided by Linden Lab |
8 | * to you under the terms of the GNU General Public License, version 2.0 | 9 | * to you under the terms of the GNU General Public License, version 2.0 |
9 | * ("GPL"), unless you have obtained a separate licensing agreement | 10 | * ("GPL"), unless you have obtained a separate licensing agreement |
diff --git a/linden/indra/llprimitive/lltextureanim.cpp b/linden/indra/llprimitive/lltextureanim.cpp index b496463..e373a29 100644 --- a/linden/indra/llprimitive/lltextureanim.cpp +++ b/linden/indra/llprimitive/lltextureanim.cpp | |||
@@ -4,6 +4,7 @@ | |||
4 | * | 4 | * |
5 | * Copyright (c) 2001-2007, Linden Research, Inc. | 5 | * Copyright (c) 2001-2007, Linden Research, Inc. |
6 | * | 6 | * |
7 | * Second Life Viewer Source Code | ||
7 | * The source code in this file ("Source Code") is provided by Linden Lab | 8 | * The source code in this file ("Source Code") is provided by Linden Lab |
8 | * to you under the terms of the GNU General Public License, version 2.0 | 9 | * to you under the terms of the GNU General Public License, version 2.0 |
9 | * ("GPL"), unless you have obtained a separate licensing agreement | 10 | * ("GPL"), unless you have obtained a separate licensing agreement |
diff --git a/linden/indra/llprimitive/lltextureanim.h b/linden/indra/llprimitive/lltextureanim.h index b47d492..502cf54 100644 --- a/linden/indra/llprimitive/lltextureanim.h +++ b/linden/indra/llprimitive/lltextureanim.h | |||
@@ -4,6 +4,7 @@ | |||
4 | * | 4 | * |
5 | * Copyright (c) 2001-2007, Linden Research, Inc. | 5 | * Copyright (c) 2001-2007, Linden Research, Inc. |
6 | * | 6 | * |
7 | * Second Life Viewer Source Code | ||
7 | * The source code in this file ("Source Code") is provided by Linden Lab | 8 | * The source code in this file ("Source Code") is provided by Linden Lab |
8 | * to you under the terms of the GNU General Public License, version 2.0 | 9 | * to you under the terms of the GNU General Public License, version 2.0 |
9 | * ("GPL"), unless you have obtained a separate licensing agreement | 10 | * ("GPL"), unless you have obtained a separate licensing agreement |
diff --git a/linden/indra/llprimitive/lltextureentry.cpp b/linden/indra/llprimitive/lltextureentry.cpp index 5099eef..81bfd6f 100644 --- a/linden/indra/llprimitive/lltextureentry.cpp +++ b/linden/indra/llprimitive/lltextureentry.cpp | |||
@@ -4,6 +4,7 @@ | |||
4 | * | 4 | * |
5 | * Copyright (c) 2001-2007, Linden Research, Inc. | 5 | * Copyright (c) 2001-2007, Linden Research, Inc. |
6 | * | 6 | * |
7 | * Second Life Viewer Source Code | ||
7 | * The source code in this file ("Source Code") is provided by Linden Lab | 8 | * The source code in this file ("Source Code") is provided by Linden Lab |
8 | * to you under the terms of the GNU General Public License, version 2.0 | 9 | * to you under the terms of the GNU General Public License, version 2.0 |
9 | * ("GPL"), unless you have obtained a separate licensing agreement | 10 | * ("GPL"), unless you have obtained a separate licensing agreement |
diff --git a/linden/indra/llprimitive/lltextureentry.h b/linden/indra/llprimitive/lltextureentry.h index b06f9a1..861b585 100644 --- a/linden/indra/llprimitive/lltextureentry.h +++ b/linden/indra/llprimitive/lltextureentry.h | |||
@@ -4,6 +4,7 @@ | |||
4 | * | 4 | * |
5 | * Copyright (c) 2001-2007, Linden Research, Inc. | 5 | * Copyright (c) 2001-2007, Linden Research, Inc. |
6 | * | 6 | * |
7 | * Second Life Viewer Source Code | ||
7 | * The source code in this file ("Source Code") is provided by Linden Lab | 8 | * The source code in this file ("Source Code") is provided by Linden Lab |
8 | * to you under the terms of the GNU General Public License, version 2.0 | 9 | * to you under the terms of the GNU General Public License, version 2.0 |
9 | * ("GPL"), unless you have obtained a separate licensing agreement | 10 | * ("GPL"), unless you have obtained a separate licensing agreement |
diff --git a/linden/indra/llprimitive/lltree_common.h b/linden/indra/llprimitive/lltree_common.h index 0904f9d..f9594e2 100644 --- a/linden/indra/llprimitive/lltree_common.h +++ b/linden/indra/llprimitive/lltree_common.h | |||
@@ -4,6 +4,7 @@ | |||
4 | * | 4 | * |
5 | * Copyright (c) 2001-2007, Linden Research, Inc. | 5 | * Copyright (c) 2001-2007, Linden Research, Inc. |
6 | * | 6 | * |
7 | * Second Life Viewer Source Code | ||
7 | * The source code in this file ("Source Code") is provided by Linden Lab | 8 | * The source code in this file ("Source Code") is provided by Linden Lab |
8 | * to you under the terms of the GNU General Public License, version 2.0 | 9 | * to you under the terms of the GNU General Public License, version 2.0 |
9 | * ("GPL"), unless you have obtained a separate licensing agreement | 10 | * ("GPL"), unless you have obtained a separate licensing agreement |
diff --git a/linden/indra/llprimitive/lltreeparams.cpp b/linden/indra/llprimitive/lltreeparams.cpp index ce52cae..fde21f0 100644 --- a/linden/indra/llprimitive/lltreeparams.cpp +++ b/linden/indra/llprimitive/lltreeparams.cpp | |||
@@ -4,6 +4,7 @@ | |||
4 | * | 4 | * |
5 | * Copyright (c) 2001-2007, Linden Research, Inc. | 5 | * Copyright (c) 2001-2007, Linden Research, Inc. |
6 | * | 6 | * |
7 | * Second Life Viewer Source Code | ||
7 | * The source code in this file ("Source Code") is provided by Linden Lab | 8 | * The source code in this file ("Source Code") is provided by Linden Lab |
8 | * to you under the terms of the GNU General Public License, version 2.0 | 9 | * to you under the terms of the GNU General Public License, version 2.0 |
9 | * ("GPL"), unless you have obtained a separate licensing agreement | 10 | * ("GPL"), unless you have obtained a separate licensing agreement |
diff --git a/linden/indra/llprimitive/lltreeparams.h b/linden/indra/llprimitive/lltreeparams.h index 7822d31..29bbc9a 100644 --- a/linden/indra/llprimitive/lltreeparams.h +++ b/linden/indra/llprimitive/lltreeparams.h | |||
@@ -4,6 +4,7 @@ | |||
4 | * | 4 | * |
5 | * Copyright (c) 2001-2007, Linden Research, Inc. | 5 | * Copyright (c) 2001-2007, Linden Research, Inc. |
6 | * | 6 | * |
7 | * Second Life Viewer Source Code | ||
7 | * The source code in this file ("Source Code") is provided by Linden Lab | 8 | * The source code in this file ("Source Code") is provided by Linden Lab |
8 | * to you under the terms of the GNU General Public License, version 2.0 | 9 | * to you under the terms of the GNU General Public License, version 2.0 |
9 | * ("GPL"), unless you have obtained a separate licensing agreement | 10 | * ("GPL"), unless you have obtained a separate licensing agreement |
diff --git a/linden/indra/llprimitive/llvolumemessage.cpp b/linden/indra/llprimitive/llvolumemessage.cpp index b00bbc5..650e0cd 100644 --- a/linden/indra/llprimitive/llvolumemessage.cpp +++ b/linden/indra/llprimitive/llvolumemessage.cpp | |||
@@ -4,6 +4,7 @@ | |||
4 | * | 4 | * |
5 | * Copyright (c) 2001-2007, Linden Research, Inc. | 5 | * Copyright (c) 2001-2007, Linden Research, Inc. |
6 | * | 6 | * |
7 | * Second Life Viewer Source Code | ||
7 | * The source code in this file ("Source Code") is provided by Linden Lab | 8 | * The source code in this file ("Source Code") is provided by Linden Lab |
8 | * to you under the terms of the GNU General Public License, version 2.0 | 9 | * to you under the terms of the GNU General Public License, version 2.0 |
9 | * ("GPL"), unless you have obtained a separate licensing agreement | 10 | * ("GPL"), unless you have obtained a separate licensing agreement |
@@ -42,23 +43,25 @@ bool LLVolumeMessage::packProfileParams( | |||
42 | LLMessageSystem *mesgsys) | 43 | LLMessageSystem *mesgsys) |
43 | { | 44 | { |
44 | // Default to cylinder | 45 | // Default to cylinder |
45 | static LLProfileParams defaultparams(LL_PCODE_PROFILE_CIRCLE, U8(0), U8(0), U8(0)); | 46 | static LLProfileParams defaultparams(LL_PCODE_PROFILE_CIRCLE, U16(0), U16(0), U16(0)); |
46 | 47 | ||
47 | if (!params) | 48 | if (!params) |
48 | params = &defaultparams; | 49 | params = &defaultparams; |
49 | 50 | ||
50 | U8 tempU8; | 51 | U8 tempU8; |
52 | U16 tempU16; | ||
53 | |||
51 | tempU8 = params->getCurveType(); | 54 | tempU8 = params->getCurveType(); |
52 | mesgsys->addU8Fast(_PREHASH_ProfileCurve, tempU8); | 55 | mesgsys->addU8Fast(_PREHASH_ProfileCurve, tempU8); |
53 | 56 | ||
54 | tempU8 = (U8) llround( params->getBegin() / CUT_QUANTA); | 57 | tempU16 = (U16) llround( params->getBegin() / CUT_QUANTA); |
55 | mesgsys->addU8Fast(_PREHASH_ProfileBegin, tempU8); | 58 | mesgsys->addU16Fast(_PREHASH_ProfileBegin, tempU16); |
56 | 59 | ||
57 | tempU8 = 200 - (U8) llround(params->getEnd() / CUT_QUANTA); | 60 | tempU16 = 50000 - (U16) llround(params->getEnd() / CUT_QUANTA); |
58 | mesgsys->addU8Fast(_PREHASH_ProfileEnd, tempU8); | 61 | mesgsys->addU16Fast(_PREHASH_ProfileEnd, tempU16); |
59 | 62 | ||
60 | tempU8 = (S8) llround(params->getHollow() / SHEAR_QUANTA); | 63 | tempU16 = (U16) llround(params->getHollow() / HOLLOW_QUANTA); |
61 | mesgsys->addU8Fast(_PREHASH_ProfileHollow, tempU8); | 64 | mesgsys->addU16Fast(_PREHASH_ProfileHollow, tempU16); |
62 | 65 | ||
63 | return true; | 66 | return true; |
64 | } | 67 | } |
@@ -68,23 +71,25 @@ bool LLVolumeMessage::packProfileParams( | |||
68 | LLDataPacker &dp) | 71 | LLDataPacker &dp) |
69 | { | 72 | { |
70 | // Default to cylinder | 73 | // Default to cylinder |
71 | static LLProfileParams defaultparams(LL_PCODE_PROFILE_CIRCLE, U8(0), U8(0), U8(0)); | 74 | static LLProfileParams defaultparams(LL_PCODE_PROFILE_CIRCLE, U16(0), U16(0), U16(0)); |
72 | 75 | ||
73 | if (!params) | 76 | if (!params) |
74 | params = &defaultparams; | 77 | params = &defaultparams; |
75 | 78 | ||
76 | U8 tempU8; | 79 | U8 tempU8; |
80 | U16 tempU16; | ||
81 | |||
77 | tempU8 = params->getCurveType(); | 82 | tempU8 = params->getCurveType(); |
78 | dp.packU8(tempU8, "Curve"); | 83 | dp.packU8(tempU8, "Curve"); |
79 | 84 | ||
80 | tempU8 = (U8) llround( params->getBegin() / CUT_QUANTA); | 85 | tempU16 = (U16) llround( params->getBegin() / CUT_QUANTA); |
81 | dp.packU8(tempU8, "Begin"); | 86 | dp.packU16(tempU16, "Begin"); |
82 | 87 | ||
83 | tempU8 = 200 - (U8) llround(params->getEnd() / CUT_QUANTA); | 88 | tempU16 = 50000 - (U16) llround(params->getEnd() / CUT_QUANTA); |
84 | dp.packU8(tempU8, "End"); | 89 | dp.packU16(tempU16, "End"); |
85 | 90 | ||
86 | tempU8 = (S8) llround(params->getHollow() / SHEAR_QUANTA); | 91 | tempU16 = (U16) llround(params->getHollow() / HOLLOW_QUANTA); |
87 | dp.packU8(tempU8, "Hollow"); | 92 | dp.packU16(tempU16, "Hollow"); |
88 | return true; | 93 | return true; |
89 | } | 94 | } |
90 | 95 | ||
@@ -96,13 +101,14 @@ bool LLVolumeMessage::unpackProfileParams( | |||
96 | { | 101 | { |
97 | bool ok = true; | 102 | bool ok = true; |
98 | U8 temp_u8; | 103 | U8 temp_u8; |
104 | U16 temp_u16; | ||
99 | F32 temp_f32; | 105 | F32 temp_f32; |
100 | 106 | ||
101 | mesgsys->getU8Fast(block_name, _PREHASH_ProfileCurve, temp_u8, block_num); | 107 | mesgsys->getU8Fast(block_name, _PREHASH_ProfileCurve, temp_u8, block_num); |
102 | params->setCurveType(temp_u8); | 108 | params->setCurveType(temp_u8); |
103 | 109 | ||
104 | mesgsys->getU8Fast(block_name, _PREHASH_ProfileBegin, temp_u8, block_num); | 110 | mesgsys->getU16Fast(block_name, _PREHASH_ProfileBegin, temp_u16, block_num); |
105 | temp_f32 = temp_u8 * CUT_QUANTA; | 111 | temp_f32 = temp_u16 * CUT_QUANTA; |
106 | if (temp_f32 > 1.f) | 112 | if (temp_f32 > 1.f) |
107 | { | 113 | { |
108 | llwarns << "Profile begin out of range: " << temp_f32 | 114 | llwarns << "Profile begin out of range: " << temp_f32 |
@@ -112,8 +118,8 @@ bool LLVolumeMessage::unpackProfileParams( | |||
112 | } | 118 | } |
113 | params->setBegin(temp_f32); | 119 | params->setBegin(temp_f32); |
114 | 120 | ||
115 | mesgsys->getU8Fast(block_name, _PREHASH_ProfileEnd, temp_u8, block_num); | 121 | mesgsys->getU16Fast(block_name, _PREHASH_ProfileEnd, temp_u16, block_num); |
116 | temp_f32 = temp_u8 * CUT_QUANTA; | 122 | temp_f32 = temp_u16 * CUT_QUANTA; |
117 | if (temp_f32 > 1.f) | 123 | if (temp_f32 > 1.f) |
118 | { | 124 | { |
119 | llwarns << "Profile end out of range: " << 1.f - temp_f32 | 125 | llwarns << "Profile end out of range: " << 1.f - temp_f32 |
@@ -123,8 +129,8 @@ bool LLVolumeMessage::unpackProfileParams( | |||
123 | } | 129 | } |
124 | params->setEnd(1.f - temp_f32); | 130 | params->setEnd(1.f - temp_f32); |
125 | 131 | ||
126 | mesgsys->getU8Fast(block_name, _PREHASH_ProfileHollow, temp_u8, block_num); | 132 | mesgsys->getU16Fast(block_name, _PREHASH_ProfileHollow, temp_u16, block_num); |
127 | temp_f32 = temp_u8 * SCALE_QUANTA; | 133 | temp_f32 = temp_u16 * HOLLOW_QUANTA; |
128 | if (temp_f32 > 1.f) | 134 | if (temp_f32 > 1.f) |
129 | { | 135 | { |
130 | llwarns << "Profile hollow out of range: " << temp_f32 | 136 | llwarns << "Profile hollow out of range: " << temp_f32 |
@@ -151,13 +157,14 @@ bool LLVolumeMessage::unpackProfileParams( | |||
151 | { | 157 | { |
152 | bool ok = true; | 158 | bool ok = true; |
153 | U8 temp_u8; | 159 | U8 temp_u8; |
160 | U16 temp_u16; | ||
154 | F32 temp_f32; | 161 | F32 temp_f32; |
155 | 162 | ||
156 | dp.unpackU8(temp_u8, "Curve"); | 163 | dp.unpackU8(temp_u8, "Curve"); |
157 | params->setCurveType(temp_u8); | 164 | params->setCurveType(temp_u8); |
158 | 165 | ||
159 | dp.unpackU8(temp_u8, "Begin"); | 166 | dp.unpackU16(temp_u16, "Begin"); |
160 | temp_f32 = temp_u8 * CUT_QUANTA; | 167 | temp_f32 = temp_u16 * CUT_QUANTA; |
161 | if (temp_f32 > 1.f) | 168 | if (temp_f32 > 1.f) |
162 | { | 169 | { |
163 | llwarns << "Profile begin out of range: " << temp_f32 << llendl; | 170 | llwarns << "Profile begin out of range: " << temp_f32 << llendl; |
@@ -167,8 +174,8 @@ bool LLVolumeMessage::unpackProfileParams( | |||
167 | } | 174 | } |
168 | params->setBegin(temp_f32); | 175 | params->setBegin(temp_f32); |
169 | 176 | ||
170 | dp.unpackU8(temp_u8, "End"); | 177 | dp.unpackU16(temp_u16, "End"); |
171 | temp_f32 = temp_u8 * CUT_QUANTA; | 178 | temp_f32 = temp_u16 * CUT_QUANTA; |
172 | if (temp_f32 > 1.f) | 179 | if (temp_f32 > 1.f) |
173 | { | 180 | { |
174 | llwarns << "Profile end out of range: " << 1.f - temp_f32 << llendl; | 181 | llwarns << "Profile end out of range: " << 1.f - temp_f32 << llendl; |
@@ -178,8 +185,8 @@ bool LLVolumeMessage::unpackProfileParams( | |||
178 | } | 185 | } |
179 | params->setEnd(1.f - temp_f32); | 186 | params->setEnd(1.f - temp_f32); |
180 | 187 | ||
181 | dp.unpackU8(temp_u8, "Hollow"); | 188 | dp.unpackU16(temp_u16, "Hollow"); |
182 | temp_f32 = temp_u8 * SCALE_QUANTA; | 189 | temp_f32 = temp_u16 * HOLLOW_QUANTA; |
183 | if (temp_f32 > 1.f) | 190 | if (temp_f32 > 1.f) |
184 | { | 191 | { |
185 | llwarns << "Profile hollow out of range: " << temp_f32 << llendl; | 192 | llwarns << "Profile hollow out of range: " << temp_f32 << llendl; |
@@ -212,11 +219,11 @@ bool LLVolumeMessage::packPathParams( | |||
212 | U8 curve = params->getCurveType(); | 219 | U8 curve = params->getCurveType(); |
213 | mesgsys->addU8Fast(_PREHASH_PathCurve, curve); | 220 | mesgsys->addU8Fast(_PREHASH_PathCurve, curve); |
214 | 221 | ||
215 | U8 begin = (U8) llround(params->getBegin() / SCALE_QUANTA); | 222 | U16 begin = (U16) llround(params->getBegin() / CUT_QUANTA); |
216 | mesgsys->addU8Fast(_PREHASH_PathBegin, begin); | 223 | mesgsys->addU16Fast(_PREHASH_PathBegin, begin); |
217 | 224 | ||
218 | U8 end = 100 - (U8) llround(params->getEnd() / SCALE_QUANTA); | 225 | U16 end = 50000 - (U16) llround(params->getEnd() / CUT_QUANTA); |
219 | mesgsys->addU8Fast(_PREHASH_PathEnd, end); | 226 | mesgsys->addU16Fast(_PREHASH_PathEnd, end); |
220 | 227 | ||
221 | // Avoid truncation problem with direct F32->U8 cast. | 228 | // Avoid truncation problem with direct F32->U8 cast. |
222 | // (e.g., (U8) (0.50 / 0.01) = (U8) 49.9999999 = 49 not 50. | 229 | // (e.g., (U8) (0.50 / 0.01) = (U8) 49.9999999 = 49 not 50. |
@@ -269,11 +276,11 @@ bool LLVolumeMessage::packPathParams( | |||
269 | U8 curve = params->getCurveType(); | 276 | U8 curve = params->getCurveType(); |
270 | dp.packU8(curve, "Curve"); | 277 | dp.packU8(curve, "Curve"); |
271 | 278 | ||
272 | U8 begin = (U8) llround(params->getBegin() / SCALE_QUANTA); | 279 | U16 begin = (U16) llround(params->getBegin() / CUT_QUANTA); |
273 | dp.packU8(begin, "Begin"); | 280 | dp.packU16(begin, "Begin"); |
274 | 281 | ||
275 | U8 end = 100 - (U8) llround(params->getEnd() / SCALE_QUANTA); | 282 | U16 end = 50000 - (U16) llround(params->getEnd() / CUT_QUANTA); |
276 | dp.packU8(end, "End"); | 283 | dp.packU16(end, "End"); |
277 | 284 | ||
278 | // Avoid truncation problem with direct F32->U8 cast. | 285 | // Avoid truncation problem with direct F32->U8 cast. |
279 | // (e.g., (U8) (0.50 / 0.01) = (U8) 49.9999999 = 49 not 50. | 286 | // (e.g., (U8) (0.50 / 0.01) = (U8) 49.9999999 = 49 not 50. |
@@ -324,13 +331,13 @@ bool LLVolumeMessage::unpackPathParams( | |||
324 | mesgsys->getU8Fast(block_name, _PREHASH_PathCurve, curve, block_num); | 331 | mesgsys->getU8Fast(block_name, _PREHASH_PathCurve, curve, block_num); |
325 | params->setCurveType(curve); | 332 | params->setCurveType(curve); |
326 | 333 | ||
327 | U8 begin; | 334 | U16 begin; |
328 | mesgsys->getU8Fast(block_name, _PREHASH_PathBegin, begin, block_num); | 335 | mesgsys->getU16Fast(block_name, _PREHASH_PathBegin, begin, block_num); |
329 | params->setBegin((F32)(begin * SCALE_QUANTA)); | 336 | params->setBegin((F32)(begin * CUT_QUANTA)); |
330 | 337 | ||
331 | U8 end; | 338 | U16 end; |
332 | mesgsys->getU8Fast(block_name, _PREHASH_PathEnd, end, block_num); | 339 | mesgsys->getU16Fast(block_name, _PREHASH_PathEnd, end, block_num); |
333 | params->setEnd((F32)((100 - end) * SCALE_QUANTA)); | 340 | params->setEnd((F32)((50000 - end) * CUT_QUANTA)); |
334 | 341 | ||
335 | U8 pack_scale_x, pack_scale_y; | 342 | U8 pack_scale_x, pack_scale_y; |
336 | mesgsys->getU8Fast(block_name, _PREHASH_PathScaleX, pack_scale_x, block_num); | 343 | mesgsys->getU8Fast(block_name, _PREHASH_PathScaleX, pack_scale_x, block_num); |
@@ -390,14 +397,16 @@ bool LLVolumeMessage::unpackPathParams(LLPathParams* params, LLDataPacker &dp) | |||
390 | { | 397 | { |
391 | U8 value; | 398 | U8 value; |
392 | S8 svalue; | 399 | S8 svalue; |
400 | U16 temp_u16; | ||
401 | |||
393 | dp.unpackU8(value, "Curve"); | 402 | dp.unpackU8(value, "Curve"); |
394 | params->setCurveType( value ); | 403 | params->setCurveType( value ); |
395 | 404 | ||
396 | dp.unpackU8(value, "Begin"); | 405 | dp.unpackU16(temp_u16, "Begin"); |
397 | params->setBegin((F32)(value * SCALE_QUANTA)); | 406 | params->setBegin((F32)(temp_u16 * CUT_QUANTA)); |
398 | 407 | ||
399 | dp.unpackU8(value, "End"); | 408 | dp.unpackU16(temp_u16, "End"); |
400 | params->setEnd((F32)((100 - value) * SCALE_QUANTA)); | 409 | params->setEnd((F32)((50000 - temp_u16) * CUT_QUANTA)); |
401 | 410 | ||
402 | dp.unpackU8(value, "ScaleX"); | 411 | dp.unpackU8(value, "ScaleX"); |
403 | F32 x = (F32) (200 - value) * SCALE_QUANTA; | 412 | F32 x = (F32) (200 - value) * SCALE_QUANTA; |
diff --git a/linden/indra/llprimitive/llvolumemessage.h b/linden/indra/llprimitive/llvolumemessage.h index ad062a9..e626a04 100644 --- a/linden/indra/llprimitive/llvolumemessage.h +++ b/linden/indra/llprimitive/llvolumemessage.h | |||
@@ -4,6 +4,7 @@ | |||
4 | * | 4 | * |
5 | * Copyright (c) 2001-2007, Linden Research, Inc. | 5 | * Copyright (c) 2001-2007, Linden Research, Inc. |
6 | * | 6 | * |
7 | * Second Life Viewer Source Code | ||
7 | * The source code in this file ("Source Code") is provided by Linden Lab | 8 | * The source code in this file ("Source Code") is provided by Linden Lab |
8 | * to you under the terms of the GNU General Public License, version 2.0 | 9 | * to you under the terms of the GNU General Public License, version 2.0 |
9 | * ("GPL"), unless you have obtained a separate licensing agreement | 10 | * ("GPL"), unless you have obtained a separate licensing agreement |
diff --git a/linden/indra/llprimitive/llvolumexml.cpp b/linden/indra/llprimitive/llvolumexml.cpp index 101eace..370f152 100644 --- a/linden/indra/llprimitive/llvolumexml.cpp +++ b/linden/indra/llprimitive/llvolumexml.cpp | |||
@@ -4,6 +4,7 @@ | |||
4 | * | 4 | * |
5 | * Copyright (c) 2001-2007, Linden Research, Inc. | 5 | * Copyright (c) 2001-2007, Linden Research, Inc. |
6 | * | 6 | * |
7 | * Second Life Viewer Source Code | ||
7 | * The source code in this file ("Source Code") is provided by Linden Lab | 8 | * The source code in this file ("Source Code") is provided by Linden Lab |
8 | * to you under the terms of the GNU General Public License, version 2.0 | 9 | * to you under the terms of the GNU General Public License, version 2.0 |
9 | * ("GPL"), unless you have obtained a separate licensing agreement | 10 | * ("GPL"), unless you have obtained a separate licensing agreement |
diff --git a/linden/indra/llprimitive/llvolumexml.h b/linden/indra/llprimitive/llvolumexml.h index c6ae480..0a3d1c5 100644 --- a/linden/indra/llprimitive/llvolumexml.h +++ b/linden/indra/llprimitive/llvolumexml.h | |||
@@ -4,6 +4,7 @@ | |||
4 | * | 4 | * |
5 | * Copyright (c) 2001-2007, Linden Research, Inc. | 5 | * Copyright (c) 2001-2007, Linden Research, Inc. |
6 | * | 6 | * |
7 | * Second Life Viewer Source Code | ||
7 | * The source code in this file ("Source Code") is provided by Linden Lab | 8 | * The source code in this file ("Source Code") is provided by Linden Lab |
8 | * to you under the terms of the GNU General Public License, version 2.0 | 9 | * to you under the terms of the GNU General Public License, version 2.0 |
9 | * ("GPL"), unless you have obtained a separate licensing agreement | 10 | * ("GPL"), unless you have obtained a separate licensing agreement |
diff --git a/linden/indra/llprimitive/material_codes.h b/linden/indra/llprimitive/material_codes.h index fe55344..01a5573 100644 --- a/linden/indra/llprimitive/material_codes.h +++ b/linden/indra/llprimitive/material_codes.h | |||
@@ -4,6 +4,7 @@ | |||
4 | * | 4 | * |
5 | * Copyright (c) 2000-2007, Linden Research, Inc. | 5 | * Copyright (c) 2000-2007, Linden Research, Inc. |
6 | * | 6 | * |
7 | * Second Life Viewer Source Code | ||
7 | * The source code in this file ("Source Code") is provided by Linden Lab | 8 | * The source code in this file ("Source Code") is provided by Linden Lab |
8 | * to you under the terms of the GNU General Public License, version 2.0 | 9 | * to you under the terms of the GNU General Public License, version 2.0 |
9 | * ("GPL"), unless you have obtained a separate licensing agreement | 10 | * ("GPL"), unless you have obtained a separate licensing agreement |
diff --git a/linden/indra/llprimitive/object_flags.h b/linden/indra/llprimitive/object_flags.h index 7c8a66c..e7bf023 100644 --- a/linden/indra/llprimitive/object_flags.h +++ b/linden/indra/llprimitive/object_flags.h | |||
@@ -4,6 +4,7 @@ | |||
4 | * | 4 | * |
5 | * Copyright (c) 2001-2007, Linden Research, Inc. | 5 | * Copyright (c) 2001-2007, Linden Research, Inc. |
6 | * | 6 | * |
7 | * Second Life Viewer Source Code | ||
7 | * The source code in this file ("Source Code") is provided by Linden Lab | 8 | * The source code in this file ("Source Code") is provided by Linden Lab |
8 | * to you under the terms of the GNU General Public License, version 2.0 | 9 | * to you under the terms of the GNU General Public License, version 2.0 |
9 | * ("GPL"), unless you have obtained a separate licensing agreement | 10 | * ("GPL"), unless you have obtained a separate licensing agreement |