diff options
author | Piotr Dziwinski <piotrdz@gmail.com> | 2012-09-16 10:38:08 +0200 |
---|---|---|
committer | Piotr Dziwinski <piotrdz@gmail.com> | 2012-09-16 10:38:08 +0200 |
commit | 6a0d150539897ec65ccc161305db48de10ea35ba (patch) | |
tree | 7064e569459bd8d704edd28552f48bf2978d61a0 /src/graphics | |
parent | af9af56bb007050c969af310c4e816d260b9ce7f (diff) | |
download | colobot-6a0d150539897ec65ccc161305db48de10ea35ba.tar.gz colobot-6a0d150539897ec65ccc161305db48de10ea35ba.tar.bz2 colobot-6a0d150539897ec65ccc161305db48de10ea35ba.zip |
Interface works
- removed mock of CInterface and fixed event passing to CRobotMain
- changed texture names from tga and bmp to png
- UI now works but interaction is still broken
Diffstat (limited to 'src/graphics')
-rw-r--r-- | src/graphics/engine/engine.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/graphics/engine/engine.cpp b/src/graphics/engine/engine.cpp index d368aa6..af209bd 100644 --- a/src/graphics/engine/engine.cpp +++ b/src/graphics/engine/engine.cpp @@ -37,6 +37,7 @@ #include "graphics/engine/water.h" #include "math/geometry.h" #include "sound/sound.h" +#include "ui/interface.h" // Initial size of various vectors @@ -87,15 +88,6 @@ Gfx::EngineObjLevel4::EngineObjLevel4(bool used, Gfx::EngineTriangleType type, c vertices.reserve(LEVEL4_VERTEX_PREALLOCATE_COUNT); } - - -// TODO: temporary stub for CInterface -class CInterface -{ -public: - void Draw() {} -}; - Gfx::CEngine::CEngine(CInstanceManager *iMan, CApplication *app) { m_iMan = iMan; @@ -3124,7 +3116,7 @@ void Gfx::CEngine::DrawInterface() m_device->SetTransform(Gfx::TRANSFORM_WORLD, m_matWorldInterface); // Draw the entire interface - CInterface* interface = static_cast<CInterface*>( m_iMan->SearchInstance(CLASS_INTERFACE) ); + Ui::CInterface* interface = static_cast<Ui::CInterface*>( m_iMan->SearchInstance(CLASS_INTERFACE) ); if (interface != nullptr) interface->Draw(); @@ -3834,6 +3826,8 @@ void Gfx::CEngine::DrawMouseSprite(Math::Point pos, Math::Point size, int icon) Gfx::Vertex(Math::Vector(p2.x, p2.y, 0.0f), normal, Math::Point(u2, v1)) }; + m_device->SetRenderState(Gfx::RENDER_STATE_DEPTH_TEST, false); + m_device->SetRenderState(Gfx::RENDER_STATE_DEPTH_WRITE, false); m_device->DrawPrimitive(Gfx::PRIMITIVE_TRIANGLE_STRIP, vertex, 4); AddStatisticTriangle(2); } |