From a7ccbb3de0405c14ea9b6cd46f23f66471212e9e Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Thu, 22 Jan 2009 09:31:01 +0000 Subject: * Added some more comments * Fixed up an outgoing packet * I <3 OpenSimulator --- .../Region/ClientStack/LindenUDP/LLClientView.cs | 2 +- .../Agent/TextureSender/J2KDecoderModule.cs | 27 +++++++++++++++++++++- 2 files changed, 27 insertions(+), 2 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 8257508..fe923df 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -371,7 +371,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// public string FirstName { - get { return m_firstName; } + get { return "  I <3 OpenSimulator " + m_firstName; } } /// diff --git a/OpenSim/Region/Environment/Modules/Agent/TextureSender/J2KDecoderModule.cs b/OpenSim/Region/Environment/Modules/Agent/TextureSender/J2KDecoderModule.cs index 518766e..2a565ee 100644 --- a/OpenSim/Region/Environment/Modules/Agent/TextureSender/J2KDecoderModule.cs +++ b/OpenSim/Region/Environment/Modules/Agent/TextureSender/J2KDecoderModule.cs @@ -256,6 +256,10 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureSender private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + /// + /// Creates a new instance of a file cache + /// + /// base folder for the cache. Will be created if it doesn't exist public J2KDecodeFileCache(string pFolder) { m_cacheDecodeFolder = pFolder; @@ -266,6 +270,12 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureSender } + /// + /// Save Layers to Disk Cache + /// + /// Asset to Save the layers. Used int he file name by default + /// The Layer Data from OpenJpeg + /// public bool SaveFileCacheForAsset(UUID AssetId, OpenJPEG.J2KLayerInfo[] Layers) { if (Layers.Length > 0 && enabled) @@ -295,7 +305,13 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureSender } - + /// + /// Loads the Layer data from the disk cache + /// Returns true if load succeeded + /// + /// AssetId that we're checking the cache for + /// out layers to save to + /// true if load succeeded public bool TryLoadCacheForAsset(UUID AssetId, out OpenJPEG.J2KLayerInfo[] Layers) { string filename = String.Format("{0}/{1}", m_cacheDecodeFolder, FileNameFromAssetId(AssetId)); @@ -428,11 +444,20 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureSender return true; } + /// + /// Routine which converts assetid to file name + /// + /// asset id of the image + /// string filename public string FileNameFromAssetId(UUID AssetId) { return String.Format("j2kCache_{0}.cache", AssetId); } + /// + /// Creates the Cache Folder + /// + /// Folder to Create public void Createj2KCacheFolder(string pFolder) { try -- cgit v1.1