summaryrefslogtreecommitdiffstats
path: root/src/graphics/engine/text.cpp
diff options
context:
space:
mode:
authorPiotr Dziwinski <piotrdz@gmail.com>2012-08-12 10:45:04 +0200
committerPiotr Dziwinski <piotrdz@gmail.com>2012-08-12 10:45:04 +0200
commitb4b74c30e9aa93ae736db73df5cb0c5d508ec6ed (patch)
treee22269066699afbd3e3464f0b69db08a610f57ef /src/graphics/engine/text.cpp
parent1996507fd3d4d9de90de99845b71a6bf3fbe62da (diff)
downloadcolobot-b4b74c30e9aa93ae736db73df5cb0c5d508ec6ed.tar.gz
colobot-b4b74c30e9aa93ae736db73df5cb0c5d508ec6ed.tar.bz2
colobot-b4b74c30e9aa93ae736db73df5cb0c5d508ec6ed.zip
Fixes & testing in CEngine
- fixed bugs in settings modes, etc. - some additions and minor refactoring
Diffstat (limited to 'src/graphics/engine/text.cpp')
-rw-r--r--src/graphics/engine/text.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/graphics/engine/text.cpp b/src/graphics/engine/text.cpp
index 0a57026..82abd62 100644
--- a/src/graphics/engine/text.cpp
+++ b/src/graphics/engine/text.cpp
@@ -649,8 +649,8 @@ void Gfx::CText::DrawHighlight(Gfx::FontHighlight hl, Math::Point pos, Math::Poi
Gfx::VertexCol quad[] =
{
Gfx::VertexCol(Math::Vector(p1.x, p1.y, 0.0f), grad[3]),
- Gfx::VertexCol(Math::Vector(p2.x, p1.y, 0.0f), grad[2]),
Gfx::VertexCol(Math::Vector(p1.x, p2.y, 0.0f), grad[0]),
+ Gfx::VertexCol(Math::Vector(p2.x, p1.y, 0.0f), grad[2]),
Gfx::VertexCol(Math::Vector(p2.x, p2.y, 0.0f), grad[1])
};
@@ -688,8 +688,6 @@ void Gfx::CText::DrawChar(Gfx::UTF8Char ch, Gfx::FontType font, float size, Math
cf->cache[ch] = tex;
}
- m_device->SetRenderState(Gfx::RENDER_STATE_CULLING, false);
-
Math::Point p1(pos.x, pos.y + tex.charSize.y - tex.texSize.y);
Math::Point p2(pos.x + tex.texSize.x, pos.y + tex.charSize.y);
@@ -698,8 +696,8 @@ void Gfx::CText::DrawChar(Gfx::UTF8Char ch, Gfx::FontType font, float size, Math
Gfx::Vertex quad[4] =
{
Gfx::Vertex(Math::Vector(p1.x, p1.y, 0.0f), n, Math::Point(0.0f, 1.0f)),
- Gfx::Vertex(Math::Vector(p2.x, p1.y, 0.0f), n, Math::Point(1.0f, 1.0f)),
Gfx::Vertex(Math::Vector(p1.x, p2.y, 0.0f), n, Math::Point(0.0f, 0.0f)),
+ Gfx::Vertex(Math::Vector(p2.x, p1.y, 0.0f), n, Math::Point(1.0f, 1.0f)),
Gfx::Vertex(Math::Vector(p2.x, p2.y, 0.0f), n, Math::Point(1.0f, 0.0f))
};