diff options
author | ancarola <raffaele.ancarola@epfl.ch> | 2018-11-17 22:46:15 +0100 |
---|---|---|
committer | ancarola <raffaele.ancarola@epfl.ch> | 2018-11-17 22:46:15 +0100 |
commit | ce7b39f47a1112941b3579f6502dd4e950cb099a (patch) | |
tree | 1d2a46f7dde690415302539c989f21067f270324 /test | |
download | flatland-ce7b39f47a1112941b3579f6502dd4e950cb099a.tar.gz flatland-ce7b39f47a1112941b3579f6502dd4e950cb099a.zip |
initialization
Diffstat (limited to 'test')
-rw-r--r-- | test/main.cpp | 30 | ||||
-rw-r--r-- | test/makefile | 11 | ||||
-rwxr-xr-x | test/test | bin | 0 -> 14624 bytes |
3 files changed, 41 insertions, 0 deletions
diff --git a/test/main.cpp b/test/main.cpp new file mode 100644 index 0000000..c30e5f9 --- /dev/null +++ b/test/main.cpp @@ -0,0 +1,30 @@ +#include "flatland.h" +#include "flatwindow.h" + +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 == 100) + quit_flatland(); + + cout << "Loop number: " << count << endl; +} diff --git a/test/makefile b/test/makefile new file mode 100644 index 0000000..f4c4ba1 --- /dev/null +++ b/test/makefile @@ -0,0 +1,11 @@ + +BIN:= test +SRC:= main.cpp +INCLUDE:= -I ../engine/include +LIBS:= -lSDL ../bin/libflatland.so + +$(BIN): + g++ -o $(BIN) $(SRC) $(INCLUDE) $(LIBS) -std=c++11 + +all: $(BIN) + diff --git a/test/test b/test/test Binary files differnew file mode 100755 index 0000000..7357057 --- /dev/null +++ b/test/test |