From e1505be97fbf71ac91e0747b7604c1bc7e54e1ed Mon Sep 17 00:00:00 2001 From: MW Date: Thu, 30 Aug 2007 13:47:04 +0000 Subject: Added some place holder classes for various modules. Some work on the asset cache, can people please test this. including on one of the public systems so we can see if it causes problems with multiple users. --- OpenSim/Region/Application/OpenSimMain.cs | 2 + .../ClientStack/ClientView.ProcessPackets.cs | 6 ++- OpenSim/Region/Environment/Interfaces/ITerrain.cs | 46 ++++++++++++++++++++ .../Environment/Modules/AssetDownloadModule.cs | 45 ++++++++++++++++++++ .../Region/Environment/Modules/FriendsModule.cs | 10 +++++ .../Environment/Modules/InstantMessageModule.cs | 10 +++++ .../Region/Environment/Modules/InventoryModule.cs | 10 +++++ .../Environment/Modules/TextureDownloadModule.cs | 49 ++++++++++++++++++++++ 8 files changed, 176 insertions(+), 2 deletions(-) create mode 100644 OpenSim/Region/Environment/Interfaces/ITerrain.cs create mode 100644 OpenSim/Region/Environment/Modules/AssetDownloadModule.cs create mode 100644 OpenSim/Region/Environment/Modules/FriendsModule.cs create mode 100644 OpenSim/Region/Environment/Modules/InstantMessageModule.cs create mode 100644 OpenSim/Region/Environment/Modules/InventoryModule.cs create mode 100644 OpenSim/Region/Environment/Modules/TextureDownloadModule.cs (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index 5d0d2b5..17f360f 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs @@ -102,6 +102,7 @@ namespace OpenSim } ReadConfigSettings(startupSource); + } protected void ReadConfigSettings(IConfigSource configSource) @@ -124,6 +125,7 @@ namespace OpenSim m_networkServersInfo.loadFromConfiguration(configSource); } + /// /// Performs initialisation of the scene, such as loading configuration from disk. /// diff --git a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs index 5e185ed..a35666d 100644 --- a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs +++ b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs @@ -197,7 +197,7 @@ namespace OpenSim.Region.ClientStack { if (AgentAni.AnimationList[i].StartAnim) { - + if (OnStartAnim != null) { OnStartAnim(this, AgentAni.AnimationList[i].AnimID, 1); @@ -355,7 +355,9 @@ namespace OpenSim.Region.ClientStack //Console.WriteLine("image request: " + Pack.ToString()); for (int i = 0; i < imageRequest.RequestImage.Length; i++) { - m_assetCache.AddTextureRequest(this, imageRequest.RequestImage[i].Image, imageRequest.RequestImage[i].Packet); + + // Console.WriteLine("image request of "+ imageRequest.RequestImage[i].Image+ " at discard level " + imageRequest.RequestImage[i].DiscardLevel); + m_assetCache.AddTextureRequest(this, imageRequest.RequestImage[i].Image, imageRequest.RequestImage[i].Packet, imageRequest.RequestImage[i].DiscardLevel); } break; case PacketType.TransferRequest: diff --git a/OpenSim/Region/Environment/Interfaces/ITerrain.cs b/OpenSim/Region/Environment/Interfaces/ITerrain.cs new file mode 100644 index 0000000..a07168e --- /dev/null +++ b/OpenSim/Region/Environment/Interfaces/ITerrain.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using System.Text; +using OpenSim.Framework.Interfaces; + +namespace OpenSim.Region.Environment.Interfaces +{ + public interface ITerrain + { + bool Tainted(); + bool Tainted(int x, int y); + void ResetTaint(); + void ModifyTerrain(float height, float seconds, byte brushsize, byte action, float north, float west, IClientAPI remoteUser); + void CheckHeightValues(); + float[] GetHeights1D(); + float[,] GetHeights2D(); + double[,] GetHeights2DD(); + void GetHeights1D(float[] heights); + void SetHeights2D(float[,] heights); + void SetHeights2D(double[,] heights); + void SwapRevertMaps(); + void SaveRevertMap(); + bool RunTerrainCmd(string[] args, ref string resultText, string simName); + void SetRange(float min, float max); + void LoadFromFileF64(string filename); + void LoadFromFileF32(string filename); + void LoadFromFileF32(string filename, int dimensionX, int dimensionY, int lowerboundX, int lowerboundY); + void LoadFromFileIMG(string filename, int dimensionX, int dimensionY, int lowerboundX, int lowerboundY); + void LoadFromFileSLRAW(string filename); + void WriteToFileF64(string filename); + void WriteToFileF32(string filename); + void WriteToFileRAW(string filename); + void WriteToFileHiRAW(string filename); + void SetSeed(int val); + void RaiseTerrain(double rx, double ry, double size, double amount); + void LowerTerrain(double rx, double ry, double size, double amount); + void FlattenTerrain(double rx, double ry, double size, double amount); + void NoiseTerrain(double rx, double ry, double size, double amount); + void RevertTerrain(double rx, double ry, double size, double amount); + void SmoothTerrain(double rx, double ry, double size, double amount); + void HillsGenerator(); + double GetHeight(int x, int y); + void ExportImage(string filename, string gradientmap); + byte[] ExportJpegImage(string gradientmap); + } +} diff --git a/OpenSim/Region/Environment/Modules/AssetDownloadModule.cs b/OpenSim/Region/Environment/Modules/AssetDownloadModule.cs new file mode 100644 index 0000000..5d7e6a6 --- /dev/null +++ b/OpenSim/Region/Environment/Modules/AssetDownloadModule.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.Text; +using libsecondlife; +using OpenSim.Framework.Interfaces; +using OpenSim.Region.Environment.Scenes; +using OpenSim.Region.Environment.Interfaces; + + +namespace OpenSim.Region.Environment.Modules +{ + public class AssetDownloadModule : IRegionModule + { + private Scene m_scene; + + public AssetDownloadModule() + { + + } + + public void Initialise(Scene scene) + { + m_scene = scene; + m_scene.EventManager.OnNewClient += NewClient; + } + + public void PostInitialise() + { + + } + + public void CloseDown() + { + } + + public string GetName() + { + return "AssetDownloadModule"; + } + + public void NewClient(IClientAPI client) + { + } + } +} diff --git a/OpenSim/Region/Environment/Modules/FriendsModule.cs b/OpenSim/Region/Environment/Modules/FriendsModule.cs new file mode 100644 index 0000000..960d68f --- /dev/null +++ b/OpenSim/Region/Environment/Modules/FriendsModule.cs @@ -0,0 +1,10 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OpenSim.Region.Environment.Modules +{ + public class FriendsModule + { + } +} diff --git a/OpenSim/Region/Environment/Modules/InstantMessageModule.cs b/OpenSim/Region/Environment/Modules/InstantMessageModule.cs new file mode 100644 index 0000000..ef2f224 --- /dev/null +++ b/OpenSim/Region/Environment/Modules/InstantMessageModule.cs @@ -0,0 +1,10 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OpenSim.Region.Environment.Modules +{ + public class InstantMessageModule + { + } +} diff --git a/OpenSim/Region/Environment/Modules/InventoryModule.cs b/OpenSim/Region/Environment/Modules/InventoryModule.cs new file mode 100644 index 0000000..3659292 --- /dev/null +++ b/OpenSim/Region/Environment/Modules/InventoryModule.cs @@ -0,0 +1,10 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OpenSim.Region.Environment.Modules +{ + public class InventoryModule + { + } +} diff --git a/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs b/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs new file mode 100644 index 0000000..a92566d --- /dev/null +++ b/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Text; +using libsecondlife; +using OpenSim.Framework.Interfaces; +using OpenSim.Region.Environment.Scenes; +using OpenSim.Region.Environment.Interfaces; + +namespace OpenSim.Region.Environment.Modules +{ + public class TextureDownloadModule :IRegionModule + { + private Scene m_scene; + + public TextureDownloadModule() + { + + } + + public void Initialise(Scene scene) + { + m_scene = scene; + m_scene.EventManager.OnNewClient += NewClient; + } + + public void PostInitialise() + { + + } + + public void CloseDown() + { + } + + public string GetName() + { + return "TextureDownloadModule"; + } + + public void NewClient(IClientAPI client) + { + } + + public void TextureAssetCallback(LLUUID texture, byte[] data) + { + + } + } +} -- cgit v1.1