diff --git a/source/ps/CConsole.h b/source/ps/CConsole.h index 749ee4fb92..d928997d9e 100644 --- a/source/ps/CConsole.h +++ b/source/ps/CConsole.h @@ -115,7 +115,6 @@ private: VfsPath m_sHistoryFile; int m_MaxHistoryLines; - bool m_bFocus; bool m_bVisible; // console is to be drawn bool m_bToggle; // show/hide animation is currently active double m_prevTime; // the previous time the cursor draw state changed (used for blinking cursor) diff --git a/source/ps/CLogger.cpp b/source/ps/CLogger.cpp index 27f9863877..8c10efa1b4 100644 --- a/source/ps/CLogger.cpp +++ b/source/ps/CLogger.cpp @@ -37,8 +37,6 @@ static const double RENDER_TIMEOUT = 10.0; // seconds before messages are delete static const double RENDER_TIMEOUT_RATE = 10.0; // number of timed-out messages deleted per second static const size_t RENDER_LIMIT = 20; // maximum messages on screen at once -static const size_t BUFFER_SIZE = 1024; - // Set up a default logger that throws everything away, because that's // better than crashing. (This is particularly useful for unit tests which // don't care about any log output.) diff --git a/source/renderer/WaterManager.cpp b/source/renderer/WaterManager.cpp index 913f8cb8ae..6080e8e933 100644 --- a/source/renderer/WaterManager.cpp +++ b/source/renderer/WaterManager.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2014 Wildfire Games. +/* Copyright (C) 2015 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -438,10 +438,9 @@ void WaterManager::RecomputeDistanceHeightmap() // This is currently upsampled by a factor of 2 to get more precision // This could be refined to only be done near the coast itself, but it's probably not necessary. - float level = SideSize; for (size_t z = 0; z < SideSize; ++z) { - level = SideSize; + float level = SideSize; for (size_t x = 0; x < SideSize; ++x) m_DistanceHeightmap[z*SideSize + x] = terrain->GetExactGroundLevel(x*2, z*2) >= m_WaterHeight ? level = 0.f : ++level; level = SideSize; @@ -459,7 +458,7 @@ void WaterManager::RecomputeDistanceHeightmap() } for (size_t x = 0; x < SideSize; ++x) { - level = SideSize; + float level = SideSize; for (size_t z = 0; z < SideSize; ++z) { if (terrain->GetExactGroundLevel(x*2, z*2) >= m_WaterHeight) @@ -519,7 +518,7 @@ void WaterManager::CreateWaveMeshes() std::set CoastalPointsSet; for (size_t z = 1; z < SideSize-1; ++z) for (size_t x = 1; x < SideSize-1; ++x) - if (abs(m_DistanceHeightmap[z*SideSize + x]-1.0f) < 0.2f) + if (fabs(m_DistanceHeightmap[z*SideSize + x]-1.0f) < 0.2f) CoastalPointsSet.insert(z*SideSize + x); // Second step: create chains out of those coastal points.