summaryrefslogtreecommitdiffstats
path: root/test/unit/ui/stubs/engine_stub.cpp
blob: 0a2777cf37fd305c56a5b21beb14180be75b0111 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#include "graphics/engine/engine.h"
#include "graphics/engine/text.h"

#include "mocks/text_mock.h"

template<> Gfx::CEngine* CSingleton<Gfx::CEngine>::m_instance = nullptr;

namespace Gfx {

CEngine::CEngine(CApplication* app) :
    m_app(app)
{
    m_text = new CTextMock(this);
    m_text->Create();
}

CEngine::~CEngine()
{
    delete m_text;
    m_text = nullptr;
}

CParticle* CEngine::GetParticle()
{
    return nullptr;
}

Math::Point CEngine::WindowToInterfaceSize(Math::IntPoint size)
{
    return Math::Point(size.x, size.y);
}

void CEngine::SetState(int state, const Color& color)
{
    if (state == m_lastState && color == m_lastColor)
        return;

    m_lastState = state;
    m_lastColor = color;
}

Math::IntPoint CEngine::GetWindowSize()
{
    return m_size;
}

void CEngine::AddStatisticTriangle(int count)
{
        m_statisticTriangle += count;
}

void CEngine::SetMouseType(EngineMouseType type)
{
    m_mouseType = type;
}

bool CEngine::SetTexture(const std::string& /* name */, int /* stage */)
{
    return true;
}

CText* CEngine::GetText()
{
    return m_text;
}

CDevice* CEngine::GetDevice()
{
    return m_device;
}

int CEngine::GetEditIndentValue()
{
    return m_editIndentValue;
}

void CEngine::DeleteTexture(const std::string& /* texName */)
{
}

Texture CEngine::LoadTexture(const std::string& /* name */)
{
    Texture texture;
    return texture;
}

Math::Vector CEngine::GetEyePt()
{
    return Math::Vector();
}

Math::Vector CEngine::GetLookatPt()
{
    return Math::Vector();
}

bool CEngine::GetPause()
{
    return false;
}


} /* Gfx */