summaryrefslogtreecommitdiffstats
path: root/test/test2.cpp
blob: 55c6e554eac2d2a97863f7cf0296d4e0a624e5a6 (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
#include "flatland.hpp"
#include "window.hpp"
#include "exceptions/forcequit.hpp"

using namespace flat;

int count = 0;

void loop(float);

int main()
{
    FlatWindow win(600, 900, "Stocazzo");
    flat_status status;

    init_flatland(&win, loop, status, 60);

    return 0;
}

#include <iostream>

using namespace std;

void loop(float dt)
{
    ++count;

    if (count == 1000)
        throw ForceQuit("1000 steps reached");

    cout << "Loop number: " << count << endl;
}