summaryrefslogtreecommitdiffstats
path: root/main.cpp
blob: 14fd5897ee401185e874303a41fe7e76395a3a19 (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
#include <QtGui>
#include "mazescene.h"

int main(int argc, char **argv)
{
    QApplication app(argc, argv);
    app.setApplicationName("WolfenQt");
    QPixmapCache::setCacheLimit(100 * 1024); // 100 MB

    const char *map =
        "###&?###"
        "#      #"
        "=      &"
        "#      #"
        "# #### #"
        "&    # #"
        "* @@   &"
        "# @@ # #"
        "#      #"
        "###&%-##"
        "$      !"
        "#&&&&&&#";

    QVector<Light> lights;
    lights << Light(QPointF(3.5, 2.5), 1)
           << Light(QPointF(3.5, 6.5), 1)
           << Light(QPointF(1.5, 10.5), 0.3);

    MazeScene *scene = new MazeScene(lights, map, 8, 12);

    View view;
    view.setScene(scene);
    view.show();

    return app.exec();
}