summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llcommon/CMakeLists.txt1
-rw-r--r--indra/llcommon/indra_constants.cpp46
-rw-r--r--indra/llcommon/indra_constants.h19
-rw-r--r--indra/llcommon/linden_common.h2
-rw-r--r--indra/llcommon/lldictionary.cpp52
-rw-r--r--indra/llcommon/lldictionary.h16
-rw-r--r--indra/llmessage/CMakeLists.txt1
-rw-r--r--indra/llmessage/machine.cpp62
-rw-r--r--indra/llmessage/machine.h28
-rw-r--r--indra/llprimitive/CMakeLists.txt1
-rw-r--r--indra/llprimitive/material_codes.cpp46
-rw-r--r--indra/llprimitive/material_codes.h19
12 files changed, 235 insertions, 58 deletions
diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt
index ab66f634ee..f5b0e998fd 100644
--- a/indra/llcommon/CMakeLists.txt
+++ b/indra/llcommon/CMakeLists.txt
@@ -40,6 +40,7 @@ set(llcommon_SOURCE_FILES
llcursortypes.cpp
lldate.cpp
lldependencies.cpp
+ lldictionary.cpp
llerror.cpp
llerrorthread.cpp
llevent.cpp
diff --git a/indra/llcommon/indra_constants.cpp b/indra/llcommon/indra_constants.cpp
new file mode 100644
index 0000000000..8a1290d4dc
--- /dev/null
+++ b/indra/llcommon/indra_constants.cpp
@@ -0,0 +1,46 @@
+/**
+ * @file indra_constants.cpp
+ * @brief some useful short term constants for Indra
+ *
+ * $LicenseInfo:firstyear=2001&license=viewergpl$
+ *
+ * Copyright (c) 2001-2009, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+#include "linden_common.h"
+
+#include "indra_constants.h"
+
+#include "lluuid.h"
+
+// "agent id" for things that should be done to ALL agents
+const LLUUID LL_UUID_ALL_AGENTS("44e87126-e794-4ded-05b3-7c42da3d5cdb");
+
+// Governor Linden's agent id.
+const LLUUID ALEXANDRIA_LINDEN_ID("ba2a564a-f0f1-4b82-9c61-b7520bfcd09f");
+const LLUUID GOVERNOR_LINDEN_ID("3d6181b0-6a4b-97ef-18d8-722652995cf1");
+const LLUUID REALESTATE_LINDEN_ID("3d6181b0-6a4b-97ef-18d8-722652995cf1");
+// Maintenance's group id.
+const LLUUID MAINTENANCE_GROUP_ID("dc7b21cd-3c89-fcaa-31c8-25f9ffd224cd");
diff --git a/indra/llcommon/indra_constants.h b/indra/llcommon/indra_constants.h
index 6b75a720af..5ce5fc4673 100644
--- a/indra/llcommon/indra_constants.h
+++ b/indra/llcommon/indra_constants.h
@@ -34,7 +34,8 @@
#define LL_INDRA_CONSTANTS_H
#include "stdtypes.h"
-#include "lluuid.h"
+
+class LLUUID;
// At 45 Hz collisions seem stable and objects seem
// to settle down at a reasonable rate.
@@ -46,7 +47,7 @@
#define PHYSICS_TIMESTEP (1.f / 45.f)
const F32 COLLISION_TOLERANCE = 0.1f;
-const F32 HALF_COLLISION_TOLERANCE = COLLISION_TOLERANCE * 0.5f;
+const F32 HALF_COLLISION_TOLERANCE = 0.05f;
// Time constants
const U32 HOURS_PER_LINDEN_DAY = 4;
@@ -97,9 +98,9 @@ const F32 MIN_AGENT_WIDTH = 0.40f;
const F32 DEFAULT_AGENT_WIDTH = 0.60f;
const F32 MAX_AGENT_WIDTH = 0.80f;
-const F32 MIN_AGENT_HEIGHT = 1.3f - 2.0f * COLLISION_TOLERANCE;
+const F32 MIN_AGENT_HEIGHT = 1.1f;
const F32 DEFAULT_AGENT_HEIGHT = 1.9f;
-const F32 MAX_AGENT_HEIGHT = 2.65f - 2.0f * COLLISION_TOLERANCE;
+const F32 MAX_AGENT_HEIGHT = 2.45f;
// For linked sets
const S32 MAX_CHILDREN_PER_TASK = 255;
@@ -266,14 +267,14 @@ const U8 GOD_LIKE = 1;
const U8 GOD_NOT = 0;
// "agent id" for things that should be done to ALL agents
-const LLUUID LL_UUID_ALL_AGENTS("44e87126-e794-4ded-05b3-7c42da3d5cdb");
+extern const LLUUID LL_UUID_ALL_AGENTS;
// Governor Linden's agent id.
-const LLUUID ALEXANDRIA_LINDEN_ID("ba2a564a-f0f1-4b82-9c61-b7520bfcd09f");
-const LLUUID GOVERNOR_LINDEN_ID("3d6181b0-6a4b-97ef-18d8-722652995cf1");
-const LLUUID REALESTATE_LINDEN_ID("3d6181b0-6a4b-97ef-18d8-722652995cf1");
+extern const LLUUID ALEXANDRIA_LINDEN_ID; // inventory library owner
+extern const LLUUID GOVERNOR_LINDEN_ID;
+extern const LLUUID REALESTATE_LINDEN_ID;
// Maintenance's group id.
-const LLUUID MAINTENANCE_GROUP_ID("dc7b21cd-3c89-fcaa-31c8-25f9ffd224cd");
+extern const LLUUID MAINTENANCE_GROUP_ID;
// Flags for kick message
const U32 KICK_FLAGS_DEFAULT = 0x0;
diff --git a/indra/llcommon/linden_common.h b/indra/llcommon/linden_common.h
index c2eb867795..771af01279 100644
--- a/indra/llcommon/linden_common.h
+++ b/indra/llcommon/linden_common.h
@@ -64,6 +64,8 @@
#pragma warning (disable : 4244) // conversion from time_t to S32
#endif // LL_WINDOWS
+// *TODO: Eliminate these, most library .cpp files don't need them.
+// Add them to llviewerprecompiledheaders.h if necessary.
#include <list>
#include <map>
#include <vector>
diff --git a/indra/llcommon/lldictionary.cpp b/indra/llcommon/lldictionary.cpp
new file mode 100644
index 0000000000..8730238d92
--- /dev/null
+++ b/indra/llcommon/lldictionary.cpp
@@ -0,0 +1,52 @@
+/**
+ * @file lldictionary.cpp
+ * @brief Lldictionary class header file
+ *
+ * $LicenseInfo:firstyear=2002&license=viewergpl$
+ *
+ * Copyright (c) 2002-2007, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlife.com/developers/opensource/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at http://secondlife.com/developers/opensource/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#include "linden_common.h"
+
+#include "lldictionary.h"
+
+#include "llstring.h"
+
+// Define in .cpp file to prevent header include of llstring.h
+LLDictionaryEntry::LLDictionaryEntry(const std::string &name)
+: mName(name)
+{
+ mNameCapitalized = mName;
+ LLStringUtil::replaceChar(mNameCapitalized, '-', ' ');
+ LLStringUtil::replaceChar(mNameCapitalized, '_', ' ');
+ for (U32 i=0; i < mNameCapitalized.size(); i++)
+ {
+ if (i == 0 || mNameCapitalized[i-1] == ' ') // don't change ordering of this statement or crash
+ {
+ mNameCapitalized[i] = toupper(mNameCapitalized[i]);
+ }
+ }
+}
diff --git a/indra/llcommon/lldictionary.h b/indra/llcommon/lldictionary.h
index 436b689ca6..a8a34a89a5 100644
--- a/indra/llcommon/lldictionary.h
+++ b/indra/llcommon/lldictionary.h
@@ -33,23 +33,11 @@
#define LL_LLDICTIONARY_H
#include <map>
+#include <string>
struct LLDictionaryEntry
{
- LLDictionaryEntry(const std::string &name) :
- mName(name)
- {
- mNameCapitalized = mName;
- LLStringUtil::replaceChar(mNameCapitalized, '-', ' ');
- LLStringUtil::replaceChar(mNameCapitalized, '_', ' ');
- for (U32 i=0; i < mNameCapitalized.size(); i++)
- {
- if (i == 0 || mNameCapitalized[i-1] == ' ') // don't change ordering of this statement or crash
- {
- mNameCapitalized[i] = toupper(mNameCapitalized[i]);
- }
- }
- }
+ LLDictionaryEntry(const std::string &name);
virtual ~LLDictionaryEntry() {}
const std::string mName;
std::string mNameCapitalized;
diff --git a/indra/llmessage/CMakeLists.txt b/indra/llmessage/CMakeLists.txt
index 912c97f714..1f8ee26716 100644
--- a/indra/llmessage/CMakeLists.txt
+++ b/indra/llmessage/CMakeLists.txt
@@ -92,6 +92,7 @@ set(llmessage_SOURCE_FILES
llxfer_mem.cpp
llxfer_vfile.cpp
llxorcipher.cpp
+ machine.cpp
message.cpp
message_prehash.cpp
message_string_table.cpp
diff --git a/indra/llmessage/machine.cpp b/indra/llmessage/machine.cpp
new file mode 100644
index 0000000000..afaaeb8ea2
--- /dev/null
+++ b/indra/llmessage/machine.cpp
@@ -0,0 +1,62 @@
+/**
+ * @file machine.cpp
+ * @brief LLMachine class header file
+ *
+ * $LicenseInfo:firstyear=2001&license=viewergpl$
+ *
+ * Copyright (c) 2001-2009, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+#include "linden_common.h"
+
+#include "machine.h"
+
+#include "llerror.h"
+
+void LLMachine::setMachinePort(S32 port)
+{
+ if (port < 0)
+ {
+ llinfos << "Can't assign a negative number to LLMachine::mPort" << llendl;
+ mHost.setPort(0);
+ }
+ else
+ {
+ mHost.setPort(port);
+ }
+}
+
+void LLMachine::setControlPort( S32 port )
+{
+ if (port < 0)
+ {
+ llinfos << "Can't assign a negative number to LLMachine::mControlPort" << llendl;
+ mControlPort = 0;
+ }
+ else
+ {
+ mControlPort = port;
+ }
+}
diff --git a/indra/llmessage/machine.h b/indra/llmessage/machine.h
index 63a038159e..6da8e5e04e 100644
--- a/indra/llmessage/machine.h
+++ b/indra/llmessage/machine.h
@@ -33,7 +33,6 @@
#ifndef LL_MACHINE_H
#define LL_MACHINE_H
-#include "llerror.h"
#include "net.h"
#include "llhost.h"
@@ -79,31 +78,8 @@ public:
void setMachineIP(U32 ip) { mHost.setAddress(ip); }
void setMachineHost(const LLHost &host) { mHost = host; }
- void setMachinePort(S32 port)
- {
- if (port < 0)
- {
- llinfos << "Can't assign a negative number to LLMachine::mPort" << llendl;
- mHost.setPort(0);
- }
- else
- {
- mHost.setPort(port);
- }
- }
-
- void setControlPort( S32 port )
- {
- if (port < 0)
- {
- llinfos << "Can't assign a negative number to LLMachine::mControlPort" << llendl;
- mControlPort = 0;
- }
- else
- {
- mControlPort = port;
- }
- }
+ void setMachinePort(S32 port);
+ void setControlPort( S32 port );
// member variables
diff --git a/indra/llprimitive/CMakeLists.txt b/indra/llprimitive/CMakeLists.txt
index d130513637..68a3d54597 100644
--- a/indra/llprimitive/CMakeLists.txt
+++ b/indra/llprimitive/CMakeLists.txt
@@ -25,6 +25,7 @@ set(llprimitive_SOURCE_FILES
lltreeparams.cpp
llvolumemessage.cpp
llvolumexml.cpp
+ material_codes.cpp
)
set(llprimitive_HEADER_FILES
diff --git a/indra/llprimitive/material_codes.cpp b/indra/llprimitive/material_codes.cpp
new file mode 100644
index 0000000000..ce146dad8a
--- /dev/null
+++ b/indra/llprimitive/material_codes.cpp
@@ -0,0 +1,46 @@
+/**
+ * @file material_codes.cpp
+ * @brief Material_codes definitions
+ *
+ * $LicenseInfo:firstyear=2000&license=viewergpl$
+ *
+ * Copyright (c) 2000-2009, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#include "linden_common.h"
+
+#include "material_codes.h"
+
+#include "lluuid.h"
+
+const LLUUID LL_DEFAULT_STONE_UUID("87c5765b-aa26-43eb-b8c6-c09a1ca6208e");
+const LLUUID LL_DEFAULT_METAL_UUID("6f3c53e9-ba60-4010-8f3e-30f51a762476");
+const LLUUID LL_DEFAULT_GLASS_UUID("b4ba225c-373f-446d-9f7e-6cb7b5cf9b3d");
+const LLUUID LL_DEFAULT_WOOD_UUID("89556747-24cb-43ed-920b-47caed15465f");
+const LLUUID LL_DEFAULT_FLESH_UUID("80736669-e4b9-450e-8890-d5169f988a50");
+const LLUUID LL_DEFAULT_PLASTIC_UUID("304fcb4e-7d33-4339-ba80-76d3d22dc11a");
+const LLUUID LL_DEFAULT_RUBBER_UUID("9fae0bc5-666d-477e-9f70-84e8556ec867");
+const LLUUID LL_DEFAULT_LIGHT_UUID("00000000-0000-0000-0000-000000000000");
diff --git a/indra/llprimitive/material_codes.h b/indra/llprimitive/material_codes.h
index e5a59a2789..ba3faba39f 100644
--- a/indra/llprimitive/material_codes.h
+++ b/indra/llprimitive/material_codes.h
@@ -33,7 +33,7 @@
#ifndef LL_MATERIAL_CODES_H
#define LL_MATERIAL_CODES_H
-#include "lluuid.h"
+class LLUUID;
// material types
const U8 LL_MCODE_STONE = 0;
@@ -47,13 +47,14 @@ const U8 LL_MCODE_LIGHT = 7;
const U8 LL_MCODE_END = 8;
const U8 LL_MCODE_MASK = 0x0F;
-const LLUUID LL_DEFAULT_STONE_UUID("87c5765b-aa26-43eb-b8c6-c09a1ca6208e");
-const LLUUID LL_DEFAULT_METAL_UUID("6f3c53e9-ba60-4010-8f3e-30f51a762476");
-const LLUUID LL_DEFAULT_GLASS_UUID("b4ba225c-373f-446d-9f7e-6cb7b5cf9b3d");
-const LLUUID LL_DEFAULT_WOOD_UUID("89556747-24cb-43ed-920b-47caed15465f");
-const LLUUID LL_DEFAULT_FLESH_UUID("80736669-e4b9-450e-8890-d5169f988a50");
-const LLUUID LL_DEFAULT_PLASTIC_UUID("304fcb4e-7d33-4339-ba80-76d3d22dc11a");
-const LLUUID LL_DEFAULT_RUBBER_UUID("9fae0bc5-666d-477e-9f70-84e8556ec867");
-const LLUUID LL_DEFAULT_LIGHT_UUID("00000000-0000-0000-0000-000000000000");
+// *NOTE: Define these in .cpp file to reduce duplicate instances
+extern const LLUUID LL_DEFAULT_STONE_UUID;
+extern const LLUUID LL_DEFAULT_METAL_UUID;
+extern const LLUUID LL_DEFAULT_GLASS_UUID;
+extern const LLUUID LL_DEFAULT_WOOD_UUID;
+extern const LLUUID LL_DEFAULT_FLESH_UUID;
+extern const LLUUID LL_DEFAULT_PLASTIC_UUID;
+extern const LLUUID LL_DEFAULT_RUBBER_UUID;
+extern const LLUUID LL_DEFAULT_LIGHT_UUID;
#endif