From 0311fef2447217fb87111835d82654cdc6c6dd31 Mon Sep 17 00:00:00 2001 From: MW Date: Fri, 6 Apr 2007 19:08:24 +0000 Subject: Now back to compiling, just no terrain generation at the moment --- OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs | 9 +++++---- OpenSim.Storage/LocalStorageDb4o/MapStorage.cs | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'OpenSim.Storage/LocalStorageDb4o') diff --git a/OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs b/OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs index cdab9ba..b5fa79b 100644 --- a/OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs +++ b/OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs @@ -118,11 +118,11 @@ namespace OpenSim.Storage.LocalStorageDb4o } } - public float[] LoadWorld() + public float[,] LoadWorld() { OpenSim.Framework.Console.MainConsole.Instance.WriteLine("LoadWorld() - Loading world...."); //World blank = new World(); - float[] heightmap = null; + float[,] heightmap = null; OpenSim.Framework.Console.MainConsole.Instance.WriteLine("LoadWorld() - Looking for a heightmap in local DB"); IObjectSet world_result = db.Get(typeof(MapStorage)); if (world_result.Count > 0) @@ -137,7 +137,8 @@ namespace OpenSim.Storage.LocalStorageDb4o OpenSim.Framework.Console.MainConsole.Instance.WriteLine("LoadWorld() - No heightmap found, generating new one"); HeightmapGenHills hills = new HeightmapGenHills(); // blank.LandMap = hills.GenerateHeightmap(200, 4.0f, 80.0f, false); - heightmap = hills.GenerateHeightmap(200, 4.0f, 80.0f, false); + // heightmap = hills.GenerateHeightmap(200, 4.0f, 80.0f, false); + heightmap = new float[256, 256]; OpenSim.Framework.Console.MainConsole.Instance.WriteLine("LoadWorld() - Saving heightmap to local database"); MapStorage map = new MapStorage(); map.Map = heightmap; //blank.LandMap; @@ -147,7 +148,7 @@ namespace OpenSim.Storage.LocalStorageDb4o return heightmap; } - public void SaveMap(float[] heightmap) + public void SaveMap(float[,] heightmap) { IObjectSet world_result = db.Get(typeof(MapStorage)); if (world_result.Count > 0) diff --git a/OpenSim.Storage/LocalStorageDb4o/MapStorage.cs b/OpenSim.Storage/LocalStorageDb4o/MapStorage.cs index db590ff..dc5793e 100644 --- a/OpenSim.Storage/LocalStorageDb4o/MapStorage.cs +++ b/OpenSim.Storage/LocalStorageDb4o/MapStorage.cs @@ -6,7 +6,7 @@ namespace OpenSim.Storage.LocalStorageDb4o { public class MapStorage { - public float[] Map; + public float[,] Map; public MapStorage() { -- cgit v1.1