THE BIGGIE.

Holy hell, this was an interesting one to implement. I wish I understood it better. Unfortunately I think this marks the end of trying to re-implement the Local Inventory for Temp and Local textures. It's just not feasible now that the entire inventory system has been whipped into a code shitstorm.

Signed-off-by: Beeks <HgDelirium@gmail.com>
This commit is contained in:
Beeks
2010-09-22 06:48:48 -04:00
parent 3d4fee4614
commit ec55705bdd
48 changed files with 8559 additions and 7177 deletions

View File

@@ -253,6 +253,10 @@ const U8 SIM_ACCESS_MAX = SIM_ACCESS_ADULT;
// group constants
const S32 MAX_AGENT_GROUPS = 25;
// attachment constants
const S32 MAX_AGENT_ATTACHMENTS = 38;
const U8 ATTACHMENT_ADD = 0x80;
// god levels
const U8 GOD_MAINTENANCE = 250;
const U8 GOD_FULL = 200;

View File

@@ -70,6 +70,8 @@ asset_info_t asset_types[] =
{ LLAssetType::AT_ANIMATION, "ANIMATION" },
{ LLAssetType::AT_GESTURE, "GESTURE" },
{ LLAssetType::AT_SIMSTATE, "SIMSTATE" },
{ LLAssetType::AT_LINK, "LINK" },
{ LLAssetType::AT_LINK_FOLDER, "FOLDER_LINK" },
{ LLAssetType::AT_NONE, "NONE" },
};
@@ -129,7 +131,10 @@ const char* LLAssetType::mAssetTypeNames[LLAssetType::AT_COUNT] =
"jpeg",
"animatn",
"gesture",
"simstate"
"simstate",
"",
"link",
"link_f"
};
// This table is meant for decoding to human readable form. Put any
@@ -159,7 +164,10 @@ const char* LLAssetType::mAssetTypeHumanNames[LLAssetType::AT_COUNT] =
"jpeg image",
"animation",
"gesture",
"simstate"
"simstate",
"",
"symbolic link",
"symbolic folder link"
};
///----------------------------------------------------------------------------
@@ -248,6 +256,7 @@ EDragAndDropType LLAssetType::lookupDragAndDropType( EType asset )
case AT_BODYPART: return DAD_BODYPART;
case AT_ANIMATION: return DAD_ANIMATION;
case AT_GESTURE: return DAD_GESTURE;
case AT_LINK: return DAD_LINK;
default: return DAD_NONE;
};
}
@@ -265,3 +274,16 @@ void LLAssetType::generateDescriptionFor(LLAssetType::EType type,
desc.assign(time_str);
desc.append(LLAssetType::lookupHumanReadable(type));
}
// static
bool LLAssetType::lookupCanLink(EType asset_type)
{
return (asset_type == AT_CLOTHING || asset_type == AT_OBJECT || asset_type == AT_CATEGORY ||
asset_type == AT_BODYPART || asset_type == AT_GESTURE);
}
// static
// Not adding this to dictionary since we probably will only have these two types
bool LLAssetType::lookupIsLinkType(EType asset_type)
{
return (asset_type == AT_LINK || asset_type == AT_LINK_FOLDER);
}

View File

@@ -131,6 +131,12 @@ public:
// simstate file
AT_SIMSTATE = 22,
// Inventory symbolic link
AT_LINK = 24,
// Inventory folder link
AT_LINK_FOLDER = 25,
// +*********************************************+
// | TO ADD AN ELEMENT TO THIS ENUM: |
// +*********************************************+
@@ -140,7 +146,7 @@ public:
// | 4. ADD TO LLAssetType::mAssetTypeHumanNames |
// +*********************************************+
AT_COUNT = 23,
AT_COUNT = 26,
AT_NONE = -1
};
@@ -164,6 +170,9 @@ public:
static EType getType(const std::string& sin);
static std::string getDesc(EType type);
static bool lookupCanLink(EType asset_type);
static bool lookupIsLinkType(EType asset_type);
private:
// don't instantiate or derive one of these objects

View File

@@ -54,7 +54,8 @@ enum EDragAndDropType
DAD_BODYPART = 11,
DAD_ANIMATION = 12,
DAD_GESTURE = 13,
DAD_COUNT = 14, // number of types in this enum
DAD_LINK = 14,
DAD_COUNT = 15, // number of types in this enum
};
// Reasons for drags to be denied.