From a4a060cd86f7e9a92979ae8a163d359dcb285776 Mon Sep 17 00:00:00 2001 From: historic_bruno Date: Mon, 26 Nov 2012 02:28:35 +0000 Subject: [PATCH] Fixes build warning and cleans up a few things This was SVN commit r12895. --- source/graphics/ParticleEmitter.cpp | 2 +- source/ps/GameSetup/Config.h | 2 +- source/renderer/ShadowMap.cpp | 3 +-- source/renderer/SkyManager.cpp | 2 +- source/renderer/SkyManager.h | 2 +- source/renderer/WaterManager.cpp | 6 +++--- source/renderer/WaterManager.h | 8 ++++---- 7 files changed, 12 insertions(+), 13 deletions(-) diff --git a/source/graphics/ParticleEmitter.cpp b/source/graphics/ParticleEmitter.cpp index 0771e651a7..eab7b4aef8 100644 --- a/source/graphics/ParticleEmitter.cpp +++ b/source/graphics/ParticleEmitter.cpp @@ -19,10 +19,10 @@ #include "ParticleEmitter.h" +#include "graphics/LightEnv.h" #include "graphics/ParticleEmitterType.h" #include "graphics/ParticleManager.h" #include "graphics/TextureManager.h" -#include "graphics/LightEnv.h" #include "renderer/Renderer.h" diff --git a/source/ps/GameSetup/Config.h b/source/ps/GameSetup/Config.h index 487d7016c9..a34e09be19 100644 --- a/source/ps/GameSetup/Config.h +++ b/source/ps/GameSetup/Config.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2011 Wildfire Games. +/* Copyright (C) 2012 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify diff --git a/source/renderer/ShadowMap.cpp b/source/renderer/ShadowMap.cpp index c02a41bf70..dc67d67d23 100644 --- a/source/renderer/ShadowMap.cpp +++ b/source/renderer/ShadowMap.cpp @@ -224,7 +224,6 @@ void ShadowMap::AddShadowedBound(const CBoundingBoxAligned& bounds) // projection and transformation matrices void ShadowMapInternals::CalcShadowMatrices() { - CRenderer& renderer = g_Renderer; float minZ = ShadowBound[0].Z; ShadowBound.IntersectFrustumConservative(LightspaceCamera.GetFrustum()); @@ -276,7 +275,7 @@ void ShadowMapInternals::CalcShadowMatrices() LightProjection._22 = scale.Y; LightProjection._24 = (shift.Y + offsetY) * scale.Y; LightProjection._33 = scale.Z; - LightProjection._34 = shift.Z * scale.Z;// + renderer.m_ShadowZBias; + LightProjection._34 = shift.Z * scale.Z; LightProjection._44 = 1.0; // Calculate texture matrix by creating the clip space to texture coordinate matrix diff --git a/source/renderer/SkyManager.cpp b/source/renderer/SkyManager.cpp index e373ae3b3a..3da9416a04 100644 --- a/source/renderer/SkyManager.cpp +++ b/source/renderer/SkyManager.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2009 Wildfire Games. +/* Copyright (C) 2012 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify diff --git a/source/renderer/SkyManager.h b/source/renderer/SkyManager.h index 409cc85251..9b4b16d1e4 100644 --- a/source/renderer/SkyManager.h +++ b/source/renderer/SkyManager.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010 Wildfire Games. +/* Copyright (C) 2012 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify diff --git a/source/renderer/WaterManager.cpp b/source/renderer/WaterManager.cpp index d6db698aef..5bb3baa2ed 100644 --- a/source/renderer/WaterManager.cpp +++ b/source/renderer/WaterManager.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2009 Wildfire Games. +/* Copyright (C) 2012 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -21,8 +21,8 @@ #include "precompiled.h" -#include "graphics/TextureManager.h" #include "graphics/Terrain.h" +#include "graphics/TextureManager.h" #include "lib/bits.h" #include "lib/timer.h" @@ -348,7 +348,7 @@ void WaterManager::CreateSuperfancyInfo() } waterRaise = waterRaise > 255 ? 255 : waterRaise; // gives a very good result, actually. normal *= 1.0f/81.0f; - normal[1] = 0.1; // acts as an anti distorter + normal[1] = 0.1f; // acts as an anti distorter normal = normal.Normalized(); u8 r = static_cast(normal[0]*128 + 127); diff --git a/source/renderer/WaterManager.h b/source/renderer/WaterManager.h index 64f7d5e6a5..a361c8e9a4 100644 --- a/source/renderer/WaterManager.h +++ b/source/renderer/WaterManager.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2009 Wildfire Games. +/* Copyright (C) 2012 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -23,10 +23,10 @@ #define INCLUDED_WATERMANAGER #include "graphics/Texture.h" -#include "ps/Overlay.h" -#include "maths/Matrix3D.h" #include "lib/ogl.h" -#include "VertexBufferManager.h" +#include "maths/Matrix3D.h" +#include "ps/Overlay.h" +#include "renderer/VertexBufferManager.h" struct SWavesVertex {