From 8431e6c4ed66d7578328dddf889ec0d69dc02f06 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Fri, 20 Dec 2024 13:37:38 +0100 Subject: [PATCH] Remove Kitty's worldmap tiles code for the minimap --- indra/newview/app_settings/settings.xml | 11 --- indra/newview/llnetmap.cpp | 113 ++++-------------------- indra/newview/llnetmap.h | 2 - 3 files changed, 16 insertions(+), 110 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 8a2a3be9c9..d1496fd069 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -8511,17 +8511,6 @@ Value 0 - MiniMapWorldMapTextures - - Comment - Use the world map texture tile on the mini-map rather than the terrain texture - Persist - 0 - Type - Boolean - Value - 1 - MiniMapRotate Comment diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index edf9b92854..4eeab0d8d3 100644 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -213,7 +213,6 @@ bool LLNetMap::postBuild() commitRegistrar.add("Minimap.StartTracking", boost::bind(&LLNetMap::handleStartTracking, this)); // [SL:KB] - Patch: World-MiniMap | Checked: 2012-07-08 (Catznip-3.3) commitRegistrar.add("Minimap.ShowProfile", boost::bind(&LLNetMap::handleShowProfile, this, _2)); - commitRegistrar.add("Minimap.TextureType", boost::bind(&LLNetMap::handleTextureType, this, _2)); commitRegistrar.add("Minimap.ToggleOverlay", boost::bind(&LLNetMap::handleOverlayToggle, this, _2)); commitRegistrar.add("Minimap.AddFriend", boost::bind(&LLNetMap::handleAddFriend, this)); @@ -238,9 +237,6 @@ bool LLNetMap::postBuild() commitRegistrar.add("Minimap.EstateBan", boost::bind(&LLNetMap::handleEstateBan, this)); commitRegistrar.add("Minimap.Derender", boost::bind(&LLNetMap::handleDerender, this, false)); commitRegistrar.add("Minimap.DerenderPermanent", boost::bind(&LLNetMap::handleDerender, this, true)); - - enableRegistrar.add("Minimap.CheckTextureType", boost::bind(&LLNetMap::checkTextureType, this, _2)); - enableRegistrar.add("Minimap.CanAddFriend", boost::bind(&LLNetMap::canAddFriend, this)); enableRegistrar.add("Minimap.CanRemoveFriend", boost::bind(&LLNetMap::canRemoveFriend, this)); enableRegistrar.add("Minimap.CanCall", boost::bind(&LLNetMap::canCall, this)); @@ -458,86 +454,26 @@ void LLNetMap::draw() gGL.color4f(1.f, 0.5f, 0.5f, 1.f); } -// [SL:KB] - Patch: World-MinimapOverlay | Checked: 2012-07-26 (Catznip-3.3) - static LLCachedControl s_fUseWorldMapTextures(gSavedSettings, "MiniMapWorldMapTextures") ; - bool fRenderTerrain = true; - - if (s_fUseWorldMapTextures) + // Draw using texture. + gGL.getTexUnit(0)->bind(regionp->getLand().getSTexture()); + gGL.begin(LLRender::TRIANGLES); { - const LLViewerRegion::tex_matrix_t& tiles(regionp->getWorldMapTiles()); - for (S32 i(0), scaled_width((S32)(real_width / region_width)), square_width(scaled_width * scaled_width); - i < square_width; ++i) - { - const F32 y = (F32)(i / scaled_width); - const F32 x = (F32)(i - y * scaled_width); - const F32 local_left(left + x * mScale); - const F32 local_right(local_left + mScale); - const F32 local_bottom(bottom + y * mScale); - const F32 local_top(local_bottom + mScale); - LLViewerTexture* pRegionImage = tiles[(U64)(x * scaled_width + y)]; - if (pRegionImage) - { - // Ansariel: Map texture ends up without GLTexture after a teleport. - // Simply calling createGLTexture() should be fine here - // because the same method is called in getSTexture() in - // the render terrain path if for some reason no - // GLTexture exists. - if (!pRegionImage->hasGLTexture() && !pRegionImage->createGLTexture()) - { - continue; - } + gGL.texCoord2f(0.f, 1.f); + gGL.vertex2f(left, top); + gGL.texCoord2f(0.f, 0.f); + gGL.vertex2f(left, bottom); + gGL.texCoord2f(1.f, 0.f); + gGL.vertex2f(right, bottom); - gGL.getTexUnit(0)->bind(pRegionImage); - gGL.begin(LLRender::TRIANGLES); - { - gGL.texCoord2f(0.f, 1.f); - gGL.vertex2f(local_left, local_top); - gGL.texCoord2f(0.f, 0.f); - gGL.vertex2f(local_left, local_bottom); - gGL.texCoord2f(1.f, 0.f); - gGL.vertex2f(local_right, local_bottom); - - gGL.texCoord2f(0.f, 1.f); - gGL.vertex2f(local_left, local_top); - gGL.texCoord2f(1.f, 0.f); - gGL.vertex2f(local_right, local_bottom); - gGL.texCoord2f(1.f, 1.f); - gGL.vertex2f(local_right, local_top); - } - gGL.end(); - - pRegionImage->setBoostLevel(LLViewerTexture::BOOST_MAP_VISIBLE); - fRenderTerrain = false; - } - } + gGL.texCoord2f(0.f, 1.f); + gGL.vertex2f(left, top); + gGL.texCoord2f(1.f, 0.f); + gGL.vertex2f(right, bottom); + gGL.texCoord2f(1.f, 1.f); + gGL.vertex2f(right, top); } -// [/SL:KB] + gGL.end(); -// [SL:KB] - Patch: World-MinimapOverlay | Checked: 2012-07-26 (Catznip-3.3) - if (fRenderTerrain) - { -// [/SL:KB] - // Draw using texture. - gGL.getTexUnit(0)->bind(regionp->getLand().getSTexture()); - gGL.begin(LLRender::TRIANGLES); - { - gGL.texCoord2f(0.f, 1.f); - gGL.vertex2f(left, top); - gGL.texCoord2f(0.f, 0.f); - gGL.vertex2f(left, bottom); - gGL.texCoord2f(1.f, 0.f); - gGL.vertex2f(right, bottom); - - gGL.texCoord2f(0.f, 1.f); - gGL.vertex2f(left, top); - gGL.texCoord2f(1.f, 0.f); - gGL.vertex2f(right, bottom); - gGL.texCoord2f(1.f, 1.f); - gGL.vertex2f(right, top); - } - gGL.end(); -// [SL:KB] - Patch: World-MinimapOverlay | Checked: 2012-07-26 (Catznip-3.3) - } gGL.flush(); } @@ -1741,23 +1677,6 @@ void LLNetMap::handleShowProfile(const LLSD& sdParam) const FSFloaterPlaceDetails::showPlaceDetails(sdParams); } } - -bool LLNetMap::checkTextureType(const LLSD& sdParam) const -{ - const std::string strParam = sdParam.asString(); - - bool fWorldMapTextures = gSavedSettings.getBOOL("MiniMapWorldMapTextures"); - if ("maptile" == strParam) - return fWorldMapTextures; - else if ("terrain" == strParam) - return !fWorldMapTextures; - return false; -} - -void LLNetMap::handleTextureType(const LLSD& sdParam) const -{ - gSavedSettings.setBOOL("MiniMapWorldMapTextures", ("maptile" == sdParam.asString())); -} // [/SL:KB] bool LLNetMap::handleRightMouseDown(S32 x, S32 y, MASK mask) diff --git a/indra/newview/llnetmap.h b/indra/newview/llnetmap.h index 7bd1fa1bde..ea44430318 100644 --- a/indra/newview/llnetmap.h +++ b/indra/newview/llnetmap.h @@ -224,8 +224,6 @@ private: void handleCam(); // [SL:KB] - Patch: World-MiniMap | Checked: 2012-07-08 (Catznip-3.3) void handleOverlayToggle(const LLSD& sdParam); - bool checkTextureType(const LLSD& sdParam) const; - void handleTextureType(const LLSD& sdParam) const; void setAvatarProfileLabel(const LLUUID& av_id, const LLAvatarName& avName, const std::string& item_name); typedef std::map avatar_name_cache_connection_map_t; avatar_name_cache_connection_map_t mAvatarNameCacheConnections;