summaryrefslogtreecommitdiff
path: root/indra/llmessage/llpartdata.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2024-08-28 20:47:43 -0400
committerNat Goodspeed <nat@lindenlab.com>2024-08-28 20:47:43 -0400
commitcde1174345224d33d6b45b1e3243fa39043223e5 (patch)
tree6c8db6e0499622d8c7206a11c997eb173ebd478f /indra/llmessage/llpartdata.cpp
parent6f454ad8366ed33bbe199c3fc3ed69e6d3448cec (diff)
parent35efadf78315f9b351415930dca4fae251ef4dd0 (diff)
Merge branch 'main' into release/luau-scripting.
Diffstat (limited to 'indra/llmessage/llpartdata.cpp')
-rw-r--r--indra/llmessage/llpartdata.cpp84
1 files changed, 42 insertions, 42 deletions
diff --git a/indra/llmessage/llpartdata.cpp b/indra/llmessage/llpartdata.cpp
index 320b61b905..d4cf95c1e3 100644
--- a/indra/llmessage/llpartdata.cpp
+++ b/indra/llmessage/llpartdata.cpp
@@ -71,31 +71,31 @@ S32 LLPartData::getSize() const
}
-BOOL LLPartData::unpackLegacy(LLDataPacker &dp)
+bool LLPartData::unpackLegacy(LLDataPacker &dp)
{
LLColor4U coloru;
dp.unpackU32(mFlags, "pdflags");
- dp.unpackFixed(mMaxAge, "pdmaxage", FALSE, 8, 8);
+ dp.unpackFixed(mMaxAge, "pdmaxage", false, 8, 8);
dp.unpackColor4U(coloru, "pdstartcolor");
mStartColor.setVec(coloru);
dp.unpackColor4U(coloru, "pdendcolor");
mEndColor.setVec(coloru);
- dp.unpackFixed(mStartScale.mV[0], "pdstartscalex", FALSE, 3, 5);
- dp.unpackFixed(mStartScale.mV[1], "pdstartscaley", FALSE, 3, 5);
- dp.unpackFixed(mEndScale.mV[0], "pdendscalex", FALSE, 3, 5);
- dp.unpackFixed(mEndScale.mV[1], "pdendscaley", FALSE, 3, 5);
+ dp.unpackFixed(mStartScale.mV[0], "pdstartscalex", false, 3, 5);
+ dp.unpackFixed(mStartScale.mV[1], "pdstartscaley", false, 3, 5);
+ dp.unpackFixed(mEndScale.mV[0], "pdendscalex", false, 3, 5);
+ dp.unpackFixed(mEndScale.mV[1], "pdendscaley", false, 3, 5);
mStartGlow = 0.f;
mEndGlow = 0.f;
mBlendFuncSource = LLPartData::LL_PART_BF_SOURCE_ALPHA;
mBlendFuncDest = LLPartData::LL_PART_BF_ONE_MINUS_SOURCE_ALPHA;
- return TRUE;
+ return true;
}
-BOOL LLPartData::unpack(LLDataPacker &dp)
+bool LLPartData::unpack(LLDataPacker &dp)
{
S32 size = 0;
dp.unpackS32(size, "partsize");
@@ -105,7 +105,7 @@ BOOL LLPartData::unpack(LLDataPacker &dp)
if (mFlags & LL_PART_DATA_GLOW)
{
- if (size < PS_PART_DATA_GLOW_SIZE) return FALSE;
+ if (size < PS_PART_DATA_GLOW_SIZE) return false;
U8 tmp_glow = 0;
dp.unpackU8(tmp_glow,"pdstartglow");
@@ -123,7 +123,7 @@ BOOL LLPartData::unpack(LLDataPacker &dp)
if (mFlags & LL_PART_DATA_BLEND)
{
- if (size < PS_PART_DATA_BLEND_SIZE) return FALSE;
+ if (size < PS_PART_DATA_BLEND_SIZE) return false;
dp.unpackU8(mBlendFuncSource,"pdblendsource");
dp.unpackU8(mBlendFuncDest,"pdblenddest");
size -= PS_PART_DATA_BLEND_SIZE;
@@ -144,11 +144,11 @@ BOOL LLPartData::unpack(LLDataPacker &dp)
}
//this particle system won't display properly, better to not show anything
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
void LLPartData::setFlags(const U32 flags)
@@ -240,44 +240,44 @@ LLPartSysData::LLPartSysData()
mNumParticles = 0;
}
-BOOL LLPartSysData::unpackSystem(LLDataPacker &dp)
+bool LLPartSysData::unpackSystem(LLDataPacker &dp)
{
dp.unpackU32(mCRC, "pscrc");
dp.unpackU32(mFlags, "psflags");
dp.unpackU8(mPattern, "pspattern");
- dp.unpackFixed(mMaxAge, "psmaxage", FALSE, 8, 8);
- dp.unpackFixed(mStartAge, "psstartage", FALSE, 8, 8);
- dp.unpackFixed(mInnerAngle, "psinnerangle", FALSE, 3, 5);
- dp.unpackFixed(mOuterAngle, "psouterangle", FALSE, 3, 5);
- dp.unpackFixed(mBurstRate, "psburstrate", FALSE, 8, 8);
+ dp.unpackFixed(mMaxAge, "psmaxage", false, 8, 8);
+ dp.unpackFixed(mStartAge, "psstartage", false, 8, 8);
+ dp.unpackFixed(mInnerAngle, "psinnerangle", false, 3, 5);
+ dp.unpackFixed(mOuterAngle, "psouterangle", false, 3, 5);
+ dp.unpackFixed(mBurstRate, "psburstrate", false, 8, 8);
mBurstRate = llmax(0.01f, mBurstRate);
- dp.unpackFixed(mBurstRadius, "psburstradius", FALSE, 8, 8);
- dp.unpackFixed(mBurstSpeedMin, "psburstspeedmin", FALSE, 8, 8);
- dp.unpackFixed(mBurstSpeedMax, "psburstspeedmax", FALSE, 8, 8);
+ dp.unpackFixed(mBurstRadius, "psburstradius", false, 8, 8);
+ dp.unpackFixed(mBurstSpeedMin, "psburstspeedmin", false, 8, 8);
+ dp.unpackFixed(mBurstSpeedMax, "psburstspeedmax", false, 8, 8);
dp.unpackU8(mBurstPartCount, "psburstpartcount");
- dp.unpackFixed(mAngularVelocity.mV[0], "psangvelx", TRUE, 8, 7);
- dp.unpackFixed(mAngularVelocity.mV[1], "psangvely", TRUE, 8, 7);
- dp.unpackFixed(mAngularVelocity.mV[2], "psangvelz", TRUE, 8, 7);
+ dp.unpackFixed(mAngularVelocity.mV[0], "psangvelx", true, 8, 7);
+ dp.unpackFixed(mAngularVelocity.mV[1], "psangvely", true, 8, 7);
+ dp.unpackFixed(mAngularVelocity.mV[2], "psangvelz", true, 8, 7);
- dp.unpackFixed(mPartAccel.mV[0], "psaccelx", TRUE, 8, 7);
- dp.unpackFixed(mPartAccel.mV[1], "psaccely", TRUE, 8, 7);
- dp.unpackFixed(mPartAccel.mV[2], "psaccelz", TRUE, 8, 7);
+ dp.unpackFixed(mPartAccel.mV[0], "psaccelx", true, 8, 7);
+ dp.unpackFixed(mPartAccel.mV[1], "psaccely", true, 8, 7);
+ dp.unpackFixed(mPartAccel.mV[2], "psaccelz", true, 8, 7);
dp.unpackUUID(mPartImageID, "psuuid");
dp.unpackUUID(mTargetUUID, "pstargetuuid");
- return TRUE;
+ return true;
}
-BOOL LLPartSysData::unpackLegacy(LLDataPacker &dp)
+bool LLPartSysData::unpackLegacy(LLDataPacker &dp)
{
unpackSystem(dp);
mPartData.unpackLegacy(dp);
- return TRUE;
+ return true;
}
-BOOL LLPartSysData::unpack(LLDataPacker &dp)
+bool LLPartSysData::unpack(LLDataPacker &dp)
{
// syssize is currently unused. Adding now when modifying the 'version to make extensible in the future
S32 size = 0;
@@ -289,18 +289,18 @@ 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");
}
- return FALSE;
+ return false;
}
unpackSystem(dp);
@@ -324,7 +324,7 @@ std::ostream& operator<<(std::ostream& s, const LLPartSysData &data)
return s;
}
-BOOL LLPartSysData::isNullPS(const S32 block_num)
+bool LLPartSysData::isNullPS(const S32 block_num)
{
U8 ps_data_block[PS_MAX_DATA_BLOCK_SIZE];
U32 crc;
@@ -335,13 +335,13 @@ BOOL LLPartSysData::isNullPS(const S32 block_num)
if (!size)
{
- return TRUE;
+ return true;
}
if (size > PS_MAX_DATA_BLOCK_SIZE)
{
//size is too big, newer particle version unsupported
- return TRUE;
+ return true;
}
gMessageSystem->getBinaryData("ObjectData", "PSBlock", ps_data_block, size, block_num, PS_MAX_DATA_BLOCK_SIZE);
@@ -355,7 +355,7 @@ BOOL LLPartSysData::isNullPS(const S32 block_num)
if (tmp > PS_SYS_DATA_BLOCK_SIZE)
{ //unknown system data block size, don't know how to parse it, treat as NULL
- return TRUE;
+ return true;
}
}
@@ -363,12 +363,12 @@ BOOL LLPartSysData::isNullPS(const S32 block_num)
if (crc == 0)
{
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-BOOL LLPartSysData::unpackBlock(const S32 block_num)
+bool LLPartSysData::unpackBlock(const S32 block_num)
{
U8 ps_data_block[PS_MAX_DATA_BLOCK_SIZE];
@@ -378,7 +378,7 @@ BOOL LLPartSysData::unpackBlock(const S32 block_num)
if (size > PS_MAX_DATA_BLOCK_SIZE)
{
// Larger packets are newer and unsupported
- return FALSE;
+ return false;
}
// Get from message