From 6072fd86675d81c52371ad4d5f2b942a2e00da7f Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Sat, 2 Jun 2007 01:34:00 +0000 Subject: * Some commenting on asset server (needs completing) * Removed strip2.png - added defaultstripe.png * World map images are now generated when the terrain is tainted, not yet sent to the grid/asset server. --- .../SQLiteManager.cs | 26 +++++++++++++++ .../AssetHttpServer.cs | 37 +++++++++++++++++++++ .../OpenGridServices.AssetServer/Main.cs | 1 + OpenSim/OpenSim.RegionServer/world/World.cs | 2 ++ bin/defaultstripe.png | Bin 0 -> 887 bytes bin/stripe3.png | Bin 887 -> 0 bytes 6 files changed, 66 insertions(+) create mode 100644 bin/defaultstripe.png delete mode 100644 bin/stripe3.png diff --git a/OpenGridServices/OpenGrid.Framework.Data.SQLite/SQLiteManager.cs b/OpenGridServices/OpenGrid.Framework.Data.SQLite/SQLiteManager.cs index 7da16db..8779438 100644 --- a/OpenGridServices/OpenGrid.Framework.Data.SQLite/SQLiteManager.cs +++ b/OpenGridServices/OpenGrid.Framework.Data.SQLite/SQLiteManager.cs @@ -1,3 +1,29 @@ +/* +* Copyright (c) OpenSim project, http://sim.opensecondlife.org/ +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in the +* documentation and/or other materials provided with the distribution. +* * Neither the name of the nor the +* names of its contributors may be used to endorse or promote products +* derived from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY +* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +* DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +*/ using System; using System.Collections.Generic; using System.Text; diff --git a/OpenGridServices/OpenGridServices.AssetServer/AssetHttpServer.cs b/OpenGridServices/OpenGridServices.AssetServer/AssetHttpServer.cs index 8439e92..023e4c1 100644 --- a/OpenGridServices/OpenGridServices.AssetServer/AssetHttpServer.cs +++ b/OpenGridServices/OpenGridServices.AssetServer/AssetHttpServer.cs @@ -1,3 +1,29 @@ +/* +* Copyright (c) OpenSim project, http://sim.opensecondlife.org/ +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in the +* documentation and/or other materials provided with the distribution. +* * Neither the name of the nor the +* names of its contributors may be used to endorse or promote products +* derived from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY +* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +* DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +*/ using System; using System.Collections.Generic; using System.Net; @@ -12,13 +38,24 @@ using OpenSim.Servers; namespace OpenGridServices.AssetServer { + /// + /// An HTTP server for sending assets + /// public class AssetHttpServer :BaseHttpServer { + /// + /// Creates the new asset server + /// + /// Port to initalise on public AssetHttpServer(int port) : base(port) { } + /// + /// Handles an HTTP request + /// + /// HTTP State Info public override void HandleRequest(Object stateinfo) { try diff --git a/OpenGridServices/OpenGridServices.AssetServer/Main.cs b/OpenGridServices/OpenGridServices.AssetServer/Main.cs index 0661fc5..334d3c5 100644 --- a/OpenGridServices/OpenGridServices.AssetServer/Main.cs +++ b/OpenGridServices/OpenGridServices.AssetServer/Main.cs @@ -49,6 +49,7 @@ using Db4objects.Db4o.Query; namespace OpenGridServices.AssetServer { /// + /// An asset server /// public class OpenAsset_Main : BaseServer, conscmd_callback { diff --git a/OpenSim/OpenSim.RegionServer/world/World.cs b/OpenSim/OpenSim.RegionServer/world/World.cs index ef6833c..22beb0e 100644 --- a/OpenSim/OpenSim.RegionServer/world/World.cs +++ b/OpenSim/OpenSim.RegionServer/world/World.cs @@ -229,6 +229,8 @@ namespace OpenSim.world Terrain.tainted = 0; OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs: Backup() - Terrain tainted, saving."); localStorage.SaveMap(Terrain.getHeights1D()); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs: Backup() - Rebuilding world map image."); + Terrain.exportImage("map_" + m_regInfo.RegionName + ".png", "defaultstripe.png"); OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs: Backup() - Terrain saved, informing Physics."); phyScene.SetTerrain(Terrain.getHeights1D()); diff --git a/bin/defaultstripe.png b/bin/defaultstripe.png new file mode 100644 index 0000000..9db19c8 Binary files /dev/null and b/bin/defaultstripe.png differ diff --git a/bin/stripe3.png b/bin/stripe3.png deleted file mode 100644 index 9db19c8..0000000 Binary files a/bin/stripe3.png and /dev/null differ -- cgit v1.1