equal
deleted
inserted
replaced
3 #include <QQmlEngine> |
3 #include <QQmlEngine> |
4 #include <QUuid> |
4 #include <QUuid> |
5 |
5 |
6 #include "engine_instance.h" |
6 #include "engine_instance.h" |
7 #include "engine_interface.h" |
7 #include "engine_interface.h" |
8 #include "game_view.h" |
|
9 #include "preview_image_provider.h" |
8 #include "preview_image_provider.h" |
10 |
9 |
11 #include "hwengine.h" |
10 #include "hwengine.h" |
12 |
11 |
13 HWEngine::HWEngine(QQmlEngine* engine, QObject* parent) |
12 HWEngine::HWEngine(QQmlEngine* engine, QObject* parent) |
38 m_seed = QUuid::createUuid().toByteArray(); |
37 m_seed = QUuid::createUuid().toByteArray(); |
39 m_gameConfig.cmdSeed(m_seed); |
38 m_gameConfig.cmdSeed(m_seed); |
40 m_gameConfig.setPreview(true); |
39 m_gameConfig.setPreview(true); |
41 |
40 |
42 EngineInstance engine; |
41 EngineInstance engine; |
|
42 engine.sendConfig(m_gameConfig); |
|
43 |
43 Engine::PreviewInfo preview = engine.generatePreview(); |
44 Engine::PreviewInfo preview = engine.generatePreview(); |
44 |
45 |
45 QVector<QRgb> colorTable; |
46 QVector<QRgb> colorTable; |
46 colorTable.resize(256); |
47 colorTable.resize(256); |
47 for (int i = 0; i < 256; ++i) colorTable[i] = qRgba(255, 255, 0, i); |
48 for (int i = 0; i < 256; ++i) colorTable[i] = qRgba(255, 255, 0, i); |