aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs')
-rw-r--r--OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs22
1 files changed, 11 insertions, 11 deletions
diff --git a/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs b/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs
index cb37067..4934ebd 100644
--- a/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs
+++ b/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs
@@ -96,9 +96,9 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
96 96
97 m_Enabled = true; 97 m_Enabled = true;
98 98
99 m_drawPrimVolume 99 m_drawPrimVolume
100 = Util.GetConfigVarFromSections<bool>(m_config, "DrawPrimOnMapTile", configSections, m_drawPrimVolume); 100 = Util.GetConfigVarFromSections<bool>(m_config, "DrawPrimOnMapTile", configSections, m_drawPrimVolume);
101 m_textureTerrain 101 m_textureTerrain
102 = Util.GetConfigVarFromSections<bool>(m_config, "TextureOnMapTile", configSections, m_textureTerrain); 102 = Util.GetConfigVarFromSections<bool>(m_config, "TextureOnMapTile", configSections, m_textureTerrain);
103 m_texturePrims 103 m_texturePrims
104 = Util.GetConfigVarFromSections<bool>(m_config, "TexturePrims", configSections, m_texturePrims); 104 = Util.GetConfigVarFromSections<bool>(m_config, "TexturePrims", configSections, m_texturePrims);
@@ -277,7 +277,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
277 m_scene.RegionInfo.RegionSizeY * 0.5f - 0.5f); 277 m_scene.RegionInfo.RegionSizeY * 0.5f - 0.5f);
278 278
279 warp_Material waterColorMaterial = new warp_Material(ConvertColor(WATER_COLOR)); 279 warp_Material waterColorMaterial = new warp_Material(ConvertColor(WATER_COLOR));
280 waterColorMaterial.setReflectivity(0); // match water color with standard map module thanks lkalif 280 waterColorMaterial.setReflectivity(0); // match water color with standard map module thanks lkalif
281 waterColorMaterial.setTransparency((byte)((1f - WATER_COLOR.A) * 255f)); 281 waterColorMaterial.setTransparency((byte)((1f - WATER_COLOR.A) * 255f));
282 renderer.Scene.addMaterial("WaterColor", waterColorMaterial); 282 renderer.Scene.addMaterial("WaterColor", waterColorMaterial);
283 renderer.SetObjectMaterial("Water", "WaterColor"); 283 renderer.SetObjectMaterial("Water", "WaterColor");
@@ -292,7 +292,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
292 292
293 float regionsx = m_scene.RegionInfo.RegionSizeX; 293 float regionsx = m_scene.RegionInfo.RegionSizeX;
294 float regionsy = m_scene.RegionInfo.RegionSizeY; 294 float regionsy = m_scene.RegionInfo.RegionSizeY;
295 295
296 // 'diff' is the difference in scale between the real region size and the size of terrain we're buiding 296 // 'diff' is the difference in scale between the real region size and the size of terrain we're buiding
297 float diff = regionsx / 256f; 297 float diff = regionsx / 256f;
298 298
@@ -377,7 +377,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
377 warp_Material material = new warp_Material(texture); 377 warp_Material material = new warp_Material(texture);
378 material.setReflectivity(50); 378 material.setReflectivity(50);
379 renderer.Scene.addMaterial("TerrainColor", material); 379 renderer.Scene.addMaterial("TerrainColor", material);
380 renderer.Scene.material("TerrainColor").setReflectivity(0); // reduces tile seams a bit thanks lkalif 380 renderer.Scene.material("TerrainColor").setReflectivity(0); // reduces tile seams a bit thanks lkalif
381 renderer.SetObjectMaterial("Terrain", "TerrainColor"); 381 renderer.SetObjectMaterial("Terrain", "TerrainColor");
382 } 382 }
383 383
@@ -530,7 +530,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
530 530
531 if (!fetched) 531 if (!fetched)
532 { 532 {
533 // Fetch the texture, decode and get the average color, 533 // Fetch the texture, decode and get the average color,
534 // then save it to a temporary metadata asset 534 // then save it to a temporary metadata asset
535 AssetBase textureAsset = m_scene.AssetService.Get(face.TextureID.ToString()); 535 AssetBase textureAsset = m_scene.AssetService.Get(face.TextureID.ToString());
536 if (textureAsset != null) 536 if (textureAsset != null)
@@ -616,7 +616,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
616 catch (Exception e) 616 catch (Exception e)
617 { 617 {
618 m_log.Warn(string.Format("[WARP 3D IMAGE MODULE]: Failed to decode asset {0}, exception ", id), e); 618 m_log.Warn(string.Format("[WARP 3D IMAGE MODULE]: Failed to decode asset {0}, exception ", id), e);
619 } 619 }
620 } 620 }
621 621
622 return ret; 622 return ret;
@@ -678,10 +678,10 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
678 { 678 {
679 width = bitmap.Width; 679 width = bitmap.Width;
680 height = bitmap.Height; 680 height = bitmap.Height;
681 681
682 BitmapData bitmapData = bitmap.LockBits(new Rectangle(0, 0, width, height), ImageLockMode.ReadOnly, bitmap.PixelFormat); 682 BitmapData bitmapData = bitmap.LockBits(new Rectangle(0, 0, width, height), ImageLockMode.ReadOnly, bitmap.PixelFormat);
683 pixelBytes = (bitmap.PixelFormat == PixelFormat.Format24bppRgb) ? 3 : 4; 683 pixelBytes = (bitmap.PixelFormat == PixelFormat.Format24bppRgb) ? 3 : 4;
684 684
685 // Sum up the individual channels 685 // Sum up the individual channels
686 unsafe 686 unsafe
687 { 687 {
@@ -690,7 +690,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
690 for (int y = 0; y < height; y++) 690 for (int y = 0; y < height; y++)
691 { 691 {
692 byte* row = (byte*)bitmapData.Scan0 + (y * bitmapData.Stride); 692 byte* row = (byte*)bitmapData.Scan0 + (y * bitmapData.Stride);
693 693
694 for (int x = 0; x < width; x++) 694 for (int x = 0; x < width; x++)
695 { 695 {
696 b += row[x * pixelBytes + 0]; 696 b += row[x * pixelBytes + 0];
@@ -705,7 +705,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
705 for (int y = 0; y < height; y++) 705 for (int y = 0; y < height; y++)
706 { 706 {
707 byte* row = (byte*)bitmapData.Scan0 + (y * bitmapData.Stride); 707 byte* row = (byte*)bitmapData.Scan0 + (y * bitmapData.Stride);
708 708
709 for (int x = 0; x < width; x++) 709 for (int x = 0; x < width; x++)
710 { 710 {
711 b += row[x * pixelBytes + 0]; 711 b += row[x * pixelBytes + 0];