Merge branch 'master' of git://github.com/lkalif/SingularityViewer
This commit is contained in:
@@ -153,11 +153,6 @@ const char LAND_LAYER_CODE = 'L';
|
|||||||
const char WATER_LAYER_CODE = 'W';
|
const char WATER_LAYER_CODE = 'W';
|
||||||
const char WIND_LAYER_CODE = '7';
|
const char WIND_LAYER_CODE = '7';
|
||||||
const char CLOUD_LAYER_CODE = '8';
|
const char CLOUD_LAYER_CODE = '8';
|
||||||
// Extended land layer for Aurora Sim
|
|
||||||
const char AURORA_LAND_LAYER_CODE = 'M';
|
|
||||||
const char AURORA_WATER_LAYER_CODE = 'X';
|
|
||||||
const char AURORA_WIND_LAYER_CODE = '9';
|
|
||||||
const char AURORA_CLOUD_LAYER_CODE = ':';
|
|
||||||
|
|
||||||
// keys
|
// keys
|
||||||
// Bit masks for various keyboard modifier keys.
|
// Bit masks for various keyboard modifier keys.
|
||||||
|
|||||||
@@ -67,7 +67,6 @@ const F32 PARCEL_PASS_HOURS_DEFAULT = 1.f;
|
|||||||
|
|
||||||
// Number of "chunks" in which parcel overlay data is sent
|
// Number of "chunks" in which parcel overlay data is sent
|
||||||
// Chunk 0 = southern rows, entire width
|
// Chunk 0 = southern rows, entire width
|
||||||
// NOTE: NOT USABLE FOR VAR SIZED REGIONS!
|
|
||||||
const S32 PARCEL_OVERLAY_CHUNKS = 4;
|
const S32 PARCEL_OVERLAY_CHUNKS = 4;
|
||||||
|
|
||||||
// Bottom three bits are a color index for the land overlay
|
// Bottom three bits are a color index for the land overlay
|
||||||
|
|||||||
@@ -590,8 +590,6 @@ char const* const _PREHASH_LastName = LLMessageStringTable::getInstance()->getSt
|
|||||||
char const* const _PREHASH_From = LLMessageStringTable::getInstance()->getString("From");
|
char const* const _PREHASH_From = LLMessageStringTable::getInstance()->getString("From");
|
||||||
char const* const _PREHASH_RoleChange = LLMessageStringTable::getInstance()->getString("RoleChange");
|
char const* const _PREHASH_RoleChange = LLMessageStringTable::getInstance()->getString("RoleChange");
|
||||||
char const* const _PREHASH_Port = LLMessageStringTable::getInstance()->getString("Port");
|
char const* const _PREHASH_Port = LLMessageStringTable::getInstance()->getString("Port");
|
||||||
char const* const _PREHASH_RegionSizeX = LLMessageStringTable::getInstance()->getString("RegionSizeX");
|
|
||||||
char const* const _PREHASH_RegionSizeY = LLMessageStringTable::getInstance()->getString("RegionSizeY");
|
|
||||||
char const* const _PREHASH_MemberTitle = LLMessageStringTable::getInstance()->getString("MemberTitle");
|
char const* const _PREHASH_MemberTitle = LLMessageStringTable::getInstance()->getString("MemberTitle");
|
||||||
char const* const _PREHASH_LogParcelChanges = LLMessageStringTable::getInstance()->getString("LogParcelChanges");
|
char const* const _PREHASH_LogParcelChanges = LLMessageStringTable::getInstance()->getString("LogParcelChanges");
|
||||||
char const* const _PREHASH_AgentCachedTextureResponse = LLMessageStringTable::getInstance()->getString("AgentCachedTextureResponse");
|
char const* const _PREHASH_AgentCachedTextureResponse = LLMessageStringTable::getInstance()->getString("AgentCachedTextureResponse");
|
||||||
|
|||||||
@@ -590,8 +590,6 @@ extern char const* const _PREHASH_LastName;
|
|||||||
extern char const* const _PREHASH_From;
|
extern char const* const _PREHASH_From;
|
||||||
extern char const* const _PREHASH_RoleChange;
|
extern char const* const _PREHASH_RoleChange;
|
||||||
extern char const* const _PREHASH_Port;
|
extern char const* const _PREHASH_Port;
|
||||||
extern char const* const _PREHASH_RegionSizeX;
|
|
||||||
extern char const* const _PREHASH_RegionSizeY;
|
|
||||||
extern char const* const _PREHASH_MemberTitle;
|
extern char const* const _PREHASH_MemberTitle;
|
||||||
extern char const* const _PREHASH_LogParcelChanges;
|
extern char const* const _PREHASH_LogParcelChanges;
|
||||||
extern char const* const _PREHASH_AgentCachedTextureResponse;
|
extern char const* const _PREHASH_AgentCachedTextureResponse;
|
||||||
|
|||||||
@@ -235,7 +235,7 @@ void decode_patch_group_header(LLBitPack &bitpack, LLGroupHeader *gopp)
|
|||||||
gPatchSize = gopp->patch_size;
|
gPatchSize = gopp->patch_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
void decode_patch_header(LLBitPack &bitpack, LLPatchHeader *ph, BOOL b_large_patch)
|
void decode_patch_header(LLBitPack &bitpack, LLPatchHeader *ph)
|
||||||
{
|
{
|
||||||
U8 retvalu8;
|
U8 retvalu8;
|
||||||
|
|
||||||
@@ -274,18 +274,15 @@ void decode_patch_header(LLBitPack &bitpack, LLPatchHeader *ph, BOOL b_large_pat
|
|||||||
#endif
|
#endif
|
||||||
ph->range = retvalu16;
|
ph->range = retvalu16;
|
||||||
|
|
||||||
retvalu32 = 0;
|
retvalu16 = 0;
|
||||||
#ifdef LL_BIG_ENDIAN
|
#ifdef LL_BIG_ENDIAN
|
||||||
ret = (U8 *)&retvalu16;
|
ret = (U8 *)&retvalu16;
|
||||||
bitpack.bitUnpack(&(ret[1]), 8);
|
bitpack.bitUnpack(&(ret[1]), 8);
|
||||||
bitpack.bitUnpack(&(ret[0]), 2);
|
bitpack.bitUnpack(&(ret[0]), 2);
|
||||||
#else
|
#else
|
||||||
if (b_large_patch)
|
bitpack.bitUnpack((U8 *)&retvalu16, 10);
|
||||||
bitpack.bitUnpack((U8 *)&retvalu32, 32);
|
|
||||||
else
|
|
||||||
bitpack.bitUnpack((U8 *)&retvalu32, 10);
|
|
||||||
#endif
|
#endif
|
||||||
ph->patchids = retvalu32;
|
ph->patchids = retvalu16;
|
||||||
|
|
||||||
gWordBits = (ph->quant_wbits & 0xf) + 2;
|
gWordBits = (ph->quant_wbits & 0xf) + 2;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ void end_patch_coding(LLBitPack &bitpack);
|
|||||||
|
|
||||||
void init_patch_decoding(LLBitPack &bitpack);
|
void init_patch_decoding(LLBitPack &bitpack);
|
||||||
void decode_patch_group_header(LLBitPack &bitpack, LLGroupHeader *gopp);
|
void decode_patch_group_header(LLBitPack &bitpack, LLGroupHeader *gopp);
|
||||||
void decode_patch_header(LLBitPack &bitpack, LLPatchHeader *ph, BOOL b_large_patch);
|
void decode_patch_header(LLBitPack &bitpack, LLPatchHeader *ph);
|
||||||
void decode_patch(LLBitPack &bitpack, S32 *patches);
|
void decode_patch(LLBitPack &bitpack, S32 *patches);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ public:
|
|||||||
F32 dc_offset; // 4 bytes
|
F32 dc_offset; // 4 bytes
|
||||||
U16 range; // 2 = 7 ((S16) FP range (breaks if we need > 32K meters in 1 patch)
|
U16 range; // 2 = 7 ((S16) FP range (breaks if we need > 32K meters in 1 patch)
|
||||||
U8 quant_wbits; // 1 = 8 (upper 4 bits is quant - 2, lower 4 bits is word bits - 2)
|
U8 quant_wbits; // 1 = 8 (upper 4 bits is quant - 2, lower 4 bits is word bits - 2)
|
||||||
U32 patchids; // 2 = 10 (actually only uses 10 bits, 5 for each)
|
U16 patchids; // 2 = 10 (actually only uses 10 bits, 5 for each)
|
||||||
};
|
};
|
||||||
|
|
||||||
// Compression routines
|
// Compression routines
|
||||||
|
|||||||
@@ -440,7 +440,7 @@ void LLCloudLayer::decompress(LLBitPack &bitpack, LLGroupHeader *group_headerp)
|
|||||||
group_headerp->stride = group_headerp->patch_size; // offset required to step up one row
|
group_headerp->stride = group_headerp->patch_size; // offset required to step up one row
|
||||||
set_group_of_patch_header(group_headerp);
|
set_group_of_patch_header(group_headerp);
|
||||||
|
|
||||||
decode_patch_header(bitpack, &patch_header, FALSE);
|
decode_patch_header(bitpack, &patch_header);
|
||||||
decode_patch(bitpack, gBuffer);
|
decode_patch(bitpack, gBuffer);
|
||||||
decompress_patch(mDensityp, gBuffer, &patch_header);
|
decompress_patch(mDensityp, gBuffer, &patch_header);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1092,11 +1092,10 @@ BOOL LLPanelRegionTextureInfo::sendUpdate()
|
|||||||
llinfos << "LLPanelRegionTextureInfo::sendUpdate()" << llendl;
|
llinfos << "LLPanelRegionTextureInfo::sendUpdate()" << llendl;
|
||||||
|
|
||||||
// Make sure user hasn't chosen wacky textures.
|
// Make sure user hasn't chosen wacky textures.
|
||||||
// -Revolution Allow 'wacky' things
|
if (!validateTextureSizes())
|
||||||
//if (!validateTextureSizes())
|
{
|
||||||
//{
|
return FALSE;
|
||||||
// return FALSE;
|
}
|
||||||
//}
|
|
||||||
|
|
||||||
LLTextureCtrl* texture_ctrl;
|
LLTextureCtrl* texture_ctrl;
|
||||||
std::string buffer;
|
std::string buffer;
|
||||||
|
|||||||
@@ -610,7 +610,7 @@ void LLViewerParcelMgr::renderOneSegment(F32 x1, F32 y1, F32 x2, F32 y2, F32 hei
|
|||||||
return;
|
return;
|
||||||
// HACK: At edge of last region of world, we need to make sure the region
|
// HACK: At edge of last region of world, we need to make sure the region
|
||||||
// resolves correctly so we can get a height value.
|
// resolves correctly so we can get a height value.
|
||||||
const F32 BORDER = regionp->getWidth() - 0.1f;
|
const F32 BORDER = REGION_WIDTH_METERS - 0.1f;
|
||||||
|
|
||||||
F32 clamped_x1 = x1;
|
F32 clamped_x1 = x1;
|
||||||
F32 clamped_y1 = y1;
|
F32 clamped_y1 = y1;
|
||||||
|
|||||||
@@ -377,9 +377,6 @@ bool idle_startup()
|
|||||||
static std::string password;
|
static std::string password;
|
||||||
static std::vector<const char*> requested_options;
|
static std::vector<const char*> requested_options;
|
||||||
|
|
||||||
static U32 first_sim_size_x = 256;
|
|
||||||
static U32 first_sim_size_y = 256;
|
|
||||||
|
|
||||||
static LLVector3 initial_sun_direction(1.f, 0.f, 0.f);
|
static LLVector3 initial_sun_direction(1.f, 0.f, 0.f);
|
||||||
static LLVector3 agent_start_position_region(10.f, 10.f, 10.f); // default for when no space server
|
static LLVector3 agent_start_position_region(10.f, 10.f, 10.f); // default for when no space server
|
||||||
static LLVector3 agent_start_look_at(1.0f, 0.f, 0.f);
|
static LLVector3 agent_start_look_at(1.0f, 0.f, 0.f);
|
||||||
@@ -1682,16 +1679,6 @@ bool idle_startup()
|
|||||||
gFirstSimHandle = to_region_handle(region_x, region_y);
|
gFirstSimHandle = to_region_handle(region_x, region_y);
|
||||||
}
|
}
|
||||||
|
|
||||||
text = LLUserAuth::getInstance()->getResponse("region_size_x");
|
|
||||||
if(!text.empty()) {
|
|
||||||
first_sim_size_x = strtoul(text.c_str(), NULL, 10);
|
|
||||||
LLViewerParcelMgr::getInstance()->init(first_sim_size_x);
|
|
||||||
}
|
|
||||||
|
|
||||||
//region Y size is currently unused, major refactoring required. - Patrick Sapinski (2/10/2011)
|
|
||||||
text = LLUserAuth::getInstance()->getResponse("region_size_y");
|
|
||||||
if(!text.empty()) first_sim_size_y = strtoul(text.c_str(), NULL, 10);
|
|
||||||
|
|
||||||
const std::string look_at_str = LLUserAuth::getInstance()->getResponse("look_at");
|
const std::string look_at_str = LLUserAuth::getInstance()->getResponse("look_at");
|
||||||
if (!look_at_str.empty())
|
if (!look_at_str.empty())
|
||||||
{
|
{
|
||||||
@@ -1976,7 +1963,7 @@ bool idle_startup()
|
|||||||
|
|
||||||
gAgent.initOriginGlobal(from_region_handle(gFirstSimHandle));
|
gAgent.initOriginGlobal(from_region_handle(gFirstSimHandle));
|
||||||
|
|
||||||
LLWorld::getInstance()->addRegion(gFirstSimHandle, gFirstSim, first_sim_size_x, first_sim_size_y);
|
LLWorld::getInstance()->addRegion(gFirstSimHandle, gFirstSim);
|
||||||
|
|
||||||
LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromHandle(gFirstSimHandle);
|
LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromHandle(gFirstSimHandle);
|
||||||
LL_INFOS("AppInit") << "Adding initial simulator " << regionp->getOriginGlobal() << LL_ENDL;
|
LL_INFOS("AppInit") << "Adding initial simulator " << regionp->getOriginGlobal() << LL_ENDL;
|
||||||
|
|||||||
@@ -176,7 +176,6 @@ void LLSurface::create(const S32 grids_per_edge,
|
|||||||
mNumberOfPatches = mPatchesPerEdge * mPatchesPerEdge;
|
mNumberOfPatches = mPatchesPerEdge * mPatchesPerEdge;
|
||||||
mMetersPerGrid = width / ((F32)(mGridsPerEdge - 1));
|
mMetersPerGrid = width / ((F32)(mGridsPerEdge - 1));
|
||||||
mMetersPerEdge = mMetersPerGrid * (mGridsPerEdge - 1);
|
mMetersPerEdge = mMetersPerGrid * (mGridsPerEdge - 1);
|
||||||
sTextureSize = width;
|
|
||||||
|
|
||||||
mOriginGlobal.setVec(origin_global);
|
mOriginGlobal.setVec(origin_global);
|
||||||
|
|
||||||
@@ -300,7 +299,7 @@ void LLSurface::initTextures()
|
|||||||
mWaterObjp = (LLVOWater *)gObjectList.createObjectViewer(LLViewerObject::LL_VO_WATER, mRegionp);
|
mWaterObjp = (LLVOWater *)gObjectList.createObjectViewer(LLViewerObject::LL_VO_WATER, mRegionp);
|
||||||
gPipeline.createObject(mWaterObjp);
|
gPipeline.createObject(mWaterObjp);
|
||||||
LLVector3d water_pos_global = from_region_handle(mRegionp->getHandle());
|
LLVector3d water_pos_global = from_region_handle(mRegionp->getHandle());
|
||||||
water_pos_global += LLVector3d(mRegionp->getWidth()/2, mRegionp->getWidth()/2, DEFAULT_WATER_HEIGHT);
|
water_pos_global += LLVector3d(128.0, 128.0, DEFAULT_WATER_HEIGHT);
|
||||||
mWaterObjp->setPositionGlobal(water_pos_global);
|
mWaterObjp->setPositionGlobal(water_pos_global);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -330,8 +329,8 @@ void LLSurface::setOriginGlobal(const LLVector3d &origin_global)
|
|||||||
// Hack!
|
// Hack!
|
||||||
if (mWaterObjp.notNull() && mWaterObjp->mDrawable.notNull())
|
if (mWaterObjp.notNull() && mWaterObjp->mDrawable.notNull())
|
||||||
{
|
{
|
||||||
const F64 x = origin_global.mdV[VX] + (F64)mRegionp->getWidth()/2;
|
const F64 x = origin_global.mdV[VX] + 128.0;
|
||||||
const F64 y = origin_global.mdV[VY] + (F64)mRegionp->getWidth()/2;
|
const F64 y = origin_global.mdV[VY] + 128.0;
|
||||||
const F64 z = mWaterObjp->getPositionGlobal().mdV[VZ];
|
const F64 z = mWaterObjp->getPositionGlobal().mdV[VZ];
|
||||||
|
|
||||||
LLVector3d water_origin_global(x, y, z);
|
LLVector3d water_origin_global(x, y, z);
|
||||||
@@ -692,22 +691,14 @@ void LLSurface::decompressDCTPatch(LLBitPack &bitpack, LLGroupHeader *gopp, BOOL
|
|||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
decode_patch_header(bitpack, &ph, b_large_patch);
|
decode_patch_header(bitpack, &ph);
|
||||||
if (ph.quant_wbits == END_OF_PATCHES)
|
if (ph.quant_wbits == END_OF_PATCHES)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (b_large_patch)
|
i = ph.patchids >> 5;
|
||||||
{
|
j = ph.patchids & 0x1F;
|
||||||
i = ph.patchids >> 16; //x
|
|
||||||
j = ph.patchids & 0xFFFF; //y
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
i = ph.patchids >> 5; //x
|
|
||||||
j = ph.patchids & 0x1F; //y
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((i >= mPatchesPerEdge) || (j >= mPatchesPerEdge))
|
if ((i >= mPatchesPerEdge) || (j >= mPatchesPerEdge))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3762,18 +3762,6 @@ void process_teleport_finish(LLMessageSystem* msg, void**)
|
|||||||
U32 teleport_flags;
|
U32 teleport_flags;
|
||||||
msg->getU32Fast(_PREHASH_Info, _PREHASH_TeleportFlags, teleport_flags);
|
msg->getU32Fast(_PREHASH_Info, _PREHASH_TeleportFlags, teleport_flags);
|
||||||
|
|
||||||
U32 region_size_x = 256;
|
|
||||||
msg->getU32Fast(_PREHASH_Info, _PREHASH_RegionSizeX, region_size_x);
|
|
||||||
|
|
||||||
U32 region_size_y = 256;
|
|
||||||
msg->getU32Fast(_PREHASH_Info, _PREHASH_RegionSizeY, region_size_y);
|
|
||||||
|
|
||||||
//and a little hack for Second Life compatibility
|
|
||||||
if (region_size_y == 0 || region_size_x == 0)
|
|
||||||
{
|
|
||||||
region_size_x = 256;
|
|
||||||
region_size_y = 256;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string seedCap;
|
std::string seedCap;
|
||||||
msg->getStringFast(_PREHASH_Info, _PREHASH_SeedCapability, seedCap);
|
msg->getStringFast(_PREHASH_Info, _PREHASH_SeedCapability, seedCap);
|
||||||
@@ -3793,7 +3781,7 @@ void process_teleport_finish(LLMessageSystem* msg, void**)
|
|||||||
|
|
||||||
// Viewer trusts the simulator.
|
// Viewer trusts the simulator.
|
||||||
gMessageSystem->enableCircuit(sim_host, TRUE);
|
gMessageSystem->enableCircuit(sim_host, TRUE);
|
||||||
LLViewerRegion* regionp = LLWorld::getInstance()->addRegion(region_handle, sim_host, region_size_x, region_size_y);
|
LLViewerRegion* regionp = LLWorld::getInstance()->addRegion(region_handle, sim_host);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
// send camera update to new region
|
// send camera update to new region
|
||||||
@@ -4098,22 +4086,9 @@ void process_crossed_region(LLMessageSystem* msg, void**)
|
|||||||
std::string seedCap;
|
std::string seedCap;
|
||||||
msg->getStringFast(_PREHASH_RegionData, _PREHASH_SeedCapability, seedCap);
|
msg->getStringFast(_PREHASH_RegionData, _PREHASH_SeedCapability, seedCap);
|
||||||
|
|
||||||
U32 region_size_x = 256;
|
|
||||||
msg->getU32(_PREHASH_RegionData, _PREHASH_RegionSizeX, region_size_x);
|
|
||||||
|
|
||||||
U32 region_size_y = 256;
|
|
||||||
msg->getU32(_PREHASH_RegionData, _PREHASH_RegionSizeY, region_size_y);
|
|
||||||
|
|
||||||
//and a little hack for Second Life compatibility
|
|
||||||
if (region_size_y == 0 || region_size_x == 0)
|
|
||||||
{
|
|
||||||
region_size_x = 256;
|
|
||||||
region_size_y = 256;
|
|
||||||
}
|
|
||||||
|
|
||||||
send_complete_agent_movement(sim_host);
|
send_complete_agent_movement(sim_host);
|
||||||
|
|
||||||
LLViewerRegion* regionp = LLWorld::getInstance()->addRegion(region_handle, sim_host, region_size_x, region_size_y);
|
LLViewerRegion* regionp = LLWorld::getInstance()->addRegion(region_handle, sim_host);
|
||||||
regionp->setSeedCapability(seedCap);
|
regionp->setSeedCapability(seedCap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -143,24 +143,21 @@ LLViewerParcelMgr::LLViewerParcelMgr()
|
|||||||
mAgentParcel = new LLParcel();
|
mAgentParcel = new LLParcel();
|
||||||
mHoverParcel = new LLParcel();
|
mHoverParcel = new LLParcel();
|
||||||
mCollisionParcel = new LLParcel();
|
mCollisionParcel = new LLParcel();
|
||||||
mBlockedImage = LLViewerTextureManager::getFetchedTextureFromFile("noentrylines.j2c");
|
|
||||||
mPassImage = LLViewerTextureManager::getFetchedTextureFromFile("noentrypasslines.j2c");
|
|
||||||
}
|
|
||||||
|
|
||||||
//moved this stuff out of the constructor and into a function that we can call again after we get the region size.
|
mParcelsPerEdge = S32( REGION_WIDTH_METERS / PARCEL_GRID_STEP_METERS );
|
||||||
//LLViewerParcelMgr needs to be changed so we either get an instance per region, or it handles various region sizes
|
|
||||||
//on a single grid properly - Patrick Sapinski (2/10/2011)
|
|
||||||
void LLViewerParcelMgr::init(F32 region_size)
|
|
||||||
{
|
|
||||||
mParcelsPerEdge = S32( region_size / PARCEL_GRID_STEP_METERS );
|
|
||||||
mHighlightSegments = new U8[(mParcelsPerEdge+1)*(mParcelsPerEdge+1)];
|
mHighlightSegments = new U8[(mParcelsPerEdge+1)*(mParcelsPerEdge+1)];
|
||||||
resetSegments(mHighlightSegments);
|
resetSegments(mHighlightSegments);
|
||||||
|
|
||||||
mCollisionSegments = new U8[(mParcelsPerEdge+1)*(mParcelsPerEdge+1)];
|
mCollisionSegments = new U8[(mParcelsPerEdge+1)*(mParcelsPerEdge+1)];
|
||||||
resetSegments(mCollisionSegments);
|
resetSegments(mCollisionSegments);
|
||||||
|
|
||||||
S32 mParcelOverLayChunks = region_size * region_size / (128 * 128);
|
// JC: Resolved a merge conflict here, eliminated
|
||||||
S32 overlay_size = mParcelsPerEdge * mParcelsPerEdge / mParcelOverLayChunks;
|
// mBlockedImage->setAddressMode(LLTexUnit::TAM_WRAP);
|
||||||
|
// because it is done in llviewertexturelist.cpp
|
||||||
|
mBlockedImage = LLViewerTextureManager::getFetchedTextureFromFile("noentrylines.j2c");
|
||||||
|
mPassImage = LLViewerTextureManager::getFetchedTextureFromFile("noentrypasslines.j2c");
|
||||||
|
|
||||||
|
S32 overlay_size = mParcelsPerEdge * mParcelsPerEdge / PARCEL_OVERLAY_CHUNKS;
|
||||||
sPackedOverlay = new U8[overlay_size];
|
sPackedOverlay = new U8[overlay_size];
|
||||||
|
|
||||||
mAgentParcelOverlay = new U8[mParcelsPerEdge * mParcelsPerEdge];
|
mAgentParcelOverlay = new U8[mParcelsPerEdge * mParcelsPerEdge];
|
||||||
@@ -1412,7 +1409,8 @@ void LLViewerParcelMgr::processParcelOverlay(LLMessageSystem *msg, void **user)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
S32 expected_size = 1024;
|
S32 parcels_per_edge = LLViewerParcelMgr::getInstance()->mParcelsPerEdge;
|
||||||
|
S32 expected_size = parcels_per_edge * parcels_per_edge / PARCEL_OVERLAY_CHUNKS;
|
||||||
if (packed_overlay_size != expected_size)
|
if (packed_overlay_size != expected_size)
|
||||||
{
|
{
|
||||||
llwarns << "Got parcel overlay size " << packed_overlay_size
|
llwarns << "Got parcel overlay size " << packed_overlay_size
|
||||||
|
|||||||
@@ -90,8 +90,6 @@ public:
|
|||||||
LLViewerParcelMgr();
|
LLViewerParcelMgr();
|
||||||
~LLViewerParcelMgr();
|
~LLViewerParcelMgr();
|
||||||
|
|
||||||
void init(F32 region_size);
|
|
||||||
|
|
||||||
static void cleanupGlobals();
|
static void cleanupGlobals();
|
||||||
|
|
||||||
BOOL selectionEmpty() const;
|
BOOL selectionEmpty() const;
|
||||||
|
|||||||
@@ -59,7 +59,6 @@ const U8 OVERLAY_IMG_COMPONENTS = 4;
|
|||||||
LLViewerParcelOverlay::LLViewerParcelOverlay(LLViewerRegion* region, F32 region_width_meters)
|
LLViewerParcelOverlay::LLViewerParcelOverlay(LLViewerRegion* region, F32 region_width_meters)
|
||||||
: mRegion( region ),
|
: mRegion( region ),
|
||||||
mParcelGridsPerEdge( S32( region_width_meters / PARCEL_GRID_STEP_METERS ) ),
|
mParcelGridsPerEdge( S32( region_width_meters / PARCEL_GRID_STEP_METERS ) ),
|
||||||
mRegionSize(S32(region_width_meters)),
|
|
||||||
mDirty( FALSE ),
|
mDirty( FALSE ),
|
||||||
mTimeSinceLastUpdate(),
|
mTimeSinceLastUpdate(),
|
||||||
mOverlayTextureIdx(-1),
|
mOverlayTextureIdx(-1),
|
||||||
@@ -414,8 +413,7 @@ void LLViewerParcelOverlay::uncompressLandOverlay(S32 chunk, U8 *packed_overlay)
|
|||||||
{
|
{
|
||||||
// Unpack the message data into the ownership array
|
// Unpack the message data into the ownership array
|
||||||
S32 size = mParcelGridsPerEdge * mParcelGridsPerEdge;
|
S32 size = mParcelGridsPerEdge * mParcelGridsPerEdge;
|
||||||
S32 mParcelOverLayChunks = mRegionSize * mRegionSize / (128 * 128);
|
S32 chunk_size = size / PARCEL_OVERLAY_CHUNKS;
|
||||||
S32 chunk_size = size / mParcelOverLayChunks;
|
|
||||||
|
|
||||||
memcpy(mOwnership + chunk*chunk_size, packed_overlay, chunk_size); /*Flawfinder: ignore*/
|
memcpy(mOwnership + chunk*chunk_size, packed_overlay, chunk_size); /*Flawfinder: ignore*/
|
||||||
|
|
||||||
|
|||||||
@@ -109,7 +109,6 @@ private:
|
|||||||
LLViewerRegion* mRegion;
|
LLViewerRegion* mRegion;
|
||||||
|
|
||||||
S32 mParcelGridsPerEdge;
|
S32 mParcelGridsPerEdge;
|
||||||
S32 mRegionSize;
|
|
||||||
|
|
||||||
LLPointer<LLViewerTexture> mTexture;
|
LLPointer<LLViewerTexture> mTexture;
|
||||||
LLPointer<LLImageRaw> mImageRaw;
|
LLPointer<LLImageRaw> mImageRaw;
|
||||||
|
|||||||
@@ -242,9 +242,9 @@ LLViewerRegion::LLViewerRegion(const U64 &handle,
|
|||||||
mCacheLoaded(FALSE),
|
mCacheLoaded(FALSE),
|
||||||
mCacheDirty(FALSE),
|
mCacheDirty(FALSE),
|
||||||
mReleaseNotesRequested(FALSE),
|
mReleaseNotesRequested(FALSE),
|
||||||
mCapabilitiesReceived(false),
|
mCapabilitiesReceived(false)
|
||||||
mWidth(region_width_meters)
|
|
||||||
{
|
{
|
||||||
|
mWidth = region_width_meters;
|
||||||
mImpl->mOriginGlobal = from_region_handle(handle);
|
mImpl->mOriginGlobal = from_region_handle(handle);
|
||||||
updateRenderMatrix();
|
updateRenderMatrix();
|
||||||
|
|
||||||
@@ -256,7 +256,7 @@ LLViewerRegion::LLViewerRegion(const U64 &handle,
|
|||||||
mImpl->mCompositionp =
|
mImpl->mCompositionp =
|
||||||
new LLVLComposition(mImpl->mLandp,
|
new LLVLComposition(mImpl->mLandp,
|
||||||
grids_per_region_edge,
|
grids_per_region_edge,
|
||||||
mWidth / grids_per_region_edge);
|
region_width_meters / grids_per_region_edge);
|
||||||
mImpl->mCompositionp->setSurface(mImpl->mLandp);
|
mImpl->mCompositionp->setSurface(mImpl->mLandp);
|
||||||
|
|
||||||
// Create the surfaces
|
// Create the surfaces
|
||||||
@@ -269,9 +269,7 @@ LLViewerRegion::LLViewerRegion(const U64 &handle,
|
|||||||
|
|
||||||
if (!gNoRender)
|
if (!gNoRender)
|
||||||
{
|
{
|
||||||
mParcelOverlay = new LLViewerParcelOverlay(this, mWidth);
|
mParcelOverlay = new LLViewerParcelOverlay(this, region_width_meters);
|
||||||
//Re-init the parcel mgr for this sim
|
|
||||||
LLViewerParcelMgr::getInstance()->init(mWidth);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ BOOL LLVLComposition::generateHeights(const F32 x, const F32 y,
|
|||||||
const F32 xyScaleInv = (1.f / xyScale);
|
const F32 xyScaleInv = (1.f / xyScale);
|
||||||
const F32 zScaleInv = (1.f / zScale);
|
const F32 zScaleInv = (1.f / zScale);
|
||||||
|
|
||||||
const F32 inv_width = 1.f/256.f;
|
const F32 inv_width = 1.f/mWidth;
|
||||||
|
|
||||||
// OK, for now, just have the composition value equal the height at the point.
|
// OK, for now, just have the composition value equal the height at the point.
|
||||||
for (S32 j = y_begin; j < y_end; j++)
|
for (S32 j = y_begin; j < y_end; j++)
|
||||||
|
|||||||
@@ -56,26 +56,18 @@ LLVLManager::~LLVLManager()
|
|||||||
|
|
||||||
void LLVLManager::addLayerData(LLVLData *vl_datap, const S32 mesg_size)
|
void LLVLManager::addLayerData(LLVLData *vl_datap, const S32 mesg_size)
|
||||||
{
|
{
|
||||||
if (LAND_LAYER_CODE == vl_datap->mType ||
|
if (LAND_LAYER_CODE == vl_datap->mType)
|
||||||
AURORA_LAND_LAYER_CODE == vl_datap->mType)
|
|
||||||
{
|
{
|
||||||
mLandBits += mesg_size * 8;
|
mLandBits += mesg_size * 8;
|
||||||
}
|
}
|
||||||
else if (WIND_LAYER_CODE == vl_datap->mType ||
|
else if (WIND_LAYER_CODE == vl_datap->mType)
|
||||||
AURORA_WIND_LAYER_CODE == vl_datap->mType)
|
|
||||||
{
|
{
|
||||||
mWindBits += mesg_size * 8;
|
mWindBits += mesg_size * 8;
|
||||||
}
|
}
|
||||||
else if (CLOUD_LAYER_CODE == vl_datap->mType ||
|
else if (CLOUD_LAYER_CODE == vl_datap->mType)
|
||||||
AURORA_CLOUD_LAYER_CODE == vl_datap->mType)
|
|
||||||
{
|
{
|
||||||
mCloudBits += mesg_size * 8;
|
mCloudBits += mesg_size * 8;
|
||||||
}
|
}
|
||||||
else if (WATER_LAYER_CODE == vl_datap->mType ||
|
|
||||||
AURORA_CLOUD_LAYER_CODE == vl_datap->mType)
|
|
||||||
{
|
|
||||||
mWaterBits += mesg_size * 8;
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
llerrs << "Unknown layer type!" << (S32)vl_datap->mType << llendl;
|
llerrs << "Unknown layer type!" << (S32)vl_datap->mType << llendl;
|
||||||
@@ -101,25 +93,15 @@ void LLVLManager::unpackData(const S32 num_packets)
|
|||||||
{
|
{
|
||||||
datap->mRegionp->getLand().decompressDCTPatch(bit_pack, &goph, FALSE);
|
datap->mRegionp->getLand().decompressDCTPatch(bit_pack, &goph, FALSE);
|
||||||
}
|
}
|
||||||
else if (AURORA_LAND_LAYER_CODE == datap->mType)
|
else if (WIND_LAYER_CODE == datap->mType)
|
||||||
{
|
|
||||||
datap->mRegionp->getLand().decompressDCTPatch(bit_pack, &goph, TRUE);
|
|
||||||
}
|
|
||||||
else if (WIND_LAYER_CODE == datap->mType ||
|
|
||||||
AURORA_WIND_LAYER_CODE == datap->mType)
|
|
||||||
{
|
{
|
||||||
datap->mRegionp->mWind.decompress(bit_pack, &goph);
|
datap->mRegionp->mWind.decompress(bit_pack, &goph);
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (CLOUD_LAYER_CODE == datap->mType ||
|
else if (CLOUD_LAYER_CODE == datap->mType)
|
||||||
AURORA_CLOUD_LAYER_CODE == datap->mType)
|
|
||||||
{
|
{
|
||||||
datap->mRegionp->mCloudLayer.decompress(bit_pack, &goph);
|
datap->mRegionp->mCloudLayer.decompress(bit_pack, &goph);
|
||||||
}
|
}
|
||||||
else if (WATER_LAYER_CODE == datap->mType ||
|
|
||||||
AURORA_WATER_LAYER_CODE == datap->mType)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < mPacketData.count(); i++)
|
for (i = 0; i < mPacketData.count(); i++)
|
||||||
|
|||||||
@@ -65,7 +65,6 @@ protected:
|
|||||||
U32 mLandBits;
|
U32 mLandBits;
|
||||||
U32 mWindBits;
|
U32 mWindBits;
|
||||||
U32 mCloudBits;
|
U32 mCloudBits;
|
||||||
U32 mWaterBits;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class LLVLData
|
class LLVLData
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ LLVOWater::LLVOWater(const LLUUID &id,
|
|||||||
{
|
{
|
||||||
// Terrain must draw during selection passes so it can block objects behind it.
|
// Terrain must draw during selection passes so it can block objects behind it.
|
||||||
mbCanSelect = FALSE;
|
mbCanSelect = FALSE;
|
||||||
setScale(LLVector3(mRegionp->getWidth(), mRegionp->getWidth(), 0.f)); // Hack for setting scale for bounding boxes/visibility.
|
setScale(LLVector3(256.f, 256.f, 0.f)); // Hack for setting scale for bounding boxes/visibility.
|
||||||
|
|
||||||
mUseTexture = TRUE;
|
mUseTexture = TRUE;
|
||||||
mIsEdgePatch = FALSE;
|
mIsEdgePatch = FALSE;
|
||||||
|
|||||||
@@ -121,12 +121,12 @@ void LLWind::decompress(LLBitPack &bitpack, LLGroupHeader *group_headerp)
|
|||||||
set_group_of_patch_header(group_headerp);
|
set_group_of_patch_header(group_headerp);
|
||||||
|
|
||||||
// X component
|
// X component
|
||||||
decode_patch_header(bitpack, &patch_header, FALSE);
|
decode_patch_header(bitpack, &patch_header);
|
||||||
decode_patch(bitpack, buffer);
|
decode_patch(bitpack, buffer);
|
||||||
decompress_patch(mVelX, buffer, &patch_header);
|
decompress_patch(mVelX, buffer, &patch_header);
|
||||||
|
|
||||||
// Y component
|
// Y component
|
||||||
decode_patch_header(bitpack, &patch_header, FALSE);
|
decode_patch_header(bitpack, &patch_header);
|
||||||
decode_patch(bitpack, buffer);
|
decode_patch(bitpack, buffer);
|
||||||
decompress_patch(mVelY, buffer, &patch_header);
|
decompress_patch(mVelY, buffer, &patch_header);
|
||||||
|
|
||||||
|
|||||||
@@ -80,12 +80,12 @@ const S32 WORLD_PATCH_SIZE = 16;
|
|||||||
|
|
||||||
extern LLColor4U MAX_WATER_COLOR;
|
extern LLColor4U MAX_WATER_COLOR;
|
||||||
|
|
||||||
U32 LLWorld::mWidth = 256;
|
const U32 LLWorld::mWidth = 256;
|
||||||
|
|
||||||
// meters/point, therefore mWidth * mScale = meters per edge
|
// meters/point, therefore mWidth * mScale = meters per edge
|
||||||
const F32 LLWorld::mScale = 1.f;
|
const F32 LLWorld::mScale = 1.f;
|
||||||
|
|
||||||
F32 LLWorld::mWidthInMeters = mWidth * mScale;
|
const F32 LLWorld::mWidthInMeters = mWidth * mScale;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Functions
|
// Functions
|
||||||
@@ -146,7 +146,7 @@ void LLWorld::destroyClass()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
LLViewerRegion* LLWorld::addRegion(const U64 ®ion_handle, const LLHost &host, const U32 ®ion_size_x, const U32 ®ion_size_y)
|
LLViewerRegion* LLWorld::addRegion(const U64 ®ion_handle, const LLHost &host)
|
||||||
{
|
{
|
||||||
LLMemType mt(LLMemType::MTYPE_REGIONS);
|
LLMemType mt(LLMemType::MTYPE_REGIONS);
|
||||||
llinfos << "Add region with handle: " << region_handle << " on host " << host << llendl;
|
llinfos << "Add region with handle: " << region_handle << " on host " << host << llendl;
|
||||||
@@ -179,11 +179,9 @@ LLViewerRegion* LLWorld::addRegion(const U64 ®ion_handle, const LLHost &host,
|
|||||||
|
|
||||||
U32 iindex = 0;
|
U32 iindex = 0;
|
||||||
U32 jindex = 0;
|
U32 jindex = 0;
|
||||||
mWidth = region_size_x; //MegaRegion
|
|
||||||
mWidthInMeters = mWidth * mScale; //MegaRegion
|
|
||||||
from_region_handle(region_handle, &iindex, &jindex);
|
from_region_handle(region_handle, &iindex, &jindex);
|
||||||
S32 x = (S32)(iindex/256); //MegaRegion
|
S32 x = (S32)(iindex/mWidth);
|
||||||
S32 y = (S32)(jindex/256); //MegaRegion
|
S32 y = (S32)(jindex/mWidth);
|
||||||
llinfos << "Adding new region (" << x << ":" << y << ")" << llendl;
|
llinfos << "Adding new region (" << x << ":" << y << ")" << llendl;
|
||||||
llinfos << "Host: " << host << llendl;
|
llinfos << "Host: " << host << llendl;
|
||||||
|
|
||||||
@@ -837,7 +835,7 @@ F32 LLWorld::getLandFarClip() const
|
|||||||
|
|
||||||
void LLWorld::setLandFarClip(const F32 far_clip)
|
void LLWorld::setLandFarClip(const F32 far_clip)
|
||||||
{
|
{
|
||||||
static S32 const rwidth = (S32)getRegionWidthInMeters();
|
static S32 const rwidth = (S32)REGION_WIDTH_U32;
|
||||||
S32 const n1 = (llceil(mLandFarClip) - 1) / rwidth;
|
S32 const n1 = (llceil(mLandFarClip) - 1) / rwidth;
|
||||||
S32 const n2 = (llceil(far_clip) - 1) / rwidth;
|
S32 const n2 = (llceil(far_clip) - 1) / rwidth;
|
||||||
bool need_water_objects_update = n1 != n2;
|
bool need_water_objects_update = n1 != n2;
|
||||||
@@ -1267,21 +1265,9 @@ void process_enable_simulator(LLMessageSystem *msg, void **user_data)
|
|||||||
// which simulator should we modify?
|
// which simulator should we modify?
|
||||||
LLHost sim(ip_u32, port);
|
LLHost sim(ip_u32, port);
|
||||||
|
|
||||||
U32 region_size_x = 256;
|
|
||||||
msg->getU32Fast(_PREHASH_SimulatorInfo, _PREHASH_RegionSizeX, region_size_x);
|
|
||||||
|
|
||||||
U32 region_size_y = 256;
|
|
||||||
msg->getU32Fast(_PREHASH_SimulatorInfo, _PREHASH_RegionSizeY, region_size_y);
|
|
||||||
|
|
||||||
if (region_size_y == 0 || region_size_x == 0)
|
|
||||||
{
|
|
||||||
region_size_x = 256;
|
|
||||||
region_size_y = 256;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Viewer trusts the simulator.
|
// Viewer trusts the simulator.
|
||||||
msg->enableCircuit(sim, TRUE);
|
msg->enableCircuit(sim, TRUE);
|
||||||
LLWorld::getInstance()->addRegion(handle, sim, region_size_x, region_size_y);
|
LLWorld::getInstance()->addRegion(handle, sim);
|
||||||
|
|
||||||
// give the simulator a message it can use to get ip and port
|
// give the simulator a message it can use to get ip and port
|
||||||
llinfos << "simulator_enable() Enabling " << sim << " with code " << msg->getOurCircuitCode() << llendl;
|
llinfos << "simulator_enable() Enabling " << sim << " with code " << msg->getOurCircuitCode() << llendl;
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ public:
|
|||||||
LLWorld();
|
LLWorld();
|
||||||
void destroyClass();
|
void destroyClass();
|
||||||
|
|
||||||
LLViewerRegion* addRegion(const U64 ®ion_handle, const LLHost &host, const U32 ®ion_size_x, const U32 ®ion_size_y);
|
LLViewerRegion* addRegion(const U64 ®ion_handle, const LLHost &host);
|
||||||
// safe to call if already present, does the "right thing" if
|
// safe to call if already present, does the "right thing" if
|
||||||
// hosts are same, or if hosts are different, etc...
|
// hosts are same, or if hosts are different, etc...
|
||||||
void removeRegion(const LLHost &host);
|
void removeRegion(const LLHost &host);
|
||||||
@@ -170,12 +170,12 @@ private:
|
|||||||
region_list_t mCulledRegionList;
|
region_list_t mCulledRegionList;
|
||||||
|
|
||||||
// Number of points on edge
|
// Number of points on edge
|
||||||
static U32 mWidth;
|
static const U32 mWidth;
|
||||||
|
|
||||||
// meters/point, therefore mWidth * mScale = meters per edge
|
// meters/point, therefore mWidth * mScale = meters per edge
|
||||||
static const F32 mScale;
|
static const F32 mScale;
|
||||||
|
|
||||||
static F32 mWidthInMeters;
|
static const F32 mWidthInMeters;
|
||||||
|
|
||||||
F32 mLandFarClip; // Far clip distance for land.
|
F32 mLandFarClip; // Far clip distance for land.
|
||||||
LLPatchVertexArray mLandPatch;
|
LLPatchVertexArray mLandPatch;
|
||||||
|
|||||||
@@ -2445,4 +2445,5 @@ osSetWindParam(string plugin, string param, float value)
|
|||||||
Sets value of param property for plugin module.
|
Sets value of param property for plugin module.
|
||||||
(OpenSim only.)
|
(OpenSim only.)
|
||||||
</string>
|
</string>
|
||||||
|
<string name="Unnamed">(Unnamed)</string>
|
||||||
</strings>
|
</strings>
|
||||||
|
|||||||
Reference in New Issue
Block a user