summaryrefslogtreecommitdiffstats
path: root/src/graphics/engine/cloud.cpp
diff options
context:
space:
mode:
authorPiotr Dziwinski <piotrdz@gmail.com>2012-09-09 12:56:09 +0200
committerPiotr Dziwinski <piotrdz@gmail.com>2012-09-09 12:56:09 +0200
commitc6673b9aee483cfa64b49395c5c96b023bb09549 (patch)
tree5a469b1ce32a149b28c327cff38ba43b6d984b75 /src/graphics/engine/cloud.cpp
parentc2c1294ec99e3dae593bb31d2f331738d5be91d5 (diff)
downloadcolobot-c6673b9aee483cfa64b49395c5c96b023bb09549.tar.gz
colobot-c6673b9aee483cfa64b49395c5c96b023bb09549.tar.bz2
colobot-c6673b9aee483cfa64b49395c5c96b023bb09549.zip
Texture format detection; minor fixes
- detection of texture format - fixed depth mask bug - minor refactoring
Diffstat (limited to 'src/graphics/engine/cloud.cpp')
-rw-r--r--src/graphics/engine/cloud.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/graphics/engine/cloud.cpp b/src/graphics/engine/cloud.cpp
index 4c1d179..26a75ab 100644
--- a/src/graphics/engine/cloud.cpp
+++ b/src/graphics/engine/cloud.cpp
@@ -43,7 +43,7 @@ Gfx::CCloud::CCloud(CInstanceManager* iMan, Gfx::CEngine* engine)
m_level = 0.0f;
m_wind = Math::Vector(0.0f, 0.0f, 0.0f);
m_subdiv = 8;
- m_enable = true;
+ m_enabled = true;
m_lines.reserve(CLOUD_LINE_PREALLOCATE_COUNT);
}
@@ -78,8 +78,8 @@ bool Gfx::CCloud::EventFrame(const Event &event)
return true;
}
-void Gfx::CCloud::AdjustLevel(Math::Vector &pos, Math::Vector &eye, float deep,
- Math::Point &uv1, Math::Point &uv2)
+void Gfx::CCloud::AdjustLevel(Math::Vector& pos, Math::Vector& eye, float deep,
+ Math::Point& uv1, Math::Point& uv2)
{
uv1.x = (pos.x+20000.0f)/1280.0f;
uv1.y = (pos.z+20000.0f)/1280.0f;
@@ -96,7 +96,7 @@ void Gfx::CCloud::AdjustLevel(Math::Vector &pos, Math::Vector &eye, float deep,
void Gfx::CCloud::Draw()
{
- if (! m_enable) return;
+ if (! m_enabled) return;
if (m_level == 0.0f) return;
if (m_lines.empty()) return;
@@ -206,7 +206,7 @@ void Gfx::CCloud::CreateLine(int x, int y, int len)
}
void Gfx::CCloud::Create(const std::string& fileName,
- Gfx::Color diffuse, Gfx::Color ambient,
+ const Gfx::Color& diffuse, const Gfx::Color& ambient,
float level)
{
m_diffuse = diffuse;
@@ -258,12 +258,12 @@ float Gfx::CCloud::GetLevel()
return m_level;
}
-void Gfx::CCloud::SetEnable(bool enable)
+void Gfx::CCloud::SetEnabled(bool enabled)
{
- m_enable = enable;
+ m_enabled = enabled;
}
-bool Gfx::CCloud::GetEnable()
+bool Gfx::CCloud::GetEnabled()
{
- return m_enable;
+ return m_enabled;
}